Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Travis - 2006-08-19
Last edited by nicolas_p - 2006-10-04

FS#5856 - Demystify Color

Demystify with random fading colors.

(File wont patch for some reason so here is the source)

Closed by  amiconn
2006-10-30 01:32
Reason for closing:  Accepted
Additional comments about closing:  

Adapted and committed to CVS.

instead of
LCD_RGBPACK(rb→rand()%255,rb→rand()%255,rb→rand()%255)
you can use
rb→rand()%LCD_RGBPACK(255,255,255)

Yes, but that would give the effect of random "flashing" colors, wouldn't it?

I set three "target color" variables (for red, green, and blue), and three "current color" variables. The current color in/decreases by one for each variable until the target color is reached for red, green, and blue. Once the target color is reached a new target color is generated with rb→rand()%255 for each variable and the process starts over. This gives the effect of "fading" colors.

Unless i'm not understanding you fully.. I'm fairly new with C :)

It works quite nicely :)
Here is a patch file.

sorry… cleaned it up a bit.

Thanks! No need to be sorry, if theres a better way to do it go for it. :)

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing