예제 #1
0
파일: ug05.cpp 프로젝트: AReim1982/scummvm
bool SceneScriptUG05::ClickedOnExit(int exitId) {
	if (exitId == 0) {
		if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
			Loop_Actor_Walk_To_XYZ(kActorMcCoy, -356.35f, 132.77f, -1092.36f, 0, 0, false, 0);
			Game_Flag_Set(361);
			Set_Enter(43, 40);
		} else if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -156.72f, 3.03f, -1118.17f, 0, 1, false, 0)) {
			Actor_Face_Heading(kActorMcCoy, 760, false);
			Loop_Actor_Travel_Stairs(kActorMcCoy, 3, 1, 0);
			Game_Flag_Set(361);
			Set_Enter(43, 40);
		}
		return true;
	}
	if (exitId == 1) {
		if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 4.0f, -11.67f, -4.0f, 0, 1, false, 0)) {
			Game_Flag_Set(339);
			Set_Enter(77, 89);
		}
		return true;
	}
	if (exitId == 2) {
		if (!Game_Flag_Query(662)) {
			if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.37f, -1500.0f, 0, 1, false, 0)) {
				if (!Game_Flag_Query(522)) {
					Actor_Voice_Over(2600, kActorVoiceOver);
					Actor_Voice_Over(2610, kActorVoiceOver);
					Game_Flag_Set(522);
				}
				return true;
			}
		} else {
			int v1 = sub_4021B0();
			bool v2;
			if (v1 == -1) {
				v2 = Loop_Actor_Walk_To_XYZ(kActorMcCoy, 0.0f, -1.37f, -1500.0f, 0, 1, false, 0) != 0;
			} else {
				v2 = Loop_Actor_Walk_To_Actor(kActorMcCoy, v1, 30, 1, false) != 0;
			}
			if (!v2) {
				sub_402218();
				return true;
			}
		}
	}
	return false;
}
예제 #2
0
파일: ug05.cpp 프로젝트: AReim1982/scummvm
void SceneScriptUG05::PlayerWalkedIn() {
	if (Game_Flag_Query(663)) {
		if (Game_Flag_Query(368)) {
			Music_Stop(2);
			Actor_Put_In_Set(kActorOfficerGrayford, 78);
			Actor_Set_At_XYZ(kActorOfficerGrayford, 4.22f, -1.37f, -925.0f, 750);
			Actor_Set_Goal_Number(kActorOfficerGrayford, 599);
			Actor_Retired_Here(kActorOfficerGrayford, 70, 36, 1, -1);
			int v0 = sub_4021B0();
			if (v0 == kActorDektora) {
				Actor_Put_In_Set(kActorDektora, 78);
				Actor_Set_At_XYZ(kActorDektora, -100.0f, -10.31f, -906.0f, 866);
				Actor_Force_Stop_Walking(kActorDektora);
			} else if (v0 == kActorLucy){
				Actor_Put_In_Set(kActorLucy, 78);
				Actor_Set_At_XYZ(kActorLucy, -100.0f, -10.31f, -906.0f, 866);
				Actor_Force_Stop_Walking(kActorLucy);
			}
		} else {
			if (!Actor_Query_In_Set(kActorOfficerLeary, 78)) {
				Actor_Put_In_Set(kActorOfficerLeary, 78);
				Actor_Set_At_XYZ(kActorOfficerLeary, 0.0f, -1.37f, -1400.0f, 768);
			}
			if (!Actor_Query_In_Set(kActorOfficerGrayford, 78)) {
				ADQ_Flush();
				ADQ_Add(kActorOfficerGrayford, 280, 3);
				Actor_Put_In_Set(kActorOfficerGrayford, 78);
				Actor_Set_At_XYZ(kActorOfficerGrayford, -16.0f, -1.37f, -960.0f, 768);
			}
		}
	}
	if (Game_Flag_Query(360)) {
		if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
			Loop_Actor_Walk_To_XYZ(kActorMcCoy, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0);
		} else {
			Loop_Actor_Travel_Stairs(kActorMcCoy, 2, 0, 0);
		}
	}
	if (Game_Flag_Query(663)) {
		Game_Flag_Query(368);
	}
	Game_Flag_Reset(360);
}
예제 #3
0
파일: ug05.cpp 프로젝트: 86400/scummvm
void ScriptUG05::PlayerWalkedIn() {
    if (Game_Flag_Query(663)) {
        if (Game_Flag_Query(368)) {
            Music_Stop(2);
            Actor_Put_In_Set(24, 78);
            Actor_Set_At_XYZ(24, 4.22f, -1.37f, -925.0f, 750);
            Actor_Set_Goal_Number(24, 599);
            Actor_Retired_Here(24, 70, 36, 1, -1);
            int v0 = sub_4021B0();
            if (v0 == 3) {
                Actor_Put_In_Set(3, 78);
                Actor_Set_At_XYZ(3, -100.0f, -10.31f, -906.0f, 866);
                Actor_Force_Stop_Walking(3);
            } else if (v0 == 6) {
                Actor_Put_In_Set(6, 78);
                Actor_Set_At_XYZ(6, -100.0f, -10.31f, -906.0f, 866);
                Actor_Force_Stop_Walking(6);
            }
        } else {
            if (!Actor_Query_In_Set(23, 78)) {
                Actor_Put_In_Set(23, 78);
                Actor_Set_At_XYZ(23, 0.0f, -1.37f, -1400.0f, 768);
            }
            if (!Actor_Query_In_Set(24, 78)) {
                ADQ_Flush();
                ADQ_Add(24, 280, 3);
                Actor_Put_In_Set(24, 78);
                Actor_Set_At_XYZ(24, -16.0f, -1.37f, -960.0f, 768);
            }
        }
    }
    if (Game_Flag_Query(360)) {
        if (Game_Flag_Query(663) && !Game_Flag_Query(368)) {
            Loop_Actor_Walk_To_XYZ(0, -288.35f, 132.77f, -1092.36f, 0, 1, false, 0);
        } else {
            Loop_Actor_Travel_Stairs(0, 2, 0, 0);
        }
    }
    if (Game_Flag_Query(663)) {
        Game_Flag_Query(368);
    }
    Game_Flag_Reset(360);
}
예제 #4
0
파일: ug05.cpp 프로젝트: AReim1982/scummvm
void SceneScriptUG05::sub_402218() {
	int v0 = sub_4021B0();
	if (v0 != -1) {
		Actor_Face_Actor(kActorMcCoy, v0, true);
		Actor_Face_Actor(v0, kActorMcCoy, true);
		Actor_Says(kActorMcCoy, 5535, 13);
		if (v0 == 3) {
			Actor_Says(kActorDektora, 1110, 15);
		} else {
			Actor_Says(kActorLucy, 670, 17);
		}
	}
	Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
	Ambient_Sounds_Remove_All_Looping_Sounds(1);
	if (v0 == kActorLucy) {
		if (Game_Flag_Query(46)) {
			if (Global_Variable_Query(48) > 3) {
				Outtake_Play(13, 0, -1);
			} else {
				Outtake_Play(14, 0, -1);
			}
		} else {
			Outtake_Play(12, 0, -1);
		}
	} else if (v0 == kActorDektora) {
		if (Game_Flag_Query(47)) {
			if (Global_Variable_Query(48) > 3) {
				Outtake_Play(16, 0, -1);
			} else {
				Outtake_Play(17, 0, -1);
			}
		} else {
			Outtake_Play(15, 0, -1);
		}
	} else {
		Outtake_Play(19, 0, -1);
	}
	Outtake_Play(18, 0, -1);
	Game_Over();
}
예제 #5
0
파일: ug05.cpp 프로젝트: AReim1982/scummvm
bool SceneScriptUG05::ClickedOnActor(int actorId) {
	if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, actorId, 30, 1, false)) {
		Actor_Face_Actor(kActorMcCoy, actorId, true);
		int v1 = sub_4021B0();
		if (actorId == kActorOfficerGrayford && Game_Flag_Query(368) && !Game_Flag_Query(683)) {
			Actor_Says(kActorOfficerGrayford, 220, -1);
			Actor_Says(kActorMcCoy, 5540, 14);
			Actor_Says(kActorOfficerGrayford, 230, -1);
			Actor_Says(kActorMcCoy, 5545, 17);
			Actor_Says(kActorOfficerGrayford, 240, -1);
			Actor_Says(kActorMcCoy, 5550, 3);
			Game_Flag_Set(683);
			return false;
		}
		if (actorId == v1) {
			sub_402218();
			return true;
		}
		return false;
	}
	return false;
}