diff options
author | Max Horn | 2003-08-06 12:04:27 +0000 |
---|---|---|
committer | Max Horn | 2003-08-06 12:04:27 +0000 |
commit | 3e0cd37cea291a06b510228b4c26cf40db80140f (patch) | |
tree | e9a722226f90d96b21158b5f0160ef7af10bdcfe /scumm/script.cpp | |
parent | 845a3c5f6e7d98ee223be5703aa0312d7b37ee2e (diff) | |
download | scummvm-rg350-3e0cd37cea291a06b510228b4c26cf40db80140f.tar.gz scummvm-rg350-3e0cd37cea291a06b510228b4c26cf40db80140f.tar.bz2 scummvm-rg350-3e0cd37cea291a06b510228b4c26cf40db80140f.zip |
get rid of GF_INDY3 again, and also remove GID_INDY3_256 and GID_INDY3_TOWNS
svn-id: r9554
Diffstat (limited to 'scumm/script.cpp')
-rw-r--r-- | scumm/script.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp index 8281f7ce55..7449391a8a 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -494,7 +494,7 @@ int Scumm::readVar(uint var) { #if defined(BYPASS_COPY_PROT) // INDY3, EGA Loom and, apparently, Zak256 check this // during the game... - if (_gameId == GID_INDY3 && var == 94 && bit == 4) { + if (_gameId == GID_INDY3 && (_features & GF_OLD_BUNDLE) && var == 94 && bit == 4) { return 0; // } else if (_gameId == GID_LOOM && var == 221 && bit == 14) { // For Mac Loom } else if (_gameId == GID_LOOM && var == 214 && bit == 15) { // For PC Loom @@ -508,7 +508,7 @@ int Scumm::readVar(uint var) { } else { var &= 0x7FFF; #if defined(BYPASS_COPY_PROT) - if (_gameId == GID_INDY3_TOWNS && var == 1508) { + if (_gameId == GID_INDY3 && (_features & GF_FMTOWNS) && var == 1508) { return 0; } #endif @@ -518,7 +518,7 @@ int Scumm::readVar(uint var) { } if (var & 0x4000) { - if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) { + if (_features & GF_FEW_LOCALS) { var &= 0xF; } else { var &= 0xFFF; @@ -585,7 +585,7 @@ void Scumm::writeVar(uint var, int value) { } if (var & 0x4000) { - if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) { + if (_features & GF_FEW_LOCALS) { var &= 0xF; } else { var &= 0xFFF; @@ -759,13 +759,10 @@ void Scumm::runExitScript() { vm.slot[slot].delayFrameCount = 0; - // FIXME: the exit script of room 7 in indy3 only seems to have a size and tag - // not actual data not even a 00 (stop code) - // maybe we should be limiting ourselves to strictly reading the size - // described in the header? - if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) { - // FIXME: Oddly, Indy3 seems to contain exit scripts with only a size - // and a tag - not even a terminating NULL! + // FIXME: the exit script of room 7 in indy3 only seems to have a size + // and tag not actual data not even a 00 (stop code). Maybe we should + // be limiting ourselves to strictly reading the size from the header? + if (_gameId == GID_INDY3) { byte *roomptr = getResourceAddress(rtRoom, _roomResource); const byte *excd = findResourceData(MKID('EXCD'), roomptr) - _resourceHeaderSize; if (!excd || (getResourceDataSize(excd) < 1)) { @@ -813,7 +810,7 @@ void Scumm::killScriptsAndResources() { ss->status = ssDead; } else if (ss->where == WIO_LOCAL) { // HACK to make Indy3 Demo work - if (ss->cutsceneOverride != 0 && !(_gameId == GID_INDY3 && _roomResource == 3)) { + if (ss->cutsceneOverride != 0 && !(_gameId == GID_INDY3 && (_features & GF_OLD_BUNDLE) && _roomResource == 3)) { warning("Script %d stopped with active cutscene/override in exit", ss->number); ss->cutsceneOverride = 0; } |