diff options
author | Max Horn | 2003-05-08 15:48:50 +0000 |
---|---|---|
committer | Max Horn | 2003-05-08 15:48:50 +0000 |
commit | 98881c3a6a513c27a06e596c29e0b40b355844f6 (patch) | |
tree | a6ddbd3a2e3aa483bae3d82e63fa2ccb6fc40f13 /scumm/costume.cpp | |
parent | 6ab104cc3ca433b672318b3e9bde26f7e882940c (diff) | |
download | scummvm-rg350-98881c3a6a513c27a06e596c29e0b40b355844f6.tar.gz scummvm-rg350-98881c3a6a513c27a06e596c29e0b40b355844f6.tar.bz2 scummvm-rg350-98881c3a6a513c27a06e596c29e0b40b355844f6.zip |
init all VAR_* variables to 0xFF; replaced access to _vars in the form _vars[VAR_*] by VARS(VAR_*) which performs a validity checK; renamed _vars to _scummVars to make sure I updated all places; fixed two places where V6 and newer games would access V5 vars (but there are still some left, it seems); checked VAR access for now only generates a warning
svn-id: r7393
Diffstat (limited to 'scumm/costume.cpp')
-rw-r--r-- | scumm/costume.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/costume.cpp b/scumm/costume.cpp index 002a00e40f..3ec9092145 100644 --- a/scumm/costume.cpp +++ b/scumm/costume.cpp @@ -1319,7 +1319,7 @@ void CostumeRenderer::setPalette(byte *palette) { byte color; if (_vm->_features & GF_OLD_BUNDLE) { - if ((_vm->_vars[_vm->VAR_CURRENT_LIGHTS] & LIGHTMODE_actor_color)) { + if ((_vm->VAR(_vm->VAR_CURRENT_LIGHTS) & LIGHTMODE_actor_color)) { memcpy(_palette, palette, 16); } else { memset(_palette, 8, 16); @@ -1332,7 +1332,7 @@ void CostumeRenderer::setPalette(byte *palette) { _palette[_loaded._ptr[8]] = _palette[0]; } else { for (i = 0; i < _loaded._numColors; i++) { - if ((_vm->_vars[_vm->VAR_CURRENT_LIGHTS] & LIGHTMODE_actor_color) || (_vm->_features & GF_AFTER_V6)) { + if ((_vm->VAR(_vm->VAR_CURRENT_LIGHTS) & LIGHTMODE_actor_color) || (_vm->_features & GF_AFTER_V6)) { color = palette[i]; if (color == 255) color = _loaded._ptr[8 + i]; |