- [FIX] Al canviar d'habitació cap a baix se rallaba

- [FIX] Al pulsar la majoria de botons en el menu, fa la acció i tanca el menú automàticament
- [FIX] Ajustada la posició d'inici de l'heroi
- [FIX] Arreglat bug raro que quan pillaves una moneda algunes momies canviaven de direcció
- [WIP] Reajustant els tiles de les habitacions al nou tamany
This commit is contained in:
2026-03-11 10:59:59 +01:00
parent 40c3dcd6d0
commit 333d05dfac
8 changed files with 22 additions and 13 deletions

View File

@@ -48,7 +48,7 @@ sprites = {
init = function()
sprites.hero = {
type = "hero",
pos = { x=28, y=4*13*8+71 },
pos = { x=28, y=4*13*8+79 },
size= { w=16, h=17 },
bbo = { left=3, top=2, right=3, bottom=0 },
current_frame = 1,
@@ -196,6 +196,7 @@ sprites = {
end,
update_mummy = function(spr)
map.surf(rooms.surf_foreground)
if spr.state == templates.ALIVE then
if sprites.hero.state == templates.ALIVE then
local x1,y1,w1,h1 = util.aabb(spr) -- El meu aabb
@@ -377,7 +378,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.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