Ticket #8242: copyprot-restart.diff

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

Patch against a June 2 CVS snapshot

  • scummvm/scumm/script.cpp

    diff -ur ScummVM-cvs20030602/scummvm/scumm/script.cpp ScummVM-cvs20030602+hack/scummvm/scumm/script.cpp
    old new  
    450450
    451451int Scumm::readVar(uint var) {
    452452        int a;
    453 #if defined(BYPASS_COPY_PROT)
    454         static byte copyprotbypassed = false;
    455 #endif
    456453
    457454        debug(9, "readvar(%d)", var);
    458455
     
    467464
    468465        if (!(var & 0xF000)) {
    469466#if defined(BYPASS_COPY_PROT)
    470                 if (var == 490 && _gameId == GID_MONKEY2 && !copyprotbypassed) {
    471                         copyprotbypassed = true;
     467                if (var == 490 && _gameId == GID_MONKEY2 && _currentRoom == 108) {
    472468                        var = 518;
    473                 } else if (var == 179 && (_gameId == GID_MONKEY_VGA || _gameId == GID_MONKEY_EGA) && !copyprotbypassed) {
    474                         copyprotbypassed = true;
     469                } else if (var == 179 && (_gameId == GID_MONKEY_VGA || _gameId == GID_MONKEY_EGA) && _currentRoom == 90) {
    475470                        var = 266;
    476471                }
    477472#endif
     
    488483                        // INDY3 checks this during the game...
    489484                        if (_gameId == GID_INDY3 && var == 94 && bit == 4) {
    490485                                return 0;
    491                         } else if (_gameId == GID_LOOM && var == 214 && bit == 15 && !copyprotbypassed) {
    492                                 copyprotbypassed = true;
     486                        } else if (_gameId == GID_LOOM && var == 214 && bit == 15 && _currentRoom == 69) {
    493487                                return 0;
    494488                        } else if (_gameId == GID_ZAK256 && var == 151 && bit == 8) {
    495489                                return 0;