This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#5856 - Demystify Color
Attached to Project:
Rockbox
Opened by Travis Hyyppa (Travis) - Saturday, 19 August 2006, 12:22 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Wednesday, 04 October 2006, 13:42 GMT+2
Opened by Travis Hyyppa (Travis) - Saturday, 19 August 2006, 12:22 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Wednesday, 04 October 2006, 13:42 GMT+2
|
DetailsDemystify with random fading colors.
(File wont patch for some reason so here is the source) |
This task depends upon
Closed by Jens Arnold (amiconn)
Monday, 30 October 2006, 02:32 GMT+2
Reason for closing: Accepted
Additional comments about closing: Adapted and committed to CVS.
Monday, 30 October 2006, 02:32 GMT+2
Reason for closing: Accepted
Additional comments about closing: Adapted and committed to CVS.
LCD_RGBPACK(rb->rand()%255,rb->rand()%255,rb->rand()%255)
you can use
rb->rand()%LCD_RGBPACK(255,255,255)
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 :)
Here is a patch file.