I am trying to understand how specific script (fade function) works in PICO8:
function fade()
fadep=split("0xffff.8,0xfffe.8,0xffec.8,0xfec8.8,0xec80.8,0xc800.8,0x8000.8,0x0.8")
for i=0,64 do
fillp(fadep[flr(i/(32/#fadep))+1])
rectfill(0,0,127,127,0)
flip()
end
end
I understand that split()
function splits the number in argument separated by comma (by default) and we will get 8 HEX numbers like first one "0xffff.8"
.
As far as I know HEX numbers starts with "0x"
, but what means this ".8"
at the end?
Thanks!
In the function
filp
per the wikiIt explicitly sets the off bits to be transparent as explained in the
fillp
write upThe notation is a bit odd, but thanks for asking that was a fun one to learn.