summaryrefslogtreecommitdiff
path: root/apps/plugins/maze.c
diff options
context:
space:
mode:
authorKevin Ferrare <kevin@rockbox.org>2007-07-26 11:59:36 +0000
committerKevin Ferrare <kevin@rockbox.org>2007-07-26 11:59:36 +0000
commit5d3bbe6d3896e02cd72dcd12896036abb622f8a3 (patch)
treeef716d4fbd994b34834f230699d816515da17b36 /apps/plugins/maze.c
parentbc597e4aa5f5a53bdf791571fdd1a5e79d287a5a (diff)
fix red for maze plugin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13997 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/maze.c')
-rw-r--r--apps/plugins/maze.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/apps/plugins/maze.c b/apps/plugins/maze.c
index 6f01665e35..e0f9e0134c 100644
--- a/apps/plugins/maze.c
+++ b/apps/plugins/maze.c
@@ -206,14 +206,15 @@ void maze_draw(struct maze* maze, struct screen* display){
display->drawline(x*wx, y*wy, x*wx, y*wy+wy);
}
}
-#if (LCD_DEPTH > 1) || (defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH > 1))
- unsigned color;
- if(display->depth>1){
- color=(display->depth>=16)?LCD_RGBPACK(127,127,127):1;
- display->set_foreground(color);
- }
-#endif
if(maze->solved){
+#if LCD_DEPTH >= 16
+ if(display->depth>=16)
+ display->set_foreground(LCD_RGBPACK(127,127,127));
+#endif
+#if LCD_DEPTH >= 2
+ if(display->depth==2)
+ display->set_foreground(1);
+#endif
for(y=0; y<MAZE_HEIGHT; y++){
for(x=0; x<MAZE_WIDTH; x++){
cell = maze->maze[x][y];
@@ -223,13 +224,15 @@ void maze_draw(struct maze* maze, struct screen* display){
point_width, point_height);
}
}
- }
-#if (LCD_DEPTH > 1) || (defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH > 1))
- if(display->depth>1){
- color=(display->depth>=16)?LCD_RGBPACK(0,0,0):0;
- display->set_foreground(color);
- }
+#if LCD_DEPTH >= 16
+ if(display->depth>=16)
+ display->set_foreground(LCD_RGBPACK(0,0,0));
#endif
+#if LCD_DEPTH >= 2
+ if(display->depth==2)
+ display->set_foreground(0);
+#endif
+ }
/* mark start and end */
display->drawline(0, 0, wx, wy);
@@ -453,19 +456,16 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){
rb = api;
rb->backlight_set_timeout(1);
+
#if LCD_DEPTH > 1
rb->lcd_set_backdrop(NULL);
- FOR_NB_SCREENS(i){
- if(rb->screens[i]->depth>1){
- rb->screens[i]->set_background(LCD_DEFAULT_BG);
- if(rb->screens[i]->depth>=16)
- rb->screens[i]->set_foreground( LCD_RGBPACK( 0, 0, 0));
- else if(rb->screens[i]->depth==2)
- rb->screens[i]->set_foreground(0);
- }
- }
+ rb->lcd_set_background(LCD_DEFAULT_BG);
+#if LCD_DEPTH >= 16
+ rb->lcd_set_foreground( LCD_RGBPACK( 0, 0, 0));
+#elif LCD_DEPTH == 2
+ rb->lcd_set_foreground(0);
+#endif
#endif
-
maze_init(&maze);
maze_generate(&maze);
FOR_NB_SCREENS(i)