Subversion Repositories Games.Prince of Persia

Rev

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
// SEG000.C
22
void far pop_main();
23
void __pascal far init_game_main();
24
void __pascal far start_game();
25
int __pascal far process_key();
26
void __pascal far play_frame();
27
void __pascal far draw_game_frame();
28
void __pascal far anim_tile_modif();
29
void load_sound_names();
30
void __pascal far load_sounds(int min_sound,int max_sound);
31
void __pascal far load_opt_sounds(int first,int last);
32
void __pascal far load_lev_spr(int level);
33
void __pascal far load_level();
34
void reset_level_unused_fields(bool loading_clean_level);
35
int __pascal far play_kid_frame();
36
void __pascal far play_guard_frame();
37
void __pascal far check_the_end();
38
void __pascal far check_fall_flo();
39
void __pascal far read_joyst_control();
40
void __pascal far draw_kid_hp(short curr_hp,short max_hp);
41
void __pascal far draw_guard_hp(short curr_hp,short max_hp);
42
void __pascal far add_life();
43
void __pascal far set_health_life();
44
void __pascal far draw_hp();
45
void __pascal far do_delta_hp();
46
void __pascal far play_sound(int sound_id);
47
void __pascal far play_next_sound();
48
void __pascal far check_sword_vs_sword();
49
void __pascal far load_chtab_from_file(int chtab_id,int resource,const char near *filename,int palette_bits);
50
void __pascal far free_all_chtabs_from(int first);
51
void __pascal far load_more_opt_graf(const char *filename);
52
int __pascal far do_paused();
53
void __pascal far read_keyb_control();
54
void __pascal far copy_screen_rect(const rect_type far *source_rect_ptr);
55
void __pascal far toggle_upside();
56
void __pascal far feather_fall();
57
int __pascal far parse_grmode();
58
void __pascal far gen_palace_wall_colors();
59
void __pascal far show_title();
60
void __pascal far transition_ltr();
61
void __pascal far release_title_images();
62
void __pascal far draw_image_2(int id,chtab_type* chtab_ptr,int xpos,int ypos,int blit);
63
void __pascal far load_kid_sprite();
64
void __pascal far save_game();
65
short __pascal far load_game();
66
void __pascal far clear_screen_and_sounds();
67
void __pascal far parse_cmdline_sound();
68
void __pascal far free_optional_sounds();
69
void reload_non_music_sounds();
70
void __pascal far free_optsnd_chtab();
71
void __pascal far load_title_images(int bgcolor);
72
void __pascal far show_copyprot(int where);
73
void __pascal far show_loading();
74
void __pascal far show_quotes();
75
void show_splash();
76
#ifdef USE_QUICKSAVE
77
void check_quick_op();
78
void restore_room_after_quick_load();
79
#endif // USE_QUICKSAVE
80
 
81
// SEG001.C
82
int __pascal far proc_cutscene_frame(int wait_frames);
83
void __pascal far play_both_seq();
84
void __pascal far draw_proom_drects();
85
void __pascal far play_kid_seq();
86
void __pascal far play_opp_seq();
87
void __pascal far draw_princess_room_bg();
88
void __pascal far seqtbl_offset_shad_char(int seq_index);
89
void __pascal far seqtbl_offset_kid_char(int seq_index);
90
void __pascal far init_mouse_cu8();
91
void __pascal far init_mouse_go();
92
void __pascal far princess_crouching();
93
void __pascal far princess_stand();
94
void __pascal far init_princess_x156();
95
void __pascal far princess_lying();
96
void __pascal far init_princess_right();
97
void __pascal far init_ending_princess();
98
void __pascal far init_mouse_1();
99
void __pascal far init_princess();
100
void __pascal far init_vizier();
101
void __pascal far init_ending_kid();
102
void __pascal far cutscene_8();
103
void __pascal far cutscene_9();
104
void __pascal far end_sequence_anim();
105
void __pascal far time_expired();
106
void __pascal far cutscene_12();
107
void __pascal far cutscene_4();
108
void __pascal far cutscene_2_6();
109
void __pascal far pv_scene();
110
void __pascal far set_hourglass_state(int state);
111
int __pascal far hourglass_frame();
112
void __pascal far princess_room_torch();
113
void __pascal far draw_hourglass();
114
void __pascal far reset_cutscene();
115
void __pascal far do_flash(short color);
116
void delay_ticks(Uint32 ticks);
117
void do_flash_no_delay(short color);
118
void __pascal far remove_flash();
119
void __pascal far end_sequence();
120
void __pascal far expired();
121
void __pascal far load_intro(int which_imgs,void far (*func)(),int free_sounds);
122
void __pascal far draw_star(int which_star,int mark_dirty);
123
void __pascal far show_hof();
124
void __pascal far hof_write();
125
void __pascal far hof_read();
126
void __pascal far show_hof_text(rect_type far *rect,int x_align,int y_align, const char *text);
127
int __pascal far fade_in_1();
128
int __pascal far fade_out_1();
129
 
