[Scummvm-git-logs] scummvm master -> 74936020ec6171c9e098945a629f2a37e488399c
antoniou79
antoniou at cti.gr
Tue May 7 23:58:06 CEST 2019
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1b93862891 BLADERUNNER: Vk show stats debugger command
02ac7fbfd3 BLADERUNNER: Clarification comment on Steele's ai
74936020ec BLADERUNNER: fix Guzza, PS03, PS04, PS01
Commit: 1b93862891e0643765843beb3549d79540314f82
https://github.com/scummvm/scummvm/commit/1b93862891e0643765843beb3549d79540314f82
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2019-05-08T00:52:21+03:00
Commit Message:
BLADERUNNER: Vk show stats debugger command
Changed paths:
engines/bladerunner/debugger.cpp
engines/bladerunner/debugger.h
engines/bladerunner/ui/vk.cpp
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index 94464dc..75ca3b0 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -86,6 +86,7 @@ Debugger::Debugger(BladeRunnerEngine *vm) : GUI::Debugger() {
_viewWalkboxes = false;
_viewZBuffer = false;
_playFullVk = false;
+ _showStatsVk = false;
_showMazeScore = false;
registerCmd("anim", WRAP_METHOD(Debugger, cmdAnimation));
@@ -1506,7 +1507,7 @@ bool Debugger::cmdRegion(int argc, const char **argv) {
}
/**
-* Toggle playing a full VK session (full)
+* Toggle playing a full VK session (full) and showing current test statistics as subtitles
* Only available in VK mode
*/
bool Debugger::cmdVk(int argc, const char **argv) {
@@ -1528,6 +1529,9 @@ bool Debugger::cmdVk(int argc, const char **argv) {
if (argc == 2 && argName == "full") {
_playFullVk = !_playFullVk;
debugPrintf("Playing full V-K session = %s\n", _playFullVk ? "True":"False");
+ } else if (argc == 2 && argName == "stats") {
+ _showStatsVk = !_showStatsVk;
+ debugPrintf("Showing V-K session statistics= %s\n", _showStatsVk ? "True":"False");
} else {
invalidSyntax = true;
}
@@ -1535,7 +1539,8 @@ bool Debugger::cmdVk(int argc, const char **argv) {
if (invalidSyntax) {
debugPrintf("Toggle playing the full VK session instead of the at most 10 questions of the vanilla mode\n");
- debugPrintf("Usage: %s full\n", argv[0]);
+ debugPrintf("Also, toggle showing statistics for the current session\n");
+ debugPrintf("Usage: %s (full|stats)\n", argv[0]);
}
return true;
diff --git a/engines/bladerunner/debugger.h b/engines/bladerunner/debugger.h
index 7b0a0e0..96fa764 100644
--- a/engines/bladerunner/debugger.h
+++ b/engines/bladerunner/debugger.h
@@ -54,6 +54,7 @@ public:
bool _viewWalkboxes;
bool _viewZBuffer;
bool _playFullVk;
+ bool _showStatsVk;
bool _showMazeScore;
Debugger(BladeRunnerEngine *vm);
diff --git a/engines/bladerunner/ui/vk.cpp b/engines/bladerunner/ui/vk.cpp
index 05dc239..e0b595c 100644
--- a/engines/bladerunner/ui/vk.cpp
+++ b/engines/bladerunner/ui/vk.cpp
@@ -198,6 +198,16 @@ void VK::tick() {
draw();
+ if ( _vm->_debugger->_showStatsVk
+ && !_vm->_actors[_actorId]->isSpeeching()
+ && !_vm->_actors[kActorMcCoy]->isSpeeching()
+ && !_vm->_actors[kActorAnsweringMachine]->isSpeeching()
+ && !_isClosing
+ ) {
+ _vm->_subtitles->setGameSubsText(Common::String::format("Calibration: %02d Ratio: %02d Anxiety: %02d%%\nReplicant: %02d%% Human: %02d%%", _calibration, _calibrationRatio, _anxiety, _replicantProbability, _humanProbability), true);
+ _vm->_subtitles->show();
+ }
+
_vm->_subtitles->tick(_vm->_surfaceFront);
_vm->blitToScreen(_vm->_surfaceFront);
@@ -281,7 +291,7 @@ void VK::subjectReacts(int intensity, int humanResponse, int replicantResponse,
if (humanResponse != 0) {
_humanProbability = CLIP(_humanProbability + humanResponse + _calibration, 0, 100);
-// debug("Human probability is %d, human response is %d, calibration is %d", _humanProbability, humanResponse,_calibration);
+ // debug("Human probability is %d, human response is %d, calibration is %d", _humanProbability, humanResponse,_calibration);
if (_humanProbability >= 80 && !_isClosing) {
closeVK = false;
if (_vm->_debugger->_playFullVk
@@ -312,7 +322,7 @@ void VK::subjectReacts(int intensity, int humanResponse, int replicantResponse,
if (replicantResponse != 0) {
_replicantProbability = CLIP(_replicantProbability + replicantResponse - _calibration, 0, 100);
-// debug("Replicant probability is %d, replicant response is %d, calibration is %d", _replicantProbability, replicantResponse, _calibration);
+ // debug("Replicant probability is %d, replicant response is %d, calibration is %d", _replicantProbability, replicantResponse, _calibration);
if (_replicantProbability >= 80 && !_isClosing) {
closeVK = false;
if (_vm->_debugger->_playFullVk
Commit: 02ac7fbfd32bdc03efe9a3e95f4b3fd615bee46d
https://github.com/scummvm/scummvm/commit/02ac7fbfd32bdc03efe9a3e95f4b3fd615bee46d
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2019-05-08T00:52:21+03:00
Commit Message:
BLADERUNNER: Clarification comment on Steele's ai
Steele can get a clue (officer's statement) that McCoy missed
This is so McCoy won't miss this particular clue no matter what. But McCoy
can get this clue on his own if the officer is still at the crime scene
(he might leave) even if he already got it from the mainframe via Steele.
This is intended.
Changed paths:
engines/bladerunner/script/ai/steele.cpp
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index 7d27939..63b9474 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -395,7 +395,8 @@ void AIScriptSteele::EnteredScene(int sceneId) {
if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleGoToRC01) {
if (!Actor_Clue_Query(kActorMcCoy, kClueOfficersStatement))
{
-// // no random factor here, Steele will definitely get this clue in this case
+ // no random factor here, Steele will definitely get this clue in this case
+ // McCoy can still get this clue on his own (directly from the officer, if the officer is still at Runciters) -- even if McCoy got it from the mainframe via Steele
Actor_Clue_Acquire(kActorSteele, kClueOfficersStatement, true, kActorOfficerLeary); // Steele will upload this to the mainframe when she heads to the Police Station
Global_Variable_Increment(kVariableMcCoyEvidenceMissed, 1); // unused? but consistent with missing the other clues
return; //true;
Commit: 74936020ec6171c9e098945a629f2a37e488399c
https://github.com/scummvm/scummvm/commit/74936020ec6171c9e098945a629f2a37e488399c
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2019-05-08T00:52:21+03:00
Commit Message:
BLADERUNNER: fix Guzza, PS03, PS04, PS01
Also, added a custom transition when Guzza calls in for favors
Still pending: in PS03 some actors may blink out of existence (happened to
officer Grayford)
Changed paths:
engines/bladerunner/debugger.cpp
engines/bladerunner/game_constants.h
engines/bladerunner/script/ai/guzza.cpp
engines/bladerunner/script/ai/lucy.cpp
engines/bladerunner/script/scene/nr03.cpp
engines/bladerunner/script/scene/ps01.cpp
engines/bladerunner/script/scene/ps03.cpp
engines/bladerunner/script/scene/ps04.cpp
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index 75ca3b0..ab197ff 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -1380,7 +1380,7 @@ bool Debugger::cmdItem(int argc, const char **argv) {
}
return true;
} else {
- debugPrintf("No item was found with the specified id: %d\n", itemId);
+ debugPrintf("No item was found with the specified id: %d in the scene\n", itemId);
return true;
}
} else {
@@ -1565,7 +1565,7 @@ bool Debugger::cmdList(int argc, const char **argv) {
SceneObjects::SceneObject *sceneObject = &_vm->_sceneObjects->_sceneObjects[_vm->_sceneObjects->_sceneObjectsSortedByDistance[i]];
if (sceneObject->type == kSceneObjectTypeActor) {
- debugPrintf("%d: %s (Clk: %s, Trg: %s, Prs: %s, Obs: %s, Mvg: %s), Goal: %d, Animation: %d:%d\n Pos(%02.2f,%02.2f,%02.2f)\n",
+ debugPrintf("%d: %s (Clk: %s, Trg: %s, Prs: %s, Obs: %s, Mvg: %s)\n Goal: %d, Set: %d, Anim mode: %d id:%d\n Pos(%02.2f,%02.2f,%02.2f)\n",
sceneObject->id - kSceneObjectOffsetActors,
_vm->_textActorNames->getText(sceneObject->id - kSceneObjectOffsetActors),
sceneObject->isClickable? "T" : "F",
@@ -1574,6 +1574,7 @@ bool Debugger::cmdList(int argc, const char **argv) {
sceneObject->isObstacle? "T" : "F",
sceneObject->isMoving? "T" : "F",
_vm->_actors[sceneObject->id - kSceneObjectOffsetActors]->getGoal(),
+ _vm->_actors[sceneObject->id - kSceneObjectOffsetActors]->getSetId(),
_vm->_actors[sceneObject->id - kSceneObjectOffsetActors]->getAnimationMode(),
_vm->_actors[sceneObject->id - kSceneObjectOffsetActors]->getAnimationId(),
_vm->_actors[sceneObject->id - kSceneObjectOffsetActors]->getPosition().x,
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 2c2f08e..5b67278 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -901,9 +901,9 @@ enum Flags {
// 459 is never used
kFlagSteeleWalkingAround = 460,
kFlagMaggieHasBomb = 461,
- kFlagPS04GuzzaLeft = 462,
+ kFlagGuzzaIsMovingAround = 462,
kFlagHC01GuzzaWalk = 463,
- kFlagHC01GuzzaPrepare= 464,
+ kFlagHC01GuzzaPrepare = 464,
kFlagMcCoyArrested = 465,
kFlagBB10Shelf1Available = 466,
kFlagBB10Shelf2Available = 467,
@@ -2104,23 +2104,29 @@ enum GoalGordo {
};
enum GoalGuzza {
- kGoalGuzzaLeaveOffice = 100,
- kGoalGuzzaGoToHawkersCircle1 = 101,
- kGoalGuzzaGoToOffice = 102,
- kGoalGuzzaGoToHawkersCircle2 = 103,
- kGoalGuzzaGoToFreeSlotB = 104,
- kGoalGuzzaGoToFreeSlotG = 105,
- kGoalGuzzaSitAtNR03 = 201,
- kGoalGuzzaUG18Wait = 300,
- kGoalGuzzaUG18Target = 301,
- kGoalGuzzaUG18WillGetShotBySadik = 302,
- kGoalGuzzaUG18HitByMcCoy = 303,
- kGoalGuzzaUG18MissedByMcCoy = 304,
- kGoalGuzzaUG18ShotByMcCoy = 305,
- kGoalGuzzaUG18ShootMcCoy = 306,
- kGoalGuzzaUG18FallDown = 307,
- kGoalGuzzaUG18ShotBySadik = 390,
- kGoalGuzzaGone = 599
+
+ kGoalGuzzaDefault = 0, // added goal
+ kGoalGuzzaLeftOffice = 100,
+ kGoalGuzzaGoToHawkersCircle1 = 101,
+ kGoalGuzzaAtOffice = 102,
+ kGoalGuzzaGoToHawkersCircle2 = 103,
+ kGoalGuzzaGoToFreeSlotB = 104,
+ kGoalGuzzaGoToFreeSlotG = 105,
+ kGoalGuzzaCallFavorsForHoboShoot1 = 106, // added goal
+ kGoalGuzzaCallFavorsForHoboShoot2 = 107, // added goal
+ kGoalGuzzaCalledFavorsForHobo = 108, // added goal
+ kGoalGuzzaWasAtNR03 = 200,
+ kGoalGuzzaSitAtNR03 = 201,
+ kGoalGuzzaUG18Wait = 300,
+ kGoalGuzzaUG18Target = 301,
+ kGoalGuzzaUG18WillGetShotBySadik = 302,
+ kGoalGuzzaUG18HitByMcCoy = 303,
+ kGoalGuzzaUG18MissedByMcCoy = 304,
+ kGoalGuzzaUG18ShotByMcCoy = 305,
+ kGoalGuzzaUG18ShootMcCoy = 306,
+ kGoalGuzzaUG18FallDown = 307,
+ kGoalGuzzaUG18ShotBySadik = 390,
+ kGoalGuzzaGone = 599
};
enum GoalClovis {
diff --git a/engines/bladerunner/script/ai/guzza.cpp b/engines/bladerunner/script/ai/guzza.cpp
index cc3ed50..822c1f6 100644
--- a/engines/bladerunner/script/ai/guzza.cpp
+++ b/engines/bladerunner/script/ai/guzza.cpp
@@ -40,15 +40,20 @@ void AIScriptGuzza::Initialize() {
_counter = 0;
_state = 0;
_flag = false;
+#if BLADERUNNER_ORIGINAL_BUGS
+ // Guzza begins with -1 as a goal number in the original, it is unset until Act 2
+#else
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaDefault);
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
bool AIScriptGuzza::Update() {
if (Global_Variable_Query(kVariableChapter) == 2) {
- if (!Game_Flag_Query(kFlagPS04GuzzaLeft)) {
- Game_Flag_Set(kFlagPS04GuzzaLeft);
+ if (!Game_Flag_Query(kFlagGuzzaIsMovingAround)) {
+ Game_Flag_Set(kFlagGuzzaIsMovingAround);
Actor_Put_In_Set(kActorGuzza, kSetFreeSlotC);
Actor_Set_At_Waypoint(kActorGuzza, 35, 0);
- Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeaveOffice);
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeftOffice);
return true;
}
@@ -69,28 +74,54 @@ void AIScriptGuzza::TimerExpired(int timer) {
}
void AIScriptGuzza::CompletedMovementTrack() {
+ // For Guzza, his movement tracks and goals are used to make him move around
+ // If McCoy enters his office (PS04) his movement is paused (and unpaused when McCoy exits),
+ // so ,while McCoy is there, Guzza won't blink in or out of the office.
+ // Guzza starts moving around from Act 2. In Act 1 he has no movement tracks and stays in his office -- and in original his goal is -1 (undefined).
+ //
+ // In Act 2, he may appear at HC01 when McCoy enters HC01 from AR01 (goal (if he hasn't been there already
+ // After that he can be there by 50% after he leaves the office (if his goal is set to kGoalGuzzaGoToHawkersCircle1)
+ //
+ // In Acts 2, 3: if McCoy enters the Police Elevator from ground floor, Guzza's goal is reset to "kGoalGuzzaLeftOffice"
+ // so Guzza can't get "stuck" away from his office forever during those Acts
+ //
+ // TODO Check if in Act 4: is it possible (albeit highly unlikely) that he will be at Hawker's Circle (but hidden at final waypoint of kGoalGuzzaGoToHawkersCircle1) (before UG18 meeting)?
+ //
+ // In Act 4, after his scene in UG18, he goes to kSetFreeSlotI and stays there
switch (Actor_Query_Goal_Number(kActorGuzza)) {
- case kGoalGuzzaLeaveOffice:
- Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaGoToOffice);
+ case kGoalGuzzaLeftOffice:
+ // This puts Guzza back to his office, when his time away (track) is complete
+ // Guzza stays in his office for 600 seconds (10 minutes)
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaAtOffice);
// return true;
break;
- case kGoalGuzzaGoToOffice:
+ case kGoalGuzzaAtOffice:
+ // after his time in the office is complete:
if (Random_Query(1, 2) == 1) {
+ // Guzza goes to Hawker's Circle
+ // (and stays at final way point awaiting a goal change)
Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaGoToHawkersCircle1);
} else {
+ // Guzza goes "away" for 60 seconds (1 minute)
+ // (and stays at final way point awaiting a goal change)
Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaGoToFreeSlotB);
}
// return true;
break;
case kGoalGuzzaGoToHawkersCircle2:
- Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeaveOffice);
+ // After the short walk in Hawker's Circle:
+ // Guzza will "leave his office", stay for 90 seconds in kSetFreeSlotC
+ // (after that he'll be back in his office)
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeftOffice);
// return true;
break;
- case kGoalGuzzaGoToFreeSlotG:
- Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeaveOffice);
+ case kGoalGuzzaGoToFreeSlotG: // bug? when does this happen?
+ // Guzza will "leave his office", stay for 90 seconds in kSetFreeSlotC
+ // (after that he'll be back in his office)
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeftOffice);
// return true;
break;
@@ -104,14 +135,18 @@ void AIScriptGuzza::ReceivedClue(int clueId, int fromActorId) {
void AIScriptGuzza::ClickedByPlayer() {
if (Global_Variable_Query(kVariableChapter) == 2
- && Game_Flag_Query(kFlagPS04GuzzaLeft)
+ && Game_Flag_Query(kFlagGuzzaIsMovingAround)
) {
Actor_Face_Actor(kActorMcCoy, kActorGuzza, true);
- if (Actor_Query_Friendliness_To_Other(kActorGordo, kActorMcCoy) < 48) {
+
+#if BLADERUNNER_ORIGINAL_BUGS
+ if (Actor_Query_Friendliness_To_Other(kActorGordo, kActorMcCoy) < 48) { // a bug? shouldn't this be Gordo?
Actor_Says(kActorMcCoy, 3970, 13);
Actor_Says(kActorGuzza, 780, -1);
}
- //TODO: test this, looks like a bug in game
+ // TODO: test this, looks like a bug in game
+ // At the very least Random_Query(1, 4) should only be calculated once
+ // and clicking on Guzza should probably always produce a quote?
if (Random_Query(1, 4) == 1) {
AI_Movement_Track_Pause(kActorGuzza);
Actor_Says(kActorMcCoy, 4005, 15);
@@ -127,6 +162,36 @@ void AIScriptGuzza::ClickedByPlayer() {
} else if (Random_Query(1, 4) == 4) {
Actor_Says(kActorMcCoy, 3970, 13);
}
+#else
+ if (Actor_Query_Friendliness_To_Other(kActorGuzza, kActorMcCoy) < 48) {
+ Actor_Says(kActorMcCoy, 3970, 13); // Hey
+ Actor_Says(kActorGuzza, 780, -1); // Get lost
+ } else {
+ // At the very least Random_Query(1, 4) should only be calculated once
+ switch (Random_Query(1, 4)) {
+ case 1:
+ AI_Movement_Track_Pause(kActorGuzza);
+ Actor_Says(kActorMcCoy, 4005, 15);
+ Actor_Says(kActorGuzza, 780, -1);
+ AI_Movement_Track_Unpause(kActorGuzza);
+ break;
+ case 2:
+ AI_Movement_Track_Pause(kActorGuzza);
+ Actor_Says(kActorMcCoy, 3970, 14);
+ Actor_Says(kActorGuzza, 780, -1);
+ AI_Movement_Track_Unpause(kActorGuzza);
+ break;
+ case 3:
+ Actor_Says(kActorMcCoy, 3970, 16);
+ break;
+ case 4:
+ // fall through
+ default:
+ Actor_Says(kActorMcCoy, 3970, 13);
+ break;
+ }
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
// return false;
}
@@ -174,7 +239,8 @@ int AIScriptGuzza::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueI
bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) {
switch (newGoalNumber) {
- case kGoalGuzzaLeaveOffice:
+ case kGoalGuzzaLeftOffice:
+ // Guzza stays for a few seconds in his office (waypoint 263) then goes to kSetFreeSlotC (waypoint 35) for 90 seconds
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append_With_Facing(kActorGuzza, 263, 0, 150);
AI_Movement_Track_Append_With_Facing(kActorGuzza, 263, 5, 150);
@@ -183,6 +249,7 @@ bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case kGoalGuzzaGoToHawkersCircle1:
+ // walk around in kSetHC01_HC02_HC03_HC04 for a short while
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append(kActorGuzza, 258, 0);
AI_Movement_Track_Append(kActorGuzza, 260, 8);
@@ -191,14 +258,16 @@ bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Repeat(kActorGuzza);
return true;
- case kGoalGuzzaGoToOffice:
- AI_Movement_Track_Flush(kActorGuzza);
+ case kGoalGuzzaAtOffice:
+ // stay for 600 seconds in office
AI_Movement_Track_Flush(kActorGuzza);
+ AI_Movement_Track_Flush(kActorGuzza); // a bug? is this needed twice?
AI_Movement_Track_Append_With_Facing(kActorGuzza, 263, 600, 150);
AI_Movement_Track_Repeat(kActorGuzza);
return true;
case kGoalGuzzaGoToHawkersCircle2:
+ // walk around in kSetHC01_HC02_HC03_HC04 for few seconds
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append(kActorGuzza, 258, 0);
AI_Movement_Track_Append(kActorGuzza, 259, 1);
@@ -207,12 +276,14 @@ bool AIScriptGuzza::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case kGoalGuzzaGoToFreeSlotB:
+ // stay in kSetFreeSlotB for 60 seconds
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append(kActorGuzza, 34, 60);
AI_Movement_Track_Repeat(kActorGuzza);
return true;
case kGoalGuzzaGoToFreeSlotG:
+ // stay in kSetFreeSlotG for 39 seconds // a bug? this goal is never set
AI_Movement_Track_Flush(kActorGuzza);
AI_Movement_Track_Append(kActorGuzza, 39, 120);
AI_Movement_Track_Repeat(kActorGuzza);
diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp
index c6b26a5..b2084a5 100644
--- a/engines/bladerunner/script/ai/lucy.cpp
+++ b/engines/bladerunner/script/ai/lucy.cpp
@@ -62,7 +62,7 @@ bool AIScriptLucy::Update() {
if (Global_Variable_Query(kVariableChapter) == 4
&& Actor_Query_Goal_Number(kActorLucy) == kGoalLucyGone
- && Actor_Query_Which_Set_In(kActorLucy) != 99
+ && Actor_Query_Which_Set_In(kActorLucy) != kSetFreeSlotI
) {
if (Actor_Query_Which_Set_In(kActorLucy) != Player_Query_Current_Set()) {
Actor_Put_In_Set(kActorLucy, kSetFreeSlotI);
diff --git a/engines/bladerunner/script/scene/nr03.cpp b/engines/bladerunner/script/scene/nr03.cpp
index f1fb89e..22ef83d 100644
--- a/engines/bladerunner/script/scene/nr03.cpp
+++ b/engines/bladerunner/script/scene/nr03.cpp
@@ -265,7 +265,7 @@ void SceneScriptNR03::SceneFrameAdvanced(int frame) {
rotateActorOnTable(frame);
} else if (frame == 110) {
if (Actor_Query_Goal_Number(kActorGuzza) == kGoalGuzzaSitAtNR03) {
- Actor_Set_Goal_Number(kActorGuzza, 200);
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaWasAtNR03);
} else if (!Game_Flag_Query(kFlagNR03toNR05)) {
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNRxxSitAtTable);
Player_Gains_Control();
diff --git a/engines/bladerunner/script/scene/ps01.cpp b/engines/bladerunner/script/scene/ps01.cpp
index 56b9f72..3a68356 100644
--- a/engines/bladerunner/script/scene/ps01.cpp
+++ b/engines/bladerunner/script/scene/ps01.cpp
@@ -96,7 +96,12 @@ bool SceneScriptPS01::ClickedOnExit(int exitId) {
if (exitId == 1) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 1877.9f, 16592.0f, -2975.0f, 0, true, false, 0)) {
+#if BLADERUNNER_ORIGINAL_BUGS
Actor_Set_At_XYZ(kActorMcCoy, 1872.0f, 16592.0f, -2975.0f, 870);
+#else
+ // reduce glitch with spinner door
+ Actor_Set_At_XYZ(kActorMcCoy, 1872.0f, 16592.0f, -2994.0f, 870);
+#endif // BLADERUNNER_ORIGINAL_BUGS
Game_Flag_Reset(kFlagMcCoyInChinaTown);
Game_Flag_Reset(kFlagMcCoyInRunciters);
Game_Flag_Reset(kFlagMcCoyInMcCoyApartment);
diff --git a/engines/bladerunner/script/scene/ps03.cpp b/engines/bladerunner/script/scene/ps03.cpp
index 064caed..158b621 100644
--- a/engines/bladerunner/script/scene/ps03.cpp
+++ b/engines/bladerunner/script/scene/ps03.cpp
@@ -75,12 +75,22 @@ bool SceneScriptPS03::ClickedOnItem(int itemId, bool a2) {
bool SceneScriptPS03::ClickedOnExit(int exitId) {
if (exitId == 0) {
+#if BLADERUNNER_ORIGINAL_BUGS
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -674.0f, -354.0f, 550.0f, 0, 1, false, 0)) {
Game_Flag_Set(kFlagPS03toPS04);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(kSetPS04, kScenePS04);
}
+#else
+ // Make McCoy move more forward till he reaches the exit to avoid blinking out at transition to PS03
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -674.0f, -354.0f, 690.0f, 0, 1, false, 0)) {
+ Game_Flag_Set(kFlagPS03toPS04);
+ Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
+ Ambient_Sounds_Remove_All_Looping_Sounds(1);
+ Set_Enter(kSetPS04, kScenePS04);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
return true;
}
if (exitId == 1) {
@@ -90,18 +100,28 @@ bool SceneScriptPS03::ClickedOnExit(int exitId) {
Set_Enter(kSetPS02, kScenePS02);
Game_Flag_Reset(kFlagMcCoyAtPS03);
if (Global_Variable_Query(kVariableChapter) < 4) {
- Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeaveOffice);
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaLeftOffice);
}
}
return true;
}
if (exitId == 2) {
+#if BLADERUNNER_ORIGINAL_BUGS
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -875.0f, -354.0f, -1241.0f, 0, 1, false, 0)) {
Game_Flag_Set(kFlagPS03toPS14);
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
Set_Enter(kSetPS14, kScenePS14);
}
+#else
+ // exit Police Station earlier (lower z) to avoid some glitch of blending McCoy with background
+ if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -875.0f, -354.0f, -1231.0f, 0, 1, false, 0)) {
+ Game_Flag_Set(kFlagPS03toPS14);
+ Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
+ Ambient_Sounds_Remove_All_Looping_Sounds(1);
+ Set_Enter(kSetPS14, kScenePS14);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
return true;
}
return false;
diff --git a/engines/bladerunner/script/scene/ps04.cpp b/engines/bladerunner/script/scene/ps04.cpp
index 6be8128..a5b2f01 100644
--- a/engines/bladerunner/script/scene/ps04.cpp
+++ b/engines/bladerunner/script/scene/ps04.cpp
@@ -24,6 +24,11 @@
namespace BladeRunner {
+enum kPS04Loops {
+ kPS04LoopPanToPS04 = 0, // 0 - 29
+ kPS04LoopMainLoop = 1, // 30 - 90 (actually 31-90)
+};
+
void SceneScriptPS04::InitializeScene() {
AI_Movement_Track_Pause(kActorGuzza);
if (Game_Flag_Query(kFlagPS03toPS04)) {
@@ -46,8 +51,8 @@ void SceneScriptPS04::InitializeScene() {
Ambient_Sounds_Add_Sound(kSfxSCANNER5, 9, 40, 20, 20, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(kSfxSCANNER6, 9, 40, 20, 20, 0, 0, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(kSfxSCANNER7, 9, 40, 20, 20, 0, 0, -101, -101, 0, 0);
- Scene_Loop_Start_Special(0, 0, 0);
- Scene_Loop_Set_Default(1);
+ Scene_Loop_Start_Special(kPS04LoopPanToPS04, 0, 0);
+ Scene_Loop_Set_Default(kPS04LoopMainLoop);
}
void SceneScriptPS04::SceneLoaded() {
@@ -126,13 +131,47 @@ bool SceneScriptPS04::ClickedOn2DRegion(int region) {
}
void SceneScriptPS04::SceneFrameAdvanced(int frame) {
+ if (_vm->_cutContent) {
+ // custom code added for fading out and back in when Guzza calls in favors
+ // TODO keep this?
+ Set_Fade_Color(0, 0, 0);
+ if (frame > 5 && frame < 30) {
+ // transition scene
+ if ( Actor_Query_Goal_Number(kActorGuzza) == kGoalGuzzaCalledFavorsForHobo) {
+ Set_Fade_Density(0.0f);
+ if (Global_Variable_Query(kVariableChapter) == 1) {
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaDefault);
+ } else if (Global_Variable_Query(kVariableChapter) < 4) {
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaAtOffice);
+ }
+ }
+ }
+ else if (frame >= 79 && frame < 90) {
+ if ( frame == 79 && Actor_Query_Goal_Number(kActorGuzza) == kGoalGuzzaCallFavorsForHoboShoot1) {
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaCallFavorsForHoboShoot2);
+ }
+ if ( Actor_Query_Goal_Number(kActorGuzza) == kGoalGuzzaCallFavorsForHoboShoot2) {
+ // Fading out
+ Set_Fade_Density((frame - 79) / 10.0f);
+ }
+ } else if (frame == 90) {
+ if ( Actor_Query_Goal_Number(kActorGuzza) == kGoalGuzzaCallFavorsForHoboShoot2) {
+ // Faded out
+ Set_Fade_Density(1.0f);
+ Scene_Loop_Start_Special(kPS04LoopPanToPS04, 0, 0);
+ Scene_Loop_Set_Default(kPS04LoopMainLoop);
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaCalledFavorsForHobo);
+ }
+ }
+ // end of: custom code added for fading out and back in when Guzza calls in favors
+ }
}
void SceneScriptPS04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
}
void SceneScriptPS04::PlayerWalkedIn() {
- if (Actor_Query_Which_Set_In(kActorGuzza) == 64) {
+ if (Actor_Query_Which_Set_In(kActorGuzza) == kSetPS04) {
Actor_Face_Actor(kActorMcCoy, kActorGuzza, true);
}
//return false;
@@ -351,6 +390,11 @@ void SceneScriptPS04::dialogueWithGuzza() {
Actor_Says(kActorGuzza, 610, 33);
Actor_Face_Heading(kActorGuzza, 400, false);
Actor_Says(kActorGuzza, 620, 32);
+ if (_vm->_cutContent) {
+ // add a fade-out here while Guzza calls-in for favors
+ Actor_Set_Goal_Number(kActorGuzza, kGoalGuzzaCallFavorsForHoboShoot1);
+ Delay(4000);
+ }
Actor_Face_Actor(kActorGuzza, kActorMcCoy, true);
Actor_Says(kActorGuzza, 700, 34);
Actor_Says(kActorMcCoy, 4100, 13);
More information about the Scummvm-git-logs
mailing list