diff options
author | Antoine Cellerier <dionoea@videolan.org> | 2006-07-27 21:08:52 +0000 |
---|---|---|
committer | Antoine Cellerier <dionoea@videolan.org> | 2006-07-27 21:08:52 +0000 |
commit | c577ec6790605af78d4d6f5dab0f484ee1d64e36 (patch) | |
tree | 05b8710562419bbb64a6d583509ad22110da2097 | |
parent | 3e60bc44272883a54f7301d59bfa2a640253b063 (diff) | |
download | rockbox-c577ec6790605af78d4d6f5dab0f484ee1d64e36.tar.gz rockbox-c577ec6790605af78d4d6f5dab0f484ee1d64e36.zip |
Apply patch from http://www.rockbox.org/tracker/task/5569
Quote:
* Reduced the speed back to normal on colour targets (except 5G because it's LCD is slow)
* Added the ability to use the select button to navigate menus on iPod and irivers.
* Tried to fix the animation next to the menu. It's a little better but still very flakey.
* Adjusted the position of the ball and block indicator bitmap while playing the game, so they are not placed off the edge of the screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10342 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/star.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/apps/plugins/star.c b/apps/plugins/star.c index 10bc3fd6af..c844549c05 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c | |||
@@ -48,7 +48,8 @@ PLUGIN_HEADER | |||
48 | #define STAR_BLOCK 'x' | 48 | #define STAR_BLOCK 'x' |
49 | 49 | ||
50 | /* sleep time between two frames */ | 50 | /* sleep time between two frames */ |
51 | #ifdef HAVE_LCD_COLOR | 51 | #if (LCD_HEIGHT == 240) && (LCD_WIDTH == 320) |
52 | /* iPod 5G LCD is *slow* */ | ||
52 | #define STAR_SLEEP ; | 53 | #define STAR_SLEEP ; |
53 | #else | 54 | #else |
54 | #define STAR_SLEEP rb->sleep(1); | 55 | #define STAR_SLEEP rb->sleep(1); |
@@ -94,6 +95,7 @@ PLUGIN_HEADER | |||
94 | #define STAR_LEVEL_DOWN (BUTTON_MODE | BUTTON_LEFT) | 95 | #define STAR_LEVEL_DOWN (BUTTON_MODE | BUTTON_LEFT) |
95 | #define STAR_LEVEL_REPEAT (BUTTON_MODE | BUTTON_UP) | 96 | #define STAR_LEVEL_REPEAT (BUTTON_MODE | BUTTON_UP) |
96 | #define STAR_MENU_RUN BUTTON_RIGHT | 97 | #define STAR_MENU_RUN BUTTON_RIGHT |
98 | #define STAR_MENU_RUN2 BUTTON_SELECT | ||
97 | 99 | ||
98 | #define STAR_RC_QUIT BUTTON_RC_STOP | 100 | #define STAR_RC_QUIT BUTTON_RC_STOP |
99 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ | 101 | #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ |
@@ -108,6 +110,7 @@ PLUGIN_HEADER | |||
108 | #define STAR_LEVEL_DOWN (BUTTON_SELECT | BUTTON_LEFT) | 110 | #define STAR_LEVEL_DOWN (BUTTON_SELECT | BUTTON_LEFT) |
109 | #define STAR_LEVEL_REPEAT (BUTTON_SELECT | BUTTON_PLAY) | 111 | #define STAR_LEVEL_REPEAT (BUTTON_SELECT | BUTTON_PLAY) |
110 | #define STAR_MENU_RUN BUTTON_RIGHT | 112 | #define STAR_MENU_RUN BUTTON_RIGHT |
113 | #define STAR_MENU_RUN2 BUTTON_SELECT | ||
111 | 114 | ||
112 | #elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) | 115 | #elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) |
113 | 116 | ||
@@ -566,14 +569,14 @@ static void star_display_board_info(void) | |||
566 | if( control == STAR_CONTROL_BALL ) | 569 | if( control == STAR_CONTROL_BALL ) |
567 | rb->lcd_bitmap_part( star_tiles, 0, | 570 | rb->lcd_bitmap_part( star_tiles, 0, |
568 | ball*STAR_TILE_SIZE, STAR_TILE_SIZE, | 571 | ball*STAR_TILE_SIZE, STAR_TILE_SIZE, |
569 | 107, label_offset_y - ( STAR_TILE_SIZE - char_height ) / 2 + 1, | 572 | 107, label_offset_y - ( STAR_TILE_SIZE - char_height ) / 2 - 2, |
570 | STAR_TILE_SIZE, STAR_TILE_SIZE); | 573 | STAR_TILE_SIZE, STAR_TILE_SIZE); |
571 | else | 574 | else |
572 | rb->lcd_bitmap_part( star_tiles, 0, | 575 | rb->lcd_bitmap_part( star_tiles, 0, |
573 | block*STAR_TILE_SIZE, STAR_TILE_SIZE, | 576 | block*STAR_TILE_SIZE, STAR_TILE_SIZE, |
574 | 107, label_offset_y - ( STAR_TILE_SIZE - char_height ) / 2 + 1, | 577 | 107, label_offset_y - ( STAR_TILE_SIZE - char_height ) / 2 - 2, |
575 | STAR_TILE_SIZE, STAR_TILE_SIZE); | 578 | STAR_TILE_SIZE, STAR_TILE_SIZE); |
576 | rb->lcd_update_rect(0, label_offset_y - ( STAR_TILE_SIZE - char_height ) / 2 + 1, LCD_WIDTH, STAR_TILE_SIZE ); | 579 | rb->lcd_update_rect(0, label_offset_y - ( STAR_TILE_SIZE - char_height ) / 2 - 2, LCD_WIDTH, STAR_TILE_SIZE ); |
577 | #else | 580 | #else |
578 | if (control == STAR_CONTROL_BALL) | 581 | if (control == STAR_CONTROL_BALL) |
579 | rb->lcd_mono_bitmap (ball_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE, | 582 | rb->lcd_mono_bitmap (ball_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE, |
@@ -915,17 +918,29 @@ static int star_menu(void) | |||
915 | case STAR_QUIT: | 918 | case STAR_QUIT: |
916 | return PLUGIN_OK; | 919 | return PLUGIN_OK; |
917 | case STAR_UP: | 920 | case STAR_UP: |
918 | if (menu_y > 0) | 921 | if (menu_y > 0) { |
919 | move_y = -1; | 922 | move_y = -1; |
923 | int oldforeground = rb->lcd_get_foreground(); | ||
924 | rb->lcd_set_foreground(LCD_BLACK); | ||
925 | rb->lcd_fillrect(0, menu_offset_y + char_height * menu_y - 2, 15, char_height + 3); | ||
926 | rb->lcd_set_foreground(oldforeground); | ||
927 | } | ||
920 | break; | 928 | break; |
921 | case STAR_DOWN: | 929 | case STAR_DOWN: |
922 | if (menu_y < 3) | 930 | if (menu_y < 3) { |
923 | move_y = 1; | 931 | move_y = 1; |
932 | int oldforeground = rb->lcd_get_foreground(); | ||
933 | rb->lcd_set_foreground(LCD_BLACK); | ||
934 | rb->lcd_fillrect(0, menu_offset_y + char_height * menu_y - 1, 15, char_height + 2); | ||
935 | rb->lcd_set_foreground(oldforeground); | ||
936 | } | ||
924 | break; | 937 | break; |
925 | 938 | ||
926 | case STAR_MENU_RUN: | 939 | case STAR_MENU_RUN: |
927 | #ifdef STAR_MENU_RUN3 | 940 | #ifdef STAR_MENU_RUN2 |
928 | case STAR_MENU_RUN2: | 941 | case STAR_MENU_RUN2: |
942 | #endif | ||
943 | #ifdef STAR_MENU_RUN3 | ||
929 | case STAR_MENU_RUN3: | 944 | case STAR_MENU_RUN3: |
930 | #endif | 945 | #endif |
931 | refresh = true; | 946 | refresh = true; |