130
// SEG002.C
131
void __pascal far do_init_shad(const byte *source,int seq_index);
132
void __pascal far get_guard_hp();
133
void __pascal far check_shadow();
134
void __pascal far enter_guard();
135
void __pascal far check_guard_fallout();
136
void __pascal far leave_guard();
137
void __pascal far follow_guard();
138
void __pascal far exit_room();
139
int __pascal far goto_other_room(short direction);
140
short __pascal far leave_room();
141
void __pascal far Jaffar_exit();
142
void __pascal far level3_set_chkp();
143
void __pascal far sword_disappears();
144
void __pascal far meet_Jaffar();
145
void __pascal far play_mirr_mus();
146
void __pascal far move_0_nothing();
147
void __pascal far move_1_forward();
148
void __pascal far move_2_backward();
149
void __pascal far move_3_up();
150
void __pascal far move_4_down();
151
void __pascal far move_up_back();
152
void __pascal far move_down_back();
153
void __pascal far move_down_forw();
154
void __pascal far move_6_shift();
155
void __pascal far move_7();
156
void __pascal far autocontrol_opponent();
157
void __pascal far autocontrol_mouse();
158
void __pascal far autocontrol_shadow();
159
void __pascal far autocontrol_skeleton();
160
void __pascal far autocontrol_Jaffar();
161
void __pascal far autocontrol_kid();
162
void __pascal far autocontrol_guard();
163
void __pascal far autocontrol_guard_inactive();
164
void __pascal far autocontrol_guard_active();
165
void __pascal far autocontrol_guard_kid_far();
166
void __pascal far guard_follows_kid_down();
167
void __pascal far autocontrol_guard_kid_in_sight(short distance);
168
void __pascal far autocontrol_guard_kid_armed(short distance);
169
void __pascal far guard_advance();
170
void __pascal far guard_block();
171
void __pascal far guard_strike();
172
void __pascal far hurt_by_sword();
173
void __pascal far check_sword_hurt();
174
void __pascal far check_sword_hurting();
175
void __pascal far check_hurting();
176
void __pascal far check_skel();
177
void __pascal far do_auto_moves(const auto_move_type *moves_ptr);
178
void __pascal far autocontrol_shadow_level4();
179
void __pascal far autocontrol_shadow_level5();
180
void __pascal far autocontrol_shadow_level6();
181
void __pascal far autocontrol_shadow_level12();
182
 
183
// SEG003.C
184
void __pascal far init_game(int level);
185
void __pascal far play_level(int level_number);
186
void __pascal far do_startpos();
187
void __pascal far set_start_pos();
188
void __pascal far find_start_level_door();
189
void __pascal far draw_level_first();
190
void __pascal far redraw_screen(int drawing_different_room);
191
int __pascal far play_level_2();
192
void __pascal far redraw_at_char();
193
void __pascal far redraw_at_char2();
194
void __pascal far check_knock();
195
void __pascal far timers();
196
void __pascal far check_mirror();
197
void __pascal far jump_through_mirror();
198
void __pascal far check_mirror_image();
199
void __pascal far bump_into_opponent();
200
void __pascal far pos_guards();
201
void __pascal far check_can_guard_see_kid();
202
byte __pascal far get_tile_at_kid(int xpos);
203
void __pascal far do_mouse();
204
int __pascal far flash_if_hurt();
205
void __pascal far remove_flash_if_hurt();
206
 
