2016-09-10 18:33:04 +02:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-02-10 20:34:28 +01:00
|
|
|
#include "bladerunner/script/scene_script.h"
|
2016-09-10 18:33:04 +02:00
|
|
|
|
|
|
|
namespace BladeRunner {
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
void SceneScriptPS06::InitializeScene() {
|
2016-09-10 18:33:04 +02:00
|
|
|
Setup_Scene_Information(11257.26f, 707.3f, -4778.31f, 120);
|
2019-01-27 14:07:54 +01:00
|
|
|
|
2016-09-10 18:33:04 +02:00
|
|
|
Scene_Exit_Add_2D_Exit(0, 610, 0, 639, 479, 1);
|
|
|
|
|
2019-01-27 14:07:54 +01:00
|
|
|
Ambient_Sounds_Remove_All_Non_Looping_Sounds(false);
|
|
|
|
Ambient_Sounds_Add_Looping_Sound(388, 50, 1, 1);
|
2016-09-10 18:33:04 +02:00
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
void SceneScriptPS06::SceneLoaded() {
|
2016-09-10 18:33:04 +02:00
|
|
|
Obstacle_Object("E.SCREEN02", true);
|
|
|
|
Clickable_Object("E.SCREEN02");
|
|
|
|
Clickable_Object("E.MONITOR1");
|
|
|
|
Clickable_Object("E.SCREEN03");
|
|
|
|
Clickable_Object("E.MONITOR3");
|
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
bool SceneScriptPS06::MouseClick(int x, int y) {
|
2016-09-10 18:33:04 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
bool SceneScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) {
|
2016-09-10 18:33:04 +02:00
|
|
|
if (Object_Query_Click("E.MONITOR1", objectName)) {
|
|
|
|
ESPER_Flag_To_Activate();
|
|
|
|
return true;
|
|
|
|
}
|
2019-01-27 14:07:54 +01:00
|
|
|
if (Object_Query_Click("E.SCREEN03", objectName)
|
|
|
|
|| Object_Query_Click("E.MONITOR3", objectName)
|
|
|
|
) {
|
2017-03-29 01:50:47 +02:00
|
|
|
Actor_Says(kActorAnsweringMachine, 330, 3);
|
2019-01-27 14:07:54 +01:00
|
|
|
if (Actor_Clue_Query(kActorMcCoy, kClueCar)
|
|
|
|
&& !Actor_Clue_Query(kActorMcCoy, kClueCarRegistration1)
|
|
|
|
&& !Actor_Clue_Query(kActorMcCoy, kClueCarRegistration2)
|
|
|
|
&& !Actor_Clue_Query(kActorMcCoy, kClueCarRegistration3)
|
|
|
|
) {
|
2016-09-10 18:33:04 +02:00
|
|
|
Delay(2000);
|
2017-03-29 01:50:47 +02:00
|
|
|
Actor_Voice_Over(3780, kActorVoiceOver);
|
|
|
|
Actor_Voice_Over(3790, kActorVoiceOver);
|
2018-02-10 20:34:28 +01:00
|
|
|
if (Game_Flag_Query(kFlagDektoraIsReplicant)) {
|
2017-03-29 01:50:47 +02:00
|
|
|
Actor_Voice_Over(3800, kActorVoiceOver);
|
|
|
|
Actor_Voice_Over(3810, kActorVoiceOver);
|
|
|
|
Actor_Voice_Over(3820, kActorVoiceOver);
|
|
|
|
Actor_Voice_Over(3830, kActorVoiceOver);
|
2019-01-19 23:12:45 +01:00
|
|
|
Actor_Clue_Acquire(kActorMcCoy, kClueCarRegistration1, true, -1);
|
2018-02-10 20:34:28 +01:00
|
|
|
} else if (Game_Flag_Query(kFlagGordoIsReplicant)) {
|
2017-03-29 01:50:47 +02:00
|
|
|
Actor_Voice_Over(3840, kActorVoiceOver);
|
|
|
|
Actor_Voice_Over(3850, kActorVoiceOver);
|
|
|
|
Actor_Voice_Over(3860, kActorVoiceOver);
|
|
|
|
Actor_Voice_Over(3870, kActorVoiceOver);
|
2019-01-19 23:12:45 +01:00
|
|
|
Actor_Clue_Acquire(kActorMcCoy, kClueCarRegistration2, true, -1);
|
2016-09-10 18:33:04 +02:00
|
|
|
} else {
|
2017-03-29 01:50:47 +02:00
|
|
|
Actor_Voice_Over(3880, kActorVoiceOver);
|
|
|
|
Actor_Voice_Over(3890, kActorVoiceOver);
|
|
|
|
Actor_Voice_Over(3900, kActorVoiceOver);
|
|
|
|
Actor_Voice_Over(3910, kActorVoiceOver);
|
2019-01-19 23:12:45 +01:00
|
|
|
Actor_Clue_Acquire(kActorMcCoy, kClueCarRegistration3, true, -1);
|
2016-09-10 18:33:04 +02:00
|
|
|
}
|
2017-03-29 01:50:47 +02:00
|
|
|
Actor_Clues_Transfer_New_To_Mainframe(kActorMcCoy);
|
|
|
|
Actor_Clues_Transfer_New_From_Mainframe(kActorMcCoy);
|
2016-09-10 18:33:04 +02:00
|
|
|
return true;
|
2019-01-27 14:07:54 +01:00
|
|
|
} else {
|
|
|
|
Actor_Clues_Transfer_New_To_Mainframe(kActorMcCoy);
|
2019-04-05 21:33:47 +03:00
|
|
|
Ambient_Sounds_Play_Sound(kSfxDATALOAD, 50, 0, 0, 99);
|
2019-01-27 14:07:54 +01:00
|
|
|
Delay(2000);
|
|
|
|
Actor_Says(kActorAnsweringMachine, 340, kAnimationModeTalk);
|
|
|
|
Actor_Clues_Transfer_New_From_Mainframe(kActorMcCoy);
|
2019-04-05 21:33:47 +03:00
|
|
|
Ambient_Sounds_Play_Sound(kSfxDATALOAD, 50, 0, 0, 99);
|
2019-01-27 14:07:54 +01:00
|
|
|
Delay(2000);
|
2019-04-05 21:33:47 +03:00
|
|
|
Ambient_Sounds_Play_Sound(kSfxBEEPNEAT, 80, 0, 0, 99);
|
2019-01-27 14:07:54 +01:00
|
|
|
Actor_Says(kActorAnsweringMachine, 350, kAnimationModeTalk);
|
|
|
|
return true;
|
2016-09-10 18:33:04 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
bool SceneScriptPS06::ClickedOnActor(int actorId) {
|
2016-09-10 18:33:04 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
bool SceneScriptPS06::ClickedOnItem(int itemId, bool a2) {
|
2016-09-10 18:33:04 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
bool SceneScriptPS06::ClickedOnExit(int exitId) {
|
2016-09-10 18:33:04 +02:00
|
|
|
if (exitId == 0) {
|
2018-03-07 22:27:28 +01:00
|
|
|
Game_Flag_Set(kFlagPS06toPS05);
|
2019-01-21 21:57:44 +01:00
|
|
|
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
|
2016-09-10 18:33:04 +02:00
|
|
|
Ambient_Sounds_Remove_All_Looping_Sounds(1);
|
2018-03-07 22:27:28 +01:00
|
|
|
Set_Enter(kSetPS05, kScenePS05);
|
2016-09-10 18:33:04 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
bool SceneScriptPS06::ClickedOn2DRegion(int region) {
|
2016-09-10 18:33:04 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
void SceneScriptPS06::SceneFrameAdvanced(int frame) {
|
2016-09-10 18:33:04 +02:00
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
void SceneScriptPS06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
|
2016-09-10 18:33:04 +02:00
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
void SceneScriptPS06::PlayerWalkedIn() {
|
2018-03-07 22:27:28 +01:00
|
|
|
if (Game_Flag_Query(kFlagPS05toPS06)) {
|
|
|
|
Game_Flag_Reset(kFlagPS05toPS06);
|
2016-09-10 18:33:04 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
void SceneScriptPS06::PlayerWalkedOut() {
|
2016-09-10 18:33:04 +02:00
|
|
|
}
|
|
|
|
|
2017-03-23 16:20:10 +01:00
|
|
|
void SceneScriptPS06::DialogueQueueFlushed(int a1) {
|
2016-09-10 18:33:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
} // End of namespace BladeRunner
|