Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 1 | /* |
2 | SDLPoP, a port/conversion of the DOS game Prince of Persia. |
||
3 | Copyright (C) 2013-2018 Dávid Nagy |
||
4 | |||
5 | This program is free software: you can redistribute it and/or modify |
||
6 | it under the terms of the GNU General Public License as published by |
||
7 | the Free Software Foundation, either version 3 of the License, or |
||
8 | (at your option) any later version. |
||
9 | |||
10 | This program is distributed in the hope that it will be useful, |
||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
13 | GNU General Public License for more details. |
||
14 | |||
15 | You should have received a copy of the GNU General Public License |
||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
17 | |||
18 | The authors of this program may be contacted at http://forum.princed.org |
||
19 | */ |
||
20 | |||
21 | #ifndef DATA_H |
||
22 | #define DATA_H |
||
23 | |||
24 | #ifdef BODY |
||
25 | // If included from data.c: definitions (without extern and with initialization). |
||
26 | #define INIT(...) __VA_ARGS__ |
||
27 | #define extern |
||
28 | #else |
||
29 | // Otherwise: just declarations (with extern and without initialization). |
||
30 | #define INIT(...) |
||
31 | #undef extern |
||
32 | #endif |
||
33 | |||
34 | // data:5F8A |
||
35 | extern word text_time_remaining; |
||
36 | // data:4C56 |
||
37 | extern word text_time_total; |
||
38 | // data:431C |
||
39 | extern word is_show_time; |
||
40 | // data:4C6E |
||
41 | extern word checkpoint; |
||
42 | // data:4E92 |
||
43 | extern word upside_down; |
||
44 | // data:3D36 |
||
45 | extern word resurrect_time; |
||
46 | // data:42B4 |
||
47 | extern word dont_reset_time; |
||
48 | // data:4F7E |
||
49 | extern short rem_min; |
||
50 | // data:4F82 |
||
51 | extern word rem_tick; |
||
52 | // data:4608 |
||
53 | extern word hitp_beg_lev; |
||
54 | // data:4CAA |
||
55 | extern word need_level1_music; |
||
56 | // data:4380 |
||
57 | extern surface_type* offscreen_surface; |
||
58 | |||
59 | // data:31E5 |
||
60 | extern byte sound_flags INIT(= 0); |
||
61 | // data:295E |
||
62 | extern const rect_type screen_rect INIT(= {0, 0, 200, 320}); |
||
63 | // data:3D12 |
||
64 | extern word draw_mode; |
||
65 | // data:42B8 |
||
66 | extern short start_level INIT(= -1); |
||
67 | // data:4CE6 |
||
68 | extern byte * guard_palettes; |
||
69 | // data:4338 |
||
70 | extern chtab_type *chtab_addrs[10]; |
||
71 | |||
72 | |||
73 | #ifdef USE_COPYPROT |
||
74 | // data:4356 |
||
75 | extern word copyprot_plac; |
||
76 | // data:3D16 |
||
77 | extern word copyprot_idx; |
||
78 | // data:01CA |
||
79 | extern const char copyprot_letter[] INIT(= {'A','A','B','B','C','C','D','D','E','F','F','G','H','H','I','I','J','J','K','L','L','M','M','N','O','O','P','P','R','R','S','S','T','T','U','U','V','Y','W','Y'}); |
||
80 | // data:4620 |
||
81 | extern word cplevel_entr[14]; |
||
82 | #endif |
||
83 | // data:46C6 |
||
84 | extern dialog_type* copyprot_dialog; |
||
85 | // data:2944 |
||
86 | extern dialog_settings_type dialog_settings |
||
87 | INIT(= { |
||
88 | add_dialog_rect, |
||
89 | dialog_method_2_frame, |
||
90 | 4, 4, 4, 4, 3, 4, 1 |
||
91 | }); |
||
92 | // data:2B76 |
||
93 | extern rect_type dialog_rect_1 INIT(= {60, 56, 124, 264}); |
||
94 | // data:2B7E |
||
95 | extern rect_type dialog_rect_2 INIT(= {61, 56, 120, 264}); |
||
96 | |||
97 | // data:409E |
||
98 | extern word drawn_room; |
||
99 | |||
100 | |||
101 | // data:4CCD |
||
102 | extern byte curr_tile; |
||
103 | // data:4328 |
||
104 | extern byte curr_modifier; |
||
105 | |||
106 | |||
107 | // data:4CD8 |
||
108 | extern tile_and_mod leftroom_[3]; |
||
109 | // data:5950 |
||
110 | extern tile_and_mod row_below_left_[10]; |
||
111 | // data:2274 |
||
112 | extern const word tbl_line[] INIT(= {0, 10, 20}); |
||
113 | |||
114 | // data:5966 |
||
115 | extern word loaded_room; |
||
116 | // data:658A |
||
117 | extern byte* curr_room_tiles; |
||
118 | // data:5F88 |
||
119 | extern byte* curr_room_modif; |
||
120 | // data:5968 |
||
121 | extern word draw_xh; |
||
122 | |||
123 | // data:02B2 |
||
124 | extern /*const*/ byte tbl_level_type[16] INIT(= {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0}); |
||
125 | // 1.3 |
||
126 | extern /*const*/ word tbl_level_color[16] INIT(= {0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 0, 0, 3, 3, 4, 0}); |
||
127 | // data:0F9E |
||
128 | extern word current_level INIT(= -1); |
||
129 | // data:3021 |
||
130 | extern byte graphics_mode INIT(= 0); |
||
131 | // data:2BA6 |
||
132 | extern rgb_type vga_palette[16] INIT(= { |
||
133 | {0x00, 0x00, 0x00}, |
||
134 | {0x00, 0x00, 0x2A}, |
||
135 | {0x00, 0x2A, 0x00}, |
||
136 | {0x00, 0x2A, 0x2A}, |
||
137 | {0x2A, 0x00, 0x00}, |
||
138 | {0x2A, 0x00, 0x2A}, |
||
139 | {0x2A, 0x15, 0x00}, |
||
140 | {0x2A, 0x2A, 0x2A}, |
||
141 | {0x15, 0x15, 0x15}, |
||
142 | {0x15, 0x15, 0x3F}, |
||
143 | {0x15, 0x3F, 0x15}, |
||
144 | {0x15, 0x3F, 0x3F}, |
||
145 | {0x3F, 0x15, 0x15}, |
||
146 | {0x3F, 0x15, 0x3F}, |
||
147 | {0x3F, 0x3F, 0x15}, |
||
148 | {0x3F, 0x3F, 0x3F}, |
||
149 | }); |
||
150 | |||
151 | // data:4CC0 |
||
152 | extern word room_L; |
||
153 | // data:4CCE |
||
154 | extern word room_R; |
||
155 | // data:4C90 |
||
156 | extern word room_A; |
||
157 | // data:4C96 |
||
158 | extern word room_B; |
||
159 | // data:461A |
||
160 | extern word room_BR; |
||
161 | // data:43FE |
||
162 | extern word room_BL; |
||
163 | // data:4614 |
||
164 | extern word room_AR; |
||
165 | // data:43DE |
||
166 | extern word room_AL; |
||
167 | |||
168 | // data:4F84 |
||
169 | extern level_type level; |
||
170 | |||
171 | |||
172 | // data:42AA |
||
173 | extern short table_counts[5]; |
||
174 | #define backtable_count table_counts[0] |
||
175 | #define foretable_count table_counts[1] |
||
176 | #define wipetable_count table_counts[2] |
||
177 | #define midtable_count table_counts[3] |
||
178 | #define objtable_count table_counts[4] |
||
179 | // data:4D7E |
||
180 | extern short drects_count; |
||
181 | // data:434E |
||
182 | extern short peels_count; |
||
183 | |||
184 | |||
185 | // data:5FF4 |
||
186 | extern back_table_type foretable[200]; |
||
187 | // data:463C |
||
188 | extern back_table_type backtable[200]; |
||
189 | // data:3D38 |
||
190 | extern midtable_type midtable[50]; |
||
191 | // data:5F1E |
||
192 | extern peel_type* peels_table[50]; |
||
193 | // data:4D9A |
||
194 | extern rect_type drects[30]; |
||
195 | |||
196 | // data:4CB8 |
||
197 | extern sbyte obj_direction; |
||
198 | // data:2588 |
||
199 | extern const byte chtab_flip_clip[10] INIT(= {1,0,1,1,1,1,0,0,0,0}); |
||
200 | // data:42A6 |
||
201 | extern short obj_clip_left; |
||
202 | // data:42C6 |
||
203 | extern short obj_clip_top; |
||
204 | // data:42C0 |
||
205 | extern short obj_clip_right; |
||
206 | // data:4082 |
||
207 | extern short obj_clip_bottom; |
||
208 | // data:34D2 |
||
209 | extern wipetable_type wipetable[300]; |
||
210 | // data:2592 |
||
211 | extern const byte chtab_shift[10] INIT(= {0,1,0,0,0,0,1,1,1,0}); |
||
212 | // data:4354 |
||
213 | extern word need_drects; |
||
214 | // data:4CC2 |
||
215 | extern word is_blind_mode; |
||
216 | |||
217 | // data:0F86 |
||
218 | extern const rect_type rect_top INIT(= {0, 0, 192, 320}); |
||
219 | // data:0F96 |
||
220 | extern const rect_type rect_bottom_text INIT(= {193, 70, 202, 250}); |
||
221 | |||
222 | // data:4CB2 |
||
223 | extern word leveldoor_right; |
||
224 | // data:4058 |
||
225 | extern word leveldoor_ybottom; |
||
226 | |||
227 | |||
228 | // data:4CFA |
||
229 | extern byte palace_wall_colors[44*3]; |
||
230 | |||
231 | // data:2942 |
||
232 | extern word seed_was_init INIT(= 0); |
||
233 | // data:4084 |
||
234 | extern dword random_seed; |
||
235 | |||
236 | |||
237 | // data:3010 |
||
238 | extern surface_type* current_target_surface INIT(= NULL); |
||
239 | |||
240 | // data:4C5C |
||
241 | extern byte* doorlink2_ad; |
||
242 | // data:4C5A |
||
243 | extern byte* doorlink1_ad; |
||
244 | |||
245 | |||
246 | |||
247 | // data:4CC6 |
||
248 | extern sbyte control_shift; |
||
249 | // data:461C |
||
250 | extern sbyte control_y; |
||
251 | // data:4612 |
||
252 | extern sbyte control_x; |
||
253 | |||
254 | #ifdef USE_FADE |
||
255 | // data:4CCA |
||
256 | extern word is_global_fading; |
||
257 | // data:4400 |
||
258 | extern palette_fade_type* fade_palette_buffer; |
||
259 | #endif |
||
260 | // data:4358 |
||
261 | extern char_type Kid; |
||
262 | // data:295C |
||
263 | extern word is_keyboard_mode INIT(= 0); |
||
264 | // data:4E8A |
||
265 | extern word is_paused; |
||
266 | // data:42D0 |
||
267 | extern word is_restart_level; |
||
268 | // data:31E4 |
||
269 | extern byte sound_mode INIT(= 0); |
||
270 | // data:42C8 |
||
271 | extern word is_joyst_mode; |
||
272 | // data:31E7 |
||
273 | extern byte is_sound_on INIT(= 0x0F); |
||
274 | // data:3D18 |
||
275 | extern word next_level; |
||
276 | #ifdef USE_COPYPROT |
||
277 | // data:009E |
||
278 | extern word copyprot_level INIT(= 2); |
||
279 | #endif |
||
280 | // data:4C4A |
||
281 | extern short guardhp_delta; |
||
282 | // data:596A |
||
283 | extern word guardhp_curr; |
||
284 | // data:4CC8 |
||
285 | extern word next_room; |
||
286 | // data:4C98 |
||
287 | extern word hitp_curr; |
||
288 | // data:5FF2 |
||
289 | extern word hitp_max; |
||
290 | // data:5FF0 |
||
291 | extern short hitp_delta; |
||
292 | // data:4D94 |
||
293 | extern word flash_color; |
||
294 | // data:4350 |
||
295 | extern word flash_time; |
||
296 | // data:42DC |
||
297 | extern char_type Guard; |
||
298 | |||
299 | // data:437E |
||
300 | extern word need_quotes; |
||
301 | // data:4CF8 |
||
302 | extern short roomleave_result; |
||
303 | // data:4D96 |
||
304 | extern word different_room; |
||
305 | // data:4E94 |
||
306 | extern sound_buffer_type* sound_pointers[58]; |
||
307 | // data:4C58 |
||
308 | extern word guardhp_max; |
||
309 | // data:405C |
||
310 | extern word is_feather_fall; |
||
311 | // data:4CBA |
||
312 | extern chtab_type* chtab_title40; |
||
313 | // data:4CD0 |
||
314 | extern chtab_type* chtab_title50; |
||
315 | // data:405E |
||
316 | extern short hof_count; |
||
317 | |||
318 | |||
319 | // data:009A |
||
320 | extern word demo_mode INIT(= 0); |
||
321 | |||
322 | // data:42CA |
||
323 | extern word is_cutscene; |
||
324 | |||
325 | // data:0FA0 |
||
326 | extern cutscene_ptr_type tbl_cutscenes[16] INIT(= { |
||
327 | NULL, |
||
328 | NULL, |
||
329 | cutscene_2_6, |
||
330 | NULL, |
||
331 | cutscene_4, |
||
332 | NULL, |
||
333 | cutscene_2_6, |
||
334 | NULL, |
||
335 | cutscene_8, |
||
336 | cutscene_9, |
||
337 | NULL, |
||
338 | NULL, |
||
339 | cutscene_12, |
||
340 | NULL, |
||
341 | NULL, |
||
342 | NULL, |
||
343 | }); |
||
344 | |||
345 | // data:408C |
||
346 | extern short mobs_count; |
||
347 | // data:4F7A |
||
348 | extern short trobs_count; |
||
349 | // data:4062 |
||
350 | extern short next_sound; |
||
351 | // data:34AA |
||
352 | extern word grab_timer; |
||
353 | // data:594C |
||
354 | extern short can_guard_see_kid; |
||
355 | // data:594E |
||
356 | extern word holding_sword; |
||
357 | // data:4E90 |
||
358 | extern short united_with_shadow; |
||
359 | // data:409C |
||
360 | extern word leveldoor_open; |
||
361 | // data:4610 |
||
362 | extern word demo_index; |
||
363 | // data:4CD4 |
||
364 | extern short demo_time; |
||
365 | // data:34A2 |
||
366 | extern word have_sword; |
||
367 | |||
368 | // data:3D22 |
||
369 | extern char_type Char; |
||
370 | // data:4D80 |
||
371 | extern char_type Opp; |
||
372 | |||
373 | |||
374 | // data:42A2 |
||
375 | extern short knock; |
||
376 | // data:4370 |
||
377 | extern word is_guard_notice; |
||
378 | |||
379 | // data:656C |
||
380 | extern byte wipe_frames[30]; |
||
381 | // data:4C72 |
||
382 | extern sbyte wipe_heights[30]; |
||
383 | // data:34AC |
||
384 | extern byte redraw_frames_anim[30]; |
||
385 | // data:43E0 |
||
386 | extern byte redraw_frames2[30]; |
||
387 | // data:4C1A |
||
388 | extern byte redraw_frames_floor_overlay[30]; |
||
389 | // data:4064 |
||
390 | extern byte redraw_frames_full[30]; |
||
391 | // data:5EFE |
||
392 | extern byte redraw_frames_fore[30]; |
||
393 | // data:3484 |
||
394 | extern byte tile_object_redraw[30]; |
||
395 | // data:4C64 |
||
396 | extern byte redraw_frames_above[10]; |
||
397 | // data:4CE2 |
||
398 | extern word need_full_redraw; |
||
399 | // data:588E |
||
400 | extern short n_curr_objs; |
||
401 | // data:5BAC |
||
402 | extern objtable_type objtable[50]; |
||
403 | // data:5F8C |
||
404 | extern short curr_objs[50]; |
||
405 | |||
406 | // data:4607 |
||
407 | extern byte obj_xh; |
||
408 | // data:4616 |
||
409 | extern byte obj_xl; |
||
410 | // data:4613 |
||
411 | extern byte obj_y; |
||
412 | // data:4C9A |
||
413 | extern byte obj_chtab; |
||
414 | // data:42A4 |
||
415 | extern byte obj_id; |
||
416 | // data:431E |
||
417 | extern byte obj_tilepos; |
||
418 | // data:4604 |
||
419 | extern short obj_x; |
||
420 | |||
421 | // data:658C |
||
422 | extern frame_type cur_frame; |
||
423 | // data:5886 |
||
424 | extern word seamless; |
||
425 | // data:4CBC |
||
426 | extern trob_type trob; |
||
427 | // data:4382 |
||
428 | extern trob_type trobs[30]; |
||
429 | // data:431A |
||
430 | extern short redraw_height; |
||
431 | // data:24DA |
||
432 | extern /*const*/ byte sound_interruptible[] INIT(= {0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}); |
||
433 | // data:42ED |
||
434 | extern byte curr_tilepos; |
||
435 | // data:432A |
||
436 | extern short curr_room; |
||
437 | // data:4CAC |
||
438 | extern mob_type curmob; |
||
439 | // data:4BB4 |
||
440 | extern mob_type mobs[14]; |
||
441 | // data:4332 |
||
442 | extern short tile_col; |
||
443 | // data:229C |
||
444 | extern const short y_land[] INIT(= {-8, 55, 118, 181, 244}); |
||
445 | // data:03D4 |
||
446 | extern /*const*/ short tbl_guard_type[16] INIT(= {0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 4, 3, -1, -1}); |
||
447 | // data:0EDA |
||
448 | extern /*const*/ byte tbl_guard_hp[16] INIT(= {4, 3, 3, 3, 3, 4, 5, 4, 4, 5, 5, 5, 4, 6, 0, 0}); |
||
449 | // data:5888 |
||
450 | extern word curr_guard_color; |
||
451 | // data:288C |
||
452 | extern byte key_states[SDL_NUM_SCANCODES]; |
||
453 | // data:24A6 |
||
454 | extern const byte x_bump[] INIT(= {-12, 2, 16, 30, 44, 58, 72, 86, 100, 114, 128, 142, 156, 170, 184, 198, 212, 226, 240, 254}); |
||
455 | // data:42F4 |
||
456 | extern word is_screaming; |
||
457 | // data:42EE |
||
458 | extern word offguard; // name from Apple II source |
||
459 | // data:3D32 |
||
460 | extern word droppedout; // name from Apple II source |
||
461 | |||
462 | #ifdef USE_COPYPROT |
||
463 | // data:00A2 |
||
464 | extern /*const*/ word copyprot_room[] INIT(= {3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4}); |
||
465 | // data:00BE |
||
466 | extern const word copyprot_tile[] INIT(= {1, 5, 7, 9, 11, 21, 1, 3, 7, 11, 17, 21, 25, 27}); |
||
467 | #endif |
||
468 | |||
469 | // data:5BAA |
||
470 | extern word exit_room_timer; |
||
471 | // data:4372 |
||
472 | extern short char_col_right; |
||
473 | // data:5F86 |
||
474 | extern short char_col_left; |
||
475 | // data:599C |
||
476 | extern short char_top_row; |
||
477 | // data:434C |
||
478 | extern short prev_char_top_row; |
||
479 | // data:432C |
||
480 | extern short prev_char_col_right; |
||
481 | // data:42CE |
||
482 | extern short prev_char_col_left; |
||
483 | // data:34A4 |
||
484 | extern short char_bottom_row; |
||
485 | // data:3D34 |
||
486 | extern short guard_notice_timer; |
||
487 | // data:42A0 |
||
488 | extern short jumped_through_mirror; |
||
489 | // data:2292 |
||
490 | extern const short y_clip[] INIT(= {-60, 3, 66, 129, 192}); |
||
491 | // data:42F9 |
||
492 | extern byte curr_tile2; |
||
493 | // data:4336 |
||
494 | extern short tile_row; |
||
495 | |||
496 | |||
497 | |||
498 | |||
499 | // data:5F1C |
||
500 | extern word char_width_half; |
||
501 | // data:4618 |
||
502 | extern word char_height; |
||
503 | // data:3D1C |
||
504 | extern short char_x_left; |
||
505 | // data:3D20 |
||
506 | extern short char_x_left_coll; |
||
507 | // data:42F6 |
||
508 | extern short char_x_right_coll; |
||
509 | // data:3D10 |
||
510 | extern short char_x_right; |
||
511 | // data:4D98 |
||
512 | extern short char_top_y; |
||
513 | // data:4096 |
||
514 | extern byte fall_frame; |
||
515 | // data:4C0E |
||
516 | extern byte through_tile; |
||
517 | // data:5F82 |
||
518 | extern sbyte infrontx; // name from Apple II source |
||
519 | // data:228E |
||
520 | extern const sbyte dir_front[] INIT(= {-1, 1}); |
||
521 | // data:2290 |
||
522 | extern const sbyte dir_behind[] INIT(= {1, -1}); |
||
523 | // data:4320 |
||
524 | extern word current_sound; |
||
525 | // data:4606 |
||
526 | extern sbyte control_shift2; |
||
527 | // data:42A8 |
||
528 | extern sbyte control_forward; |
||
529 | // data:4368 |
||
530 | extern word guard_skill; |
||
531 | // data:4088 |
||
532 | extern sbyte control_backward; |
||
533 | // data:4322 |
||
534 | extern sbyte control_up; |
||
535 | // data:409A |
||
536 | extern sbyte control_down; |
||
537 | // data:4CE0 |
||
538 | extern sbyte ctrl1_forward; |
||
539 | // data:4CD2 |
||
540 | extern sbyte ctrl1_backward; |
||
541 | // data:4D92 |
||
542 | extern sbyte ctrl1_up; |
||
543 | // data:4CD6 |
||
544 | extern sbyte ctrl1_down; |
||
545 | // data:42F8 |
||
546 | extern sbyte ctrl1_shift2; |
||
547 | |||
548 | // data:42F0 |
||
549 | extern word shadow_initialized; |
||
550 | |||
551 | // data:4330 |
||
552 | extern word guard_refrac; |
||
553 | // data:4098 |
||
554 | extern word kid_sword_strike; |
||
555 | |||
556 | |||
557 | // data:6591 |
||
558 | extern byte edge_type; |
||
559 | |||
560 | |||
561 | |||
562 | // data:596C |
||
563 | extern SDL_Surface* onscreen_surface_; |
||
564 | extern SDL_Renderer* renderer_; |
||
565 | extern SDL_Window* window_; |
||
566 | extern SDL_Texture* sdl_texture_; |
||
567 | |||
568 | extern SDL_GameController* sdl_controller_ INIT( = 0 ); |
||
569 | extern SDL_Joystick* sdl_joystick_; // in case our joystick is not compatible with SDL_GameController |
||
570 | extern byte using_sdl_joystick_interface; |
||
571 | extern int joy_axis[6]; // hor/ver axes for left/right sticks + left and right triggers (in total 6 axes) |
||
572 | extern int joy_left_stick_states[2]; // horizontal, vertical |
||
573 | extern int joy_right_stick_states[2]; |
||
574 | extern int joy_hat_states[2]; // horizontal, vertical |
||
575 | extern int joy_AY_buttons_state; |
||
576 | extern int joy_X_button_state; |
||
577 | extern int joy_B_button_state; |
||
578 | extern SDL_Haptic* sdl_haptic; |
||
579 | |||
580 | extern int screen_updates_suspended; |
||
581 | |||
582 | #ifdef USE_MIXER |
||
583 | extern char** sound_names; |
||
584 | #endif |
||
585 | |||
586 | extern int g_argc; |
||
587 | extern char** g_argv; |
||
588 | |||
589 | |||
590 | // data:405A |
||
591 | extern sbyte collision_row; |
||
592 | // data:42C2 |
||
593 | extern sbyte prev_collision_row; |
||
594 | |||
595 | // data:4C10 |
||
596 | extern sbyte prev_coll_room[10]; |
||
597 | // data:4374 |
||
598 | extern sbyte curr_row_coll_room[10]; |
||
599 | // data:3D06 |
||
600 | extern sbyte below_row_coll_room[10]; |
||
601 | // data:42D2 |
||
602 | extern sbyte above_row_coll_room[10]; |
||
603 | // data:5890 |
||
604 | extern byte curr_row_coll_flags[10]; |
||
605 | // data:4CEA |
||
606 | extern byte above_row_coll_flags[10]; |
||
607 | // data:4C4C |
||
608 | extern byte below_row_coll_flags[10]; |
||
609 | // data:5BA0 |
||
610 | extern byte prev_coll_flags[10]; |
||
611 | |||
612 | |||
613 | // data:4F80 |
||
614 | extern short pickup_obj_type; |
||
615 | |||
616 | |||
617 | // data:34CA |
||
618 | extern word justblocked; // name from Apple II source |
||
619 | |||
620 | |||
621 | // data:5F84 |
||
622 | extern word last_loose_sound; |
||
623 | |||
624 | #ifdef USE_REPLAY |
||
625 | extern byte recording INIT(= 0); |
||
626 | extern byte replaying INIT(= 0); |
||
627 | extern dword num_replay_ticks INIT(= 0); |
||
628 | extern byte need_start_replay INIT(= 0); |
||
629 | extern byte need_replay_cycle INIT(= 0); |
||
630 | extern char replays_folder[POP_MAX_PATH] INIT(= "replays"); |
||
631 | extern byte special_move; |
||
632 | extern dword saved_random_seed; |
||
633 | extern dword preserved_seed; |
||
634 | extern sbyte keep_last_seed; |
||
635 | extern byte skipping_replay; |
||
636 | extern byte replay_seek_target; |
||
637 | extern byte is_validate_mode; |
||
638 | #endif // USE_REPLAY |
||
639 | |||
640 | extern byte start_fullscreen INIT(= 0); |
||
641 | extern word pop_window_width INIT(= 640); |
||
642 | extern word pop_window_height INIT(= 400); |
||
643 | extern byte use_custom_levelset INIT(= 0); |
||
644 | extern char levelset_name[POP_MAX_PATH]; |
||
645 | |||
646 | extern byte use_fixes_and_enhancements INIT(= 0); |
||
647 | extern byte enable_copyprot INIT(= 0); |
||
648 | extern byte enable_mixer INIT(= 1); |
||
649 | extern byte enable_fade INIT(= 1); |
||
650 | extern byte enable_flash INIT(= 1); |
||
651 | extern byte enable_text INIT(= 1); |
||
652 | extern byte enable_info_screen INIT(= 1); |
||
653 | extern byte enable_controller_rumble INIT(= 0); |
||
654 | extern byte joystick_only_horizontal INIT(= 0); |
||
655 | extern int joystick_threshold INIT(= 8000); |
||
656 | extern byte enable_quicksave INIT(= 1); |
||
657 | extern byte enable_quicksave_penalty INIT(= 1); |
||
658 | extern byte enable_replay INIT(= 1); |
||
659 | extern byte enable_crouch_after_climbing INIT(= 1); |
||
660 | extern byte enable_freeze_time_during_end_music INIT(= 1); |
||
661 | extern byte fix_gate_sounds INIT(= 1); |
||
662 | extern byte fix_two_coll_bug INIT(= 1); |
||
663 | extern byte fix_infinite_down_bug INIT(= 1); |
||
664 | extern byte fix_gate_drawing_bug INIT(= 0); |
||
665 | extern byte fix_bigpillar_climb INIT(= 0); |
||
666 | extern byte fix_jump_distance_at_edge INIT(= 1); |
||
667 | extern byte fix_edge_distance_check_when_climbing INIT(= 1); |
||
668 | extern byte fix_painless_fall_on_guard INIT(= 1); |
||
669 | extern byte fix_wall_bump_triggers_tile_below INIT(= 1); |
||
670 | extern byte fix_stand_on_thin_air INIT(= 1); |
||
671 | extern byte fix_press_through_closed_gates INIT(= 1); |
||
672 | extern byte fix_grab_falling_speed INIT(= 1); |
||
673 | extern byte fix_skeleton_chomper_blood INIT(= 1); |
||
674 | extern byte fix_move_after_drink INIT(= 1); |
||
675 | extern byte fix_loose_left_of_potion INIT(= 1); |
||
676 | extern byte fix_guard_following_through_closed_gates INIT(= 1); |
||
677 | extern byte fix_safe_landing_on_spikes INIT(= 1); |
||
678 | extern byte use_correct_aspect_ratio INIT(= 0); |
||
679 | extern byte use_integer_scaling INIT(= 0); |
||
680 | extern byte enable_remember_guard_hp INIT(= 1); |
||
681 | extern byte fix_glide_through_wall INIT(= 1); |
||
682 | extern byte fix_drop_through_tapestry INIT(= 1); |
||
683 | extern byte fix_land_against_gate_or_tapestry INIT(= 1); |
||
684 | extern byte fix_unintended_sword_strike INIT(= 1); |
||
685 | extern byte fix_retreat_without_leaving_room INIT(= 1); |
||
686 | extern byte fix_running_jump_through_tapestry INIT(= 1); |
||
687 | extern byte fix_push_guard_into_wall INIT(= 1); |
||
688 | extern byte fix_jump_through_wall_above_gate INIT(= 1); |
||
689 | extern byte fix_chompers_not_starting INIT(= 1); |
||
690 | extern byte fix_feather_interrupted_by_leveldoor INIT(= 1); |
||
691 | extern byte fix_offscreen_guards_disappearing INIT(= 1); |
||
692 | extern byte fix_move_after_sheathe INIT(= 1); |
||
693 | #ifdef USE_LIGHTING |
||
694 | extern byte enable_lighting INIT(= 0); |
||
695 | #endif |
||
696 | |||
697 | // Custom Gameplay settings |
||
698 | extern word start_minutes_left INIT(= 60); |
||
699 | extern word start_ticks_left INIT(= 719); |
||
700 | extern word start_hitp INIT(= 3); |
||
701 | extern word max_hitp_allowed INIT(= 10); |
||
702 | extern word saving_allowed_first_level INIT(= 3); |
||
703 | extern word saving_allowed_last_level INIT(= 13); |
||
704 | extern byte start_upside_down INIT(= 0); |
||
705 | extern byte start_in_blind_mode INIT(= 0); |
||
706 | extern byte drawn_tile_top_level_edge INIT(= tiles_1_floor); |
||
707 | extern byte drawn_tile_left_level_edge INIT(= tiles_20_wall); |
||
708 | extern byte level_edge_hit_tile INIT(= tiles_20_wall); |
||
709 | extern byte allow_triggering_any_tile INIT(= 0); |
||
710 | extern byte enable_wda_in_palace INIT(= 0); |
||
711 | extern word first_level INIT(= 1); |
||
712 | extern byte skip_title INIT(= 0); |
||
713 | extern word shift_L_allowed_until_level INIT(= 4); |
||
714 | extern word shift_L_reduced_minutes INIT(= 15); |
||
715 | extern word shift_L_reduced_ticks INIT(= 719); |
||
716 | |||
717 | // data:009C |
||
718 | extern word cheats_enabled INIT(= 0); |
||
719 | #ifdef USE_DEBUG_CHEATS |
||
720 | extern byte debug_cheats_enabled INIT(= 0); |
||
721 | extern const rect_type timer_rect INIT(= {1, 2, 8, 55}); |
||
722 | extern byte is_timer_displayed INIT(= 0); |
||
723 | #endif |
||
724 | |||
725 | // customized cutscene set-up: handled as index into a lookup table (can't rely on function pointers being stable!) |
||
726 | extern byte tbl_cutscenes_by_index[16] INIT(= {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}); |
||
727 | extern cutscene_ptr_type tbl_cutscenes_lookup[16] INIT(= { |
||
728 | NULL, |
||
729 | NULL, |
||
730 | cutscene_2_6, |
||
731 | NULL, |
||
732 | cutscene_4, |
||
733 | NULL, |
||
734 | cutscene_2_6, |
||
735 | NULL, |
||
736 | cutscene_8, |
||
737 | cutscene_9, |
||
738 | NULL, |
||
739 | NULL, |
||
740 | cutscene_12, |
||
741 | NULL, |
||
742 | NULL, |
||
743 | NULL, |
||
744 | }); |
||
745 | |||
746 | #undef INIT |
||
747 | #undef extern |
||
748 | |||
749 | #endif |