- [NEW] (EDITOR) selector de items

- [WIP] borrat i creació de items segons s'eix o entra de les habitacions
- [FIX] Items indexats per número, per a poder-se guardar en un mapa
- [NEW] room.current()
- [NEW] resaltat del item seleccionat
This commit is contained in:
2025-11-13 12:08:43 +01:00
parent eefab3f9b0
commit cf103dd02c
6 changed files with 145 additions and 37 deletions

View File

@@ -15,6 +15,10 @@ rooms = {
visibility = LAYER_ALL,
pos = {x=0, y=4*12},
current = function()
return (rooms.pos.x//20) + (rooms.pos.y//12) * 8
end,
init = function()
rooms.pos.x, rooms.pos.y = 0,4*12
if rooms.surf_background ~= nil then surf.free(rooms.surf_background) end
@@ -87,7 +91,7 @@ rooms = {
-- Pintem els sprites de negre
if rooms.is_visible(LAYER_SPRITES | LAYER_SHADOWS) then
sprites.draw()
sprites.draw(true)
--draw.surf(0, 0, 16, 17, 20, 15, 16, 17)
end