summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-11-26 18:41:09 +0000
committerJens Arnold <amiconn@rockbox.org>2006-11-26 18:41:09 +0000
commit68fb89f41e36331db14ff06dfb42f02d75ec9bc9 (patch)
tree3184e273eb65ade9b149f7c5d39738df7bbf3695
parent80da8b141c4672ca4380d66094976b6342ed5071 (diff)
downloadrockbox-68fb89f41e36331db14ff06dfb42f02d75ec9bc9.tar.gz
rockbox-68fb89f41e36331db14ff06dfb42f02d75ec9bc9.zip
Cube: Keep main colours and backdrop.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11607 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/cube.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index 02f7b45770..00c9a3b606 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -188,13 +188,13 @@ static struct my_lcd *mylcd = &grayfuncs;
188#define MYLCD(fn) mylcd->fn 188#define MYLCD(fn) mylcd->fn
189#define MY_FILLTRIANGLE(x1, y1, x2, y2, x3, y3) gray_filltriangle(x1, y1, x2, y2, x3, y3) 189#define MY_FILLTRIANGLE(x1, y1, x2, y2, x3, y3) gray_filltriangle(x1, y1, x2, y2, x3, y3)
190#define MY_SET_FOREGROUND(fg) gray_set_foreground(fg) 190#define MY_SET_FOREGROUND(fg) gray_set_foreground(fg)
191#define MY_BLACK GRAY_BLACK 191#define MY_GET_FOREGROUND() gray_get_foreground()
192 192
193#else 193#else
194#define MYLCD(fn) rb->lcd_ ## fn 194#define MYLCD(fn) rb->lcd_ ## fn
195#define MY_FILLTRIANGLE(x1, y1, x2, y2, x3, y3) xlcd_filltriangle(x1, y1, x2, y2, x3, y3) 195#define MY_FILLTRIANGLE(x1, y1, x2, y2, x3, y3) xlcd_filltriangle(x1, y1, x2, y2, x3, y3)
196#define MY_SET_FOREGROUND(fg) rb->lcd_set_foreground(fg) 196#define MY_SET_FOREGROUND(fg) rb->lcd_set_foreground(fg)
197#define MY_BLACK LCD_BLACK 197#define MY_GET_FOREGROUND() rb->lcd_get_foreground()
198#endif 198#endif
199 199
200#if CONFIG_LCD == LCD_SSD1815 200#if CONFIG_LCD == LCD_SSD1815
@@ -443,12 +443,16 @@ static void cube_viewport(void)
443static void cube_draw(void) 443static void cube_draw(void)
444{ 444{
445 int i, j, line; 445 int i, j, line;
446#if LCD_DEPTH > 1 || defined(USE_GSLIB)
447 unsigned old_foreground;
448#endif
446 449
447 switch (mode) 450 switch (mode)
448 { 451 {
449#if LCD_DEPTH > 1 || defined(USE_GSLIB) 452#if LCD_DEPTH > 1 || defined(USE_GSLIB)
450 case SOLID: 453 case SOLID:
451 454
455 old_foreground = MY_GET_FOREGROUND();
452 for (i = 0; i < 6; i++) 456 for (i = 0; i < 6; i++)
453 { 457 {
454 /* backface culling; if the shape winds counter-clockwise, we are 458 /* backface culling; if the shape winds counter-clockwise, we are
@@ -475,7 +479,7 @@ static void cube_draw(void)
475 point2D[faces[i].corner[3]].y); 479 point2D[faces[i].corner[3]].y);
476 480
477 } 481 }
478 MY_SET_FOREGROUND(MY_BLACK); 482 MY_SET_FOREGROUND(old_foreground);
479 break; 483 break;
480#endif /* (LCD_DEPTH > 1) || GSLIB */ 484#endif /* (LCD_DEPTH > 1) || GSLIB */
481 485
@@ -558,7 +562,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
558 562
559#ifdef HAVE_LCD_BITMAP 563#ifdef HAVE_LCD_BITMAP
560#if LCD_DEPTH > 1 564#if LCD_DEPTH > 1
561 rb->lcd_set_backdrop(NULL);
562 xlcd_init(rb); 565 xlcd_init(rb);
563#elif defined(USE_GSLIB) 566#elif defined(USE_GSLIB)
564 gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size); 567 gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size);