diff options
author | Thanasis Antoniou | 2019-06-25 01:48:05 +0300 |
---|---|---|
committer | Thanasis Antoniou | 2019-06-25 01:54:51 +0300 |
commit | b4ee8fe29440404ff85d1a985f613aaeb54d55e8 (patch) | |
tree | 3aa5f3c7905ab84c39ee7db4009af5acf943dbbc | |
parent | 20cc2c42ba083c36e13cf20ed131bf154bb4017f (diff) | |
download | scummvm-rg350-b4ee8fe29440404ff85d1a985f613aaeb54d55e8.tar.gz scummvm-rg350-b4ee8fe29440404ff85d1a985f613aaeb54d55e8.tar.bz2 scummvm-rg350-b4ee8fe29440404ff85d1a985f613aaeb54d55e8.zip |
BLADERUNNER: VK both Runciter and Grigorian is now possible
For restored content version
-rw-r--r-- | engines/bladerunner/dialogue_menu.cpp | 17 | ||||
-rw-r--r-- | engines/bladerunner/dialogue_menu.h | 1 | ||||
-rw-r--r-- | engines/bladerunner/game_constants.h | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ps09.cpp | 14 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/rc02.cpp | 12 | ||||
-rw-r--r-- | engines/bladerunner/script/script.cpp | 5 | ||||
-rw-r--r-- | engines/bladerunner/script/script.h | 1 |
7 files changed, 49 insertions, 5 deletions
diff --git a/engines/bladerunner/dialogue_menu.cpp b/engines/bladerunner/dialogue_menu.cpp index 94d24dc38b..cdf7246868 100644 --- a/engines/bladerunner/dialogue_menu.cpp +++ b/engines/bladerunner/dialogue_menu.cpp @@ -143,6 +143,23 @@ bool DialogueMenu::addToList(int answer, bool done, int priorityPolite, int prio return true; } +/** +* Aux funtion - used in cut content mode to re-use some NeverRepeatOnceSelected dialogue options for different characters +*/ +bool DialogueMenu::clearNeverRepeatWasSelectedFlag(int answer) { + int foundIndex = -1; + for (int i = 0; i != _neverRepeatListSize; ++i) { + if (answer == _neverRepeatValues[i]) { + foundIndex = i; + break; + } + } + + if (foundIndex >= 0 && _neverRepeatWasSelected[foundIndex]) { + _neverRepeatWasSelected[foundIndex] = false; + } +} + bool DialogueMenu::addToListNeverRepeatOnceSelected(int answer, int priorityPolite, int priorityNormal, int prioritySurly) { int foundIndex = -1; for (int i = 0; i != _neverRepeatListSize; ++i) { diff --git a/engines/bladerunner/dialogue_menu.h b/engines/bladerunner/dialogue_menu.h index d4c1ac0d0f..7f0019ce1a 100644 --- a/engines/bladerunner/dialogue_menu.h +++ b/engines/bladerunner/dialogue_menu.h @@ -88,6 +88,7 @@ public: bool show(); bool hide(); bool addToList(int answer, bool done, int priorityPolite, int priorityNormal, int prioritySurly); + bool clearNeverRepeatWasSelectedFlag(int answer); // aux funtion - used in cut content mode to re-use some dialogue options for different characters bool addToListNeverRepeatOnceSelected(int answer, int priorityPolite, int priorityNormal, int prioritySurly); bool removeFromList(int answer); bool clearList(); diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index 32d3d4f77a..4e607d325b 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -459,7 +459,7 @@ enum Flags { kFlagPS12toPS11 = 17, // is never checked kFlagPS12toPS13 = 18, kFlagPS13toPS12 = 19, - // 20 is never used + kFlagRC02RunciterVKChosen = 20, // re-purposed - original: 20 is never used kFlagPS13toPS05 = 21, kFlagPS02toPS05 = 22, kFlagPS06toPS05 = 23, @@ -489,7 +489,7 @@ enum Flags { kFlagDektoraIsReplicant = 47, kFlagSadikIsReplicant = 48, kFlagPS09GrigorianTalk1 = 49, - // 50 is never used + kFlagPS09GrigorianVKChosen = 50, // re-purposed, original is never used kFlagGrigorianDislikeMcCoy = 51, // 52 is never used kFlagPS09GrigorianDialogue = 53, diff --git a/engines/bladerunner/script/scene/ps09.cpp b/engines/bladerunner/script/scene/ps09.cpp index 9b38721220..c5a0143626 100644 --- a/engines/bladerunner/script/scene/ps09.cpp +++ b/engines/bladerunner/script/scene/ps09.cpp @@ -298,7 +298,16 @@ void SceneScriptPS09::dialogueWithGrigorian() { ) { DM_Add_To_List_Never_Repeat_Once_Selected(170, 5, 5, 3); // PROTEST DM_Add_To_List_Never_Repeat_Once_Selected(180, -1, 5, 5); // CARS - DM_Add_To_List_Never_Repeat_Once_Selected(200, -1, 3, 6); // VOIGT-KAMPFF + if ((_vm->_cutContent + && (!Game_Flag_Query(kFlagPS09GrigorianVKChosen) + && (!Actor_Clue_Query(kActorMcCoy, kClueVKGrigorianHuman) && !Actor_Clue_Query(kActorMcCoy, kClueVKGrigorianReplicant)))) + || !_vm->_cutContent + ) { + if (_vm->_cutContent) { + Dialogue_Menu_Clear_Never_Repeat_Was_Selected_Flag(200); + } + DM_Add_To_List_Never_Repeat_Once_Selected(200, -1, 3, 6); // VOIGT-KAMPFF + } } if (Actor_Clue_Query(kActorMcCoy, kClueGrigoriansNote) // cut feature? it is impossible to obtain this clue && (Actor_Clue_Query(kActorMcCoy, kClueGrigorianInterviewA) @@ -424,6 +433,9 @@ void SceneScriptPS09::dialogueWithGrigorian() { break; case 200: // VOIGT-KAMPFF + if (_vm->_cutContent) { + Game_Flag_Set(kFlagPS09GrigorianVKChosen); + } Actor_Says(kActorMcCoy, 4265, 14); Actor_Says(kActorGrigorian, 400, 13); Actor_Says(kActorMcCoy, 4400, 13); diff --git a/engines/bladerunner/script/scene/rc02.cpp b/engines/bladerunner/script/scene/rc02.cpp index 1dbae55df5..f7830eeb08 100644 --- a/engines/bladerunner/script/scene/rc02.cpp +++ b/engines/bladerunner/script/scene/rc02.cpp @@ -198,8 +198,15 @@ void SceneScriptRC02::dialogueWithRunciter() { ) { DM_Add_To_List_Never_Repeat_Once_Selected(20, 6, 4, 5); // REFERENCE } - if (_vm->_cutContent) { - DM_Add_To_List_Never_Repeat_Once_Selected(200, -1, 3, 6); // VK - TEST + if ((_vm->_cutContent + && (!Game_Flag_Query(kFlagRC02RunciterVKChosen) + && (!Actor_Clue_Query(kActorMcCoy, kClueVKRunciterHuman) && !Actor_Clue_Query(kActorMcCoy, kClueVKRunciterReplicant)))) + || !_vm->_cutContent + ) { + if (_vm->_cutContent) { + Dialogue_Menu_Clear_Never_Repeat_Was_Selected_Flag(200); + } + DM_Add_To_List_Never_Repeat_Once_Selected(200, -1, 3, 6); // VOIGT-KAMPFF } Dialogue_Menu_Add_DONE_To_List(30); // DONE @@ -265,6 +272,7 @@ void SceneScriptRC02::dialogueWithRunciter() { case 200: if (_vm->_cutContent) { // scene 16 79 + Game_Flag_Set(kFlagRC02RunciterVKChosen); Actor_Face_Actor(kActorMcCoy, kActorRunciter, true); Actor_Says(kActorMcCoy, 395, 14); Actor_Face_Actor(kActorRunciter, kActorMcCoy, true); diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index a98a5ec7bd..1410709cbb 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -1295,6 +1295,11 @@ bool ScriptBase::DM_Add_To_List_Never_Repeat_Once_Selected(int answer, int prior return _vm->_dialogueMenu->addToListNeverRepeatOnceSelected(answer, priorityPolite, priorityNormal, prioritySurly); } +bool ScriptBase::Dialogue_Menu_Clear_Never_Repeat_Was_Selected_Flag(int answer) { + debugC(kDebugScript, "Dialogue_Menu_Clear_Never_Repeat_Was_Selected_Flag(%d)", answer); + return _vm->_dialogueMenu->clearNeverRepeatWasSelectedFlag(answer); +} + bool ScriptBase::Dialogue_Menu_Remove_From_List(int answer) { debugC(kDebugScript, "Dialogue_Menu_Remove_From_List(%d)", answer); return _vm->_dialogueMenu->removeFromList(answer); diff --git a/engines/bladerunner/script/script.h b/engines/bladerunner/script/script.h index 8adfb1d728..3a31e49481 100644 --- a/engines/bladerunner/script/script.h +++ b/engines/bladerunner/script/script.h @@ -201,6 +201,7 @@ protected: bool Dialogue_Menu_Add_To_List_Never_Repeat_Once_Selected(int answer); bool DM_Add_To_List(int answer, int priorityPolite, int priorityNormal, int prioritySurly); bool DM_Add_To_List_Never_Repeat_Once_Selected(int answer, int priorityPolite, int priorityNormal, int prioritySurly); + bool Dialogue_Menu_Clear_Never_Repeat_Was_Selected_Flag(int answer); bool Dialogue_Menu_Remove_From_List(int answer); int Dialogue_Menu_Query_Input(); int Dialogue_Menu_Query_List_Size(); |