diff options
Diffstat (limited to 'engines/bladerunner/script')
131 files changed, 757 insertions, 672 deletions
diff --git a/engines/bladerunner/script/ai/leon.cpp b/engines/bladerunner/script/ai/leon.cpp index 45e1c7423d..f1f619f382 100644 --- a/engines/bladerunner/script/ai/leon.cpp +++ b/engines/bladerunner/script/ai/leon.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/ai.h" +#include "bladerunner/script/ai_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/ai/maggie.cpp b/engines/bladerunner/script/ai/maggie.cpp index 150a2a3a0b..50e5013dab 100644 --- a/engines/bladerunner/script/ai/maggie.cpp +++ b/engines/bladerunner/script/ai/maggie.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/ai.h" +#include "bladerunner/script/ai_script.h" #include "bladerunner/vector.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp index 366361e365..1129ff937d 100644 --- a/engines/bladerunner/script/ai/mccoy.cpp +++ b/engines/bladerunner/script/ai/mccoy.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/ai.h" +#include "bladerunner/script/ai_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp index 9b85a4cdf8..da6cdfc7e5 100644 --- a/engines/bladerunner/script/ai/officer_leary.cpp +++ b/engines/bladerunner/script/ai/officer_leary.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/ai.h" +#include "bladerunner/script/ai_script.h" namespace BladeRunner { @@ -45,7 +45,7 @@ bool AIScriptOfficerLeary::Update() { } else if (Global_Variable_Query(1) == 5 && Actor_Query_Goal_Number(kActorOfficerLeary) < 400) { AI_Movement_Track_Flush(kActorOfficerLeary); Actor_Set_Goal_Number(kActorOfficerLeary, 400); - } else if (!Game_Flag_Query(182) && Game_Flag_Query(147) == 1 && Game_Flag_Query(163) == 1 && Player_Query_Current_Scene() != 78 && Global_Variable_Query(1) < 3) { + } else if (!Game_Flag_Query(182) && Game_Flag_Query(147) == 1 && Game_Flag_Query(kFlagChromeDebrisTaken) == 1 && Player_Query_Current_Scene() != 78 && Global_Variable_Query(1) < 3) { Game_Flag_Set(kFlagRC01PoliceDone); Actor_Set_Goal_Number(kActorOfficerLeary, 3); } else if (Actor_Query_Goal_Number(kActorOfficerLeary) != 1 && Actor_Query_Goal_Number(kActorOfficerLeary) != 2 && Game_Flag_Query(199) == 1) { @@ -854,7 +854,7 @@ bool AIScriptOfficerLeary::UpdateAnimation(int *animation, int *frame) { *frame = var_45D5B4_animation_frame; return true; case 0: - if (Game_Flag_Query(199) && !Game_Flag_Query(392)) { + if (Game_Flag_Query(199) && !Game_Flag_Query(KFlagMcCoyAndOfficerLearyTalking)) { var_45D5B0_animation_state = 31; var_45D5B4_animation_frame = 0; *animation = 604; diff --git a/engines/bladerunner/script/ai/runciter.cpp b/engines/bladerunner/script/ai/runciter.cpp index 0c66876efb..c0c3d3ff68 100644 --- a/engines/bladerunner/script/ai/runciter.cpp +++ b/engines/bladerunner/script/ai/runciter.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/ai.h" +#include "bladerunner/script/ai_script.h" namespace BladeRunner { @@ -99,7 +99,7 @@ void AIScriptRunciter::OtherAgentEnteredCombatMode(int otherActorId, int combatM Actor_Says(kActorRunciter, 610, 18); Actor_Says(kActorMcCoy, 4785, -1); Actor_Says(kActorRunciter, 620, 15); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { Actor_Says(kActorRunciter, 630, 12); Actor_Says(kActorRunciter, 640, 17); Actor_Says(kActorMcCoy, 4790, -1); diff --git a/engines/bladerunner/script/ai.cpp b/engines/bladerunner/script/ai_script.cpp index f61b0212a7..503fb733df 100644 --- a/engines/bladerunner/script/ai.cpp +++ b/engines/bladerunner/script/ai_script.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/ai.h" +#include "bladerunner/script/ai_script.h" #include "bladerunner/bladerunner.h" @@ -55,14 +55,14 @@ AIScripts::~AIScripts() { delete[] _actorUpdating; } -void AIScripts::Initialize(int actor) { +void AIScripts::initialize(int actor) { assert(actor < _actorCount); if (_AIScripts[actor]) { _AIScripts[actor]->Initialize(); } } -void AIScripts::Update(int actor) { +void AIScripts::update(int actor) { assert(actor < _actorCount); if (this->_actorUpdating[actor] != 1) { this->_actorUpdating[actor] = true; @@ -74,7 +74,7 @@ void AIScripts::Update(int actor) { } } -void AIScripts::TimerExpired(int actor, int timer) { +void AIScripts::timerExpired(int actor, int timer) { assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { @@ -83,7 +83,7 @@ void AIScripts::TimerExpired(int actor, int timer) { _inScriptCounter--; } -void AIScripts::CompletedMovementTrack(int actor) { +void AIScripts::completedMovementTrack(int actor) { assert(actor < _actorCount); if (!_vm->_actors[actor]->inCombat()) { _inScriptCounter++; @@ -94,7 +94,7 @@ void AIScripts::CompletedMovementTrack(int actor) { } } -void AIScripts::ReceivedClue(int actor, int clueId, int fromActorId) { +void AIScripts::receivedClue(int actor, int clueId, int fromActorId) { assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { @@ -103,7 +103,7 @@ void AIScripts::ReceivedClue(int actor, int clueId, int fromActorId) { _inScriptCounter--; } -void AIScripts::ClickedByPlayer(int actor) { +void AIScripts::clickedByPlayer(int actor) { assert(actor < _actorCount); if(_vm->_actors[actor]->inCombat()) { @@ -117,7 +117,7 @@ void AIScripts::ClickedByPlayer(int actor) { _inScriptCounter--; } -void AIScripts::EnteredScene(int actor, int setId) { +void AIScripts::enteredScene(int actor, int setId) { assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { @@ -126,7 +126,7 @@ void AIScripts::EnteredScene(int actor, int setId) { _inScriptCounter--; } -void AIScripts::OtherAgentEnteredThisScene(int actor, int otherActorId) { +void AIScripts::otherAgentEnteredThisScene(int actor, int otherActorId) { assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { @@ -135,7 +135,7 @@ void AIScripts::OtherAgentEnteredThisScene(int actor, int otherActorId) { _inScriptCounter--; } -void AIScripts::OtherAgentExitedThisScene(int actor, int otherActorId) { +void AIScripts::otherAgentExitedThisScene(int actor, int otherActorId) { assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { @@ -144,7 +144,7 @@ void AIScripts::OtherAgentExitedThisScene(int actor, int otherActorId) { _inScriptCounter--; } -void AIScripts::Retired(int actor, int retiredByActorId) { +void AIScripts::retired(int actor, int retiredByActorId) { assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { @@ -153,7 +153,7 @@ void AIScripts::Retired(int actor, int retiredByActorId) { _inScriptCounter--; } -void AIScripts::GoalChanged(int actor, int currentGoalNumber, int newGoalNumber) { +void AIScripts::goalChanged(int actor, int currentGoalNumber, int newGoalNumber) { assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { @@ -162,7 +162,7 @@ void AIScripts::GoalChanged(int actor, int currentGoalNumber, int newGoalNumber) _inScriptCounter--; } -bool AIScripts::ReachedMovementTrackWaypoint(int actor, int waypointId) { +bool AIScripts::reachedMovementTrackWaypoint(int actor, int waypointId) { assert(actor < _actorCount); bool result = false; if (!_vm->_actors[actor]->inCombat()) { @@ -175,7 +175,7 @@ bool AIScripts::ReachedMovementTrackWaypoint(int actor, int waypointId) { return result; } -void AIScripts::UpdateAnimation(int actor, int *animation, int *frame) { +void AIScripts::updateAnimation(int actor, int *animation, int *frame) { assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { @@ -184,7 +184,7 @@ void AIScripts::UpdateAnimation(int actor, int *animation, int *frame) { _inScriptCounter--; } -void AIScripts::ChangeAnimationMode(int actor, int mode) { +void AIScripts::changeAnimationMode(int actor, int mode) { assert(actor < _actorCount); _inScriptCounter++; if (_AIScripts[actor]) { diff --git a/engines/bladerunner/script/ai.h b/engines/bladerunner/script/ai_script.h index 135aef5e9c..c90d023ffb 100644 --- a/engines/bladerunner/script/ai.h +++ b/engines/bladerunner/script/ai_script.h @@ -181,22 +181,22 @@ public: AIScripts(BladeRunnerEngine *vm, int actorCount); ~AIScripts(); - void Initialize(int actor); - void Update(int actor); - void TimerExpired(int actor, int timer); - void CompletedMovementTrack(int actor); - void ReceivedClue(int actor, int clueId, int fromActorId); - void ClickedByPlayer(int actor); - void EnteredScene(int actor, int setId); - void OtherAgentEnteredThisScene(int actor, int otherActorId); - void OtherAgentExitedThisScene(int actor, int otherActorId); - void Retired(int actor, int retiredByActorId); - void GoalChanged(int actor, int currentGoalNumber, int newGoalNumber); - bool ReachedMovementTrackWaypoint(int actor, int waypointId); - void UpdateAnimation(int actor, int *animation, int *frame); - void ChangeAnimationMode(int actor, int mode); - - bool IsInsideScript() const { return _inScriptCounter > 0; } + void initialize(int actor); + void update(int actor); + void timerExpired(int actor, int timer); + void completedMovementTrack(int actor); + void receivedClue(int actor, int clueId, int fromActorId); + void clickedByPlayer(int actor); + void enteredScene(int actor, int setId); + void otherAgentEnteredThisScene(int actor, int otherActorId); + void otherAgentExitedThisScene(int actor, int otherActorId); + void retired(int actor, int retiredByActorId); + void goalChanged(int actor, int currentGoalNumber, int newGoalNumber); + bool reachedMovementTrackWaypoint(int actor, int waypointId); + void updateAnimation(int actor, int *animation, int *frame); + void changeAnimationMode(int actor, int mode); + + bool isInsideScript() const { return _inScriptCounter > 0; } }; } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/esper.cpp b/engines/bladerunner/script/esper_script.cpp index e6c0390cbb..bf369f96ae 100644 --- a/engines/bladerunner/script/esper.cpp +++ b/engines/bladerunner/script/esper_script.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/esper.h" +#include "bladerunner/script/esper_script.h" #include "bladerunner/bladerunner.h" #include "bladerunner/mouse.h" diff --git a/engines/bladerunner/script/esper.h b/engines/bladerunner/script/esper_script.h index 63e30e55e0..63e30e55e0 100644 --- a/engines/bladerunner/script/esper.h +++ b/engines/bladerunner/script/esper_script.h diff --git a/engines/bladerunner/script/init.cpp b/engines/bladerunner/script/init_script.cpp index 76ade879ad..2c0b530118 100644 --- a/engines/bladerunner/script/init.cpp +++ b/engines/bladerunner/script/init_script.cpp @@ -20,13 +20,13 @@ * */ -#include "bladerunner/script/init.h" +#include "bladerunner/script/init_script.h" #include "bladerunner/bladerunner.h" namespace BladeRunner { -void ScriptInit::SCRIPT_Initialize_Game() { +void InitScript::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); @@ -54,7 +54,7 @@ void ScriptInit::SCRIPT_Initialize_Game() { Init_Shadows(); } -void ScriptInit::Init_Globals() { +void InitScript::Init_Globals() { for (int i = 0; i != 55; ++i) Global_Variable_Set(i, 0); @@ -71,38 +71,38 @@ void ScriptInit::Init_Globals() { Set_Score(6, 28); } -void ScriptInit::Init_Game_Flags() { +void InitScript::Init_Game_Flags() { for (int i = 0; i != 730; ++i) { Game_Flag_Reset(i); } if (Random_Query(1, 2) == 1) { - Game_Flag_Set(44); + Game_Flag_Set(kFlagIzoIsReplicant); } if (Random_Query(1, 2) == 1) { - Game_Flag_Set(45); + Game_Flag_Set(kFlagGordoIsReplicant); } if (Random_Query(1, 2) == 1) { - Game_Flag_Set(46); + Game_Flag_Set(kFlagLucyIsReplicant); } if (Random_Query(1, 2) == 1) { - Game_Flag_Set(47); + Game_Flag_Set(kFlagDektoraIsReplicant); } if (Random_Query(1, 2) == 1) { - Game_Flag_Set(48); + Game_Flag_Set(kFlagSadikIsReplicant); } if (Random_Query(1, 2) == 1) { Game_Flag_Set(560); } - if (!Game_Flag_Query(45) && !Game_Flag_Query(46) && !Game_Flag_Query(47)) { - Game_Flag_Set(47); + if (!Game_Flag_Query(kFlagGordoIsReplicant) && !Game_Flag_Query(kFlagLucyIsReplicant) && !Game_Flag_Query(kFlagDektoraIsReplicant)) { + Game_Flag_Set(kFlagDektoraIsReplicant); } - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { Global_Variable_Set(40, 1); - } else if (Game_Flag_Query(45) && !Game_Flag_Query(46)) { + } else if (Game_Flag_Query(kFlagGordoIsReplicant) && !Game_Flag_Query(kFlagLucyIsReplicant)) { Global_Variable_Set(40, 2); - } else if (!Game_Flag_Query(45) && Game_Flag_Query(46)) { + } else if (!Game_Flag_Query(kFlagGordoIsReplicant) && Game_Flag_Query(kFlagLucyIsReplicant)) { Global_Variable_Set(40, 3); } else if (Random_Query(1, 2) == 1) { Global_Variable_Set(40, 2); @@ -111,10 +111,10 @@ void ScriptInit::Init_Game_Flags() { } Game_Flag_Set(182); - Game_Flag_Set(249); + Game_Flag_Set(kFlagSpinnerToRC01); } -void ScriptInit::Init_Clues() { +void InitScript::Init_Clues() { for (int i = 0; i != 288; ++i) { Actor_Clue_Add_To_Database(kActorMcCoy, i, 0, false, false, -1); } @@ -526,7 +526,7 @@ static ClueWeight ClueWeightsForLuther[44] = { {kClueHowieLeeInterview, 30} }; -void ScriptInit::Init_Clues2() { +void InitScript::Init_Clues2() { for (int i = 0; i != 288; ++i) { Actor_Clue_Add_To_Database(kActorVoiceOver, i, 100, false, false, -1); } @@ -1651,7 +1651,7 @@ void ScriptInit::Init_Clues2() { Actor_Clue_Add_To_Database(kActorGenwalkerC, kClueMcCoyIsABladeRunner, 65, false, false, -1); } -void ScriptInit::Init_World_Waypoints() { +void InitScript::Init_World_Waypoints() { World_Waypoint_Set(0, 7, -676.0f, -0.04f, -94.0f); World_Waypoint_Set(1, 7, -807.0f, -0.04f, 109.0f); World_Waypoint_Set(2, 15, 541.8f, 0.38f, -435.68f); @@ -2186,7 +2186,7 @@ void ScriptInit::Init_World_Waypoints() { World_Waypoint_Set(335, 102, -50.0f, 0.0f, 212.0f); } -void ScriptInit::Init_SDB() { +void InitScript::Init_SDB() { SDB_Set_Actor(kSuspectSadik, kActorSadik); SDB_Set_Sex(kSuspectSadik, 1); SDB_Add_MO_Clue(kSuspectSadik, kClueCrystalsCase); @@ -2367,7 +2367,7 @@ void ScriptInit::Init_SDB() { SDB_Add_Photo_Clue(kSuspectGuzza, kClueGuzza, 27); } -void ScriptInit::Init_CDB() { +void InitScript::Init_CDB() { CDB_Set_Crime(kClueOfficersStatement, kCrimeAnimalMurder); CDB_Set_Crime(kClueDoorForced1, kCrimeAnimalMurder); CDB_Set_Crime(kClueDoorForced2, kCrimeAnimalMurder); @@ -2657,7 +2657,7 @@ void ScriptInit::Init_CDB() { CDB_Set_Clue_Asset_Type(kClueFolder, kClueTypeObject); } -void ScriptInit::Init_Spinner() { +void InitScript::Init_Spinner() { Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationPoliceStation, true); Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationMcCoysApartment, true); Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationRuncitersAnimals, true); @@ -2670,7 +2670,7 @@ void ScriptInit::Init_Spinner() { Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationHysteriaHall, false); } -void ScriptInit::Init_Actor_Friendliness() { +void InitScript::Init_Actor_Friendliness() { Actor_Set_Friendliness_To_Other(kActorSteele, kActorMcCoy, 65); Actor_Set_Friendliness_To_Other(kActorSteele, kActorGuzza, 60); Actor_Set_Friendliness_To_Other(kActorSteele, kActorGrigorian, 30); @@ -2800,7 +2800,7 @@ void ScriptInit::Init_Actor_Friendliness() { Actor_Set_Friendliness_To_Other(kActorGaff, kActorSergeantWalls, 70); } -void ScriptInit::Init_Actor_Combat_Aggressiveness() { +void InitScript::Init_Actor_Combat_Aggressiveness() { Actor_Set_Combat_Aggressiveness(kActorGuzza, 50); Actor_Set_Combat_Aggressiveness(kActorBulletBob, 50); Actor_Set_Combat_Aggressiveness(kActorTyrellGuard, 50); @@ -2820,11 +2820,11 @@ void ScriptInit::Init_Actor_Combat_Aggressiveness() { Actor_Set_Combat_Aggressiveness(kActorFreeSlotA, 100); } -void ScriptInit::Init_Actor_Honesty() { +void InitScript::Init_Actor_Honesty() { Actor_Set_Honesty(kActorZuben, 90); } -void ScriptInit::Init_Actor_Intelligence() { +void InitScript::Init_Actor_Intelligence() { Actor_Set_Intelligence(kActorZuben, 20); Actor_Set_Intelligence(kActorGordo, 70); Actor_Set_Intelligence(kActorLucy, 60); @@ -2841,11 +2841,11 @@ void ScriptInit::Init_Actor_Intelligence() { Actor_Set_Intelligence(kActorFreeSlotA, 10); } -void ScriptInit::Init_Actor_Stability() { +void InitScript::Init_Actor_Stability() { Actor_Set_Stability(kActorZuben, 35); } -void ScriptInit::Init_Actor_Health() { +void InitScript::Init_Actor_Health() { Actor_Set_Health(kActorMcCoy, 50, 50); Actor_Set_Health(kActorSteele, 50, 50); Actor_Set_Health(kActorGordo, 50, 50); @@ -2925,24 +2925,24 @@ void ScriptInit::Init_Actor_Health() { Actor_Set_Health(kActorMutant3, 20, 20); Actor_Set_Health(kActorFreeSlotA, 20, 20); Actor_Set_Health(kActorFreeSlotB, 20, 20); - if (Game_Flag_Query(45) == 1) { + if (Game_Flag_Query(kFlagGordoIsReplicant)) { Actor_Set_Health(kActorGordo, 60, 60); } - if (Game_Flag_Query(46) == 1) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { Actor_Set_Health(kActorLucy, 40, 40); } - if (Game_Flag_Query(44) == 1) { + if (Game_Flag_Query(kFlagIzoIsReplicant)) { Actor_Set_Health(kActorIzo, 65, 65); } - if (Game_Flag_Query(47) == 1) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { Actor_Set_Health(kActorDektora, 70, 70); } - if (Game_Flag_Query(48) == 1) { + if (Game_Flag_Query(kFlagSadikIsReplicant)) { Actor_Set_Health(kActorSadik, 80, 80); } } -void ScriptInit::Init_Combat_Cover_Waypoints() { +void InitScript::Init_Combat_Cover_Waypoints() { Combat_Cover_Waypoint_Set_Data(0, 0, 7, 25, -603.0f, 0.0f, 32.0f); Combat_Cover_Waypoint_Set_Data(1, 0, 7, 25, -670.0f, 0.0f, -24.0f); Combat_Cover_Waypoint_Set_Data(2, 0, 7, 25, -604.0f, 0.0f, -96.0f); @@ -2982,7 +2982,7 @@ void ScriptInit::Init_Combat_Cover_Waypoints() { Combat_Cover_Waypoint_Set_Data(36, 20, 41, 38, 357.81f, 40.63f, 387.9f); } -void ScriptInit::Init_Combat_Flee_Waypoints() { +void InitScript::Init_Combat_Flee_Waypoints() { Combat_Flee_Waypoint_Set_Data(0, 4, 37, 34, 187.0f, 8.0f, -197.0f, -1); Combat_Flee_Waypoint_Set_Data(1, 4, 37, 34, 454.0f, 8.0f, -717.0f, -1); Combat_Flee_Waypoint_Set_Data(2, 4, 38, 35, -10.87f, 47.76f, -141.32f, -1); @@ -3062,7 +3062,7 @@ void ScriptInit::Init_Combat_Flee_Waypoints() { Combat_Flee_Waypoint_Set_Data(76, 20, 41, 38, 435.13f, 37.18f, -292.34f, -1); } -void ScriptInit::Init_Shadows() { +void InitScript::Init_Shadows() { int list[] = {440, 37, 38, 83, 874}; Disable_Shadows(list, 5); } diff --git a/engines/bladerunner/script/init.h b/engines/bladerunner/script/init_script.h index 7b95008abb..15069f165c 100644 --- a/engines/bladerunner/script/init.h +++ b/engines/bladerunner/script/init_script.h @@ -29,9 +29,9 @@ namespace BladeRunner { class BladeRunnerEngine; -class ScriptInit : ScriptBase { +class InitScript : ScriptBase { public: - ScriptInit(BladeRunnerEngine *vm) + InitScript(BladeRunnerEngine *vm) : ScriptBase(vm) { } diff --git a/engines/bladerunner/script/kia.cpp b/engines/bladerunner/script/kia_script.cpp index e2db62f463..44d5666592 100644 --- a/engines/bladerunner/script/kia.cpp +++ b/engines/bladerunner/script/kia_script.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/kia.h" +#include "bladerunner/script/kia_script.h" #include "bladerunner/bladerunner.h" #include "bladerunner/mouse.h" @@ -216,7 +216,7 @@ void KIAScript::SCRIPT_KIA_DLL_Play_Clue_Asset_Script(int notUsed, int clueId) { case kClueDetonatorWire: KIA_Play_Slice_Model(974); KIA_Play_Actor_Dialogue(kActorVoiceOver, 2320); - if (Game_Flag_Query(48)) { + if (Game_Flag_Query(kFlagSadikIsReplicant)) { KIA_Play_Actor_Dialogue(kActorVoiceOver, 2330); KIA_Play_Actor_Dialogue(kActorVoiceOver, 2340); } diff --git a/engines/bladerunner/script/kia.h b/engines/bladerunner/script/kia_script.h index f134f8cdff..f134f8cdff 100644 --- a/engines/bladerunner/script/kia.h +++ b/engines/bladerunner/script/kia_script.h diff --git a/engines/bladerunner/script/scene/ar01.cpp b/engines/bladerunner/script/scene/ar01.cpp index 080f67a5e4..d6c33b1913 100644 --- a/engines/bladerunner/script/scene/ar01.cpp +++ b/engines/bladerunner/script/scene/ar01.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -35,7 +35,7 @@ void SceneScriptAR01::InitializeScene() { } Scene_Exit_Add_2D_Exit(0, 134, 165, 177, 290, 3); Scene_Exit_Add_2D_Exit(1, 319, 0, 639, 207, 0); - if (Game_Flag_Query(252)) { + if (Game_Flag_Query(kFlagSpinnerToAR01)) { Scene_Exit_Add_2D_Exit(2, 0, 404, 99, 479, 2); } Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); @@ -67,22 +67,22 @@ void SceneScriptAR01::InitializeScene() { Ambient_Sounds_Add_Sound(375, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); - if (Game_Flag_Query(252) && !Game_Flag_Query(321) && !Game_Flag_Query(323)) { + if (Game_Flag_Query(kFlagSpinnerToAR01) && !Game_Flag_Query(321) && !Game_Flag_Query(323)) { Actor_Set_Invisible(kActorMcCoy, true); Game_Flag_Set(273); Scene_Loop_Start_Special(0, 1, 0); Scene_Loop_Set_Default(2); - } else if (Game_Flag_Query(252) && Game_Flag_Query(321)) { + } else if (Game_Flag_Query(kFlagSpinnerToAR01) && Game_Flag_Query(321)) { Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(2); Game_Flag_Reset(321); - } else if (!Game_Flag_Query(252) && Game_Flag_Query(321)) { + } else if (!Game_Flag_Query(kFlagSpinnerToAR01) && Game_Flag_Query(321)) { Scene_Loop_Start_Special(0, 6, 0); Scene_Loop_Set_Default(7); Game_Flag_Reset(321); - } else if (Game_Flag_Query(252) && Game_Flag_Query(323)) { + } else if (Game_Flag_Query(kFlagSpinnerToAR01) && Game_Flag_Query(323)) { Scene_Loop_Set_Default(2); - } else if (!Game_Flag_Query(252) && Game_Flag_Query(323)) { + } else if (!Game_Flag_Query(kFlagSpinnerToAR01) && Game_Flag_Query(323)) { Scene_Loop_Set_Default(7); } else { Scene_Loop_Set_Default(7); @@ -227,64 +227,64 @@ bool SceneScriptAR01::ClickedOnExit(int exitId) { switch (spinnerDest) { case 0: Game_Flag_Set(178); - Game_Flag_Reset(252); - Game_Flag_Set(251); + Game_Flag_Reset(kFlagSpinnerToAR01); + Game_Flag_Set(kFlagSpinnerToPS01); Set_Enter(61, kScenePS01); Scene_Loop_Start_Special(1, 5, 1); break; case 1: Game_Flag_Set(179); - Game_Flag_Reset(252); - Game_Flag_Set(250); + Game_Flag_Reset(kFlagSpinnerToAR01); + Game_Flag_Set(kFlagSpinnerToMA01); Set_Enter(49, kSceneMA01); Scene_Loop_Start_Special(1, 5, 1); break; case 2: Game_Flag_Set(182); - Game_Flag_Reset(252); - Game_Flag_Set(249); + Game_Flag_Reset(kFlagSpinnerToAR01); + Game_Flag_Set(kFlagSpinnerToRC01); Set_Enter(69, kSceneRC01); Scene_Loop_Start_Special(1, 5, 1); break; case 3: Game_Flag_Set(176); - Game_Flag_Reset(252); - Game_Flag_Set(248); + Game_Flag_Reset(kFlagSpinnerToAR01); + Game_Flag_Set(kFlagSpinnerToCT01); Set_Enter(4, kSceneCT01); Scene_Loop_Start_Special(1, 5, 1); break; case 5: Game_Flag_Set(261); - Game_Flag_Reset(252); - Game_Flag_Set(307); + Game_Flag_Reset(kFlagSpinnerToAR01); + Game_Flag_Set(kFlagSpinnerToTB02); Set_Enter(17, kSceneTB02); Scene_Loop_Start_Special(1, 5, 1); break; case 6: Game_Flag_Set(177); - Game_Flag_Reset(252); - Game_Flag_Set(253); + Game_Flag_Reset(kFlagSpinnerToAR01); + Game_Flag_Set(kFlagSpinnerToDR01); Set_Enter(7, kSceneDR01); Scene_Loop_Start_Special(1, 5, 1); break; case 7: Game_Flag_Set(258); - Game_Flag_Reset(252); - Game_Flag_Set(254); + Game_Flag_Reset(kFlagSpinnerToAR01); + Game_Flag_Set(kFlagSpinnerToBB01); Set_Enter(20, kSceneBB01); Scene_Loop_Start_Special(1, 5, 1); break; case 8: Game_Flag_Set(181); - Game_Flag_Reset(252); - Game_Flag_Set(255); + Game_Flag_Reset(kFlagSpinnerToAR01); + Game_Flag_Set(kFlagSpinnerToNR01); Set_Enter(54, kSceneNR01); Scene_Loop_Start_Special(1, 5, 1); break; case 9: Game_Flag_Set(257); - Game_Flag_Reset(252); - Game_Flag_Set(256); + Game_Flag_Reset(kFlagSpinnerToAR01); + Game_Flag_Set(kFlagSpinnerToHF01); Set_Enter(37, kSceneHF01); Scene_Loop_Start_Special(1, 5, 1); break; diff --git a/engines/bladerunner/script/scene/ar02.cpp b/engines/bladerunner/script/scene/ar02.cpp index 614f345076..72ec31fdb1 100644 --- a/engines/bladerunner/script/scene/ar02.cpp +++ b/engines/bladerunner/script/scene/ar02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -62,11 +62,11 @@ void SceneScriptAR02::InitializeScene() { Ambient_Sounds_Add_Sound(375, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); - if (Game_Flag_Query(252) && Game_Flag_Query(320)) { + if (Game_Flag_Query(kFlagSpinnerToAR01) && Game_Flag_Query(320)) { Scene_Loop_Start_Special(0, 1, 0); Scene_Loop_Set_Default(2); Game_Flag_Reset(320); - } else if (!Game_Flag_Query(252) && Game_Flag_Query(320)) { + } else if (!Game_Flag_Query(kFlagSpinnerToAR01) && Game_Flag_Query(320)) { Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(2); Game_Flag_Reset(320); diff --git a/engines/bladerunner/script/scene/bb01.cpp b/engines/bladerunner/script/scene/bb01.cpp index 2c746a769c..5bc75907c0 100644 --- a/engines/bladerunner/script/scene/bb01.cpp +++ b/engines/bladerunner/script/scene/bb01.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -34,7 +34,7 @@ void SceneScriptBB01::InitializeScene() { } Scene_Exit_Add_2D_Exit(0, 0, 0, 72, 299, 3); Scene_Exit_Add_2D_Exit(1, 151, 218, 322, 290, 3); - if (Game_Flag_Query(254)) { + if (Game_Flag_Query(kFlagSpinnerToBB01)) { Scene_Exit_Add_2D_Exit(2, 0, 311, 312, 479, 2); } Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1); @@ -51,12 +51,12 @@ void SceneScriptBB01::InitializeScene() { Ambient_Sounds_Add_Speech_Sound(60, 20, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 40, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); Ambient_Sounds_Add_Speech_Sound(60, 50, 10, 260, 17, 24, -100, 100, -101, -101, 1, 1); - if (Game_Flag_Query(254) && !Game_Flag_Query(265) && !Game_Flag_Query(263)) { + if (Game_Flag_Query(kFlagSpinnerToBB01) && !Game_Flag_Query(265) && !Game_Flag_Query(263)) { Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(1); - } else if (Game_Flag_Query(254) && Game_Flag_Query(265)) { + } else if (Game_Flag_Query(kFlagSpinnerToBB01) && Game_Flag_Query(265)) { Scene_Loop_Set_Default(1); - } else if (Game_Flag_Query(254) && Game_Flag_Query(263)) { + } else if (Game_Flag_Query(kFlagSpinnerToBB01) && Game_Flag_Query(263)) { Scene_Loop_Set_Default(1); } else { Scene_Loop_Set_Default(5); @@ -112,64 +112,64 @@ bool SceneScriptBB01::ClickedOnExit(int exitId) { switch (spinnerDest) { case 0: Game_Flag_Set(178); - Game_Flag_Reset(254); - Game_Flag_Set(251); + Game_Flag_Reset(kFlagSpinnerToBB01); + Game_Flag_Set(kFlagSpinnerToPS01); Set_Enter(61, kScenePS01); Scene_Loop_Start_Special(1, 4, 1); break; case 1: Game_Flag_Set(179); - Game_Flag_Reset(254); - Game_Flag_Set(250); + Game_Flag_Reset(kFlagSpinnerToBB01); + Game_Flag_Set(kFlagSpinnerToMA01); Set_Enter(49, kSceneMA01); Scene_Loop_Start_Special(1, 4, 1); break; case 2: Game_Flag_Set(182); - Game_Flag_Reset(254); - Game_Flag_Set(249); + Game_Flag_Reset(kFlagSpinnerToBB01); + Game_Flag_Set(kFlagSpinnerToRC01); Set_Enter(69, kSceneRC01); Scene_Loop_Start_Special(1, 4, 1); break; case 3: Game_Flag_Set(176); - Game_Flag_Reset(254); - Game_Flag_Set(248); + Game_Flag_Reset(kFlagSpinnerToBB01); + Game_Flag_Set(kFlagSpinnerToCT01); Set_Enter(4, kSceneCT01); Scene_Loop_Start_Special(1, 4, 1); break; case 5: Game_Flag_Set(261); - Game_Flag_Reset(254); - Game_Flag_Set(307); + Game_Flag_Reset(kFlagSpinnerToBB01); + Game_Flag_Set(kFlagSpinnerToTB02); Set_Enter(17, kSceneTB02); Scene_Loop_Start_Special(1, 4, 1); break; case 4: Game_Flag_Set(180); - Game_Flag_Reset(254); - Game_Flag_Set(252); + Game_Flag_Reset(kFlagSpinnerToBB01); + Game_Flag_Set(kFlagSpinnerToAR01); Set_Enter(0, kSceneAR01); Scene_Loop_Start_Special(1, 4, 1); break; case 6: Game_Flag_Set(177); - Game_Flag_Reset(254); - Game_Flag_Set(253); + Game_Flag_Reset(kFlagSpinnerToBB01); + Game_Flag_Set(kFlagSpinnerToDR01); Set_Enter(7, kSceneDR01); Scene_Loop_Start_Special(1, 4, 1); break; case 8: Game_Flag_Set(181); - Game_Flag_Reset(254); - Game_Flag_Set(255); + Game_Flag_Reset(kFlagSpinnerToBB01); + Game_Flag_Set(kFlagSpinnerToNR01); Set_Enter(54, kSceneNR01); Scene_Loop_Start_Special(1, 4, 1); break; case 9: Game_Flag_Set(257); - Game_Flag_Reset(254); - Game_Flag_Set(256); + Game_Flag_Reset(kFlagSpinnerToBB01); + Game_Flag_Set(kFlagSpinnerToHF01); Set_Enter(37, kSceneHF01); Scene_Loop_Start_Special(1, 4, 1); break; diff --git a/engines/bladerunner/script/scene/bb02.cpp b/engines/bladerunner/script/scene/bb02.cpp index cd182003aa..a507f4dd67 100644 --- a/engines/bladerunner/script/scene/bb02.cpp +++ b/engines/bladerunner/script/scene/bb02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb03.cpp b/engines/bladerunner/script/scene/bb03.cpp index dccbfe0dab..c2444c1daa 100644 --- a/engines/bladerunner/script/scene/bb03.cpp +++ b/engines/bladerunner/script/scene/bb03.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb04.cpp b/engines/bladerunner/script/scene/bb04.cpp index 7f770a50e5..60aa69b489 100644 --- a/engines/bladerunner/script/scene/bb04.cpp +++ b/engines/bladerunner/script/scene/bb04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb05.cpp b/engines/bladerunner/script/scene/bb05.cpp index 82957b28a5..e0919ed579 100644 --- a/engines/bladerunner/script/scene/bb05.cpp +++ b/engines/bladerunner/script/scene/bb05.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb06.cpp b/engines/bladerunner/script/scene/bb06.cpp index 50cdb37f8a..cce94c1e6b 100644 --- a/engines/bladerunner/script/scene/bb06.cpp +++ b/engines/bladerunner/script/scene/bb06.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb07.cpp b/engines/bladerunner/script/scene/bb07.cpp index 351448fa6c..82710928d8 100644 --- a/engines/bladerunner/script/scene/bb07.cpp +++ b/engines/bladerunner/script/scene/bb07.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb08.cpp b/engines/bladerunner/script/scene/bb08.cpp index 298f53a9bc..1d85ecabcd 100644 --- a/engines/bladerunner/script/scene/bb08.cpp +++ b/engines/bladerunner/script/scene/bb08.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb09.cpp b/engines/bladerunner/script/scene/bb09.cpp index bcea82f29b..3a12551ec3 100644 --- a/engines/bladerunner/script/scene/bb09.cpp +++ b/engines/bladerunner/script/scene/bb09.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb10.cpp b/engines/bladerunner/script/scene/bb10.cpp index aec9161c4b..c90456abf3 100644 --- a/engines/bladerunner/script/scene/bb10.cpp +++ b/engines/bladerunner/script/scene/bb10.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb11.cpp b/engines/bladerunner/script/scene/bb11.cpp index 3e9aec34b4..faa4a6e8a8 100644 --- a/engines/bladerunner/script/scene/bb11.cpp +++ b/engines/bladerunner/script/scene/bb11.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb12.cpp b/engines/bladerunner/script/scene/bb12.cpp index 8d49377875..29795bdea2 100644 --- a/engines/bladerunner/script/scene/bb12.cpp +++ b/engines/bladerunner/script/scene/bb12.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/bb51.cpp b/engines/bladerunner/script/scene/bb51.cpp index 45eeab4774..9314b371b5 100644 --- a/engines/bladerunner/script/scene/bb51.cpp +++ b/engines/bladerunner/script/scene/bb51.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp index 0fe5bf9831..330339e528 100644 --- a/engines/bladerunner/script/scene/ct01.cpp +++ b/engines/bladerunner/script/scene/ct01.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -37,13 +37,13 @@ void SceneScriptCT01::InitializeScene() { Game_Flag_Reset(88); Setup_Scene_Information(-419.0f, -6.5f, 696.0f, 28); if (Global_Variable_Query(1) != 2 && Global_Variable_Query(1) != 3) { - if (Game_Flag_Query(248)) { + if (Game_Flag_Query(kFlagSpinnerToCT01)) { Scene_Loop_Start_Special(0, 0, 0); } else { Scene_Loop_Start_Special(0, 6, 0); } } - } else if (Game_Flag_Query(248)) { + } else if (Game_Flag_Query(kFlagSpinnerToCT01)) { Setup_Scene_Information(-530.0f, -6.5f, 241.0f, 506); Game_Flag_Set(247); } else { @@ -56,7 +56,7 @@ void SceneScriptCT01::InitializeScene() { if (Game_Flag_Query(94)) { Scene_Exit_Add_2D_Exit(2, 506, 400, 639, 479, 2); } - if (Game_Flag_Query(248)) { + if (Game_Flag_Query(kFlagSpinnerToCT01)) { Scene_Exit_Add_2D_Exit(3, 0, 286, 158, 350, 2); } Ambient_Sounds_Add_Looping_Sound(54, 50, 1, 1); @@ -75,7 +75,7 @@ void SceneScriptCT01::InitializeScene() { Ambient_Sounds_Add_Sound(375, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0); - if (Game_Flag_Query(248)) { + if (Game_Flag_Query(kFlagSpinnerToCT01)) { Scene_Loop_Set_Default(2); } else { Scene_Loop_Set_Default(7); @@ -243,72 +243,72 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) { case 0: Game_Flag_Set(178); Game_Flag_Reset(247); - Game_Flag_Reset(248); - Game_Flag_Set(251); + Game_Flag_Reset(kFlagSpinnerToCT01); + Game_Flag_Set(kFlagSpinnerToPS01); Set_Enter(61, kScenePS01); Scene_Loop_Start_Special(1, 5, 1); break; case 1: Game_Flag_Set(179); Game_Flag_Reset(247); - Game_Flag_Reset(248); - Game_Flag_Set(250); + Game_Flag_Reset(kFlagSpinnerToCT01); + Game_Flag_Set(kFlagSpinnerToMA01); Set_Enter(49, kSceneMA01); Scene_Loop_Start_Special(1, 5, 1); break; case 2: Game_Flag_Set(182); Game_Flag_Reset(247); - Game_Flag_Reset(248); - Game_Flag_Set(249); + Game_Flag_Reset(kFlagSpinnerToCT01); + Game_Flag_Set(kFlagSpinnerToRC01); Set_Enter(69, kSceneRC01); Scene_Loop_Start_Special(1, 5, 1); break; case 4: Game_Flag_Set(180); Game_Flag_Reset(247); - Game_Flag_Reset(248); - Game_Flag_Set(252); + Game_Flag_Reset(kFlagSpinnerToCT01); + Game_Flag_Set(kFlagSpinnerToAR01); Set_Enter(0, kSceneAR01); Scene_Loop_Start_Special(1, 5, 1); break; case 5: Game_Flag_Set(261); - Game_Flag_Reset(248); + Game_Flag_Reset(kFlagSpinnerToCT01); Game_Flag_Reset(247); - Game_Flag_Set(307); + Game_Flag_Set(kFlagSpinnerToTB02); Set_Enter(17, kSceneTB02); Scene_Loop_Start_Special(1, 5, 1); break; case 6: Game_Flag_Set(177); Game_Flag_Reset(247); - Game_Flag_Reset(248); - Game_Flag_Set(253); + Game_Flag_Reset(kFlagSpinnerToCT01); + Game_Flag_Set(kFlagSpinnerToDR01); Set_Enter(7, kSceneDR01); Scene_Loop_Start_Special(1, 5, 1); break; case 7: Game_Flag_Set(258); Game_Flag_Reset(247); - Game_Flag_Reset(248); - Game_Flag_Set(254); + Game_Flag_Reset(kFlagSpinnerToCT01); + Game_Flag_Set(kFlagSpinnerToBB01); Set_Enter(20, kSceneBB01); Scene_Loop_Start_Special(1, 5, 1); break; case 8: Game_Flag_Set(181); Game_Flag_Reset(247); - Game_Flag_Reset(248); - Game_Flag_Set(255); + Game_Flag_Reset(kFlagSpinnerToCT01); + Game_Flag_Set(kFlagSpinnerToNR01); Set_Enter(54, kSceneNR01); Scene_Loop_Start_Special(1, 5, 1); break; case 9: Game_Flag_Set(257); Game_Flag_Reset(247); - Game_Flag_Reset(248); - Game_Flag_Set(256); + Game_Flag_Reset(kFlagSpinnerToCT01); + Game_Flag_Set(kFlagSpinnerToHF01); Set_Enter(37, kSceneHF01); Scene_Loop_Start_Special(1, 5, 1); break; diff --git a/engines/bladerunner/script/scene/ct02.cpp b/engines/bladerunner/script/scene/ct02.cpp index 85c8fcb818..e94e0ba719 100644 --- a/engines/bladerunner/script/scene/ct02.cpp +++ b/engines/bladerunner/script/scene/ct02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ct03.cpp b/engines/bladerunner/script/scene/ct03.cpp index a43cdace98..3a9a46cd2d 100644 --- a/engines/bladerunner/script/scene/ct03.cpp +++ b/engines/bladerunner/script/scene/ct03.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ct04.cpp b/engines/bladerunner/script/scene/ct04.cpp index 598be6c1b2..fd7afa56fb 100644 --- a/engines/bladerunner/script/scene/ct04.cpp +++ b/engines/bladerunner/script/scene/ct04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ct05.cpp b/engines/bladerunner/script/scene/ct05.cpp index 2522b1d100..0416883819 100644 --- a/engines/bladerunner/script/scene/ct05.cpp +++ b/engines/bladerunner/script/scene/ct05.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ct06.cpp b/engines/bladerunner/script/scene/ct06.cpp index d04dccf5ed..1bb00c1ca1 100644 --- a/engines/bladerunner/script/scene/ct06.cpp +++ b/engines/bladerunner/script/scene/ct06.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ct07.cpp b/engines/bladerunner/script/scene/ct07.cpp index 42bbcc4942..2eb7805c44 100644 --- a/engines/bladerunner/script/scene/ct07.cpp +++ b/engines/bladerunner/script/scene/ct07.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ct08.cpp b/engines/bladerunner/script/scene/ct08.cpp index e2e6203a0b..a0c989de9e 100644 --- a/engines/bladerunner/script/scene/ct08.cpp +++ b/engines/bladerunner/script/scene/ct08.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -29,9 +29,9 @@ void SceneScriptCT08::InitializeScene() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); Outtake_Play(kOuttakeMovieB1, false, -1); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { Outtake_Play(kOuttakeMovieB2, false, -1); - } else if (Game_Flag_Query(47)) { + } else if (Game_Flag_Query(kFlagDektoraIsReplicant)) { Outtake_Play(kOuttakeMovieB3, false, -1); } else { Outtake_Play(kOuttakeMovieB4, false, -1); diff --git a/engines/bladerunner/script/scene/ct09.cpp b/engines/bladerunner/script/scene/ct09.cpp index 10b0a77f9c..40a7706b3a 100644 --- a/engines/bladerunner/script/scene/ct09.cpp +++ b/engines/bladerunner/script/scene/ct09.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ct10.cpp b/engines/bladerunner/script/scene/ct10.cpp index 186b7678ff..c0ad361642 100644 --- a/engines/bladerunner/script/scene/ct10.cpp +++ b/engines/bladerunner/script/scene/ct10.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ct11.cpp b/engines/bladerunner/script/scene/ct11.cpp index 3942a89b42..ad46be78cd 100644 --- a/engines/bladerunner/script/scene/ct11.cpp +++ b/engines/bladerunner/script/scene/ct11.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ct12.cpp b/engines/bladerunner/script/scene/ct12.cpp index 826d0945fe..7800a55dc8 100644 --- a/engines/bladerunner/script/scene/ct12.cpp +++ b/engines/bladerunner/script/scene/ct12.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -64,13 +64,13 @@ void SceneScriptCT12::InitializeScene() { Actor_Set_At_XYZ(kActorGaff, -534.0f, -6.5f, 952.0f, 367); Game_Flag_Set(294); } - if (Game_Flag_Query(123) && Game_Flag_Query(248)) { + if (Game_Flag_Query(123) && Game_Flag_Query(kFlagSpinnerToCT01)) { if (Global_Variable_Query(1) != 2 && Global_Variable_Query(1) != 3) { Scene_Loop_Start_Special(0, 1, 0); } Scene_Loop_Set_Default(2); Game_Flag_Reset(123); - } else if (Game_Flag_Query(123) && !Game_Flag_Query(248)) { + } else if (Game_Flag_Query(123) && !Game_Flag_Query(kFlagSpinnerToCT01)) { if (Global_Variable_Query(1) != 2 && Global_Variable_Query(1) != 3) { Scene_Loop_Start_Special(0, 0, 0); } diff --git a/engines/bladerunner/script/scene/ct51.cpp b/engines/bladerunner/script/scene/ct51.cpp index 73d6d92d7a..afbb8537da 100644 --- a/engines/bladerunner/script/scene/ct51.cpp +++ b/engines/bladerunner/script/scene/ct51.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/dr01.cpp b/engines/bladerunner/script/scene/dr01.cpp index cc6eb640ae..ea609f538e 100644 --- a/engines/bladerunner/script/scene/dr01.cpp +++ b/engines/bladerunner/script/scene/dr01.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -36,7 +36,7 @@ void SceneScriptDR01::InitializeScene() { } Scene_Exit_Add_2D_Exit(0, 240, 60, 450, 250, 0); Scene_Exit_Add_2D_Exit(1, 0, 0, 30, 479, 3); - if (Game_Flag_Query(253) && Global_Variable_Query(1) < 4) { + if (Game_Flag_Query(kFlagSpinnerToDR01) && Global_Variable_Query(1) < 4) { Scene_Exit_Add_2D_Exit(2, 610, 0, 639, 479, 1); } if (Global_Variable_Query(1) >= 3) { @@ -136,56 +136,56 @@ bool SceneScriptDR01::ClickedOnExit(int exitId) { switch (spinnerDest) { case 2: Game_Flag_Set(182); - Game_Flag_Reset(253); - Game_Flag_Set(249); + Game_Flag_Reset(kFlagSpinnerToDR01); + Game_Flag_Set(kFlagSpinnerToRC01); Set_Enter(69, kSceneRC01); break; case 3: Game_Flag_Set(176); - Game_Flag_Reset(253); - Game_Flag_Set(248); + Game_Flag_Reset(kFlagSpinnerToDR01); + Game_Flag_Set(kFlagSpinnerToCT01); Set_Enter(4, kSceneCT01); break; case 1: Game_Flag_Set(179); - Game_Flag_Reset(253); - Game_Flag_Set(250); + Game_Flag_Reset(kFlagSpinnerToDR01); + Game_Flag_Set(kFlagSpinnerToMA01); Set_Enter(49, kSceneMA01); break; case 0: Game_Flag_Set(178); - Game_Flag_Reset(253); - Game_Flag_Set(251); + Game_Flag_Reset(kFlagSpinnerToDR01); + Game_Flag_Set(kFlagSpinnerToPS01); Set_Enter(61, kScenePS01); break; case 5: Game_Flag_Set(261); - Game_Flag_Reset(253); - Game_Flag_Set(307); + Game_Flag_Reset(kFlagSpinnerToDR01); + Game_Flag_Set(kFlagSpinnerToTB02); Set_Enter(17, kSceneTB02); break; case 4: Game_Flag_Set(180); - Game_Flag_Reset(253); - Game_Flag_Set(252); + Game_Flag_Reset(kFlagSpinnerToDR01); + Game_Flag_Set(kFlagSpinnerToAR01); Set_Enter(0, kSceneAR01); break; case 7: Game_Flag_Set(258); - Game_Flag_Reset(253); - Game_Flag_Set(254); + Game_Flag_Reset(kFlagSpinnerToDR01); + Game_Flag_Set(kFlagSpinnerToBB01); Set_Enter(20, kSceneBB01); break; case 8: Game_Flag_Set(181); - Game_Flag_Reset(253); - Game_Flag_Set(255); + Game_Flag_Reset(kFlagSpinnerToDR01); + Game_Flag_Set(kFlagSpinnerToNR01); Set_Enter(54, kSceneNR01); break; case 9: Game_Flag_Set(257); - Game_Flag_Reset(253); - Game_Flag_Set(256); + Game_Flag_Reset(kFlagSpinnerToDR01); + Game_Flag_Set(kFlagSpinnerToHF01); Set_Enter(37, kSceneHF01); break; default: diff --git a/engines/bladerunner/script/scene/dr02.cpp b/engines/bladerunner/script/scene/dr02.cpp index 78987dcdc9..6e71bb1d9d 100644 --- a/engines/bladerunner/script/scene/dr02.cpp +++ b/engines/bladerunner/script/scene/dr02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/dr03.cpp b/engines/bladerunner/script/scene/dr03.cpp index 077eb39eea..cdee6a181d 100644 --- a/engines/bladerunner/script/scene/dr03.cpp +++ b/engines/bladerunner/script/scene/dr03.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/dr04.cpp b/engines/bladerunner/script/scene/dr04.cpp index fe8032997a..81302e4e3f 100644 --- a/engines/bladerunner/script/scene/dr04.cpp +++ b/engines/bladerunner/script/scene/dr04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/dr05.cpp b/engines/bladerunner/script/scene/dr05.cpp index 0793d8bbcc..ce2a76218a 100644 --- a/engines/bladerunner/script/scene/dr05.cpp +++ b/engines/bladerunner/script/scene/dr05.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -142,7 +142,7 @@ void SceneScriptDR05::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -10.0f, 0.3f, 133.0f, 0, 0, false, 0); if (!Game_Flag_Query(511)) { Game_Flag_Set(511); - if (Game_Flag_Query(48)) { + if (Game_Flag_Query(kFlagSadikIsReplicant)) { Actor_Voice_Over(730, kActorVoiceOver); Actor_Voice_Over(740, kActorVoiceOver); Actor_Voice_Over(750, kActorVoiceOver); diff --git a/engines/bladerunner/script/scene/dr06.cpp b/engines/bladerunner/script/scene/dr06.cpp index 6f3947c6fb..aedfa4550d 100644 --- a/engines/bladerunner/script/scene/dr06.cpp +++ b/engines/bladerunner/script/scene/dr06.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/hc01.cpp b/engines/bladerunner/script/scene/hc01.cpp index 2169986b9e..fbf54e0adc 100644 --- a/engines/bladerunner/script/scene/hc01.cpp +++ b/engines/bladerunner/script/scene/hc01.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/hc02.cpp b/engines/bladerunner/script/scene/hc02.cpp index 746a0f487c..97292f29ac 100644 --- a/engines/bladerunner/script/scene/hc02.cpp +++ b/engines/bladerunner/script/scene/hc02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/hc03.cpp b/engines/bladerunner/script/scene/hc03.cpp index 93fea0ac9a..bf9330dd97 100644 --- a/engines/bladerunner/script/scene/hc03.cpp +++ b/engines/bladerunner/script/scene/hc03.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/hc04.cpp b/engines/bladerunner/script/scene/hc04.cpp index d83dfc4cf0..43745380b8 100644 --- a/engines/bladerunner/script/scene/hc04.cpp +++ b/engines/bladerunner/script/scene/hc04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp index 764a4d536f..67f538f12e 100644 --- a/engines/bladerunner/script/scene/hf01.cpp +++ b/engines/bladerunner/script/scene/hf01.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -40,7 +40,7 @@ void SceneScriptHF01::InitializeScene() { if (!Game_Flag_Query(663)) { Scene_Exit_Add_2D_Exit(1, 304, 239, 492, 339, 0); Scene_Exit_Add_2D_Exit(2, 560, 231, 639, 360, 0); - if (Game_Flag_Query(256)) { + if (Game_Flag_Query(kFlagSpinnerToHF01)) { Scene_Exit_Add_2D_Exit(3, 0, 311, 66, 417, 2); } } @@ -61,7 +61,7 @@ void SceneScriptHF01::InitializeScene() { Ambient_Sounds_Add_Sound(375, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(376, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 10, 180, 50, 100, 0, 0, -101, -101, 0, 0); - if (Game_Flag_Query(256)) { + if (Game_Flag_Query(kFlagSpinnerToHF01)) { if (!Game_Flag_Query(309) && !Game_Flag_Query(311) && !Game_Flag_Query(313)) { Scene_Loop_Start_Special(0, 0, 0); } @@ -75,7 +75,7 @@ void SceneScriptHF01::InitializeScene() { void SceneScriptHF01::SceneLoaded() { Obstacle_Object("LOFT41", true); - if (!Game_Flag_Query(256)) { + if (!Game_Flag_Query(kFlagSpinnerToHF01)) { Unobstacle_Object("OBSTACLE BOX15", true); } } @@ -190,64 +190,64 @@ bool SceneScriptHF01::ClickedOnExit(int exitId) { switch (spinnerDest) { case 0: Game_Flag_Set(178); - Game_Flag_Reset(256); - Game_Flag_Set(251); + Game_Flag_Reset(kFlagSpinnerToHF01); + Game_Flag_Set(kFlagSpinnerToPS01); Set_Enter(61, kScenePS01); Scene_Loop_Start_Special(1, 4, 1); break; case 1: Game_Flag_Set(179); - Game_Flag_Reset(256); - Game_Flag_Set(250); + Game_Flag_Reset(kFlagSpinnerToHF01); + Game_Flag_Set(kFlagSpinnerToMA01); Set_Enter(49, kSceneMA01); Scene_Loop_Start_Special(1, 4, 1); break; case 2: Game_Flag_Set(182); - Game_Flag_Reset(256); - Game_Flag_Set(249); + Game_Flag_Reset(kFlagSpinnerToHF01); + Game_Flag_Set(kFlagSpinnerToRC01); Set_Enter(69, kSceneRC01); Scene_Loop_Start_Special(1, 4, 1); break; case 3: Game_Flag_Set(176); - Game_Flag_Reset(256); - Game_Flag_Set(248); + Game_Flag_Reset(kFlagSpinnerToHF01); + Game_Flag_Set(kFlagSpinnerToCT01); Set_Enter(4, kSceneCT01); Scene_Loop_Start_Special(1, 4, 1); break; case 5: Game_Flag_Set(261); - Game_Flag_Reset(256); - Game_Flag_Set(307); + Game_Flag_Reset(kFlagSpinnerToHF01); + Game_Flag_Set(kFlagSpinnerToTB02); Set_Enter(17, kSceneTB02); Scene_Loop_Start_Special(1, 4, 1); break; case 4: Game_Flag_Set(180); - Game_Flag_Reset(256); - Game_Flag_Set(252); + Game_Flag_Reset(kFlagSpinnerToHF01); + Game_Flag_Set(kFlagSpinnerToAR01); Set_Enter(0, kSceneAR01); Scene_Loop_Start_Special(1, 4, 1); break; case 7: Game_Flag_Set(258); - Game_Flag_Reset(256); - Game_Flag_Set(254); + Game_Flag_Reset(kFlagSpinnerToHF01); + Game_Flag_Set(kFlagSpinnerToBB01); Set_Enter(20, kSceneBB01); Scene_Loop_Start_Special(1, 4, 1); break; case 6: Game_Flag_Set(177); - Game_Flag_Reset(256); - Game_Flag_Set(253); + Game_Flag_Reset(kFlagSpinnerToHF01); + Game_Flag_Set(kFlagSpinnerToDR01); Set_Enter(7, kSceneDR01); Scene_Loop_Start_Special(1, 4, 1); break; case 8: Game_Flag_Set(181); - Game_Flag_Reset(256); - Game_Flag_Set(255); + Game_Flag_Reset(kFlagSpinnerToHF01); + Game_Flag_Set(kFlagSpinnerToNR01); Set_Enter(54, kSceneNR01); Scene_Loop_Start_Special(1, 4, 1); break; diff --git a/engines/bladerunner/script/scene/hf02.cpp b/engines/bladerunner/script/scene/hf02.cpp index 258b942f3f..9df62e4d2a 100644 --- a/engines/bladerunner/script/scene/hf02.cpp +++ b/engines/bladerunner/script/scene/hf02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/hf03.cpp b/engines/bladerunner/script/scene/hf03.cpp index 1117f222da..09bf589bb7 100644 --- a/engines/bladerunner/script/scene/hf03.cpp +++ b/engines/bladerunner/script/scene/hf03.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -76,7 +76,7 @@ void SceneScriptHF03::sub_401C80() { Actor_Says(kActorMcCoy, 1630, 15); if (Global_Variable_Query(40) == 3) { Actor_Set_Goal_Number(kActorLucy, 214); - } else if (Game_Flag_Query(46)) { + } else if (Game_Flag_Query(kFlagLucyIsReplicant)) { Actor_Set_Goal_Number(kActorLucy, 212); } else { Actor_Set_Goal_Number(kActorLucy, 210); @@ -105,7 +105,7 @@ void SceneScriptHF03::sub_401C80() { Actor_Says(kActorMcCoy, 6785, 15); Actor_Says(kActorLucy, 970, 16); Actor_Says(kActorLucy, 980, 17); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { Actor_Says(kActorLucy, 990, 17); } Actor_Says(kActorMcCoy, 6790, 15); @@ -120,7 +120,7 @@ void SceneScriptHF03::sub_401C80() { Actor_Says(kActorMcCoy, 1660, 15); Actor_Says(kActorLucy, 230, 14); Actor_Clue_Acquire(kActorLucy, kClueMcCoyHelpedLucy, 1, kActorMcCoy); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { Actor_Set_Goal_Number(kActorLucy, 212); } else { Actor_Set_Goal_Number(kActorLucy, 210); @@ -150,11 +150,11 @@ void SceneScriptHF03::sub_401C80() { bool SceneScriptHF03::ClickedOnActor(int actorId) { if (actorId == 6 && Actor_Query_Goal_Number(kActorLucy) == 205) { - if (Game_Flag_Query(46) ? !Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 377, 0, 1, false) : !Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 378, 0, 1, false)) { + if (Game_Flag_Query(kFlagLucyIsReplicant) ? !Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 377, 0, 1, false) : !Loop_Actor_Walk_To_Waypoint(kActorMcCoy, 378, 0, 1, false)) { Actor_Face_Actor(kActorMcCoy, kActorLucy, true); if (!Game_Flag_Query(613)) { Game_Flag_Set(613); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { Actor_Says(kActorMcCoy, 1605, 15); Actor_Says(kActorLucy, 100, 12); Actor_Says(kActorMcCoy, 1610, 14); @@ -166,7 +166,7 @@ bool SceneScriptHF03::ClickedOnActor(int actorId) { Actor_Says(kActorMcCoy, 1620, 14); Actor_Says(kActorLucy, 130, 17); Actor_Says(kActorMcCoy, 1625, 15); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { Actor_Says(kActorLucy, 140, 12); Actor_Says(kActorLucy, 150, 13); Actor_Says(kActorLucy, 160, 15); diff --git a/engines/bladerunner/script/scene/hf04.cpp b/engines/bladerunner/script/scene/hf04.cpp index f96053a773..09a849c781 100644 --- a/engines/bladerunner/script/scene/hf04.cpp +++ b/engines/bladerunner/script/scene/hf04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp index ea1fe7f28d..22fd331132 100644 --- a/engines/bladerunner/script/scene/hf05.cpp +++ b/engines/bladerunner/script/scene/hf05.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -468,7 +468,7 @@ void SceneScriptHF05::sub_403738() { Actor_Set_At_XYZ(kActorCrazylegs, -315.15f, 0.0f, 241.06f, 583); Actor_Set_Goal_Number(kActorCrazylegs, 699); Game_Flag_Set(652); - if (Game_Flag_Query(255)) { + if (Game_Flag_Query(kFlagSpinnerToNR01)) { Set_Enter(54, kSceneNR01); } else { Game_Flag_Set(313); diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp index 406e4e5a92..f1acea722f 100644 --- a/engines/bladerunner/script/scene/hf06.cpp +++ b/engines/bladerunner/script/scene/hf06.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/hf07.cpp b/engines/bladerunner/script/scene/hf07.cpp index bdd748fdf0..e9fe2f05fd 100644 --- a/engines/bladerunner/script/scene/hf07.cpp +++ b/engines/bladerunner/script/scene/hf07.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/kp01.cpp b/engines/bladerunner/script/scene/kp01.cpp index af6f57f759..72ab3d5117 100644 --- a/engines/bladerunner/script/scene/kp01.cpp +++ b/engines/bladerunner/script/scene/kp01.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/kp02.cpp b/engines/bladerunner/script/scene/kp02.cpp index 1e83d1e310..b123160519 100644 --- a/engines/bladerunner/script/scene/kp02.cpp +++ b/engines/bladerunner/script/scene/kp02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/kp03.cpp b/engines/bladerunner/script/scene/kp03.cpp index 27f1ee2583..bb8c005240 100644 --- a/engines/bladerunner/script/scene/kp03.cpp +++ b/engines/bladerunner/script/scene/kp03.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/kp04.cpp b/engines/bladerunner/script/scene/kp04.cpp index daa95f866a..97eda1bd24 100644 --- a/engines/bladerunner/script/scene/kp04.cpp +++ b/engines/bladerunner/script/scene/kp04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/kp05.cpp b/engines/bladerunner/script/scene/kp05.cpp index 11a246b301..6ac4d1f1e0 100644 --- a/engines/bladerunner/script/scene/kp05.cpp +++ b/engines/bladerunner/script/scene/kp05.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/kp06.cpp b/engines/bladerunner/script/scene/kp06.cpp index e237bfaf5d..462bd83f0c 100644 --- a/engines/bladerunner/script/scene/kp06.cpp +++ b/engines/bladerunner/script/scene/kp06.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/kp07.cpp b/engines/bladerunner/script/scene/kp07.cpp index 0b6558ef81..23c05c72d4 100644 --- a/engines/bladerunner/script/scene/kp07.cpp +++ b/engines/bladerunner/script/scene/kp07.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -29,7 +29,7 @@ void SceneScriptKP07::InitializeScene() { Game_Flag_Reset(578); Scene_Exit_Add_2D_Exit(0, 315, 185, 381, 285, 0); if (Game_Flag_Query(653)) { - if (Game_Flag_Query(47) && Actor_Query_Goal_Number(kActorDektora) < 599) { + if (Game_Flag_Query(kFlagDektoraIsReplicant) && Actor_Query_Goal_Number(kActorDektora) < 599) { Actor_Set_Targetable(kActorDektora, true); Global_Variable_Increment(51, 1); Actor_Put_In_Set(kActorDektora, 48); @@ -41,19 +41,19 @@ void SceneScriptKP07::InitializeScene() { Actor_Put_In_Set(kActorZuben, 48); Actor_Set_At_XYZ(kActorZuben, -26.0f, -41.52f, -135.0f, 0); } - if (Game_Flag_Query(44) && Actor_Query_Goal_Number(kActorIzo) < 599) { + if (Game_Flag_Query(kFlagIzoIsReplicant) && Actor_Query_Goal_Number(kActorIzo) < 599) { Global_Variable_Increment(51, 1); Actor_Set_Targetable(kActorIzo, true); Actor_Put_In_Set(kActorIzo, 48); Actor_Set_At_XYZ(kActorIzo, -38.0f, -41.52f, -175.0f, 500); } - if (Game_Flag_Query(45) && Actor_Query_Goal_Number(kActorGordo) < 599) { + if (Game_Flag_Query(kFlagGordoIsReplicant) && Actor_Query_Goal_Number(kActorGordo) < 599) { Global_Variable_Increment(51, 1); Actor_Set_Targetable(kActorGordo, true); Actor_Put_In_Set(kActorGordo, 48); Actor_Set_At_XYZ(kActorGordo, 61.0f, -41.52f, -3.0f, 921); } - if (Game_Flag_Query(46) && Actor_Query_Goal_Number(kActorLucy) < 599) { + if (Game_Flag_Query(kFlagLucyIsReplicant) && Actor_Query_Goal_Number(kActorLucy) < 599) { Global_Variable_Increment(51, 1); Actor_Put_In_Set(kActorLucy, 48); Actor_Set_At_XYZ(kActorLucy, 78.0f, -41.52f, -119.0f, 659); diff --git a/engines/bladerunner/script/scene/ma01.cpp b/engines/bladerunner/script/scene/ma01.cpp index 289f5b0203..d820a175ed 100644 --- a/engines/bladerunner/script/scene/ma01.cpp +++ b/engines/bladerunner/script/scene/ma01.cpp @@ -20,20 +20,20 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { void SceneScriptMA01::InitializeScene() { Setup_Scene_Information(381.0f, 0.0f, 54.0f, 992); - if (Game_Flag_Query(kFlagMA01Locked)) { + if (Game_Flag_Query(kFlagSpinnerToMA01)) { Setup_Scene_Information(381.0f, 0.0f, 54.0f, 992); } if (Game_Flag_Query(kFlagMA06toMA01)) { Setup_Scene_Information(1446.0f, 0.0f, -725.0f, 660); } Scene_Exit_Add_2D_Exit(0, 328, 132, 426, 190, 0); - if (Game_Flag_Query(kFlagMA01Locked)) { + if (Game_Flag_Query(kFlagSpinnerToMA01)) { Scene_Exit_Add_2D_Exit(1, 234, 240, 398, 328, 2); } Ambient_Sounds_Add_Looping_Sound(101, 90, 0, 1); @@ -119,64 +119,64 @@ bool SceneScriptMA01::ClickedOnExit(int exitId) { switch (spinnerDest) { case kSpinnerDestinationPoliceStation: Game_Flag_Set(178); - Game_Flag_Reset(kFlagMA01Locked); - Game_Flag_Set(251); + Game_Flag_Reset(kFlagSpinnerToMA01); + Game_Flag_Set(kFlagSpinnerToPS01); Set_Enter(61, kScenePS01); Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); break; case kSpinnerDestinationRuncitersAnimals: Game_Flag_Set(182); - Game_Flag_Reset(kFlagMA01Locked); - Game_Flag_Set(249); + Game_Flag_Reset(kFlagSpinnerToMA01); + Game_Flag_Set(kFlagSpinnerToRC01); Set_Enter(69, kSceneRC01); Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); break; case kSpinnerDestinationChinatown: Game_Flag_Set(176); - Game_Flag_Reset(kFlagMA01Locked); - Game_Flag_Set(248); + Game_Flag_Reset(kFlagSpinnerToMA01); + Game_Flag_Set(kFlagSpinnerToCT01); Set_Enter(4, kSceneCT01); Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); break; case kSpinnerDestinationTyrellBuilding: Game_Flag_Set(261); - Game_Flag_Reset(kFlagMA01Locked); - Game_Flag_Set(307); + Game_Flag_Reset(kFlagSpinnerToMA01); + Game_Flag_Set(kFlagSpinnerToTB02); Set_Enter(17, kSceneTB02); Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); break; case kSpinnerDestinationAnimoidRow: Game_Flag_Set(180); - Game_Flag_Reset(kFlagMA01Locked); - Game_Flag_Set(252); + Game_Flag_Reset(kFlagSpinnerToMA01); + Game_Flag_Set(kFlagSpinnerToAR01); Set_Enter(0, kSceneAR01); Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); break; case kSpinnerDestinationDNARow: Game_Flag_Set(177); - Game_Flag_Reset(kFlagMA01Locked); - Game_Flag_Set(253); + Game_Flag_Reset(kFlagSpinnerToMA01); + Game_Flag_Set(kFlagSpinnerToDR01); Set_Enter(7, kSceneDR01); Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); break; case kSpinnerDestinationBradburyBuilding: Game_Flag_Set(258); - Game_Flag_Reset(kFlagMA01Locked); - Game_Flag_Set(254); + Game_Flag_Reset(kFlagSpinnerToMA01); + Game_Flag_Set(kFlagSpinnerToBB01); Set_Enter(20, kSceneBB01); Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); break; case kSpinnerDestinationNightclubRow: Game_Flag_Set(181); - Game_Flag_Reset(kFlagMA01Locked); - Game_Flag_Set(255); + Game_Flag_Reset(kFlagSpinnerToMA01); + Game_Flag_Set(kFlagSpinnerToNR01); Set_Enter(54, kSceneNR01); Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); break; case kSpinnerDestinationHysteriaHall: Game_Flag_Set(257); - Game_Flag_Reset(kFlagMA01Locked); - Game_Flag_Set(256); + Game_Flag_Reset(kFlagSpinnerToMA01); + Game_Flag_Set(kFlagSpinnerToHF01); Set_Enter(37, kSceneHF01); Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 4, true); break; @@ -242,7 +242,7 @@ void SceneScriptMA01::PlayerWalkedOut() { Actor_Set_Invisible(kActorMcCoy, false); Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); - if (!Game_Flag_Query(37) && Global_Variable_Query(1) == 1) { + if (!Game_Flag_Query(kFlagMA01toMA06) && Global_Variable_Query(1) == 1) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); Outtake_Play(kOuttakeTowards2, true, -1); diff --git a/engines/bladerunner/script/scene/ma02.cpp b/engines/bladerunner/script/scene/ma02.cpp index 0bdb0d2f2c..98887ed67e 100644 --- a/engines/bladerunner/script/scene/ma02.cpp +++ b/engines/bladerunner/script/scene/ma02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -227,7 +227,7 @@ bool SceneScriptMA02::sub_401F7C() { void SceneScriptMA02::sub_402044() { int i = 0; int arr[7]; - if (Global_Variable_Query(1) < 4 && Game_Flag_Query(45)) { + if (Global_Variable_Query(1) < 4 && Game_Flag_Query(kFlagGordoIsReplicant)) { arr[i++] = 0; } arr[i++] = 1; diff --git a/engines/bladerunner/script/scene/ma04.cpp b/engines/bladerunner/script/scene/ma04.cpp index 13ca308227..a92890d9bc 100644 --- a/engines/bladerunner/script/scene/ma04.cpp +++ b/engines/bladerunner/script/scene/ma04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -30,7 +30,7 @@ void SceneScriptMA04::InitializeScene() { if (Global_Variable_Query(1) != 2 && Global_Variable_Query(1) != 3) { Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false); } - } else if (Game_Flag_Query(35)) { + } else if (Game_Flag_Query(kFlagMA02ToMA04)) { Setup_Scene_Information(-7099.0f, 954.0f, 1866.0f, 502); } else if (Game_Flag_Query(647)) { Setup_Scene_Information(-7107.0f, 954.0f, 1742.0f, 502); @@ -239,10 +239,10 @@ void SceneScriptMA04::PlayerWalkedIn() { } if (Game_Flag_Query(647)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -7139.0f, 954.0f, 1746.0f, 0, 1, false, 0); - } else if (Game_Flag_Query(35)) { + } else if (Game_Flag_Query(kFlagMA02ToMA04)) { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -7143.0f, 954.0f, 1868.0f, 0, 1, false, 0); } - Game_Flag_Reset(35); + Game_Flag_Reset(kFlagMA02ToMA04); Game_Flag_Reset(kFlagMA05toMA04); Game_Flag_Reset(647); if (Game_Flag_Query(61)) { @@ -268,9 +268,9 @@ void SceneScriptMA04::PlayerWalkedIn() { Actor_Clue_Acquire(kActorMcCoy, kCluePhoneCallGuzza, false, kActorGuzza); Spinner_Set_Selectable_Destination_Flag(kSpinnerDestinationTyrellBuilding, true); Game_Flag_Set(kFlagRC01PoliceDone); - if (!Game_Flag_Query(163)) { - Game_Flag_Set(163); - Item_Remove_From_World(66); + if (!Game_Flag_Query(kFlagChromeDebrisTaken)) { + Game_Flag_Set(kFlagChromeDebrisTaken); + Item_Remove_From_World(kItemChromeDebris); } Actor_Set_Goal_Number(kActorOfficerLeary, 99); Actor_Put_In_Set(kActorOfficerLeary, 93); diff --git a/engines/bladerunner/script/scene/ma05.cpp b/engines/bladerunner/script/scene/ma05.cpp index a086a25c87..40efc3641d 100644 --- a/engines/bladerunner/script/scene/ma05.cpp +++ b/engines/bladerunner/script/scene/ma05.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ma06.cpp b/engines/bladerunner/script/scene/ma06.cpp index df325fece7..732b260e72 100644 --- a/engines/bladerunner/script/scene/ma06.cpp +++ b/engines/bladerunner/script/scene/ma06.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -131,7 +131,7 @@ void SceneScriptMA06::activateElevator() { if (floor > 1) { Game_Flag_Set(kFlagMA06toMA07); } else if (floor == 1) { - if (Game_Flag_Query(kFlagMA01Locked)) { + if (Game_Flag_Query(kFlagSpinnerToMA01)) { Game_Flag_Set(kFlagMA06toMA01); } else { Sound_Play(412, 100, 0, 0, 50); diff --git a/engines/bladerunner/script/scene/ma07.cpp b/engines/bladerunner/script/scene/ma07.cpp index bdba1a0371..a009096795 100644 --- a/engines/bladerunner/script/scene/ma07.cpp +++ b/engines/bladerunner/script/scene/ma07.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -128,8 +128,8 @@ void SceneScriptMA07::PlayerWalkedIn() { if (Actor_Query_Goal_Number(kActorRachael) == 300) { Actor_Set_Goal_Number(kActorRachael, 305); } - if (Game_Flag_Query(58)) { - Game_Flag_Reset(58); + if (Game_Flag_Query(kFlagMA06toMA07)) { + Game_Flag_Reset(kFlagMA06toMA07); } if (!Game_Flag_Query(648) && Game_Flag_Query(671) && Global_Variable_Query(1) == 4) { Scene_Exits_Disable(); diff --git a/engines/bladerunner/script/scene/ma08.cpp b/engines/bladerunner/script/scene/ma08.cpp index bd7d15f235..8e68edc1b7 100644 --- a/engines/bladerunner/script/scene/ma08.cpp +++ b/engines/bladerunner/script/scene/ma08.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/nr01.cpp b/engines/bladerunner/script/scene/nr01.cpp index da71325115..8dd675eb7e 100644 --- a/engines/bladerunner/script/scene/nr01.cpp +++ b/engines/bladerunner/script/scene/nr01.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -47,7 +47,7 @@ void SceneScriptNR01::InitializeScene() { Scene_Exit_Add_2D_Exit(1, 201, 320, 276, 357, 2); } Scene_Exit_Add_2D_Exit(2, 583, 262, 639, 365, 1); - if (Game_Flag_Query(255)) { + if (Game_Flag_Query(kFlagSpinnerToNR01)) { Scene_Exit_Add_2D_Exit(3, 320, 445, 639, 479, 2); } Ambient_Sounds_Add_Looping_Sound(54, 50, 0, 1); @@ -68,14 +68,14 @@ void SceneScriptNR01::InitializeScene() { Ambient_Sounds_Add_Sound(376, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 10, 80, 33, 33, 0, 0, -101, -101, 0, 0); if (Game_Flag_Query(643) && Actor_Query_Goal_Number(kActorSteele) == 230) { - Game_Flag_Reset(255); - Game_Flag_Reset(256); + Game_Flag_Reset(kFlagSpinnerToNR01); + Game_Flag_Reset(kFlagSpinnerToHF01); } - if (Game_Flag_Query(255) && !Game_Flag_Query(247)) { + if (Game_Flag_Query(kFlagSpinnerToNR01) && !Game_Flag_Query(247)) { Scene_Loop_Start_Special(0, 0, 0); Scene_Loop_Set_Default(1); Game_Flag_Set(247); - } else if (Game_Flag_Query(255) && Game_Flag_Query(247)) { + } else if (Game_Flag_Query(kFlagSpinnerToNR01) && Game_Flag_Query(247)) { Scene_Loop_Set_Default(1); } else { Scene_Loop_Set_Default(4); @@ -154,72 +154,72 @@ bool SceneScriptNR01::ClickedOnExit(int exitId) { switch (Spinner_Interface_Choose_Dest(-1, 1)) { case 9: Game_Flag_Set(257); - Game_Flag_Reset(255); - Game_Flag_Set(256); + Game_Flag_Reset(kFlagSpinnerToNR01); + Game_Flag_Set(kFlagSpinnerToHF01); Set_Enter(37, kSceneHF01); Scene_Loop_Start_Special(1, 3, 1); break; case 7: Game_Flag_Set(258); - Game_Flag_Reset(255); + Game_Flag_Reset(kFlagSpinnerToNR01); Game_Flag_Reset(247); - Game_Flag_Set(254); + Game_Flag_Set(kFlagSpinnerToBB01); Set_Enter(20, kSceneBB01); Scene_Loop_Start_Special(1, 3, 1); break; case 6: Game_Flag_Set(177); - Game_Flag_Reset(255); + Game_Flag_Reset(kFlagSpinnerToNR01); Game_Flag_Reset(247); - Game_Flag_Set(253); + Game_Flag_Set(kFlagSpinnerToDR01); Set_Enter(7, kSceneDR01); Scene_Loop_Start_Special(1, 3, 1); break; case 5: Game_Flag_Set(261); - Game_Flag_Reset(255); + Game_Flag_Reset(kFlagSpinnerToNR01); Game_Flag_Reset(247); - Game_Flag_Set(307); + Game_Flag_Set(kFlagSpinnerToTB02); Set_Enter(17, kSceneTB02); Scene_Loop_Start_Special(1, 3, 1); break; case 4: Game_Flag_Set(180); - Game_Flag_Reset(255); + Game_Flag_Reset(kFlagSpinnerToNR01); Game_Flag_Reset(247); - Game_Flag_Set(252); + Game_Flag_Set(kFlagSpinnerToAR01); Set_Enter(0, kSceneAR01); Scene_Loop_Start_Special(1, 3, 1); break; case 3: Game_Flag_Set(176); - Game_Flag_Reset(255); + Game_Flag_Reset(kFlagSpinnerToNR01); Game_Flag_Reset(247); - Game_Flag_Set(248); + Game_Flag_Set(kFlagSpinnerToCT01); Set_Enter(4, kSceneCT01); Scene_Loop_Start_Special(1, 3, 1); break; case 2: Game_Flag_Set(182); - Game_Flag_Reset(255); + Game_Flag_Reset(kFlagSpinnerToNR01); Game_Flag_Reset(247); - Game_Flag_Set(249); + Game_Flag_Set(kFlagSpinnerToRC01); Set_Enter(69, kSceneRC01); Scene_Loop_Start_Special(1, 3, 1); break; case 1: Game_Flag_Set(179); - Game_Flag_Reset(255); + Game_Flag_Reset(kFlagSpinnerToNR01); Game_Flag_Reset(247); - Game_Flag_Set(250); + Game_Flag_Set(kFlagSpinnerToMA01); Set_Enter(49, kSceneMA01); Scene_Loop_Start_Special(1, 3, 1); break; case 0: Game_Flag_Set(178); - Game_Flag_Reset(255); + Game_Flag_Reset(kFlagSpinnerToNR01); Game_Flag_Reset(247); - Game_Flag_Set(251); + Game_Flag_Set(kFlagSpinnerToPS01); Set_Enter(61, kScenePS01); Scene_Loop_Start_Special(1, 3, 1); break; diff --git a/engines/bladerunner/script/scene/nr02.cpp b/engines/bladerunner/script/scene/nr02.cpp index adb15ffce8..93b168b75e 100644 --- a/engines/bladerunner/script/scene/nr02.cpp +++ b/engines/bladerunner/script/scene/nr02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/nr03.cpp b/engines/bladerunner/script/scene/nr03.cpp index dfeacb16f4..beb3ec7632 100644 --- a/engines/bladerunner/script/scene/nr03.cpp +++ b/engines/bladerunner/script/scene/nr03.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/nr04.cpp b/engines/bladerunner/script/scene/nr04.cpp index 1f5ee4727d..2ef114a3e6 100644 --- a/engines/bladerunner/script/scene/nr04.cpp +++ b/engines/bladerunner/script/scene/nr04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/nr05.cpp b/engines/bladerunner/script/scene/nr05.cpp index ac58901f1f..e8608f4230 100644 --- a/engines/bladerunner/script/scene/nr05.cpp +++ b/engines/bladerunner/script/scene/nr05.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/nr06.cpp b/engines/bladerunner/script/scene/nr06.cpp index 25d1148189..6b304dc5f0 100644 --- a/engines/bladerunner/script/scene/nr06.cpp +++ b/engines/bladerunner/script/scene/nr06.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/nr07.cpp b/engines/bladerunner/script/scene/nr07.cpp index dde74478b8..27d85ecaba 100644 --- a/engines/bladerunner/script/scene/nr07.cpp +++ b/engines/bladerunner/script/scene/nr07.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -177,7 +177,7 @@ void SceneScriptNR07::sub_4018D4() { Actor_Change_Animation_Mode(kActorDektora, 71); Actor_Change_Animation_Mode(kActorMcCoy, 21); Loop_Actor_Walk_To_XYZ(kActorDektora, -102.0f, -73.5f, -233.0f, 0, 0, true, 0); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { Actor_Set_Goal_Number(kActorDektora, 245); } else { Actor_Set_Goal_Number(kActorDektora, 295); @@ -257,7 +257,7 @@ void SceneScriptNR07::sub_401EF4() { Game_Flag_Set(638); Actor_Clue_Acquire(kActorMcCoy, kClueDragonflyBelt, 1, kActorDektora); int v0 = Actor_Query_Friendliness_To_Other(kActorDektora, kActorMcCoy); - if (!Game_Flag_Query(47) && v0 < 40) { + if (!Game_Flag_Query(kFlagDektoraIsReplicant) && v0 < 40) { sub_4018D4(); return; } @@ -276,7 +276,7 @@ void SceneScriptNR07::sub_4020F0() { Actor_Says(kActorMcCoy, 3645, 12); Actor_Says(kActorDektora, 620, 30); int v0 = Actor_Query_Friendliness_To_Other(kActorDektora, kActorMcCoy); - if (!Game_Flag_Query(47) && v0 < 40) { + if (!Game_Flag_Query(kFlagDektoraIsReplicant) && v0 < 40) { sub_4018D4(); return; } @@ -308,7 +308,7 @@ void SceneScriptNR07::sub_402284() { Actor_Says(kActorDektora, 730, 30); Actor_Says(kActorMcCoy, 3685, 13); Voight_Kampff_Activate(kActorDektora, 40); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { sub_401A10(); } else { sub_4018D4(); @@ -323,7 +323,7 @@ void SceneScriptNR07::sub_402510() { Actor_Face_Actor(kActorDektora, kActorMcCoy, true); Actor_Says(kActorMcCoy, 3695, 15); Actor_Modify_Friendliness_To_Other(kActorDektora, kActorMcCoy, 5); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { sub_401A10(); } else { sub_4018D4(); @@ -333,7 +333,7 @@ void SceneScriptNR07::sub_402510() { void SceneScriptNR07::sub_402614() { Actor_Says(kActorMcCoy, 3705, 19); Actor_Says(kActorDektora, 760, 53); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { Actor_Modify_Friendliness_To_Other(kActorDektora, kActorMcCoy, -5); Actor_Says(kActorMcCoy, 3710, 18); sub_401A10(); diff --git a/engines/bladerunner/script/scene/nr08.cpp b/engines/bladerunner/script/scene/nr08.cpp index 346d71a7fe..ef54702191 100644 --- a/engines/bladerunner/script/scene/nr08.cpp +++ b/engines/bladerunner/script/scene/nr08.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/nr09.cpp b/engines/bladerunner/script/scene/nr09.cpp index 0fda348f12..fd4faeccb0 100644 --- a/engines/bladerunner/script/scene/nr09.cpp +++ b/engines/bladerunner/script/scene/nr09.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/nr10.cpp b/engines/bladerunner/script/scene/nr10.cpp index a898daa7d2..c3f7bd85a7 100644 --- a/engines/bladerunner/script/scene/nr10.cpp +++ b/engines/bladerunner/script/scene/nr10.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/nr11.cpp b/engines/bladerunner/script/scene/nr11.cpp index 915c5a9738..20a1706704 100644 --- a/engines/bladerunner/script/scene/nr11.cpp +++ b/engines/bladerunner/script/scene/nr11.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -289,7 +289,7 @@ void SceneScriptNR11::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptNR11::PlayerWalkedIn() { if (Actor_Query_Goal_Number(kActorDektora) == 250) { Player_Set_Combat_Mode(true); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { Actor_Set_Goal_Number(kActorSteele, 210); } } @@ -301,7 +301,7 @@ void SceneScriptNR11::PlayerWalkedIn() { Actor_Set_Invisible(kActorMcCoy, false); Player_Set_Combat_Mode(false); Player_Gains_Control(); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { if (Actor_Query_Goal_Number(kActorSteele) == 211) { Actor_Set_At_XYZ(kActorMcCoy, -37.41f, 0.33f, -86.0f, 26); Delay(500); diff --git a/engines/bladerunner/script/scene/ps01.cpp b/engines/bladerunner/script/scene/ps01.cpp index 5e31057dde..28f92a158c 100644 --- a/engines/bladerunner/script/scene/ps01.cpp +++ b/engines/bladerunner/script/scene/ps01.cpp @@ -20,14 +20,14 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { void SceneScriptPS01::InitializeScene() { Setup_Scene_Information(1872.0f, 16592.0f, -2975.0f, 200); Scene_Exit_Add_2D_Exit(0, 36, 194, 138, 326, 0); - if (Game_Flag_Query(251)) { + if (Game_Flag_Query(kFlagSpinnerToPS01)) { Scene_Exit_Add_2D_Exit(1, 344, 288, 584, 384, 2); } Ambient_Sounds_Add_Looping_Sound(381, 100, 1, 1); @@ -37,7 +37,7 @@ void SceneScriptPS01::InitializeScene() { Ambient_Sounds_Add_Sound(376, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(377, 50, 180, 50, 100, 0, 0, -101, -101, 0, 0); if (Game_Flag_Query(130)) { - if (Game_Flag_Query(251)) { + if (Game_Flag_Query(kFlagSpinnerToPS01)) { Scene_Loop_Set_Default(1); } else { Scene_Loop_Set_Default(5); @@ -53,7 +53,7 @@ void SceneScriptPS01::InitializeScene() { void SceneScriptPS01::SceneLoaded() { Obstacle_Object("TUBE81", true); - if (Game_Flag_Query(251)) { + if (Game_Flag_Query(kFlagSpinnerToPS01)) { Unobstacle_Object("Barrier Obstacle", true); } Unobstacle_Object("BOX38", true); @@ -99,64 +99,64 @@ bool SceneScriptPS01::ClickedOnExit(int exitId) { switch (spinnerDest) { case 2: Game_Flag_Set(182); - Game_Flag_Reset(251); - Game_Flag_Set(249); + Game_Flag_Reset(kFlagSpinnerToPS01); + Game_Flag_Set(kFlagSpinnerToRC01); Set_Enter(69, kSceneRC01); Scene_Loop_Start_Special(1, 4, 1); break; case 1: Game_Flag_Set(179); - Game_Flag_Reset(251); - Game_Flag_Set(250); + Game_Flag_Reset(kFlagSpinnerToPS01); + Game_Flag_Set(kFlagSpinnerToMA01); Set_Enter(49, kSceneMA01); Scene_Loop_Start_Special(1, 4, 1); break; case 3: Game_Flag_Set(176); - Game_Flag_Reset(251); - Game_Flag_Set(248); + Game_Flag_Reset(kFlagSpinnerToPS01); + Game_Flag_Set(kFlagSpinnerToCT01); Set_Enter(4, kSceneCT01); Scene_Loop_Start_Special(1, 4, 1); break; case 5: Game_Flag_Set(261); - Game_Flag_Reset(251); - Game_Flag_Set(307); + Game_Flag_Reset(kFlagSpinnerToPS01); + Game_Flag_Set(kFlagSpinnerToTB02); Set_Enter(17, kSceneTB02); Scene_Loop_Start_Special(1, 4, 1); break; case 4: Game_Flag_Set(180); - Game_Flag_Reset(251); - Game_Flag_Set(252); + Game_Flag_Reset(kFlagSpinnerToPS01); + Game_Flag_Set(kFlagSpinnerToAR01); Set_Enter(0, kSceneAR01); Scene_Loop_Start_Special(1, 4, 1); break; case 6: Game_Flag_Set(177); - Game_Flag_Reset(251); - Game_Flag_Set(253); + Game_Flag_Reset(kFlagSpinnerToPS01); + Game_Flag_Set(kFlagSpinnerToDR01); Set_Enter(7, kSceneDR01); Scene_Loop_Start_Special(1, 4, 1); break; case 7: Game_Flag_Set(258); - Game_Flag_Reset(251); - Game_Flag_Set(254); + Game_Flag_Reset(kFlagSpinnerToPS01); + Game_Flag_Set(kFlagSpinnerToBB01); Set_Enter(20, kSceneBB01); Scene_Loop_Start_Special(1, 4, 1); break; case 8: Game_Flag_Set(181); - Game_Flag_Reset(251); - Game_Flag_Set(255); + Game_Flag_Reset(kFlagSpinnerToPS01); + Game_Flag_Set(kFlagSpinnerToNR01); Set_Enter(54, kSceneNR01); Scene_Loop_Start_Special(1, 4, 1); break; case 9: Game_Flag_Set(257); - Game_Flag_Reset(251); - Game_Flag_Set(256); + Game_Flag_Reset(kFlagSpinnerToPS01); + Game_Flag_Set(kFlagSpinnerToHF01); Set_Enter(37, kSceneHF01); Scene_Loop_Start_Special(1, 4, 1); break; diff --git a/engines/bladerunner/script/scene/ps02.cpp b/engines/bladerunner/script/scene/ps02.cpp index 16e23b0dba..544ff32a58 100644 --- a/engines/bladerunner/script/scene/ps02.cpp +++ b/engines/bladerunner/script/scene/ps02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ps03.cpp b/engines/bladerunner/script/scene/ps03.cpp index cad54b7768..854e85f666 100644 --- a/engines/bladerunner/script/scene/ps03.cpp +++ b/engines/bladerunner/script/scene/ps03.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ps04.cpp b/engines/bladerunner/script/scene/ps04.cpp index ef0b2d64c5..7629aa822e 100644 --- a/engines/bladerunner/script/scene/ps04.cpp +++ b/engines/bladerunner/script/scene/ps04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ps05.cpp b/engines/bladerunner/script/scene/ps05.cpp index c93db0b22f..a0bb9a7135 100644 --- a/engines/bladerunner/script/scene/ps05.cpp +++ b/engines/bladerunner/script/scene/ps05.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -164,7 +164,7 @@ void SceneScriptPS05::DialogueQueueFlushed(int a1) { void SceneScriptPS05::sub_401B34() { int i = 0; int arr[7]; - if (Global_Variable_Query(1) < 4 && Game_Flag_Query(45)) { + if (Global_Variable_Query(1) < 4 && Game_Flag_Query(kFlagGordoIsReplicant)) { arr[i++] = 0; } arr[i++] = 1; diff --git a/engines/bladerunner/script/scene/ps06.cpp b/engines/bladerunner/script/scene/ps06.cpp index bf25f799ce..f289b6ee5f 100644 --- a/engines/bladerunner/script/scene/ps06.cpp +++ b/engines/bladerunner/script/scene/ps06.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -66,13 +66,13 @@ bool SceneScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) { Delay(2000); Actor_Voice_Over(3780, kActorVoiceOver); Actor_Voice_Over(3790, kActorVoiceOver); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { Actor_Voice_Over(3800, kActorVoiceOver); Actor_Voice_Over(3810, kActorVoiceOver); Actor_Voice_Over(3820, kActorVoiceOver); Actor_Voice_Over(3830, kActorVoiceOver); Actor_Clue_Acquire(kActorMcCoy, kClueCarRegistration1, 1, -1); - } else if (Game_Flag_Query(45)) { + } else if (Game_Flag_Query(kFlagGordoIsReplicant)) { Actor_Voice_Over(3840, kActorVoiceOver); Actor_Voice_Over(3850, kActorVoiceOver); Actor_Voice_Over(3860, kActorVoiceOver); diff --git a/engines/bladerunner/script/scene/ps07.cpp b/engines/bladerunner/script/scene/ps07.cpp index 01285f5280..f07b4d9e8e 100644 --- a/engines/bladerunner/script/scene/ps07.cpp +++ b/engines/bladerunner/script/scene/ps07.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ps09.cpp b/engines/bladerunner/script/scene/ps09.cpp index 8b21415564..e6c79bd24d 100644 --- a/engines/bladerunner/script/scene/ps09.cpp +++ b/engines/bladerunner/script/scene/ps09.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -250,7 +250,7 @@ void SceneScriptPS09::sub_402090() { Actor_Says(kActorGrigorian, 50, 13); Actor_Says(kActorMcCoy, 4275, 18); Actor_Says(kActorMcCoy, 4280, 19); - if (Game_Flag_Query(44)) { + if (Game_Flag_Query(kFlagIzoIsReplicant)) { Actor_Says(kActorGrigorian, 60, 14); Actor_Says(kActorMcCoy, 4285, 13); Actor_Says(kActorGrigorian, 70, 12); @@ -262,7 +262,7 @@ void SceneScriptPS09::sub_402090() { Actor_Says(kActorMcCoy, 4300, 17); return; } - if (!Game_Flag_Query(44)) { + if (!Game_Flag_Query(kFlagIzoIsReplicant)) { Actor_Says(kActorGrigorian, 130, 15); Actor_Says(kActorGrigorian, 140, 13); Actor_Says(kActorMcCoy, 4305, 13); diff --git a/engines/bladerunner/script/scene/ps10.cpp b/engines/bladerunner/script/scene/ps10.cpp index 059f802fa0..d45a4b8e67 100644 --- a/engines/bladerunner/script/scene/ps10.cpp +++ b/engines/bladerunner/script/scene/ps10.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ps11.cpp b/engines/bladerunner/script/scene/ps11.cpp index f3dd32b322..1aa227b022 100644 --- a/engines/bladerunner/script/scene/ps11.cpp +++ b/engines/bladerunner/script/scene/ps11.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ps12.cpp b/engines/bladerunner/script/scene/ps12.cpp index 04322f28dd..7db642891e 100644 --- a/engines/bladerunner/script/scene/ps12.cpp +++ b/engines/bladerunner/script/scene/ps12.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ps13.cpp b/engines/bladerunner/script/scene/ps13.cpp index ac0509dfde..7a47f807cf 100644 --- a/engines/bladerunner/script/scene/ps13.cpp +++ b/engines/bladerunner/script/scene/ps13.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ps14.cpp b/engines/bladerunner/script/scene/ps14.cpp index f68936ee99..a6b64ab7e8 100644 --- a/engines/bladerunner/script/scene/ps14.cpp +++ b/engines/bladerunner/script/scene/ps14.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ps15.cpp b/engines/bladerunner/script/scene/ps15.cpp index 4d0a350818..0d18724ced 100644 --- a/engines/bladerunner/script/scene/ps15.cpp +++ b/engines/bladerunner/script/scene/ps15.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp index fd1304d5df..c069ed2f08 100644 --- a/engines/bladerunner/script/scene/rc01.cpp +++ b/engines/bladerunner/script/scene/rc01.cpp @@ -20,19 +20,31 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { void SceneScriptRC01::InitializeScene() { #if BLADERUNNER_DEBUG_GAME //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(kFlagKIAPrivacyAddon); + // Spinner_Set_Selectable_Destination_Flag(0, true); + // Spinner_Set_Selectable_Destination_Flag(1, true); + // Spinner_Set_Selectable_Destination_Flag(2, true); + // Spinner_Set_Selectable_Destination_Flag(3, true); + // Spinner_Set_Selectable_Destination_Flag(4, true); + // Spinner_Set_Selectable_Destination_Flag(5, true); + // Spinner_Set_Selectable_Destination_Flag(6, true); + // Spinner_Set_Selectable_Destination_Flag(7, true); + // Spinner_Set_Selectable_Destination_Flag(8, true); + // Spinner_Set_Selectable_Destination_Flag(9, true); // ESPER_Flag_To_Activate(); + // Voight_Kampff_Activate(kActorLucy, 50); + #endif if (!Game_Flag_Query(kFlagIntroPlayed)) { @@ -51,7 +63,7 @@ void SceneScriptRC01::InitializeScene() { Setup_Scene_Information(-10.98f, -0.30f, 318.15f, 616); } Scene_Exit_Add_2D_Exit(0, 314, 145, 340, 255, 0); - if (Game_Flag_Query(249)) { + if (Game_Flag_Query(kFlagSpinnerToRC01)) { Scene_Exit_Add_2D_Exit(1, 482, 226, 639, 280, 2); } if (Global_Variable_Query(1) > 1 && Game_Flag_Query(710)) { @@ -92,7 +104,7 @@ void SceneScriptRC01::InitializeScene() { if (!Game_Flag_Query(kFlagRC02toRC01) && !Game_Flag_Query(kFlagRC03toRC01)) { Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 5, false); } - if (Game_Flag_Query(249)) { + if (Game_Flag_Query(kFlagSpinnerToRC01)) { Scene_Loop_Set_Default(6); } else { Scene_Loop_Set_Default(10); @@ -182,8 +194,8 @@ void SceneScriptRC01::SceneLoaded() { Preload(589); } - if (!Game_Flag_Query(163)) { - Item_Add_To_World(66, 938, 69, -148.60f, -0.30f, 225.15f, 256, 24, 24, false, true, false, true); + if (!Game_Flag_Query(kFlagChromeDebrisTaken)) { + Item_Add_To_World(kItemChromeDebris, 938, 69, -148.60f, -0.30f, 225.15f, 256, 24, 24, false, true, false, true); } if (!Game_Flag_Query(kFlagIntroPlayed)) { @@ -268,15 +280,15 @@ bool SceneScriptRC01::ClickedOnActor(int actorId) { if (Actor_Query_Goal_Number(kActorOfficerLeary) == 1) { Actor_Set_Goal_Number(kActorOfficerLeary, 0); } - if (Game_Flag_Query(3)) { + if (Game_Flag_Query(kFlagGotOfficersStatement)) { Actor_Says(kActorMcCoy, 4535, 13); - Game_Flag_Set(392); + Game_Flag_Set(KFlagMcCoyAndOfficerLearyTalking); if (Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewA) && !Actor_Clue_Query(kActorMcCoy, kClueCrowdInterviewA)) { Actor_Face_Object(kActorOfficerLeary, "70_1", true); Actor_Says(kActorOfficerLeary, 100, 15); Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true); Actor_Clue_Acquire(kActorMcCoy, kClueCrowdInterviewA, true, kActorOfficerLeary); - Game_Flag_Reset(392); + Game_Flag_Reset(KFlagMcCoyAndOfficerLearyTalking); } else if (Actor_Clue_Query(kActorOfficerLeary, kClueCrowdInterviewB) && !Actor_Clue_Query(kActorMcCoy, kClueCrowdInterviewB)) { Actor_Face_Object(kActorOfficerLeary, "70_5", true); Actor_Says(kActorOfficerLeary, 120, 19); @@ -284,26 +296,26 @@ bool SceneScriptRC01::ClickedOnActor(int actorId) { Actor_Says(kActorOfficerLeary, 130, 14); I_Sez("JM: Did it have a huge, ugly piece of chrome on it?"); Actor_Clue_Acquire(kActorMcCoy, kClueCrowdInterviewB, true, kActorOfficerLeary); - Game_Flag_Reset(392); + Game_Flag_Reset(KFlagMcCoyAndOfficerLearyTalking); } else { Actor_Says(kActorOfficerLeary, 90, 16); I_Sez("JM: This officer has a talent for vivid metaphors."); - if (!Game_Flag_Query(397)) { + if (!Game_Flag_Query(KFlagMcCoyAndOfficerLearyArtMetaphor)) { I_Sez("DL: What is that supposed to mean? I didn't write this line..."); Actor_Says(kActorMcCoy, 4540, 16); - Game_Flag_Set(397); + Game_Flag_Set(KFlagMcCoyAndOfficerLearyArtMetaphor); } - Game_Flag_Reset(392); + Game_Flag_Reset(KFlagMcCoyAndOfficerLearyTalking); } } else { I_Sez("MG: Hey, leave that officer alone. Can't you see he's busy?"); I_Sez("JM: (...mmm, donuts...)"); - Game_Flag_Set(3); + Game_Flag_Set(kFlagGotOfficersStatement); Actor_Clue_Acquire(kActorMcCoy, kClueOfficersStatement, true, kActorOfficerLeary); Actor_Says(kActorMcCoy, 4515, 13); - Game_Flag_Set(392); + Game_Flag_Set(KFlagMcCoyAndOfficerLearyTalking); Actor_Says(kActorOfficerLeary, 40, 13); - if (!Game_Flag_Query(1)) { + if (!Game_Flag_Query(kFlagRC02Discovered)) { Actor_Says(kActorOfficerLeary, 50, 14); Actor_Says(kActorOfficerLeary, 60, 15); I_Sez("MG: It's all fun and games until someone loses a tiger cub."); @@ -313,7 +325,7 @@ bool SceneScriptRC01::ClickedOnActor(int actorId) { Actor_Says(kActorOfficerLeary, 80, 18); Actor_Says(kActorMcCoy, 4530, 15); } - Game_Flag_Reset(392); + Game_Flag_Reset(KFlagMcCoyAndOfficerLearyTalking); } } return true; @@ -322,15 +334,15 @@ bool SceneScriptRC01::ClickedOnActor(int actorId) { } bool SceneScriptRC01::ClickedOnItem(int itemId, bool a2) { - if (itemId == 66) { + if (itemId == kItemChromeDebris) { Actor_Set_Goal_Number(kActorOfficerLeary, 0); - if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 66, 36, 1, false)) { - Actor_Face_Item(kActorMcCoy, 66, true); + if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemChromeDebris, 36, 1, false)) { + Actor_Face_Item(kActorMcCoy, kItemChromeDebris, true); Actor_Clue_Acquire(kActorMcCoy, kClueChromeDebris, true, -1); Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true); Actor_Says(kActorOfficerLeary, 20, 12); - Game_Flag_Set(163); - Item_Remove_From_World(66); + Game_Flag_Set(kFlagChromeDebrisTaken); + Item_Remove_From_World(kItemChromeDebris); Item_Pickup_Spin_Effect(938, 426, 316); I_Sez("JM: Chrome...is that what that is?"); Actor_Says(kActorMcCoy, 4505, 13); @@ -365,7 +377,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { switch (Global_Variable_Query(1)) { case 1: case 4: - Game_Flag_Set(8); + Game_Flag_Set(kFlagRC01toRC02); Set_Enter(16, kSceneRC02); break; case 2: @@ -413,8 +425,8 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { switch (spinnerDest) { case kSpinnerDestinationPoliceStation: Game_Flag_Set(178); - Game_Flag_Reset(249); - Game_Flag_Set(251); + Game_Flag_Reset(kFlagSpinnerToRC01); + Game_Flag_Set(kFlagSpinnerToPS01); Set_Enter(61, kScenePS01); if (Game_Flag_Query(kFlagRC01PoliceDone)) { Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 9, true); @@ -424,8 +436,8 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { break; case kSpinnerDestinationMcCoysApartment: Game_Flag_Set(179); - Game_Flag_Reset(249); - Game_Flag_Set(250); + Game_Flag_Reset(kFlagSpinnerToRC01); + Game_Flag_Set(kFlagSpinnerToMA01); Set_Enter(49, kSceneMA01); if (Game_Flag_Query(kFlagRC01PoliceDone)) { Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 9, true); @@ -435,8 +447,8 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { break; case kSpinnerDestinationChinatown: Game_Flag_Set(176); - Game_Flag_Reset(249); - Game_Flag_Set(248); + Game_Flag_Reset(kFlagSpinnerToRC01); + Game_Flag_Set(kFlagSpinnerToCT01); Set_Enter(4, kSceneCT01); if (Game_Flag_Query(kFlagRC01PoliceDone)) { Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 9, true); @@ -446,8 +458,8 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { break; case kSpinnerDestinationTyrellBuilding: Game_Flag_Set(261); - Game_Flag_Reset(249); - Game_Flag_Set(307); + Game_Flag_Reset(kFlagSpinnerToRC01); + Game_Flag_Set(kFlagSpinnerToTB02); Set_Enter(17, kSceneTB02); if (Game_Flag_Query(kFlagRC01PoliceDone)) { Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 9, true); @@ -457,8 +469,8 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { break; case kSpinnerDestinationAnimoidRow: Game_Flag_Set(180); - Game_Flag_Reset(249); - Game_Flag_Set(252); + Game_Flag_Reset(kFlagSpinnerToRC01); + Game_Flag_Set(kFlagSpinnerToAR01); Set_Enter(0, kSceneAR01); if (Game_Flag_Query(kFlagRC01PoliceDone)) { Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 9, true); @@ -468,8 +480,8 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { break; case kSpinnerDestinationDNARow: Game_Flag_Set(177); - Game_Flag_Reset(249); - Game_Flag_Set(253); + Game_Flag_Reset(kFlagSpinnerToRC01); + Game_Flag_Set(kFlagSpinnerToDR01); Set_Enter(7, kSceneDR01); if (Game_Flag_Query(kFlagRC01PoliceDone)) { Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 9, true); @@ -479,8 +491,8 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { break; case kSpinnerDestinationBradburyBuilding: Game_Flag_Set(258); - Game_Flag_Reset(249); - Game_Flag_Set(254); + Game_Flag_Reset(kFlagSpinnerToRC01); + Game_Flag_Set(kFlagSpinnerToBB01); Set_Enter(20, kSceneBB01); if (Game_Flag_Query(kFlagRC01PoliceDone)) { Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 9, true); @@ -490,8 +502,8 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { break; case kSpinnerDestinationNightclubRow: Game_Flag_Set(181); - Game_Flag_Reset(249); - Game_Flag_Set(255); + Game_Flag_Reset(kFlagSpinnerToRC01); + Game_Flag_Set(kFlagSpinnerToNR01); Set_Enter(54, kSceneNR01); if (Game_Flag_Query(kFlagRC01PoliceDone)) { Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 9, true); @@ -501,8 +513,8 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { break; case kSpinnerDestinationHysteriaHall: Game_Flag_Set(257); - Game_Flag_Reset(249); - Game_Flag_Set(256); + Game_Flag_Reset(kFlagSpinnerToRC01); + Game_Flag_Set(kFlagSpinnerToHF01); Set_Enter(37, kSceneHF01); if (Game_Flag_Query(kFlagRC01PoliceDone)) { Scene_Loop_Start_Special(kSceneLoopModeChangeSet, 9, true); @@ -519,7 +531,7 @@ bool SceneScriptRC01::ClickedOnExit(int exitId) { } if (exitId == 2) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -471.98f, -0.3f, 258.15f, 4, 1, false, 0)) { - Game_Flag_Set(115); + Game_Flag_Set(kFlagRC01toRC03); Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); Set_Enter(70, kSceneRC03); @@ -578,7 +590,7 @@ void SceneScriptRC01::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo } void SceneScriptRC01::PlayerWalkedIn() { - if (Game_Flag_Query(249) && !Game_Flag_Query(kFlagRC02toRC01) && !Game_Flag_Query(kFlagRC03toRC01)) { + if (Game_Flag_Query(kFlagSpinnerToRC01) && !Game_Flag_Query(kFlagRC02toRC01) && !Game_Flag_Query(kFlagRC03toRC01)) { walkToCenter(); } @@ -595,7 +607,7 @@ void SceneScriptRC01::PlayerWalkedIn() { Player_Gains_Control(); Game_Flag_Reset(kFlagRC02toRC01); - if (Game_Flag_Query(1) && !Game_Flag_Query(4)) { + if (Game_Flag_Query(kFlagRC02Discovered) && !Game_Flag_Query(4)) { Actor_Voice_Over(1910, kActorVoiceOver); Actor_Voice_Over(1920, kActorVoiceOver); Actor_Voice_Over(1930, kActorVoiceOver); @@ -609,7 +621,7 @@ void SceneScriptRC01::PlayerWalkedIn() { void SceneScriptRC01::PlayerWalkedOut() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); - if (!Game_Flag_Query(8) && !Game_Flag_Query(115) && Global_Variable_Query(1)) { + if (!Game_Flag_Query(kFlagRC01toRC02) && !Game_Flag_Query(kFlagRC01toRC03) && Global_Variable_Query(1)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); Ambient_Sounds_Remove_All_Looping_Sounds(1); Outtake_Play(kOuttakeAway2, 1, -1); diff --git a/engines/bladerunner/script/scene/rc02.cpp b/engines/bladerunner/script/scene/rc02.cpp index 02dd4ee699..0a95e40a5c 100644 --- a/engines/bladerunner/script/scene/rc02.cpp +++ b/engines/bladerunner/script/scene/rc02.cpp @@ -20,12 +20,12 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { void SceneScriptRC02::InitializeScene() { - if (Game_Flag_Query(8)) { + if (Game_Flag_Query(kFlagRC01toRC02)) { Setup_Scene_Information(-103.0f, -1238.89f, 108603.04f, 1007); } else { Setup_Scene_Information(-20.2f, -1238.89f, 108100.73f, 539); @@ -79,10 +79,10 @@ void SceneScriptRC02::SceneLoaded() { if (Actor_Clue_Query(kActorMcCoy, kClueRuncitersVideo) || Global_Variable_Query(1) > 1) { Unclickable_Object("SCRTY CA03"); } - if (!Game_Flag_Query(190)) { - Item_Add_To_World(100, 966, 16, -52.88f, -1238.89f, 108467.74f, 256, 6, 6, false, true, false, true); - Item_Add_To_World(101, 966, 16, -37.16f, -1238.89f, 108456.59f, 512, 6, 6, false, true, false, true); - Item_Add_To_World(102, 966, 16, -62.86f, -1238.89f, 108437.52f, 625, 6, 6, false, true, false, true); + if (!Game_Flag_Query(kFlagShellCasingsTaken)) { + Item_Add_To_World(kItemShellCasingA, 966, 16, -52.88f, -1238.89f, 108467.74f, 256, 6, 6, false, true, false, true); + Item_Add_To_World(kItemShellCasingB, 966, 16, -37.16f, -1238.89f, 108456.59f, 512, 6, 6, false, true, false, true); + Item_Add_To_World(kItemShellCasingC, 966, 16, -62.86f, -1238.89f, 108437.52f, 625, 6, 6, false, true, false, true); } } @@ -152,7 +152,7 @@ void SceneScriptRC02::dialogueWithRunciter() { case 10: Actor_Says(kActorMcCoy, 4585, 13); Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { Actor_Says(kActorRunciter, 250, 13); Actor_Says(kActorRunciter, 270, 13); Actor_Clue_Acquire(kActorMcCoy, kClueRunciterInterviewB1, 1, kActorRunciter); @@ -295,14 +295,14 @@ bool SceneScriptRC02::ClickedOnActor(int actorId) { } bool SceneScriptRC02::ClickedOnItem(int itemId, bool a2) { - if (itemId == 100 || itemId == 101 || itemId == 102) { - if (!Loop_Actor_Walk_To_Item(kActorMcCoy, 100, 24, 1, false)) { - Actor_Face_Item(kActorMcCoy, 100, true); + if (itemId == kItemShellCasingA || itemId == kItemShellCasingB || itemId == kItemShellCasingC) { + if (!Loop_Actor_Walk_To_Item(kActorMcCoy, kItemShellCasingA, 24, 1, false)) { + Actor_Face_Item(kActorMcCoy, kItemShellCasingA, true); Actor_Clue_Acquire(kActorMcCoy, kClueShellCasings, 1, -1); - Game_Flag_Set(190); - Item_Remove_From_World(100); - Item_Remove_From_World(101); - Item_Remove_From_World(102); + Game_Flag_Set(kFlagShellCasingsTaken); + Item_Remove_From_World(kItemShellCasingA); + Item_Remove_From_World(kItemShellCasingB); + Item_Remove_From_World(kItemShellCasingC); Item_Pickup_Spin_Effect(966, 395, 352); Actor_Voice_Over(1960, kActorVoiceOver); } @@ -346,18 +346,18 @@ void SceneScriptRC02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptRC02::PlayerWalkedIn() { Player_Set_Combat_Mode(false); - if (Game_Flag_Query(8)) { + if (Game_Flag_Query(kFlagRC01toRC02)) { Player_Loses_Control(); Loop_Actor_Walk_To_XYZ(kActorMcCoy, -72.2f, -1238.89f, 108496.73f, 0, 0, false, 0); Player_Gains_Control(); - Game_Flag_Reset(8); - if (!Game_Flag_Query(1)) { + Game_Flag_Reset(kFlagRC01toRC02); + if (!Game_Flag_Query(kFlagRC02Discovered)) { Actor_Voice_Over(1970, kActorVoiceOver); Actor_Voice_Over(1980, kActorVoiceOver); Actor_Voice_Over(1990, kActorVoiceOver); Actor_Clue_Acquire(kActorMcCoy, kClueLimpingFootprints, 1, -1); Actor_Clue_Acquire(kActorMcCoy, kClueGracefulFootprints, 1, -1); - Game_Flag_Set(1); + Game_Flag_Set(kFlagRC02Discovered); } if (Actor_Query_Which_Set_In(kActorRunciter) == 16 && Actor_Query_Goal_Number(kActorRunciter) < 300) { Actor_Set_Goal_Number(kActorRunciter, 1); diff --git a/engines/bladerunner/script/scene/rc03.cpp b/engines/bladerunner/script/scene/rc03.cpp index 6f7bdad3cc..ca6bfc96fa 100644 --- a/engines/bladerunner/script/scene/rc03.cpp +++ b/engines/bladerunner/script/scene/rc03.cpp @@ -20,14 +20,14 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { void SceneScriptRC03::InitializeScene() { - if (Game_Flag_Query(115) ) { + if (Game_Flag_Query(kFlagRC01toRC03) ) { Setup_Scene_Information(298.0f, -4.0f, 405.0f, 800); - Game_Flag_Reset(115); + Game_Flag_Reset(kFlagRC01toRC03); } else if (Game_Flag_Query(117) ) { Setup_Scene_Information(-469.0f, -4.0f, 279.0f, 250); } else if (Game_Flag_Query(119) ) { @@ -247,13 +247,13 @@ void SceneScriptRC03::PlayerWalkedIn() { Actor_Says_With_Pause(kActorIzo, 630, 0, -1); Actor_Says_With_Pause(kActorIzo, 640, 0, -1); Actor_Says_With_Pause(kActorIzo, 650, 0, -1); - if (Game_Flag_Query(44) ) { + if (Game_Flag_Query(kFlagIzoIsReplicant) ) { Actor_Set_Goal_Number(kActorSteele, 100); } Actor_Change_Animation_Mode(kActorMcCoy, 20); Loop_Actor_Walk_To_XYZ(kActorIzo, 180.0f, -4.0f, 184.0f, 0, 0, false, 0); Actor_Change_Animation_Mode(kActorIzo, 6); - if (!Game_Flag_Query(44)) { + if (!Game_Flag_Query(kFlagIzoIsReplicant)) { Actor_Set_Goal_Number(kActorSteele, 100); } Player_Gains_Control(); diff --git a/engines/bladerunner/script/scene/rc04.cpp b/engines/bladerunner/script/scene/rc04.cpp index 72f50588a9..dee3c7a551 100644 --- a/engines/bladerunner/script/scene/rc04.cpp +++ b/engines/bladerunner/script/scene/rc04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -105,7 +105,7 @@ void SceneScriptRC04::sub_401DF4() { Actor_Says(kActorBulletBob, 330, 33); Actor_Says(kActorBulletBob, 340, 37); Actor_Says(kActorMcCoy, 5015, 11); - if (Game_Flag_Query(44)) { + if (Game_Flag_Query(kFlagIzoIsReplicant)) { Actor_Says(kActorBulletBob, 350, 32); Actor_Says(kActorBulletBob, 360, 33); Actor_Says(kActorBulletBob, 370, 30); @@ -143,7 +143,7 @@ void SceneScriptRC04::sub_401DF4() { Actor_Says(kActorBulletBob, 340, 11); Actor_Says(kActorMcCoy, 5015, 16); Actor_Modify_Friendliness_To_Other(kActorBulletBob, kActorMcCoy, 3); - if (Game_Flag_Query(44)) { + if (Game_Flag_Query(kFlagIzoIsReplicant)) { Actor_Says(kActorBulletBob, 350, 32); Actor_Says(kActorBulletBob, 360, 30); Actor_Says(kActorBulletBob, 370, 33); diff --git a/engines/bladerunner/script/scene/rc51.cpp b/engines/bladerunner/script/scene/rc51.cpp index 33c8549017..6a376a725b 100644 --- a/engines/bladerunner/script/scene/rc51.cpp +++ b/engines/bladerunner/script/scene/rc51.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/tb02.cpp b/engines/bladerunner/script/scene/tb02.cpp index 301fa98f46..5ae0a54d44 100644 --- a/engines/bladerunner/script/scene/tb02.cpp +++ b/engines/bladerunner/script/scene/tb02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -63,7 +63,7 @@ void SceneScriptTB02::InitializeScene() { Ambient_Sounds_Add_Sound(194, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); Ambient_Sounds_Add_Sound(195, 5, 70, 12, 12, -100, 100, -101, -101, 0, 0); } - if (Game_Flag_Query(307) && Global_Variable_Query(1) < 4) { + if (Game_Flag_Query(kFlagSpinnerToTB02) && Global_Variable_Query(1) < 4) { Scene_Exit_Add_2D_Exit(2, 67, 0, 233, 362, 3); } if (Game_Flag_Query(155)) { @@ -195,56 +195,56 @@ bool SceneScriptTB02::ClickedOnExit(int exitId) { switch (Spinner_Interface_Choose_Dest(-1, 0)) { case 9: Game_Flag_Set(257); - Game_Flag_Reset(307); - Game_Flag_Set(256); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToHF01); Set_Enter(37, kSceneHF01); break; case 8: Game_Flag_Set(181); - Game_Flag_Reset(307); - Game_Flag_Set(255); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToNR01); Set_Enter(54, kSceneNR01); break; case 7: Game_Flag_Set(258); - Game_Flag_Reset(307); - Game_Flag_Set(254); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToBB01); Set_Enter(20, kSceneBB01); break; case 6: Game_Flag_Set(177); - Game_Flag_Reset(307); - Game_Flag_Set(253); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToDR01); Set_Enter(7, kSceneDR01); break; case 4: Game_Flag_Set(180); - Game_Flag_Reset(307); - Game_Flag_Set(252); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToAR01); Set_Enter(0, kSceneAR01); break; case 3: Game_Flag_Set(176); - Game_Flag_Reset(307); - Game_Flag_Set(248); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToCT01); Set_Enter(4, kSceneCT01); break; case 2: Game_Flag_Set(182); - Game_Flag_Reset(307); - Game_Flag_Set(249); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToRC01); Set_Enter(69, kSceneRC01); break; case 1: Game_Flag_Set(179); - Game_Flag_Reset(307); - Game_Flag_Set(250); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToMA01); Set_Enter(49, kSceneMA01); break; case 0: Game_Flag_Set(178); - Game_Flag_Reset(307); - Game_Flag_Set(251); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToPS01); Set_Enter(61, kScenePS01); break; default: @@ -431,7 +431,7 @@ void SceneScriptTB02::sub_402B50() { switch (answer) { case 740: Actor_Says(kActorMcCoy, 5250, 15); - if (Game_Flag_Query(48)) { + if (Game_Flag_Query(kFlagSadikIsReplicant)) { Actor_Says(kActorSteele, 2250, 12); Actor_Says(kActorSteele, 2260, 13); Actor_Says(kActorMcCoy, 5265, 12); diff --git a/engines/bladerunner/script/scene/tb03.cpp b/engines/bladerunner/script/scene/tb03.cpp index 599e321402..8803740d7a 100644 --- a/engines/bladerunner/script/scene/tb03.cpp +++ b/engines/bladerunner/script/scene/tb03.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/tb05.cpp b/engines/bladerunner/script/scene/tb05.cpp index 0b1bd1c672..b3299292f1 100644 --- a/engines/bladerunner/script/scene/tb05.cpp +++ b/engines/bladerunner/script/scene/tb05.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -54,7 +54,7 @@ void SceneScriptTB05::SceneLoaded() { if (!Actor_Clue_Query(kActorMcCoy, kClueDragonflyEarring)) { Item_Add_To_World(76, 940, 72, 76.160004f, 147.36f, -235.14999f, 0, 6, 6, false, true, false, true); } - if (!Actor_Clue_Query(kActorMcCoy, kClueTyrellSalesPamphlet1) && !Actor_Clue_Query(kActorMcCoy, kClueTyrellSalesPamphlet2) && (Game_Flag_Query(45) || Game_Flag_Query(46))) { + if (!Actor_Clue_Query(kActorMcCoy, kClueTyrellSalesPamphlet1) && !Actor_Clue_Query(kActorMcCoy, kClueTyrellSalesPamphlet2) && (Game_Flag_Query(kFlagGordoIsReplicant) || Game_Flag_Query(kFlagLucyIsReplicant))) { Item_Add_To_World(119, 972, 72, 129.00999f, 147.12f, -162.98f, 0, 8, 8, false, true, false, true); } } @@ -136,7 +136,7 @@ bool SceneScriptTB05::ClickedOnItem(int itemId, bool a2) { Item_Remove_From_World(119); Item_Pickup_Spin_Effect(972, 449, 431); Actor_Voice_Over(4280, kActorVoiceOver); - if (Game_Flag_Query(45)) { + if (Game_Flag_Query(kFlagGordoIsReplicant)) { Actor_Voice_Over(4290, kActorVoiceOver); Actor_Clue_Acquire(kActorMcCoy, kClueTyrellSalesPamphlet1, 1, -1); } else { diff --git a/engines/bladerunner/script/scene/tb06.cpp b/engines/bladerunner/script/scene/tb06.cpp index 5642281d26..2970446ca3 100644 --- a/engines/bladerunner/script/scene/tb06.cpp +++ b/engines/bladerunner/script/scene/tb06.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -79,7 +79,7 @@ bool SceneScriptTB06::ClickedOnActor(int actorId) { Actor_Voice_Over(2310, kActorVoiceOver); Item_Pickup_Spin_Effect(974, 66, 397); Actor_Voice_Over(2320, kActorVoiceOver); - if (Game_Flag_Query(48)) { + if (Game_Flag_Query(kFlagSadikIsReplicant)) { Actor_Voice_Over(2330, kActorVoiceOver); Actor_Voice_Over(2340, kActorVoiceOver); } diff --git a/engines/bladerunner/script/scene/tb07.cpp b/engines/bladerunner/script/scene/tb07.cpp index 5a249c649e..688c9f4c22 100644 --- a/engines/bladerunner/script/scene/tb07.cpp +++ b/engines/bladerunner/script/scene/tb07.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -96,56 +96,56 @@ bool SceneScriptTB07::ClickedOnExit(int exitId) { switch (Spinner_Interface_Choose_Dest(-1, 0)) { case 9: Game_Flag_Set(257); - Game_Flag_Reset(307); - Game_Flag_Set(256); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToHF01); Set_Enter(37, kSceneHF01); break; case 8: Game_Flag_Set(181); - Game_Flag_Reset(307); - Game_Flag_Set(255); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToNR01); Set_Enter(54, kSceneNR01); break; case 7: Game_Flag_Set(258); - Game_Flag_Reset(307); - Game_Flag_Set(254); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToBB01); Set_Enter(20, kSceneBB01); break; case 6: Game_Flag_Set(177); - Game_Flag_Reset(307); - Game_Flag_Set(253); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToDR01); Set_Enter(7, kSceneDR01); break; case 4: Game_Flag_Set(180); - Game_Flag_Reset(307); - Game_Flag_Set(252); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToAR01); Set_Enter(0, kSceneAR01); break; case 3: Game_Flag_Set(176); - Game_Flag_Reset(307); - Game_Flag_Set(248); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToCT01); Set_Enter(4, kSceneCT01); break; case 2: Game_Flag_Set(182); - Game_Flag_Reset(307); - Game_Flag_Set(249); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToRC01); Set_Enter(69, kSceneRC01); break; case 1: Game_Flag_Set(179); - Game_Flag_Reset(307); - Game_Flag_Set(250); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToMA01); Set_Enter(49, kSceneMA01); break; case 0: Game_Flag_Set(178); - Game_Flag_Reset(307); - Game_Flag_Set(251); + Game_Flag_Reset(kFlagSpinnerToTB02); + Game_Flag_Set(kFlagSpinnerToPS01); Set_Enter(61, kScenePS01); break; default: diff --git a/engines/bladerunner/script/scene/ug01.cpp b/engines/bladerunner/script/scene/ug01.cpp index a1dde296e8..8c60aabd38 100644 --- a/engines/bladerunner/script/scene/ug01.cpp +++ b/engines/bladerunner/script/scene/ug01.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug02.cpp b/engines/bladerunner/script/scene/ug02.cpp index af91b5a060..2415bb78fd 100644 --- a/engines/bladerunner/script/scene/ug02.cpp +++ b/engines/bladerunner/script/scene/ug02.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -67,7 +67,7 @@ void SceneScriptUG02::SceneLoaded() { Clickable_Object("CRATE_3"); Footstep_Sounds_Set(0, 0); Footstep_Sounds_Set(8, 2); - if (!Game_Flag_Query(656) && Game_Flag_Query(44)) { + if (!Game_Flag_Query(656) && Game_Flag_Query(kFlagIzoIsReplicant)) { Item_Add_To_World(88, 963, 75, -300.37f, 120.16f, -81.31f, 0, 8, 8, false, true, false, true); } } diff --git a/engines/bladerunner/script/scene/ug03.cpp b/engines/bladerunner/script/scene/ug03.cpp index d5d80c9d90..a8119a893f 100644 --- a/engines/bladerunner/script/scene/ug03.cpp +++ b/engines/bladerunner/script/scene/ug03.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug04.cpp b/engines/bladerunner/script/scene/ug04.cpp index 13fb0d472c..8c54e64aad 100644 --- a/engines/bladerunner/script/scene/ug04.cpp +++ b/engines/bladerunner/script/scene/ug04.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp index 3a66f5e45a..e2f83c6fc3 100644 --- a/engines/bladerunner/script/scene/ug05.cpp +++ b/engines/bladerunner/script/scene/ug05.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { @@ -246,7 +246,7 @@ void SceneScriptUG05::sub_402218() { Ambient_Sounds_Remove_All_Non_Looping_Sounds(1); Ambient_Sounds_Remove_All_Looping_Sounds(1); if (v0 == kActorLucy) { - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { if (Global_Variable_Query(48) > 3) { Outtake_Play(kOuttakeEnd1B, false, -1); } else { @@ -256,7 +256,7 @@ void SceneScriptUG05::sub_402218() { Outtake_Play(kOuttakeEnd1A, false, -1); } } else if (v0 == kActorDektora) { - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { if (Global_Variable_Query(48) > 3) { Outtake_Play(kOuttakeEnd1E, false, -1); } else { diff --git a/engines/bladerunner/script/scene/ug06.cpp b/engines/bladerunner/script/scene/ug06.cpp index 55a84442f9..d69103aef8 100644 --- a/engines/bladerunner/script/scene/ug06.cpp +++ b/engines/bladerunner/script/scene/ug06.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug07.cpp b/engines/bladerunner/script/scene/ug07.cpp index fdb61c766a..29e7cfe72d 100644 --- a/engines/bladerunner/script/scene/ug07.cpp +++ b/engines/bladerunner/script/scene/ug07.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug08.cpp b/engines/bladerunner/script/scene/ug08.cpp index 667fa620fe..c346ac9a67 100644 --- a/engines/bladerunner/script/scene/ug08.cpp +++ b/engines/bladerunner/script/scene/ug08.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug09.cpp b/engines/bladerunner/script/scene/ug09.cpp index f217b3df67..502dda9942 100644 --- a/engines/bladerunner/script/scene/ug09.cpp +++ b/engines/bladerunner/script/scene/ug09.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug10.cpp b/engines/bladerunner/script/scene/ug10.cpp index 2568e433cd..fc21e8b580 100644 --- a/engines/bladerunner/script/scene/ug10.cpp +++ b/engines/bladerunner/script/scene/ug10.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug12.cpp b/engines/bladerunner/script/scene/ug12.cpp index 2f560d8f65..7b696c6938 100644 --- a/engines/bladerunner/script/scene/ug12.cpp +++ b/engines/bladerunner/script/scene/ug12.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug13.cpp b/engines/bladerunner/script/scene/ug13.cpp index 668132088d..0623cea57a 100644 --- a/engines/bladerunner/script/scene/ug13.cpp +++ b/engines/bladerunner/script/scene/ug13.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug14.cpp b/engines/bladerunner/script/scene/ug14.cpp index 8cb205856c..5e768b90b0 100644 --- a/engines/bladerunner/script/scene/ug14.cpp +++ b/engines/bladerunner/script/scene/ug14.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug15.cpp b/engines/bladerunner/script/scene/ug15.cpp index e35121fe11..760e9c42f8 100644 --- a/engines/bladerunner/script/scene/ug15.cpp +++ b/engines/bladerunner/script/scene/ug15.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug16.cpp b/engines/bladerunner/script/scene/ug16.cpp index 4b1ce4f7c5..6e37cb6b4d 100644 --- a/engines/bladerunner/script/scene/ug16.cpp +++ b/engines/bladerunner/script/scene/ug16.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug17.cpp b/engines/bladerunner/script/scene/ug17.cpp index 1f223b2312..d501e6dbab 100644 --- a/engines/bladerunner/script/scene/ug17.cpp +++ b/engines/bladerunner/script/scene/ug17.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug18.cpp b/engines/bladerunner/script/scene/ug18.cpp index 08d6269e8b..8c35ce7985 100644 --- a/engines/bladerunner/script/scene/ug18.cpp +++ b/engines/bladerunner/script/scene/ug18.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene/ug19.cpp b/engines/bladerunner/script/scene/ug19.cpp index cee17d1223..f73e9f8196 100644 --- a/engines/bladerunner/script/scene/ug19.cpp +++ b/engines/bladerunner/script/scene/ug19.cpp @@ -20,7 +20,7 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { diff --git a/engines/bladerunner/script/scene.cpp b/engines/bladerunner/script/scene_script.cpp index 646fa486af..639bca8c4e 100644 --- a/engines/bladerunner/script/scene.cpp +++ b/engines/bladerunner/script/scene_script.cpp @@ -20,11 +20,20 @@ * */ -#include "bladerunner/script/scene.h" +#include "bladerunner/script/scene_script.h" namespace BladeRunner { -bool SceneScript::Open(const Common::String &name) { +SceneScript::SceneScript(BladeRunnerEngine *vm) + : _vm(vm) + , _inScriptCounter(0) + , _currentScript(nullptr) {} + +SceneScript::~SceneScript() { + delete _currentScript; +} + +bool SceneScript::open(const Common::String &name) { delete _currentScript; if (name == "AR01") { _currentScript = new SceneScriptAR01(_vm); return true; } @@ -145,23 +154,19 @@ bool SceneScript::Open(const Common::String &name) { return false; } -SceneScript::~SceneScript() { - delete _currentScript; -} - -void SceneScript::InitializeScene() { +void SceneScript::initializeScene() { _inScriptCounter++; _currentScript->InitializeScene(); _inScriptCounter--; } -void SceneScript::SceneLoaded() { +void SceneScript::sceneLoaded() { _inScriptCounter++; _currentScript->SceneLoaded(); _inScriptCounter--; } -bool SceneScript::MouseClick(int x, int y) { +bool SceneScript::mouseClick(int x, int y) { if (_inScriptCounter > 0) return true; @@ -176,9 +181,10 @@ bool SceneScript::MouseClick(int x, int y) { return result; } -bool SceneScript::ClickedOn3DObject(const char *objectName, bool a2) { - if (_inScriptCounter > 0) +bool SceneScript::clickedOn3DObject(const char *objectName, bool a2) { + if (_inScriptCounter > 0) { return true; + } _inScriptCounter++; bool result = _currentScript->ClickedOn3DObject(objectName, a2); @@ -186,9 +192,10 @@ bool SceneScript::ClickedOn3DObject(const char *objectName, bool a2) { return result; } -bool SceneScript::ClickedOnActor(int actorId) { - if (_inScriptCounter > 0) +bool SceneScript::clickedOnActor(int actorId) { + if (_inScriptCounter > 0) { return true; + } _inScriptCounter++; bool result = _currentScript->ClickedOnActor(actorId); @@ -196,9 +203,10 @@ bool SceneScript::ClickedOnActor(int actorId) { return result; } -bool SceneScript::ClickedOnItem(int itemId, bool a2) { - if (_inScriptCounter > 0) +bool SceneScript::clickedOnItem(int itemId, bool a2) { + if (_inScriptCounter > 0) { return true; + } _inScriptCounter++; bool result = _currentScript->ClickedOnItem(itemId, a2); @@ -206,9 +214,10 @@ bool SceneScript::ClickedOnItem(int itemId, bool a2) { return result; } -bool SceneScript::ClickedOnExit(int exitId) { - if (_inScriptCounter > 0) +bool SceneScript::clickedOnExit(int exitId) { + if (_inScriptCounter > 0) { return true; + } _inScriptCounter++; bool result = _currentScript->ClickedOnExit(exitId); @@ -216,9 +225,10 @@ bool SceneScript::ClickedOnExit(int exitId) { return result; } -bool SceneScript::ClickedOn2DRegion(int region) { - if (_inScriptCounter > 0) +bool SceneScript::clickedOn2DRegion(int region) { + if (_inScriptCounter > 0) { return true; + } _inScriptCounter++; bool result = _currentScript->ClickedOn2DRegion(region); @@ -226,13 +236,13 @@ bool SceneScript::ClickedOn2DRegion(int region) { return result; } -void SceneScript::SceneFrameAdvanced(int frame) { +void SceneScript::sceneFrameAdvanced(int frame) { _inScriptCounter++; _currentScript->SceneFrameAdvanced(frame); _inScriptCounter--; } -void SceneScript::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { +void SceneScript::actorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { _inScriptCounter++; //TODO remove this check if(_currentScript) @@ -240,19 +250,19 @@ void SceneScript::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool c _inScriptCounter--; } -void SceneScript::PlayerWalkedIn() { +void SceneScript::playerWalkedIn() { _inScriptCounter++; _currentScript->PlayerWalkedIn(); _inScriptCounter--; } -void SceneScript::PlayerWalkedOut() { +void SceneScript::playerWalkedOut() { _inScriptCounter++; _currentScript->PlayerWalkedOut(); _inScriptCounter--; } -void SceneScript::DialogueQueueFlushed(int a1) { +void SceneScript::dialogueQueueFlushed(int a1) { _inScriptCounter++; _currentScript->DialogueQueueFlushed(a1); _inScriptCounter--; diff --git a/engines/bladerunner/script/scene.h b/engines/bladerunner/script/scene_script.h index 9afe69669b..b38df3e5dc 100644 --- a/engines/bladerunner/script/scene.h +++ b/engines/bladerunner/script/scene_script.h @@ -529,29 +529,25 @@ protected: SceneScriptBase *_currentScript; public: - SceneScript(BladeRunnerEngine *vm) - : _vm(vm), - _inScriptCounter(0), - _currentScript(nullptr) { - } + SceneScript(BladeRunnerEngine *vm); ~SceneScript(); - bool Open(const Common::String &name); - - void InitializeScene(); - void SceneLoaded(); - bool MouseClick(int x, int y); - bool ClickedOn3DObject(const char *objectName, bool a2); - bool ClickedOnActor(int actorId); - bool ClickedOnItem(int itemId, bool a2); - bool ClickedOnExit(int exitId); - bool ClickedOn2DRegion(int region); - void SceneFrameAdvanced(int frame); - void ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet); - void PlayerWalkedIn(); - void PlayerWalkedOut(); - void DialogueQueueFlushed(int a1); - bool IsInsideScript() { return _inScriptCounter > 0; } + bool open(const Common::String &name); + + void initializeScene(); + void sceneLoaded(); + bool mouseClick(int x, int y); + bool clickedOn3DObject(const char *objectName, bool a2); + bool clickedOnActor(int actorId); + bool clickedOnItem(int itemId, bool a2); + bool clickedOnExit(int exitId); + bool clickedOn2DRegion(int region); + void sceneFrameAdvanced(int frame); + void actorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet); + void playerWalkedIn(); + void playerWalkedOut(); + void dialogueQueueFlushed(int a1); + bool isInsideScript() const { return _inScriptCounter > 0; } }; } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index 3f84f31ad0..c67f935fdc 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -53,11 +53,16 @@ #include "bladerunner/ui/esper.h" #include "bladerunner/ui/kia.h" #include "bladerunner/ui/spinner.h" +#include "bladerunner/ui/vk.h" #include "bladerunner/vector.h" #include "bladerunner/waypoints.h" namespace BladeRunner { +ScriptBase::ScriptBase(BladeRunnerEngine *vm) { + _vm = vm; +} + void ScriptBase::Preload(int animationId) { _vm->_sliceRenderer->preload(animationId); } @@ -243,13 +248,13 @@ void ScriptBase::Actor_Says_With_Pause(int actorId, int sentenceId, float pause, Actor *actor = _vm->_actors[actorId]; - if(animationMode != -1) { + if (animationMode != -1) { actor->stopWalking(false); } actor->speechPlay(sentenceId, false); bool animationModeChanged = false; - if(animationMode >= 0) { + if (animationMode >= 0) { if (actorId != 0) { actor->changeAnimationMode(animationMode, false); animationModeChanged = true; @@ -1079,16 +1084,17 @@ int ScriptBase::Spinner_Interface_Choose_Dest(int loopId, bool immediately) { void ScriptBase::ESPER_Flag_To_Activate() { if (!_vm->_esper->isOpen()) { _vm->_esper->open(&_vm->_surfaceBack); - while (_vm->_esper->isOpen()) { + while (_vm->_esper->isOpen() && _vm->_gameIsRunning) { _vm->gameTick(); } } } -bool ScriptBase::Voight_Kampff_Activate(int actorId, int a2){ - //TODO - warning("Voight_Kampff_Activate(%d, %d)", actorId, a2); - return false; +void ScriptBase::Voight_Kampff_Activate(int actorId, int calibrationRatio){ + _vm->_vk->open(actorId, calibrationRatio); + while (_vm->_vk->isOpen() && _vm->_gameIsRunning) { + _vm->gameTick(); + } } int ScriptBase::Elevator_Activate(int elevatorId) { @@ -1102,7 +1108,7 @@ void ScriptBase::View_Score_Board() { // ScriptBase::Query_Score void ScriptBase::Set_Score(int a0, int a1) { - // debug("STUB: Set_Score(%d, %d)", a0, a1); + warning("Set_Score(%d, %d)", a0, a1); } void ScriptBase::Give_McCoy_Ammo(int ammoType, int ammo) { @@ -1291,28 +1297,25 @@ void ScriptBase::ESPER_Add_Photo(const char *name, int photoId, int shapeId) { _vm->_esper->addPhoto(name, photoId, shapeId); } -void ScriptBase::ESPER_Define_Special_Region(int regionId, 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) { - _vm->_esper->defineRegion(regionId, Common::Rect(a2, a3, a4, a5), Common::Rect(a6, a7, a8, a9), Common::Rect(a10, a11, a12, a13), name); +void ScriptBase::ESPER_Define_Special_Region(int regionId, int innerLeft, int innerTop, int innerRight, int innerBottom, int outerLeft, int outerTop, int outerRight, int outerBottom, int selectionLeft, int selectionTop, int selectionRight, int selectionBottom, const char *name) { + _vm->_esper->defineRegion(regionId, Common::Rect(innerLeft, innerTop, innerRight, innerBottom), Common::Rect(outerLeft, outerTop, outerRight, outerBottom), Common::Rect(selectionLeft, selectionTop, selectionRight, selectionBottom), name); } -void ScriptBase::VK_Add_Question(int intensity, int questionId, int a3) { - //TODO - warning("VK_Add_Question(%d, %d, %d)", intensity, questionId, a3); +void ScriptBase::VK_Play_Speech_Line(int actorId, int sentenceId, float duration) { + _vm->_vk->playSpeechLine(actorId, sentenceId, duration); } -void ScriptBase::VK_Eye_Animates(int a1) { - //TODO - warning("VK_Eye_Animates(%d)", a1); +void ScriptBase::VK_Add_Question(int intensity, int sentenceId, int relatedSentenceId) { + _vm->_vk->addQuestion(intensity, sentenceId, relatedSentenceId); } -void ScriptBase::VK_Subject_Reacts(int a1, int a2, int a3, int a4) { - //TODO - warning("VK_Subject_Reacts(%d, %d, %d, %d)", a1, a2, a3, a4); +void ScriptBase::VK_Subject_Reacts(int intensity, int humanResponse, int replicantResponse, int anxiety) { + _vm->gameWaitForActive(); + _vm->_vk->subjectReacts(intensity, humanResponse, replicantResponse, anxiety); } -void ScriptBase::VK_Play_Speech_Line(int actorId, int sentenceId, float a3) { - //TODO - warning("VK_Play_Speech_Line(%d, %d, %g)", actorId, sentenceId, a3); +void ScriptBase::VK_Eye_Animates(int loopId) { + _vm->_vk->eyeAnimates(loopId); } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/script.h b/engines/bladerunner/script/script.h index 154345f73f..4632a64340 100644 --- a/engines/bladerunner/script/script.h +++ b/engines/bladerunner/script/script.h @@ -37,9 +37,7 @@ protected: BladeRunnerEngine *_vm; public: - ScriptBase(BladeRunnerEngine *vm) { - _vm = vm; - } + ScriptBase(BladeRunnerEngine *vm); virtual ~ScriptBase() {} protected: @@ -232,7 +230,7 @@ protected: // Spinner_Query_Selectable_Destination_Flag(int destination); int Spinner_Interface_Choose_Dest(int loopId, bool immediately); void ESPER_Flag_To_Activate(); - bool Voight_Kampff_Activate(int actorId, int a2); + void Voight_Kampff_Activate(int actorId, int calibrationRatio); int Elevator_Activate(int elevatorId); void View_Score_Board(); // Query_Score @@ -273,16 +271,16 @@ protected: void AI_Movement_Track_Flush(int actorId); void ESPER_Add_Photo(const char *name, int photoId, int shapeId); - 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 ESPER_Define_Special_Region(int regionId, int innerLeft, int innerTop, int innerRight, int innerBottom, int outerLeft, int outerTop, int outerRight, int outerBottom, int selectionLeft, int selectionTop, int selectionRight, int selectionBottom, const char *name); 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 actorId, int sentenceId, float a3); - void VK_Add_Question(int intensity, int questionId, int a3); - void VK_Subject_Reacts(int a1, int a2, int a3, int a4); - void VK_Eye_Animates(int a1); + void VK_Play_Speech_Line(int actorId, int sentenceId, float duration); + void VK_Add_Question(int intensity, int sentenceId, int relatedSentenceId); + void VK_Subject_Reacts(int intensity, int humanResponse, int replicantResponse, int anxiety); + void VK_Eye_Animates(int loopId); }; } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/vk.cpp b/engines/bladerunner/script/vk_script.cpp index 7b5f378396..8a7ddb26eb 100644 --- a/engines/bladerunner/script/vk.cpp +++ b/engines/bladerunner/script/vk_script.cpp @@ -20,12 +20,71 @@ * */ -#include "bladerunner/script/vk.h" +#include "bladerunner/script/vk_script.h" #include "bladerunner/bladerunner.h" +#include "bladerunner/mouse.h" namespace BladeRunner { +VKScript::VKScript(BladeRunnerEngine *vm) : ScriptBase(vm) { + _inScriptCounter = 0; + _calibrationQuestionCounter = 0; + _questionCounter = 0; +} + +void VKScript::initialize(int actorId) { + ++_inScriptCounter; + _vm->_mouse->disable(); + SCRIPT_VK_DLL_Initialize(actorId); + _vm->_mouse->enable(); + --_inScriptCounter; +} + +void VKScript::calibrate(int actorId) { + ++_inScriptCounter; + _vm->_mouse->disable(); + SCRIPT_VK_DLL_Calibrate(actorId); + _vm->_mouse->enable(); + --_inScriptCounter; +} + +void VKScript::beginTest(int actorId) { + ++_inScriptCounter; + _vm->_mouse->disable(); + SCRIPT_VK_DLL_Begin_Test(actorId); + _vm->_mouse->enable(); + --_inScriptCounter; +} + +void VKScript::mcCoyAsksQuestion(int actorId, int questionId) { + ++_inScriptCounter; + _vm->_mouse->disable(); + SCRIPT_VK_DLL_McCoy_Asks_Question(actorId, questionId); + _vm->_mouse->enable(); + --_inScriptCounter; +} + +void VKScript::questionAsked(int actorId, int questionId) { + ++_inScriptCounter; + _vm->_mouse->disable(); + SCRIPT_VK_DLL_Question_Asked(actorId, questionId); + _vm->_mouse->enable(); + --_inScriptCounter; +} + +void VKScript::shutdown(int actorId, int humanPercentage, int replicantPercentage, int anxiety) { + ++_inScriptCounter; + _vm->_mouse->disable(); + SCRIPT_VK_DLL_Shutdown(actorId, humanPercentage, replicantPercentage, anxiety); + _vm->_mouse->enable(); + --_inScriptCounter; +} + +bool VKScript::isInsideScript() const { + return _inScriptCounter > 0; +} + bool VKScript::SCRIPT_VK_DLL_Initialize(int actorId) { VK_Add_Question(0, 7400, -1); VK_Add_Question(0, 7405, -1); @@ -83,24 +142,24 @@ bool VKScript::SCRIPT_VK_DLL_Initialize(int actorId) { } void VKScript::SCRIPT_VK_DLL_Calibrate(int actorId) { - if (calibrationQuestionCounter == 0) { + if (_calibrationQuestionCounter == 0) { VK_Play_Speech_Line(kActorMcCoy, 7370, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7385, 0.5f); askCalibrationQuestion1(actorId, 7385); - } else if (calibrationQuestionCounter == 1) { + } else if (_calibrationQuestionCounter == 1) { VK_Play_Speech_Line(kActorMcCoy, 7390, 0.5f); askCalibrationQuestion2(actorId, 7390); - } else if (calibrationQuestionCounter == 2) { + } else if (_calibrationQuestionCounter == 2) { VK_Play_Speech_Line(kActorMcCoy, 7395, 0.5f); askCalibrationQuestion3(actorId, 7395); } - if (++calibrationQuestionCounter > 3) { - calibrationQuestionCounter = 0; + if (++_calibrationQuestionCounter > 3) { + _calibrationQuestionCounter = 0; } } -bool VKScript::SCRIPT_VK_DLL_Begin_Test() { - unknown2 = 0; +bool VKScript::SCRIPT_VK_DLL_Begin_Test(int actorId) { + _questionCounter = 0; return false; } @@ -220,7 +279,7 @@ void VKScript::SCRIPT_VK_DLL_McCoy_Asks_Question(int actorId, int questionId) { VK_Play_Speech_Line(kActorMcCoy, 7620, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7625, 0.5f); if (actorId != kActorBulletBob) { - if (actorId == kActorDektora && Game_Flag_Query(47)) { + if (actorId == kActorDektora && Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 2330, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7880, 0.5f); } @@ -293,7 +352,7 @@ void VKScript::SCRIPT_VK_DLL_McCoy_Asks_Question(int actorId, int questionId) { VK_Play_Speech_Line(kActorMcCoy, 7780, 0.5f); break; } - if (++unknown2 >= 10) { + if (++_questionCounter >= 10) { VK_Subject_Reacts(5, 0, 0, 100); } } @@ -318,7 +377,7 @@ void VKScript::SCRIPT_VK_DLL_Question_Asked(int actorId, int questionId) { } } -void VKScript::SCRIPT_VK_DLL_Shutdown(int actorId, signed int humanPercentage, signed replicantPercentage) { +void VKScript::SCRIPT_VK_DLL_Shutdown(int actorId, int humanPercentage, int replicantPercentage, int anxiety) { if (humanPercentage > 79 && replicantPercentage > 79) { VK_Play_Speech_Line(kActorAnsweringMachine, 450, 0.5f); } else if (replicantPercentage > 79) { @@ -373,7 +432,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 1240, 0.5f); break; case 7390: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Play_Speech_Line(kActorLucy, 1250, 0.5f); VK_Subject_Reacts(40, 0, 2, 5); VK_Play_Speech_Line(kActorLucy, 1260, 0.5f); @@ -384,7 +443,7 @@ void VKScript::askLucy(int questionId) { } break; case 7395: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Play_Speech_Line(kActorLucy, 1280, 0.5f); VK_Subject_Reacts(40, 0, 0, 0); } else { @@ -393,7 +452,7 @@ void VKScript::askLucy(int questionId) { } break; case 7400: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(20, 0, 8, -5); } else { VK_Subject_Reacts(30, 9, 0, -10); @@ -403,7 +462,7 @@ void VKScript::askLucy(int questionId) { break; case 7405: VK_Play_Speech_Line(kActorLucy, 1310, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(50, 1, 11, 5); } else { VK_Subject_Reacts(60, 11, 1, 5); @@ -411,7 +470,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 1320, 0.5f); break; case 7410: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(40, 1, 10, -5); VK_Eye_Animates(2); } else { @@ -420,7 +479,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 1330, 0.5f); break; case 7415: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Play_Speech_Line(kActorLucy, 1340, 0.5f); VK_Subject_Reacts(50, 1, 11, -5); VK_Play_Speech_Line(kActorMcCoy, 7935, 0.5f); @@ -434,7 +493,7 @@ void VKScript::askLucy(int questionId) { VK_Eye_Animates(3); VK_Play_Speech_Line(kActorLucy, 1370, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 8000, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(50, 1, 11, -8); } else { VK_Subject_Reacts(60, 11, -2, -8); @@ -443,7 +502,7 @@ void VKScript::askLucy(int questionId) { break; case 7425: VK_Play_Speech_Line(kActorLucy, 1400, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(20, -2, 9, -2); } else { VK_Subject_Reacts(20, 9, -2, -2); @@ -452,7 +511,7 @@ void VKScript::askLucy(int questionId) { break; case 7430: VK_Play_Speech_Line(kActorLucy, 1420, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(20, -1, 9, -3); } else { VK_Subject_Reacts(30, 9, -1, -3); @@ -462,7 +521,7 @@ void VKScript::askLucy(int questionId) { VK_Eye_Animates(2); break; case 7435: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Play_Speech_Line(kActorLucy, 1440, 0.5f); VK_Subject_Reacts(30, 5, 10, 2); } else { @@ -472,7 +531,7 @@ void VKScript::askLucy(int questionId) { break; case 7440: VK_Play_Speech_Line(kActorLucy, 1460, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(40, 5, 10, 2); VK_Eye_Animates(3); } else { @@ -481,7 +540,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 1470, 0.5f); break; case 7445: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Play_Speech_Line(kActorLucy, 1480, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7940, 0.5f); VK_Subject_Reacts(50, 4, 11, 10); @@ -494,7 +553,7 @@ void VKScript::askLucy(int questionId) { } break; case 7450: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(20, 3, 9, -6); } else { VK_Subject_Reacts(30, 9, 4, -6); @@ -505,7 +564,7 @@ void VKScript::askLucy(int questionId) { case 7455: VK_Play_Speech_Line(kActorLucy, 1540, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7950, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(10, 1, 8, -5); } else { VK_Subject_Reacts(10, 9, -1, -2); @@ -513,7 +572,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 1550, 0.5f); break; case 7460: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(30, 1, 10, -5); } else { VK_Subject_Reacts(30, 9, 2, -5); @@ -525,7 +584,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 1580, 0.5f); break; case 7465: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(40, -1, 11, 2); VK_Play_Speech_Line(kActorLucy, 1590, 0.5f); } else { @@ -535,7 +594,7 @@ void VKScript::askLucy(int questionId) { } break; case 7470: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Play_Speech_Line(kActorLucy, 1610, 0.5f); VK_Subject_Reacts(20, 3, 9, -5); VK_Play_Speech_Line(kActorLucy, 1620, 0.5f); @@ -548,7 +607,7 @@ void VKScript::askLucy(int questionId) { } break; case 7475: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Eye_Animates(3); VK_Play_Speech_Line(kActorLucy, 1660, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7965, 0.5f); @@ -567,7 +626,7 @@ void VKScript::askLucy(int questionId) { case 7480: VK_Play_Speech_Line(kActorLucy, 1720, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7975, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(20, 2, 10, 7); } else { VK_Subject_Reacts(50, 12, 3, 7); @@ -576,7 +635,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorMcCoy, 7980, 0.5f); break; case 7485: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(20, -2, 10, 6); } else { VK_Subject_Reacts(30, 10, -2, 6); @@ -585,7 +644,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 1740, 0.5f); break; case 7490: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(30, 3, 11, 9); } else { VK_Subject_Reacts(40, 11, 1, 8); @@ -596,7 +655,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 1760, 0.5f); break; case 7495: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(10, 2, 8, 5); } else { VK_Subject_Reacts(30, 10, -1, 5); @@ -606,7 +665,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 1780, 0.5f); break; case 7515: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(50, -1, 12, 5); VK_Play_Speech_Line(kActorLucy, 1790, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7995, 0.5f); @@ -617,7 +676,7 @@ void VKScript::askLucy(int questionId) { } break; case 7525: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(20, -4, 9, 5); VK_Eye_Animates(3); } else { @@ -629,7 +688,7 @@ void VKScript::askLucy(int questionId) { case 7535: VK_Play_Speech_Line(kActorLucy, 1830, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 8000, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(10, 1, 8, 0); } else { VK_Subject_Reacts(20, 9, -1, 0); @@ -639,7 +698,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorMcCoy, 8005, 0.5f); break; case 7540: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Eye_Animates(3); VK_Play_Speech_Line(kActorLucy, 1860, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 8010, 0.5f); @@ -652,7 +711,7 @@ void VKScript::askLucy(int questionId) { break; case 7550: VK_Play_Speech_Line(kActorLucy, 1890, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(20, 2, 9, -1); } else { VK_Subject_Reacts(10, 8, -1, -2); @@ -662,7 +721,7 @@ void VKScript::askLucy(int questionId) { break; case 7565: VK_Play_Speech_Line(kActorLucy, 1910, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(30, -2, 10, 8); } else { VK_Subject_Reacts(20, 9, -3, 6); @@ -673,7 +732,7 @@ void VKScript::askLucy(int questionId) { break; case 7580: VK_Play_Speech_Line(kActorLucy, 1930, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(20, 5, 10, -1); } else { VK_Subject_Reacts(30, 10, 3, 0); @@ -690,7 +749,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 1970, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7590, 0.5f); VK_Play_Speech_Line(kActorLucy, 1980, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(40, 1, 11, 5); } else { VK_Subject_Reacts(50, 12, -3, 5); @@ -701,7 +760,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 2000, 0.5f); break; case 7595: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Play_Speech_Line(kActorLucy, 2010, 0.5f); VK_Subject_Reacts(30, -2, 10, 5); VK_Play_Speech_Line(kActorLucy, 2020, 0.5f); @@ -713,7 +772,7 @@ void VKScript::askLucy(int questionId) { } break; case 7600: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(75, 4, 13, 15); } else { VK_Subject_Reacts(60, 12, -2, 10); @@ -726,7 +785,7 @@ void VKScript::askLucy(int questionId) { break; case 7605: VK_Play_Speech_Line(kActorLucy, 2070, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(30, 0, 11, 12); } else { VK_Subject_Reacts(50, 10, -3, 15); @@ -734,7 +793,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 2080, 0.5f); break; case 7620: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(60, -2, 14, 12); } else { VK_Subject_Reacts(70, 9, -1, 10); @@ -750,7 +809,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorMcCoy, 7655, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7660, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7665, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(80, 5, 14, 25); } else { VK_Subject_Reacts(70, 9, -2, 20); @@ -758,7 +817,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 2120, 0.5f); break; case 7670: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Play_Speech_Line(kActorLucy, 2130, 0.5f); VK_Subject_Reacts(30, -3, 11, 8); VK_Play_Speech_Line(kActorLucy, 2140, 0.5f); @@ -771,7 +830,7 @@ void VKScript::askLucy(int questionId) { case 7680: VK_Eye_Animates(2); VK_Play_Speech_Line(kActorLucy, 2170, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(65, 1, 6, 5); } else { VK_Subject_Reacts(50, 10, 3, 4); @@ -779,7 +838,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 2180, 0.5f); break; case 7690: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(40, 0, 12, 0); } else { VK_Subject_Reacts(50, 13, 0, 0); @@ -791,7 +850,7 @@ void VKScript::askLucy(int questionId) { VK_Play_Speech_Line(kActorLucy, 2210, 0.5f); break; case 7705: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Eye_Animates(3); VK_Subject_Reacts(30, 0, 0, 0); VK_Play_Speech_Line(kActorLucy, 2220, 0.5f); @@ -819,7 +878,7 @@ void VKScript::askLucy(int questionId) { } break; case 7740: - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(40, -3, -1, 3); } else { VK_Subject_Reacts(50, -1, -3, 3); @@ -834,7 +893,7 @@ void VKScript::askLucy(int questionId) { break; case 7750: VK_Eye_Animates(3); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(60, 4, 10, 15); } else { VK_Subject_Reacts(80, 12, -3, 18); @@ -845,7 +904,7 @@ void VKScript::askLucy(int questionId) { break; case 7770: VK_Play_Speech_Line(kActorLucy, 2350, 0.5f); - if (Game_Flag_Query(46)) { + if (Game_Flag_Query(kFlagLucyIsReplicant)) { VK_Subject_Reacts(90, -3, -1, 12); } else { VK_Eye_Animates(2); @@ -1135,7 +1194,7 @@ void VKScript::askDektora(int questionId) { VK_Play_Speech_Line(kActorDektora, 1480, 0.5f); break; case 7400: - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 1490, 0.5f); VK_Subject_Reacts(15, -1, 9, 0); VK_Play_Speech_Line(kActorDektora, 1500, 0.5f); @@ -1146,7 +1205,7 @@ void VKScript::askDektora(int questionId) { break; case 7405: VK_Eye_Animates(3); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 1520, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7840, 0.5f); VK_Subject_Reacts(20, -1, 9, 10); @@ -1170,7 +1229,7 @@ void VKScript::askDektora(int questionId) { VK_Play_Speech_Line(kActorDektora, 1610, 0.5f); break; case 7420: - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 1620, 0.5f); VK_Subject_Reacts(25, -1, 9, 0); } else { @@ -1189,7 +1248,7 @@ void VKScript::askDektora(int questionId) { VK_Play_Speech_Line(kActorDektora, 1660, 0.5f); break; case 7435: - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 1670, 0.5f); VK_Subject_Reacts(60, -2, 9, 0); VK_Play_Speech_Line(kActorDektora, 1680, 0.5f); @@ -1227,7 +1286,7 @@ void VKScript::askDektora(int questionId) { VK_Play_Speech_Line(kActorMcCoy, 7815, 0.5f); break; case 7460: - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Subject_Reacts(40, -2, 10, 10); VK_Play_Speech_Line(kActorDektora, 1810, 0.5f); } else { @@ -1236,7 +1295,7 @@ void VKScript::askDektora(int questionId) { } break; case 7465: - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Subject_Reacts(60, -3, 10, 5); VK_Play_Speech_Line(kActorDektora, 1830, 0.5f); } else { @@ -1245,7 +1304,7 @@ void VKScript::askDektora(int questionId) { } break; case 7470: - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 1850, 0.5f); VK_Subject_Reacts(50, -2, 11, 0); VK_Play_Speech_Line(kActorDektora, 1860, 0.5f); @@ -1261,7 +1320,7 @@ void VKScript::askDektora(int questionId) { VK_Play_Speech_Line(kActorDektora, 1900, 0.5f); break; case 7480: - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Subject_Reacts(55, -3, 12, 5); VK_Play_Speech_Line(kActorDektora, 1910, 0.5f); } else { @@ -1289,7 +1348,7 @@ void VKScript::askDektora(int questionId) { VK_Play_Speech_Line(kActorDektora, 1990, 0.5f); break; case 7515: - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 2000, 0.5f); VK_Subject_Reacts(72, -3, 12, 2); VK_Play_Speech_Line(kActorDektora, 2010, 0.5f); @@ -1309,7 +1368,7 @@ void VKScript::askDektora(int questionId) { VK_Play_Speech_Line(kActorDektora, 2070, 0.5f); break; case 7535: - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 2080, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7845, 0.5f); VK_Play_Speech_Line(kActorDektora, 2090, 0.5f); @@ -1326,7 +1385,7 @@ void VKScript::askDektora(int questionId) { break; case 7540: VK_Eye_Animates(2); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Subject_Reacts(70, -5, 12, 80); VK_Play_Speech_Line(kActorDektora, 2140, 0.5f); } else { @@ -1372,7 +1431,7 @@ void VKScript::askDektora(int questionId) { case 7600: VK_Play_Speech_Line(kActorDektora, 2300, 0.5f); VK_Subject_Reacts(30, 4, 4, 5); - if (!Game_Flag_Query(47)) { + if (!Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 2310, 0.5f); } break; @@ -1393,7 +1452,7 @@ void VKScript::askDektora(int questionId) { break; case 7670: VK_Eye_Animates(3); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 2380, 0.5f); VK_Play_Speech_Line(kActorMcCoy, 7890, 0.5f); VK_Play_Speech_Line(kActorDektora, 2390, 0.5f); @@ -1408,7 +1467,7 @@ void VKScript::askDektora(int questionId) { break; case 7680: VK_Eye_Animates(3); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Subject_Reacts(70, -4, 14, 15); VK_Play_Speech_Line(kActorDektora, 2440, 0.5f); } else { @@ -1425,7 +1484,7 @@ void VKScript::askDektora(int questionId) { break; case 7705: VK_Eye_Animates(3); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 2500, 0.5f); VK_Subject_Reacts(85, 7, 14, 20); VK_Play_Speech_Line(kActorDektora, 2510, 0.5f); @@ -1443,7 +1502,7 @@ void VKScript::askDektora(int questionId) { VK_Play_Speech_Line(kActorDektora, 2560, 0.5f); break; case 7750: - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 2580, 0.5f); VK_Subject_Reacts(90, -5, 14, 20); VK_Play_Speech_Line(kActorDektora, 2590, 0.5f); @@ -1459,7 +1518,7 @@ void VKScript::askDektora(int questionId) { break; case 7770: VK_Eye_Animates(2); - if (Game_Flag_Query(47)) { + if (Game_Flag_Query(kFlagDektoraIsReplicant)) { VK_Play_Speech_Line(kActorDektora, 2630, 0.5f); VK_Subject_Reacts(99, 6, 15, 30); } else { diff --git a/engines/bladerunner/script/vk.h b/engines/bladerunner/script/vk_script.h index ee82843ae1..6f09c12abe 100644 --- a/engines/bladerunner/script/vk.h +++ b/engines/bladerunner/script/vk_script.h @@ -30,21 +30,29 @@ namespace BladeRunner { class BladeRunnerEngine; class VKScript : ScriptBase { + int _inScriptCounter; + int _calibrationQuestionCounter; + int _questionCounter; + public: - VKScript(BladeRunnerEngine *vm) - : ScriptBase(vm) { - } + VKScript(BladeRunnerEngine *vm); + + void initialize(int actorId); + void calibrate(int actorId); + void beginTest(int actorId); + void mcCoyAsksQuestion(int actorId, int questionId); + void questionAsked(int actorId, int questionId); + void shutdown(int actorId, int humanPercentage, int replicantPercentage, int anxiety); + bool isInsideScript() const; + +private: bool SCRIPT_VK_DLL_Initialize(int actorId); void SCRIPT_VK_DLL_Calibrate(int actorId); - bool SCRIPT_VK_DLL_Begin_Test(); + bool SCRIPT_VK_DLL_Begin_Test(int actorId); void SCRIPT_VK_DLL_McCoy_Asks_Question(int actorId, int questionId); void SCRIPT_VK_DLL_Question_Asked(int actorId, int questionId); - void SCRIPT_VK_DLL_Shutdown(int actorId, signed int humanPercentage, signed int replicantPercentage); - -private: - int calibrationQuestionCounter; - int unknown2; + void SCRIPT_VK_DLL_Shutdown(int actorId, int humanPercentage, int replicantPercentage, int anxiety); void askLucy(int questionId); void askGrigorian(int questionId); @@ -62,4 +70,3 @@ private: } // End of namespace BladeRunner #endif - |