diff options
author | Thomas Fach-Pedersen | 2015-02-07 11:41:52 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-29 22:33:38 +0200 |
commit | b83daefd0840e909ebc34c2e0490a897ac95748d (patch) | |
tree | 3fbe0f4e71584a1e123f75497cd4b99b79f87d74 /engines/bladerunner | |
parent | abf98fca036025fac269f9b03cdb318b921ce804 (diff) | |
download | scummvm-rg350-b83daefd0840e909ebc34c2e0490a897ac95748d.tar.gz scummvm-rg350-b83daefd0840e909ebc34c2e0490a897ac95748d.tar.bz2 scummvm-rg350-b83daefd0840e909ebc34c2e0490a897ac95748d.zip |
BLADERUNNER: Stub out init script
Diffstat (limited to 'engines/bladerunner')
-rw-r--r-- | engines/bladerunner/bladerunner.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/module.mk | 1 | ||||
-rw-r--r-- | engines/bladerunner/script/init.cpp | 127 | ||||
-rw-r--r-- | engines/bladerunner/script/init.h | 62 | ||||
-rw-r--r-- | engines/bladerunner/script/script.cpp | 213 | ||||
-rw-r--r-- | engines/bladerunner/script/script.h | 260 |
6 files changed, 631 insertions, 36 deletions
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp index c1c65742dd..f6b0b092cd 100644 --- a/engines/bladerunner/bladerunner.cpp +++ b/engines/bladerunner/bladerunner.cpp @@ -31,6 +31,7 @@ #include "bladerunner/image.h" #include "bladerunner/outtake.h" #include "bladerunner/scene.h" +#include "bladerunner/script/init.h" #include "bladerunner/script/script.h" #include "bladerunner/settings.h" #include "bladerunner/slice_animations.h" @@ -163,6 +164,9 @@ bool BladeRunnerEngine::startup() { _zBuffer1 = new uint16[640 * 480]; _zBuffer2 = new uint16[640 * 480]; + ScriptInit initScript(this); + initScript.SCRIPT_Initialize_Game(); + initChapterAndScene(); return true; diff --git a/engines/bladerunner/module.mk b/engines/bladerunner/module.mk index 52fcf90b6a..15f28905af 100644 --- a/engines/bladerunner/module.mk +++ b/engines/bladerunner/module.mk @@ -17,6 +17,7 @@ MODULE_OBJS = \ matrix.o \ outtake.o \ scene.o \ + script/init.o \ script/rc01.o \ script/script.o \ set.o \ diff --git a/engines/bladerunner/script/init.cpp b/engines/bladerunner/script/init.cpp new file mode 100644 index 0000000000..4fe0da8666 --- /dev/null +++ b/engines/bladerunner/script/init.cpp @@ -0,0 +1,127 @@ +/* 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/init.h" + +#include "bladerunner/bladerunner.h" + +namespace BladeRunner { + +void ScriptInit::SCRIPT_Initialize_Game() { + Assign_Player_Gun_Hit_Sounds(0, 517, 518, 519); + Assign_Player_Gun_Hit_Sounds(1, 520, 521, 522); + Assign_Player_Gun_Hit_Sounds(2, 523, 524, 525); + + Assign_Player_Gun_Miss_Sounds(0, 526, 527, 528); + Assign_Player_Gun_Miss_Sounds(1, 529, 530, 531); + Assign_Player_Gun_Miss_Sounds(2, 532, 533, 534); + + Init_Globals(); + Init_Game_Flags(); + Init_Clues(); + Init_Clues2(); + Init_World_Waypoints(); + Init_SDB(); + Init_CDB(); + Init_Spinner(); + Init_Actor_Friendliness(); + Init_Combat_Aggressiveness(); + Init_Actor_Honesty(); + Init_Actor_Intelligence(); + Init_Actor_Stability(); + Init_Actor_Health(); + Init_Combat_Cover_Waypoints(); + Init_Combat_Flee_Waypoints(); + Init_Shadows(); +} + +void ScriptInit::Init_Globals() { + +} + +void ScriptInit::Init_Game_Flags() { + +} + +void ScriptInit::Init_Clues() { + +} + +void ScriptInit::Init_Clues2() { + +} + +void ScriptInit::Init_World_Waypoints() { + +} + +void ScriptInit::Init_SDB() { + +} + +void ScriptInit::Init_CDB() { + +} + +void ScriptInit::Init_Spinner() { + +} + +void ScriptInit::Init_Actor_Friendliness() { + +} + +void ScriptInit::Init_Combat_Aggressiveness() { + +} + +void ScriptInit::Init_Actor_Honesty() { + +} + +void ScriptInit::Init_Actor_Intelligence() { + +} + +void ScriptInit::Init_Actor_Stability() { + +} + +void ScriptInit::Init_Actor_Health() { + +} + +void ScriptInit::Init_Combat_Cover_Waypoints() { + +} + +void ScriptInit::Init_Combat_Flee_Waypoints() { + +} + +void ScriptInit::Init_Shadows() { + +} + + + +} // End of namespace BladeRunner diff --git a/engines/bladerunner/script/init.h b/engines/bladerunner/script/init.h new file mode 100644 index 0000000000..27c6fc09e7 --- /dev/null +++ b/engines/bladerunner/script/init.h @@ -0,0 +1,62 @@ +/* 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. + * + */ + +#ifndef BLADERUNNER_SCRIPT_INIT_H +#define BLADERUNNER_SCRIPT_INIT_H + +#include "bladerunner/script/script.h" + +namespace BladeRunner { + +class BladeRunnerEngine; + +class ScriptInit : ScriptBase { +public: + ScriptInit(BladeRunnerEngine *vm) + : ScriptBase(vm) + {} + + void SCRIPT_Initialize_Game(); + +private: + void Init_Globals(); + void Init_Game_Flags(); + void Init_Clues(); + void Init_Clues2(); + void Init_World_Waypoints(); + void Init_SDB(); + void Init_CDB(); + void Init_Spinner(); + void Init_Actor_Friendliness(); + void Init_Combat_Aggressiveness(); + void Init_Actor_Honesty(); + void Init_Actor_Intelligence(); + void Init_Actor_Stability(); + void Init_Actor_Health(); + void Init_Combat_Cover_Waypoints(); + void Init_Combat_Flee_Waypoints(); + void Init_Shadows(); +}; + +} // End of namespace BladeRunner + +#endif diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index 9aca48fcf6..5b19c0cc48 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -63,6 +63,107 @@ void Script::SceneFrameAdvanced(int frame) { _inScriptCounter--; } +// ScriptBase::Preload +// ScriptBase::Actor_Put_In_Set +// ScriptBase::Actor_Set_At_XYZ +// ScriptBase::Actor_Set_At_Waypoint +// ScriptBase::Region_Check +// ScriptBase::Object_Query_Click +// ScriptBase::Object_Do_Ground_Click +// ScriptBase::Object_Mark_For_Hot_Mouse +// ScriptBase::Actor_Face_Actor +// ScriptBase::Actor_Face_Object +// ScriptBase::Actor_Face_Item +// ScriptBase::Actor_Face_Waypoint +// ScriptBase::Actor_Face_XYZ +// ScriptBase::Actor_Face_Current_Camera +// ScriptBase::Actor_Face_Heading +// ScriptBase::Actor_Query_Friendliness_To_Other +// ScriptBase::Actor_Modify_Friendliness_To_Other +// ScriptBase::Actor_Set_Friendliness_To_Other +// ScriptBase::Actor_Set_Honesty +// ScriptBase::Actor_Set_Intelligence +// ScriptBase::Actor_Set_Stability +// ScriptBase::Actor_Set_Combat_Aggressiveness +// ScriptBase::Actor_Query_Current_HP +// ScriptBase::Actor_Query_Max_HP +// ScriptBase::Actor_Query_Combat_Aggressiveness +// ScriptBase::Actor_Query_Honesty +// ScriptBase::Actor_Query_Intelligence +// ScriptBase::Actor_Query_Stability +// ScriptBase::Actor_Modify_Current_HP +// ScriptBase::Actor_Modify_Max_HP +// ScriptBase::Actor_Modify_Combat_Aggressiveness +// ScriptBase::Actor_Modify_Honesty +// ScriptBase::Actor_Modify_Intelligence +// ScriptBase::Actor_Modify_Stability +// ScriptBase::Actor_Set_Flag_Damage_Anim_If_Moving +// ScriptBase::Actor_Query_Flag_Damage_Anim_If_Moving +// ScriptBase::Actor_Combat_AI_Hit_Attempt +// ScriptBase::Non_Player_Actor_Combat_Mode_On +// ScriptBase::Non_Player_Actor_Combat_Mode_Off +// ScriptBase::Actor_Set_Health +// ScriptBase::Actor_Set_Targetable +// ScriptBase::Actor_Says +// ScriptBase::Actor_Says_With_Pause +// ScriptBase::Actor_Voice_Over +// ScriptBase::Actor_Start_Speech_Sample +// ScriptBase::Actor_Start_Voice_Over_Sample +// ScriptBase::Actor_Query_Which_Set_In +// ScriptBase::Actor_Query_Is_In_Current_Set +// ScriptBase::Actor_Query_In_Set +// ScriptBase::Actor_Query_Inch_Distance_From_Actor +// ScriptBase::Actor_Query_Inch_Distance_From_Waypoint +// ScriptBase::Actor_Query_In_Between_Two_Actors +// ScriptBase::Actor_Set_Goal_Number +// ScriptBase::Actor_Query_Goal_Number +// ScriptBase::Actor_Query_XYZ +// ScriptBase::Actor_Query_Facing_1024 +// ScriptBase::Actor_Set_Frame_Rate_FPS +// ScriptBase::Slice_Animation_Query_Number_Of_Frames +// ScriptBase::Actor_Change_Animation_Mode +// ScriptBase::Actor_Query_Animation_Mode +// ScriptBase::Loop_Actor_Walk_To_Actor +// ScriptBase::Loop_Actor_Walk_To_Item +// ScriptBase::Loop_Actor_Walk_To_Scene_Object +// ScriptBase::Loop_Actor_Walk_To_Waypoint +// ScriptBase::Loop_Actor_Walk_To_XYZ +// ScriptBase::Async_Actor_Walk_To_Waypoint +// ScriptBase::Async_Actor_Walk_To_XYZ +// ScriptBase::Actor_Force_Stop_Walking +// ScriptBase::Loop_Actor_Travel_Stairs +// ScriptBase::Loop_Actor_Travel_Ladder +// ScriptBase::Actor_Clue_Add_To_Database +// ScriptBase::Actor_Clue_Acquire +// ScriptBase::Actor_Clue_Lose +// ScriptBase::Actor_Clue_Query +// ScriptBase::Actor_Clues_Transfer_New_To_Mainframe +// ScriptBase::Actor_Clues_Transfer_New_From_Mainframe +// ScriptBase::Actor_Set_Invisible +// ScriptBase::Actor_Set_Immunity_To_Obstacles +// ScriptBase::Item_Add_To_World +// ScriptBase::Item_Remove_From_World +// ScriptBase::Item_Spin_In_World +// ScriptBase::Item_Flag_As_Target +// ScriptBase::Item_Flag_As_Non_Target +// ScriptBase::Item_Pickup_Spin_Effect +// ScriptBase::Animation_Open +// ScriptBase::Animation_Close +// ScriptBase::Animation_Start +// ScriptBase::Animation_Stop +// ScriptBase::Animation_Skip_To_Frame +// ScriptBase::Delay +// ScriptBase::Player_Loses_Control +// ScriptBase::Player_Gains_Control +// ScriptBase::Player_Set_Combat_Mode +// ScriptBase::Player_Query_Combat_Mode +// ScriptBase::Player_Set_Combat_Mode_Access +// ScriptBase::Player_Query_Current_Set +// ScriptBase::Player_Query_Current_Scene +// ScriptBase::Player_Query_Agenda +// ScriptBase::Player_Set_Agenda +// ScriptBase::Query_Difficulty_Level + void ScriptBase::Game_Flag_Set(int flag) { _vm->_gameFlags->set(flag); } @@ -75,6 +176,9 @@ bool ScriptBase::Game_Flag_Query(int flag) { return _vm->_gameFlags->query(flag); } +// ScriptBase::Set_Enter +// ScriptBase::Chapter_Enter + int ScriptBase::Global_Variable_Set(int var, int value) { return _vm->_gameVars[var] = value; } @@ -95,11 +199,29 @@ int ScriptBase::Global_Variable_Decrement(int var, int dec) { return _vm->_gameVars[var] -= dec; } +// ScriptBase::Random_Query + void ScriptBase::Sound_Play(int id, int volume, int panFrom, int panTo, int priority) { const char *name = _vm->_gameInfo->getSfxTrack(id); _vm->_audioPlayer->playAud(name, volume, panFrom, panTo, priority); } +// ScriptBase::Sound_Play_Speech_Line +// ScriptBase::Sound_Left_Footstep_Walk +// ScriptBase::Sound_Right_Footstep_Walk +// ScriptBase::Sound_Left_Footstep_Run +// ScriptBase::Sound_Right_Footstep_Run +// ScriptBase::Sound_Walk_Shuffle_Stop +// ScriptBase::Footstep_Sounds_Set +// ScriptBase::Footstep_Sound_Override_On +// ScriptBase::Footstep_Sound_Override_Off +// ScriptBase::Music_Play +// ScriptBase::Music_Adjust +// ScriptBase::Music_Stop +// ScriptBase::Music_Is_Playing +// ScriptBase::Overlay_Play +// ScriptBase::Overlay_Remove + void ScriptBase::Scene_Loop_Set_Default(int a) { debug("Scene_Loop_Set_Default(%d)", a); } @@ -116,6 +238,12 @@ void ScriptBase::Ambient_Sounds_Add_Sound(int id, int time1, int time2, int volu _vm->_ambientSounds->addSound(id, time1, time2, volume1, volume2, pan1begin, pan1end, pan2begin, pan2end, priority, unk); } +// ScriptBase::Ambient_Sounds_Remove_Sound +// ScriptBase::Ambient_Sounds_Add_Speech_Sound +// ScriptBase::Ambient_Sounds_Remove_Speech_Sound +// ScriptBase::Ambient_Sounds_Play_Sound +// ScriptBase::Ambient_Sounds_Play_Speech_Sound + void ScriptBase::Ambient_Sounds_Remove_All_Non_Looping_Sounds(int time) { // _vm->_ambientSounds->removeAllNonLoopingSounds(time); } @@ -124,6 +252,9 @@ void ScriptBase::Ambient_Sounds_Add_Looping_Sound(int id, int volume, int pan, i _vm->_ambientSounds->addLoopingSound(id, volume, pan, fadeInTime); } +// ScriptBase::Ambient_Sounds_Adjust_Looping_Sound +// ScriptBase::Ambient_Sounds_Remove_Looping_Sound + void ScriptBase::Ambient_Sounds_Remove_All_Looping_Sounds(int time) { // _vm->_ambientSounds->removeAllLoopingSounds(time); } @@ -132,14 +263,96 @@ void ScriptBase::Setup_Scene_Information(float actorX, float actorY, float actor _vm->_scene->setActorStart(Vector3(actorX, actorY, actorZ), actorFacing); } +// ScriptBase::Dialogue_Menu_Appear +// ScriptBase::Dialogue_Menu_Disappear +// ScriptBase::Dialogue_Menu_Clear_List +// ScriptBase::Dialogue_Menu_Add_To_List +// ScriptBase::Dialogue_Menu_Add_DONE_To_List +// ScriptBase::Dialogue_Menu_Add_To_List_Never_Repeat_Once_Selected +// ScriptBase::DM_Add_To_List +// ScriptBase::DM_Add_To_List_Never_Repeat_Once_Selected +// ScriptBase::Dialogue_Menu_Remove_From_List +// ScriptBase::Dialogue_Menu_Query_Input +// ScriptBase::Dialogue_Menu_Query_List_Size + void ScriptBase::Scene_Exit_Add_2D_Exit(int a, int b, int c, int d, int e, int f) { debug("Scene_Exit_Add_2D_Exit(%d, %d, %d, %d, %d, %d)", a, b, c, d, e, f); } +// ScriptBase::Scene_Exit_Remove +// ScriptBase::Scene_Exits_Disable +// ScriptBase::Scene_Exits_Enable + void ScriptBase::Scene_2D_Region_Add(int a, int b, int c, int d, int e) { debug("Scene_2D_Region_Add(%d, %d, %d, %d, %d)", a, b, c, d, e); } +// ScriptBase::Scene_2D_Region_Remove +// ScriptBase::World_Waypoint_Set +// ScriptBase::World_Waypoint_Reset +// ScriptBase::World_Waypoint_Query_X +// ScriptBase::World_Waypoint_Query_Y +// ScriptBase::World_Waypoint_Query_Z +// ScriptBase::Combat_Cover_Waypoint_Set_Data +// ScriptBase::Combat_Flee_Waypoint_Set_Data +// ScriptBase::Police_Maze_Target_Track_Add +// ScriptBase::Police_Maze_Query_Score +// ScriptBase::Police_Maze_Zero_Score +// ScriptBase::Police_Maze_Increment_Score +// ScriptBase::Police_Maze_Decrement_Score +// ScriptBase::Police_Maze_Set_Score +// ScriptBase::Police_Maze_Set_Pause_State +// ScriptBase::CDB_Set_Crime +// ScriptBase::CDB_Set_Clue_Asset_Type +// ScriptBase::SDB_Set_Actor +// ScriptBase::SDB_Add_Photo_Clue +// ScriptBase::SDB_Set_Name +// ScriptBase::SDB_Set_Sex +// ScriptBase::SDB_Add_Identity_Clue +// ScriptBase::SDB_Add_MO_Clue +// ScriptBase::SDB_Add_Whereabouts_Clue +// ScriptBase::SDB_Add_Replicant_Clue +// ScriptBase::SDB_Add_Non_Replicant_Clue +// ScriptBase::SDB_Add_Other_Clue +// ScriptBase::Spinner_Set_Selectable_Destination_Flag +// ScriptBase::Spinner_Query_Selectable_Destination_Flag +// ScriptBase::Spinner_Interface_Choose_Dest +// ScriptBase::ESPER_Flag_To_Activate +// ScriptBase::Voight_Kampff_Activate +// ScriptBase::Elevator_Activate +// ScriptBase::View_Score_Board +// ScriptBase::Query_Score +// ScriptBase::Set_Score +// ScriptBase::Give_McCoy_Ammo + +void ScriptBase::Assign_Player_Gun_Hit_Sounds(int a0, int a1, int a2, int a3) { + debug("STUB: Assign_Player_Gun_Hit_Sounds(%d, %d, %d, %d)", a0, a1, a2, a3); +} + +void ScriptBase::Assign_Player_Gun_Miss_Sounds(int a0, int a1, int a2, int a3) { + debug("STUB: Assign_Player_Gun_Miss_Sounds(%d, %d, %d, %d)", a0, a1, a2, a3); +} + +// ScriptBase::Disable_Shadows +// ScriptBase::Query_System_Currently_Loading_Game +// ScriptBase::Actor_Retired_Here +// ScriptBase::Clickable_Object +// ScriptBase::Unclickable_Object +// ScriptBase::Obstacle_Object +// ScriptBase::Unobstacle_Object +// ScriptBase::Obstacle_Flag_All_Objects +// ScriptBase::Combat_Target_Object +// ScriptBase::Un_Combat_Target_Object +// ScriptBase::Set_Fade_Color +// ScriptBase::Set_Fade_Density +// ScriptBase::Set_Fog_Color +// ScriptBase::Set_Fog_Density +// ScriptBase::ADQ_Flush +// ScriptBase::ADQ_Add +// ScriptBase::ADQ_Add_Pause +// ScriptBase::Game_Over +// ScriptBase::Autosave_Game + void ScriptBase::I_Sez(const char *str) { _vm->ISez(str); } diff --git a/engines/bladerunner/script/script.h b/engines/bladerunner/script/script.h index e8bf1c029e..008e0347ea 100644 --- a/engines/bladerunner/script/script.h +++ b/engines/bladerunner/script/script.h @@ -28,61 +28,148 @@ namespace BladeRunner { class BladeRunnerEngine; -class ScriptBase; - -class Script { -public: - BladeRunnerEngine *_vm; - int _inScriptCounter; - ScriptBase *_currentScript; - - Script(BladeRunnerEngine *vm) - : _vm(vm), - _inScriptCounter(0), - _currentScript(nullptr) - {} - ~Script(); - - bool open(const Common::String &name); - - void InitializeScene(); - void SceneLoaded(); - void SceneFrameAdvanced(int frame); -}; class ScriptBase { protected: BladeRunnerEngine *_vm; +public: ScriptBase(BladeRunnerEngine *vm) : _vm(vm) {} - -public: virtual ~ScriptBase() {} - virtual void InitializeScene() = 0; - virtual void SceneLoaded() = 0; - virtual void SceneFrameAdvanced(int frame) = 0; - protected: - + // Preload + // Actor_Put_In_Set + // Actor_Set_At_XYZ + // Actor_Set_At_Waypoint + // Region_Check + // Object_Query_Click + // Object_Do_Ground_Click + // Object_Mark_For_Hot_Mouse + // Actor_Face_Actor + // Actor_Face_Object + // Actor_Face_Item + // Actor_Face_Waypoint + // Actor_Face_XYZ + // Actor_Face_Current_Camera + // Actor_Face_Heading + // Actor_Query_Friendliness_To_Other + // Actor_Modify_Friendliness_To_Other + // Actor_Set_Friendliness_To_Other + // Actor_Set_Honesty + // Actor_Set_Intelligence + // Actor_Set_Stability + // Actor_Set_Combat_Aggressiveness + // Actor_Query_Current_HP + // Actor_Query_Max_HP + // Actor_Query_Combat_Aggressiveness + // Actor_Query_Honesty + // Actor_Query_Intelligence + // Actor_Query_Stability + // Actor_Modify_Current_HP + // Actor_Modify_Max_HP + // Actor_Modify_Combat_Aggressiveness + // Actor_Modify_Honesty + // Actor_Modify_Intelligence + // Actor_Modify_Stability + // Actor_Set_Flag_Damage_Anim_If_Moving + // Actor_Query_Flag_Damage_Anim_If_Moving + // Actor_Combat_AI_Hit_Attempt + // Non_Player_Actor_Combat_Mode_On + // Non_Player_Actor_Combat_Mode_Off + // Actor_Set_Health + // Actor_Set_Targetable + // Actor_Says + // Actor_Says_With_Pause + // Actor_Voice_Over + // Actor_Start_Speech_Sample + // Actor_Start_Voice_Over_Sample + // Actor_Query_Which_Set_In + // Actor_Query_Is_In_Current_Set + // Actor_Query_In_Set + // Actor_Query_Inch_Distance_From_Actor + // Actor_Query_Inch_Distance_From_Waypoint + // Actor_Query_In_Between_Two_Actors + // Actor_Set_Goal_Number + // Actor_Query_Goal_Number + // Actor_Query_XYZ + // Actor_Query_Facing_1024 + // Actor_Set_Frame_Rate_FPS + // Slice_Animation_Query_Number_Of_Frames + // Actor_Change_Animation_Mode + // Actor_Query_Animation_Mode + // Loop_Actor_Walk_To_Actor + // Loop_Actor_Walk_To_Item + // Loop_Actor_Walk_To_Scene_Object + // Loop_Actor_Walk_To_Waypoint + // Loop_Actor_Walk_To_XYZ + // Async_Actor_Walk_To_Waypoint + // Async_Actor_Walk_To_XYZ + // Actor_Force_Stop_Walking + // Loop_Actor_Travel_Stairs + // Loop_Actor_Travel_Ladder + // Actor_Clue_Add_To_Database + // Actor_Clue_Acquire + // Actor_Clue_Lose + // Actor_Clue_Query + // Actor_Clues_Transfer_New_To_Mainframe + // Actor_Clues_Transfer_New_From_Mainframe + // Actor_Set_Invisible + // Actor_Set_Immunity_To_Obstacles + // Item_Add_To_World + // Item_Remove_From_World + // Item_Spin_In_World + // Item_Flag_As_Target + // Item_Flag_As_Non_Target + // Item_Pickup_Spin_Effect + // Animation_Open + // Animation_Close + // Animation_Start + // Animation_Stop + // Animation_Skip_To_Frame + // Delay + // Player_Loses_Control + // Player_Gains_Control + // Player_Set_Combat_Mode + // Player_Query_Combat_Mode + // Player_Set_Combat_Mode_Access + // Player_Query_Current_Set + // Player_Query_Current_Scene + // Player_Query_Agenda + // Player_Set_Agenda + // Query_Difficulty_Level void Game_Flag_Set(int flag); void Game_Flag_Reset(int flag); bool Game_Flag_Query(int flag); - + // Set_Enter + // Chapter_Enter int Global_Variable_Set(int, int); int Global_Variable_Reset(int); int Global_Variable_Query(int); int Global_Variable_Increment(int, int); int Global_Variable_Decrement(int, int); - + // Random_Query void Sound_Play(int id, int volume, int panFrom, int panTo, int priority); - + // Sound_Play_Speech_Line + // Sound_Left_Footstep_Walk + // Sound_Right_Footstep_Walk + // Sound_Left_Footstep_Run + // Sound_Right_Footstep_Run + // Sound_Walk_Shuffle_Stop + // Footstep_Sounds_Set + // Footstep_Sound_Override_On + // Footstep_Sound_Override_Off + // Music_Play + // Music_Adjust + // Music_Stop + // Music_Is_Playing + // Overlay_Play + // Overlay_Remove void Scene_Loop_Set_Default(int); void Scene_Loop_Start_Special(int, int, int); - void Outtake_Play(int id, int noLocalization = false, int container = -1); void Ambient_Sounds_Add_Sound(int id, int time1, int time2, int volume1, int volume2, int pan1begin, int pan1end, int pan2begin, int pan2end, int priority, int unk); // Ambient_Sounds_Remove_Sound @@ -96,18 +183,119 @@ protected: // Ambient_Sounds_Remove_Looping_Sound void Ambient_Sounds_Remove_All_Looping_Sounds(int time); void Setup_Scene_Information(float actorX, float actorY, float actorZ, int actorFacing); - + // Dialogue_Menu_Appear + // Dialogue_Menu_Disappear + // Dialogue_Menu_Clear_List + // Dialogue_Menu_Add_To_List + // Dialogue_Menu_Add_DONE_To_List + // Dialogue_Menu_Add_To_List_Never_Repeat_Once_Selected + // DM_Add_To_List + // DM_Add_To_List_Never_Repeat_Once_Selected + // Dialogue_Menu_Remove_From_List + // Dialogue_Menu_Query_Input + // Dialogue_Menu_Query_List_Size void Scene_Exit_Add_2D_Exit(int, int, int, int, int, int); + // Scene_Exit_Remove + // Scene_Exits_Disable + // Scene_Exits_Enable void Scene_2D_Region_Add(int, int, int, int, int); - + // Scene_2D_Region_Remove + // World_Waypoint_Set + // World_Waypoint_Reset + // World_Waypoint_Query_X + // World_Waypoint_Query_Y + // World_Waypoint_Query_Z + // Combat_Cover_Waypoint_Set_Data + // Combat_Flee_Waypoint_Set_Data + // Police_Maze_Target_Track_Add + // Police_Maze_Query_Score + // Police_Maze_Zero_Score + // Police_Maze_Increment_Score + // Police_Maze_Decrement_Score + // Police_Maze_Set_Score + // Police_Maze_Set_Pause_State + // CDB_Set_Crime + // CDB_Set_Clue_Asset_Type + // SDB_Set_Actor + // SDB_Add_Photo_Clue + // SDB_Set_Name + // SDB_Set_Sex + // SDB_Add_Identity_Clue + // SDB_Add_MO_Clue + // SDB_Add_Whereabouts_Clue + // SDB_Add_Replicant_Clue + // SDB_Add_Non_Replicant_Clue + // SDB_Add_Other_Clue + // Spinner_Set_Selectable_Destination_Flag + // Spinner_Query_Selectable_Destination_Flag + // Spinner_Interface_Choose_Dest + // ESPER_Flag_To_Activate + // Voight_Kampff_Activate + // Elevator_Activate + // View_Score_Board + // Query_Score + // Set_Score + // Give_McCoy_Ammo + void Assign_Player_Gun_Hit_Sounds(int a0, int a1, int a2, int a3); + void Assign_Player_Gun_Miss_Sounds(int a0, int a1, int a2, int a3); + // Disable_Shadows + // Query_System_Currently_Loading_Game + // Actor_Retired_Here + // Clickable_Object + // Unclickable_Object + // Obstacle_Object + // Unobstacle_Object + // Obstacle_Flag_All_Objects + // Combat_Target_Object + // Un_Combat_Target_Object + // Set_Fade_Color + // Set_Fade_Density + // Set_Fog_Color + // Set_Fog_Density + // ADQ_Flush + // ADQ_Add + // ADQ_Add_Pause + // Game_Over + // Autosave_Game void I_Sez(const char *str); }; +class SceneScriptBase : public ScriptBase { +public: + SceneScriptBase(BladeRunnerEngine *vm) + : ScriptBase(vm) + {} + + virtual void InitializeScene() = 0; + virtual void SceneLoaded() = 0; + virtual void SceneFrameAdvanced(int frame) = 0; +}; + +class Script { +public: + BladeRunnerEngine *_vm; + int _inScriptCounter; + SceneScriptBase *_currentScript; + + Script(BladeRunnerEngine *vm) + : _vm(vm), + _inScriptCounter(0), + _currentScript(nullptr) + {} + ~Script(); + + bool open(const Common::String &name); + + void InitializeScene(); + void SceneLoaded(); + void SceneFrameAdvanced(int frame); +}; + #define DECLARE_SCRIPT(name) \ -class Script##name : public ScriptBase { \ +class Script##name : public SceneScriptBase { \ public: \ Script##name(BladeRunnerEngine *vm) \ - : ScriptBase(vm) \ + : SceneScriptBase(vm) \ {} \ void InitializeScene(); \ void SceneLoaded(); \ |