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 Hyyppa - 2006-08-19
Last edited by Nicolas Pennequin - 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  Jens Arnold
2006-10-30 01:32
Reason for closing:  Accepted
Additional comments about closing:  

Adapted and committed to CVS.

Mikael Magnusson commented on 2006-08-20 09:19

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

Travis Hyyppa commented on 2006-08-20 10:21

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 :)

Nicolas Pennequin commented on 2006-08-29 00:17

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

Nicolas Pennequin commented on 2006-08-29 00:35

sorry… cleaned it up a bit.

Travis Hyyppa commented on 2006-08-29 01:13

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