diff --git a/data/game.lua b/data/game.lua index 40c134a..050dc85 100644 --- a/data/game.lua +++ b/data/game.lua @@ -103,10 +103,13 @@ game={ local hero = actors.search("jailer") if hero then game.cam.x = hero.x*8 + hero.dx*2 - 80 + if game.cam.x+160 > mapa.w*8 then game.cam.x = mapa.w*8-160 end if game.cam.x < 0 then game.cam.x=0 end game.cam.y = hero.y*8 + hero.dy*2 - 72 + if game.cam.y+144 > mapa.h*8 then game.cam.y = mapa.h*8-144 end if game.cam.y < 0 then game.cam.y=0 end end + cls(6) camera(game.cam.x, game.cam.y) setsource(tiles) setmap(mapa.surface) @@ -120,7 +123,7 @@ game={ end setmap(mapa.surface) camera(0,0) - + text(tostring(game.cam.x)..","..tostring(game.cam.y),1,1,8) if not scene.script and hero and not hero.path and hero.dx+hero.dy==0 then if btn(KEY_DOWN) then hero.path={pos=0,route='d',keys=true} diff --git a/data/jail.map b/data/jail.map index 40efa67..3a8320c 100644 --- a/data/jail.map +++ b/data/jail.map @@ -1,21 +1,21 @@ -40 +30 18 1 -17,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,17,17,17,17,17,17,17,17,17,17, -17,16,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,30,23,24,23,24,23,24,23,24,23,24,18,17,17,17,17,17,17,17,17,17,17, -17,16,39,40,39,40,39,40,39,40,39,40,39,40,39,40,39,40,46,39,40,39,40,39,40,39,40,39,40,18,17,17,17,17,17,17,17,17,17,17, -17,16,55,56,55,56,55,56,55,56,55,56,55,56,55,56,55,56,62,55,56,55,56,55,56,55,56,55,56,18,17,17,17,17,17,17,17,17,17,17, -17,16,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,60,5,2,5,2,5,2,5,2,5,2,18,17,17,17,17,17,17,17,17,17,17, -17,16,87,88,89,90,5,2,87,88,89,90,5,2,87,88,89,90,60,87,88,89,90,5,2,87,88,89,90,18,17,17,17,17,17,17,17,17,17,17, -17,16,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,60,5,2,5,2,5,2,5,2,5,2,18,17,17,17,17,17,17,17,17,17,17, -17,16,87,88,89,90,5,2,87,88,89,90,5,2,60,65,66,65,60,87,88,89,90,5,2,87,88,89,90,18,17,17,17,17,17,17,17,17,17,17, -17,16,5,2,5,2,5,2,5,2,5,2,5,2,60,81,82,81,60,5,2,5,2,5,2,5,2,5,2,18,17,17,17,17,17,17,17,17,17,17, -17,16,87,88,89,90,5,2,87,88,89,90,5,2,60,97,97,98,60,87,88,89,90,5,2,87,88,89,90,18,17,17,17,17,17,17,17,17,17,17, -17,16,5,2,5,2,5,2,5,2,5,2,5,2,60,2,5,3,60,5,2,5,2,5,2,5,2,5,2,18,17,17,17,17,17,17,17,17,17,17, -17,16,87,88,89,90,5,2,87,88,89,90,5,2,5,2,5,2,5,5,2,5,2,5,2,87,88,89,90,18,17,17,17,17,17,17,17,17,17,17, -17,16,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,5,2,5,2,5,2,5,2,5,2,18,17,17,17,17,17,17,17,17,17,17, -17,16,87,88,89,90,5,2,87,88,89,90,5,2,60,2,5,2,60,5,2,5,2,5,2,87,88,89,90,18,17,17,17,17,17,17,17,17,17,17, -17,16,5,2,5,2,5,2,5,2,5,2,5,2,60,15,12,13,60,5,2,5,2,5,2,5,2,5,2,18,17,17,17,17,17,17,17,17,17,17, -17,32,33,33,33,48,5,2,49,33,33,48,5,2,49,33,33,33,33,33,48,5,2,49,33,33,33,33,33,34,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, +17,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27, +17,16,23,24,23,24,23,24,23,24,23,24,23,24,23,24,23,24,30,23,24,23,24,23,24,23,24,23,24,18, +17,16,39,40,39,40,39,40,39,40,39,40,39,40,39,40,39,40,46,39,40,39,40,39,40,39,40,39,40,18, +17,16,55,56,55,56,55,56,55,56,55,56,55,56,55,56,55,56,62,55,56,55,56,55,56,55,56,55,56,18, +17,16,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,60,5,2,5,2,5,2,5,2,5,2,18, +17,16,87,88,89,90,5,2,87,88,89,90,5,2,87,88,89,90,60,87,88,89,90,5,2,87,88,89,90,18, +17,16,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,60,5,2,5,2,5,2,5,2,5,2,18, +17,16,87,88,89,90,5,2,87,88,89,90,5,2,64,65,66,65,67,87,88,89,90,5,2,87,88,89,90,18, +17,16,5,2,5,2,5,2,5,2,5,2,5,2,80,81,82,81,83,5,2,5,2,5,2,5,2,5,2,18, +17,16,87,88,89,90,5,2,87,88,89,90,5,2,112,68,69,70,113,87,88,89,90,5,2,87,88,89,90,18, +17,16,5,2,5,2,5,2,5,2,5,2,5,2,96,87,89,90,96,5,2,5,2,5,2,5,2,5,2,18, +17,16,87,88,89,90,5,2,87,88,89,90,5,2,5,2,5,2,5,5,2,5,2,5,2,87,88,89,90,18, +17,16,5,2,5,2,5,2,5,2,5,2,5,2,61,2,5,2,61,5,2,5,2,5,2,5,2,5,2,18, +17,16,87,88,89,90,5,2,87,88,89,90,5,2,60,2,5,2,60,5,2,5,2,5,2,87,88,89,90,18, +17,16,5,2,5,2,5,2,5,2,5,2,5,2,60,2,5,2,60,5,2,5,2,5,2,5,2,5,2,18, +17,32,33,33,33,48,5,2,49,33,33,48,5,2,49,33,33,33,33,33,48,5,2,49,33,33,33,33,33,34, +17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, +17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, diff --git a/data/m_jail1.lua b/data/m_jail1.lua index 8a29775..31a6f0b 100644 --- a/data/m_jail1.lua +++ b/data/m_jail1.lua @@ -2,7 +2,7 @@ levels["jail1"]={ load=function() mapa.load("jail.map") - actors.add({name="estudiant",x=12,y=8,o="d",gfx={x=64,y=0}}) + actors.add({name="estudiant",x=12,y=8,o="r",gfx={x=64,y=48}}) actors.add({name="comp_1_1",x=2,y=5,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) actors.add({name="comp_2_1",x=4,y=5,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) actors.add({name="comp_1_2",x=2,y=7,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) @@ -25,6 +25,35 @@ levels["jail1"]={ actors.add({name="comp_3_5",x=8,y=13,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) actors.add({name="comp_4_5",x=10,y=13,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp_5_1",x=14,y=5,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp_6_1",x=16,y=5,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp_5_2",x=14,y=7,o="d",gfx={x=96,y=16},action=levels.jail1.comp_updating_action}) + actors.add({name="comp_6_2",x=16,y=7,o="d",gfx={x=112,y=16},action=levels.jail1.comp_updating_action}) + + actors.add({name="comp2_1_1",x=19,y=5,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_2_1",x=21,y=5,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_1_2",x=19,y=7,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_2_2",x=21,y=7,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_1_3",x=19,y=9,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_2_3",x=21,y=9,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) + + actors.add({name="comp2_3_1",x=25,y=5,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_4_1",x=27,y=5,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_3_2",x=25,y=7,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_4_2",x=27,y=7,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_3_3",x=25,y=9,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_4_3",x=27,y=9,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_3_4",x=25,y=11,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_4_4",x=27,y=11,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_3_5",x=25,y=13,o="d",gfx={x=96,y=0},action=levels.jail1.comp_updating_action}) + actors.add({name="comp2_4_5",x=27,y=13,o="d",gfx={x=112,y=0},action=levels.jail1.comp_updating_action}) + + actors.add({name="comp_usufondo",x=16,y=15,o="d",gfx={x=112,y=16},action=levels.jail1.comp_usufondo_action}) + actors.add({name="taza_usufondo",x=14,y=15,o="d",gfx={x=112,y=32},action=levels.jail1.taza_usufondo_action}) + if not objects.search("diskito_usufondo") then actors.add({name="disquito_usufondo",x=15,y=10,o="d",gfx={x=96,y=32},action=levels.jail1.disquito_usufondo_action}) end + + actors.add({name="usufondo",x=16,y=14,o="d",gfx={x=0,y=0}}) + switches.add({x=8,y=8,w=1,h=3,action= function() if not flags.usu1 then @@ -34,7 +63,7 @@ levels["jail1"]={ function() wait.start(1) end, function() actors.search("usufondo").path={pos=0,route='dlllll'} end, function() balloon.show("HOY NO HAY JAIL!\nTU MISMO!!",10,"usufondo",false,{x=7,w=10,h=2}) end, - function() objects.collect("diskito_usufondo") end, + --function() objects.collect("diskito_usufondo") end, function() actors.search("usufondo").path={pos=0,route='rrrrru'} end, function() wait.start(0.5) end, function() actors.remove("usufondo") scene.cont() end, @@ -57,4 +86,30 @@ levels["jail1"]={ }) end, + comp_usufondo_action=function() + local hero = actors.search(actors.main.name) + if hero.o~="d" then return end + scene.start({ + function() balloon.show("ESTÀ BLOQUEJAT,\nI NO ME SÉ LA CONTRASENYA.",2,"jailer",true,{x=1,w=15,h=2}) end + }) + end, + + taza_usufondo_action=function() + local hero = actors.search(actors.main.name) + if hero.o~="d" then return end + scene.start({ + function() balloon.show("EL CAFÉ DE USUFONDO.\nESTÀ GELAT COM EL COR DEL DIMONI!",2,"jailer",true,{x=1,w=15,h=2}) end + }) + end, + + disquito_usufondo_action=function() + local hero = actors.search(actors.main.name) + --if hero.o~="d" then return end + scene.start({ + function() balloon.show("NO ÉS EL MEU DISQUITO,\nPERÒ ME'L QUEDE!\nIGUAL ES IMPORTANT",2,"jailer",true,{x=1,w=15,h=3}) end, + function() actors.remove("disquito_usufondo") scene.cont() end, + function() objects.collect("diskito_usufondo") scene.cont() end, + }) + end, + } \ No newline at end of file diff --git a/data/sprites.gif b/data/sprites.gif index 9f45870..0849655 100644 Binary files a/data/sprites.gif and b/data/sprites.gif differ diff --git a/data/tiles.gif b/data/tiles.gif index 2e28bad..b333577 100644 Binary files a/data/tiles.gif and b/data/tiles.gif differ