- cls() per a quan no hi ha mapa
- Scroll restringit - Treballant en les jails - Mes gràfics
This commit is contained in:
@@ -103,10 +103,13 @@ game={
|
|||||||
local hero = actors.search("jailer")
|
local hero = actors.search("jailer")
|
||||||
if hero then
|
if hero then
|
||||||
game.cam.x = hero.x*8 + hero.dx*2 - 80
|
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
|
if game.cam.x < 0 then game.cam.x=0 end
|
||||||
game.cam.y = hero.y*8 + hero.dy*2 - 72
|
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
|
if game.cam.y < 0 then game.cam.y=0 end
|
||||||
end
|
end
|
||||||
|
cls(6)
|
||||||
camera(game.cam.x, game.cam.y)
|
camera(game.cam.x, game.cam.y)
|
||||||
setsource(tiles)
|
setsource(tiles)
|
||||||
setmap(mapa.surface)
|
setmap(mapa.surface)
|
||||||
@@ -120,7 +123,7 @@ game={
|
|||||||
end
|
end
|
||||||
setmap(mapa.surface)
|
setmap(mapa.surface)
|
||||||
camera(0,0)
|
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 not scene.script and hero and not hero.path and hero.dx+hero.dy==0 then
|
||||||
if btn(KEY_DOWN) then
|
if btn(KEY_DOWN) then
|
||||||
hero.path={pos=0,route='d',keys=true}
|
hero.path={pos=0,route='d',keys=true}
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
40
|
30
|
||||||
18
|
18
|
||||||
1
|
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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ levels["jail1"]={
|
|||||||
load=function()
|
load=function()
|
||||||
mapa.load("jail.map")
|
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_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_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})
|
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_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_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=
|
switches.add({x=8,y=8,w=1,h=3,action=
|
||||||
function()
|
function()
|
||||||
if not flags.usu1 then
|
if not flags.usu1 then
|
||||||
@@ -34,7 +63,7 @@ levels["jail1"]={
|
|||||||
function() wait.start(1) end,
|
function() wait.start(1) end,
|
||||||
function() actors.search("usufondo").path={pos=0,route='dlllll'} 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() 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() actors.search("usufondo").path={pos=0,route='rrrrru'} end,
|
||||||
function() wait.start(0.5) end,
|
function() wait.start(0.5) end,
|
||||||
function() actors.remove("usufondo") scene.cont() end,
|
function() actors.remove("usufondo") scene.cont() end,
|
||||||
@@ -57,4 +86,30 @@ levels["jail1"]={
|
|||||||
})
|
})
|
||||||
end,
|
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,
|
||||||
|
|
||||||
}
|
}
|
||||||
BIN
data/sprites.gif
BIN
data/sprites.gif
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.8 KiB |
BIN
data/tiles.gif
BIN
data/tiles.gif
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
Reference in New Issue
Block a user