Beispiel #1
0
void SceneScriptNR04::sub_402860(int frame) {
	float colorMap[] = {
		1.0f, 1.0f, 1.0f,
		1.0f, 0.0f, 0.0f,
		0.8f, 0.4f, 0.0f,
		0.7f, 0.7f, 0.0f,
		0.0f, 1.0f, 0.0f,
		0.0f, 0.0f, 1.0f,
		0.5f, 0.0f, 0.8f};

	float v3 = (frame - 60) * 0.1f;
	float v4 = (frame % 10) * 0.1f;
	float coef = 1.0f;
	if (frame > 100) {
		coef = 1.0f - (frame - 100) / 20.0f;
	}
	int index = 3 * v3;
	int nextIndex = 3 * v3 + 3;
	float r = ((colorMap[nextIndex + 0] - colorMap[index + 0]) * v4 + colorMap[index + 0]) * coef;
	float g = ((colorMap[nextIndex + 1] - colorMap[index + 1]) * v4 + colorMap[index + 1]) * coef;
	float b = ((colorMap[nextIndex + 2] - colorMap[index + 2]) * v4 + colorMap[index + 2]) * coef;
	Set_Fade_Color(r, g, b);
	if (frame >= 90) {
		Set_Fade_Density(0.75f);
	} else {
		Set_Fade_Density((frame - 60) / 45.0f);
	}
}
Beispiel #2
0
void ScriptMA04::SceneFrameAdvanced(int frame) {
	Set_Fade_Color(0, 0, 0);
	if (frame >= 91 && frame < 121) {
		Set_Fade_Density((frame - 91) / 30.0f);
	} else if (frame >= 121 && frame < 151) {
		Set_Fade_Density((151 - frame) / 30.0f);
	} else {
		Set_Fade_Density(0.0f);
	}
	if (frame == 121 && (Game_Flag_Query(40) == 1 || Game_Flag_Query(41) == 1) && !Game_Flag_Query(159)) {
		Sound_Play(403, 50, 0, 0, 50);
	}
}
Beispiel #3
0
void SceneScriptNR04::SceneFrameAdvanced(int frame) {
	if (frame == 1 && !Music_Is_Playing()) {
		sub_402960();
	}
	if (frame > 60 && frame < 120) {
		sub_402860(frame);
	} else if (frame == 120) {
		Set_Fade_Color(1.0f, 1.0f, 1.0f);
		Set_Fade_Density(0.0f);
	}
	//return false;
}
Beispiel #4
0
void ScriptNR08::SceneFrameAdvanced(int frame) {
	if (!Music_Is_Playing()) {
		sub_4021B4();
	}
	Set_Fade_Color(0, 0, 0);
	if (frame >= 76 && frame < 91) {
		Set_Fade_Density((frame - 76) / 14.0f);
		Music_Stop(3);
		Ambient_Sounds_Play_Sound(566, 27, 0, 99, 0);
	} else if (frame >= 91 && frame < 120) {
		Actor_Set_Invisible(0, true);
		Set_Fade_Density(1.0f);
	} else if (frame >= 120 && frame < 135) {
		Set_Fade_Density((134 - frame) / 14.0f);
		Music_Play(7, 61, 0, 1, -1, 0, 0);
	} else {
		Actor_Set_Invisible(0, false);
		Set_Fade_Density(0.0f);
	}
	if (Game_Flag_Query(651) && !Game_Flag_Query(636)) {
		Game_Flag_Set(636);
		Scene_Exits_Disable();
		Scene_Loop_Set_Default(1);
		Scene_Loop_Start_Special(2, 3, 1);
	}
	if (frame == 95) {
		Actor_Put_In_Set(3, 91);
		Actor_Set_At_Waypoint(3, 33, 0);
		Actor_Change_Animation_Mode(3, 0);
		Actor_Set_Goal_Number(3, 200);
		Scene_Exit_Add_2D_Exit(1, 0, 309, 30, 398, 3);
		Scene_Exit_Add_2D_Exit(2, 520, 330, 556, 386, 0);
	}
	if (frame == 130) {
		Scene_Exits_Enable();
	}
	//return false;
}