summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-02-16 02:08:16 +0000
committerJens Arnold <amiconn@rockbox.org>2005-02-16 02:08:16 +0000
commit538e68059a11349dbaa776d51186d83f181d5969 (patch)
tree49af3794bd18b65cfa9d99425cf8a1971f57c246 /apps
parent02eaeafcb67c1caf73aa0e362901c7197a53c561 (diff)
downloadrockbox-538e68059a11349dbaa776d51186d83f181d5969.tar.gz
rockbox-538e68059a11349dbaa776d51186d83f181d5969.zip
Solitaire adapted to iRiver, based on patch #1121520 by Jonas Haggqvist.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5967 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/SOURCES3
-rw-r--r--apps/plugins/solitaire.c35
2 files changed, 24 insertions, 14 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 39efee6154..6fc20b7b32 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -33,10 +33,7 @@ sliding_puzzle.c
33snake.c 33snake.c
34snake2.c 34snake2.c
35sokoban.c 35sokoban.c
36#if CONFIG_KEYPAD != IRIVER_H100_PAD
37/* just because it isn't fixed yet to deal with this keymap */
38solitaire.c 36solitaire.c
39#endif
40splitedit.c 37splitedit.c
41star.c 38star.c
42#if CONFIG_LCD == LCD_SSD1815 39#if CONFIG_LCD == LCD_SSD1815
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 20be137c62..72bf1958ce 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -36,7 +36,6 @@ use F3 to put card on top of the remains' stack on one of the 4 final color
36#include "lcd.h" 36#include "lcd.h"
37 37
38#ifdef HAVE_LCD_BITMAP 38#ifdef HAVE_LCD_BITMAP
39#if CONFIG_KEYPAD != IRIVER_H100_PAD /* FIX! */
40 39
41/* here is a global api struct pointer. while not strictly necessary, 40/* here is a global api struct pointer. while not strictly necessary,
42 it's nice not to have to pass the api pointer in all function calls 41 it's nice not to have to pass the api pointer in all function calls
@@ -92,16 +91,16 @@ static struct plugin_api* rb;
92#define SOL_DOWN BUTTON_DOWN 91#define SOL_DOWN BUTTON_DOWN
93#define SOL_LEFT BUTTON_LEFT 92#define SOL_LEFT BUTTON_LEFT
94#define SOL_RIGHT BUTTON_RIGHT 93#define SOL_RIGHT BUTTON_RIGHT
95#define SOL_MOVE BUTTON_ON 94#define SOL_MOVE_PRE BUTTON_SELECT
96#define SOL_DRAW BUTTON_SELECT 95#define SOL_MOVE (BUTTON_SELECT | BUTTON_REL)
97#define SOL_REM2CUR BUTTON_PLAY 96#define SOL_DRAW BUTTON_MODE
98#define SOL_CUR2STACK BUTTON_F1 97#define SOL_REM2CUR (BUTTON_LEFT | BUTTON_ON)
99#define SOL_REM2STACK BUTTON_F3 98#define SOL_CUR2STACK (BUTTON_SELECT | BUTTON_REPEAT)
100#define SOL_MENU_RUN BUTTON_RIGHT 99#define SOL_REM2STACK (BUTTON_RIGHT | BUTTON_ON)
101#define SOL_MENU_RUN2 BUTTON_ON 100#define SOL_MENU_RUN BUTTON_SELECT
102#define SOL_MENU_INFO BUTTON_SELECT 101#define SOL_MENU_RUN2 BUTTON_RIGHT
102#define SOL_MENU_INFO BUTTON_MODE
103#define SOL_MENU_INFO2 BUTTON_REC 103#define SOL_MENU_INFO2 BUTTON_REC
104#define SOL_MENU_INFO3 BUTTON_MODE
105#endif 104#endif
106 105
107/* common help definitions */ 106/* common help definitions */
@@ -125,6 +124,13 @@ static struct plugin_api* rb;
125#define HELP_SOL_CUR2STACK "RIGHT..: Put the card under the cursor on one of the 4 final color stacks." 124#define HELP_SOL_CUR2STACK "RIGHT..: Put the card under the cursor on one of the 4 final color stacks."
126#define HELP_SOL_REM2STACK "UP..: Put the card on top of the remains' stack on one of the 4 final color stacks." 125#define HELP_SOL_REM2STACK "UP..: Put the card on top of the remains' stack on one of the 4 final color stacks."
127 126
127#elif CONFIG_KEYPAD == IRIVER_H100_PAD
128#define HELP_SOL_MOVE "SELECT: Select cards, Move cards, reveal hidden cards ..."
129#define HELP_SOL_DRAW "REC: Un-select a card if it was selected. Else, draw 3 new cards out of the remains' stack."
130#define HELP_SOL_REM2CUR "PLAY+LEFT: Put the card on top of the remains' stack on top of the cursor."
131#define HELP_SOL_CUR2STACK "SELECT..: Put the card under the cursor on one of the 4 final color stacks."
132#define HELP_SOL_REM2STACK "PLAY+RIGHT: Put the card on top of the remains' stack on one of the 4 final color stacks."
133
128#endif 134#endif
129 135
130static unsigned char colors[4][8] = { 136static unsigned char colors[4][8] = {
@@ -365,6 +371,14 @@ int solitaire_help(void){
365 rb->lcd_putsxy(0, 42, "All actions can be"); 371 rb->lcd_putsxy(0, 42, "All actions can be");
366 rb->lcd_putsxy(0, 49, "done using arrows,"); 372 rb->lcd_putsxy(0, 49, "done using arrows,");
367 rb->lcd_putsxy(0, 56, "short & long MODE."); 373 rb->lcd_putsxy(0, 56, "short & long MODE.");
374#elif CONFIG_KEYPAD == IRIVER_H100_PAD
375 rb->lcd_putsxy(20, 8, "Press a key or key");
376 rb->lcd_putsxy(20, 16, "combo to see it's");
377 rb->lcd_putsxy(20, 24, "role. Press STOP to");
378 rb->lcd_putsxy(20, 32, "return to menu.");
379 rb->lcd_putsxy(20, 48, "All actions can be");
380 rb->lcd_putsxy(20, 56, "done using the");
381 rb->lcd_putsxy(20, 64, "joystick and RECORD.");
368#endif 382#endif
369 383
370 rb->lcd_update(); 384 rb->lcd_update();
@@ -1193,5 +1207,4 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
1193 return (result == SOLITAIRE_USB) ? PLUGIN_USB_CONNECTED : PLUGIN_OK; 1207 return (result == SOLITAIRE_USB) ? PLUGIN_USB_CONNECTED : PLUGIN_OK;
1194} 1208}
1195 1209
1196#endif /* iRiver h100 keypad */
1197#endif 1210#endif