207
// SEG004.C
208
void __pascal far check_collisions();
209
void __pascal far move_coll_to_prev();
210
void __pascal far get_row_collision_data(short row,sbyte *row_coll_room_ptr,byte *row_coll_flags_ptr);
211
int __pascal far get_left_wall_xpos(int room,int column,int row);
212
int __pascal far get_right_wall_xpos(int room,int column,int row);
213
void __pascal far check_bumped();
214
void __pascal far check_bumped_look_left();
215
void __pascal far check_bumped_look_right();
216
int __pascal far is_obstacle_at_col(int tile_col);
217
int __pascal far is_obstacle();
218
int __pascal far xpos_in_drawn_room(int xpos);
219
void __pascal far bumped(sbyte delta_x,sbyte direction);
220
void __pascal far bumped_fall();
221
void __pascal far bumped_floor(sbyte direction);
222
void __pascal far bumped_sound();
223
void __pascal far clear_coll_rooms();
224
int __pascal far can_bump_into_gate();
225
int __pascal far get_edge_distance();
226
void __pascal far check_chomped_kid();
227
void __pascal far chomped();
228
void __pascal far check_gate_push();
229
void __pascal far check_guard_bumped();
230
void __pascal far check_chomped_guard();
231
int __pascal far check_chomped_here();
232
int __pascal far dist_from_wall_forward(byte tiletype);
233
int __pascal far dist_from_wall_behind(byte tiletype);
234
 
235
// SEG005.C
236
void __pascal far seqtbl_offset_char(short seq_index);
237
void __pascal far seqtbl_offset_opp(int seq_index);
238
void __pascal far do_fall();
239
void __pascal far land();
240
void __pascal far spiked();
241
void __pascal far control();
242
void __pascal far control_crouched();
243
void __pascal far control_standing();
244
void __pascal far up_pressed();
245
void __pascal far down_pressed();
246
void __pascal far go_up_leveldoor();
247
void __pascal far control_turning();
248
void __pascal far crouch();
249
void __pascal far back_pressed();
250
void __pascal far forward_pressed();
251
void __pascal far control_running();
252
void __pascal far safe_step();
253
int __pascal far check_get_item();
254
void __pascal far get_item();
255
void __pascal far control_startrun();
256
void __pascal far control_jumpup();
257
void __pascal far standing_jump();
258
void __pascal far check_jump_up();
259
void __pascal far jump_up_or_grab();
260
void __pascal far grab_up_no_floor_behind();
261
void __pascal far jump_up();
262
void __pascal far control_hanging();
263
void __pascal far can_climb_up();
264
void __pascal far hang_fall();
265
void __pascal far grab_up_with_floor_behind();
266
void __pascal far run_jump();
267
void __pascal far back_with_sword();
268
void __pascal far forward_with_sword();
269
void __pascal far draw_sword();
270
void __pascal far control_with_sword();
271
void __pascal far swordfight();
272
void __pascal far sword_strike();
273
void __pascal far parry();
274
 
