summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTom Ross <midgey@rockbox.org>2007-03-25 17:52:56 +0000
committerTom Ross <midgey@rockbox.org>2007-03-25 17:52:56 +0000
commit8a6e69263e526f2d5d0671dc1ea380179bcbe2c2 (patch)
tree5d03226281496619a625d9446b7d6ca6e194a4c3 /apps
parent77983681caf10128a05a3b4dff6b5459b9dfb409 (diff)
downloadrockbox-8a6e69263e526f2d5d0671dc1ea380179bcbe2c2.zip
rockbox-8a6e69263e526f2d5d0671dc1ea380179bcbe2c2.tar.gz
rockbox-8a6e69263e526f2d5d0671dc1ea380179bcbe2c2.tar.bz2
rockbox-8a6e69263e526f2d5d0671dc1ea380179bcbe2c2.tar.xz
Fix a few bugs in Xobox. Now menu isn't pure black on non-color targets and an issue where the board was drawn even when the user quit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12910 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/xobox.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c
index 42ed25e..49e730d 100644
--- a/apps/plugins/xobox.c
+++ b/apps/plugins/xobox.c
@@ -131,12 +131,10 @@ PLUGIN_HEADER
#ifdef HAVE_LCD_COLOR
#define CLR_RED LCD_RGBPACK(255,0,0) /* used to imply danger */
-#define CLR_BLUE LCD_RGBPACK(0,0,128) /* used for menu selection */
#define CLR_LTBLUE LCD_RGBPACK(125, 145, 180) /* used for frame and filling */
#define PLR_COL LCD_WHITE /* color used for the player */
#else
#define CLR_RED LCD_DARKGRAY /* used to imply danger */
-#define CLR_BLUE LCD_BLACK /* used for menu selection */
#define CLR_LTBLUE LCD_LIGHTGRAY /* used for frame and filling */
#define PLR_COL LCD_BLACK /* color used for the player */
#endif
@@ -150,6 +148,9 @@ PLUGIN_HEADER
#define PIC_QIX 0
#define PIC_PLAYER 1
+#define MENU_START 0
+#define MENU_QUIT 1
+
/* The time (in ms) for one iteration through the game loop - decrease this
to speed up the game - note that current_tick is (currently) only accurate
to 10ms.
@@ -711,9 +712,6 @@ static inline void move_board (void)
}
/* the main menu */
-#define MAIN_MENU_SIZE 2
-#define MENU_START 0
-#define MENU_QUIT 1
static int game_menu (void)
{
MENUITEM_STRINGLIST(menu, "XOBOX Menu", NULL, "Start New Game", "Quit");
@@ -721,6 +719,9 @@ static int game_menu (void)
#ifdef HAVE_LCD_COLOR
rb->lcd_set_foreground (rb->global_settings->fg_color);
rb->lcd_set_background (rb->global_settings->bg_color);
+#else
+ rb->lcd_set_foreground(LCD_BLACK);
+ rb->lcd_set_background(LCD_WHITE);
#endif
selection = rb->do_menu(&menu, NULL);
if (selection < 0)
@@ -789,7 +790,10 @@ static int xobox_loop (void)
if (ret == MENU_START)
init_game ();
else
+ {
quit = true;
+ continue;
+ }
break;
default:
if (rb->default_event_handler (button) == SYS_USB_CONNECTED)
@@ -832,6 +836,8 @@ enum plugin_status plugin_start (struct plugin_api *api, void *parameter)
/* Permanently enable the backlight (unless the user has turned it off) */
if (rb->global_settings->backlight_timeout > 0)
rb->backlight_set_timeout (1);
+
+ quit = false;
randomize ();
if (game_menu () == MENU_START) {