[Scummvm-cvs-logs] CVS: scummvm/scumm object.cpp,1.122,1.123
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Mon Jun 16 07:46:13 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv31092
Modified Files:
object.cpp
Log Message:
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.
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- object.cpp 14 Jun 2003 18:52:29 -0000 1.122
+++ object.cpp 16 Jun 2003 14:45:23 -0000 1.123
@@ -130,8 +130,27 @@
_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 @@
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);
}
}
More information about the Scummvm-git-logs
mailing list