forked from len0rd/rockbox
Put the display colours for monochrome and greyscale targets into the target config files, and use them both for the simulator UI and screendumps. The Clip now shows the split display properly in screendumps and simulator. A side effect is that screendumps of ordinary monochrome targets are now 4-bit BMP files (saves an alternate code path, and might be more compatible with some gfx programs). * Simplify the simulation of split display, and also simplify greylib simulation. The simulator now always calculates 129 shades (2*128 for a Clip sim), and just uses 2 (or 4) of those for native display simulation. * Centralised the simulator LCD dimension definition.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19950 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
94537f954e
commit
0d935ce75e
38 changed files with 519 additions and 573 deletions
12
apps/misc.h
12
apps/misc.h
|
|
@ -93,6 +93,18 @@ void screen_dump(void);
|
|||
void screen_dump_set_hook(void (*hook)(int fh));
|
||||
#endif
|
||||
|
||||
/* Make BMP colour map entries from R, G, B triples, without and with blending.
|
||||
* Not within HAVE_LCD_BITMAP because it is also used for the Player sim */
|
||||
#define RED_CMP(c) (((c) >> 16) & 0xff)
|
||||
#define GREEN_CMP(c) (((c) >> 8) & 0xff)
|
||||
#define BLUE_CMP(c) ((c) & 0xff)
|
||||
|
||||
#define BMP_COLOR(c) BLUE_CMP(c), GREEN_CMP(c), RED_CMP(c), 0
|
||||
#define BMP_COLOR_MIX(c1, c2, num, den) \
|
||||
(BLUE_CMP(c2) - BLUE_CMP(c1)) * (num) / (den) + BLUE_CMP(c1), \
|
||||
(GREEN_CMP(c2) - GREEN_CMP(c1)) * (num) / (den) + GREEN_CMP(c1), \
|
||||
(RED_CMP(c2) - RED_CMP(c1)) * (num) / (den) + RED_CMP(c1), 0
|
||||
|
||||
bool settings_parseline(char* line, char** name, char** value);
|
||||
long default_event_handler_ex(long event, void (*callback)(void *), void *parameter);
|
||||
long default_event_handler(long event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue