diff options
Diffstat (limited to 'engines/bladerunner/script/dr02.cpp')
-rw-r--r-- | engines/bladerunner/script/dr02.cpp | 183 |
1 files changed, 183 insertions, 0 deletions
diff --git a/engines/bladerunner/script/dr02.cpp b/engines/bladerunner/script/dr02.cpp new file mode 100644 index 0000000000..c075d808f5 --- /dev/null +++ b/engines/bladerunner/script/dr02.cpp @@ -0,0 +1,183 @@ +/* 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. + * + */ + +#include "bladerunner/script/script.h" + +namespace BladeRunner { + +void ScriptDR02::InitializeScene() { + if (Game_Flag_Query(227)) { + Setup_Scene_Information(-1162.0f, 7.18f, -322.0f, 552); + } else if (Game_Flag_Query(224)) { + Setup_Scene_Information(-835.0f, -0.04f, -118.0f, 193); + } else if (Game_Flag_Query(264)) { + Setup_Scene_Information(-1258.0f, 7.18f, -314.0f, 400); + } else { + Setup_Scene_Information(168.78f, 0.16f, -775.71997f, 193); + } + Scene_Exit_Add_2D_Exit(0, 605, 0, 639, 479, 1); + Scene_Exit_Add_2D_Exit(1, 222, 176, 279, 314, 0); + if (Game_Flag_Query(326)) { + Scene_Exit_Add_2D_Exit(2, 95, 0, 148, 292, 0); + } + Ambient_Sounds_Remove_All_Non_Looping_Sounds(0); + Ambient_Sounds_Remove_All_Looping_Sounds(0); + Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1); + Ambient_Sounds_Add_Looping_Sound(219, 27, 85, 1); + Ambient_Sounds_Add_Looping_Sound(98, 38, 85, 1); + Ambient_Sounds_Add_Sound(378, 2, 50, 33, 100, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(379, 2, 50, 33, 100, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(380, 2, 50, 33, 100, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(67, 5, 100, 16, 25, -100, 100, -101, -101, 0, 0); + Ambient_Sounds_Add_Sound(66, 5, 100, 16, 25, -100, 100, -101, -101, 0, 0); + if (Game_Flag_Query(224)) { + Scene_Loop_Start_Special(0, 0, 0); + Scene_Loop_Set_Default(1); + } else { + Scene_Loop_Set_Default(1); + } +} + +void ScriptDR02::SceneLoaded() { + Obstacle_Object("TRASH CAN WITH FIRE", true); + Obstacle_Object("V2PYLON02", true); + Obstacle_Object("V2PYLON04", true); + Obstacle_Object("U2 CHEWDOOR", true); + Obstacle_Object("MMTRASHCAN", true); + Obstacle_Object("PARKMETR02", true); + Obstacle_Object("TRANSFORMER 01", true); + Obstacle_Object("TRANSFORMER 02", true); + Obstacle_Object("PARKMETR01", true); + Obstacle_Object("Z2ENTRYDR", true); + Obstacle_Object("Z2DR2", true); + Clickable_Object("TRASH CAN WITH FIRE"); + Clickable_Object("U2 CHEWDOOR"); + Clickable_Object("MMTRASHCAN"); + Clickable_Object("U2 EYE"); + Clickable_Object("U2 E"); + Clickable_Object("MMNEWSP01"); + Clickable_Object("MMNEWSP01"); + Clickable_Object("MMNEWSP04"); + Clickable_Object("MMNEWSP05"); + Clickable_Object("MMNEWSP07"); + Clickable_Object("PARKMETR02"); + Clickable_Object("TRANSFORMER 01"); + Clickable_Object("TRANSFORMER 02"); + Clickable_Object("V2CANPIPE02"); + Unclickable_Object("TRASH CAN WITH FIRE"); + Unclickable_Object("U2 CHEWDOOR"); + Unclickable_Object("MMTRASHCAN"); + Unclickable_Object("U2 EYE"); + Unclickable_Object("U2 E"); + Unclickable_Object("MMNEWSP01"); + Unclickable_Object("MMNEWSP02"); + Unclickable_Object("MMNEWSP04"); + Unclickable_Object("MMNEWSP06"); + Unclickable_Object("MMNEWSP07"); + Unclickable_Object("PARKMETR02"); + Unclickable_Object("TRANSFORMER 01"); + Unclickable_Object("TRANSFORMER 02"); + Unclickable_Object("V2CANPIPE02"); +} + +bool ScriptDR02::MouseClick(int x, int y) { + return false; +} + +bool ScriptDR02::ClickedOn3DObject(const char *objectName, bool a2) { + return false; +} + +bool ScriptDR02::ClickedOnActor(int actorId) { + return false; +} + +bool ScriptDR02::ClickedOnItem(int itemId, bool a2) { + return false; +} + +bool ScriptDR02::ClickedOnExit(int exitId) { + if (exitId == 0) { + if (!Loop_Actor_Walk_To_XYZ(0, -835.0f, -0.04f, -118.0f, 0, 1, false, 0)) { + Async_Actor_Walk_To_XYZ(0, -727.0f, -0.04f, -118.0f, 0, false); + Game_Flag_Set(225); + Set_Enter(7, 25); + } + Ambient_Sounds_Adjust_Looping_Sound(219, 12, -101, 1); + Ambient_Sounds_Adjust_Looping_Sound(98, 14, -101, 1); + return true; + } + if (exitId == 1) { + if (!Loop_Actor_Walk_To_XYZ(0, -1162.0f, 7.18f, -322.0f, 0, 1, false, 0)) { + if (Global_Variable_Query(1) > 2) { + Actor_Says(0, 8522, 15); + } else { + Game_Flag_Set(226); + Set_Enter(34, 27); + } + } + return true; + } + if (exitId == 2) { + if (!Loop_Actor_Walk_To_XYZ(0, -1258.0f, 7.18f, -314.0f, 0, 1, false, 0)) { + Game_Flag_Set(265); + Game_Flag_Reset(177); + Game_Flag_Set(258); + Set_Enter(20, 2); + } + return true; + } + return false; +} + +bool ScriptDR02::ClickedOn2DRegion(int region) { + return false; +} + +void ScriptDR02::SceneFrameAdvanced(int frame) { + if (frame == 1) { + Sound_Play(1, 10, 85, 85, 50); + } +} + +void ScriptDR02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +} + +void ScriptDR02::PlayerWalkedIn() { + if (Game_Flag_Query(227)) { + Game_Flag_Reset(227); + } + if (Game_Flag_Query(224)) { + Game_Flag_Reset(224); + } + if (Game_Flag_Query(264)) { + Game_Flag_Reset(264); + } +} + +void ScriptDR02::PlayerWalkedOut() { +} + +void ScriptDR02::DialogueQueueFlushed(int a1) { +} + +} // End of namespace BladeRunner |