M:Robe 500: Get the rest of the games except doom working with the touchscreen.
[kugel-rb.git] / apps / plugins / reversi / reversi-gui.h
blob9ae6e9f2861f5ac62834a16210e26ff15af5724a
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (c) 2006 Alexander Levin
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef _REVERSI_GUI_H
23 #define _REVERSI_GUI_H
25 #include "plugin.h"
27 #define GAME_FILE PLUGIN_GAMES_DIR "/reversi.rev"
29 /* variable button definitions */
30 #if CONFIG_KEYPAD == RECORDER_PAD
31 #define REVERSI_BUTTON_QUIT BUTTON_OFF
32 #define REVERSI_BUTTON_UP BUTTON_UP
33 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
34 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
35 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
36 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAY
37 #define REVERSI_BUTTON_MENU BUTTON_F1
39 #elif CONFIG_KEYPAD == ONDIO_PAD
40 #define REVERSI_BUTTON_QUIT BUTTON_OFF
41 #define REVERSI_BUTTON_UP BUTTON_UP
42 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
43 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
44 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
45 #define REVERSI_BUTTON_MAKE_MOVE_PRE BUTTON_MENU
46 #define REVERSI_BUTTON_MAKE_MOVE (BUTTON_MENU | BUTTON_REL)
47 #define REVERSI_BUTTON_ALT_MAKE_MOVE (BUTTON_MENU | BUTTON_DOWN)
48 #define REVERSI_BUTTON_MENU_PRE BUTTON_MENU
49 #define REVERSI_BUTTON_MENU (BUTTON_MENU | BUTTON_REPEAT)
51 #elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
52 (CONFIG_KEYPAD == IRIVER_H300_PAD)
53 #define REVERSI_BUTTON_QUIT BUTTON_OFF
54 #define REVERSI_BUTTON_UP BUTTON_UP
55 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
56 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
57 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
58 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
59 #define REVERSI_BUTTON_MENU BUTTON_MODE
61 #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \
62 (CONFIG_KEYPAD == IPOD_3G_PAD) || \
63 (CONFIG_KEYPAD == IPOD_1G2G_PAD)
64 #define REVERSI_BUTTON_UP BUTTON_MENU
65 #define REVERSI_BUTTON_DOWN BUTTON_PLAY
66 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
67 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
68 #define REVERSI_BUTTON_ALT_LEFT BUTTON_SCROLL_BACK
69 #define REVERSI_BUTTON_ALT_RIGHT BUTTON_SCROLL_FWD
70 #define REVERSI_BUTTON_MAKE_MOVE (BUTTON_SELECT | BUTTON_REL)
71 #define REVERSI_BUTTON_MENU (BUTTON_MENU | BUTTON_SELECT)
73 #elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD)
74 #define REVERSI_BUTTON_QUIT BUTTON_POWER
75 #define REVERSI_BUTTON_UP BUTTON_UP
76 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
77 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
78 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
79 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
80 #define REVERSI_BUTTON_MENU BUTTON_PLAY
82 #elif (CONFIG_KEYPAD == GIGABEAT_PAD)
83 #define REVERSI_BUTTON_QUIT BUTTON_POWER
84 #define REVERSI_BUTTON_UP BUTTON_UP
85 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
86 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
87 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
88 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
89 #define REVERSI_BUTTON_MENU BUTTON_MENU
91 #elif (CONFIG_KEYPAD == GIGABEAT_S_PAD)
92 #define REVERSI_BUTTON_QUIT BUTTON_POWER
93 #define REVERSI_BUTTON_UP BUTTON_UP
94 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
95 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
96 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
97 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
98 #define REVERSI_BUTTON_MENU BUTTON_MENU
100 #elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
101 #define REVERSI_BUTTON_QUIT BUTTON_POWER
102 #define REVERSI_BUTTON_UP BUTTON_SCROLL_UP
103 #define REVERSI_BUTTON_DOWN BUTTON_SCROLL_DOWN
104 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
105 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
106 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_REW
107 #define REVERSI_BUTTON_MENU BUTTON_PLAY
109 #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \
110 (CONFIG_KEYPAD == SANSA_C200_PAD) || \
111 (CONFIG_KEYPAD == SANSA_CLIP_PAD) || \
112 (CONFIG_KEYPAD == SANSA_M200_PAD)
113 #define REVERSI_BUTTON_QUIT BUTTON_POWER
114 #define REVERSI_BUTTON_UP BUTTON_UP
115 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
116 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
117 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
118 #define REVERSI_BUTTON_MAKE_MOVE (BUTTON_SELECT|BUTTON_REL)
119 #define REVERSI_BUTTON_MENU (BUTTON_SELECT|BUTTON_REPEAT)
121 #elif (CONFIG_KEYPAD == SANSA_FUZE_PAD)
122 #define REVERSI_BUTTON_QUIT (BUTTON_HOME|BUTTON_REPEAT)
123 #define REVERSI_BUTTON_UP BUTTON_UP
124 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
125 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
126 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
127 #define REVERSI_BUTTON_MAKE_MOVE (BUTTON_SELECT|BUTTON_REL)
128 #define REVERSI_BUTTON_MENU (BUTTON_SELECT|BUTTON_REPEAT)
130 #elif CONFIG_KEYPAD == MROBE500_PAD
131 #define REVERSI_QUIT BUTTON_POWER
133 #elif (CONFIG_KEYPAD == MROBE100_PAD)
134 #define REVERSI_BUTTON_QUIT BUTTON_POWER
135 #define REVERSI_BUTTON_UP BUTTON_UP
136 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
137 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
138 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
139 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
140 #define REVERSI_BUTTON_MENU BUTTON_MENU
142 #elif CONFIG_KEYPAD == IAUDIO_M3_PAD
143 #define REVERSI_BUTTON_QUIT BUTTON_RC_REC
144 #define REVERSI_BUTTON_UP BUTTON_RC_VOL_UP
145 #define REVERSI_BUTTON_DOWN BUTTON_RC_VOL_DOWN
146 #define REVERSI_BUTTON_LEFT BUTTON_RC_REW
147 #define REVERSI_BUTTON_RIGHT BUTTON_RC_FF
148 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_RC_PLAY
149 #define REVERSI_BUTTON_MENU BUTTON_RC_MENU
151 #elif CONFIG_KEYPAD == COWOND2_PAD
152 #define REVERSI_QUIT BUTTON_POWER
153 #define REVERSI_BUTTON_MENU BUTTON_MENU
155 #elif CONFIG_KEYPAD == IAUDIO67_PAD
156 #define REVERSI_BUTTON_QUIT BUTTON_POWER
157 #define REVERSI_BUTTON_UP BUTTON_STOP
158 #define REVERSI_BUTTON_DOWN BUTTON_PLAY
159 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
160 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
161 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_VOLUP
162 #define REVERSI_BUTTON_MENU BUTTON_MENU
164 #elif CONFIG_KEYPAD == CREATIVEZVM_PAD
165 #define REVERSI_BUTTON_QUIT BUTTON_BACK
166 #define REVERSI_BUTTON_UP BUTTON_UP
167 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
168 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
169 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
170 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
171 #define REVERSI_BUTTON_MENU BUTTON_MENU
173 #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
174 #define REVERSI_BUTTON_QUIT BUTTON_POWER
175 #define REVERSI_BUTTON_UP BUTTON_UP
176 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
177 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
178 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
179 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
180 #define REVERSI_BUTTON_MENU BUTTON_MENU
182 #elif CONFIG_KEYPAD == ONDAVX747_PAD
183 #define REVERSI_QUIT BUTTON_POWER
184 #define REVERSI_BUTTON_MENU BUTTON_MENU
186 #else
187 #error No keymap defined!
188 #endif
190 #ifdef HAVE_TOUCHSCREEN
191 #ifndef REVERSI_QUIT
192 #define REVERSI_QUIT BUTTON_TOPLEFT
193 #endif
194 #ifndef REVERSI_BUTTON_UP
195 #define REVERSI_BUTTON_UP BUTTON_TOPMIDDLE
196 #endif
197 #ifndef REVERSI_BUTTON_DOWN
198 #define REVERSI_BUTTON_DOWN BUTTON_BOTTOMMIDDLE
199 #endif
200 #ifndef REVERSI_BUTTON_LEFT
201 #define REVERSI_BUTTON_LEFT BUTTON_MIDLEFT
202 #endif
203 #ifndef REVERSI_BUTTON_RIGHT
204 #define REVERSI_BUTTON_RIGHT BUTTON_MIDRIGHT
205 #endif
206 #ifndef REVERSI_BUTTON_MAKE_MOVE
207 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_CENTER
208 #endif
209 #ifndef REVERSI_BUTTON_MENU
210 #define REVERSI_BUTTON_MENU BUTTON_TOPRIGHT
211 #endif
212 #endif
214 /* Modes for the cursor behaviour at the board edges */
215 typedef enum _cursor_wrap_mode_t {
216 WRAP_FLAT, /* No wrapping */
217 WRAP_SPHERE, /* (7,7) > right > (7,0); (7,7) > down > (0,7) */
218 WRAP_TORUS, /* (7,7) > right > (0,0); (7,7) > down > (0,0) */
219 } cursor_wrap_mode_t;
222 #endif