--image_strip_load( filename, width, height, x offset, y offset, x spacing, y spacing )
--sprite_add( name, image_strip, x, y, length, originx, originy )
--sound_load(fname, name, loops, volume )

snd = sound_add("resc/snd/labofbrokentime.mp3", "bgm", 1, 100  )
snd = sound_add("resc/snd/jump.wav", "jump", 0, 100  )
snd = sound_add("resc/snd/land.wav", "land", 0, 100  )
snd = sound_add("resc/snd/rewind.wav", "rewind", 0, 100  )
snd = sound_add("resc/snd/crateslide.wav", "crateslide", 0, 100  )
snd = sound_add("resc/snd/sizzle.wav", "sizzle", 0, 100  )
snd = sound_add("resc/snd/button.wav", "button", 0, 100  )
snd = sound_add("resc/snd/cratehit.wav", "cratehit", 0, 100  )
snd = sound_add("resc/snd/dilator.wav", "dilator", 0, 100  )



img = image_strip_add("resc/img/player.png", 32, 32, 1, 1, 1, 1 )
sprite_add( "player_idle", img, 0, 0, 1, 14, 31 )
sprite_add( "player_run_start", img, 0, 1, 3, 14, 31  )
sprite_add( "player_run", img, 0, 2, 6, 14, 31 )
sprite_add( "player_jump", img, 0, 3, 7, 14, 31 )
sprite_add( "player_ascending", img, 0, 4, 3, 14, 31 )
sprite_add( "player_descend_start", img, 0, 5, 7, 14, 31 )
sprite_add( "player_descending", img, 0, 6, 2, 14, 31 )
sprite_add( "player_impact", img, 0, 7, 8, 14, 31 )
sprite_add( "player_throw", img, 0, 8, 12, 14, 31 )

img = image_strip_add("resc/img/numbers.png", 22, 36, 0, 0, 0, 0 )
sprite_add( "numbers", img, 0, 0, 11, 12, 18 )

img = image_strip_add("resc/img/tube.png", 20, 37, 0, 0, 0, 0 )
sprite_add( "tube", img, 0, 0, 1, 12, 18 )

img = image_strip_add("resc/img/exit.png", 16, 48, 0, 0, 0, 0 )
sprite_add( "exit", img, 0, 0, 1, 8, 48/2 )




img = image_strip_add("resc/img/laser.png", 16, 1, 0, 0, 0, 0 )
sprite_add( "laser", img, 0, 0, 7, 0, 0 )

img = image_strip_add("resc/img/block.png", 32, 32, 0, 0, 0, 0 )
sprite_add( "block", img, 0, 0, 1, 16, 16 )

img = image_strip_add("resc/img/environment16x16.png", 16, 16, 0, 0, 0, 0 )
sprite_add( "pickup_dilator", img, 0, 0, 1, 8, 8 )
sprite_add( "pickup_checkpoint", img, 1, 0, 1, 8, 8 )
sprite_add( "cards", img, 2, 0, 5, 0, 0 )
sprite_add( "laser_emitter", img, 1, 0, 10, 8, 0 )
sprite_add( "button_red", img, 0, 2, 4, 8, 16 )
sprite_add( "button_green", img, 0, 3, 4, 8, 16 )
sprite_add( "button_purple", img, 0, 4, 4, 8, 16 )
sprite_add( "button_yellow", img, 4, 2, 4, 8, 16 )
sprite_add( "button_blue", img, 4, 3, 4, 8, 16 )

img = image_strip_add("resc/img/trapdoors.png", 48, 48, 0, 0, 0, 0 )
sprite_add( "trapdoor_red", img, 0, 0, 11, 16, 2 )
sprite_add( "trapdoor_yellow", img, 0, 1, 11, 16, 2 )
sprite_add( "trapdoor_green", img, 0, 2, 11, 16, 2 )
sprite_add( "trapdoor_blue", img, 0, 3, 11, 16, 2 )
aa=sprite_add( "trapdoor_purple", img, 0, 4, 11, 16, 2 )

img = image_strip_add("resc/img/tiles.png", 16, 16, 1, 1, 0, 1 )
tileset_add( "blue", sprite_add("tileset_blue", img, 0, 0, 51, 0, 0) )
tileset_add( "green", sprite_add("tileset_green", img, 0, 1, 51, 0, 0) )
tileset_add( "teal", sprite_add("tileset_teal", img, 0, 2, 51, 0, 0) )
tileset_add( "grey", sprite_add("tileset_grey", img, 0, 3, 51, 0, 0) )
tileset_add( "purple", sprite_add("tileset_purple", img, 0, 4, 51, 0, 0) )

ani = tileset_animation_start("fire")
tileset_animation_add( ani, sprite_add("tileset_fire1", img, 0, 5, 51, 0, 0) )

tileset_animation_add( ani, sprite_add("tileset_fire2", img, 0, 6, 51, 0, 0) )
tileset_animation_add( ani,sprite_add("tileset_fire3", img, 0, 7, 51, 0, 0) )
tileset_animation_add( ani, sprite_add("tileset_fire4", img, 0, 6, 51, 0, 0) )
tileset_animation_finish(ani)

level_add( "resc/lvl/lvl1.lua", "lvl1" )
level_add( "resc/lvl/lvl2.lua", "lvl2" )
level_add( "resc/lvl/lvl3.lua", "lvl3" )
--level_add( "resc/lvl/test.lua", "lvl1" )

io.write("done")