275
// SEG006.C
276
int __pascal far get_tile(int room,int col,int row);
277
int __pascal far find_room_of_tile();
278
int __pascal far get_tilepos(int tile_col,int tile_row);
279
int __pascal far get_tilepos_nominus(int tile_col,int tile_row);
280
void __pascal far load_fram_det_col();
281
void __pascal far determine_col();
282
void __pascal far load_frame();
283
short __pascal far dx_weight();
284
int __pascal far char_dx_forward(int delta_x);
285
int __pascal far obj_dx_forward(int delta_x);
286
void __pascal far play_seq();
287
int __pascal far get_tile_div_mod_m7(int xpos);
288
int __pascal far get_tile_div_mod(int xpos);
289
int __pascal far sub_70B6(int ypos);
290
int __pascal far y_to_row_mod4(int ypos);
291
void __pascal far loadkid();
292
void __pascal far savekid();
293
void __pascal far loadshad();
294
void __pascal far saveshad();
295
void __pascal far loadkid_and_opp();
296
void __pascal far savekid_and_opp();
297
void __pascal far loadshad_and_opp();
298
void __pascal far saveshad_and_opp();
299
void __pascal far reset_obj_clip();
300
void __pascal far x_to_xh_and_xl(int xpos, sbyte *xh_addr, sbyte *xl_addr);
301
void __pascal far fall_accel();
302
void __pascal far fall_speed();
303
void __pascal far check_action();
304
int __pascal far tile_is_floor(int tiletype);
305
void __pascal far check_spiked();
306
int __pascal far take_hp(int count);
307
int __pascal far get_tile_at_char();
308
void __pascal far set_char_collision();
309
void __pascal far check_on_floor();
310
void __pascal far start_fall();
311
void __pascal far check_grab();
312
int __pascal far can_grab_front_above();
313
void __pascal far in_wall();
314
int __pascal far get_tile_infrontof_char();
315
int __pascal far get_tile_infrontof2_char();
316
int __pascal far get_tile_behind_char();
317
int __pascal far distance_to_edge_weight();
318
int __pascal far distance_to_edge(int xpos);
319
void __pascal far fell_out();
320
void __pascal far play_kid();
321
void __pascal far control_kid();
322
void __pascal far do_demo();
323
void __pascal far play_guard();
324
void __pascal far user_control();
325
void __pascal far flip_control_x();
326
int __pascal far release_arrows();
327
void __pascal far save_ctrl_1();
328
void __pascal far rest_ctrl_1();
329
void __pascal far clear_saved_ctrl();
330
void __pascal far read_user_control();
331
int __pascal far can_grab();
332
int __pascal far wall_type(byte tiletype);
333
int __pascal far get_tile_above_char();
334
int __pascal far get_tile_behind_above_char();
335
int __pascal far get_tile_front_above_char();
336
int __pascal far back_delta_x(int delta_x);
337
void __pascal far do_pickup(int obj_type);
338
void __pascal far check_press();
339
void __pascal far check_spike_below();
340
void __pascal far clip_char();
341
void __pascal far stuck_lower();
342
void __pascal far set_objtile_at_char();
343
void __pascal far proc_get_object();
344
int __pascal far is_dead();
345
void __pascal far play_death_music();
346
void __pascal far on_guard_killed();
347
void __pascal far clear_char();
348
void __pascal far save_obj();
349
void __pascal far load_obj();
350
void __pascal far draw_hurt_splash();
351
void __pascal far check_killed_shadow();
352
void __pascal far add_sword_to_objtable();
353
void __pascal far control_guard_inactive();
354
int __pascal far char_opp_dist();
355
void __pascal far inc_curr_row();
356
 
