-
Notifications
You must be signed in to change notification settings - Fork 0
/
Phoinix.h
325 lines (277 loc) · 11.6 KB
/
Phoinix.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
/************************************************************************
* Phoinix.h
* Constants for the user interface
*
************************************************************************
*
* Phoinix,
* Nintendo Gameboy(TM) emulator for the Palm OS(R) Computing Platform
*
* (c)2000-2007 Bodo Wenzel
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
************************************************************************
* History:
*
* $Log: Phoinix.h,v $
* Revision 1.22 2007/07/01 10:12:51 bodowenzel
* Cleanup
*
* Revision 1.21 2007/02/03 14:42:18 bodowenzel
* New info control for wall clock
* Multiple saved state feature implemented
*
* Revision 1.20 2005/04/03 14:08:33 bodowenzel
* Option to save the state for each game
*
* Revision 1.19 2005/02/27 16:37:51 bodowenzel
* Enhanced user interface
*
* Revision 1.18 2005/02/17 19:42:35 bodowenzel
* Added pace control
*
* Revision 1.17 2005/01/30 19:35:26 bodowenzel
* Removed support for VFS mount and unmount
*
* Revision 1.16 2005/01/28 17:35:13 bodowenzel
* Manager form uses a scrollable table now for the list of games
*
* Revision 1.15 2004/12/28 13:58:10 bodowenzel
* Menu command to press all keys
* Support for devices without direct screen access
*
* Revision 1.14 2004/12/02 20:01:22 bodowenzel
* New configurable screen layout
*
* Revision 1.13 2004/10/24 09:11:05 bodowenzel
* New button mapping
*
* Revision 1.12 2004/06/20 14:23:20 bodowenzel
* VFS mount and unmount support
*
* Revision 1.11 2004/06/11 16:14:19 bodowenzel
* Enhanced error reporting with MiscPostError()
*
* Revision 1.10 2004/03/02 19:24:16 bodowenzel
* Changed to new error function MiscShowError()
*
* Revision 1.9 2004/01/11 19:07:14 bodowenzel
* Corrected copyright
*
* Revision 1.8 2003/04/27 09:36:18 bodowenzel
* Added Lite edition
*
* Revision 1.7 2002/12/07 08:57:27 bodowenzel
* Tweaked button mapping form like proposed by HJ
*
* Revision 1.6 2002/11/02 15:53:29 bodowenzel
* Reduced number of button bitmaps to one
*
* Revision 1.5 2002/10/23 16:34:35 bodowenzel
* Busy form centralized
*
* Revision 1.4 2002/10/19 08:08:10 bodowenzel
* History cleanup, Javadoc-style header
*
* Revision 1.3 2002/05/10 15:17:39 bodowenzel
* Till's VFS contribution
*
* Revision 1.2 2001/12/30 18:47:11 bodowenzel
* CVS keyword Log was faulty
*
* Revision 1.1.1.1 2001/12/16 13:39:05 bodowenzel
* Import
*
************************************************************************
* Pre-CVS History (developed as PalmBoy):
*
* 2001-09-16 Bodo Wenzel Saving states now possible
* 2001-07-23 Bodo Wenzel For executable v.4.0, changed to C
* 2000-09-30 Bodo Wenzel For executable v.2.1
* 2000-05-07 Bodo Wenzel For executable v.1.0
* 2000-04-22 Bodo Wenzel For executable v.0.3 as resource.inc
************************************************************************
*/
/*************************************************************************
* Global config for varios devices
*************************************************************************/
//#define handera
//#define alphasmart
//#define sonyclie
//#define fossil
//#define palmgamepad
//#define vfs // not implemented
//*************************************************************************
/* === PilRC is a bit limited... ====================================== */
/* from PalmOS.h, checked when included by the C compiler: */
#define sysEditMenuID 10000
#define sysEditMenuUndoCmd 10000
#define sysEditMenuCutCmd 10001
#define sysEditMenuCopyCmd 10002
#define sysEditMenuPasteCmd 10003
#define sysEditMenuSelectAllCmd 10004
#define sysEditMenuSeparator 10005
#define sysEditMenuKeyboardCmd 10006
#define sysEditMenuGraffitiCmd 10007
#define dmDBNameLength 32
#define firstUserEvent 0x6000
/* === Application specific =========================================== */
/* PilRC can't handle enums, even if its values aren't necessary */
#define phoinixErrorEvent (firstUserEvent + 0)
/* === Game Manager =================================================== */
#define formIdManager (1000)
#define tableIdManagerList (1011)
#define tableManagerHeight (6)
#define labelIdManagerNoGames (1012)
#define scrollbarIdManagerList (1021)
#define listIdManagerStates (1031)
#define buttonIdManagerDelete (1032)
#define buttonIdManagerGo (1041)
#define labelIdManagerGo (1042)
#define menuIdManager (1100)
#define menuIdManagerGameDelete (1111)
#define menuIdManagerGameDetails (1112)
#define menuIdManagerOptionsEmulation (1121)
#define menuIdManagerOptionsButtonMapping (1122)
#define menuIdManagerOptionsScreenLayout (1123)
#define menuIdManagerOptionsTips (1124)
#define menuIdManagerOptionsAbout (1125)
#define helpIdManager (1001)
#define alertIdManagerNoGames (1500)
#define helpIdManagerNoGames (1501)
#define alertIdManagerDeleteGame (1600)
/* === Emulation ====================================================== */
/* PilRC can't handle enum's */
#define offsetEmulationNone (0)
#define offsetEmulationMin (1) /* first */
#define offsetEmulationPause (1)
#define offsetEmulationBoost (2)
#define offsetEmulationSelect (3)
#define offsetEmulationStart (4)
#define offsetEmulationB (5)
#define offsetEmulationA (6)
#define offsetEmulationTime (7)
#define offsetEmulationBattery (8)
#define offsetEmulationPace (9)
#define offsetEmulationClock (10)
#define offsetEmulationMax (11) /* last + 1 */
#define formIdEmulation (2000)
#define ctlIdEmulation (2011) /* used +1 .. +9 */
#define checkboxIdEmulationPause (ctlIdEmulation + offsetEmulationPause)
#define checkboxIdEmulationBoost (ctlIdEmulation + offsetEmulationBoost)
#define buttonIdEmulationSelect (ctlIdEmulation + offsetEmulationSelect)
#define buttonIdEmulationStart (ctlIdEmulation + offsetEmulationStart)
#define buttonIdEmulationB (ctlIdEmulation + offsetEmulationB)
#define buttonIdEmulationA (ctlIdEmulation + offsetEmulationA)
#define buttonIdEmulationTime (ctlIdEmulation + offsetEmulationTime)
#define buttonIdEmulationBattery (ctlIdEmulation + offsetEmulationBattery)
#define buttonIdEmulationPace (ctlIdEmulation + offsetEmulationPace)
#define buttonIdEmulationClock (ctlIdEmulation + offsetEmulationClock)
#define ctlOffsetEmulation (40)
#define menuIdEmulation (2100)
#define menuIdEmulationGamePressAllKeys (2111)
#define menuIdEmulationGamePause (2112)
#define menuIdEmulationGameBoost (2113)
#define menuIdEmulationGameReset (2114)
#define menuIdEmulationGameQuit (2115)
#define menuIdEmulationStateSave (2121)
#define menuIdEmulationStateLoad (2122)
#define menuIdEmulationOptionsEmulation (2131)
#define menuIdEmulationOptionsButtonMapping (2132)
#define menuIdEmulationOptionsScreenLayout (2133)
#define menuIdEmulationOptionsTips (2134)
#define menuIdEmulationOptionsAbout (2135)
#define helpIdEmulation (2001)
#define formIdLoadState (2200)
#define listIdLoadState (2211)
#define buttonIdLoadState (2221)
#define labelIdLoadState (2222)
#define helpIdLoadState (2201)
/* === Game Details =================================================== */
#define formIdGameDetails (5100)
#define fieldIdGameDetailsName (5111)
#define popupIdGameDetailsLocation (5121)
#define listIdGameDetailsLocation (5122)
#define labelIdGameDetailsCode (5131)
#define labelIdGameDetailsType (5141)
#define labelIdGameDetailsSize (5151)
#define buttonIdGameDetailsOk (5161)
#define buttonIdGameDetailsCancel (5162)
#define helpIdGameDetails (5101)
#define stblIdGameDetailsType (5151)
/* === Emulation Options ============================================== */
#define formIdEmulationOptions (5200)
#define checkboxIdEmulationOptionsSaveState (5211)
#define labelIdEmulationOptionsMaxFs (5221)
#define buttonIdEmulationOptionsMaxFsUp (5222)
#define buttonIdEmulationOptionsMaxFsDown (5223)
#define labelIdEmulationOptionsBoost (5231)
#define buttonIdEmulationOptionsBoostUp (5232)
#define buttonIdEmulationOptionsBoostDown (5233)
#define buttonIdEmulationOptionsOk (5241)
#define buttonIdEmulationOptionsCancel (5242)
#define helpIdEmulationOptions (5201)
/* === Button Mapping ================================================= */
/* PilRC can't handle enum's */
#define offsetButtonMappingUp (0)
#define offsetButtonMappingDown (1)
#define offsetButtonMappingLeft (2)
#define offsetButtonMappingRight (3)
#define offsetButtonMappingSelect (4)
#define offsetButtonMappingStart (5)
#define offsetButtonMappingB (6)
#define offsetButtonMappingA (7)
#define formIdButtonMapping (5300)
#define checkboxIdButtonMappingHoldVertical (5311)
#define checkboxIdButtonMappingHoldHorizontal (5312)
#define selIdButtonMapping (5321) /* used +0 .. +7 */
/* PilRC can't handle line-splitted #define's, these lines are loooong */
#define selIdButtonMappingUp (selIdButtonMapping + offsetButtonMappingUp)
#define selIdButtonMappingDown (selIdButtonMapping + offsetButtonMappingDown)
#define selIdButtonMappingLeft (selIdButtonMapping + offsetButtonMappingLeft)
#define selIdButtonMappingRight (selIdButtonMapping + offsetButtonMappingRight)
#define selIdButtonMappingSelect (selIdButtonMapping + offsetButtonMappingSelect)
#define selIdButtonMappingStart (selIdButtonMapping + offsetButtonMappingStart)
#define selIdButtonMappingB (selIdButtonMapping + offsetButtonMappingB)
#define selIdButtonMappingA (selIdButtonMapping + offsetButtonMappingA)
#define buttonIdButtonMappingOk (5331)
#define buttonIdButtonMappingCancel (5332)
#define helpIdButtonMapping (5301)
#define formIdButtonMappingSample (5350)
#define buttonIdButtonMappingSampleOk (5361)
#define buttonIdButtonMappingSampleCancel (5362)
#define helpIdButtonMappingSample (5351)
/* === Screen Layout ================================================== */
#define formIdScreenLayout (5400)
#define popupIdScreenLayout (5411) /* used +0 .. +3 */
#define listIdScreenLayout (5421)
#define listScreenLayoutOffset (8)
#define buttonIdScreenLayoutOk (5431)
#define buttonIdScreenLayoutCancel (5432)
#define helpIdScreenLayout (5401)
/* === About ========================================================== */
#define formIdAbout (5500)
#define bmpIdAbout (5511)
#define buttonIdAboutOk (5521)
#define helpIdAbout (5501)
/* === VFS ============================================================ */
#define alertIdOverwrite (8100)
/* === Miscellaneous ================================================== */
#define formIdBusy (8200)
#define bmpIdBusy (8211)
#define alertIdError (8300)
#define helpIdError (8301)
#define stblIdError (8302)
/* === The end ======================================================== */