diff options
author | Peter Kohaut | 2018-01-14 12:12:06 +0100 |
---|---|---|
committer | Peter Kohaut | 2018-01-28 10:57:16 +0100 |
commit | 1e5f9d3078f236f306b5d868bcd52f4e47f7b512 (patch) | |
tree | 0d402af27d75064d60e4674ab3bd4c9ad08759f1 /engines/bladerunner/script | |
parent | 3a937f19c0a5e347c801c62d345475be082f9e41 (diff) | |
download | scummvm-rg350-1e5f9d3078f236f306b5d868bcd52f4e47f7b512.tar.gz scummvm-rg350-1e5f9d3078f236f306b5d868bcd52f4e47f7b512.tar.bz2 scummvm-rg350-1e5f9d3078f236f306b5d868bcd52f4e47f7b512.zip |
BLADERUNNER: Added basic KIA interface
Settings works
Help works
Clue database works
Fixed code for inserting objects into scene
Reorganization of few files
Unification & code formatting of few older files
Diffstat (limited to 'engines/bladerunner/script')
21 files changed, 152 insertions, 583 deletions
diff --git a/engines/bladerunner/script/ai.cpp b/engines/bladerunner/script/ai.cpp index ade27e417f..f61b0212a7 100644 --- a/engines/bladerunner/script/ai.cpp +++ b/engines/bladerunner/script/ai.cpp @@ -28,11 +28,13 @@ namespace BladeRunner { -AIScripts::AIScripts(BladeRunnerEngine *vm, int actorsCount) : _vm(vm), _inScriptCounter(0) { - _actorsCount = actorsCount; - _actorUpdating = new bool[actorsCount]; - _AIScripts = new AIScriptBase*[actorsCount]; - for (int i = 0; i < actorsCount; ++i) { +AIScripts::AIScripts(BladeRunnerEngine *vm, int actorCount) { + _vm = vm; + _inScriptCounter = 0; + _actorCount = actorCount; + _actorUpdating = new bool[actorCount]; + _AIScripts = new AIScriptBase*[actorCount]; + for (int i = 0; i < actorCount; ++i) { _AIScripts[i] = nullptr; _actorUpdating[i] = false; } @@ -45,7 +47,7 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorsCount) : _vm(vm), _inScrip } AIScripts::~AIScripts() { - for (int i = 0; i < _actorsCount; ++i) { + for (int i = 0; i < _actorCount; ++i) { delete _AIScripts[i]; _AIScripts[i] = nullptr; } @@ -54,14 +56,14 @@ AIScripts::~AIScripts() { } void AIScripts::Initialize(int actor) { - assert(actor < _actorsCount); + assert(actor < _actorCount); if (_AIScripts[actor]) { _AIScripts[actor]->Initialize(); } } void AIScripts::Update(int actor) { - assert(actor < _actorsCount); + assert(actor < _actorCount); if (this->_actorUpdating[actor] != 1) { this->_actorUpdating[actor] = true; ++this->_inScriptCounter; @@ -73,7 +75,7 @@ void AIScripts::Update(int actor) { } void AIScripts::TimerExpired(int actor, int timer) { - assert(actor < _actorsCount); + assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { _AIScripts[actor]->TimerExpired(timer); @@ -82,7 +84,7 @@ void AIScripts::TimerExpired(int actor, int timer) { } void AIScripts::CompletedMovementTrack(int actor) { - assert(actor < _actorsCount); + assert(actor < _actorCount); if (!_vm->_actors[actor]->inCombat()) { _inScriptCounter++; if (_AIScripts[actor]) { @@ -93,7 +95,7 @@ void AIScripts::CompletedMovementTrack(int actor) { } void AIScripts::ReceivedClue(int actor, int clueId, int fromActorId) { - assert(actor < _actorsCount); + assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { _AIScripts[actor]->ReceivedClue(clueId, fromActorId); @@ -102,7 +104,7 @@ void AIScripts::ReceivedClue(int actor, int clueId, int fromActorId) { } void AIScripts::ClickedByPlayer(int actor) { - assert(actor < _actorsCount); + assert(actor < _actorCount); if(_vm->_actors[actor]->inCombat()) { return; @@ -116,7 +118,7 @@ void AIScripts::ClickedByPlayer(int actor) { } void AIScripts::EnteredScene(int actor, int setId) { - assert(actor < _actorsCount); + assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { _AIScripts[actor]->EnteredScene(setId); @@ -125,7 +127,7 @@ void AIScripts::EnteredScene(int actor, int setId) { } void AIScripts::OtherAgentEnteredThisScene(int actor, int otherActorId) { - assert(actor < _actorsCount); + assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { _AIScripts[actor]->OtherAgentEnteredThisScene(otherActorId); @@ -134,7 +136,7 @@ void AIScripts::OtherAgentEnteredThisScene(int actor, int otherActorId) { } void AIScripts::OtherAgentExitedThisScene(int actor, int otherActorId) { - assert(actor < _actorsCount); + assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { _AIScripts[actor]->OtherAgentExitedThisScene(otherActorId); @@ -143,7 +145,7 @@ void AIScripts::OtherAgentExitedThisScene(int actor, int otherActorId) { } void AIScripts::Retired(int actor, int retiredByActorId) { - assert(actor < _actorsCount); + assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { _AIScripts[actor]->Retired(retiredByActorId); @@ -152,7 +154,7 @@ void AIScripts::Retired(int actor, int retiredByActorId) { } void AIScripts::GoalChanged(int actor, int currentGoalNumber, int newGoalNumber) { - assert(actor < _actorsCount); + assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { _AIScripts[actor]->GoalChanged(currentGoalNumber, newGoalNumber); @@ -161,7 +163,7 @@ void AIScripts::GoalChanged(int actor, int currentGoalNumber, int newGoalNumber) } bool AIScripts::ReachedMovementTrackWaypoint(int actor, int waypointId) { - assert(actor < _actorsCount); + assert(actor < _actorCount); bool result = false; if (!_vm->_actors[actor]->inCombat()) { _inScriptCounter++; @@ -174,7 +176,7 @@ bool AIScripts::ReachedMovementTrackWaypoint(int actor, int waypointId) { } void AIScripts::UpdateAnimation(int actor, int *animation, int *frame) { - assert(actor < _actorsCount); + assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { _AIScripts[actor]->UpdateAnimation(animation, frame); @@ -183,7 +185,7 @@ void AIScripts::UpdateAnimation(int actor, int *animation, int *frame) { } void AIScripts::ChangeAnimationMode(int actor, int mode) { - assert(actor < _actorsCount); + assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { _AIScripts[actor]->ChangeAnimationMode(mode); diff --git a/engines/bladerunner/script/ai.h b/engines/bladerunner/script/ai.h index 9f2caa094b..135aef5e9c 100644 --- a/engines/bladerunner/script/ai.h +++ b/engines/bladerunner/script/ai.h @@ -174,11 +174,11 @@ class AIScripts { private: BladeRunnerEngine *_vm; int _inScriptCounter; - int _actorsCount; + int _actorCount; AIScriptBase **_AIScripts; bool *_actorUpdating; public: - AIScripts(BladeRunnerEngine *vm, int actorsCount); + AIScripts(BladeRunnerEngine *vm, int actorCount); ~AIScripts(); void Initialize(int actor); diff --git a/engines/bladerunner/script/esper.cpp b/engines/bladerunner/script/esper.cpp index 873841b839..ca779d6e3d 100644 --- a/engines/bladerunner/script/esper.cpp +++ b/engines/bladerunner/script/esper.cpp @@ -26,7 +26,7 @@ namespace BladeRunner { -void ScriptESPER::SCRIPT_ESPER_DLL_Initialize() { +void ESPERScript::SCRIPT_ESPER_DLL_Initialize() { int v0 = 0; if (Actor_Clue_Query(kActorMcCoy, kClueRuncitersVideo)) { if (!Actor_Clue_Query(kActorMcCoy, kClueRuncitersViewA)) { @@ -88,7 +88,7 @@ void ScriptESPER::SCRIPT_ESPER_DLL_Initialize() { } } -void ScriptESPER::SCRIPT_ESPER_DLL_Photo_Selected(int photo) { +void ESPERScript::SCRIPT_ESPER_DLL_Photo_Selected(int photo) { switch (photo) { case 9: Actor_Says(kActorAnsweringMachine, 270, 3); @@ -151,7 +151,7 @@ void ScriptESPER::SCRIPT_ESPER_DLL_Photo_Selected(int photo) { } } -bool ScriptESPER::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region) { +bool ESPERScript::SCRIPT_ESPER_DLL_Special_Region_Selected(int photo, int region) { switch (photo) { case 9: switch (region) { diff --git a/engines/bladerunner/script/esper.h b/engines/bladerunner/script/esper.h index 9532e11b79..683ecf6998 100644 --- a/engines/bladerunner/script/esper.h +++ b/engines/bladerunner/script/esper.h @@ -29,9 +29,9 @@ namespace BladeRunner { class BladeRunnerEngine; -class ScriptESPER : ScriptBase { +class ESPERScript : ScriptBase { public: - ScriptESPER(BladeRunnerEngine *vm) + ESPERScript(BladeRunnerEngine *vm) : ScriptBase(vm) { } diff --git a/engines/bladerunner/script/kia.cpp b/engines/bladerunner/script/kia.cpp index 587e25d940..e0c875469d 100644 --- a/engines/bladerunner/script/kia.cpp +++ b/engines/bladerunner/script/kia.cpp @@ -23,10 +23,21 @@ #include "bladerunner/script/kia.h" #include "bladerunner/bladerunner.h" +#include "bladerunner/mouse.h" +#include "bladerunner/ui/kia.h" namespace BladeRunner { -void ScriptKIA::SCRIPT_KIA_DLL_Play_Clue_Asset_Script(int a1, int clueId) { +KIAScript::KIAScript(BladeRunnerEngine *vm) : ScriptBase(vm) {} + +void KIAScript::playClueAssetScript(int a1, int clueId) { + _vm->_kia->playerReset(); + _vm->_mouse->disable(); + SCRIPT_KIA_DLL_Play_Clue_Asset_Script(a1, clueId); + _vm->_mouse->enable(); +} + +void KIAScript::SCRIPT_KIA_DLL_Play_Clue_Asset_Script(int a1, int clueId) { int v1; switch (clueId) { case 0: diff --git a/engines/bladerunner/script/kia.h b/engines/bladerunner/script/kia.h index d7b5836e8d..9ad815b37b 100644 --- a/engines/bladerunner/script/kia.h +++ b/engines/bladerunner/script/kia.h @@ -29,15 +29,14 @@ namespace BladeRunner { class BladeRunnerEngine; -class ScriptKIA : ScriptBase { +class KIAScript : ScriptBase { public: - ScriptKIA(BladeRunnerEngine *vm) - : ScriptBase(vm) { - } + KIAScript(BladeRunnerEngine *vm); - void SCRIPT_KIA_DLL_Play_Clue_Asset_Script(int a1, int clueId); + void playClueAssetScript(int a1, int clueId); private: + void SCRIPT_KIA_DLL_Play_Clue_Asset_Script(int a1, int clueId); }; } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/scene/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp index 21e6fc7600..6a4d1e4c87 100644 --- a/engines/bladerunner/script/scene/ct01.cpp +++ b/engines/bladerunner/script/scene/ct01.cpp @@ -385,7 +385,7 @@ void SceneScriptCT01::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -314.0f, -6.5f, 326.0f, 0, 0, false, 0); if (!Game_Flag_Query(25)) { Game_Flag_Set(25); - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Voice_Over(200, kActorVoiceOver); Actor_Voice_Over(210, kActorVoiceOver); Actor_Voice_Over(220, kActorVoiceOver); diff --git a/engines/bladerunner/script/scene/ct06.cpp b/engines/bladerunner/script/scene/ct06.cpp index e26b65c780..cebf9d1eef 100644 --- a/engines/bladerunner/script/scene/ct06.cpp +++ b/engines/bladerunner/script/scene/ct06.cpp @@ -99,7 +99,7 @@ bool SceneScriptCT06::ClickedOnActor(int actorId) { Actor_Voice_Over(350, kActorVoiceOver); Actor_Voice_Over(360, kActorVoiceOver); Actor_Voice_Over(370, kActorVoiceOver); - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Voice_Over(380, kActorVoiceOver); Actor_Voice_Over(390, kActorVoiceOver); Actor_Voice_Over(400, kActorVoiceOver); diff --git a/engines/bladerunner/script/scene/kp01.cpp b/engines/bladerunner/script/scene/kp01.cpp index 0a5dd24cd0..e70a8d5375 100644 --- a/engines/bladerunner/script/scene/kp01.cpp +++ b/engines/bladerunner/script/scene/kp01.cpp @@ -119,7 +119,7 @@ void SceneScriptKP01::SceneFrameAdvanced(int frame) { void SceneScriptKP01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { if (actorId == 1) { if (newGoal == 422) { - if (Game_Flag_Query(378) == 1) { + if (Game_Flag_Query(kFlagDirectorsCut) == 1) { Delay(500); Actor_Change_Animation_Mode(kActorMcCoy, 75); Delay(4500); diff --git a/engines/bladerunner/script/scene/ma02.cpp b/engines/bladerunner/script/scene/ma02.cpp index add20cbcdf..62b5d68cf9 100644 --- a/engines/bladerunner/script/scene/ma02.cpp +++ b/engines/bladerunner/script/scene/ma02.cpp @@ -177,11 +177,11 @@ void SceneScriptMA02::PlayerWalkedIn() { Game_Flag_Set(60); Actor_Face_Actor(kActorMcCoy, kActorMaggie, true); Actor_Voice_Over(1210, kActorVoiceOver); - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Voice_Over(1220, kActorVoiceOver); } Actor_Voice_Over(1230, kActorVoiceOver); - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Voice_Over(1240, kActorVoiceOver); Actor_Voice_Over(1250, kActorVoiceOver); } diff --git a/engines/bladerunner/script/scene/ma04.cpp b/engines/bladerunner/script/scene/ma04.cpp index a7725f95e3..4b2e65ef98 100644 --- a/engines/bladerunner/script/scene/ma04.cpp +++ b/engines/bladerunner/script/scene/ma04.cpp @@ -177,7 +177,7 @@ bool SceneScriptMA04::ClickedOn2DRegion(int region) { Delay(500); Actor_Says(kActorClovis, 310, 3); Actor_Says(kActorClovis, 320, 3); - if (!Game_Flag_Query(378) && Global_Variable_Query(1) < 3) { + if (!Game_Flag_Query(kFlagDirectorsCut) && Global_Variable_Query(1) < 3) { Actor_Voice_Over(1300, kActorVoiceOver); Actor_Voice_Over(1310, kActorVoiceOver); Actor_Voice_Over(1320, kActorVoiceOver); @@ -193,7 +193,7 @@ bool SceneScriptMA04::ClickedOn2DRegion(int region) { Delay(500); Actor_Says(kActorLucy, 500, 3); Actor_Says(kActorLucy, 510, 3); - if (!Game_Flag_Query(378) && Global_Variable_Query(1) < 3) { + if (!Game_Flag_Query(kFlagDirectorsCut) && Global_Variable_Query(1) < 3) { Actor_Voice_Over(1330, kActorVoiceOver); Actor_Voice_Over(1340, kActorVoiceOver); Actor_Voice_Over(1350, kActorVoiceOver); @@ -204,7 +204,7 @@ bool SceneScriptMA04::ClickedOn2DRegion(int region) { return true; } Actor_Says(kActorMcCoy, 2670, 13); - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Says(kActorMcCoy, 2675, 17); } } @@ -400,7 +400,7 @@ void SceneScriptMA04::sub_402F2C() { if (Game_Flag_Query(165) || Actor_Query_Goal_Number(kActorCrazylegs) == 2) { Actor_Says(kActorLucy, 630, 3); Actor_Says_With_Pause(kActorMcCoy, 2575, 0.0f, 15); - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Says(kActorLucy, 640, 3); } Actor_Clue_Acquire(kActorMcCoy, kCluePhoneCallLucy2, true, -1); @@ -413,7 +413,7 @@ void SceneScriptMA04::sub_402F2C() { Actor_Says(kActorMcCoy, 2570, 13); Actor_Says_With_Pause(kActorLucy, 630, 0.0f, 3); Actor_Says_With_Pause(kActorMcCoy, 2575, 0.0f, 15); - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Says(kActorLucy, 640, 3); } Actor_Clue_Acquire(kActorMcCoy, kCluePhoneCallLucy1, true, -1); diff --git a/engines/bladerunner/script/scene/ma05.cpp b/engines/bladerunner/script/scene/ma05.cpp index 51ae26a7b4..a1f3288b0e 100644 --- a/engines/bladerunner/script/scene/ma05.cpp +++ b/engines/bladerunner/script/scene/ma05.cpp @@ -111,7 +111,7 @@ void SceneScriptMA05::PlayerWalkedIn() { Sound_Play(69, 100, 0, 0, 50); } if (Game_Flag_Query(146) && !Game_Flag_Query(61)) { - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Voice_Over(1260, kActorVoiceOver); Actor_Voice_Over(1270, kActorVoiceOver); Actor_Voice_Over(1280, kActorVoiceOver); diff --git a/engines/bladerunner/script/scene/nr08.cpp b/engines/bladerunner/script/scene/nr08.cpp index 70b8542173..b00daff531 100644 --- a/engines/bladerunner/script/scene/nr08.cpp +++ b/engines/bladerunner/script/scene/nr08.cpp @@ -184,7 +184,7 @@ void SceneScriptNR08::PlayerWalkedIn() { } if (Actor_Query_Goal_Number(kActorSteele) == 231) { Actor_Says(kActorSteele, 1640, 12); - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Says(kActorMcCoy, 3790, 13); Actor_Says(kActorSteele, 1650, 14); } diff --git a/engines/bladerunner/script/scene/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp index 8a5b728c86..79bf1045ce 100644 --- a/engines/bladerunner/script/scene/rc01.cpp +++ b/engines/bladerunner/script/scene/rc01.cpp @@ -27,20 +27,24 @@ namespace BladeRunner { void SceneScriptRC01::InitializeScene() { #if _DEBUG //TODO: not part of game, remove - //Game_Flag_Set(kFlagIntroPlayed); // force skip intro + // Game_Flag_Set(kFlagIntroPlayed); // force skip intro + // Game_Flag_Set(kFlagRC02toRC01); // no landing + // Game_Flag_Set(kFlagRC01PoliceDone); + // Game_Flag_Set(249); + // Game_Flag_Set(kFlagKIAPrivacyAddon); #endif if (!Game_Flag_Query(kFlagIntroPlayed)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - Outtake_Play(28, 1, -1); // WSTLGO_E.VQA - Outtake_Play(41, 1, -1); // BRLOGO_E.VQA - Outtake_Play(0, 0, -1); // INTRO_E.VQA - Outtake_Play(33, 1, -1); // DSCENT_E.VQA + Outtake_Play(kOuttakeWestwood, true, -1); + Outtake_Play(kOuttakeBladeRunner, true, -1); + Outtake_Play(kOuttakeIntro, false, -1); + Outtake_Play(kOuttakeDescent, true, -1); } - if (Game_Flag_Query(9)) { + if (Game_Flag_Query(kFlagRC02toRC01)) { Setup_Scene_Information(-171.16f, 5.55f, 27.28f, 616); - } else if (Game_Flag_Query(114)) { + } else if (Game_Flag_Query(kFlagRC03toRC01)) { Setup_Scene_Information(-471.98f, -0.30f, 258.15f, 616); } else { Setup_Scene_Information(-10.98f, -0.30f, 318.15f, 616); @@ -84,7 +88,7 @@ void SceneScriptRC01::InitializeScene() { Ambient_Sounds_Add_Sound(87, 20, 80, 20, 40, -100, 100, -101, -101, 0, 0); // SIREN2.AUD if (Game_Flag_Query(kFlagRC01PoliceDone)) { - if (!Game_Flag_Query(9) && !Game_Flag_Query(114)) { + if (!Game_Flag_Query(kFlagRC02toRC01) && !Game_Flag_Query(kFlagRC03toRC01)) { Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 5, false); } if (Game_Flag_Query(249)) { @@ -93,7 +97,7 @@ void SceneScriptRC01::InitializeScene() { Scene_Loop_Set_Default(10); } } else { - if (!Game_Flag_Query(9) && !Game_Flag_Query(114)) { + if (!Game_Flag_Query(kFlagRC02toRC01) && !Game_Flag_Query(kFlagRC03toRC01)) { Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); } Scene_Loop_Set_Default(1); @@ -185,7 +189,7 @@ void SceneScriptRC01::SceneLoaded() { ADQ_Flush(); Actor_Voice_Over(1830, kActorVoiceOver); Actor_Voice_Over(1850, kActorVoiceOver); - if (!Game_Flag_Query(378)) { + if (!Game_Flag_Query(kFlagDirectorsCut)) { Actor_Voice_Over(1860, kActorVoiceOver); I_Sez("MG: Is David Leary a self-respecting human or is he powered by rechargeable"); I_Sez("batteries?\n"); @@ -574,22 +578,22 @@ void SceneScriptRC01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptRC01::PlayerWalkedIn() { - if (Game_Flag_Query(249) && !Game_Flag_Query(9) && !Game_Flag_Query(114)) { + if (Game_Flag_Query(249) && !Game_Flag_Query(kFlagRC02toRC01) && !Game_Flag_Query(kFlagRC03toRC01)) { walkToCenter(); } - if (Game_Flag_Query(114)) { + if (Game_Flag_Query(kFlagRC03toRC01)) { Player_Loses_Control(); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -415.98f, -0.30f, 262.15f, 0, 0, false, 0); Player_Gains_Control(); - Game_Flag_Reset(114); + Game_Flag_Reset(kFlagRC03toRC01); } - if (Game_Flag_Query(9)) { + if (Game_Flag_Query(kFlagRC02toRC01)) { Player_Loses_Control(); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -203.45f, 5.55f, 85.05f, 0, 0, false, 0); Player_Gains_Control(); - Game_Flag_Reset(9); + Game_Flag_Reset(kFlagRC02toRC01); if (Game_Flag_Query(1) && !Game_Flag_Query(4)) { Actor_Voice_Over(1910, kActorVoiceOver); diff --git a/engines/bladerunner/script/scene/rc02.cpp b/engines/bladerunner/script/scene/rc02.cpp index a518a489cd..18a08ad5b1 100644 --- a/engines/bladerunner/script/scene/rc02.cpp +++ b/engines/bladerunner/script/scene/rc02.cpp @@ -314,7 +314,7 @@ bool SceneScriptRC02::ClickedOnItem(int itemId, bool a2) { bool SceneScriptRC02::ClickedOnExit(int exitId) { if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -71.51f, -1238.89f, 108587.15f, 0, 1, false, 0)) { - Game_Flag_Set(9); + Game_Flag_Set(kFlagRC02toRC01); Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_Looping_Sound(71, true); Ambient_Sounds_Remove_Looping_Sound(75, true); diff --git a/engines/bladerunner/script/scene/rc03.cpp b/engines/bladerunner/script/scene/rc03.cpp index efdc54449e..2af0a8e8ef 100644 --- a/engines/bladerunner/script/scene/rc03.cpp +++ b/engines/bladerunner/script/scene/rc03.cpp @@ -140,7 +140,7 @@ bool SceneScriptRC03::ClickedOnExit(int exitId) { if (Game_Flag_Query(289)) { Game_Flag_Set(702); } - Game_Flag_Set(114); + Game_Flag_Set(kFlagRC03toRC01); Set_Enter(69, 78); Actor_Set_Goal_Number(kActorDektora, 100); } diff --git a/engines/bladerunner/script/scene/rc04.cpp b/engines/bladerunner/script/scene/rc04.cpp index fdd30cb4c1..827f836414 100644 --- a/engines/bladerunner/script/scene/rc04.cpp +++ b/engines/bladerunner/script/scene/rc04.cpp @@ -336,7 +336,7 @@ bool SceneScriptRC04::ClickedOnActor(int actorId) { Delay(3000); Item_Pickup_Spin_Effect(941, 405, 192); Actor_Says(kActorBulletBob, 2030, 30); - Game_Flag_Set(487); + Game_Flag_Set(kFlagKIAPrivacyAddon); } else { Actor_Says(kActorMcCoy, 8980, 16); Actor_Says(kActorBulletBob, 2040, 30); diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index aa3e23da52..8ef9b6a5ce 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -24,7 +24,7 @@ #include "bladerunner/actor.h" #include "bladerunner/actor_combat.h" -#include "bladerunner/adq.h" +#include "bladerunner/actor_dialogue_queue.h" #include "bladerunner/ambient_sounds.h" #include "bladerunner/audio_player.h" #include "bladerunner/audio_speech.h" @@ -32,9 +32,8 @@ #include "bladerunner/crimes_database.h" #include "bladerunner/combat.h" #include "bladerunner/dialogue_menu.h" -#include "bladerunner/elevator.h" -#include "bladerunner/gameflags.h" -#include "bladerunner/gameinfo.h" +#include "bladerunner/game_flags.h" +#include "bladerunner/game_info.h" #include "bladerunner/items.h" #include "bladerunner/item_pickup.h" #include "bladerunner/movement_track.h" @@ -48,9 +47,11 @@ #include "bladerunner/scene_objects.h" #include "bladerunner/slice_animations.h" #include "bladerunner/slice_renderer.h" -#include "bladerunner/spinner.h" #include "bladerunner/suspects_database.h" #include "bladerunner/text_resource.h" +#include "bladerunner/ui/elevator.h" +#include "bladerunner/ui/kia.h" +#include "bladerunner/ui/spinner.h" #include "bladerunner/vector.h" #include "bladerunner/waypoints.h" @@ -230,14 +231,14 @@ void ScriptBase::Actor_Set_Targetable(int actorId, bool targetable) { void ScriptBase::Actor_Says(int actorId, int sentenceId, int animationMode){ _vm->loopActorSpeaking(); - _vm->_adq->flush(1, true); + _vm->_actorDialogueQueue->flush(1, true); Actor_Says_With_Pause(actorId, sentenceId, 0.5f, animationMode); } void ScriptBase::Actor_Says_With_Pause(int actorId, int sentenceId, float pause, int animationMode) { _vm->gameWaitForActive(); _vm->loopActorSpeaking(); - _vm->_adq->flush(1, true); + _vm->_actorDialogueQueue->flush(1, true); Actor *actor = _vm->_actors[actorId]; @@ -285,35 +286,12 @@ void ScriptBase::Actor_Says_With_Pause(int actorId, int sentenceId, float pause, Player_Gains_Control(); } -#if 0 void ScriptBase::Actor_Voice_Over(int sentenceId, int actorId) { - // Wait for any existing speech to end - _vm->loopActorSpeaking(); - - // TODO: Hack - This needs to go through the actor class - char name[13]; - sprintf(name, "%02d-%04d.AUD", actorId, sentenceId); - _vm->_audioSpeech->playSpeech(name); - - // warning("start voice over loop"); - while (true) - { - _vm->gameTick(); - if (_vm->shouldQuit()) - break; - if (!_vm->_audioSpeech->isPlaying()) - break; - } - // warning("end voice over loop"); -} -#endif - -void ScriptBase::Actor_Voice_Over(int sentenceId, int actorId) { - assert(actorId < ACTORS_COUNT); + assert(actorId < BladeRunnerEngine::kActorCount); _vm->gameWaitForActive(); _vm->loopActorSpeaking(); - _vm->_adq->flush(1, true); + _vm->_actorDialogueQueue->flush(1, true); Actor *actor = _vm->_actors[actorId]; @@ -337,7 +315,7 @@ void ScriptBase::Actor_Start_Speech_Sample(int actorId, int sentenceId) { void ScriptBase::Actor_Start_Voice_Over_Sample(int sentenceId) { _vm->loopActorSpeaking(); - _vm->_actors[VOICEOVER_ACTOR]->speechPlay(sentenceId, true); + _vm->_actors[Actors::kActorVoiceOver]->speechPlay(sentenceId, true); } int ScriptBase::Actor_Query_Which_Set_In(int actorId) { @@ -380,11 +358,11 @@ bool ScriptBase::Actor_Query_In_Between_Two_Actors(int actorId, int otherActor1I float z1 = _vm->_actors[otherActor1Id]->getZ(); float x2 = _vm->_actors[otherActor2Id]->getX(); float z2 = _vm->_actors[otherActor2Id]->getZ(); - return _vm->_sceneObjects->isBetweenTwoXZ(actorId + SCENE_OBJECTS_ACTORS_OFFSET, x1, z1, x2, z1) - || _vm->_sceneObjects->isBetweenTwoXZ(actorId + SCENE_OBJECTS_ACTORS_OFFSET, x1 - 12.0f, z1 - 12.0f, x2 - 12.0f, z2 - 12.0f) - || _vm->_sceneObjects->isBetweenTwoXZ(actorId + SCENE_OBJECTS_ACTORS_OFFSET, x1 + 12.0f, z1 - 12.0f, x2 + 12.0f, z2 - 12.0f) - || _vm->_sceneObjects->isBetweenTwoXZ(actorId + SCENE_OBJECTS_ACTORS_OFFSET, x1 + 12.0f, z1 + 12.0f, x2 + 12.0f, z2 + 12.0f) - || _vm->_sceneObjects->isBetweenTwoXZ(actorId + SCENE_OBJECTS_ACTORS_OFFSET, x1 - 12.0f, z1 + 12.0f, x2 - 12.0f, z2 + 12.0f); + return _vm->_sceneObjects->isBetweenTwoXZ(actorId + kSceneObjectOffsetActors, x1, z1, x2, z1) + || _vm->_sceneObjects->isBetweenTwoXZ(actorId + kSceneObjectOffsetActors, x1 - 12.0f, z1 - 12.0f, x2 - 12.0f, z2 - 12.0f) + || _vm->_sceneObjects->isBetweenTwoXZ(actorId + kSceneObjectOffsetActors, x1 + 12.0f, z1 - 12.0f, x2 + 12.0f, z2 - 12.0f) + || _vm->_sceneObjects->isBetweenTwoXZ(actorId + kSceneObjectOffsetActors, x1 + 12.0f, z1 + 12.0f, x2 + 12.0f, z2 + 12.0f) + || _vm->_sceneObjects->isBetweenTwoXZ(actorId + kSceneObjectOffsetActors, x1 - 12.0f, z1 + 12.0f, x2 - 12.0f, z2 + 12.0f); } void ScriptBase::Actor_Set_Goal_Number(int actorId, int goalNumber) { @@ -594,11 +572,11 @@ bool ScriptBase::Actor_Clue_Query(int actorId, int clueId) { } void ScriptBase::Actor_Clues_Transfer_New_To_Mainframe(int actorId) { - _vm->_actors[actorId]->copyClues(VOICEOVER_ACTOR); + _vm->_actors[actorId]->copyClues(Actors::kActorVoiceOver); } void ScriptBase::Actor_Clues_Transfer_New_From_Mainframe(int actorId) { - _vm->_actors[VOICEOVER_ACTOR]->copyClues(actorId); + _vm->_actors[Actors::kActorVoiceOver]->copyClues(actorId); } void ScriptBase::Actor_Set_Invisible(int actorId, bool isInvisible) { @@ -1126,16 +1104,16 @@ void ScriptBase::Give_McCoy_Ammo(int ammoType, int ammo) { _vm->_settings->addAmmo(ammoType, ammo); } -void ScriptBase::Assign_Player_Gun_Hit_Sounds(int row, int soundId1, int soundId2, int soundId3) { - _vm->_combat->setHitSoundId(row, 0, soundId1); - _vm->_combat->setHitSoundId(row, 1, soundId2); - _vm->_combat->setHitSoundId(row, 2, soundId3); +void ScriptBase::Assign_Player_Gun_Hit_Sounds(int ammoType, int soundId1, int soundId2, int soundId3) { + _vm->_combat->setHitSound(ammoType, 0, soundId1); + _vm->_combat->setHitSound(ammoType, 1, soundId2); + _vm->_combat->setHitSound(ammoType, 2, soundId3); } -void ScriptBase::Assign_Player_Gun_Miss_Sounds(int row, int soundId1, int soundId2, int soundId3) { - _vm->_combat->setMissSoundId(row, 0, soundId1); - _vm->_combat->setMissSoundId(row, 1, soundId2); - _vm->_combat->setMissSoundId(row, 2, soundId3); +void ScriptBase::Assign_Player_Gun_Miss_Sounds(int ammoType, int soundId1, int soundId2, int soundId3) { + _vm->_combat->setMissSound(ammoType, 0, soundId1); + _vm->_combat->setMissSound(ammoType, 1, soundId2); + _vm->_combat->setMissSound(ammoType, 2, soundId3); } void ScriptBase::Disable_Shadows(int animationsIdsList[], int listSize) { @@ -1152,7 +1130,7 @@ void ScriptBase::Actor_Retired_Here(int actorId, int width, int height, int reti actor->getXYZ(&actorPosition.x, &actorPosition.y, &actorPosition.z); actor->retire(retired, width, height, retiredByActorId); actor->setAtXYZ(actorPosition, actor->getFacing(), true, false, true); - _vm->_sceneObjects->setRetired(actorId + SCENE_OBJECTS_ACTORS_OFFSET, true); + _vm->_sceneObjects->setRetired(actorId + kSceneObjectOffsetActors, true); } void ScriptBase::Clickable_Object(const char *objectName) { @@ -1209,24 +1187,24 @@ void ScriptBase::Set_Fade_Density(float density) { _vm->_scene->_set->_effects->setFadeDensity(density); } -void ScriptBase::Set_Fog_Color(const char* fogName, float r, float g, float b) { +void ScriptBase::Set_Fog_Color(const char *fogName, float r, float g, float b) { _vm->_scene->_set->_effects->setFogColor(fogName, r, g, b); } -void ScriptBase::Set_Fog_Density(const char* fogName, float density) { +void ScriptBase::Set_Fog_Density(const char *fogName, float density) { _vm->_scene->_set->_effects->setFogDensity(fogName, density); } void ScriptBase::ADQ_Flush() { - _vm->_adq->flush(0, true); + _vm->_actorDialogueQueue->flush(0, true); } void ScriptBase::ADQ_Add(int actorId, int sentenceId, int animationMode) { - _vm->_adq->add(actorId, sentenceId, animationMode); + _vm->_actorDialogueQueue->add(actorId, sentenceId, animationMode); } void ScriptBase::ADQ_Add_Pause(int delay) { - _vm->_adq->addPause(delay); + _vm->_actorDialogueQueue->addPause(delay); } bool ScriptBase::Game_Over() { @@ -1289,22 +1267,22 @@ void ScriptBase::AI_Movement_Track_Flush(int actorId) { _vm->_actors[actorId]->stopWalking(false); } -void ScriptBase::KIA_Play_Actor_Dialogue(int a1, int a2) { - //TODO - warning("KIA_Play_Actor_Dialogue(%d, %d)", a1, a2); +void ScriptBase::KIA_Play_Actor_Dialogue(int actorId, int sentenceId) { + _vm->gameWaitForActive(); + _vm->_kia->playActorDialogue(actorId, sentenceId); } -void ScriptBase::KIA_Play_Slice_Model(int a1) { - //TODO - warning("KIA_Play_Slice_Model(%d)", a1); +void ScriptBase::KIA_Play_Slice_Model(int sliceModelId) { + _vm->gameWaitForActive(); + _vm->_kia->playSliceModel(sliceModelId); } -void ScriptBase::KIA_Play_Photograph(int a1) { - //TODO - warning("KIA_Play_Photograph(%d)", a1); +void ScriptBase::KIA_Play_Photograph(int photographId) { + _vm->gameWaitForActive(); + _vm->_kia->playPhotograph(photographId); } -void ScriptBase::ESPER_Add_Photo(const char* fileName, int a2, int a3) { +void ScriptBase::ESPER_Add_Photo(const char *fileName, int a2, int a3) { //TODO warning("ESPER_Add_Photo(%s, %d, %d)", fileName, a2, a3); } diff --git a/engines/bladerunner/script/script.h b/engines/bladerunner/script/script.h index 48bda147d6..3b6e66ab5e 100644 --- a/engines/bladerunner/script/script.h +++ b/engines/bladerunner/script/script.h @@ -26,437 +26,10 @@ #include "common/str.h" #include "bladerunner/bladerunner.h" +#include "bladerunner/game_constants.h" namespace BladeRunner { -enum Actors { - kActorMcCoy = 0, - kActorSteele = 1, - kActorGordo = 2, - kActorDektora = 3, - kActorGuzza = 4, - kActorClovis = 5, - kActorLucy = 6, - kActorIzo = 7, - kActorSadik = 8, - kActorCrazylegs = 9, - kActorLuther = 10, - kActorGrigorian = 11, - kActorTransient = 12, - kActorLance = 13, - kActorBulletBob = 14, - kActorRunciter = 15, - kActorInsectDealer = 16, - kActorTyrellGuard = 17, - kActorEarlyQ = 18, - kActorZuben = 19, - kActorHasan = 20, - kActorMarcus = 21, - kActorMia = 22, - kActorOfficerLeary = 23, - kActorOfficerGrayford = 24, - kActorHanoi = 25, - kActorBaker = 26, - kActorDeskClerk = 27, - kActorHowieLee = 28, - kActorFishDealer = 29, - kActorKlein = 30, - kActorMurray = 31, - kActorHawkersBarkeep = 32, - kActorHolloway = 33, - kActorSergeantWalls = 34, - kActorMoraji = 35, - kActorTheBard = 36, - kActorPhotographer = 37, - kActorDispatcher = 38, - kActorAnsweringMachine = 39, - kActorRajif = 40, - kActorGovernorKolvig = 41, - kActorEarlyQBartender = 42, - kActorHawkersParrot = 43, - kActorTaffyPatron = 44, - kActorLockupGuard = 45, - kActorTeenager = 46, - kActorHysteriaPatron1 = 47, - kActorHysteriaPatron2 = 48, - kActorHysteriaPatron3 = 49, - kActorShoeshineMan = 50, - kActorTyrell = 51, - kActorChew = 52, - kActorGaff = 53, - kActorBryant = 54, - kActorTaffy = 55, - kActorSebastian = 56, - kActorRachael = 57, - kActorGeneralDoll = 58, - kActorIsabella = 59, - kActorBlimpGuy = 60, - kActorNewscaster = 61, - kActorLeon = 62, - kActorMaleAnnouncer = 63, - kActorFreeSlotA = 64, - kActorFreeSlotB = 65, - kActorMaggie = 66, - kActorGenwalkerA = 67, - kActorGenwalkerB = 68, - kActorGenwalkerC = 69, - kActorMutant1 = 70, - kActorMutant2 = 71, - kActorMutant3 = 72, - kActorVoiceOver = 99 -}; - -enum Clues { - kClueOfficersStatement = 0, - kClueDoorForced1 = 1, - kClueDoorForced2 = 2, - kClueLimpingFootprints = 3, - kClueGracefulFootprints = 4, - kClueShellCasings = 5, - kClueCandy = 6, - kClueToyDog = 7, - kClueChopstickWrapper = 8, - kClueSushiMenu = 9, - kClueLabCorpses = 10, - kClueLabShellCasings = 11, - kClueRuncitersVideo = 12, - kClueLucy = 13, - kClueDragonflyAnklet = 14, - kClueReferenceLetter = 15, - kClueCrowdInterviewA = 16, - kClueCrowdInterviewB = 17, - kClueZubenRunsAway = 18, - kClueZubenInterview = 19, - kClueZuben = 20, - kClueBigManLimping = 21, - kClueRunciterInterviewA = 22, - kClueRunciterInterviewB1 = 23, - kClueRunciterInterviewB2 = 24, - kClueHowieLeeInterview = 25, - kCluePaintTransfer = 26, - kClueChromeDebris = 27, - kClueRuncitersViewA = 28, - kClueRuncitersViewB = 29, - kClueCarColorAndMake = 30, - kCluePartialLicenseNumber = 31, - kClueBriefcase = 32, - kClueGaffsInformation = 33, - kClueCrystalVisitedRunciters = 34, - kClueCrystalVisitedChinatown = 35, - kClueWantedPoster = 36, - kClueLicensePlate = 37, - kClueLicensePlateMatch = 38, - kClueLabPaintTransfer = 39, - kClueDispatchHitAndRun = 40, - kClueInceptShotRoy = 41, - kClueInceptShotsLeon = 42, - kCluePhoneCallGuzza = 43, - kClueDragonflyEarring = 44, - kClueTyrellSecurity = 45, - kClueTyrellGuardInterview = 46, - kClueBombingSuspect = 47, - kClueSadiksGun = 48, - kClueDetonatorWire = 49, - kClueVictimInformation = 50, - kClueAttemptedFileAccess = 51, - kClueCrystalsCase = 52, - kClueKingstonKitchenBox1 = 53, - kClueTyrellSalesPamphlet1 = 54, - kClueTyrellSalesPamphlet2 = 55, - kCluePeruvianLadyInterview = 56, - kClueHasanInterview = 57, - kClueBobInterview1 = 58, - kClueBobInterview2 = 59, - kClueIzoInterview = 60, - kClueIzosWarning = 61, - kClueRadiationGoggles = 62, - kClueGogglesReplicantIssue = 63, - kClueFishLadyInterview = 64, - kClueDogCollar1 = 65, - kClueWeaponsCache = 66, - kClueChewInterview = 67, - kClueMorajiInterview = 68, - kClueGordoInterview1 = 69, - kClueGordoInterview2 = 70, - kClueAnsweringMachineMessage = 71, - kClueChessTable = 72, - kClueSightingSadikBradbury = 73, - kClueStaggeredbyPunches = 74, - kClueMaggieBracelet = 75, - kClueEnvelope = 76, - kClueIzosFriend = 77, - kClueChinaBarSecurityPhoto = 78, - kCluePurchasedScorpions = 79, - kClueWeaponsOrderForm = 80, - kClueShippingForm = 81, - kClueGuzzasCash = 82, - kCluePoliceIssueWeapons = 83, - kClueHysteriaToken = 84, - kClueRagDoll = 85, - kClueMoonbus1 = 86, - kClueCheese = 87, - kClueDektorasDressingRoom = 88, - kClueEarlyQsClub = 89, - kClueDragonflyCollection = 90, - kClueDragonflyBelt = 91, - kClueEarlyQInterview = 92, - kClueStrangeScale1 = 93, - kClueDektoraInterview1 = 94, - kClueSuspectDektora = 95, - kClueDektoraInterview2 = 96, - kClueDektoraInterview3 = 97, - kClueDektorasCard = 98, - kClueGrigoriansNote = 99, - kClueCollectionReceipt = 100, - kClueSpecialIngredient = 101, - kClueStolenCheese = 102, - kClueGordoInterview3 = 103, - kClueGordoConfession = 104, - kClueGordosLighter1 = 105, - kClueGordosLighter2 = 106, - kClueDektoraInterview4 = 107, - kClueHollowayInterview = 108, - kClueBakersBadge = 109, - kClueHoldensBadge = 110, - kClueCar = 111, - kClueCarIdentified = 112, - kClueCarRegistration1 = 113, - kClueCarRegistration2 = 114, - kClueCarRegistration3 = 115, - kClueCrazylegsInterview1 = 116, - kClueCrazylegsInterview2 = 117, - kClueLichenDogWrapper = 118, - kClueRequisitionForm = 119, - kClueScaryChair = 120, - kClueIzosStashRaided = 121, - kClueHomelessManInterview1 = 122, - kClueHomelessManInterview2 = 123, - kClueHomelessManKid = 124, - kClueFolder = 125, - kClueGuzzaFramedMcCoy = 126, - kClueOriginalShippingForm = 127, - kClueOriginalRequisitionForm = 128, - kClueCandyWrapper = 129, - kClueGordoBlabs = 130, - kClueFlaskOfAbsinthe = 131, - kClueGuzzaAgreesToMeet = 132, - kClueDektoraConfession = 133, - kClueRunciterConfession1 = 134, - kClueRunciterConfession2 = 135, - kClueLutherLanceInterview = 136, - kClueMoonbus2 = 137, - kClueMoonbusCloseup = 138, - kCluePhoneCallDektora1 = 139, - kCluePhoneCallDektora2 = 140, - kCluePhoneCallLucy1 = 141, - kCluePhoneCallLucy2 = 142, - kCluePhoneCallClovis = 143, - kCluePhoneCallCrystal = 144, - kCluePowerSource = 145, - kClueBomb = 146, - kClueDNATyrell = 147, - kClueDNASebastian = 148, - kClueDNAChew = 149, - kClueDNAMoraji = 150, - kClueDNALutherLance = 151, - kClueDNAMarcus = 152, - kClueGarterSnake = 153, - kClueSlug = 154, - kClueGoldfish = 155, - kClueZubenTalksAboutLucy1 = 156, - kClueZubenTalksAboutLucy2 = 157, - kClueZubensMotive = 158, - kClueSightingBulletBob = 159, - kClueSightingClovis = 160, - kClueSightingDektora = 161, - kClueVKDektoraReplicant = 162, - kClueVKDektoraHuman = 163, - kClueVKBobGorskyReplicant = 164, - kClueVKBobGorskyHuman = 165, - kClueVKLutherLanceReplicant = 166, - kClueVKLutherLanceHuman = 167, - kClueVKGrigorianReplicant = 168, - kClueVKGrigorianHuman = 169, - kClueVKIzoReplicant = 170, - kClueVKIzoHuman = 171, - kClueVKCrazylegsReplicant = 172, - kClueVKCrazylegsHuman = 173, - kClueVKRunciterReplicant = 174, - kClueVKRunciterHuman = 175, - kClueVKEarlyQReplicant = 176, - kClueVKEarlyQHuman = 177, - kClueCrimeSceneNotes = 178, - kClueGrigorianInterviewA = 179, - kClueGrigorianInterviewB1 = 180, - kClueGrigorianInterviewB2 = 181, - kClueLabAnalysisGoldChain = 182, - kClueSightingZuben = 183, - kClueCrystalRetiredZuben = 184, - kClueCrystalRetiredGordo = 185, - kClueSightingGordo = 186, - kClueCrystalRetiredIzo = 187, - kClueClovisIncept = 188, - kClueDektoraIncept = 189, - kClueLucyIncept = 190, - kClueGordoIncept = 191, - kClueIzoIncept = 192, - kClueSadikIncept = 193, - kClueZubenIncept = 194, - kClueMcCoyIncept = 195, - kClueWarRecordsGordoFrizz = 196, - kCluePoliceWeaponUsed = 197, - kClueMcCoysWeaponUsedonBob = 198, - kClueBobRobbed = 199, - kClueBobShotInSelfDefense = 200, - kClueBobShotInColdBlood = 201, - kClueMcCoyRecoveredHoldensBadge = 202, - kClueCrystalTestedBulletBob = 203, - kClueCrystalRetiredBob = 204, - kClueCrystalTestedCrazylegs = 205, - kClueCrystalRetiredCrazylegs = 206, - kClueCrystalArrestedCrazylegs = 207, - kClueCrystalTestedRunciter = 208, - kClueCrystalRetiredRunciter1 = 209, - kClueCrystalRetiredRunciter2 = 210, - kClueSightingMcCoyRuncitersShop = 211, - kClueMcCoyKilledRunciter1 = 212, - kClueMcCoysDescription = 213, - kClueMcCoyIsABladeRunner = 214, - kClueMcCoyLetZubenEscape = 215, - kClueMcCoyWarnedIzo = 216, - kClueMcCoyHelpedIzoIzoIsAReplicant = 217, - kClueMcCoyHelpedDektora = 218, - kClueMcCoyHelpedLucy = 219, - kClueMcCoyHelpedGordo = 220, - kClueMcCoyShotGuzza = 221, - kClueMcCoyRetiredZuben = 222, - kClueMcCoyRetiredLucy = 223, - kClueMcCoyRetiredDektora = 224, - kClueMcCoyRetiredGordo = 225, - kClueMcCoyRetiredSadik = 226, - kClueMcCoyShotZubenintheback = 227, - kClueMcCoyRetiredLutherLance = 228, - kClueMcCoyBetrayal = 229, - kClueMcCoyKilledRunciter2 = 230, - kClueClovisOrdersMcCoysDeath = 231, - kClueEarlyAttemptedToSeduceLucy = 232, - kClueCarWasStolen = 233, - kClueGrigoriansResponse1 = 234, - kClueGrigoriansResponse2 = 235, - kClueCrazysInvolvement = 236, - kClueGrigoriansResources = 237, - kClueMcCoyPulledAGun = 238, - kClueMcCoyIsStupid = 239, - kClueMcCoyIsAnnoying = 240, - kClueMcCoyIsKind = 241, - kClueMcCoyIsInsane = 242, - kClueAnimalMurderSuspect = 243, - kClueMilitaryBoots = 244, - kClueOuterDressingRoom = 245, - kCluePhotoOfMcCoy1 = 246, - kCluePhotoOfMcCoy2 = 247, - kClueEarlyQAndLucy = 248, - kClueClovisflowers = 249, - kClueLucyWithDektora = 250, - kClueWomanInAnimoidRow = 251, - kClueScorpions = 252, - kClueStrangeScale2 = 253, - kClueChinaBarSecurityCamera = 254, - kClueIzo = 255, - kClueGuzza = 256, - kClueChinaBarSecurityDisc = 257, - kClueScorpionbox = 258, - kClueTyrellSecurityPhoto = 259, - kClueChinaBar = 260, - kCluePlasticExplosive = 261, - kClueDogCollar2 = 262, - kClueKingstonKitchenBox2 = 263, - kClueCrystalsCigarette = 264, - kClueSpinnerKeys = 265, - kClueAct2Ended = 266, - kClueAct3Ended = 267, - kClueAct4Ended = 268, - kClueExpertBomber = 269, - kClueAmateurBomber = 270, - kClueVKLucyReplicant = 271, - kClueVKLucyHuman = 272, - kClueLucyInterview = 273, - kClueMoonbusReflection = 274, - kClueMcCoyAtMoonbus = 275, - kClueClovisAtMoonbus = 276, - kClueSadikAtMoonbus = 277, - kClueRachaelInterview = 278, - kClueTyrellInterview = 279, - kClueRuncitersConfession1 = 280, - kClueRuncitersConfession2 = 281, - kClueRuncitersConfession3 = 282, - kClueEarlyInterviewA = 283, - kClueEarlyInterviewB1 = 284, - kClueEarlyInterviewB2 = 285, - kClueCrazylegsInterview3 = 286, - kClueCrazylegGgrovels = 287 -}; - -enum ClueTypes { - kClueTypePhotograph = 0, - kClueTypeVideoClip = 1, - kClueTypeAudioRecording = 2, - kClueTypeObject = 3 -}; - -enum Crimes { - kCrimeAnimalMurder = 0, - kCrimeEisendullerMurder = 1, - kCrimeArmsDealing = 2, - kCrimeMorajiMurder = 3, - kCrimeBradburyAssault = 4, - kCrimeFactoryBombing = 5, - kCrimeBobMurder = 6, - kCrimeRunciterMurder = 7, - kCrimeMoonbusHijacking = 8 -}; - -enum SpinnerDestinations { - kSpinnerDestinationPoliceStation = 0, - kSpinnerDestinationMcCoysApartment = 1, - kSpinnerDestinationRuncitersAnimals = 2, - kSpinnerDestinationChinatown = 3, - kSpinnerDestinationAnimoidRow = 4, - kSpinnerDestinationTyrellBuilding = 5, - kSpinnerDestinationDNARow = 6, - kSpinnerDestinationBradburyBuilding = 7, - kSpinnerDestinationNightclubRow = 8, - kSpinnerDestinationHysteriaHall = 9 -}; - -enum Flags { - kFlagIntroPlayed = 24, - kFlagMA02toMA06 = 33, - kFlagMA06ToMA02 = 34, - kFlagMA02ToMA04 = 35, - kFlagMA04ToMA02 = 36, - kFlagMA01toMA06 = 37, - kFlagMA06toMA01 = 38, - kFlagMA07toMA06 = 57, - kFlagMA06toMA07 = 58, - kFlagMA04toMA05 = 62, - kFlagMA05toMA04 = 63, - kFlagRC01PoliceDone = 186, - kFlagMA01Locked = 250 -}; - -enum Variables { - kVariableWalkLoopActor = 37, - kVariableWalkLoopRun = 38 -}; - -enum Outtakes { - kOuttakeIntro = 0, - kOuttakeWestwood = 28, - kOuttakeDescent = 33, - kOuttakeBladeRunner = 41 -}; - class BladeRunnerEngine; class ScriptBase { @@ -464,7 +37,9 @@ protected: BladeRunnerEngine *_vm; public: - ScriptBase(BladeRunnerEngine *vm) : _vm(vm) {} + ScriptBase(BladeRunnerEngine *vm) { + _vm = vm; + } virtual ~ScriptBase() {} protected: @@ -663,8 +238,8 @@ protected: // Query_Score void Set_Score(int a0, int a1); void Give_McCoy_Ammo(int ammoType, int ammo); - void Assign_Player_Gun_Hit_Sounds(int row, int soundId1, int soundId2, int soundId3); - void Assign_Player_Gun_Miss_Sounds(int row, int soundId1, int soundId2, int soundId3); + void Assign_Player_Gun_Hit_Sounds(int ammoType, int soundId1, int soundId2, int soundId3); + void Assign_Player_Gun_Miss_Sounds(int ammoType, int soundId1, int soundId2, int soundId3); void Disable_Shadows(int animationsIdsList[], int listSize); bool Query_System_Currently_Loading_Game(); void Actor_Retired_Here(int actorId, int width, int height, int retired, int retiredByActorId); @@ -677,8 +252,8 @@ protected: void Un_Combat_Target_Object(const char *objectName); void Set_Fade_Color(float r, float g, float b); void Set_Fade_Density(float density); - void Set_Fog_Color(const char* fogName, float r, float g, float b); - void Set_Fog_Density(const char* fogName, float density); + void Set_Fog_Color(const char *fogName, float r, float g, float b); + void Set_Fog_Density(const char *fogName, float density); void ADQ_Flush(); void ADQ_Add(int actorId, int sentenceId, int animationMode); void ADQ_Add_Pause(int delay); @@ -697,12 +272,12 @@ protected: void AI_Movement_Track_Append(int actorId, int waypointId, int delay); void AI_Movement_Track_Flush(int actorId); - void ESPER_Add_Photo(const char* fileName, int a2, int a3); + void ESPER_Add_Photo(const char *fileName, int a2, int a3); void ESPER_Define_Special_Region(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12, int a13, const char *name); - void KIA_Play_Actor_Dialogue(int a1, int a2); - void KIA_Play_Slice_Model(int a1); - void KIA_Play_Photograph(int a1); + void KIA_Play_Actor_Dialogue(int actorId, int sentenceId); + void KIA_Play_Slice_Model(int sliceModelId); + void KIA_Play_Photograph(int photographId); void VK_Play_Speech_Line(int actorIndex, int a2, float a3); void VK_Add_Question(int a1, int a2, int a3); diff --git a/engines/bladerunner/script/vk.cpp b/engines/bladerunner/script/vk.cpp index 0650cb4987..421b86c9f9 100644 --- a/engines/bladerunner/script/vk.cpp +++ b/engines/bladerunner/script/vk.cpp @@ -26,7 +26,7 @@ namespace BladeRunner { -bool ScriptVK::SCRIPT_VK_DLL_Initialize(int a1) { +bool VKScript::SCRIPT_VK_DLL_Initialize(int a1) { VK_Add_Question(0, 7400, -1); VK_Add_Question(0, 7405, -1); VK_Add_Question(0, 7410, -1); @@ -82,7 +82,7 @@ bool ScriptVK::SCRIPT_VK_DLL_Initialize(int a1) { } } -void ScriptVK::SCRIPT_VK_DLL_Calibrate(int a1) { +void VKScript::SCRIPT_VK_DLL_Calibrate(int a1) { if (unknown1 == 0) { VK_Play_Speech_Line(0, 7370, 0.5f); VK_Play_Speech_Line(0, 7385, 0.5f); @@ -101,12 +101,12 @@ void ScriptVK::SCRIPT_VK_DLL_Calibrate(int a1) { } } -bool ScriptVK::SCRIPT_VK_DLL_Begin_Test() { +bool VKScript::SCRIPT_VK_DLL_Begin_Test() { unknown2 = 0; return false; } -void ScriptVK::SCRIPT_VK_DLL_McCoy_Asks_Question(int a1, int a2) { +void VKScript::SCRIPT_VK_DLL_McCoy_Asks_Question(int a1, int a2) { switch (a2) { case 7400: VK_Play_Speech_Line(0, 7400, 0.5f); @@ -300,7 +300,7 @@ void ScriptVK::SCRIPT_VK_DLL_McCoy_Asks_Question(int a1, int a2) { } } -void ScriptVK::SCRIPT_VK_DLL_Question_Asked(int a1, int a2) { +void VKScript::SCRIPT_VK_DLL_Question_Asked(int a1, int a2) { switch (a1) { case 15: sub_407CF8(a2); @@ -320,7 +320,7 @@ void ScriptVK::SCRIPT_VK_DLL_Question_Asked(int a1, int a2) { } } -void ScriptVK::SCRIPT_VK_DLL_Shutdown(int a1, signed int a2, signed int a3) { +void VKScript::SCRIPT_VK_DLL_Shutdown(int a1, signed int a2, signed int a3) { if (a2 > 79 && a3 > 79) { VK_Play_Speech_Line(39, 450, 0.5f); } else if (a3 > 79) { @@ -367,7 +367,7 @@ void ScriptVK::SCRIPT_VK_DLL_Shutdown(int a1, signed int a2, signed int a3) { VK_Play_Speech_Line(39, 460, 0.5f); } -void ScriptVK::sub_402604(int a1) { +void VKScript::sub_402604(int a1) { switch (a1) { case 7385: VK_Subject_Reacts(40, 0, 0, 0); @@ -858,7 +858,7 @@ void ScriptVK::sub_402604(int a1) { } } -void ScriptVK::sub_404B44(int a1) { +void VKScript::sub_404B44(int a1) { switch (a1) { case 7385: VK_Subject_Reacts(20, 0, 0, 5); @@ -1117,7 +1117,7 @@ void ScriptVK::sub_404B44(int a1) { } } -void ScriptVK::sub_406088(int a1) { +void VKScript::sub_406088(int a1) { switch (a1) { case 7385: VK_Subject_Reacts(36, 0, 0, 0); @@ -1472,7 +1472,7 @@ void ScriptVK::sub_406088(int a1) { } } -void ScriptVK::sub_407CF8(int a1) { +void VKScript::sub_407CF8(int a1) { switch (a1) { case 7385: VK_Subject_Reacts(20, 10, 20, 0); @@ -1651,7 +1651,7 @@ void ScriptVK::sub_407CF8(int a1) { } } -void ScriptVK::sub_40897C(int a1) { +void VKScript::sub_40897C(int a1) { switch (a1) { case 7385: VK_Eye_Animates(1); @@ -1980,7 +1980,7 @@ void ScriptVK::sub_40897C(int a1) { } } -void ScriptVK::sub_40A300(int a1, int a2) { +void VKScript::sub_40A300(int a1, int a2) { switch (a1) { case 15: sub_407CF8(7385); @@ -2000,7 +2000,7 @@ void ScriptVK::sub_40A300(int a1, int a2) { } } -void ScriptVK::sub_40A350(int a1, int a2) { +void VKScript::sub_40A350(int a1, int a2) { switch (a1) { case 15: sub_407CF8(7390); @@ -2020,7 +2020,7 @@ void ScriptVK::sub_40A350(int a1, int a2) { } } -void ScriptVK::sub_40A3A0(int a1, int a2) { +void VKScript::sub_40A3A0(int a1, int a2) { switch (a1) { case 15: sub_407CF8(7395); @@ -2040,14 +2040,14 @@ void ScriptVK::sub_40A3A0(int a1, int a2) { } } -void ScriptVK::sub_40A3F0(int a1) { +void VKScript::sub_40A3F0(int a1) { VK_Play_Speech_Line(3, 1470, 0.5f); VK_Subject_Reacts(40, 4, 4, 0); VK_Play_Speech_Line(0, 7795, 0.5f); VK_Play_Speech_Line(3, 1480, 0.5f); } -void ScriptVK::sub_40A470(int a1) { +void VKScript::sub_40A470(int a1) { VK_Subject_Reacts(40, 2, 2, 0); VK_Play_Speech_Line(3, 1450, 0.5f); VK_Play_Speech_Line(0, 7785, 0.5f); @@ -2055,7 +2055,7 @@ void ScriptVK::sub_40A470(int a1) { VK_Play_Speech_Line(0, 7790, 0.5f); } -void ScriptVK::sub_40A510(int a1) { +void VKScript::sub_40A510(int a1) { VK_Subject_Reacts(36, 0, 0, 0); VK_Play_Speech_Line(3, 1440, 0.5f); } diff --git a/engines/bladerunner/script/vk.h b/engines/bladerunner/script/vk.h index 087faa88d1..0835568f9e 100644 --- a/engines/bladerunner/script/vk.h +++ b/engines/bladerunner/script/vk.h @@ -29,9 +29,9 @@ namespace BladeRunner { class BladeRunnerEngine; -class ScriptVK : ScriptBase { +class VKScript : ScriptBase { public: - ScriptVK(BladeRunnerEngine *vm) + VKScript(BladeRunnerEngine *vm) : ScriptBase(vm) { } |