FS#12257 by Michael Goerner, fixing stone colours in goban for inversed displays (clips and mrobe100).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30479 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2011-09-08 12:44:34 +00:00
parent a483c9c6f1
commit 7337bcbf04
2 changed files with 13 additions and 17 deletions

View file

@ -938,14 +938,15 @@ draw_stone_raw (int pixel_x, int pixel_y, bool black)
#if LCD_DEPTH > 1
rb->lcd_set_foreground (black ? BLACK_COLOR : WHITE_COLOR);
#else
if (black)
{
rb->lcd_set_drawmode (DRMODE_SOLID);
}
else
{
rb->lcd_set_drawmode (DRMODE_SOLID + DRMODE_INVERSEVID);
}
int draw_mode;
/* check whether foreground is bright or dark */
#if defined(HAVE_NEGATIVE_LCD)
draw_mode = DRMODE_SOLID | (black ? DRMODE_INVERSEVID : 0);
#else
draw_mode = DRMODE_SOLID | (black ? 0 : DRMODE_INVERSEVID);
#endif /* HAVE_NEGATIVE_LCD */
rb->lcd_set_drawmode (draw_mode);
#endif
draw_circle (pixel_x + LINE_OFFSET,
@ -955,17 +956,11 @@ draw_stone_raw (int pixel_x, int pixel_y, bool black)
#if LCD_DEPTH > 1
rb->lcd_set_foreground (black ? WHITE_COLOR : BLACK_COLOR);
#else
if (black)
{
rb->lcd_set_drawmode (DRMODE_SOLID + DRMODE_INVERSEVID);
}
else
{
rb->lcd_set_drawmode (DRMODE_SOLID);
}
rb->lcd_set_drawmode (draw_mode ^ DRMODE_INVERSEVID);
#endif /* LCD_DEPTH > 1 */
if (!black)
/* outline stones of background color only */
if (draw_mode & DRMODE_INVERSEVID)
{
draw_circle (pixel_x + LINE_OFFSET,
pixel_y + LINE_OFFSET, LINE_OFFSET, false);

View file

@ -601,6 +601,7 @@ Asier Arsuaga
Vencislav Atanasov
Mauricio Garrido
Nick Peskett
Michael Goerner
The libmad team
The wavpack team