From 74936020ec6171c9e098945a629f2a37e488399c Mon Sep 17 00:00:00 2001 From: antoniou79 Date: Wed, 8 May 2019 00:49:15 +0300 Subject: 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) --- engines/bladerunner/debugger.cpp | 5 +- engines/bladerunner/game_constants.h | 44 +++++++------ engines/bladerunner/script/ai/guzza.cpp | 101 +++++++++++++++++++++++++----- engines/bladerunner/script/ai/lucy.cpp | 2 +- engines/bladerunner/script/scene/nr03.cpp | 2 +- engines/bladerunner/script/scene/ps01.cpp | 5 ++ engines/bladerunner/script/scene/ps03.cpp | 22 ++++++- engines/bladerunner/script/scene/ps04.cpp | 50 ++++++++++++++- 8 files changed, 189 insertions(+), 42 deletions(-) diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp index 75ca3b0759..ab197ff5ad 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 2c2f08e486..5b672783c6 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 cc3ed50df0..822c1f6bdb 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 c6b26a533e..b2084a52e3 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 f1fb89e295..22ef83dd97 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 56b9f7289a..3a68356b63 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 064caed1c9..158b6211c9 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 6be812804c..a5b2f01060 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); -- cgit v1.2.3