357
// SEG007.C
358
void __pascal far process_trobs();
359
void __pascal far animate_tile();
360
short __pascal far is_trob_in_drawn_room();
361
void __pascal far set_redraw_anim_right();
362
void __pascal far set_redraw_anim_curr();
363
void __pascal far redraw_at_trob();
364
void __pascal far redraw_21h();
365
void __pascal far redraw_11h();
366
void __pascal far redraw_20h();
367
void __pascal far draw_trob();
368
void __pascal far redraw_tile_height();
369
short __pascal far get_trob_pos_in_drawn_room();
370
short __pascal far get_trob_right_pos_in_drawn_room();
371
short __pascal far get_trob_right_above_pos_in_drawn_room();
372
void __pascal far animate_torch();
373
void __pascal far animate_potion();
374
void __pascal far animate_sword();
375
void __pascal far animate_chomper();
376
void __pascal far animate_spike();
377
void __pascal far animate_door();
378
void __pascal far gate_stop();
379
void __pascal far animate_leveldoor();
380
short __pascal far bubble_next_frame(short curr);
381
short __pascal far get_torch_frame(short curr);
382
void __pascal far set_redraw_anim(short tilepos,byte frames);
383
void __pascal far set_redraw2(short tilepos,byte frames);
384
void __pascal far set_redraw_floor_overlay(short tilepos, byte frames);
385
void __pascal far set_redraw_full(short tilepos,byte frames);
386
void __pascal far set_redraw_fore(short tilepos,byte frames);
387
void __pascal far set_wipe(short tilepos,byte frames);
388
void __pascal far start_anim_torch(short room,short tilepos);
389
void __pascal far start_anim_potion(short room,short tilepos);
390
void __pascal far start_anim_sword(short room,short tilepos);
391
void __pascal far start_anim_chomper(short room,short tilepos, byte modifier);
392
void __pascal far start_anim_spike(short room,short tilepos);
393
short __pascal far trigger_gate(short room,short tilepos,short button_type);
394
short __pascal far trigger_1(short target_type,short room,short tilepos,short button_type);
395
void __pascal far do_trigger_list(short index,short button_type);
396
void __pascal far add_trob(byte room,byte tilepos,sbyte type);
397
short __pascal far find_trob();
398
void __pascal far clear_tile_wipes();
399
short __pascal far get_doorlink_timer(short index);
400
short __pascal far set_doorlink_timer(short index,byte value);
401
short __pascal far get_doorlink_tile(short index);
402
short __pascal far get_doorlink_next(short index);
403
short __pascal far get_doorlink_room(short index);
404
void __pascal far trigger_button(int playsound,int button_type,int modifier);
405
void __pascal far died_on_button();
406
void __pascal far animate_button();
407
void __pascal far start_level_door(short room,short tilepos);
408
void __pascal far animate_empty();
409
void __pascal far animate_loose();
410
void __pascal far loose_shake(int arg_0);
411
int __pascal far remove_loose(int room, int tilepos);
412
void __pascal far make_loose_fall(byte modifier);
413
void __pascal far start_chompers();
414
int __pascal far next_chomper_timing(byte timing);
415
void __pascal far loose_make_shake();
416
void __pascal far do_knock(int room,int tile_row);
417
void __pascal far add_mob();
418
short __pascal far get_curr_tile(short tilepos);
419
void __pascal far do_mobs();
420
void __pascal far move_mob();
421
void __pascal far move_loose();
422
void __pascal far loose_land();
423
void __pascal far loose_fall();
424
void __pascal far redraw_at_cur_mob();
425
void __pascal far mob_down_a_row();
426
void __pascal far draw_mobs();
427
void __pascal far draw_mob();
428
void __pascal far add_mob_to_objtable(int ypos);
429
void __pascal far sub_9A8E();
430
int __pascal far is_spike_harmful();
431
void __pascal far check_loose_fall_on_kid();
432
void __pascal far fell_on_your_head();
433
void __pascal far play_door_sound_if_visible(int sound_id);
434
 
