From 333d05dfaccd3282b4a8d1bffa0983936cfffab5 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Wed, 11 Mar 2026 10:59:59 +0100 Subject: [PATCH] =?UTF-8?q?-=20[FIX]=20Al=20canviar=20d'habitaci=C3=B3=20c?= =?UTF-8?q?ap=20a=20baix=20se=20rallaba=20-=20[FIX]=20Al=20pulsar=20la=20m?= =?UTF-8?q?ajoria=20de=20botons=20en=20el=20menu,=20fa=20la=20acci=C3=B3?= =?UTF-8?q?=20i=20tanca=20el=20men=C3=BA=20autom=C3=A0ticament=20-=20[FIX]?= =?UTF-8?q?=20Ajustada=20la=20posici=C3=B3=20d'inici=20de=20l'heroi=20-=20?= =?UTF-8?q?[FIX]=20Arreglat=20bug=20raro=20que=20quan=20pillaves=20una=20m?= =?UTF-8?q?oneda=20algunes=20momies=20canviaven=20de=20direcci=C3=B3=20-?= =?UTF-8?q?=20[WIP]=20Reajustant=20els=20tiles=20de=20les=20habitacions=20?= =?UTF-8?q?al=20nou=20tamany?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/game.lua | 4 ++-- data/menu.lua | 19 +++++++++++++------ data/rooms_background.gif | Bin 1271 -> 1271 bytes data/rooms_foreground.gif | Bin 2027 -> 2044 bytes data/rooms_items.gif | Bin 1056 -> 1056 bytes data/score.lua | 2 +- data/sprites.lua | 9 +++++---- data/templates.lua | 1 + 8 files changed, 22 insertions(+), 13 deletions(-) diff --git a/data/game.lua b/data/game.lua index 285e6cf..0cf1562 100644 --- a/data/game.lua +++ b/data/game.lua @@ -77,7 +77,7 @@ game = { game.chg_step = 8*4 sprites.pause_ia = true -- [TODO] Crear els sprites per als items de l'habitació a la que entrem - sprites.add_from_room(rooms.pos.x+x*20, rooms.pos.y+y*12) + sprites.add_from_room(rooms.pos.x+x*20, rooms.pos.y+y*13) app.push(game.update_change_room) --sys.beat(10) end, @@ -94,7 +94,7 @@ game = { -- Pintar el mapa i sprites rooms.pos.x = rooms.pos.x + (game.chg_adv.x*2.5) - rooms.pos.y = rooms.pos.y + (game.chg_adv.y*1.5) + rooms.pos.y = rooms.pos.y + (game.chg_adv.y*1.625) sprites.hero.pos.x = sprites.hero.pos.x + game.chg_adv.x sprites.hero.pos.y = sprites.hero.pos.y + game.chg_adv.y diff --git a/data/menu.lua b/data/menu.lua index a70f685..d64971b 100644 --- a/data/menu.lua +++ b/data/menu.lua @@ -8,12 +8,12 @@ menu = { draw = function() actions = { - editor.play, - function() rooms.save() editor.modified=false end, - editor.quit, - function() editor.layer=LAYER_FOREGROUND end, - function() editor.layer=LAYER_BACKGROUND end, - function() editor.layer=LAYER_ITEMS end, + function() editor.play() menu.close() end, + function() rooms.save() editor.modified=false menu.close() end, + function() editor.quit() menu.close() end, + function() editor.layer=LAYER_FOREGROUND menu.close() end, + function() editor.layer=LAYER_BACKGROUND menu.close() end, + function() editor.layer=LAYER_ITEMS menu.close() end, function() rooms.toggle_visibility(LAYER_FOREGROUND) end, function() rooms.toggle_visibility(LAYER_BACKGROUND) end, function() rooms.toggle_visibility(LAYER_SHADOWS) end, @@ -82,6 +82,13 @@ menu = { end end, + close = function() + if not menu.hidden then + menu.hidden = true + tweening.add(24,0,0.25,easing.easeOutBounce,function(value,n,finished)menu.pos_y=value end) + end + end, + -- current_x = 0, -- -- init = function() diff --git a/data/rooms_background.gif b/data/rooms_background.gif index b962bd12149a8414b428bc9c52d972ad466e4f3e..7b9ff166990f0d966ef322689c753262341fcb08 100644 GIT binary patch delta 14 Vcmey)`JHnE7c*o1W^U#;i~uRz1nd9+ delta 14 Vcmey)`JHnE7c(QnW^U#;i~uI$1Z@BS diff --git a/data/rooms_foreground.gif b/data/rooms_foreground.gif index 0d21bba615bb1749c9c79b439a5ec780d14e8f8c..e8b5470fdf5c691299dcb1ea1678b1056b42f305 100644 GIT binary patch delta 849 zcmV-X1Frn*5Bv|XxdeX%BZ-qi;N^}J5uqWQRT4O+LT-YYm6lURP@$YUO6X^wItHL) zfp-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vnWjQevU%pDqK)%U$}im%#j`kZ7o|#*yt*y_y;jvog60YVeuPj3zXvDa~qD K(0n)v2mm`&zJR^} diff --git a/data/rooms_items.gif b/data/rooms_items.gif index f630ba022d6526b5dd707544a0222ad9064f07de..c6fb25bde526853171ce3bd5899b55a5a7d59130 100644 GIT binary patch delta 81 zcmV-X0IvU_2%reC3IhYFH^Gw)1Fk)gAq$AC5CKHPjwchK%(=7Y&sZmet|bAR|}L4yS8lrv~M@et$Sc;!M}S8FZ>g8llTKDU^pX; delta 81 zcmV-X0IvU_2%reC3IhZC{QQ#*1Fk)E1wdYi0HR^Xk_k-S%(=7Y&ut}xt|rooms.pos.y+11 then + if rooms.pos.y<84 and ty+2>rooms.pos.y+12 then game.change_room(0,1) else if sprites.hero.cooldown % 4 == 0 then @@ -471,7 +472,7 @@ sprites = { anim = move_anim local tx1, tx2, ty = (sprites.hero.pos.x+4)>>3, (sprites.hero.pos.x+11)>>3, (sprites.hero.pos.y+1)>>3 if map.tile(tx1,ty+2) < 16 or map.tile(tx2,ty+2) < 16 then - if ty+2>rooms.pos.y+11 then + if ty+2>rooms.pos.y+12 then game.change_room(0,1) else sprites.hero.pos.y = sprites.hero.pos.y + 1 @@ -485,7 +486,7 @@ sprites = { local tile_under_me1 = map.tile(tx1,ty+2) local tile_under_me2 = map.tile(tx2,ty+2) if tile_under_me1 == 0 and tile_under_me2 == 0 then - if rooms.pos.y<84 and ty+2>rooms.pos.y+11 then + if rooms.pos.y<84 and ty+2>rooms.pos.y+12 then game.change_room(0,1) else if sprites.hero.pos.y >= 808 then diff --git a/data/templates.lua b/data/templates.lua index 20a8a35..dc71213 100644 --- a/data/templates.lua +++ b/data/templates.lua @@ -49,6 +49,7 @@ templates = { surf = surf.load("misc.gif"), animation = "coin", state = templates.ALIVE, + timer = 0, light = 15, light_ox = 4, light_oy = 4,