diff options
author | Zakk Roberts <midk@rockbox.org> | 2006-06-03 19:24:10 +0000 |
---|---|---|
committer | Zakk Roberts <midk@rockbox.org> | 2006-06-03 19:24:10 +0000 |
commit | ec216ac7aa9553e157ceff7172701ee3352bf4aa (patch) | |
tree | 6f82df86017215c76651fda66e32b36111d5e214 | |
parent | 5483da667bb303007829b6abe755735a3ccc3981 (diff) | |
download | rockbox-ec216ac7aa9553e157ceff7172701ee3352bf4aa.tar.gz rockbox-ec216ac7aa9553e157ceff7172701ee3352bf4aa.zip |
Change Star keymappings for iPod - now Menu and Play are used for up/down instead of the wheel. Fixes bug #5249.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10040 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/star.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/apps/plugins/star.c b/apps/plugins/star.c index f5f281bf13..c2ce2e7d83 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c | |||
@@ -48,11 +48,11 @@ PLUGIN_HEADER | |||
48 | #define STAR_TILE_SIZE 6 | 48 | #define STAR_TILE_SIZE 6 |
49 | 49 | ||
50 | /* values of object in the board */ | 50 | /* values of object in the board */ |
51 | #define STAR_VOID '.' | 51 | #define STAR_VOID '.' |
52 | #define STAR_WALL '*' | 52 | #define STAR_WALL '*' |
53 | #define STAR_STAR 'o' | 53 | #define STAR_STAR 'o' |
54 | #define STAR_BALL 'X' | 54 | #define STAR_BALL 'X' |
55 | #define STAR_BLOCK 'x' | 55 | #define STAR_BLOCK 'x' |
56 | 56 | ||
57 | /* sleep time between two frames */ | 57 | /* sleep time between two frames */ |
58 | #define STAR_SLEEP 1 | 58 | #define STAR_SLEEP 1 |
@@ -102,10 +102,10 @@ PLUGIN_HEADER | |||
102 | (CONFIG_KEYPAD == IPOD_3G_PAD) | 102 | (CONFIG_KEYPAD == IPOD_3G_PAD) |
103 | 103 | ||
104 | #define STAR_QUIT (BUTTON_SELECT | BUTTON_MENU) | 104 | #define STAR_QUIT (BUTTON_SELECT | BUTTON_MENU) |
105 | #define STAR_UP BUTTON_SCROLL_BACK | 105 | #define STAR_UP BUTTON_MENU |
106 | #define STAR_DOWN BUTTON_SCROLL_FWD | 106 | #define STAR_DOWN BUTTON_PLAY |
107 | #define STAR_TOGGLE_CONTROL_PRE BUTTON_MENU | 107 | #define STAR_TOGGLE_CONTROL_PRE BUTTON_SELECT |
108 | #define STAR_TOGGLE_CONTROL (BUTTON_MENU | BUTTON_REL) | 108 | #define STAR_TOGGLE_CONTROL (BUTTON_SELECT | BUTTON_REL) |
109 | #define STAR_LEVEL_UP (BUTTON_SELECT | BUTTON_RIGHT) | 109 | #define STAR_LEVEL_UP (BUTTON_SELECT | BUTTON_RIGHT) |
110 | #define STAR_LEVEL_DOWN (BUTTON_SELECT | BUTTON_LEFT) | 110 | #define STAR_LEVEL_DOWN (BUTTON_SELECT | BUTTON_LEFT) |
111 | #define STAR_LEVEL_REPEAT (BUTTON_SELECT | BUTTON_PLAY) | 111 | #define STAR_LEVEL_REPEAT (BUTTON_SELECT | BUTTON_PLAY) |
@@ -193,7 +193,7 @@ static int char_height = -1; | |||
193 | static struct plugin_api* rb; | 193 | static struct plugin_api* rb; |
194 | 194 | ||
195 | /* this arrays contains a group of levels loaded into memory */ | 195 | /* this arrays contains a group of levels loaded into memory */ |
196 | static unsigned char* levels = | 196 | static unsigned char* levels = |
197 | "****************\n" | 197 | "****************\n" |
198 | "*X**........o*x*\n" | 198 | "*X**........o*x*\n" |
199 | "*..........o.***\n" | 199 | "*..........o.***\n" |
@@ -476,7 +476,7 @@ static void star_display_text(char *str, bool waitkey) | |||
476 | case STAR_DOWN: | 476 | case STAR_DOWN: |
477 | go_on = true; | 477 | go_on = true; |
478 | break; | 478 | break; |
479 | 479 | ||
480 | default: | 480 | default: |
481 | if (rb->default_event_handler(key) == SYS_USB_CONNECTED) | 481 | if (rb->default_event_handler(key) == SYS_USB_CONNECTED) |
482 | { | 482 | { |
@@ -495,7 +495,7 @@ static void star_display_text(char *str, bool waitkey) | |||
495 | * Do a pretty transition from one level to another. | 495 | * Do a pretty transition from one level to another. |
496 | */ | 496 | */ |
497 | static void star_transition_update(void) | 497 | static void star_transition_update(void) |
498 | { | 498 | { |
499 | int center_x = LCD_WIDTH / 2; | 499 | int center_x = LCD_WIDTH / 2; |
500 | int lcd_demi_width = LCD_WIDTH / 2; | 500 | int lcd_demi_width = LCD_WIDTH / 2; |
501 | int center_y = LCD_HEIGHT / 2; | 501 | int center_y = LCD_HEIGHT / 2; |
@@ -638,7 +638,7 @@ static int star_run_game(void) | |||
638 | { | 638 | { |
639 | case STAR_QUIT: | 639 | case STAR_QUIT: |
640 | return 0; | 640 | return 0; |
641 | 641 | ||
642 | case BUTTON_LEFT: | 642 | case BUTTON_LEFT: |
643 | move_x = -1; | 643 | move_x = -1; |
644 | break; | 644 | break; |
@@ -826,11 +826,11 @@ static int star_menu(void) | |||
826 | case STAR_UP: | 826 | case STAR_UP: |
827 | if (menu_y > 0) | 827 | if (menu_y > 0) |
828 | move_y = -1; | 828 | move_y = -1; |
829 | break; | 829 | break; |
830 | case STAR_DOWN: | 830 | case STAR_DOWN: |
831 | if (menu_y < 3) | 831 | if (menu_y < 3) |
832 | move_y = 1; | 832 | move_y = 1; |
833 | break; | 833 | break; |
834 | 834 | ||
835 | case STAR_MENU_RUN: | 835 | case STAR_MENU_RUN: |
836 | #ifdef STAR_MENU_RUN3 | 836 | #ifdef STAR_MENU_RUN3 |
@@ -875,7 +875,7 @@ static int star_menu(void) | |||
875 | } | 875 | } |
876 | if (usb_detected) | 876 | if (usb_detected) |
877 | return PLUGIN_USB_CONNECTED; | 877 | return PLUGIN_USB_CONNECTED; |
878 | break; | 878 | break; |
879 | 879 | ||
880 | default: | 880 | default: |
881 | if (rb->default_event_handler(key) == SYS_USB_CONNECTED) | 881 | if (rb->default_event_handler(key) == SYS_USB_CONNECTED) |