
dofile("actor.lua")
dofile("player_all.lua")

gfx_level = c_get_gfx_level()
demo_level = c_get_demo_level()
level_colour = c_background_colour( 0.0, c_zrand(5.0,20.0) )

--floor_colour = level_colour + c_zrand(-30.0,30.0)
--pylon_colour = c_zrand(-180.0,180.0)
floor_colour = level_colour
pylon_colour = level_colour

beastie_colour = floor_colour + 180.0
--color = c_zrand(0.0,180.0)

if cur_level_num < 101 then
	level_colour = 0
	floor_colour = 0
	pylon_colour = 0
	beastie_colour = 0
end

color = beastie_colour
bullet_colour = 0

dofile("pylon_chooser.lua")
dofile("floor_chooser.lua")
dofile("actor_place.lua")
dofile("beasties_all.lua")

--c_print( level_colour, floor_colour, pylon_colour, beastie_colour )

level_times =
{
   20,20,30,35,30,30,30,30,35,
30,30,30,35,20,25,35,30,30,30,
30,30,30,30,30,30,30,25,30,30,
25,30,30,35,30,25,30,35,30,40,
30,30,30,30,35,35,35,30,40,30,
25,30,30,30,30,25,30,35,30,30,
30,30,30,30,30,40,30,30,40,30,
30,25,30,35,25,40,30,35,35,30,
35,40,30,30,40,30,35,30,40,60
}

level_time = 60
if cur_level_num > 100 and cur_level_num < 190 then
	level_time = level_times[cur_level_num-100]
end
level_time = ( level_time * 100 )
c_set_time_limit( level_time, cur_level_num )

function everying_gameloop()
	ticker = ticker + 1
end

