-
Notifications
You must be signed in to change notification settings - Fork 0
/
quarks.h
537 lines (537 loc) · 7.79 KB
/
quarks.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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
#define Q_screenWidth 2
#define Q_screenHeight 3
#define Q_margin 4
#define Q_palette 5
#define Q_popupColors 6
#define Q_imageSize 7
#define Q_altImage 8
#define Q_editTitle 9
#define Q_gameTitle 10
#define Q_gamma 11
#define Q_screenFlags 12
#define Q_audio 13
#define Q_rate 14
#define Q_buffer 15
#define Q_mmlVolume 16
#define Q_waveVolume 17
#define Q_standardSounds 18
#define Q_mmlTuning 19
#define Q_mmlTempo 20
#define Q_keyRepeat 21
#define Q_editKey 22
#define Q_gameKey 23
#define Q_backspace 24
#define Q_tab 25
#define Q_clear 26
#define Q_return 27
#define Q_pause 28
#define Q_escape 29
#define Q_space 30
#define Q_exclaim 31
#define Q_quotedbl 32
#define Q_hash 33
#define Q_dollar 34
#define Q_ampersand 35
#define Q_quote 36
#define Q_leftparen 37
#define Q_rightparen 38
#define Q_asterisk 39
#define Q_plus 40
#define Q_comma 41
#define Q_minus 42
#define Q_period 43
#define Q_slash 44
#define Q_0 45
#define Q_1 46
#define Q_2 47
#define Q_3 48
#define Q_4 49
#define Q_5 50
#define Q_6 51
#define Q_7 52
#define Q_8 53
#define Q_9 54
#define Q_colon 55
#define Q_semicolon 56
#define Q_less 57
#define Q_equals 58
#define Q_greater 59
#define Q_question 60
#define Q_at 61
#define Q_leftbracket 62
#define Q_backslash 63
#define Q_rightbracket 64
#define Q_caret 65
#define Q_underscore 66
#define Q_backquote 67
#define Q_A 68
#define Q_B 69
#define Q_C 70
#define Q_D 71
#define Q_E 72
#define Q_F 73
#define Q_G 74
#define Q_H 75
#define Q_I 76
#define Q_J 77
#define Q_K 78
#define Q_L 79
#define Q_M 80
#define Q_N 81
#define Q_O 82
#define Q_P 83
#define Q_Q 84
#define Q_R 85
#define Q_S 86
#define Q_T 87
#define Q_U 88
#define Q_V 89
#define Q_W 90
#define Q_X 91
#define Q_Y 92
#define Q_Z 93
#define Q_delete 94
#define Q_kp0 95
#define Q_kp1 96
#define Q_kp2 97
#define Q_kp3 98
#define Q_kp4 99
#define Q_kp5 100
#define Q_kp6 101
#define Q_kp7 102
#define Q_kp8 103
#define Q_kp9 104
#define Q_kp_period 105
#define Q_kp_divide 106
#define Q_kp_multiply 107
#define Q_kp_minus 108
#define Q_kp_plus 109
#define Q_kp_enter 110
#define Q_kp_equals 111
#define Q_up 112
#define Q_down 113
#define Q_right 114
#define Q_left 115
#define Q_insert 116
#define Q_home 117
#define Q_end 118
#define Q_pageup 119
#define Q_pagedown 120
#define Q_f1 121
#define Q_f2 122
#define Q_f3 123
#define Q_f4 124
#define Q_f5 125
#define Q_f6 126
#define Q_f7 127
#define Q_f8 128
#define Q_f9 129
#define Q_f10 130
#define Q_f11 131
#define Q_f12 132
#define Q_f13 133
#define Q_f14 134
#define Q_f15 135
#define Q_numlock 136
#define Q_capslock 137
#define Q_scrollock 138
#define Q_rshift 139
#define Q_lshift 140
#define Q_rctrl 141
#define Q_lctrl 142
#define Q_ralt 143
#define Q_lalt 144
#define Q_rmeta 145
#define Q_lmeta 146
#define Q_lsuper 147
#define Q_rsuper 148
#define Q_mode 149
#define Q_help 150
#define Q_print 151
#define Q_sysreq 152
#define Q_break 153
#define Q_menu 154
#define Q_power 155
#define Q_euro 156
#define Q_compose 157
#define Q_undo 158
#define Q_shift 159
#define Q_ctrl 160
#define Q_alt 161
#define Q_meta 162
#define Q_numLock 163
#define Q_editClick 164
#define Q_gameClick 165
#define Q_middle 166
#define Q_class 167
#define Q_quiz 168
#define Q_saveSolutions 169
#define Q_solutionComment 170
#define Q_solutionTimestamp 171
#define Q_private 172
#define Q_picedit 173
#define Q_macro 174
#define Q_sqlFile 175
#define Q_sqlInit 176
#define Q_sqlExtensions 177
#define Q_sqlMemStatus 178
#define Q_sqlSmallAllocations 179
#define Q_sqlCoveringIndexScan 180
#define Q_sqlPowerSafe 181
#define Q_level 182
#define Q_tracePrefix 183
#define Q_stackProtection 184
#define Q_maxObjects 185
#define Q_traceAll 186
#define Q_traceObject 187
#define Q_showInventory 188
#define Q_progress 189
#define Q_autoSave 190
#define Q_maxTrigger 191
#define Q_pasteCommand 192
#define Q_codepage 193
#define Q_replaySpeed 194
#define Q_autoWin 195
#define Q_listMode 196
#define Q_listColumns 197
#define Q_ignore 198
static const char*const global_quarks[]={
"screenWidth",
"screenHeight",
"margin",
"palette",
"popupColors",
"imageSize",
"altImage",
"editTitle",
"gameTitle",
"gamma",
"screenFlags",
"audio",
"rate",
"buffer",
"mmlVolume",
"waveVolume",
"standardSounds",
"mmlTuning",
"mmlTempo",
"keyRepeat",
"editKey",
"gameKey",
"backspace",
"tab",
"clear",
"return",
"pause",
"escape",
"space",
"exclaim",
"quotedbl",
"hash",
"dollar",
"ampersand",
"quote",
"leftparen",
"rightparen",
"asterisk",
"plus",
"comma",
"minus",
"period",
"slash",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"colon",
"semicolon",
"less",
"equals",
"greater",
"question",
"at",
"leftbracket",
"backslash",
"rightbracket",
"caret",
"underscore",
"backquote",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"delete",
"kp0",
"kp1",
"kp2",
"kp3",
"kp4",
"kp5",
"kp6",
"kp7",
"kp8",
"kp9",
"kp_period",
"kp_divide",
"kp_multiply",
"kp_minus",
"kp_plus",
"kp_enter",
"kp_equals",
"up",
"down",
"right",
"left",
"insert",
"home",
"end",
"pageup",
"pagedown",
"f1",
"f2",
"f3",
"f4",
"f5",
"f6",
"f7",
"f8",
"f9",
"f10",
"f11",
"f12",
"f13",
"f14",
"f15",
"numlock",
"capslock",
"scrollock",
"rshift",
"lshift",
"rctrl",
"lctrl",
"ralt",
"lalt",
"rmeta",
"lmeta",
"lsuper",
"rsuper",
"mode",
"help",
"print",
"sysreq",
"break",
"menu",
"power",
"euro",
"compose",
"undo",
"shift",
"ctrl",
"alt",
"meta",
"numLock",
"editClick",
"gameClick",
"middle",
"class",
"quiz",
"saveSolutions",
"solutionComment",
"solutionTimestamp",
"private",
"picedit",
"macro",
"sqlFile",
"sqlInit",
"sqlExtensions",
"sqlMemStatus",
"sqlSmallAllocations",
"sqlCoveringIndexScan",
"sqlPowerSafe",
"level",
"tracePrefix",
"stackProtection",
"maxObjects",
"traceAll",
"traceObject",
"showInventory",
"progress",
"autoSave",
"maxTrigger",
"pasteCommand",
"codepage",
"replaySpeed",
"autoWin",
"listMode",
"listColumns",
"ignore",
0};
#ifdef HEROMESH_BINDINGS
static const SDLKey quark_to_key[Q_undo+1-Q_backspace]={
SDLK_BACKSPACE,
SDLK_TAB,
SDLK_CLEAR,
SDLK_RETURN,
SDLK_PAUSE,
SDLK_ESCAPE,
SDLK_SPACE,
SDLK_EXCLAIM,
SDLK_QUOTEDBL,
SDLK_HASH,
SDLK_DOLLAR,
SDLK_AMPERSAND,
SDLK_QUOTE,
SDLK_LEFTPAREN,
SDLK_RIGHTPAREN,
SDLK_ASTERISK,
SDLK_PLUS,
SDLK_COMMA,
SDLK_MINUS,
SDLK_PERIOD,
SDLK_SLASH,
SDLK_0,
SDLK_1,
SDLK_2,
SDLK_3,
SDLK_4,
SDLK_5,
SDLK_6,
SDLK_7,
SDLK_8,
SDLK_9,
SDLK_COLON,
SDLK_SEMICOLON,
SDLK_LESS,
SDLK_EQUALS,
SDLK_GREATER,
SDLK_QUESTION,
SDLK_AT,
SDLK_LEFTBRACKET,
SDLK_BACKSLASH,
SDLK_RIGHTBRACKET,
SDLK_CARET,
SDLK_UNDERSCORE,
SDLK_BACKQUOTE,
SDLK_a,
SDLK_b,
SDLK_c,
SDLK_d,
SDLK_e,
SDLK_f,
SDLK_g,
SDLK_h,
SDLK_i,
SDLK_j,
SDLK_k,
SDLK_l,
SDLK_m,
S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