435
// SEG008.C
436
void __pascal far redraw_room();
437
void __pascal far load_room_links();
438
void __pascal far draw_room();
439
void __pascal far draw_tile();
440
void __pascal far draw_tile_aboveroom();
441
void __pascal far redraw_needed(short tilepos);
442
void __pascal far redraw_needed_above(int column);
443
int __pascal far get_tile_to_draw(int room, int column, int row, byte *ptr_tile, byte *ptr_modifier, byte tile_room0);
444
void __pascal far load_curr_and_left_tile();
445
void __pascal far load_leftroom();
446
void __pascal far load_rowbelow();
447
void __pascal far draw_tile_floorright();
448
int __pascal far can_see_bottomleft();
449
void __pascal far draw_tile_topright();
450
void __pascal far draw_tile_anim_topright();
451
void __pascal far draw_tile_right();
452
int __pascal far get_spike_frame(byte modifier);
453
void __pascal far draw_tile_anim_right();
454
void __pascal far draw_tile_bottom(word arg_0);
455
void __pascal far draw_loose(int arg_0);
456
void __pascal far draw_tile_base();
457
void __pascal far draw_tile_anim();
458
void __pascal far draw_tile_fore();
459
int __pascal far get_loose_frame(byte modifier);
460
int __pascal far add_backtable(short chtab_id, int id, sbyte xh, sbyte xl, int ybottom, byte blit, byte peel);
461
int __pascal far add_foretable(short chtab_id, int id, sbyte xh, sbyte xl, int ybottom, byte blit, byte peel);
462
int __pascal far add_midtable(short chtab_id, int id, sbyte xh, sbyte xl, int ybottom, byte blit, byte peel);
463
void __pascal far add_peel(int left,int right,int top,int height);
464
void __pascal far add_wipetable(sbyte layer,short left,short bottom,sbyte height,short width,sbyte color);
465
void __pascal far draw_table(int which_table);
466
void __pascal far draw_wipes(int which);
467
void __pascal far draw_back_fore(int which_table,int index);
468
void __pascal far draw_mid(int index);
469
void __pascal far draw_image(image_type far *image,image_type far *mask,int xpos,int ypos,int blit);
470
void __pascal far draw_wipe(int index);
471
void __pascal far calc_gate_pos();
472
void __pascal far draw_gate_back();
473
void __pascal far draw_gate_fore();
474
void __pascal far alter_mods_allrm();
475
void __pascal far load_alter_mod(int tile_ix);
476
void __pascal far draw_moving();
477
void __pascal far redraw_needed_tiles();
478
void __pascal far draw_tile_wipe(byte height);
479
void __pascal far draw_tables();
480
void __pascal far restore_peels();
481
void __pascal far add_drect(rect_type *source);
482
void __pascal far draw_leveldoor();
483
void __pascal far get_room_address(int room);
484
void __pascal far draw_floor_overlay();
485
void __pascal far draw_other_overlay();
486
void __pascal far draw_tile2();
487
void __pascal far draw_objtable_items_at_tile(byte tilepos);
488
void __pascal far sort_curr_objs();
489
int __pascal far compare_curr_objs(int index1,int index2);
490
void __pascal far draw_objtable_item(int index);
491
int __pascal far load_obj_from_objtable(int index);
492
void __pascal far draw_people();
493
void __pascal far draw_kid();
494
void __pascal far draw_guard();
495
void __pascal far add_kid_to_objtable();
496
void __pascal far add_guard_to_objtable();
497
void __pascal far add_objtable(byte obj_type);
498
void __pascal far mark_obj_tile_redraw(int index);
499
void __pascal far load_frame_to_obj();
500
void __pascal far show_time();
501
void __pascal far show_level();
502
short __pascal far calc_screen_x_coord(short logical_x);
503
void __pascal far free_peels();
504
void __pascal far display_text_bottom(const char near *text);
505
void __pascal far erase_bottom_text(int arg_0);
506
void __pascal far wall_pattern(int which_part,int which_table);
507
void __pascal far draw_left_mark (word arg3, word arg2, word arg1);
508
void __pascal far draw_right_mark (word arg2, word arg1);
509
image_type* get_image(short chtab_id, int id);
510
 
