summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2011-09-08 12:44:34 +0000
committerNils Wallménius <nils@rockbox.org>2011-09-08 12:44:34 +0000
commit7337bcbf043b7a3a5af2559fd03abdb6be5eedb5 (patch)
tree16153d2f1ceb92e3279914f7c00722533809ca8d
parenta483c9c6f1e6674eb2b5dcf01e21a7ab4c77e24f (diff)
downloadrockbox-7337bcbf043b7a3a5af2559fd03abdb6be5eedb5.tar.gz
rockbox-7337bcbf043b7a3a5af2559fd03abdb6be5eedb5.zip
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
-rw-r--r--apps/plugins/goban/display.c29
-rw-r--r--docs/CREDITS1
2 files changed, 13 insertions, 17 deletions
diff --git a/apps/plugins/goban/display.c b/apps/plugins/goban/display.c
index 8c18039759..64b3adebb4 100644
--- a/apps/plugins/goban/display.c
+++ b/apps/plugins/goban/display.c
@@ -938,14 +938,15 @@ draw_stone_raw (int pixel_x, int pixel_y, bool black)
938#if LCD_DEPTH > 1 938#if LCD_DEPTH > 1
939 rb->lcd_set_foreground (black ? BLACK_COLOR : WHITE_COLOR); 939 rb->lcd_set_foreground (black ? BLACK_COLOR : WHITE_COLOR);
940#else 940#else
941 if (black) 941 int draw_mode;
942 { 942/* check whether foreground is bright or dark */
943 rb->lcd_set_drawmode (DRMODE_SOLID); 943#if defined(HAVE_NEGATIVE_LCD)
944 } 944 draw_mode = DRMODE_SOLID | (black ? DRMODE_INVERSEVID : 0);
945 else 945#else
946 { 946 draw_mode = DRMODE_SOLID | (black ? 0 : DRMODE_INVERSEVID);
947 rb->lcd_set_drawmode (DRMODE_SOLID + DRMODE_INVERSEVID); 947#endif /* HAVE_NEGATIVE_LCD */
948 } 948
949 rb->lcd_set_drawmode (draw_mode);
949#endif 950#endif
950 951
951 draw_circle (pixel_x + LINE_OFFSET, 952 draw_circle (pixel_x + LINE_OFFSET,
@@ -955,17 +956,11 @@ draw_stone_raw (int pixel_x, int pixel_y, bool black)
955#if LCD_DEPTH > 1 956#if LCD_DEPTH > 1
956 rb->lcd_set_foreground (black ? WHITE_COLOR : BLACK_COLOR); 957 rb->lcd_set_foreground (black ? WHITE_COLOR : BLACK_COLOR);
957#else 958#else
958 if (black) 959 rb->lcd_set_drawmode (draw_mode ^ DRMODE_INVERSEVID);
959 {
960 rb->lcd_set_drawmode (DRMODE_SOLID + DRMODE_INVERSEVID);
961 }
962 else
963 {
964 rb->lcd_set_drawmode (DRMODE_SOLID);
965 }
966#endif /* LCD_DEPTH > 1 */ 960#endif /* LCD_DEPTH > 1 */
967 961
968 if (!black) 962 /* outline stones of background color only */
963 if (draw_mode & DRMODE_INVERSEVID)
969 { 964 {
970 draw_circle (pixel_x + LINE_OFFSET, 965 draw_circle (pixel_x + LINE_OFFSET,
971 pixel_y + LINE_OFFSET, LINE_OFFSET, false); 966 pixel_y + LINE_OFFSET, LINE_OFFSET, false);
diff --git a/docs/CREDITS b/docs/CREDITS
index 29c01303d8..63540e2d9d 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -601,6 +601,7 @@ Asier Arsuaga
601Vencislav Atanasov 601Vencislav Atanasov
602Mauricio Garrido 602Mauricio Garrido
603Nick Peskett 603Nick Peskett
604Michael Goerner
604 605
605The libmad team 606The libmad team
606The wavpack team 607The wavpack team