Beispiel #1
0
// 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();
}
Beispiel #2
0
// seg001:00E6
void __pascal far draw_proom_drects() {
	draw_princess_room_bg();
#ifdef USE_FADE
	if (!is_global_fading) {
#endif
	while (drects_count--) {
		copy_screen_rect(&drects[drects_count]);
	}
#ifdef USE_FADE
	}
#endif
	drects_count = 0;
	if (cutscene_wait_frames & 1) {
		draw_star(prandom(N_STARS - 1), 1);
	}
}
Beispiel #3
0
// seg000:09B6
void __pascal far draw_game_frame() {
	short var_2;
	if (need_full_redraw) {
		redraw_screen(0);
		need_full_redraw = 0;
	} else {
		if (different_room) {
			drawn_room = next_room;
			if (tbl_level_type[current_level]) {
				gen_palace_wall_colors();
			}
			redraw_screen(1);
		} else {
			if (need_redraw_because_flipped) {
				need_redraw_because_flipped = 0;
				redraw_screen(0);
			} else {
				memset_near(&table_counts, 0, sizeof(table_counts));
				draw_moving();
				draw_tables();
				if (is_blind_mode) {
					draw_rect(&rect_top, 0);
				}
				if (upside_down) {
					flip_screen(offscreen_surface);
				}
				while (drects_count--) {
					copy_screen_rect(&drects[drects_count]);
				}
				if (upside_down) {
					flip_screen(offscreen_surface);
				}
				drects_count = 0;
			}
		}
	}

	play_next_sound();
	// Note: texts are identified by their total time!
	if (text_time_remaining == 1) {
		// If the text's is about to expire:
		if (text_time_total == 36 || text_time_total == 288) {
			// 36: died on demo/potions level
			// 288: press button to continue
			// In this case, restart the game.
			start_level = 0;
			need_quotes = 1;
			start_game();
		} else {
			// Otherwise, just clear it.
			erase_bottom_text(1);
		}
	} else {
		if (text_time_remaining != 0 && text_time_total != 1188) {
			// 1188: potions level (page/line/word) -- this one does not disappear
			--text_time_remaining;
			if (text_time_total == 288 && text_time_remaining < 72) {
				// 288: press button to continue
				// Blink the message:
				var_2 = text_time_remaining % 12;
				if (var_2 > 3) {
					erase_bottom_text(0);
				} else {
					if (var_2 == 3) {
						display_text_bottom("Press Button to Continue");
						play_sound_from_buffer(sound_pointers[sound_38_blink]); // press button blink
					}
				}
			}
		}
	}
}