fix red for maze plugin

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13997 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Kevin Ferrare 2007-07-26 11:59:36 +00:00
parent bc597e4aa5
commit 5d3bbe6d38

View file

@ -206,14 +206,15 @@ void maze_draw(struct maze* maze, struct screen* display){
display->drawline(x*wx, y*wy, x*wx, y*wy+wy); 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(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(y=0; y<MAZE_HEIGHT; y++){
for(x=0; x<MAZE_WIDTH; x++){ for(x=0; x<MAZE_WIDTH; x++){
cell = maze->maze[x][y]; cell = maze->maze[x][y];
@ -223,13 +224,15 @@ void maze_draw(struct maze* maze, struct screen* display){
point_width, point_height); point_width, point_height);
} }
} }
} #if LCD_DEPTH >= 16
#if (LCD_DEPTH > 1) || (defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH > 1)) if(display->depth>=16)
if(display->depth>1){ display->set_foreground(LCD_RGBPACK(0,0,0));
color=(display->depth>=16)?LCD_RGBPACK(0,0,0):0;
display->set_foreground(color);
}
#endif #endif
#if LCD_DEPTH >= 2
if(display->depth==2)
display->set_foreground(0);
#endif
}
/* mark start and end */ /* mark start and end */
display->drawline(0, 0, wx, wy); display->drawline(0, 0, wx, wy);
@ -453,19 +456,16 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){
rb = api; rb = api;
rb->backlight_set_timeout(1); rb->backlight_set_timeout(1);
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
rb->lcd_set_backdrop(NULL); rb->lcd_set_backdrop(NULL);
FOR_NB_SCREENS(i){ rb->lcd_set_background(LCD_DEFAULT_BG);
if(rb->screens[i]->depth>1){ #if LCD_DEPTH >= 16
rb->screens[i]->set_background(LCD_DEFAULT_BG); rb->lcd_set_foreground( LCD_RGBPACK( 0, 0, 0));
if(rb->screens[i]->depth>=16) #elif LCD_DEPTH == 2
rb->screens[i]->set_foreground( LCD_RGBPACK( 0, 0, 0)); rb->lcd_set_foreground(0);
else if(rb->screens[i]->depth==2) #endif
rb->screens[i]->set_foreground(0);
}
}
#endif #endif
maze_init(&maze); maze_init(&maze);
maze_generate(&maze); maze_generate(&maze);
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)