[Scummvm-git-logs] scummvm master -> 54c1c8d2204a2877717d65e39cc8a3b4e1d26b25
antoniou79
antoniou at cti.gr
Sun Apr 7 22:15:45 CEST 2019
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
603c9fd009 BLADERUNNER: Fix for AR, CT01 Spinner fly-in
54c1c8d220 BLADERUNNER: Fix Gordo overlap with CT01 loopIn
Commit: 603c9fd0095fa7cc492ad3feb8226229c3510721
https://github.com/scummvm/scummvm/commit/603c9fd0095fa7cc492ad3feb8226229c3510721
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-04-07T22:48:10+03:00
Commit Message:
BLADERUNNER: Fix for AR, CT01 Spinner fly-in
AR01: Fish dealer behavior fix, AR02: music fix, CT01: Spinner may fly in (loop)
Changed paths:
engines/bladerunner/debugger.cpp
engines/bladerunner/script/ai/fish_dealer.cpp
engines/bladerunner/script/ai/general_doll.cpp
engines/bladerunner/script/ai/howie_lee.cpp
engines/bladerunner/script/ai/officer_grayford.cpp
engines/bladerunner/script/scene/ar01.cpp
engines/bladerunner/script/scene/ar02.cpp
engines/bladerunner/script/scene/ct01.cpp
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index 5dc59b3..5a3aa24 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -840,7 +840,7 @@ bool Debugger::cmdOverlay(int argc, const char **argv) {
}
if (_vm->_chapters->hasOpenResources()) {
- chapterIdOverlaysAvailableInt = _vm->_chapters->currentResourceId();
+ chapterIdOverlaysAvailableInt = MIN(_vm->_chapters->currentResourceId(), 3);
}
if (chapterIdOverlaysAvailableInt == -1) {
debugPrintf("No available open resources to load VQAs from.\n Giving up.\n");
@@ -891,11 +891,10 @@ bool Debugger::cmdOverlay(int argc, const char **argv) {
const Common::String origSceneName = _vm->_gameInfo->getSceneName(_vm->_scene->_sceneId);
Common::String origVqaName;
- int currentResourceId = _vm->_chapters->currentResourceId();
- if (currentResourceId == 1) {
+ if (chapterIdOverlaysAvailableInt == 1) {
origVqaName = Common::String::format("%s.VQA", origSceneName.c_str());
} else {
- origVqaName = Common::String::format("%s_%d.VQA", origSceneName.c_str(), MIN(currentResourceId, 3));
+ origVqaName = Common::String::format("%s_%d.VQA", origSceneName.c_str(), chapterIdOverlaysAvailableInt);
}
if (_vm->_scene->_vqaPlayer != nullptr) {
diff --git a/engines/bladerunner/script/ai/fish_dealer.cpp b/engines/bladerunner/script/ai/fish_dealer.cpp
index 5297ae4..d7f517c 100644
--- a/engines/bladerunner/script/ai/fish_dealer.cpp
+++ b/engines/bladerunner/script/ai/fish_dealer.cpp
@@ -45,16 +45,33 @@ bool AIScriptFishDealer::Update() {
Actor_Set_Goal_Number(kActorFishDealer, 400);
return true;
- } else if (Player_Query_Current_Scene()
- || Actor_Query_Goal_Number(kActorFishDealer) == 2
- || Actor_Query_Goal_Number(kActorFishDealer) == 1
- || Actor_Query_Goal_Number(kActorFishDealer) == 400) {
+ }
+#if BLADERUNNER_ORIGINAL_BUGS
+ else if (Player_Query_Current_Scene()
+ || Actor_Query_Goal_Number(kActorFishDealer) == 2
+ || Actor_Query_Goal_Number(kActorFishDealer) == 1
+ || Actor_Query_Goal_Number(kActorFishDealer) == 400) {
return false;
} else {
Actor_Set_Goal_Number(kActorFishDealer, 1);
return true;
}
+#else
+ // prevent Fish Dealer from blinking out while McCoy is flying out from Animoid
+ else if (Actor_Query_Goal_Number(kActorFishDealer) == 400
+ || ( Player_Query_Current_Scene() != kSceneAR01 )) {
+ return false;
+ }
+ else {
+ if (Player_Query_Current_Scene() == kSceneAR01
+ && Actor_Query_Goal_Number(kActorFishDealer) == 3) {
+ Actor_Set_Goal_Number(kActorFishDealer, 1);
+ }
+ return true;
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
+
}
void AIScriptFishDealer::TimerExpired(int timer) {
@@ -65,7 +82,7 @@ void AIScriptFishDealer::CompletedMovementTrack() {
if (Actor_Query_Goal_Number(kActorFishDealer) != 1)
return; // false
- Actor_Set_Goal_Number(kActorFishDealer, 99);
+ Actor_Set_Goal_Number(kActorFishDealer, 99); // A bug?
Actor_Set_Goal_Number(kActorFishDealer, 1);
//return true;
diff --git a/engines/bladerunner/script/ai/general_doll.cpp b/engines/bladerunner/script/ai/general_doll.cpp
index 7a62320..ee531d0 100644
--- a/engines/bladerunner/script/ai/general_doll.cpp
+++ b/engines/bladerunner/script/ai/general_doll.cpp
@@ -73,7 +73,7 @@ void AIScriptGeneralDoll::TimerExpired(int timer) {
void AIScriptGeneralDoll::CompletedMovementTrack() {
switch (Actor_Query_Goal_Number(kActorGeneralDoll)) {
case 101:
- if (Player_Query_Current_Scene() == 6) {
+ if (Player_Query_Current_Scene() == kSceneBB05) {
switch (Random_Query(0, 5)) {
case 0:
Ambient_Sounds_Play_Speech_Sound(kActorGeneralDoll, 0, 80, 0, 0, 0);
diff --git a/engines/bladerunner/script/ai/howie_lee.cpp b/engines/bladerunner/script/ai/howie_lee.cpp
index 93f0867..3675fc1 100644
--- a/engines/bladerunner/script/ai/howie_lee.cpp
+++ b/engines/bladerunner/script/ai/howie_lee.cpp
@@ -66,6 +66,13 @@ bool AIScriptHowieLee::Update() {
if ( Actor_Query_Goal_Number(kActorHowieLee) == 1
&& Game_Flag_Query(kFlagCT01BoughtHowieLeeFood)
&& !Game_Flag_Query(kFlagMcCoyInChinaTown)
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ // Prevents possibility of Howie Lee from blinking in/out of existence
+ // when the flyout loop is playing
+ // and when McCoy enters and exits the Spinner with the spinner doors animation restored
+ && Player_Query_Current_Scene() != kSceneCT01
+#endif // BLADERUNNER_ORIGINAL_BUGS
) {
Actor_Set_Goal_Number(kActorHowieLee, 4);
return true;
diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp
index 0e82ded..66f05e5 100644
--- a/engines/bladerunner/script/ai/officer_grayford.cpp
+++ b/engines/bladerunner/script/ai/officer_grayford.cpp
@@ -542,7 +542,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb
Actor_Change_Animation_Mode(kActorOfficerGrayford, 43);
- if (Player_Query_Current_Scene() == 28) {
+ if (Player_Query_Current_Scene() == kSceneDR04) {
Actor_Says(kActorOfficerGrayford, 170, kAnimationModeTalk);
}
return true;
diff --git a/engines/bladerunner/script/scene/ar01.cpp b/engines/bladerunner/script/scene/ar01.cpp
index f741a28..cce057a 100644
--- a/engines/bladerunner/script/scene/ar01.cpp
+++ b/engines/bladerunner/script/scene/ar01.cpp
@@ -215,7 +215,11 @@ bool SceneScriptAR01::ClickedOnExit(int exitId) {
Game_Flag_Set(kFlagAR01toAR02);
Async_Actor_Walk_To_XYZ(kActorMcCoy, -222.0, 0.0, -690.0, 0, false);
Set_Enter(kSetAR01_AR02, kSceneAR02);
+#if BLADERUNNER_ORIGINAL_BUGS
+ // Causes the fish dealer to blink out of existence
+ // during the transition to AR02
Actor_Set_Goal_Number(kActorFishDealer, 3);
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
return true;
}
diff --git a/engines/bladerunner/script/scene/ar02.cpp b/engines/bladerunner/script/scene/ar02.cpp
index 15bbe45..1a2eecb 100644
--- a/engines/bladerunner/script/scene/ar02.cpp
+++ b/engines/bladerunner/script/scene/ar02.cpp
@@ -25,7 +25,7 @@
namespace BladeRunner {
void SceneScriptAR02::InitializeScene() {
- Music_Play(kMusicBatl226M, 22, 0, 2, -1, 1, 2);
+ Music_Play(kMusicArabLoop, 22, 0, 2, -1, 1, 2);
if (Game_Flag_Query(kFlagRC03toAR02)) {
Setup_Scene_Information(-560.0f, 0.0f, -799.0f, 333);
} else {
diff --git a/engines/bladerunner/script/scene/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp
index 1c57ee2..80865ee 100644
--- a/engines/bladerunner/script/scene/ct01.cpp
+++ b/engines/bladerunner/script/scene/ct01.cpp
@@ -25,13 +25,13 @@
namespace BladeRunner {
enum kCT01Loops {
- kCT01LoopInshotFromCT12WithSpinner = 0,
- kCT01LoopInshot = 1,
- kCT01LoopMain = 2,
- kCT01LoopDoorAnim = 4,
- kCT01LoopOutshot = 5,
- kCT01LoopInshotFromCT12NoSpinner = 6,
- kCT01LoopMainLoopNoSpinner = 7
+ kCT01LoopInshotFromCT12WithSpinner = 0, // 0 - 14
+ kCT01LoopInshot = 1, // 15 - 194
+ kCT01LoopMain = 2, // 195 - 255
+ kCT01LoopDoorAnim = 4, // 256 - 315
+ kCT01LoopOutshot = 5, // 316 - 435
+ kCT01LoopInshotFromCT12NoSpinner = 6, // 436 - 450
+ kCT01LoopMainLoopNoSpinner = 7 // 451 - 511
};
enum kCT01Exits {
@@ -63,6 +63,21 @@ void SceneScriptCT01::InitializeScene() {
}
}
} else if (Game_Flag_Query(kFlagSpinnerAtCT01)) {
+#if BLADERUNNER_RESTORED_CUT_CONTENT
+ // 0. This scene is not available in chapters 4 and 5
+ // 1. Don't always show the scene; but show it the first time (when kFlagCT01Visited is clear)
+ // 2. Add open/close spinner door animation and sound
+ // 3. Keep walkers from messing about with the scene (popping up or overlapping with landing) until spinner has landed
+ // Note: kFlagSpinnerAtCT01 reset (original) is not handled the same was as in NR01 but it still works
+ if ( Global_Variable_Query(kVariableChapter) < 4
+ && (!Game_Flag_Query(kFlagCT01Visited) || Random_Query(1, 5) == 1 )
+ ){
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kCT01LoopInshot, false);
+ // There's also another flag called kFlagUnpauseGenWalkers
+ // but the usage of that flag seems more obscure and dubious for this purpose
+ Game_Flag_Set(kFlagGenericWalkerWaiting);
+ }
+#endif // BLADERUNNER_RESTORED_CUT_CONTENT
Setup_Scene_Information(-530.0f, -6.5f, 241.0f, 506);
Game_Flag_Set(kFlagArrivedFromSpinner1);
} else {
@@ -94,6 +109,7 @@ void SceneScriptCT01::InitializeScene() {
Ambient_Sounds_Add_Sound(kSfxTHNDER2, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(kSfxTHNDER3, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(kSfxTHNDER4, 20, 40, 33, 50, -100, 100, -101, -101, 0, 0);
+
if (Game_Flag_Query(kFlagSpinnerAtCT01)) {
Scene_Loop_Set_Default(kCT01LoopMain);
} else {
@@ -272,7 +288,13 @@ bool SceneScriptCT01::ClickedOnExit(int exitId) {
Game_Flag_Reset(kFlagMcCoyInTyrellBuilding);
Game_Flag_Reset(kFlagMcCoyInDNARow);
Game_Flag_Reset(kFlagMcCoyInBradburyBuilding);
+#if BLADERUNNER_RESTORED_CUT_CONTENT
+ // Restored spinner door opens/ closes, so we disable this for now
+ // TODO This might be annoying since it slows down the pacing...
+ int spinnerDest = Spinner_Interface_Choose_Dest(kCT01LoopDoorAnim, false);
+#else
int spinnerDest = Spinner_Interface_Choose_Dest(-1, false);
+#endif // BLADERUNNER_RESTORED_CUT_CONTENT
switch (spinnerDest) {
case kSpinnerDestinationPoliceStation:
@@ -380,6 +402,16 @@ void SceneScriptCT01::SceneFrameAdvanced(int frame) {
Ambient_Sounds_Play_Sound(kSfxCARDOWN3, 40, 99, 0, 0);
}
+#if BLADERUNNER_RESTORED_CUT_CONTENT
+ if (frame == 136 || frame == 258) {
+ Sound_Play(kSfxSPINOPN4, 100, 80, 80, 50);
+ }
+
+ if (frame == 183 || frame == 303) {
+ Sound_Play(kSfxSPINCLS1, 100, 80, 80, 50);
+ }
+#endif // BLADERUNNER_RESTORED_CUT_CONTENT
+
if (frame == 316) {
Ambient_Sounds_Play_Sound(kSfxCARUP3B, 50, -50, 100, 99);
}
@@ -415,11 +447,19 @@ void SceneScriptCT01::PlayerWalkedIn() {
Game_Flag_Reset(kFlagCT02toCT01walk);
} else {
if (!Game_Flag_Query(kFlagArrivedFromSpinner1)) {
- Game_Flag_Reset(kFlagArrivedFromSpinner1);
+ Game_Flag_Reset(kFlagArrivedFromSpinner1); // a bug? why reset a flag that is already cleared?
return;
}
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -330.0f, -6.5f, 221.0f, 0, false, false, 0);
+#if BLADERUNNER_RESTORED_CUT_CONTENT
+ if( Game_Flag_Query(kFlagArrivedFromSpinner1)
+ && Game_Flag_Query(kFlagGenericWalkerWaiting)
+ ) {
+ Game_Flag_Reset(kFlagGenericWalkerWaiting);
+ }
+#endif // BLADERUNNER_RESTORED_CUT_CONTENT
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -314.0f, -6.5f, 326.0f, 0, false, false, 0);
+
if (!Game_Flag_Query(kFlagCT01Visited)) {
Game_Flag_Set(kFlagCT01Visited);
if (!Game_Flag_Query(kFlagDirectorsCut)) {
Commit: 54c1c8d2204a2877717d65e39cc8a3b4e1d26b25
https://github.com/scummvm/scummvm/commit/54c1c8d2204a2877717d65e39cc8a3b4e1d26b25
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-04-07T23:14:50+03:00
Commit Message:
BLADERUNNER: Fix Gordo overlap with CT01 loopIn
Changed paths:
engines/bladerunner/script/scene/ct01.cpp
diff --git a/engines/bladerunner/script/scene/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp
index 80865ee..451777f 100644
--- a/engines/bladerunner/script/scene/ct01.cpp
+++ b/engines/bladerunner/script/scene/ct01.cpp
@@ -65,18 +65,22 @@ void SceneScriptCT01::InitializeScene() {
} else if (Game_Flag_Query(kFlagSpinnerAtCT01)) {
#if BLADERUNNER_RESTORED_CUT_CONTENT
// 0. This scene is not available in chapters 4 and 5
- // 1. Don't always show the scene; but show it the first time (when kFlagCT01Visited is clear)
- // 2. Add open/close spinner door animation and sound
- // 3. Keep walkers from messing about with the scene (popping up or overlapping with landing) until spinner has landed
+ // 1. Add open/close spinner door animation and sound
+ // 2. Keep walkers from messing about with the scene (popping up or overlapping with landing) until spinner has landed
// Note: kFlagSpinnerAtCT01 reset (original) is not handled the same was as in NR01 but it still works
+ // Note 2: Gordo sitting at the diner overlaps with the counter bar in front of him
+ // so the loop will be prevented from playing when he is there.
if ( Global_Variable_Query(kVariableChapter) < 4
- && (!Game_Flag_Query(kFlagCT01Visited) || Random_Query(1, 5) == 1 )
+ && Actor_Query_Which_Set_In(kActorGordo) != kSetCT01_CT12
+ && Random_Query(1, 3) == 1
){
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kCT01LoopInshot, false);
- // There's also another flag called kFlagUnpauseGenWalkers
- // but the usage of that flag seems more obscure and dubious for this purpose
- Game_Flag_Set(kFlagGenericWalkerWaiting);
}
+ // Pause generic walkers outside special loop
+ // so that they're always paused when McCoy enters (less chance to collide with him)
+ // There's also another flag called kFlagUnpauseGenWalkers
+ // but the usage of that flag seems more obscure and dubious for this purpose
+ Game_Flag_Set(kFlagGenericWalkerWaiting);
#endif // BLADERUNNER_RESTORED_CUT_CONTENT
Setup_Scene_Information(-530.0f, -6.5f, 241.0f, 506);
Game_Flag_Set(kFlagArrivedFromSpinner1);
@@ -452,6 +456,7 @@ void SceneScriptCT01::PlayerWalkedIn() {
}
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -330.0f, -6.5f, 221.0f, 0, false, false, 0);
#if BLADERUNNER_RESTORED_CUT_CONTENT
+ // unpause generic walkers here, less chance to collide with McCOy while he enters the scene
if( Game_Flag_Query(kFlagArrivedFromSpinner1)
&& Game_Flag_Query(kFlagGenericWalkerWaiting)
) {
More information about the Scummvm-git-logs
mailing list