示例#1
0
文件: seg002.c 项目: mfn/SDLPoP
// seg002:039E
void __pascal far follow_guard() {
	level.guards_tile[Kid.room - 1] = 0xFF;
	level.guards_tile[Guard.room - 1] = 0xFF;
	loadshad();
	goto_other_room(roomleave_result);
	saveshad();
}
示例#2
0
文件: seg001.c 项目: ecalot/SDLPoP
// seg001:041C
void __pascal far end_sequence_anim() {
	disable_keys = 1;
	if (!is_sound_on) {
		turn_sound_on_off(0x0F);
	}
	copy_screen_rect(&screen_rect);
	play_sound(sound_26_embrace); // arrived to princess
	init_ending_princess();
	saveshad();
	init_ending_kid();
	savekid();
	if (proc_cutscene_frame(8)) return;
	seqtbl_offset_shad_char(seq_108_princess_turn_and_hug); // princess turn and hug [PV2]
	if (proc_cutscene_frame(5)) return;
	seqtbl_offset_kid_char(seq_13_stop_run); // stop run
	if (proc_cutscene_frame(2)) return;
	Kid.frame = 0;
	if (proc_cutscene_frame(39)) return;
	init_mouse_1();
	savekid();
	if (proc_cutscene_frame(9)) return;
	seqtbl_offset_kid_char(seq_101_mouse_stands_up); // mouse stands up
	if (proc_cutscene_frame(41)) return;
	fade_out_1();
	while (check_sound_playing()) idle();
}
示例#3
0
文件: seg002.c 项目: mfn/SDLPoP
// seg002:0269
void __pascal far check_guard_fallout() {
	if (Guard.direction == dir_56_none || Guard.y < 211) {
		return;
	}
	if (Guard.charid == charid_1_shadow) {
		if (Guard.action != actions_4_in_freefall) {
			return;
		}
		loadshad();
		clear_char();
		saveshad();
	} else if (Guard.charid == charid_4_skeleton &&
		(Guard.room = level.roomlinks[Guard.room - 1].down) == 3) {
		// if skeleton falls down into room 3
		Guard.x = 133;
		Guard.curr_row = 1;
		Guard.direction = dir_0_right;
		Guard.alive = -1;
		leave_guard();
	} else {
		on_guard_killed();
		level.guards_tile[drawn_room - 1] = -1;
		Guard.direction = dir_56_none;
		draw_guard_hp(0, guardhp_curr);
		guardhp_curr = 0;
	}
}
示例#4
0
文件: seg001.c 项目: ecalot/SDLPoP
// seg001:013F
void __pascal far play_opp_seq() {
	loadshad_and_opp();
	if (Char.frame) {
		play_seq();
		saveshad();
	}
}
示例#5
0
文件: seg000.c 项目: diddledan/SDLPoP
// seg000:0F48
void __pascal far play_guard_frame() {
	if (Guard.direction != dir_56_none) {
		loadshad_and_opp();
		load_fram_det_col();
		check_killed_shadow();
		play_guard();
		if (Char.room == drawn_room) {
			play_seq();
			if (Char.x >= 44 && Char.x < 211) {
				fall_accel();
				fall_speed();
				load_frame_to_obj();
				load_fram_det_col();
				set_char_collision();
				check_guard_bumped();
				check_action();
				check_press();
				check_spike_below();
				check_spiked();
				check_chomped_guard();
			}
		}
		saveshad();
	}
}
示例#6
0
文件: seg002.c 项目: mfn/SDLPoP
// seg002:0000
void __pascal far do_init_shad(const byte *source,int seq_index) {
	memcpy_near(&Char, source, 7);
	seqtbl_offset_char(seq_index);
	Char.charid = charid_1_shadow;
	demo_time = 0;
	guard_skill = 3;
	guardhp_delta = guardhp_curr = guardhp_max = 4;
	saveshad();
}
示例#7
0
文件: seg001.c 项目: ecalot/SDLPoP
// seg001:05B8
void __pascal far cutscene_2_6() {
	play_sound(sound_27_cutscene_2_4_6_12); // cutscene 2, 4, 6, 12
	set_hourglass_state(hourglass_frame());
	init_princess_right();
	saveshad();
	if (fade_in_1()) return;
	if (proc_cutscene_frame(26)) return;
	fade_out_1();
}
示例#8
0
文件: seg001.c 项目: ecalot/SDLPoP
// seg001:05EC
void __pascal far pv_scene() {
	init_princess();
	saveshad();
	if (fade_in_1()) return;
	init_vizier();
	savekid();
	if (proc_cutscene_frame(2)) return;
	play_sound(sound_50_story_2_princess); // story 2: princess waiting
	do {
		if (proc_cutscene_frame(1)) return;
		//idle();
	} while(check_sound_playing());
	cutscene_frame_time = 8;
	if (proc_cutscene_frame(5)) return;
	play_sound(sound_4_gate_closing); // gate closing
	do {
		if (proc_cutscene_frame(1)) return;
	} while(check_sound_playing());
	play_sound(sound_51_princess_door_opening); // princess door opening
	if (proc_cutscene_frame(3)) return;
	seqtbl_offset_shad_char(98); // princess turn around [PV1]
	if (proc_cutscene_frame(5)) return;
	seqtbl_offset_kid_char(96); // Jaffar walk [PV1]
	if (proc_cutscene_frame(6)) return;
	play_sound(sound_53_story_3_Jaffar_comes); // story 3: Jaffar comes
	seqtbl_offset_kid_char(97); // Jaffar stop [PV1]
	if (proc_cutscene_frame(4)) return;
	if (proc_cutscene_frame(18)) return;
	seqtbl_offset_kid_char(96); // Jaffar walk [PV1]
	if (proc_cutscene_frame(30)) return;
	seqtbl_offset_kid_char(97); // Jaffar stop [PV1]
	if (proc_cutscene_frame(35)) return;
	seqtbl_offset_kid_char(102); // Jaffar conjuring [PV1]
	cutscene_frame_time = 7;
	if (proc_cutscene_frame(1)) return;
	seqtbl_offset_shad_char(99); // princess step back [PV1]
	if (proc_cutscene_frame(17)) return;
	hourglass_state = 1;
	flash_time = 5;
	flash_color = 15; // white
	do {
		if (proc_cutscene_frame(1)) return;
		//idle();
	} while(check_sound_playing());
	seqtbl_offset_kid_char(100); // Jaffar end conjuring and walk [PV1]
	hourglass_sandflow = 0;
	if (proc_cutscene_frame(6)) return;
	play_sound(sound_52_story_4_Jaffar_leaves); // story 4: Jaffar leaves
	if (proc_cutscene_frame(24)) return;
	hourglass_state = 2;
	if (proc_cutscene_frame(9)) return;
	seqtbl_offset_shad_char(113); // princess look down [PV1]
	if (proc_cutscene_frame(28)) return;
	fade_out_1();
}
示例#9
0
文件: seg001.c 项目: ecalot/SDLPoP
// seg001:03B7
void __pascal far cutscene_9() {
	play_sound(sound_35_cutscene_8_9); // cutscene 8, 9
	set_hourglass_state(hourglass_frame());
	princess_stand();
	saveshad();
	if (fade_in_1()) return;
	init_mouse_go();
	savekid();
	if (proc_cutscene_frame(5)) return;
	seqtbl_offset_shad_char(seq_112_princess_crouch_down_PV2); // princess crouch down [PV2]
	if (proc_cutscene_frame(9)) return;
	seqtbl_offset_kid_char(seq_114_mouse_stand); // mouse stand
	if (proc_cutscene_frame(58)) return;
	fade_out_1();
}
示例#10
0
文件: seg001.c 项目: ecalot/SDLPoP
// seg001:034D
void __pascal far cutscene_8() {
	play_sound(sound_35_cutscene_8_9); // cutscene 8, 9
	set_hourglass_state(hourglass_frame());
	init_mouse_cu8();
	savekid();
	princess_crouching();
	saveshad();
	if (fade_in_1()) return;
	if (proc_cutscene_frame(20)) return;
	seqtbl_offset_kid_char(seq_107_mouse_stand_up_and_go); // mouse stand up and go
	if (proc_cutscene_frame(20)) return;
	seqtbl_offset_shad_char(seq_111_princess_stand_up_PV2); // princess stand up [PV2]
	if (proc_cutscene_frame(20)) return;
	Kid.frame = 0;
	fade_out_1();
}
示例#11
0
文件: seg002.c 项目: mfn/SDLPoP
// 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();
		}
	}
}
示例#12
0
文件: seg001.c 项目: ecalot/SDLPoP
// seg001:0525
void __pascal far cutscene_12() {
	short var_2;
	var_2 = hourglass_frame();
	if (var_2 >= 6) {
		set_hourglass_state(var_2);
		init_princess_x156();
		saveshad();
		play_sound(sound_40_cutscene_12_short_time); // cutscene 12 short time
		if (fade_in_1()) return;
		if (proc_cutscene_frame(2)) return;
		seqtbl_offset_shad_char(98); // princess turn around [PV1]
		if (proc_cutscene_frame(24)) return;
		fade_out_1();
	} else {
		cutscene_2_6();
	}
}
示例#13
0
文件: seg002.c 项目: mfn/SDLPoP
// seg002:0E1F
void __pascal far check_skel() {
	// Special event: skeleton wakes
	if (current_level == 3 &&
		Guard.direction == dir_56_none &&
		drawn_room == 1 &&
		leveldoor_open != 0 &&
		(Kid.curr_col == 2 || Kid.curr_col == 3)
	) {
		get_tile(drawn_room, 5, 1);
		if (curr_tile2 == tiles_21_skeleton) {
			// erase skeleton
			curr_room_tiles[curr_tilepos] = tiles_1_floor;
			redraw_height = 24;
			set_redraw_full(curr_tilepos, 1);
			set_wipe(curr_tilepos, 1);
			++curr_tilepos;
			set_redraw_full(curr_tilepos, 1);
			set_wipe(curr_tilepos, 1);
			Char.room = drawn_room;
			Char.curr_row = 1;
			Char.y = y_land[Char.curr_row + 1];
			Char.curr_col = 5;
			Char.x = x_bump[Char.curr_col + 5] + 14;
			Char.direction = dir_FF_left;
			seqtbl_offset_char(seq_88_skel_wake_up); // skel wake up
			play_seq();
			play_sound(sound_44_skel_alive); // skel alive
			guard_skill = 2;
			Char.alive = -1;
			guardhp_max = guardhp_curr = 3;
			Char.fall_x = Char.fall_y = 0;
			is_guard_notice = guard_refrac = 0;
			Char.sword = sword_2_drawn;
			Char.charid = charid_4_skeleton;
			saveshad();
		}
	}
}
示例#14
0
文件: seg002.c 项目: mfn/SDLPoP
// seg002:0112
void __pascal far enter_guard() {
	word room_minus_1;
	word guard_tile;
	word frame;
	byte seq_hi;
	// arrays are indexed 0..23 instead of 1..24
	room_minus_1 = drawn_room - 1;
	frame = Char.frame; // hm?
	guard_tile = level.guards_tile[room_minus_1];

	if (guard_tile >= 30) return;

	Char.room = drawn_room;
	Char.curr_row = guard_tile / 10;
	Char.y = y_land[Char.curr_row + 1];
	Char.x = level.guards_x[room_minus_1];
	Char.curr_col = get_tile_div_mod_m7(Char.x);
	Char.direction = level.guards_dir[room_minus_1];
	// only regular guards have different colors (and only on VGA)
	if (graphics_mode == gmMcgaVga && tbl_guard_type[current_level] == 0) {
		curr_guard_color = level.guards_color[room_minus_1];
	} else {
		curr_guard_color = 0;
	}

	#ifdef REMEMBER_GUARD_HP
	int remembered_hp = (curr_guard_color & 0xF0) >> 4;
    #endif
	curr_guard_color &= 0x0F; // added; only least significant 4 bits are used for guard color

	// level 3 has skeletons with infinite lives
	if (current_level == 3) {
		Char.charid = charid_4_skeleton;
	} else {
		Char.charid = charid_2_guard;
	}
	seq_hi = level.guards_seq_hi[room_minus_1];
	if (seq_hi == 0) {
		if (Char.charid == charid_4_skeleton) {
			Char.sword = sword_2_drawn;
			seqtbl_offset_char(seq_63_guard_stand_active); // stand active (when entering room) (skeleton)
		} else {
			Char.sword = sword_0_sheathed;
			seqtbl_offset_char(seq_77_guard_stand_inactive); // stand inactive (when entering room)
		}
	} else {
		Char.curr_seq = level.guards_seq_lo[room_minus_1] + (seq_hi << 8);
	}
    play_seq();
	guard_skill = level.guards_skill[room_minus_1];
	if (guard_skill >= 12) {
		guard_skill = 3;
	}
	frame = Char.frame;
	if (frame == frame_185_dead || frame == frame_177_spiked || frame == frame_178_chomped) {
		Char.alive = 1;
		draw_guard_hp(0, guardhp_curr);
		guardhp_curr = 0;
	} else {
		Char.alive = -1;
		justblocked = 0;
		guard_refrac = 0;
		is_guard_notice = 0;
		get_guard_hp();
		#ifdef REMEMBER_GUARD_HP
		if (options.enable_remember_guard_hp && remembered_hp > 0)
			guardhp_delta = guardhp_curr = (word) remembered_hp;
		#endif
	}
	Char.fall_y = 0;
	Char.fall_x = 0;
	Char.action = actions_1_run_jump;
	saveshad();
}
示例#15
0
文件: seg001.c 项目: ecalot/SDLPoP
// seg001:01E0
void __pascal far seqtbl_offset_shad_char(int seq_index) {
	loadshad();
	seqtbl_offset_char(seq_index);
	saveshad();
}