- [NEW] Brymode

- [FIX] El switches no es resetejaven al eixir de una habitació
- [NEW] [EDITOR] Es mostra el tile sobre el que està el cursor
- [NEW] [EDITOR]: Es mostra el nom de l'actor sobre el que està el cursor
- [FIX] Durant una escena es repinta abans de seguir al seguent punt de l'script
- [NEW] [EDITOR] Es mostra la posició dels switches parpadejant
This commit is contained in:
2024-02-13 13:59:39 +01:00
parent db2f988de7
commit 05ebc097d6
7 changed files with 102 additions and 22 deletions

View File

@@ -2,6 +2,7 @@ actors={
list={},
updating=false,
main={},
under_cursor="",
init=function()
actors.list={}
@@ -45,11 +46,20 @@ actors={
end,
draw=function()
actors.under_cursor=""
for i,v in ipairs(actors.list) do
local frame=((v.dx+v.dy)%2)*16
local x,y = v.x, v.y
if v.ox then x = x + v.ox end
if v.oy then y = y + v.oy end
local mx = math.floor((mousex()-game.cam.x)/8)
local my = math.floor((mousey()-game.cam.y)/8)
if (mx==x or mx==x+1) and (my==y or my==y-1) then
actors.under_cursor=v.name
subpal(1,16,8)
end
if v.o=='u' then
sspr(v.gfx.x+frame,v.gfx.y+16,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16,v.dy>1)
elseif v.o=='d' then
@@ -59,6 +69,8 @@ actors={
elseif v.o=='r' then
sspr(v.gfx.x+frame,v.gfx.y+32,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16,true)
end
if not btn(KEY_LSHIFT) then subpal() end
end
end,