[FIX] Bol i escena del bol

This commit is contained in:
2026-05-01 12:47:29 +02:00
parent 1143b5d83e
commit 301247003c
5 changed files with 46 additions and 9 deletions

View File

@@ -6,7 +6,14 @@ bol_gif_col = 14
bol_gif_row = 3
-- bol={hab=39,x=28,y=25,w=32,h=16,bb={x=0,y=0,w=16,h=8}}
bol={hab=39,x=4,y=3,w=32,h=16,bb={x=0,y=0,w=16,h=8}}
bol={
hab=39,
x=4, y=3,
w=32,h=16,
bb={x=0,y=0,w=16,h=8},
furtat = false,
scene_trobat = false,
}
function bol.init()
local world_x, world_y = coords.room_to_world(bol.hab,bol.x,bol.y)
@@ -26,7 +33,20 @@ function bol.draw()
local x = bol_gif_col*tw
local y = toff+bol_gif_row*th
local scr_x, scr_y = viewp:screen_coords( bol.x, bol.y )
if bol.furtat then
pal.trans(0)
pal.subpal(1,0)
pal.subpal(2,0)
pal.subpal(5,0)
pal.subpal(6,2)
pal.subpal(16,2)
end
draw.surf(x,y,bol.w,bol.h,scr_x,scr_y,bol.w,bol.h)
pal.subpal(1)
pal.subpal(2)
pal.subpal(5)
pal.subpal(6)
pal.subpal(16)
end
function bol.update()
@@ -37,4 +57,14 @@ function bol.update()
-- remove_actor(bol)
-- end
-- end
local ah,ax,ay = coords.world_to_tile(abad.x, abad.y)
local bh,bx,by = coords.world_to_tile(bol.x, bol.y)
if bh ==ah then
if ay==by and not bol.scene_trobat then
-- abad.objects.bol=true
start_scene(scenes.bol_trobat)
bol.scene_trobat = true
-- remove_actor(bol)
end
end
end