Ticket #8242: copyprot-maniac.diff

File copyprot-maniac.diff, 1.4 KB (added by eriktorbjorn, 18 years ago)

Patch against a June 2 CVS snapshot

  • scummvm/scumm/object.cpp

    diff -ur ScummVM-cvs20030602/scummvm/scumm/object.cpp ScummVM-cvs20030602+hack/scummvm/scumm/object.cpp
    old new  
    130130        _objectOwnerTable[obj] = owner;
    131131}
    132132
     133#ifndef BYPASS_COPY_PROT
     134#define BYPASS_COPY_PROT
     135#endif
     136
    133137int Scumm::getState(int obj) {
    134138        checkRange(_numGlobalObjects - 1, 0, obj, "Object %d out of range in getState");
     139
     140#if defined(BYPASS_COPY_PROT)
     141        // I knew LucasArts sold cracked copies of the original Maniac Mansion,
     142        // at least as part of Day of the Tentacle. Apparently they also sold
     143        // cracked versions of the enhanced version. At least in Germany.
     144        //
     145        // This will keep the security door open at all times. I can only
     146        // assume that 182 and 193 each correspond to one particular side of
     147        // the it. Fortunately it does not prevent frustrated players from
     148        // blowing up the mansion, should they feel the urge to.
     149
     150        if (_gameId == GID_MANIAC && (obj == 182 || obj == 193))
     151                _objectStateTable[obj] |= 0x08;
     152#endif
     153
    135154        return _objectStateTable[obj];
    136155}
    137156
     
    792811        ObjectData *od = &_objs[1];
    793812        for (i = 1; i < _numLocalObjects; i++, od++) {
    794813                if (od->obj_nr > 0)
    795                         od->state = _objectStateTable[od->obj_nr];
     814                        od->state = getState(od->obj_nr);
    796815        }
    797816}
    798817