aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
authorThanasis Antoniou2019-02-25 05:39:49 +0200
committerThanasis Antoniou2019-02-26 02:19:36 +0200
commit09d34607808cbe22c7e8cd83d6781e442315c397 (patch)
tree807f28ee2092ab2740dbeefe20a659755faf0ed3 /engines/bladerunner
parent390b243ef2b8e21d429eada07a88adf3e6142a01 (diff)
downloadscummvm-rg350-09d34607808cbe22c7e8cd83d6781e442315c397.tar.gz
scummvm-rg350-09d34607808cbe22c7e8cd83d6781e442315c397.tar.bz2
scummvm-rg350-09d34607808cbe22c7e8cd83d6781e442315c397.zip
BLADERUNNER: Fix for Sebastian's doll in BB06
Targeting clicking bounding box fixed. Animation weirdness minimized. Also restored explosion animation.
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/script/scene/bb06.cpp50
-rw-r--r--engines/bladerunner/script/scene/bb51.cpp18
2 files changed, 66 insertions, 2 deletions
diff --git a/engines/bladerunner/script/scene/bb06.cpp b/engines/bladerunner/script/scene/bb06.cpp
index 8dca747684..cef2a5a572 100644
--- a/engines/bladerunner/script/scene/bb06.cpp
+++ b/engines/bladerunner/script/scene/bb06.cpp
@@ -63,17 +63,36 @@ void SceneScriptBB06::InitializeScene() {
Game_Flag_Reset(kFlagBB51toBB06b);
} else {
Scene_Loop_Set_Default(1);
+#if BLADERUNNER_ORIGINAL_BUGS // Sebastian's Doll Fix
+#else
+ // bugfix: case of not transitioning from BB51: chess/ egg boiler sub-space
+ if (Game_Flag_Query(kFlagBB06AndroidDestroyed)) {
+ Overlay_Play("BB06OVER", 1, false, false, 0);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
+#if BLADERUNNER_ORIGINAL_BUGS // Sebastian's Doll Fix
if (Game_Flag_Query(kFlagBB06AndroidDestroyed)) {
- Overlay_Play("BB06OVER", 1, true, false, 0); // TODO: check, it's is playing while the background is still panning so it looks pretty weird
+ Overlay_Play("BB06OVER", 1, true, false, 0); // Original bug: it is playing while the background is still panning so it looks pretty weird
}
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
void SceneScriptBB06::SceneLoaded() {
Obstacle_Object("V2CHESSTBL01", true);
Clickable_Object("BOX31");
- Item_Add_To_World(kItemBB06ControlBox, 931, kSetBB02_BB04_BB06_BB51, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true);
+#if BLADERUNNER_ORIGINAL_BUGS // Sebastian's Doll Fix
+ // This Item_Add_To_World call is only ok for the transition from BB51 to BB06,
+ // otherwise the doll item is not placed in the current set
+ Item_Add_To_World(kItemBB06ControlBox, 931, kSetBB06_BB07, -127.0f, 68.42f, 57.0f, 0, 8, 8, true, true, false, true);
+#else
+ // Add doll item based on which SET version of the "room" we are in
+ Item_Add_To_World(kItemBB06ControlBox, 931, Player_Query_Current_Set(), -117.24f, 46.41f, 76.66f, 256, 28, 16, true, true, false, true);
+ if (Game_Flag_Query(kFlagBB06AndroidDestroyed)) {
+ Item_Flag_As_Non_Target(kItemBB06ControlBox);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
bool SceneScriptBB06::MouseClick(int x, int y) {
@@ -101,12 +120,24 @@ bool SceneScriptBB06::ClickedOnActor(int actorId) {
bool SceneScriptBB06::ClickedOnItem(int itemId, bool a2) {
if (itemId == kItemBB06ControlBox) {
+#if BLADERUNNER_ORIGINAL_BUGS // Sebastian's Doll Fix
if (Player_Query_Combat_Mode()) {
Overlay_Play("BB06OVER", 1, true, true, 0);
Game_Flag_Set(kFlagBB06AndroidDestroyed);
Item_Remove_From_World(kItemBB06ControlBox);
return true;
}
+#else
+ if (Player_Query_Combat_Mode()) {
+ Overlay_Play("BB06OVER", 0, false, true, 0); // explosion - don't loop
+ Game_Flag_Set(kFlagBB06AndroidDestroyed);
+ // flag item kItemBB06ControlBox as non-combat-target
+ Item_Flag_As_Non_Target(kItemBB06ControlBox);
+ return true;
+ } else {
+ ClickedOn3DObject("BOX31", false); // clone behavior of box31
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
return false;
}
@@ -152,6 +183,15 @@ void SceneScriptBB06::SceneFrameAdvanced(int frame) {
if (frame == 34) {
Ambient_Sounds_Play_Sound(447, 40, -50, -50, 10);
}
+#if BLADERUNNER_ORIGINAL_BUGS // Sebastian's Doll Fix
+#else
+ // last frame of transition is 15, try 13 for better transition - minimize weird effect
+ if (frame == 13) { // executed once during transition FROM bb51 (chess sub space)
+ if (Game_Flag_Query(kFlagBB06AndroidDestroyed)) {
+ Overlay_Play("BB06OVER", 1, false, false, 0);
+ }
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
if (frame == 16) {
Ambient_Sounds_Play_Sound(448, 20, -50, -50, 10);
}
@@ -177,6 +217,12 @@ void SceneScriptBB06::PlayerWalkedIn() {
}
void SceneScriptBB06::PlayerWalkedOut() {
+#if BLADERUNNER_ORIGINAL_BUGS // Sebastian's Doll Fix
+#else
+ // this might be redundant -- the item is not visible in BB07 even if it was drawn in BB06
+ Item_Remove_From_World(kItemBB06ControlBox); // this removes the item from the set so it won't exist in the next scene
+ // mainly to remove it completely from BB07
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
void SceneScriptBB06::DialogueQueueFlushed(int a1) {
diff --git a/engines/bladerunner/script/scene/bb51.cpp b/engines/bladerunner/script/scene/bb51.cpp
index d53a8d72ee..fd706c2bcf 100644
--- a/engines/bladerunner/script/scene/bb51.cpp
+++ b/engines/bladerunner/script/scene/bb51.cpp
@@ -47,6 +47,14 @@ void SceneScriptBB51::InitializeScene() {
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, 0, false);
Scene_Loop_Set_Default(1);
+
+#if BLADERUNNER_ORIGINAL_BUGS // Sebastian's Doll Fix
+#else
+ if (Game_Flag_Query(kFlagBB06AndroidDestroyed)) {
+ Overlay_Play("BB06OVER", 1, false, false, 0);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
+
}
void SceneScriptBB51::SceneLoaded() {
@@ -111,6 +119,16 @@ bool SceneScriptBB51::ClickedOn2DRegion(int region) {
}
void SceneScriptBB51::SceneFrameAdvanced(int frame) {
+#if BLADERUNNER_ORIGINAL_BUGS // Sebastian's Doll Fix
+#else
+ // Scene Transition loop frames range from 0 to 14
+ // keep destroyedDoll overlay for 2-3 frames - to minimize weird effect
+ if (frame == 2) { // executed once during transition to BB51 (chess sub space)
+ if (Game_Flag_Query(kFlagBB06AndroidDestroyed)) {
+ Overlay_Remove("BB06OVER");
+ }
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
void SceneScriptBB51::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {