- [NEW] Més tiles

- [FIX] L'heroi se clavaba en les pareds quan li pegaven
- [NEW] Alguns fondos enhancechats
- [FIX] Augmentada la velocitat de Nemesio
- [NEW] Shortcuts de teclat per a canviar de mode a l'editor
- [NEW] Habitacions al 40%
This commit is contained in:
2026-03-24 19:01:32 +01:00
parent c1f5f92dae
commit 4e7a50879e
7 changed files with 26 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -52,19 +52,19 @@ function ia.update_hero()
-- Si li han pegat...
if sprites.hero.has_been_hit then
if sprites.hero.flipped then
local tx, ty = (sprites.hero.pos.x+3)>>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 then
game.change_room(-1,0)
if tx>rooms.pos.x+19 then
game.change_room(1,0)
else
sprites.hero.pos.x = sprites.hero.pos.x + 1
end
end
else
local tx, ty = (sprites.hero.pos.x+12)>>3, (sprites.hero.pos.y+16)>>3
local tx, ty = (sprites.hero.pos.x+3)>>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)
if tx<rooms.pos.x then
game.change_room(-1,0)
else
sprites.hero.pos.x = sprites.hero.pos.x - 1
end

View File

@@ -15,7 +15,7 @@ function ia.update_nemesio(spr)
if spr.substate == nemesio.STATIC then
spr.mode = draw.NORMAL
if spr.timer==100 then
if spr.timer==50 then
spr.timer=0
spr.substate = nemesio.FLOATING
spr.advance = {x=0,y=0}

View File

@@ -14,6 +14,8 @@ editor = {
item_dragged=nil,
dragged_start_pos=nil,
flip=false,
msg=nil,
msg_timeout=0,
enable = function()
app.update = editor.update
@@ -153,6 +155,18 @@ editor = {
editor.play()
elseif key.press(key.F11) then
reload_textures()
elseif key.press(key.N1) then
editor.layer=LAYER_FOREGROUND
editor.msg="FOREGROUND"
editor.msg_timeout = 20
elseif key.press(key.N2) then
editor.layer=LAYER_BACKGROUND
editor.msg="BACKGROUND"
editor.msg_timeout = 20
elseif key.press(key.N3) then
editor.layer=LAYER_ITEMS
editor.msg="ITEMS"
editor.msg_timeout = 20
end
if editor.layer==LAYER_ITEMS then
@@ -181,8 +195,11 @@ editor = {
draw.text(rooms.pos.x//20,1,96,28)
draw.text(rooms.pos.y//13,5,96,28)
-- Pintar el menú (el marcador serà en el modul game.lua)
--score.draw()
if editor.msg_timeout > 0 then
editor.msg_timeout = editor.msg_timeout - 1
draw.text(editor.msg, 10, 96, 8)
end
menu.draw()
end,