mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
backport r24377 and r24378
mandelbrot color fixes for greyscale targets git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_5@24379 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
984c17bee9
commit
5cda26f9fb
1 changed files with 5 additions and 3 deletions
|
@ -31,14 +31,16 @@ static unsigned char imgbuffer[LCD_HEIGHT];
|
|||
static fb_data imgbuffer[LCD_HEIGHT];
|
||||
#endif
|
||||
|
||||
#define NUM_COLORS ((unsigned)(1 << LCD_DEPTH))
|
||||
|
||||
#ifdef USEGSLIB
|
||||
#define LCOLOR(iter) ((iter ^ 7) << 5)
|
||||
#else
|
||||
/*
|
||||
* Spread iter's colors over color range.
|
||||
* 345 (=15*26-45) is max_iter maximal value
|
||||
* This implementation ignores pixel format, thus it is not uniformly spread
|
||||
*/
|
||||
#define LCOLOR(iter) ((iter * NUM_COLORS) / 345)
|
||||
#define LCOLOR(iter) ((iter << LCD_DEPTH) / 345)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
#define COLOR(iter) (fb_data)LCOLOR(iter)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue