summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/jewels.c63
1 files changed, 48 insertions, 15 deletions
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index 2fe86e8826..a385466f82 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -81,10 +81,8 @@ PLUGIN_HEADER
81#define JEWELS_DOWN BUTTON_DOWN 81#define JEWELS_DOWN BUTTON_DOWN
82#define JEWELS_LEFT BUTTON_LEFT 82#define JEWELS_LEFT BUTTON_LEFT
83#define JEWELS_RIGHT BUTTON_RIGHT 83#define JEWELS_RIGHT BUTTON_RIGHT
84#define JEWELS_QUIT BUTTON_A
85#define JEWELS_START BUTTON_POWER
86#define JEWELS_SELECT BUTTON_SELECT 84#define JEWELS_SELECT BUTTON_SELECT
87#define JEWELS_RESUME BUTTON_MENU 85#define JEWELS_CANCEL BUTTON_A
88 86
89#else 87#else
90 #error JEWELS: Unsupported keypad 88 #error JEWELS: Unsupported keypad
@@ -254,7 +252,7 @@ struct game_context {
254 unsigned int score; 252 unsigned int score;
255 unsigned int segments; 253 unsigned int segments;
256 unsigned int level; 254 unsigned int level;
257 unsigned short highscores[NUM_SCORES]; 255 unsigned int highscores[NUM_SCORES];
258 bool resume; 256 bool resume;
259 bool dirty; 257 bool dirty;
260 struct tile playboard[BJ_HEIGHT][BJ_WIDTH]; 258 struct tile playboard[BJ_HEIGHT][BJ_WIDTH];
@@ -934,7 +932,7 @@ static unsigned int jewels_nextlevel(struct game_context* bj) {
934static int jewels_recordscore(struct game_context* bj) { 932static int jewels_recordscore(struct game_context* bj) {
935 int i; 933 int i;
936 int position = 0; 934 int position = 0;
937 unsigned short current, temp; 935 unsigned int current, temp;
938 936
939 /* calculate total score */ 937 /* calculate total score */
940 current = (bj->level-1)*LEVEL_PTS+bj->score; 938 current = (bj->level-1)*LEVEL_PTS+bj->score;
@@ -1129,12 +1127,25 @@ static int bejeweled(struct game_context* bj) {
1129 rb->snprintf(str, 5, "%s", "Help"); 1127 rb->snprintf(str, 5, "%s", "Help");
1130 rb->lcd_getstringsize(str, &w, &h); 1128 rb->lcd_getstringsize(str, &w, &h);
1131 rb->lcd_putsxy((LCD_WIDTH-w)/2, 0, str); 1129 rb->lcd_putsxy((LCD_WIDTH-w)/2, 0, str);
1132#if (LCD_HEIGHT <= 64) 1130#if CONFIG_KEYPAD == RECORDER_PAD
1131 rb->lcd_puts(0, 2, "Controls:");
1132 rb->lcd_puts(0, 3, "Directions = move");
1133 rb->lcd_puts(0, 4, "PLAY = select");
1134 rb->lcd_puts(0, 5, "Long PLAY = menu");
1135 rb->lcd_puts(0, 6, "OFF = cancel");
1136#elif CONFIG_KEYPAD == ONDIO_PAD
1137 rb->lcd_puts(0, 2, "Controls:");
1138 rb->lcd_puts(0, 3, "Directions = move");
1139 rb->lcd_puts(0, 4, "MENU = select");
1140 rb->lcd_puts(0, 5, "Long MENU = menu");
1141 rb->lcd_puts(0, 6, "OFF = cancel");
1142#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
1133 rb->lcd_puts(0, 2, "Controls:"); 1143 rb->lcd_puts(0, 2, "Controls:");
1134 rb->lcd_puts(0, 3, "Directions = move"); 1144 rb->lcd_puts(0, 3, "Directions = move");
1135 rb->lcd_puts(0, 4, "SELECT = select"); 1145 rb->lcd_puts(0, 4, "SELECT = select");
1136 rb->lcd_puts(0, 5, "Long SELECT = menu"); 1146 rb->lcd_puts(0, 5, "Long SELECT = menu");
1137#elif (LCD_HEIGHT <= 132) 1147 rb->lcd_puts(0, 6, "PLAY = cancel");
1148#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
1138 rb->lcd_puts(0, 2, "Swap pairs of jewels to"); 1149 rb->lcd_puts(0, 2, "Swap pairs of jewels to");
1139 rb->lcd_puts(0, 3, "form connected segments"); 1150 rb->lcd_puts(0, 3, "form connected segments");
1140 rb->lcd_puts(0, 4, "of three or more of the"); 1151 rb->lcd_puts(0, 4, "of three or more of the");
@@ -1143,14 +1154,36 @@ static int bejeweled(struct game_context* bj) {
1143 rb->lcd_puts(0, 8, "Directions to move"); 1154 rb->lcd_puts(0, 8, "Directions to move");
1144 rb->lcd_puts(0, 9, "SELECT to select"); 1155 rb->lcd_puts(0, 9, "SELECT to select");
1145 rb->lcd_puts(0, 10, "Long SELECT to show menu"); 1156 rb->lcd_puts(0, 10, "Long SELECT to show menu");
1146#else 1157 rb->lcd_puts(0, 11, "OFF to cancel");
1147 rb->lcd_puts(0, 2, "Swap pairs of jewels to form"); 1158#elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD)
1148 rb->lcd_puts(0, 3, "connected segments of three"); 1159 rb->lcd_puts(0, 2, "Swap pairs of jewels to");
1149 rb->lcd_puts(0, 4, "or more of the same type."); 1160 rb->lcd_puts(0, 3, "form connected segments");
1150 rb->lcd_puts(0, 6, "Controls:"); 1161 rb->lcd_puts(0, 4, "of three or more of the");
1151 rb->lcd_puts(0, 7, "Directions to move cursor"); 1162 rb->lcd_puts(0, 5, "same type.");
1152 rb->lcd_puts(0, 8, "SELECT to select"); 1163 rb->lcd_puts(0, 7, "Controls:");
1153 rb->lcd_puts(0, 9, "Long SELECT to show menu"); 1164 rb->lcd_puts(0, 8, "Directions or scroll to move");
1165 rb->lcd_puts(0, 9, "SELECT to select");
1166 rb->lcd_puts(0, 10, "Long SELECT to show menu");
1167#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
1168 rb->lcd_puts(0, 2, "Swap pairs of jewels to");
1169 rb->lcd_puts(0, 3, "form connected segments");
1170 rb->lcd_puts(0, 4, "of three or more of the");
1171 rb->lcd_puts(0, 5, "same type.");
1172 rb->lcd_puts(0, 7, "Controls:");
1173 rb->lcd_puts(0, 8, "Directions to move");
1174 rb->lcd_puts(0, 9, "SELECT to select");
1175 rb->lcd_puts(0, 10, "Long SELECT to show menu");
1176 rb->lcd_puts(0, 11, "PLAY to cancel");
1177#elif CONFIG_KEYPAD == GIGABEAT_PAD
1178 rb->lcd_puts(0, 2, "Swap pairs of jewels to");
1179 rb->lcd_puts(0, 3, "form connected segments");
1180 rb->lcd_puts(0, 4, "of three or more of the");
1181 rb->lcd_puts(0, 5, "same type.");
1182 rb->lcd_puts(0, 7, "Controls:");
1183 rb->lcd_puts(0, 8, "Directions to move");
1184 rb->lcd_puts(0, 9, "SELECT to select");
1185 rb->lcd_puts(0, 10, "Long SELECT to show menu");
1186 rb->lcd_puts(0, 11, "A to cancel");
1154#endif 1187#endif
1155 rb->lcd_update(); 1188 rb->lcd_update();
1156 while(true) { 1189 while(true) {