511
// SEG009.C
512
void sdlperror(const char* header);
513
#define locate_file(filename) locate_file_(filename, alloca(POP_MAX_PATH), POP_MAX_PATH)
514
const char* locate_file_(const char* filename, char* path_buffer, int buffer_size);
515
int __pascal far read_key();
516
void __pascal far clear_kbd_buf();
517
word __pascal far prandom(word max);
518
int __pascal far round_xpos_to_byte(int xpos,int round_direction);
519
void __pascal far show_dialog(const char *text);
520
void __pascal far quit(int exit_code);
521
void __pascal far restore_stuff();
522
int __pascal far key_test_quit();
523
const char* __pascal far check_param(const char *param);
524
int __pascal far pop_wait(int timer_index,int time);
525
dat_type *__pascal open_dat(const char *file,int drive);
526
void __pascal far set_loaded_palette(dat_pal_type far *palette_ptr);
527
chtab_type* __pascal load_sprites_from_file(int resource,int palette_bits, int quit_on_error);
528
void __pascal far free_chtab(chtab_type *chtab_ptr);
529
image_type*far __pascal far load_image(int index, dat_pal_type* palette);
530
void __pascal far draw_image_transp(image_type far *image,image_type far *mask,int xpos,int ypos);
531
int __pascal far set_joy_mode();
532
surface_type far *__pascal make_offscreen_buffer(const rect_type far *rect);
533
void __pascal far free_surface(surface_type *surface);
534
void __pascal far free_peel(peel_type *peel_ptr);
535
void __pascal far set_hc_pal();
536
void __pascal far flip_not_ega(byte far *memory,int height,int stride);
537
void __pascal far flip_screen(surface_type far *surface);
538
void __pascal far fade_in_2(surface_type near *source_surface,int which_rows);
539
void __pascal far fade_out_2(int rows);
540
void __pascal far draw_image_transp_vga(image_type far *image,int xpos,int ypos);
541
int __pascal far draw_text_character(byte character);
542
void __pascal far draw_rect(const rect_type far *rect,int color);
543
surface_type far *__pascal rect_sthg(surface_type *surface,const rect_type far *rect);
544
rect_type far *__pascal shrink2_rect(rect_type far *target_rect,const rect_type far *source_rect,int delta_x,int delta_y);
545
void __pascal far set_curr_pos(int xpos,int ypos);
546
void __pascal far restore_peel(peel_type *peel_ptr);
547
peel_type* __pascal far read_peel_from_screen(const rect_type far *rect);
548
void __pascal far show_text(const rect_type far *rect_ptr,int x_align,int y_align,const char far *text);
549
int __pascal far intersect_rect(rect_type far *output,const rect_type far *input1,const rect_type far *input2);
550
rect_type far * __pascal far union_rect(rect_type far *output,const rect_type far *input1,const rect_type far *input2);
551
void __pascal far stop_sounds();
552
void __pascal far play_sound_from_buffer(sound_buffer_type far *buffer);
553
void __pascal far turn_sound_on_off(byte new_state);
554
int __pascal far check_sound_playing();
555
void __pascal far set_gr_mode(byte grmode);
556
void request_screen_update();
557
void __pascal far set_pal_arr(int start,int count,const rgb_type far *array,int vsync);
558
void __pascal far set_pal(int index,int red,int green,int blue,int vsync);
559
int __pascal far add_palette_bits(byte n_colors);
560
void __pascal far process_palette(void *target,dat_pal_type far *source);
561
int __pascal far find_first_pal_row(int which_rows_mask);
562
int __pascal far get_text_color(int cga_color,int low_half,int high_half_mask);
563
void __pascal far close_dat(dat_type far *pointer);
564
void far *__pascal load_from_opendats_alloc(int resource, const char* extension, data_location* out_result, int* out_size);
565
int __pascal far load_from_opendats_to_area(int resource,void far *area,int length, const char* extension);
566
void rect_to_sdlrect(const rect_type* rect, SDL_Rect* sdlrect);
567
void __pascal far method_1_blit_rect(surface_type near *target_surface,surface_type near *source_surface,const rect_type far *target_rect, const rect_type far *source_rect,int blit);
568
image_type far * __pascal far method_3_blit_mono(image_type far *image,int xpos,int ypos,int blitter,byte color);
569
const rect_type far * __pascal far method_5_rect(const rect_type far *rect,int blit,byte color);
570
image_type far * __pascal far method_6_blit_img_to_scr(image_type far *image,int xpos,int ypos,int blit);
571
void __pascal start_timer(int timer_index, int length);
572
int __pascal do_wait(int timer_index);
573
void __pascal far init_timer(int frequency);
574
void __pascal far set_clip_rect(const rect_type far *rect);
575
void __pascal far reset_clip_rect();
576
void __pascal far set_bg_attr(int vga_pal_index,int hc_pal_index);
577
rect_type far *__pascal offset4_rect_add(rect_type far *dest, const rect_type far *source,int d_left,int d_top,int d_right,int d_bottom);
578
int __pascal far input_str(const rect_type far *rect,char *buffer,int max_length,const char *initial,int has_initial,int arg_4,int color,int bgcolor);
579
rect_type far *__pascal offset2_rect(rect_type far *dest, const rect_type far *source,int delta_x,int delta_y);
580
void __pascal far show_text_with_color(const rect_type far *rect_ptr,int x_align,int y_align, const char far *text,int color);
581
void __pascal do_simple_wait(int timer_index);
582
void idle();
583
void __pascal far init_copyprot_dialog();
584
dialog_type * __pascal far make_dialog_info(dialog_settings_type *settings, rect_type *dialog_rect,
585
                                            rect_type *text_rect, peel_type *dialog_peel);
