diff options
author | Travis Howell | 2003-07-18 05:49:21 +0000 |
---|---|---|
committer | Travis Howell | 2003-07-18 05:49:21 +0000 |
commit | f20c47bb216210ed681d3d24698de90821de2703 (patch) | |
tree | 2315359358817c8841c89c7f518a94ddc3b6af03 /scumm/script.cpp | |
parent | 0c47e125af56afb47c1eaa205ea7370fc2e4e747 (diff) | |
download | scummvm-rg350-f20c47bb216210ed681d3d24698de90821de2703.tar.gz scummvm-rg350-f20c47bb216210ed681d3d24698de90821de2703.tar.bz2 scummvm-rg350-f20c47bb216210ed681d3d24698de90821de2703.zip |
Add Indy3 FM Towns support, patch #773434
svn-id: r9062
Diffstat (limited to 'scumm/script.cpp')
-rw-r--r-- | scumm/script.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp index 151b8dcb4a..8281f7ce55 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -507,13 +507,18 @@ int Scumm::readVar(uint var) { return (_scummVars[ var ] & ( 1 << bit ) ) ? 1 : 0; } else { var &= 0x7FFF; +#if defined(BYPASS_COPY_PROT) + if (_gameId == GID_INDY3_TOWNS && var == 1508) { + return 0; + } +#endif checkRange(_numBitVariables - 1, 0, var, "Bit variable %d out of range(r)"); return (_bitVars[var >> 3] & (1 << (var & 7))) ? 1 : 0; } } if (var & 0x4000) { - if (_gameId == GID_INDY3_256) { + if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) { var &= 0xF; } else { var &= 0xFFF; @@ -580,7 +585,7 @@ void Scumm::writeVar(uint var, int value) { } if (var & 0x4000) { - if (_gameId == GID_INDY3_256) { + if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3_TOWNS) { var &= 0xF; } else { var &= 0xFFF; @@ -758,7 +763,7 @@ void Scumm::runExitScript() { // 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) { + 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! byte *roomptr = getResourceAddress(rtRoom, _roomResource); |