diff options
author | antoniou79 | 2019-08-17 17:35:03 +0300 |
---|---|---|
committer | antoniou79 | 2019-08-17 21:58:21 +0300 |
commit | 0aa82a099f68151d128b3442e695f0737a630cbd (patch) | |
tree | 8bff3d30b8654a98b4b84aabe9934cd039166903 | |
parent | ac40449699c355c235b76182dbde3de9a70af47d (diff) | |
download | scummvm-rg350-0aa82a099f68151d128b3442e695f0737a630cbd.tar.gz scummvm-rg350-0aa82a099f68151d128b3442e695f0737a630cbd.tar.bz2 scummvm-rg350-0aa82a099f68151d128b3442e695f0737a630cbd.zip |
BLADERUNNER: Merge code for clues in PS07 original/cut versions
-rw-r--r-- | engines/bladerunner/debugger.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/init_script.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps07.cpp | 177 | ||||
-rw-r--r-- | engines/bladerunner/set.cpp | 7 |
4 files changed, 55 insertions, 137 deletions
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp index 7ecd43e651..d7315afec6 100644 --- a/engines/bladerunner/debugger.cpp +++ b/engines/bladerunner/debugger.cpp @@ -1640,9 +1640,9 @@ bool Debugger::cmdItem(int argc, const char **argv) { debugPrintf("Usage 1: %s add <id> <posX> <posY> <posZ> <facing> <height> <width> <animationId>\n", argv[0]); debugPrintf("Usage 2: %s list <id>\n", argv[0]); debugPrintf("Usage 3: %s flags <id> <isVisible> <isTarget>\n", argv[0]); - debugPrintf("Usage 4: %s bounds <id> <posX> <posY> <posZ> <facing> <height> <width>\n", argv[0]); + debugPrintf("Usage 4: %s bounds <id> <posX> <posY> <posZ> <facing> <height> <width>\n", argv[0]); debugPrintf("Usage 5: %s remove <id>\n", argv[0]); - debugPrintf("Usage 6: %s spin <animationId>\n", argv[0]); + debugPrintf("Usage 6: %s spin <animationId>\n", argv[0]); } return true; } diff --git a/engines/bladerunner/script/init_script.cpp b/engines/bladerunner/script/init_script.cpp index 3856f908ed..63323613c1 100644 --- a/engines/bladerunner/script/init_script.cpp +++ b/engines/bladerunner/script/init_script.cpp @@ -37,8 +37,8 @@ void InitScript::SCRIPT_Initialize_Game() { Init_Globals(); Init_Game_Flags(); - Init_Clues(); - Init_Clues2(); + Init_Clues(); // Inits clues DB entries for McCoy (clues that McCoy can acquire) + Init_Clues2(); // Inits clues DB for everyone else (clues that the other actors, including the "Mainframe" (kActorVoiceover) can acquire) Init_World_Waypoints(); Init_SDB(); Init_CDB(); diff --git a/engines/bladerunner/script/scene/ps07.cpp b/engines/bladerunner/script/scene/ps07.cpp index 5971a586a9..5baaf3f69c 100644 --- a/engines/bladerunner/script/scene/ps07.cpp +++ b/engines/bladerunner/script/scene/ps07.cpp @@ -47,9 +47,9 @@ void SceneScriptPS07::SceneLoaded() { Unobstacle_Object("RICE BOX01", true); if (_vm->_cutContent) { Unobstacle_Object("L.MOUSE", true); - Unobstacle_Object("L.MOUSE2", true); +// Unobstacle_Object("L.MOUSE2", true); Clickable_Object("L.MOUSE"); - Unclickable_Object("L.MOUSE2"); // TODO: we may not use this one (restored content version) +// Unclickable_Object("L.MOUSE2"); // TODO: we may not use this one (restored content version) } } @@ -74,135 +74,29 @@ bool SceneScriptPS07::ClickedOn3DObject(const char *objectName, bool a2) { bool SceneScriptPS07::ClickedOnActor(int actorId) { if (actorId == kActorKlein) { - if (_vm->_cutContent) { - if (Actor_Query_Goal_Number(kActorKlein) >= kGoalKleinIsAnnoyedByMcCoyInit - || (Actor_Query_Goal_Number(kActorKlein) < kGoalKleinIsAnnoyedByMcCoyInit - && Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 40) - ) { - // Dino ignores McCoy - return true; - } else { - Actor_Face_Actor(kActorMcCoy, kActorKlein, true); - Actor_Set_Goal_Number(kActorKlein, kGoalKleinGotoLabSpeaker); - if (!Game_Flag_Query(kFlagPS07KleinTalkClues)) { - Actor_Says(kActorMcCoy, 4115, 13); - } - - if (!Game_Flag_Query(kFlagPS07KleinTalkClues) - && (Actor_Clue_Query(kActorKlein, kClueShellCasings) - || Actor_Clue_Query(kActorKlein, kClueOfficersStatement) - || Actor_Clue_Query(kActorKlein, kCluePaintTransfer) - || Actor_Clue_Query(kActorKlein, kClueChromeDebris)) - ) { - Actor_Face_Actor(kActorKlein, kActorMcCoy, true); - Actor_Says(kActorKlein, 30, 12); - Game_Flag_Set(kFlagPS07KleinTalkClues); - } else { - if (Game_Flag_Query(kFlagPS07KleinTalkClues)) { - Actor_Says(kActorMcCoy, 4130, 18); - } - } - if (Actor_Clue_Query(kActorKlein, kClueShellCasings) - && !Game_Flag_Query(kFlagPS07KleinTalkShellCasings) - ) { - Game_Flag_Set(kFlagPS07KleinTalkShellCasings); - Actor_Clue_Acquire(kActorMcCoy, kClueLabShellCasings, false, kActorKlein); - Actor_Says(kActorKlein, 50, 16); - Actor_Says(kActorMcCoy, 4135, 13); - Actor_Says(kActorKlein, 60, 15); - Actor_Says(kActorKlein, 70, 12); - Actor_Says(kActorMcCoy, 4140, 18); - Actor_Says(kActorKlein, 80, 14); - Actor_Says(kActorKlein, 90, 14); - Actor_Set_Goal_Number(kActorKlein, kGoalKleinMovingInLab01); - return true; - } - - if (Actor_Clue_Query(kActorKlein, kClueOfficersStatement) - && !Game_Flag_Query(kFlagPS07KleinTalkOfficersStatement) - ) { - Game_Flag_Set(kFlagPS07KleinTalkOfficersStatement); - Actor_Clue_Acquire(kActorMcCoy, kClueLabCorpses, false, kActorKlein); - Actor_Says(kActorKlein, 100, 13); - Actor_Says(kActorMcCoy, 4145, 13); - Actor_Says(kActorKlein, 110, 12); - Actor_Says(kActorMcCoy, 4150, 13); - Actor_Says(kActorKlein, 120, 14); - Actor_Says(kActorMcCoy, 4155, 17); - Actor_Says(kActorKlein, 130, 15); - Actor_Says(kActorMcCoy, 4160, 13); - Actor_Says(kActorKlein, 140, 16); - Actor_Says(kActorMcCoy, 4165, 18); - Actor_Says(kActorKlein, 160, 13); - Actor_Says(kActorMcCoy, 4170, 19); - Actor_Says(kActorMcCoy, 4175, 19); - Actor_Modify_Friendliness_To_Other(kActorKlein, kActorMcCoy, 3); - Actor_Set_Goal_Number(kActorKlein, kGoalKleinMovingInLab01); - return true; - } - - if (Actor_Clue_Query(kActorKlein, kCluePaintTransfer) - && !Game_Flag_Query(kFlagPS07KleinTalkPaintTransfer) - ) { - Game_Flag_Set(kFlagPS07KleinTalkPaintTransfer); - Actor_Clue_Acquire(kActorMcCoy, kClueLabPaintTransfer, false, kActorKlein); - Actor_Says(kActorKlein, 170, 14); - Actor_Says(kActorMcCoy, 4180, 13); - Actor_Says(kActorKlein, 180, 12); - Actor_Says(kActorKlein, 190, 13); - Actor_Says(kActorKlein, 200, 16); - Actor_Says(kActorMcCoy, 4185, 18); - Actor_Says(kActorKlein, 210, 12); - Actor_Modify_Friendliness_To_Other(kActorKlein, kActorMcCoy, -12); - Actor_Set_Goal_Number(kActorKlein, kGoalKleinMovingInLab01); - return true; - } - - if (Actor_Clue_Query(kActorKlein, kClueChromeDebris) - && !Game_Flag_Query(kFlagPS07KleinTalkChromeDebris) - ) { - Game_Flag_Set(kFlagPS07KleinTalkChromeDebris); - Actor_Says(kActorKlein, 220, 12); - Actor_Says(kActorMcCoy, 4190, 13); - Actor_Says(kActorKlein, 230, 14); - if (_vm->_cutContent) { - Actor_Says(kActorMcCoy, 4195, 13); - Actor_Says(kActorKlein, 240, 16); // Car VIN - } - Actor_Set_Goal_Number(kActorKlein, kGoalKleinMovingInLab01); - return true; - } - - switch (Random_Query(1, 4)) { - case 1: - Actor_Says(kActorKlein, 0, 13); - break; - case 2: - Actor_Says(kActorKlein, 40, 13); - break; - case 3: - Actor_Says(kActorKlein, 270, 13); - break; - case 4: - Actor_Says(kActorKlein, 280, 13); - break; - } - Actor_Set_Goal_Number(kActorKlein, kGoalKleinMovingInLab01); - return true; - } + if (_vm->_cutContent + && (Actor_Query_Goal_Number(kActorKlein) >= kGoalKleinIsAnnoyedByMcCoyInit + || (Actor_Query_Goal_Number(kActorKlein) < kGoalKleinIsAnnoyedByMcCoyInit + && Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 40)) + ) { + // Annoyed Dino ignores McCoy + return true; } else { Actor_Face_Actor(kActorMcCoy, kActorKlein, true); Actor_Set_Goal_Number(kActorKlein, kGoalKleinGotoLabSpeaker); - if (!Game_Flag_Query(kFlagPS07KleinTalkClues)) { Actor_Says(kActorMcCoy, 4115, 13); } if (!Game_Flag_Query(kFlagPS07KleinTalkClues) - && (Game_Flag_Query(kFlagMcCoyHasShellCasings) - || Game_Flag_Query(kFlagMcCoyHasOfficersStatement) - || Game_Flag_Query(kFlagMcCoyHasPaintTransfer) - || Game_Flag_Query(kFlagMcCoyHasChromeDebris)) + && ((_vm->_cutContent && (Actor_Clue_Query(kActorKlein, kClueShellCasings) + || Actor_Clue_Query(kActorKlein, kClueOfficersStatement) + || Actor_Clue_Query(kActorKlein, kCluePaintTransfer) + || Actor_Clue_Query(kActorKlein, kClueChromeDebris))) + || (!_vm->_cutContent && (Game_Flag_Query(kFlagMcCoyHasShellCasings) + || Game_Flag_Query(kFlagMcCoyHasOfficersStatement) + || Game_Flag_Query(kFlagMcCoyHasPaintTransfer) + || Game_Flag_Query(kFlagMcCoyHasChromeDebris)))) ) { Actor_Face_Actor(kActorKlein, kActorMcCoy, true); Actor_Says(kActorKlein, 30, 12); @@ -213,7 +107,10 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) { } } - if (Game_Flag_Query(kFlagMcCoyHasShellCasings) + // Restored cut content version uses Clues system. Klein gets the clues if McCoy has uploaded to the mainframe + // The original version takes a shortcut here and uses flags for this (McCoy does not have to upload the clues to the mainframe) + if (((_vm->_cutContent && Actor_Clue_Query(kActorKlein, kClueShellCasings)) + || (!_vm->_cutContent && Game_Flag_Query(kFlagMcCoyHasShellCasings))) && !Game_Flag_Query(kFlagPS07KleinTalkShellCasings) ) { Game_Flag_Set(kFlagPS07KleinTalkShellCasings); @@ -229,7 +126,8 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) { return true; } - if (Game_Flag_Query(kFlagMcCoyHasOfficersStatement) + if (((_vm->_cutContent && Actor_Clue_Query(kActorKlein, kClueOfficersStatement)) + || (!_vm->_cutContent && Game_Flag_Query(kFlagMcCoyHasOfficersStatement))) && !Game_Flag_Query(kFlagPS07KleinTalkOfficersStatement) ) { Game_Flag_Set(kFlagPS07KleinTalkOfficersStatement); @@ -252,7 +150,8 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) { return true; } - if (Game_Flag_Query(kFlagMcCoyHasPaintTransfer) + if (((_vm->_cutContent && Actor_Clue_Query(kActorKlein, kCluePaintTransfer)) + || (!_vm->_cutContent && Game_Flag_Query(kFlagMcCoyHasPaintTransfer))) && !Game_Flag_Query(kFlagPS07KleinTalkPaintTransfer) ) { Game_Flag_Set(kFlagPS07KleinTalkPaintTransfer); @@ -269,24 +168,42 @@ bool SceneScriptPS07::ClickedOnActor(int actorId) { return true; } - if (Game_Flag_Query(kFlagMcCoyHasChromeDebris) + if (((_vm->_cutContent && Actor_Clue_Query(kActorKlein, kClueChromeDebris)) + || (!_vm->_cutContent && Game_Flag_Query(kFlagMcCoyHasChromeDebris))) && !Game_Flag_Query(kFlagPS07KleinTalkChromeDebris) ) { Game_Flag_Set(kFlagPS07KleinTalkChromeDebris); Actor_Says(kActorKlein, 220, 12); Actor_Says(kActorMcCoy, 4190, 13); Actor_Says(kActorKlein, 230, 14); - if (_vm->_cutContent) { // TODO this can go, if we keep separate cases + if (_vm->_cutContent) { Actor_Says(kActorMcCoy, 4195, 13); Actor_Says(kActorKlein, 240, 16); // Car VIN } Actor_Set_Goal_Number(kActorKlein, kGoalKleinMovingInLab01); return true; } - Actor_Says(kActorKlein, 0, 13); + // If Dino has nothing to analyze + if (_vm->_cutContent) { + switch (Random_Query(1, 4)) { + case 1: + Actor_Says(kActorKlein, 0, 13); + break; + case 2: + Actor_Says(kActorKlein, 40, 13); + break; + case 3: + Actor_Says(kActorKlein, 270, 13); + break; + case 4: + Actor_Says(kActorKlein, 280, 13); + break; + } + } else { + Actor_Says(kActorKlein, 0, 13); + } Actor_Set_Goal_Number(kActorKlein, kGoalKleinMovingInLab01); return true; - } } return false; diff --git a/engines/bladerunner/set.cpp b/engines/bladerunner/set.cpp index 8c0dc6cddf..c234822112 100644 --- a/engines/bladerunner/set.cpp +++ b/engines/bladerunner/set.cpp @@ -591,9 +591,10 @@ void Set::patchInAdditionalObjectsInSet() { bbox = BoundingBox(530.16f, 48.44f, -570.13f, 550.41f, 50.46f, -558.77f); custObjName = "L.MOUSE"; setupNewObjectInSet(custObjName, bbox); - bbox = BoundingBox(541.18f, 28.95f, -566.66f, 555.18f, 44.46f, -548.79f); - custObjName = "L.MOUSE2"; - setupNewObjectInSet(custObjName, bbox); +//// This extra object was added to be an additional buzzer hotspot, but ultimately it's deemed unnecessary +// bbox = BoundingBox(541.18f, 28.95f, -566.66f, 555.18f, 44.46f, -548.79f); +// custObjName = "L.MOUSE2"; +// setupNewObjectInSet(custObjName, bbox); break; case kSceneNR05: |