- cls() per a quan no hi ha mapa

- Scroll restringit
- Treballant en les jails
- Mes gràfics
This commit is contained in:
2023-02-03 19:06:49 +01:00
parent 964cb37d7c
commit f651874e6b
5 changed files with 80 additions and 22 deletions

View File

@@ -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}