What about the pal() function from pico-8 ? If i want, say, to do a screen fade effect by changing the palette colors just like pico-8 in TIC how would i do it ?
Thanks for the great engine btw.
I see two ways:
64K RAM layout
--------------
0000-SCREEN
3FC0-PALETTE
3FF0-PALETTE MAP
Thanks.
Hey i think i figured out the method!
Is something like this?
-- author: Victoro
-- desc: fade effect
-- script: lua
t=0
x=104
y=24
mode=0
scr={x=240,y=128}
local function fade()
if t<5 then
poke(0x3fc0,t*50)
poke(0x3fc1,t*50)
poke(0x3fc2,t*50)
return
else
poke(0x3fc0,0)
poke(0x3fc1,0)
poke(0x3fc2,0)
cls()
mode=1
end
end
function TIC()
t=t+0.06
cls()
if mode==0 then fade() end
if mode==1 then
spr(1+(t%6)/3,x,y,-1,4)
print("TIC-80",(scr.x//2)-19,(scr.y//2),t*10)
end
end