// seg002:03C7 void __pascal far exit_room() { word leave; word kid_room_m1; leave = 0; if (exit_room_timer != 0) { --exit_room_timer; return; } loadkid(); load_frame_to_obj(); set_char_collision(); roomleave_result = leave_room(); if (roomleave_result < 0) { return; } savekid(); next_room = Char.room; if (Guard.direction == dir_56_none) return; if (Guard.alive < 0 && Guard.sword == sword_2_drawn) { kid_room_m1 = Kid.room - 1; if (level.guards_tile[kid_room_m1] >= 30 || level.guards_seq_hi[kid_room_m1] != 0 ) { if (roomleave_result == 0) { // left if (Guard.x >= 91) leave = 1; #ifdef FIX_GUARD_FOLLOWING_THROUGH_CLOSED_GATES else if (options.fix_guard_following_through_closed_gates && can_guard_see_kid != 2 && Kid.sword != sword_2_drawn) { leave = 1; } #endif } else if (roomleave_result == 1) { // right if (Guard.x < 165) leave = 1; #ifdef FIX_GUARD_FOLLOWING_THROUGH_CLOSED_GATES else if (options.fix_guard_following_through_closed_gates && can_guard_see_kid != 2 && Kid.sword != sword_2_drawn) { leave = 1; } #endif } else if (roomleave_result == 2) { // up if (Guard.curr_row >= 0) leave = 1; } else { // down if (Guard.curr_row < 3) leave = 1; } } else { leave = 1; } } else { leave = 1; } if (leave) { leave_guard(); } else { follow_guard(); } }
// seg001:0128 void __pascal far play_kid_seq() { loadkid(); if (Char.frame) { play_seq(); savekid(); } }
// seg000:0FBD void __pascal far check_the_end() { if (next_room != 0 && next_room != drawn_room) { drawn_room = next_room; load_room_links(); if (current_level == 14 && drawn_room == 5) { // Special event: end of game end_sequence(); } different_room = 1; loadkid(); anim_tile_modif(); start_chompers(); check_fall_flo(); check_shadow(); } }
// seg002:0CD4 void __pascal far check_sword_hurt() { if (Guard.action == actions_99_hurt) { if (Kid.action == actions_99_hurt) { Kid.action = actions_1_run_jump; } loadshad(); hurt_by_sword(); saveshad(); guard_refrac = refractimer[guard_skill]; } else { if (Kid.action == actions_99_hurt) { loadkid(); hurt_by_sword(); savekid(); } } }
// seg001:0156 void __pascal far draw_princess_room_bg() { memset_near(table_counts, 0, sizeof(table_counts)); loadkid(); if (Char.frame) { load_frame_to_obj(); obj_tilepos = 30; add_objtable(0); } loadshad(); if (Char.frame) { load_frame_to_obj(); obj_tilepos = 30; add_objtable(0); } redraw_needed_tiles(); add_foretable(id_chtab_8_princessroom, 2 /*pillar piece*/, 30, 0, 167, blitters_10h_transp, 0); princess_room_torch(); draw_hourglass(); draw_tables(); }
// seg001:01F9 void __pascal far seqtbl_offset_kid_char(int seq_index) { loadkid(); seqtbl_offset_char(seq_index); savekid(); }