aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/script_v2.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-13 23:15:35 +0100
committerGitHub2017-01-13 23:15:35 +0100
commite5ebc903ea3e90e2e97c2374a93cedaae0e56f6d (patch)
tree963ebf628f3aeeaea8223ef3b705aacf9cca7e19 /engines/scumm/script_v2.cpp
parentab5ffb466ecd031c985c42dccf6d26e811ccc049 (diff)
parenta3ca4412fae0cdd6623fb7d47f7d1a8bb1d7ab03 (diff)
downloadscummvm-rg350-e5ebc903ea3e90e2e97c2374a93cedaae0e56f6d.tar.gz
scummvm-rg350-e5ebc903ea3e90e2e97c2374a93cedaae0e56f6d.tar.bz2
scummvm-rg350-e5ebc903ea3e90e2e97c2374a93cedaae0e56f6d.zip
Merge pull request #877 from segrax/Fix_2285
SCUMM: Fix bug #2285 (ZAK C64/V1/V2 Caponians dont disguise after using crystal)
Diffstat (limited to 'engines/scumm/script_v2.cpp')
-rw-r--r--engines/scumm/script_v2.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index c58127eedc..756e0b44de 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -1274,6 +1274,35 @@ void ScummEngine_v2::o2_putActorInRoom() {
a->putActor(0, 0, 0);
}
+
+ // WORKAROUND bug #2285: Caponians dont disguise after using blue crystal
+ // This is for a game scripting oversight.
+ // After first using the blue crystal, a cutscene of the two Caponians plays (script-96),
+ // locking object 344 (which prevents the cutscene playing again) and setting Var[245] to 0x18.
+ // script-5 uses this variable to set the Caponian costume
+ // On first apperance after using the blue crystal, the Caponians now will have the disguise on
+ //
+ // If you visit the spacecraft and ring the doorbell, Var[245] will be set to 0x1C (Disguise off)
+ // Using the blue crystal again, will result in the Caponian appearing without his disguise
+ // as Var[245] is never set back to 0x18. This WORKAROUND fixes the problem by ensuring
+ // Var[245] is set to have the Disguise on in most situations
+ //
+ // We don't touch the variable in the following situations
+ // If the Caponian is being put into the space ship room, or the current room is the
+ // space ship and the Caponian is being put into the backroom of the telephone company (you didnt show your fan club card)
+ if (_game.id == GID_ZAK && _game.version <= 2 && act == 7) {
+ // Is script-96 cutscene done
+ if ((getState(344) & kObjectStateLocked)) {
+ // Not 'putting' in the space ship
+ if (room != 10) {
+ // not putting in telephone back room, and not in space ship
+ if (room != 16 && _currentRoom != 10) {
+ // Set caponian costume to 'disguise on'
+ writeVar(245, 0x18);
+ }
+ }
+ }
+ }
}
void ScummEngine_v2::o2_getActorElevation() {