diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/xobox.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index bf339caba5..a4200f01a1 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c | |||
@@ -97,19 +97,19 @@ PLUGIN_HEADER | |||
97 | #define BOARD_Y (LCD_HEIGHT-BOARD_H*CUBE_SIZE)/2 | 97 | #define BOARD_Y (LCD_HEIGHT-BOARD_H*CUBE_SIZE)/2 |
98 | 98 | ||
99 | #ifdef HAVE_LCD_COLOR | 99 | #ifdef HAVE_LCD_COLOR |
100 | #define CLR_RED LCD_RGBPACK(255,0,0) /* used to imply danger */ | 100 | #define CLR_RED LCD_RGBPACK(255,0,0) /* used to imply danger */ |
101 | #define CLR_BLUE LCD_RGBPACK(0,0,128) /* used for menu selection */ | 101 | #define CLR_BLUE LCD_RGBPACK(0,0,128) /* used for menu selection */ |
102 | #define CLR_CYAN LCD_RGBPACK(125, 145, 180) /* used for frame and filling */ | 102 | #define CLR_LTBLUE LCD_RGBPACK(125, 145, 180) /* used for frame and filling */ |
103 | #define PLR_COL LCD_WHITE /* color used for the player */ | 103 | #define PLR_COL LCD_WHITE /* color used for the player */ |
104 | #else | 104 | #else |
105 | #define CLR_RED LCD_DARKGRAY /* used to imply danger */ | 105 | #define CLR_RED LCD_DARKGRAY /* used to imply danger */ |
106 | #define CLR_BLUE LCD_BLACK /* used for menu selection */ | 106 | #define CLR_BLUE LCD_BLACK /* used for menu selection */ |
107 | #define CLR_CYAN LCD_LIGHTGRAY /* used for frame and filling */ | 107 | #define CLR_LTBLUE LCD_LIGHTGRAY /* used for frame and filling */ |
108 | #define PLR_COL LCD_BLACK /* color used for the player */ | 108 | #define PLR_COL LCD_BLACK /* color used for the player */ |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | #define EMPTIED LCD_BLACK /* empty spot */ | 111 | #define EMPTIED LCD_BLACK /* empty spot */ |
112 | #define FILLED CLR_CYAN /* filled spot */ | 112 | #define FILLED CLR_LTBLUE /* filled spot */ |
113 | #define TRAIL CLR_RED /* the red trail of the player */ | 113 | #define TRAIL CLR_RED /* the red trail of the player */ |
114 | #define QIX LCD_WHITE | 114 | #define QIX LCD_WHITE |
115 | #define UNCHECKED 0 | 115 | #define UNCHECKED 0 |
@@ -319,7 +319,7 @@ static void refresh_board (void) | |||
319 | CUBE_SIZE, CUBE_SIZE); | 319 | CUBE_SIZE, CUBE_SIZE); |
320 | } | 320 | } |
321 | rb->lcd_set_foreground (LCD_BLACK); | 321 | rb->lcd_set_foreground (LCD_BLACK); |
322 | rb->lcd_set_background (CLR_CYAN); | 322 | rb->lcd_set_background (CLR_LTBLUE); |
323 | rb->snprintf (str, sizeof (str), "Level %d", player.level + 1); | 323 | rb->snprintf (str, sizeof (str), "Level %d", player.level + 1); |
324 | rb->lcd_putsxy (BOARD_X, BOARD_Y, str); | 324 | rb->lcd_putsxy (BOARD_X, BOARD_Y, str); |
325 | rb->snprintf (str, sizeof (str), "%d%%", percentage ()); | 325 | rb->snprintf (str, sizeof (str), "%d%%", percentage ()); |
@@ -470,6 +470,8 @@ static void complete_trail (int fill) | |||
470 | } | 470 | } |
471 | } | 471 | } |
472 | } | 472 | } |
473 | |||
474 | rb->button_clear_queue(); | ||
473 | } | 475 | } |
474 | 476 | ||
475 | /* returns the color the real pixel(x,y) on the lcd is pointing at */ | 477 | /* returns the color the real pixel(x,y) on the lcd is pointing at */ |
@@ -762,15 +764,19 @@ static int xobox_loop (void) | |||
762 | button = rb->button_get_w_tmo (true); | 764 | button = rb->button_get_w_tmo (true); |
763 | switch (button) { | 765 | switch (button) { |
764 | case UP: | 766 | case UP: |
767 | case UP|BUTTON_REPEAT: | ||
765 | player.move = MOVE_UP; | 768 | player.move = MOVE_UP; |
766 | break; | 769 | break; |
767 | case DOWN: | 770 | case DOWN: |
771 | case DOWN|BUTTON_REPEAT: | ||
768 | player.move = MOVE_DN; | 772 | player.move = MOVE_DN; |
769 | break; | 773 | break; |
770 | case LEFT: | 774 | case LEFT: |
775 | case LEFT|BUTTON_REPEAT: | ||
771 | player.move = MOVE_LT; | 776 | player.move = MOVE_LT; |
772 | break; | 777 | break; |
773 | case RIGHT: | 778 | case RIGHT: |
779 | case RIGHT|BUTTON_REPEAT: | ||
774 | player.move = MOVE_RT; | 780 | player.move = MOVE_RT; |
775 | break; | 781 | break; |
776 | case PAUSE: | 782 | case PAUSE: |