From ed4bcb3566f5b514a374f44efccf70c8b72d1773 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Mon, 24 Nov 2025 15:36:06 +0100 Subject: [PATCH] =?UTF-8?q?-=20[NEW]=20[editor]=20borrar=20items=20amb=20h?= =?UTF-8?q?over=20+=20SUPR=20-=20[WIP]=20treball=20en=20habitacions=20-=20?= =?UTF-8?q?[NEW]=20[tiles]=20punxos=20-=20[FIX]=20Ajustada=20la=20traject?= =?UTF-8?q?=C3=B2ria=20de=20la=20bala?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/editor.lua | 6 ++++++ data/rooms_background.gif | Bin 1162 -> 1184 bytes data/rooms_foreground.gif | Bin 1728 -> 1740 bytes data/rooms_items.gif | Bin 1004 -> 1004 bytes data/sprites.lua | 6 +++--- data/tiles.gif | Bin 1757 -> 1789 bytes 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/data/editor.lua b/data/editor.lua index 67f3486..f95ba55 100644 --- a/data/editor.lua +++ b/data/editor.lua @@ -169,6 +169,12 @@ editor = { editor.modified = true end end + if editor.item_hovered and key.press(key.DELETE) then + local sprite = sprites.list[editor.item_hovered] + map.surf(rooms.surf_items) + map.tile(sprite.pos.x//8,sprite.pos.y//8,0) + sprites.remove(sprite) + end end end, diff --git a/data/rooms_background.gif b/data/rooms_background.gif index 9031773e8bd6a99fe3cd4a96fdfea4bb22e893c6..59833d29f3114e1d12eec574af5fe5ccc4e0ebec 100644 GIT binary patch delta 64 zcmV-G0Kfl=37`qE7z6=@lNkh6G8o!h`HhDHg}=qsB1I~CCfAG?%Eh3BaqY;XTR!H9 WAc_VBN#v18CaL6-Og8yZKma>e(;IaF delta 42 ycmZ3$*~Pg*f`u`EvLs8WOovjg$hwS0-3G@r9`~4B%Xr*t@odH8K5aG@25SI99}pe@ diff --git a/data/rooms_foreground.gif b/data/rooms_foreground.gif index 2684d08508f17af497913f1c70a13e9442ba6d4c..cd40a12b70ac2f2ff6b6a2f65d2f4991480579e1 100644 GIT binary patch delta 227 zcmV<90383o4a^O&3IhQEvkL?60)N3gQDXu^5ycd2x9zsu0ko|)!xYW^+|Cp=HWL_O zSh3WY+I-VJQQ*(vdbVVI&pk6lb~_h>mlTDt_(XC?!S~y7H_i~@&h1!L2tcasHbsfA z4fhnBlLvy;p}GuZ>UCS*_oo18zTJ^vP6Pr3whtbL?TuYd#qh&V(Ytci?o>T{MQvXm z_uFhc1p9KkpQ+R24jrFd2w(dN6ZQ>Fubkm7GfR``3^m@k@ll9A1@Z6`Z@2cytq#Zi d_~)-b9Lnp@H~#+vU>E|pzx)MIe8~w206V}UZbtwB delta 215 zcmV;|04V>=4Zsbs3IhREvkL?60)K%!QDcEZ5ycd2x9zsu0ko|)!xYW^+}22l+#L%Sc{P+m^@u zHro!pzFeTV=OlSU#Vc1V!Z=;8x$@0*Zezw8->CZ(3_0#N@ll9Ah4AnTZ+G^|9pC!v Ro2SmV^wG=Ce{ul<06VtUZ8ZP@ diff --git a/data/rooms_items.gif b/data/rooms_items.gif index 41feab0aca8495195c13ae917d297d1cbbf953a8..30ece8e430bdc52d4de0d5a87794f34cf3f0151a 100644 GIT binary patch delta 38 wcmV+>0NMZS2kZy1wF3rL7-+HM$CJAQ9uo%L70NMZS2kZy1wF3qw7?@z7#gn@O9ur>8y0z=quw%=fO}n;jmjM9)J5;_ANdN!< diff --git a/data/sprites.lua b/data/sprites.lua index 903f924..4b085a9 100644 --- a/data/sprites.lua +++ b/data/sprites.lua @@ -159,7 +159,7 @@ sprites = { end, update_bullet = function(spr) - local tx, ty = (spr.pos.x+2)>>3, (spr.pos.y+1)>>3 + local tx, ty, ty2 = (spr.pos.x+2)>>3, (spr.pos.y+1)>>3, (spr.pos.y+2)>>3 if rooms.is_outside(tx,ty) then sprites.remove(spr) return end @@ -175,7 +175,7 @@ sprites = { end end - if map.tile(tx,ty) < 16 then + if map.tile(tx,ty) < 16 or map.tile(tx,ty2) < 16 then if spr.flipped then spr.pos.x = spr.pos.x - 8 else @@ -296,7 +296,7 @@ sprites = { elseif key.down(key.X) or pad.down(pad.B) then sprites.hero.shooting = true local x = sprites.hero.flipped and sprites.hero.pos.x+8 or sprites.hero.pos.x-8 - local bullet = templates.create("bullet", {pos={x=sprites.hero.pos.x, y=sprites.hero.pos.y+8}, flipped=sprites.hero.flipped}) + local bullet = templates.create("bullet", {pos={x=sprites.hero.pos.x, y=sprites.hero.pos.y+7}, flipped=sprites.hero.flipped}) table.insert(sprites.list, bullet) if sprites.hero.flipped then sprites.hero.pos.x=sprites.hero.pos.x-8 end anim = "hero_shoot" diff --git a/data/tiles.gif b/data/tiles.gif index 2bf003efb68585d8ccb8e47b8b5b93d8f3051cf7..9b055f0e468ab6a1dd125de155a483ee7c3fa180 100644 GIT binary patch delta 239 zcmVpEH2Qn!G9fI(Wu3RJ0R*{G<