HD300 - plugins keymaps
[kugel-rb.git] / apps / plugins / reversi / reversi-gui.h
blobd5ba08fe56a011e0789f88e5b64e04fde9ad6cc8
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 BUTTON_MENU
46 #define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
47 #define REVERSI_BUTTON_MENU_LONGPRESS
48 #define REVERSI_BUTTON_MENU BUTTON_MENU
50 #elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
51 (CONFIG_KEYPAD == IRIVER_H300_PAD)
52 #define REVERSI_BUTTON_QUIT BUTTON_OFF
53 #define REVERSI_BUTTON_UP BUTTON_UP
54 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
55 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
56 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
57 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
58 #define REVERSI_BUTTON_MENU BUTTON_MODE
60 #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \
61 (CONFIG_KEYPAD == IPOD_3G_PAD) || \
62 (CONFIG_KEYPAD == IPOD_1G2G_PAD)
63 #define REVERSI_BUTTON_UP BUTTON_MENU
64 #define REVERSI_BUTTON_DOWN BUTTON_PLAY
65 #define REVERSI_BUTTON_LEFT (BUTTON_LEFT | BUTTON_SCROLL_BACK)
66 #define REVERSI_BUTTON_RIGHT (BUTTON_RIGHT | BUTTON_SCROLL_FWD)
67 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
68 #define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
69 #define REVERSI_BUTTON_MENU BUTTON_SELECT
70 #define REVERSI_BUTTON_MENU_LONGPRESS
72 #elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD)
73 #define REVERSI_BUTTON_QUIT BUTTON_POWER
74 #define REVERSI_BUTTON_UP BUTTON_UP
75 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
76 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
77 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
78 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
79 #define REVERSI_BUTTON_MENU BUTTON_PLAY
81 #elif (CONFIG_KEYPAD == GIGABEAT_PAD)
82 #define REVERSI_BUTTON_QUIT BUTTON_POWER
83 #define REVERSI_BUTTON_UP BUTTON_UP
84 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
85 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
86 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
87 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
88 #define REVERSI_BUTTON_MENU BUTTON_MENU
90 #elif (CONFIG_KEYPAD == GIGABEAT_S_PAD)
91 #define REVERSI_BUTTON_QUIT BUTTON_POWER
92 #define REVERSI_BUTTON_UP BUTTON_UP
93 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
94 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
95 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
96 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
97 #define REVERSI_BUTTON_MENU BUTTON_MENU
99 #elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
100 #define REVERSI_BUTTON_QUIT BUTTON_POWER
101 #define REVERSI_BUTTON_UP BUTTON_SCROLL_UP
102 #define REVERSI_BUTTON_DOWN BUTTON_SCROLL_DOWN
103 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
104 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
105 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_REW
106 #define REVERSI_BUTTON_MENU BUTTON_PLAY
108 #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \
109 (CONFIG_KEYPAD == SANSA_C200_PAD) || \
110 (CONFIG_KEYPAD == SANSA_CLIP_PAD) || \
111 (CONFIG_KEYPAD == SANSA_M200_PAD)
112 #define REVERSI_BUTTON_QUIT BUTTON_POWER
113 #define REVERSI_BUTTON_UP BUTTON_UP
114 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
115 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
116 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
117 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
118 #define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
119 #define REVERSI_BUTTON_MENU BUTTON_SELECT
120 #define REVERSI_BUTTON_MENU_LONGPRESS
122 #elif (CONFIG_KEYPAD == SANSA_FUZE_PAD)
123 #define REVERSI_BUTTON_QUIT (BUTTON_HOME|BUTTON_REPEAT)
124 #define REVERSI_BUTTON_UP BUTTON_UP
125 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
126 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
127 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
128 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
129 #define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
130 #define REVERSI_BUTTON_MENU BUTTON_SELECT
131 #define REVERSI_BUTTON_MENU_LONGPRESS
133 #elif CONFIG_KEYPAD == MROBE500_PAD
134 #define REVERSI_BUTTON_QUIT BUTTON_POWER
136 #elif (CONFIG_KEYPAD == MROBE100_PAD)
137 #define REVERSI_BUTTON_QUIT BUTTON_POWER
138 #define REVERSI_BUTTON_UP BUTTON_UP
139 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
140 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
141 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
142 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
143 #define REVERSI_BUTTON_MENU BUTTON_MENU
145 #elif CONFIG_KEYPAD == IAUDIO_M3_PAD
146 #define REVERSI_BUTTON_QUIT BUTTON_RC_REC
147 #define REVERSI_BUTTON_UP BUTTON_RC_VOL_UP
148 #define REVERSI_BUTTON_DOWN BUTTON_RC_VOL_DOWN
149 #define REVERSI_BUTTON_LEFT BUTTON_RC_REW
150 #define REVERSI_BUTTON_RIGHT BUTTON_RC_FF
151 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_RC_PLAY
152 #define REVERSI_BUTTON_MENU BUTTON_RC_MENU
154 #elif CONFIG_KEYPAD == COWON_D2_PAD
155 #define REVERSI_BUTTON_QUIT BUTTON_POWER
156 #define REVERSI_BUTTON_MENU BUTTON_MENU
158 #elif CONFIG_KEYPAD == IAUDIO67_PAD
159 #define REVERSI_BUTTON_QUIT BUTTON_POWER
160 #define REVERSI_BUTTON_UP BUTTON_STOP
161 #define REVERSI_BUTTON_DOWN BUTTON_PLAY
162 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
163 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
164 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_VOLUP
165 #define REVERSI_BUTTON_MENU BUTTON_MENU
167 #elif CONFIG_KEYPAD == CREATIVEZVM_PAD
168 #define REVERSI_BUTTON_QUIT BUTTON_BACK
169 #define REVERSI_BUTTON_UP BUTTON_UP
170 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
171 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
172 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
173 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
174 #define REVERSI_BUTTON_MENU BUTTON_MENU
176 #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
177 #define REVERSI_BUTTON_QUIT BUTTON_POWER
178 #define REVERSI_BUTTON_UP BUTTON_UP
179 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
180 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
181 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
182 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
183 #define REVERSI_BUTTON_MENU BUTTON_MENU
185 #elif CONFIG_KEYPAD == PHILIPS_HDD6330_PAD
186 #define REVERSI_BUTTON_QUIT BUTTON_POWER
187 #define REVERSI_BUTTON_UP BUTTON_UP
188 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
189 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
190 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
191 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAY
192 #define REVERSI_BUTTON_MENU BUTTON_MENU
194 #elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD
195 #define REVERSI_BUTTON_QUIT BUTTON_POWER
196 #define REVERSI_BUTTON_UP BUTTON_UP
197 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
198 #define REVERSI_BUTTON_LEFT BUTTON_PREV
199 #define REVERSI_BUTTON_RIGHT BUTTON_NEXT
200 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAY
201 #define REVERSI_BUTTON_MENU BUTTON_MENU
203 #elif CONFIG_KEYPAD == ONDAVX747_PAD
204 #define REVERSI_BUTTON_QUIT BUTTON_POWER
205 #define REVERSI_BUTTON_MENU BUTTON_MENU
207 #elif CONFIG_KEYPAD == ONDAVX777_PAD
208 #define REVERSI_BUTTON_QUIT BUTTON_POWER
210 #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD
211 #define REVERSI_BUTTON_QUIT BUTTON_REC
212 #define REVERSI_BUTTON_UP BUTTON_UP
213 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
214 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
215 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
216 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_FFWD
217 #define REVERSI_BUTTON_MENU BUTTON_PLAY
219 #elif CONFIG_KEYPAD == PBELL_VIBE500_PAD
220 #define REVERSI_BUTTON_QUIT BUTTON_REC
221 #define REVERSI_BUTTON_UP BUTTON_UP
222 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
223 #define REVERSI_BUTTON_LEFT BUTTON_PREV
224 #define REVERSI_BUTTON_RIGHT BUTTON_NEXT
225 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_OK
226 #define REVERSI_BUTTON_MENU BUTTON_MENU
228 #elif CONFIG_KEYPAD == MPIO_HD200_PAD
229 #define REVERSI_BUTTON_UP BUTTON_REW
230 #define REVERSI_BUTTON_DOWN BUTTON_FF
231 #define REVERSI_BUTTON_LEFT BUTTON_VOL_DOWN
232 #define REVERSI_BUTTON_RIGHT BUTTON_VOL_UP
233 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_FUNC
234 #define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
235 #define REVERSI_BUTTON_MENU BUTTON_FUNC
236 #define REVERSI_BUTTON_MENU_LONGPRESS
238 #elif CONFIG_KEYPAD == MPIO_HD300_PAD
239 #define REVERSI_BUTTON_UP BUTTON_UP
240 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
241 #define REVERSI_BUTTON_LEFT BUTTON_REW
242 #define REVERSI_BUTTON_RIGHT BUTTON_FF
243 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_ENTER
244 #define REVERSI_BUTTON_MENU BUTTON_MENU
246 #else
247 #error No keymap defined!
248 #endif
250 #ifdef HAVE_TOUCHSCREEN
251 #ifndef REVERSI_BUTTON_QUIT
252 #define REVERSI_BUTTON_QUIT BUTTON_TOPLEFT
253 #endif
254 #ifndef REVERSI_BUTTON_UP
255 #define REVERSI_BUTTON_UP BUTTON_TOPMIDDLE
256 #endif
257 #ifndef REVERSI_BUTTON_DOWN
258 #define REVERSI_BUTTON_DOWN BUTTON_BOTTOMMIDDLE
259 #endif
260 #ifndef REVERSI_BUTTON_LEFT
261 #define REVERSI_BUTTON_LEFT BUTTON_MIDLEFT
262 #endif
263 #ifndef REVERSI_BUTTON_RIGHT
264 #define REVERSI_BUTTON_RIGHT BUTTON_MIDRIGHT
265 #endif
266 #ifndef REVERSI_BUTTON_MAKE_MOVE
267 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_CENTER
268 #endif
269 #ifndef REVERSI_BUTTON_MENU
270 #define REVERSI_BUTTON_MENU BUTTON_TOPRIGHT
271 #endif
272 #endif
274 /* Modes for the cursor behaviour at the board edges */
275 typedef enum _cursor_wrap_mode_t {
276 WRAP_FLAT, /* No wrapping */
277 WRAP_SPHERE, /* (7,7) > right > (7,0); (7,7) > down > (0,7) */
278 WRAP_TORUS, /* (7,7) > right > (0,0); (7,7) > down > (0,0) */
279 } cursor_wrap_mode_t;
282 #endif