From 2d19554269dcf8f4a7eb0e8a917c848da4cad86a Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Sun, 22 Jun 2025 19:39:13 +0200 Subject: [PATCH] =?UTF-8?q?-=20[NEW]=20ralentitzades=20les=20animacions=20?= =?UTF-8?q?-=20[NEW]=20Desde=20l'editor,=20amb=20'P'=20es=20posiciona=20al?= =?UTF-8?q?=20heroi=20en=20la=20posici=C3=B3=20del=20cursor=20-=20[ONGOING?= =?UTF-8?q?]=20habitacions:=206%=20-=20[NEW]=20M=C3=A9s=20tiles=20-=20[CHG?= =?UTF-8?q?]=20Reajustada=20velocitat=20de=20l'heroi=20-=20[FIX]=20Ajustad?= =?UTF-8?q?a=20la=20caixa=20de=20colisi=C3=B3=20un=20pixelet=20-=20[CHG]?= =?UTF-8?q?=20Ajustat=20el=20bot=20m=C3=A0xim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/animations.lua | 16 ++++++++-------- data/editor.lua | 5 +++-- data/rooms.lua | 4 ++-- data/rooms_background.bin | Bin 227 -> 378 bytes data/rooms_foreground.bin | Bin 348 -> 605 bytes data/sprites.lua | 15 ++++++++++----- data/tiles.gif | Bin 960 -> 1204 bytes 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/data/animations.lua b/data/animations.lua index 04f94b8..823bc6a 100644 --- a/data/animations.lua +++ b/data/animations.lua @@ -3,34 +3,34 @@ animations = { ["hero_stand"] = { cycle = {1}, frames = { - { frame={x=0,y=0,w=16,h=17}, wait=2 }, + { frame={x=0,y=0,w=16,h=17}, wait=4 }, } }, ["hero_jump"] = { cycle = {1}, frames = { - { frame={x=32,y=0,w=16,h=17}, wait=2 }, + { frame={x=32,y=0,w=16,h=17}, wait=4 }, } }, ["hero_walk"] = { cycle = {1,2,1,3}, frames = { - { frame={x=0,y=0,w=16,h=17}, wait=2 }, - { frame={x=16,y=0,w=16,h=17}, wait=2 }, - { frame={x=32,y=0,w=16,h=17}, wait=2 } + { frame={x=0,y=0,w=16,h=17}, wait=4 }, + { frame={x=16,y=0,w=16,h=17}, wait=4 }, + { frame={x=32,y=0,w=16,h=17}, wait=4 } } }, ["hero_stairs_idle"] = { cycle = {1}, frames = { - { frame={x=48,y=0,w=16,h=17}, wait=2 } + { frame={x=48,y=0,w=16,h=17}, wait=4 } } }, ["hero_stairs"] = { cycle = {1,2}, frames = { - { frame={x=48,y=0,w=16,h=17}, wait=2 }, - { frame={x=48,y=0,w=16,h=17}, wait=2, reversed=true } + { frame={x=48,y=0,w=16,h=17}, wait=4 }, + { frame={x=48,y=0,w=16,h=17}, wait=4, reversed=true } } }, } \ No newline at end of file diff --git a/data/editor.lua b/data/editor.lua index 2b9e691..49a31e3 100644 --- a/data/editor.lua +++ b/data/editor.lua @@ -86,8 +86,9 @@ editor = { rooms.pos.y = rooms.pos.y - 12 elseif key.press(key.TAB) or key.press(key.ESCAPE) then editor.picker.show() - elseif key.press(key.Q) then - msgbox.show("IE MEN!", {"Hi ha canvis sense guardar.", "Vols guardar-los abans d'eixir?"}, { {"Cancel", app.pop}, {"No", function() sys.quit() end}, {"Yes", sys.quit} } ) + elseif key.press(key.P) then + sprites.hero.pos.x = tx*8-4 + sprites.hero.pos.y = ty*8-9 end end, diff --git a/data/rooms.lua b/data/rooms.lua index 38f6f11..844d3e2 100644 --- a/data/rooms.lua +++ b/data/rooms.lua @@ -13,10 +13,10 @@ rooms = { surf_items = nil, surf_original_items = nil, visibility = LAYER_ALL, - pos = {x=0, y=0}, + pos = {x=0, y=4*12}, init = function() - rooms.pos.x, rooms.pos.y = 0,0 + rooms.pos.x, rooms.pos.y = 0,4*12 if rooms.surf_background ~= nil then surf.free(rooms.surf_background) end rooms.surf_background = surf.load("rooms_background.bin") --rooms.surf_background = surf.new(20*8,12*8) diff --git a/data/rooms_background.bin b/data/rooms_background.bin index a3fb1cacaabc4305febc02399ef97af29b3a7a0d..6603363a1d9db0b71a398c1cfc772c845733e9cd 100644 GIT binary patch delta 226 zcmV<803HA10r~=v7yPy8KBn6N+;HyGjoy!Wp_8-*h~Ht{!c!o`gB zPBtM}vSG@V5n|4qcQa(qgAWh3OmH-5yqh_ro?Mu<3D>Xh#y*W&^=IFy8^7-C8Tjnj zuwV0*Z2UN1-PxL+LP!9S@XyJt?QHbG&9Clcg ch8~6};)o=cXyS<|rl{hIEVk%kNdW->JDUJ;PXGV_ delta 74 zcmV-Q0JZ=60^lle^%z{# zUwq~HH<5c66&T-uW=WJ@Lo`GvVM7Cor(lB+vF8vFL2yW+g5oil-+T+9fI?L!GE`xB zBvyo=MIeT^;(s$vRHJt>f^;K)GwipcMFY0TP>$cFR~1$7CE0&odI7w+A4f;hBxO|r zOqtb_8A&-2W>jGb<&|wI1*Vr3(KJz%5Ri#cQw*^QKvim9q@_h>##xb@XO3wnM0MIU z=bj$9i6@{K_303sT@o76po{9M=t5Isg{GBhKKf8W0d&Thr4I=)ghH52#Vj~M60U1HY8ZDoc5YfL%>>^>aY+M`>3)HF-z#E h7eRY#tA!DC>$TWstL?VjcI)l8;D#&ixETcm06S^-nIZrH delta 76 zcmV-S0JHzy1l$6!7y(2 0 then anim = "hero_jump" + move_anim = "hero_jump" local tx1, tx2, ty = (sprites.hero.pos.x+4)>>3, (sprites.hero.pos.x+11)>>3, (sprites.hero.pos.y)>>3 + --draw.rect(tx1<<3,ty<<3,8,8,8) + --draw.rect(tx2<<3,ty<<3,8,8,28) if map.tile(tx1,ty) == 0 and map.tile(tx2,ty) == 0 then if ty 1 then sprites.hero.pos.y = sprites.hero.pos.y - 1 end end end - sprites.hero.jumping = sprites.hero.jumping - 2 + sprites.hero.jumping = sprites.hero.jumping - 1 else -- SI NO ESTÀ BOTANT... -- SI ESTÀ EN UNES ESCALERES... @@ -129,7 +134,7 @@ sprites = { end -- SI POLSA SPACE... if key.down(key.SPACE) then - sprites.hero.jumping = 16 + sprites.hero.jumping = 17 end end end @@ -149,7 +154,7 @@ sprites = { elseif key.down(key.RIGHT) then sprites.hero.flipped = false anim = move_anim - local tx, ty = (sprites.hero.pos.x+13)>>3, (sprites.hero.pos.y+16)>>3 + local tx, ty = (sprites.hero.pos.x+12)>>3, (sprites.hero.pos.y+16)>>3 if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 then if tx>rooms.pos.x+19 then game.change_room(1,0) diff --git a/data/tiles.gif b/data/tiles.gif index f4153c4678ce995c2a3e2513b82bdd5d992ecefd..7e21f4ba563ac8120c90af670fc3b765cbee774d 100644 GIT binary patch delta 710 zcmV;%0y+J_2eb*W`vHGt!k8&rt_E_9`PsLr_sV4!L34l7dhb~S#s6vF(dQj_ zR3$=QBoqQzoq*KQ7MN}bJ_Fwor3u%dX{3=hAan%kBFKu=eRCm(1bR4?d+%)r*j&ch zhvAMqs;ARnpbcf?5N<_?oq!Yu@X2OfT^L}7(y`ZGcG`^=i+fT9UnHPRRgtD-mP z1gkz4ph@bkqw0w&2C1&fYKkYm+D|^W+CnQ-`!u@`C`NyN2JEyLDEWf_n$k5{SGJ5q zJBqb(S=!?#;+8wzRe$g)X`kq==a4f!`s=XAF8l1X*KYgmxaY3>?!5Qz`|rR9FZ}St7jOLWUxxqyJN~VB^#A|> delta 464 zcmV;>0Wbcv3BU)i`vHID09P$OHb?huxhMu2h#sx@pXmld?;gyHbg$*tn4v@!OxW$S z&rm{-Zjd2>=zqUaQ+}q}Fv`{`6TH5h`S#S>RSy>-yj!<$yEySGM29@xWV+1-bDnDu z_Yt;<8tAs(m^e=Nkhznc&;9c2=FmZqiaYU-(|rmE_ythVavtFXo@>#Vfa zYU{1I=Bn$iy!PtrufPT??6AZZYwWSeCadhS%r@)nv(QLJEA6z@R%`7&wb*8>?Y7)@ z>+QGThAZy4+ZYo#w+i<^ww+dz4+#<@4o!@>+in+2Q2Ww1Q)z* G2mm`5Nc%ki