diff options
author | Max Horn | 2006-01-22 21:05:38 +0000 |
---|---|---|
committer | Max Horn | 2006-01-22 21:05:38 +0000 |
commit | 7012a370cdfadec832e2dba8394845dfba03e5b1 (patch) | |
tree | 40ce6d3ab2f52756791eb04077ef023f2b920c90 | |
parent | 78c028f68e36b99e549782a0d4e929201a56991d (diff) | |
download | scummvm-rg350-7012a370cdfadec832e2dba8394845dfba03e5b1.tar.gz scummvm-rg350-7012a370cdfadec832e2dba8394845dfba03e5b1.tar.bz2 scummvm-rg350-7012a370cdfadec832e2dba8394845dfba03e5b1.zip |
Simplified SCUMM version checks in writeVar/readVar
svn-id: r20140
-rw-r--r-- | scumm/script.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp index cecb8a935d..9068c4b17a 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -531,8 +531,7 @@ int ScummEngine::readVar(uint var) { checkRange(_numRoomVariables - 1, 0, var, "Room variable %d out of range(w)"); return _roomVars[var]; - } else if ((_gameId == GID_ZAK256) || (_features & GF_OLD_BUNDLE) || - (_gameId == GID_LOOM && (_platform == Common::kPlatformFMTowns))) { + } else if (_version <= 3) { int bit = var & 0xF; var = (var >> 4) & 0xFF; @@ -621,8 +620,7 @@ void ScummEngine::writeVar(uint var, int value) { checkRange(_numRoomVariables - 1, 0, var, "Room variable %d out of range(w)"); _roomVars[var] = value; - } else if ((_gameId == GID_ZAK256) || (_features & GF_OLD_BUNDLE) || - (_gameId == GID_LOOM && (_platform == Common::kPlatformFMTowns))) { + } else if (_version <= 3) { // In the old games, the bit variables were using the same memory // as the normal variables! int bit = var & 0xF; |