586
void __pascal far calc_dialog_peel_rect(dialog_type*dialog);
587
void __pascal far read_dialog_peel(dialog_type *dialog);
588
void __pascal far draw_dialog_frame(dialog_type *dialog);
589
void __pascal far add_dialog_rect(dialog_type *dialog);
590
void __pascal far dialog_method_2_frame(dialog_type *dialog);
591
#ifdef USE_FADE
592
void __pascal far fade_in_2(surface_type near *source_surface,int which_rows);
593
palette_fade_type far *__pascal make_pal_buffer_fadein(surface_type *source_surface,int which_rows,int wait_time);
594
void __pascal far pal_restore_free_fadein(palette_fade_type far *palette_buffer);
595
int __pascal far fade_in_frame(palette_fade_type far *palette_buffer);
596
void __pascal far fade_out_2(int rows);
597
palette_fade_type far *__pascal make_pal_buffer_fadeout(int which_rows,int wait_time);
598
void __pascal far pal_restore_free_fadeout(palette_fade_type far *palette_buffer);
599
int __pascal far fade_out_frame(palette_fade_type far *palette_buffer);
600
void __pascal far read_palette_256(rgb_type far *target);
601
void __pascal far set_pal_256(rgb_type far *source);
602
#endif
603
void set_chtab_palette(chtab_type* chtab, byte* colors, int n_colors);
604
int has_timer_stopped(int index);
605
sound_buffer_type* load_sound(int index);
606
void free_sound(sound_buffer_type far *buffer);
607
 
608
// SEQTABLE.C
609
void apply_seqtbl_patches();
610
#ifdef CHECK_SEQTABLE_MATCHES_ORIGINAL
611
void check_seqtable_matches_original();
612
#endif
613
 
614
// OPTIONS.C
615
void disable_fixes_and_enhancements();
616
void load_global_options();
617
void check_mod_param();
618
void load_mod_options();
619
void show_use_fixes_and_enhancements_prompt();
620
 
621
// REPLAY.C
622
#ifdef USE_REPLAY
623
void start_with_replay_file(const char *filename);
624
void init_record_replay();
625
void replay_restore_level();
626
int restore_savestate_from_buffer();
627
void start_recording();
628
void add_replay_move();
629
void stop_recording();
630
void start_replay();
631
void end_replay();
632
void do_replay_move();
633
int save_recorded_replay();
634
void replay_cycle();
635
int load_replay();
636
void key_press_while_recording(int* key_ptr);
637
void key_press_while_replaying(int* key_ptr);
638
#endif
639
 
640
// lighting.c
641
#ifdef USE_LIGHTING
642
void init_lighting();
643
void redraw_lighting();
644
void update_lighting(const rect_type far *source_rect_ptr);
645
#endif
646
 
647
// screenshot.c
648
#ifdef USE_SCREENSHOT
649
void save_screenshot();
650
void auto_screenshot();
651
bool want_auto_screenshot();
652
void init_screenshot();
653
void save_level_screenshot(bool want_extras);
654
#endif
655