mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-04 08:28:41 +00:00
133 lines
3.7 KiB
C++
133 lines
3.7 KiB
C++
/* 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 ScriptBB11::InitializeScene() {
|
|
Setup_Scene_Information(43.39f, -10.27f, -20.52f, 200);
|
|
if (!Game_Flag_Query(509)) {
|
|
Scene_Exit_Add_2D_Exit(0, 280, 154, 388, 247, 2);
|
|
}
|
|
Ambient_Sounds_Add_Looping_Sound(101, 90, 0, 1);
|
|
Ambient_Sounds_Add_Looping_Sound(99, 45, 0, 1);
|
|
Ambient_Sounds_Add_Looping_Sound(100, 76, 0, 1);
|
|
Ambient_Sounds_Add_Sound(68, 5, 180, 16, 25, 0, 0, -101, -101, 0, 0);
|
|
Ambient_Sounds_Add_Sound(69, 5, 180, 16, 25, 0, 0, -101, -101, 0, 0);
|
|
Ambient_Sounds_Add_Sound(375, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
|
|
Ambient_Sounds_Add_Sound(376, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
|
|
Ambient_Sounds_Add_Sound(377, 5, 180, 50, 100, 0, 0, -101, -101, 0, 0);
|
|
if (Game_Flag_Query(509)) {
|
|
Preload(19);
|
|
Preload(220);
|
|
Preload(227);
|
|
Preload(328);
|
|
Preload(343);
|
|
Preload(344);
|
|
Preload(17);
|
|
Preload(14);
|
|
Preload(324);
|
|
Preload(323);
|
|
Preload(18);
|
|
Preload(345);
|
|
}
|
|
}
|
|
|
|
void ScriptBB11::SceneLoaded() {
|
|
Obstacle_Object("X2AIRCON01", true);
|
|
Unclickable_Object("X2AIRCON01");
|
|
if (Game_Flag_Query(509)) {
|
|
Unobstacle_Object("X2PIPES01", true);
|
|
Unobstacle_Object("X2PIPES02", true);
|
|
Unobstacle_Object("X2PIPES03", true);
|
|
Unobstacle_Object("X2_VENTS05", true);
|
|
Unobstacle_Object("X2_VENTSCYL05", true);
|
|
}
|
|
}
|
|
|
|
bool ScriptBB11::MouseClick(int x, int y) {
|
|
return false;
|
|
}
|
|
|
|
bool ScriptBB11::ClickedOn3DObject(const char *objectName, bool a2) {
|
|
return false;
|
|
}
|
|
|
|
bool ScriptBB11::ClickedOnActor(int actorId) {
|
|
return false;
|
|
}
|
|
|
|
bool ScriptBB11::ClickedOnItem(int itemId, bool a2) {
|
|
return false;
|
|
}
|
|
|
|
bool ScriptBB11::ClickedOnExit(int exitId) {
|
|
if (exitId == 0) {
|
|
if (!Loop_Actor_Walk_To_XYZ(0, 43.39f, -10.27f, -68.52f, 0, 1, false, 0)) {
|
|
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
|
|
Ambient_Sounds_Remove_All_Looping_Sounds(1);
|
|
Game_Flag_Set(223);
|
|
Set_Enter(25, 11);
|
|
}
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
bool ScriptBB11::ClickedOn2DRegion(int region) {
|
|
return false;
|
|
}
|
|
|
|
void ScriptBB11::SceneFrameAdvanced(int frame) {
|
|
if (Actor_Query_Goal_Number(8) == 105 && !Game_Flag_Query(375)) {
|
|
Actor_Change_Animation_Mode(0, 48);
|
|
Game_Flag_Set(375);
|
|
} else {
|
|
if (frame == 1) {
|
|
Sound_Play(74, 10, -100, 100, 50);
|
|
}
|
|
}
|
|
}
|
|
|
|
void ScriptBB11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
|
|
}
|
|
|
|
void ScriptBB11::PlayerWalkedIn() {
|
|
if (Actor_Query_Goal_Number(8) == 102 && Global_Variable_Query(1) == 2) {
|
|
Actor_Set_Invisible(0, true);
|
|
Actor_Set_Goal_Number(8, 103);
|
|
Music_Play(11, 61, 0, 1, -1, 0, 0);
|
|
Player_Loses_Control();
|
|
}
|
|
}
|
|
|
|
void ScriptBB11::PlayerWalkedOut() {
|
|
Ambient_Sounds_Remove_All_Non_Looping_Sounds(1);
|
|
Ambient_Sounds_Remove_All_Looping_Sounds(1);
|
|
}
|
|
|
|
void ScriptBB11::DialogueQueueFlushed(int a1) {
|
|
}
|
|
|
|
} // End of namespace BladeRunner
|