Palette Cycling

new topic     » topic index » view thread      » older message » newer message

I'm trying to write a proc for cycling the palette ie:- color255 becomes
color254, 254 becomes 253, 253-252 etc right down to color 1 which will become
the original color that 255 was, leaving color0 black. The following is getting
there but it's way to slow. Each set of 255 takes over 3secs. I'd like the whole
palette changed about 10 times per sec.
Has anyone got any ideas about how to speed it up?

*****************************************************

procedure cycle()
sequence paltemp, newpalc
paltemp = {0,0,0}
while 1 do
 if get_key() != -1 then
  exit
 end if
 for c = 255 to 1 by -1 do
  newpalc = palette(c, paltemp)
  paltemp = newpalc
 end for
end while
end procedure

*****************************************************

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu