aboutsummaryrefslogtreecommitdiff
path: root/scumm/object.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-06-16 14:45:23 +0000
committerTorbjörn Andersson2003-06-16 14:45:23 +0000
commit4abfb1f73c2a2f5653c775ddc25abe6e8cb83a0d (patch)
treef8e16a9972318a6626532e68b62272640157d717 /scumm/object.cpp
parenta5a72ef3f8daca815b527d7881b57cafd2e57634 (diff)
downloadscummvm-rg350-4abfb1f73c2a2f5653c775ddc25abe6e8cb83a0d.tar.gz
scummvm-rg350-4abfb1f73c2a2f5653c775ddc25abe6e8cb83a0d.tar.bz2
scummvm-rg350-4abfb1f73c2a2f5653c775ddc25abe6e8cb83a0d.zip
Bypass the Maniac Mansion copy protection by making the security door stay
open at all times, like some original versions did. This still leaves the player the option of blowing the mansion up by entering the wrong code. I still don't know if it has any unforseen side-effects. svn-id: r8517
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r--scumm/object.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index 6f60297f54..c388734e0a 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -130,8 +130,27 @@ void Scumm::putOwner(int obj, int owner) {
_objectOwnerTable[obj] = owner;
}
+#ifndef BYPASS_COPY_PROT
+#define BYPASS_COPY_PROT
+#endif
+
int Scumm::getState(int obj) {
checkRange(_numGlobalObjects - 1, 0, obj, "Object %d out of range in getState");
+
+#if defined(BYPASS_COPY_PROT)
+ // I knew LucasArts sold cracked copies of the original Maniac Mansion,
+ // at least as part of Day of the Tentacle. Apparently they also sold
+ // cracked versions of the enhanced version. At least in Germany.
+ //
+ // This will keep the security door open at all times. I can only
+ // assume that 182 and 193 each correspond to one particular side of
+ // the it. Fortunately it does not prevent frustrated players from
+ // blowing up the mansion, should they feel the urge to.
+
+ if (_gameId == GID_MANIAC && (obj == 182 || obj == 193))
+ _objectStateTable[obj] |= 0x08;
+#endif
+
return _objectStateTable[obj];
}
@@ -796,7 +815,7 @@ void Scumm::fixObjectFlags() {
ObjectData *od = &_objs[1];
for (i = 1; i < _numLocalObjects; i++, od++) {
if (od->obj_nr > 0)
- od->state = _objectStateTable[od->obj_nr];
+ od->state = getState(od->obj_nr);
}
}