[Scummvm-git-logs] scummvm master -> 6e4488547651bf896cc291b448d316b073dfafec
antoniou79
antoniou at cti.gr
Sat Aug 17 21:00:16 CEST 2019
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ac40449699 BLADERUNNER: Restored - Dino gets clues properly
0aa82a099f BLADERUNNER: Merge code for clues in PS07 original/cut versions
7bcd8af890 BLADERUNNER: Complete Klein's annoyed behavior
6e44885476 BLADERUNNER: Remove aux (added) L.MOUSE2 object
Commit: ac40449699c355c235b76182dbde3de9a70af47d
https://github.com/scummvm/scummvm/commit/ac40449699c355c235b76182dbde3de9a70af47d
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2019-08-17T21:58:21+03:00
Commit Message:
BLADERUNNER: Restored - Dino gets clues properly
He gets them from the mainframe as indicated by the game's manual
Changed paths:
engines/bladerunner/script/ai/klein.cpp
engines/bladerunner/script/init_script.cpp
engines/bladerunner/script/scene/ps06.cpp
engines/bladerunner/script/scene/ps07.cpp
diff --git a/engines/bladerunner/script/ai/klein.cpp b/engines/bladerunner/script/ai/klein.cpp
index 66d8801..9439957 100644
--- a/engines/bladerunner/script/ai/klein.cpp
+++ b/engines/bladerunner/script/ai/klein.cpp
@@ -53,25 +53,27 @@ bool AIScriptKlein::Update() {
// The following if-clauses and flags circumvent the manual's explicit instruction that McCoy should upload his clues
// on the Mainframe, so that Dino Klein can acquire them.
- if (Actor_Clue_Query(kActorMcCoy, kClueOfficersStatement)
- && !Game_Flag_Query(kFlagMcCoyHasOfficersStatement)
- ) {
- Game_Flag_Set(kFlagMcCoyHasOfficersStatement);
- }
- if (Actor_Clue_Query(kActorMcCoy, kCluePaintTransfer)
- && !Game_Flag_Query(kFlagMcCoyHasPaintTransfer)
- ) {
- Game_Flag_Set(kFlagMcCoyHasPaintTransfer);
- }
- if (Actor_Clue_Query(kActorMcCoy, kClueShellCasings)
- && !Game_Flag_Query(kFlagMcCoyHasShellCasings)
- ) {
- Game_Flag_Set(kFlagMcCoyHasShellCasings);
- }
- if (Actor_Clue_Query(kActorMcCoy, kClueChromeDebris)
- && !Game_Flag_Query(kFlagMcCoyHasChromeDebris)
- ) {
- Game_Flag_Set(kFlagMcCoyHasChromeDebris);
+ if (!_vm->_cutContent) {
+ if (Actor_Clue_Query(kActorMcCoy, kClueOfficersStatement)
+ && !Game_Flag_Query(kFlagMcCoyHasOfficersStatement)
+ ) {
+ Game_Flag_Set(kFlagMcCoyHasOfficersStatement);
+ }
+ if (Actor_Clue_Query(kActorMcCoy, kCluePaintTransfer)
+ && !Game_Flag_Query(kFlagMcCoyHasPaintTransfer)
+ ) {
+ Game_Flag_Set(kFlagMcCoyHasPaintTransfer);
+ }
+ if (Actor_Clue_Query(kActorMcCoy, kClueShellCasings)
+ && !Game_Flag_Query(kFlagMcCoyHasShellCasings)
+ ) {
+ Game_Flag_Set(kFlagMcCoyHasShellCasings);
+ }
+ if (Actor_Clue_Query(kActorMcCoy, kClueChromeDebris)
+ && !Game_Flag_Query(kFlagMcCoyHasChromeDebris)
+ ) {
+ Game_Flag_Set(kFlagMcCoyHasChromeDebris);
+ }
}
// The following deals with the case that Klein gets annoyed by McCoy and how he recovers from that
@@ -79,6 +81,7 @@ bool AIScriptKlein::Update() {
&& Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 35
&& !Game_Flag_Query(kFlagPS07KleinInsulted)
) {
+ // kActorTimerAIScriptCustomTask2 causes the "Klein is annoyed dialogue" to occur after 5 seconds
AI_Countdown_Timer_Reset(kActorKlein, kActorTimerAIScriptCustomTask2);
AI_Countdown_Timer_Start(kActorKlein, kActorTimerAIScriptCustomTask2, 5);
Game_Flag_Set(kFlagPS07KleinInsulted);
@@ -219,17 +222,22 @@ bool AIScriptKlein::GoalChanged(int currentGoalNumber, int newGoalNumber) {
break;
case kGoalKleinIsAnnoyedByMcCoyInit:
AI_Movement_Track_Flush(kActorKlein);
- AI_Movement_Track_Append(kActorKlein, 32, 5); // kSetPS07
+ AI_Movement_Track_Append(kActorKlein, 32, 5); // kSetPS07 (hidden spot)
AI_Movement_Track_Repeat(kActorKlein);
break;
case kGoalKleinIsAnnoyedByMcCoy01:
AI_Movement_Track_Flush(kActorKlein);
- AI_Movement_Track_Append(kActorKlein, 35, 60); // kSetFreeSlotC
+ if (_vm->_cutContent) {
+ AI_Movement_Track_Append(kActorKlein, 35, Random_Query(8, 18)); // kSetFreeSlotC
+ } else {
+ // this never really gets triggered in the original game
+ AI_Movement_Track_Append(kActorKlein, 35, 60); // kSetFreeSlotC
+ }
AI_Movement_Track_Repeat(kActorKlein);
break;
case kGoalKleinIsAnnoyedByMcCoy02:
AI_Movement_Track_Flush(kActorKlein);
- AI_Movement_Track_Append(kActorKlein, 32, 5); // kSetPS07
+ AI_Movement_Track_Append(kActorKlein, 32, 5); // kSetPS07 (hidden spot)
AI_Movement_Track_Repeat(kActorKlein);
break;
case kGoalKleinIsAnnoyedByMcCoyFinal:
diff --git a/engines/bladerunner/script/init_script.cpp b/engines/bladerunner/script/init_script.cpp
index c62466a..3856f90 100644
--- a/engines/bladerunner/script/init_script.cpp
+++ b/engines/bladerunner/script/init_script.cpp
@@ -1138,6 +1138,12 @@ void InitScript::Init_Clues2() {
Actor_Clue_Add_To_Database(kActorKlein, kClueHollowayInterview, 65, false, false, -1);
Actor_Clue_Add_To_Database(kActorKlein, kClueRunciterConfession1, 65, false, false, -1);
Actor_Clue_Add_To_Database(kActorKlein, kClueRunciterConfession2, 65, false, false, -1);
+ if (_vm->_cutContent) {
+ Actor_Clue_Add_To_Database(kActorKlein, kClueShellCasings, 65, false, false, -1);
+ Actor_Clue_Add_To_Database(kActorKlein, kClueChromeDebris, 65, false, false, -1);
+ Actor_Clue_Add_To_Database(kActorKlein, kClueOfficersStatement, 65, false, false, -1);
+ Actor_Clue_Add_To_Database(kActorKlein, kCluePaintTransfer, 65, false, false, -1);
+ }
Actor_Clue_Add_To_Database(kActorMurray, kClueMcCoyShotZubenInTheBack, 55, false, false, -1);
Actor_Clue_Add_To_Database(kActorMurray, kClueMcCoyIsAnnoying, 55, false, false, -1);
Actor_Clue_Add_To_Database(kActorMurray, kClueMcCoyIsKind, 70, false, false, -1);
diff --git a/engines/bladerunner/script/scene/ps06.cpp b/engines/bladerunner/script/scene/ps06.cpp
index bf9a82c..1b2477a 100644
--- a/engines/bladerunner/script/scene/ps06.cpp
+++ b/engines/bladerunner/script/scene/ps06.cpp
@@ -83,12 +83,18 @@ bool SceneScriptPS06::ClickedOn3DObject(const char *objectName, bool a2) {
}
Actor_Clues_Transfer_New_To_Mainframe(kActorMcCoy);
Actor_Clues_Transfer_New_From_Mainframe(kActorMcCoy);
+ if (_vm->_cutContent) {
+ Actor_Clues_Transfer_New_From_Mainframe(kActorKlein);
+ }
return true;
} else {
bool transferedClues = Actor_Clues_Transfer_New_To_Mainframe(kActorMcCoy);
if (_vm->_cutContent && !transferedClues) {
Actor_Says(kActorAnsweringMachine, 370, kAnimationModeTalk); // no clues transfered
} else {
+ if (_vm->_cutContent) {
+ Actor_Clues_Transfer_New_From_Mainframe(kActorKlein);
+ }
Ambient_Sounds_Play_Sound(kSfxDATALOAD, 50, 0, 0, 99);
Delay(2000);
}
diff --git a/engines/bladerunner/script/scene/ps07.cpp b/engines/bladerunner/script/scene/ps07.cpp
index 7182545..5971a58 100644
--- a/engines/bladerunner/script/scene/ps07.cpp
+++ b/engines/bladerunner/script/scene/ps07.cpp
@@ -49,7 +49,7 @@ void SceneScriptPS07::SceneLoaded() {
Unobstacle_Object("L.MOUSE", true);
Unobstacle_Object("L.MOUSE2", true);
Clickable_Object("L.MOUSE");
- Clickable_Object("L.MOUSE2");
+ Unclickable_Object("L.MOUSE2"); // TODO: we may not use this one (restored content version)
}
}
@@ -58,10 +58,11 @@ bool SceneScriptPS07::MouseClick(int x, int y) {
}
bool SceneScriptPS07::ClickedOn3DObject(const char *objectName, bool a2) {
- if (Object_Query_Click("L.MOUSE", objectName)) { // a bug? Which object is this?
+ if (Object_Query_Click("L.MOUSE", objectName)) { // this object is restored in the scene (buzzer button)
Sound_Play(kSfxLABBUZZ1, 70, 0, 0, 50);
if (Actor_Query_Goal_Number(kActorKlein) < kGoalKleinIsAnnoyedByMcCoyInit
- && Actor_Query_Goal_Number(kActorKlein) > kGoalKleinDefault) {
+ && Actor_Query_Goal_Number(kActorKlein) > kGoalKleinDefault
+ ) {
Actor_Face_Actor(kActorMcCoy, kActorKlein, true);
Actor_Set_Goal_Number(kActorKlein, kGoalKleinGotoLabSpeaker);
Actor_Modify_Friendliness_To_Other(kActorKlein, kActorMcCoy, -3);
@@ -73,101 +74,220 @@ bool SceneScriptPS07::ClickedOn3DObject(const char *objectName, bool a2) {
bool SceneScriptPS07::ClickedOnActor(int actorId) {
if (actorId == kActorKlein) {
- Actor_Face_Actor(kActorMcCoy, kActorKlein, true);
- Actor_Set_Goal_Number(kActorKlein, kGoalKleinGotoLabSpeaker);
+ 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_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 (!Game_Flag_Query(kFlagPS07KleinTalkClues)
- && (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);
- Game_Flag_Set(kFlagPS07KleinTalkClues);
+ 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;
+ }
} else {
- if (Game_Flag_Query(kFlagPS07KleinTalkClues)) {
- Actor_Says(kActorMcCoy, 4130, 18);
+ 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(kFlagMcCoyHasShellCasings)
- && !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 (!Game_Flag_Query(kFlagPS07KleinTalkClues)
+ && (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);
+ Game_Flag_Set(kFlagPS07KleinTalkClues);
+ } else {
+ if (Game_Flag_Query(kFlagPS07KleinTalkClues)) {
+ Actor_Says(kActorMcCoy, 4130, 18);
+ }
+ }
- if (Game_Flag_Query(kFlagMcCoyHasOfficersStatement)
- && !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 (Game_Flag_Query(kFlagMcCoyHasShellCasings)
+ && !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 (Game_Flag_Query(kFlagMcCoyHasPaintTransfer)
- && !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 (Game_Flag_Query(kFlagMcCoyHasOfficersStatement)
+ && !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 (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) {
- Actor_Says(kActorMcCoy, 4195, 13);
- Actor_Says(kActorKlein, 240, 16); // Car VIN
+ if (Game_Flag_Query(kFlagMcCoyHasPaintTransfer)
+ && !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 (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
+ 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);
Actor_Set_Goal_Number(kActorKlein, kGoalKleinMovingInLab01);
return true;
+
}
- Actor_Says(kActorKlein, 0, 13);
- Actor_Set_Goal_Number(kActorKlein, kGoalKleinMovingInLab01);
- return true;
}
return false;
Commit: 0aa82a099f68151d128b3442e695f0737a630cbd
https://github.com/scummvm/scummvm/commit/0aa82a099f68151d128b3442e695f0737a630cbd
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2019-08-17T21:58:21+03:00
Commit Message:
BLADERUNNER: Merge code for clues in PS07 original/cut versions
Changed paths:
engines/bladerunner/debugger.cpp
engines/bladerunner/script/init_script.cpp
engines/bladerunner/script/scene/ps07.cpp
engines/bladerunner/set.cpp
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index 7ecd43e..d7315af 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 3856f90..6332361 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 5971a58..5baaf3f 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 8c0dc6c..c234822 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:
Commit: 7bcd8af890c1746b51b243d79c8a76cffe871f12
https://github.com/scummvm/scummvm/commit/7bcd8af890c1746b51b243d79c8a76cffe871f12
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2019-08-17T21:58:21+03:00
Commit Message:
BLADERUNNER: Complete Klein's annoyed behavior
Also restored him being at the lab past day 1 (Act 1 up to and including Act 3)
Changed paths:
engines/bladerunner/game_constants.h
engines/bladerunner/script/ai/klein.cpp
engines/bladerunner/script/scene/ps07.cpp
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index ea64fdf..5711b0e 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -2583,15 +2583,17 @@ enum GoalDeskClerk {
};
enum GoalKlein {
- kGoalKleinDefault = 0,
- kGoalKleinMovingInLab01 = 1,
- kGoalKleinMovingInLab02 = 2,
- kGoalKleinGotoLabSpeaker = 3,
- kGoalKleinIsAnnoyedByMcCoyInit = 4,
- kGoalKleinIsAnnoyedByMcCoy01 = 5,
- kGoalKleinIsAnnoyedByMcCoy02 = 6,
- kGoalKleinIsAnnoyedByMcCoyFinal = 7,
- kGoalKleinAwayAtEndOfActOne = 100
+ kGoalKleinDefault = 0,
+ kGoalKleinMovingInLab01 = 1,
+ kGoalKleinMovingInLab02 = 2,
+ kGoalKleinGotoLabSpeaker = 3,
+ kGoalKleinIsAnnoyedByMcCoyInit = 4,
+ kGoalKleinIsAnnoyedByMcCoy01 = 5,
+ kGoalKleinIsAnnoyedByMcCoy02 = 6,
+ kGoalKleinIsAnnoyedByMcCoyFinal = 7,
+ kGoalKleinIsAnnoyedByMcCoyPreInit = 8, // new goal
+ kGoalKleinAwayAtEndOfActOne = 100,
+ kGoalKleinAwayAtEndOfActThree = 299 // new goal for restored content purposes
};
enum GoalHolloway {
diff --git a/engines/bladerunner/script/ai/klein.cpp b/engines/bladerunner/script/ai/klein.cpp
index 9439957..fbb2cdb 100644
--- a/engines/bladerunner/script/ai/klein.cpp
+++ b/engines/bladerunner/script/ai/klein.cpp
@@ -37,23 +37,34 @@ void AIScriptKlein::Initialize() {
}
bool AIScriptKlein::Update() {
- if (Global_Variable_Query(kVariableChapter) > 1 && Actor_Query_Goal_Number(kActorKlein) < kGoalKleinAwayAtEndOfActOne) {
- Actor_Set_Goal_Number(kActorKlein, kGoalKleinAwayAtEndOfActOne);
- return true;
+ if (_vm->_cutContent) {
+ if (Global_Variable_Query(kVariableChapter) > 3 && Actor_Query_Goal_Number(kActorKlein) < kGoalKleinAwayAtEndOfActThree) {
+ Actor_Set_Goal_Number(kActorKlein, kGoalKleinAwayAtEndOfActThree);
+ return true;
+ }
+ } else {
+ // original behavior - Klein disappears after Act 1
+ if (Global_Variable_Query(kVariableChapter) > 1 && Actor_Query_Goal_Number(kActorKlein) < kGoalKleinAwayAtEndOfActOne) {
+ Actor_Set_Goal_Number(kActorKlein, kGoalKleinAwayAtEndOfActOne);
+ return true;
+ }
}
+
if (Actor_Query_Goal_Number(kActorKlein) < kGoalKleinIsAnnoyedByMcCoyInit
&& Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 40
) {
Actor_Set_Goal_Number(kActorKlein, kGoalKleinIsAnnoyedByMcCoyInit);
}
+
if (Player_Query_Current_Scene() == kScenePS07 && Actor_Query_Goal_Number(kActorKlein) == kGoalKleinDefault) {
Actor_Set_Goal_Number(kActorKlein, kGoalKleinMovingInLab01);
return true;
}
- // The following if-clauses and flags circumvent the manual's explicit instruction that McCoy should upload his clues
- // on the Mainframe, so that Dino Klein can acquire them.
if (!_vm->_cutContent) {
+ // Original behavior:
+ // The following if-clauses and flags circumvent the manual's explicit instruction
+ // that McCoy should upload his clues on the Mainframe, so that Dino Klein can acquire them.
if (Actor_Clue_Query(kActorMcCoy, kClueOfficersStatement)
&& !Game_Flag_Query(kFlagMcCoyHasOfficersStatement)
) {
@@ -76,26 +87,57 @@ bool AIScriptKlein::Update() {
}
}
- // The following deals with the case that Klein gets annoyed by McCoy and how he recovers from that
+ // The following deals with the case that Klein gets annoyed by McCoy
if (Player_Query_Current_Scene() == kScenePS07
- && Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 35
+ && ((_vm->_cutContent && Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 40)
+ || (!_vm->_cutContent && Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 35) )
&& !Game_Flag_Query(kFlagPS07KleinInsulted)
) {
- // kActorTimerAIScriptCustomTask2 causes the "Klein is annoyed dialogue" to occur after 5 seconds
+ // kActorTimerAIScriptCustomTask2 causes the "Klein is annoyed dialogue" to occur after a few seconds
AI_Countdown_Timer_Reset(kActorKlein, kActorTimerAIScriptCustomTask2);
- AI_Countdown_Timer_Start(kActorKlein, kActorTimerAIScriptCustomTask2, 5);
+ if (_vm->_cutContent) {
+ // original's 5 seconds is too slow. Reduce it to 2 seconds
+ Actor_Set_Goal_Number(kActorKlein, kGoalKleinIsAnnoyedByMcCoyPreInit);
+ AI_Countdown_Timer_Start(kActorKlein, kActorTimerAIScriptCustomTask2, 2);
+ } else {
+ AI_Countdown_Timer_Start(kActorKlein, kActorTimerAIScriptCustomTask2, 5);
+ }
Game_Flag_Set(kFlagPS07KleinInsulted);
return true;
}
+
+ // The following deals with how Klein recovers from being annoyed at McCoy
if (Actor_Query_Goal_Number(kActorKlein) == kGoalKleinIsAnnoyedByMcCoyFinal) {
if (Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) > 20
&& Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 40
) {
// when insulted, slowly increase friendliness again, until it's at 40 or greater
Actor_Modify_Friendliness_To_Other(kActorKlein, kActorMcCoy, 2);
+#if !BLADERUNNER_ORIGINAL_BUGS
+ if (Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 40) {
+ // if after the increase (+2) it is still lower than 40 then keep being annoyed
+ Actor_Set_Goal_Number(kActorKlein, kGoalKleinIsAnnoyedByMcCoyInit);
+ return true;
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
+
+#if BLADERUNNER_ORIGINAL_BUGS
AI_Movement_Track_Flush(kActorKlein);
Actor_Set_Goal_Number(kActorKlein, kGoalKleinDefault);
+#else
+ // don't go to Default if Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) <= 20
+ // and also reset kFlagPS07KleinInsulted if the friendliness is now above 40
+ if (Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) >= 40)
+ {
+ if (Game_Flag_Query(kFlagPS07KleinInsulted)) {
+ Game_Flag_Reset(kFlagPS07KleinInsulted);
+ // don't reset the kFlagPS07KleinInsultedTalk
+ }
+ AI_Movement_Track_Flush(kActorKlein);
+ Actor_Set_Goal_Number(kActorKlein, kGoalKleinDefault);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
return true;
}
return false;
@@ -103,9 +145,29 @@ bool AIScriptKlein::Update() {
void AIScriptKlein::TimerExpired(int timer) {
if (timer == kActorTimerAIScriptCustomTask2) {
- if (Game_Flag_Query(kFlagPS07KleinInsulted)
- && !Game_Flag_Query(kFlagPS07KleinInsultedTalk)
+#if !BLADERUNNER_ORIGINAL_BUGS
+ // This timer expiration was buggy; it would play the short dialogue version
+ // even when the timer expires even if McCoy has left the room and is somewhere else
+ // The fix is to return when the player is somewhere else
+ if (Player_Query_Current_Set() != kSetPS07
+ || !Actor_Query_Is_In_Current_Set(kActorKlein)
+ || !Game_Flag_Query(kFlagPS07KleinInsulted)
+ ) {
+ if (Actor_Query_Goal_Number(kActorKlein) == kGoalKleinIsAnnoyedByMcCoyPreInit) {
+ Actor_Set_Goal_Number(kActorKlein, kGoalKleinDefault);
+ }
+ return;
+ }
+ AI_Movement_Track_Flush(kActorKlein);
+#endif
+ if (!Game_Flag_Query(kFlagPS07KleinInsultedTalk)
+#if BLADERUNNER_ORIGINAL_BUGS
+ // this is redundant now because we return in the added code above if Klein is not insulted
+ // (and the flag now gets reset when Klein calms down)
+ && Game_Flag_Query(kFlagPS07KleinInsulted)
+ // this is redundant now because we return in the added code above if Klein is not in the current set
&& Actor_Query_Is_In_Current_Set(kActorKlein)
+#endif
) {
// Klein is annoyed - full dialogue
Actor_Face_Actor(kActorKlein, kActorMcCoy, true);
@@ -114,11 +176,23 @@ void AIScriptKlein::TimerExpired(int timer) {
Actor_Says(kActorKlein, 20, kAnimationModeTalk);
Actor_Says(kActorMcCoy, 4125, kAnimationModeTalk);
Game_Flag_Set(kFlagPS07KleinInsultedTalk);
+#if BLADERUNNER_ORIGINAL_BUGS
Actor_Set_Goal_Number(kActorKlein, kGoalKleinIsAnnoyedByMcCoyInit);
+#else
+ if (Actor_Query_Goal_Number(kActorKlein) != kGoalKleinIsAnnoyedByMcCoyInit) {
+ Actor_Set_Goal_Number(kActorKlein, kGoalKleinIsAnnoyedByMcCoyInit);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
} else {
// Klein is annoyed - short dialogue
Actor_Says(kActorKlein, 10, kAnimationModeTalk);
+#if BLADERUNNER_ORIGINAL_BUGS
Actor_Set_Goal_Number(kActorKlein, kGoalKleinIsAnnoyedByMcCoyInit);
+#else
+ if (Actor_Query_Goal_Number(kActorKlein) != kGoalKleinIsAnnoyedByMcCoyInit) {
+ Actor_Set_Goal_Number(kActorKlein, kGoalKleinIsAnnoyedByMcCoyInit);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
// return true;
}
@@ -156,8 +230,19 @@ void AIScriptKlein::CompletedMovementTrack() {
return; // true;
}
if (Actor_Query_Goal_Number(kActorKlein) == kGoalKleinIsAnnoyedByMcCoyFinal) {
+#if BLADERUNNER_ORIGINAL_BUGS
Actor_Set_Goal_Number(kActorKlein, kGoalKleinDefault);
- // On the next Update() the goal will be set to kGoalKleinIsAnnoyedByMcCoyInit, if friendliness still < 40
+#else
+ if (Actor_Query_Friendliness_To_Other(kActorKlein, kActorMcCoy) < 40) {
+ Actor_Set_Goal_Number(kActorKlein, kGoalKleinIsAnnoyedByMcCoyInit);
+ } else {
+ if (Game_Flag_Query(kFlagPS07KleinInsulted)) {
+ Game_Flag_Reset(kFlagPS07KleinInsulted);
+ // don't reset the kFlagPS07KleinInsultedTalk
+ }
+ Actor_Set_Goal_Number(kActorKlein, kGoalKleinDefault);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
return; // true;
}
// return false;
@@ -220,6 +305,9 @@ bool AIScriptKlein::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Append(kActorKlein, 31, 3); // kSetPS07
AI_Movement_Track_Repeat(kActorKlein);
break;
+ case kGoalKleinIsAnnoyedByMcCoyPreInit:
+ // aux goal (added)
+ break;
case kGoalKleinIsAnnoyedByMcCoyInit:
AI_Movement_Track_Flush(kActorKlein);
AI_Movement_Track_Append(kActorKlein, 32, 5); // kSetPS07 (hidden spot)
@@ -228,7 +316,7 @@ bool AIScriptKlein::GoalChanged(int currentGoalNumber, int newGoalNumber) {
case kGoalKleinIsAnnoyedByMcCoy01:
AI_Movement_Track_Flush(kActorKlein);
if (_vm->_cutContent) {
- AI_Movement_Track_Append(kActorKlein, 35, Random_Query(8, 18)); // kSetFreeSlotC
+ AI_Movement_Track_Append(kActorKlein, 35, Random_Query(8, 24)); // kSetFreeSlotC
} else {
// this never really gets triggered in the original game
AI_Movement_Track_Append(kActorKlein, 35, 60); // kSetFreeSlotC
@@ -249,10 +337,12 @@ bool AIScriptKlein::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorKlein);
}
break;
+ case kGoalKleinAwayAtEndOfActThree:
+ // fall-through
case kGoalKleinAwayAtEndOfActOne:
AI_Movement_Track_Flush(kActorKlein);
Actor_Put_In_Set(kActorKlein, kSetFreeSlotC);
- Actor_Set_At_Waypoint(kActorKlein, 35, 0); // kSetPS07
+ Actor_Set_At_Waypoint(kActorKlein, 35, 0); // kSetFreeSlotC
break;
}
return false;
diff --git a/engines/bladerunner/script/scene/ps07.cpp b/engines/bladerunner/script/scene/ps07.cpp
index 5baaf3f..d88806a 100644
--- a/engines/bladerunner/script/scene/ps07.cpp
+++ b/engines/bladerunner/script/scene/ps07.cpp
@@ -241,7 +241,10 @@ void SceneScriptPS07::PlayerWalkedIn() {
}
void SceneScriptPS07::PlayerWalkedOut() {
- if (!Game_Flag_Query(kFlagPS07KleinInsulted) && Global_Variable_Query(kVariableChapter) == 1) {
+ if (!Game_Flag_Query(kFlagPS07KleinInsulted)
+ && ((_vm->_cutContent && Global_Variable_Query(kVariableChapter) < 4)
+ || (!_vm->_cutContent && Global_Variable_Query(kVariableChapter) == 1))
+ ){
Actor_Set_Goal_Number(kActorKlein, kGoalKleinDefault);
}
}
Commit: 6e4488547651bf896cc291b448d316b073dfafec
https://github.com/scummvm/scummvm/commit/6e4488547651bf896cc291b448d316b073dfafec
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2019-08-17T21:58:21+03:00
Commit Message:
BLADERUNNER: Remove aux (added) L.MOUSE2 object
Changed paths:
engines/bladerunner/set.cpp
diff --git a/engines/bladerunner/set.cpp b/engines/bladerunner/set.cpp
index c234822..e14ffd3 100644
--- a/engines/bladerunner/set.cpp
+++ b/engines/bladerunner/set.cpp
@@ -591,10 +591,6 @@ void Set::patchInAdditionalObjectsInSet() {
bbox = BoundingBox(530.16f, 48.44f, -570.13f, 550.41f, 50.46f, -558.77f);
custObjName = "L.MOUSE";
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:
More information about the Scummvm-git-logs
mailing list