diff options
author | Thomas Fach-Pedersen | 2018-03-10 08:37:29 +0100 |
---|---|---|
committer | Thomas Fach-Pedersen | 2018-03-10 08:37:29 +0100 |
commit | ed38407aa6118ab1b86b118efe5a91e65ba07a0a (patch) | |
tree | 52f8e6942cd39bd7080c3208f6b9869bf4c5228b | |
parent | fce8b911a65a1278b55a754665ce02f4c6b44f49 (diff) | |
download | scummvm-rg350-ed38407aa6118ab1b86b118efe5a91e65ba07a0a.tar.gz scummvm-rg350-ed38407aa6118ab1b86b118efe5a91e65ba07a0a.tar.bz2 scummvm-rg350-ed38407aa6118ab1b86b118efe5a91e65ba07a0a.zip |
BLADERUNNER: Formatting, unify some goal cases
-rw-r--r-- | engines/bladerunner/script/ai/desk_clerk.cpp | 24 | ||||
-rw-r--r-- | engines/bladerunner/script/ai_script.cpp | 60 |
2 files changed, 39 insertions, 45 deletions
diff --git a/engines/bladerunner/script/ai/desk_clerk.cpp b/engines/bladerunner/script/ai/desk_clerk.cpp index 9a14508053..6af7d5d4ca 100644 --- a/engines/bladerunner/script/ai/desk_clerk.cpp +++ b/engines/bladerunner/script/ai/desk_clerk.cpp @@ -113,24 +113,18 @@ int AIScriptDeskClerk::GetFriendlinessModifierIfGetsClue(int otherActorId, int c } bool AIScriptDeskClerk::GoalChanged(int currentGoalNumber, int newGoalNumber) { - if (newGoalNumber > 2) { - if (newGoalNumber == 400) { - Actor_Put_In_Set(kActorDeskClerk, kSetFreeSlotH); - Actor_Set_At_Waypoint(kActorDeskClerk, 40, 0); - } - } else if (newGoalNumber) { - if (newGoalNumber == 1) { - Actor_Put_In_Set(kActorDeskClerk, kSetFreeSlotH); - Actor_Set_At_Waypoint(kActorDeskClerk, 40, 0); - } else { - Actor_Put_In_Set(kActorDeskClerk, kSetCT09); - Actor_Set_At_XYZ(kActorDeskClerk, 282.0f, 360.52f, 743.0f, 513); - } - } else { + switch (newGoalNumber) { + case 0: + case 2: Actor_Put_In_Set(kActorDeskClerk, kSetCT09); Actor_Set_At_XYZ(kActorDeskClerk, 282.0f, 360.52f, 743.0f, 513); + break; + case 1: + case 400: + Actor_Put_In_Set(kActorDeskClerk, kSetFreeSlotH); + Actor_Set_At_Waypoint(kActorDeskClerk, 40, 0); + break; } - return false; } diff --git a/engines/bladerunner/script/ai_script.cpp b/engines/bladerunner/script/ai_script.cpp index 54e1cafc56..08ec7c8c14 100644 --- a/engines/bladerunner/script/ai_script.cpp +++ b/engines/bladerunner/script/ai_script.cpp @@ -39,36 +39,36 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorCount) { _actorUpdating[i] = false; } - _AIScripts[kActorMcCoy] = new AIScriptMcCoy(_vm); // 0 - _AIScripts[kActorGordo] = new AIScriptGordo(_vm); // 2 - _AIScripts[kActorGrigorian] = new AIScriptGrigorian(_vm); // 11 - _AIScripts[kActorTransient] = new AIScriptTransient(_vm); // 12 - _AIScripts[kActorLance] = new AIScriptLance(_vm); // 13 - _AIScripts[kActorRunciter] = new AIScriptRunciter(_vm); // 15 - _AIScripts[kActorInsectDealer] = new AIScriptInsectDealer(_vm); // 16 - _AIScripts[kActorTyrellGuard] = new AIScriptTyrellGuard(_vm); // 17 - _AIScripts[kActorZuben] = new AIScriptZuben(_vm); // 19 - _AIScripts[kActorMarcus] = new AIScriptMarcus(_vm); // 21 - _AIScripts[kActorMia] = new AIScriptMia(_vm); // 22 - _AIScripts[kActorOfficerLeary] = new AIScriptOfficerLeary(_vm); // 23 - _AIScripts[kActorBaker] = new AIScriptBaker(_vm); // 26 - _AIScripts[kActorDeskClerk] = new AIScriptDeskClerk(_vm); // 27 - _AIScripts[kActorHowieLee] = new AIScriptHowieLee(_vm); // 28 - _AIScripts[kActorKlein] = new AIScriptKlein(_vm); // 30 - _AIScripts[kActorSergeantWalls] = new AIScriptSergeantWalls(_vm); // 34 - _AIScripts[kActorHysteriaPatron1] = new AIScriptHysteriaPatron1(_vm);// 47 - _AIScripts[kActorHysteriaPatron2] = new AIScriptHysteriaPatron2(_vm);// 48 - _AIScripts[kActorHysteriaPatron3] = new AIScriptHysteriaPatron3(_vm);// 49 - _AIScripts[kActorShoeshineMan] = new AIScriptShoeshineMan(_vm); // 50 - _AIScripts[kActorGaff] = new AIScriptGaff(_vm); // 53 - _AIScripts[kActorBryant] = new AIScriptBryant(_vm); // 54 - _AIScripts[kActorNewscaster] = new AIScriptNewscaster(_vm); // 61 - _AIScripts[kActorLeon] = new AIScriptLeon(_vm); // 62 - _AIScripts[kActorMaleAnnouncer] = new AIScriptMaleAnnouncer(_vm); // 63 - _AIScripts[kActorMaggie] = new AIScriptMaggie(_vm); // 66 - _AIScripts[kActorGenwalkerA] = new AIScriptGenericWalkerA(_vm); // 67 - _AIScripts[kActorGenwalkerB] = new AIScriptGenericWalkerB(_vm); // 68 - _AIScripts[kActorGenwalkerC] = new AIScriptGenericWalkerC(_vm); // 69 + _AIScripts[kActorMcCoy] = new AIScriptMcCoy(_vm); // 0 + _AIScripts[kActorGordo] = new AIScriptGordo(_vm); // 2 + _AIScripts[kActorGrigorian] = new AIScriptGrigorian(_vm); // 11 + _AIScripts[kActorTransient] = new AIScriptTransient(_vm); // 12 + _AIScripts[kActorLance] = new AIScriptLance(_vm); // 13 + _AIScripts[kActorRunciter] = new AIScriptRunciter(_vm); // 15 + _AIScripts[kActorInsectDealer] = new AIScriptInsectDealer(_vm); // 16 + _AIScripts[kActorTyrellGuard] = new AIScriptTyrellGuard(_vm); // 17 + _AIScripts[kActorZuben] = new AIScriptZuben(_vm); // 19 + _AIScripts[kActorMarcus] = new AIScriptMarcus(_vm); // 21 + _AIScripts[kActorMia] = new AIScriptMia(_vm); // 22 + _AIScripts[kActorOfficerLeary] = new AIScriptOfficerLeary(_vm); // 23 + _AIScripts[kActorBaker] = new AIScriptBaker(_vm); // 26 + _AIScripts[kActorDeskClerk] = new AIScriptDeskClerk(_vm); // 27 + _AIScripts[kActorHowieLee] = new AIScriptHowieLee(_vm); // 28 + _AIScripts[kActorKlein] = new AIScriptKlein(_vm); // 30 + _AIScripts[kActorSergeantWalls] = new AIScriptSergeantWalls(_vm); // 34 + _AIScripts[kActorHysteriaPatron1] = new AIScriptHysteriaPatron1(_vm); // 47 + _AIScripts[kActorHysteriaPatron2] = new AIScriptHysteriaPatron2(_vm); // 48 + _AIScripts[kActorHysteriaPatron3] = new AIScriptHysteriaPatron3(_vm); // 49 + _AIScripts[kActorShoeshineMan] = new AIScriptShoeshineMan(_vm); // 50 + _AIScripts[kActorGaff] = new AIScriptGaff(_vm); // 53 + _AIScripts[kActorBryant] = new AIScriptBryant(_vm); // 54 + _AIScripts[kActorNewscaster] = new AIScriptNewscaster(_vm); // 61 + _AIScripts[kActorLeon] = new AIScriptLeon(_vm); // 62 + _AIScripts[kActorMaleAnnouncer] = new AIScriptMaleAnnouncer(_vm); // 63 + _AIScripts[kActorMaggie] = new AIScriptMaggie(_vm); // 66 + _AIScripts[kActorGenwalkerA] = new AIScriptGenericWalkerA(_vm); // 67 + _AIScripts[kActorGenwalkerB] = new AIScriptGenericWalkerB(_vm); // 68 + _AIScripts[kActorGenwalkerC] = new AIScriptGenericWalkerC(_vm); // 69 } AIScripts::~AIScripts() { |