aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorJames Brown2004-03-13 12:55:40 +0000
committerJames Brown2004-03-13 12:55:40 +0000
commit7000cb00e4394f10f567b2669fc805af0ea6d55a (patch)
tree8916b87ef6a514ad6c284a4ce2cffad78491f879 /scumm
parentac17175f6c39bbff85fdcb2ce97d10d85978ea11 (diff)
downloadscummvm-rg350-7000cb00e4394f10f567b2669fc805af0ea6d55a.tar.gz
scummvm-rg350-7000cb00e4394f10f567b2669fc805af0ea6d55a.tar.bz2
scummvm-rg350-7000cb00e4394f10f567b2669fc805af0ea6d55a.zip
Forward-port maniac hack :)
svn-id: r13242
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v2.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index a0b64c090c..5eae8ebc77 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -444,7 +444,17 @@ int ScummEngine_v2::readVar(uint var) {
void ScummEngine_v2::writeVar(uint var, int value) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(r)");
debug(6, "writeVar(%d) = %d", var, value);
+
_scummVars[var] = value;
+
+ // HACK: Ender's hack around a bug in Maniac. If you take the last dime from
+ // Weird Ed's piggybank, this disables the New Kid option and runs the Jail
+ // cutscene. Script 116 sets var[175] to 1, which disables New Kid in
+ // script 164. Unfortunatly, when New Kid is reenabled (var[175] = 0) in
+ // script 89, script 164 isn't reran to redraw it. Why? Dunno. Hack? Yes.
+ if ((var == 175) && (_gameId == GID_MANIAC) && (vm.slot[_currentScript].number == 89))
+ runScript(164, 0, 0, 0);
+
}
void ScummEngine_v2::getResultPosIndirect() {