diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/object.cpp | 21 |
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); } } |