Updated our source code header to explicitly mention that we are GPL v2 or
[Rockbox.git] / apps / plugins / reversi / reversi-gui.h
blob3a3cdda3ce220811bd0c2a65165bdbf812b9a6db
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 #define REVERSI_BUTTON_QUIT BUTTON_POWER
112 #define REVERSI_BUTTON_UP BUTTON_UP
113 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
114 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
115 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
116 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
117 #define REVERSI_BUTTON_MENU (BUTTON_SELECT|BUTTON_REPEAT)
119 #elif CONFIG_KEYPAD == MROBE500_PAD
120 #define REVERSI_QUIT BUTTON_POWER
121 #define REVERSI_BUTTON_UP BUTTON_RC_PLAY
122 #define REVERSI_BUTTON_DOWN BUTTON_RC_DOWN
123 #define REVERSI_BUTTON_LEFT BUTTON_RC_REW
124 #define REVERSI_BUTTON_RIGHT BUTTON_RC_FF
125 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_RC_MODE
126 #define REVERSI_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
128 #elif (CONFIG_KEYPAD == MROBE100_PAD)
129 #define REVERSI_BUTTON_QUIT BUTTON_POWER
130 #define REVERSI_BUTTON_UP BUTTON_UP
131 #define REVERSI_BUTTON_DOWN BUTTON_DOWN
132 #define REVERSI_BUTTON_LEFT BUTTON_LEFT
133 #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
134 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
135 #define REVERSI_BUTTON_MENU BUTTON_MENU
137 #elif CONFIG_KEYPAD == IAUDIO_M3_PAD
138 #define REVERSI_BUTTON_QUIT BUTTON_RC_REC
139 #define REVERSI_BUTTON_UP BUTTON_RC_VOL_UP
140 #define REVERSI_BUTTON_DOWN BUTTON_RC_VOL_DOWN
141 #define REVERSI_BUTTON_LEFT BUTTON_RC_REW
142 #define REVERSI_BUTTON_RIGHT BUTTON_RC_FF
143 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_RC_PLAY
144 #define REVERSI_BUTTON_MENU BUTTON_RC_MENU
146 #elif CONFIG_KEYPAD == COWOND2_PAD
147 #define REVERSI_QUIT BUTTON_POWER
148 #define REVERSI_BUTTON_MENU BUTTON_MENU
150 #else
151 #error No keymap defined!
152 #endif
154 #ifdef HAVE_TOUCHPAD
155 #ifndef REVERSI_QUIT
156 #define REVERSI_QUIT BUTTON_TOPLEFT
157 #endif
158 #ifndef REVERSI_BUTTON_UP
159 #define REVERSI_BUTTON_UP BUTTON_TOPMIDDLE
160 #endif
161 #ifndef REVERSI_BUTTON_DOWN
162 #define REVERSI_BUTTON_DOWN BUTTON_BOTTOMMIDDLE
163 #endif
164 #ifndef REVERSI_BUTTON_LEFT
165 #define REVERSI_BUTTON_LEFT BUTTON_MIDLEFT
166 #endif
167 #ifndef REVERSI_BUTTON_RIGHT
168 #define REVERSI_BUTTON_RIGHT BUTTON_MIDRIGHT
169 #endif
170 #ifndef REVERSI_BUTTON_MAKE_MOVE
171 #define REVERSI_BUTTON_MAKE_MOVE BUTTON_CENTER
172 #endif
173 #ifndef REVERSI_BUTTON_MENU
174 #define REVERSI_BUTTON_MENU BUTTON_TOPRIGHT
175 #endif
176 #endif
178 /* Modes for the cursor behaviour at the board edges */
179 typedef enum _cursor_wrap_mode_t {
180 WRAP_FLAT, /* No wrapping */
181 WRAP_SPHERE, /* (7,7) > right > (7,0); (7,7) > down > (0,7) */
182 WRAP_TORUS, /* (7,7) > right > (0,0); (7,7) > down > (0,0) */
183 } cursor_wrap_mode_t;
186 #endif