From d295a1654547d4f3636ea6d64939a0a91c5b2c25 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 10 Mar 2014 01:00:11 -0400 Subject: MADS: Properly hook up use of PaletteUsage::process --- engines/mads/assets.cpp | 2 +- engines/mads/assets.h | 2 +- engines/mads/palette.cpp | 4 ++-- engines/mads/scene_data.cpp | 4 ++-- engines/mads/scene_data.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engines/mads/assets.cpp b/engines/mads/assets.cpp index 554cd9ad48..1a2d542c95 100644 --- a/engines/mads/assets.cpp +++ b/engines/mads/assets.cpp @@ -54,7 +54,7 @@ void SpriteAsset::load(Common::SeekableReadStream *stream, int flags) { _pixelSpeed = 0; _maxWidth = 0; _maxHeight = 0; - _field6 = -1; + _usageIndex = -1; Common::SeekableReadStream *spriteStream = sprite.getItemStream(0); _mode = spriteStream->readByte(); diff --git a/engines/mads/assets.h b/engines/mads/assets.h index c0d1feb883..31d46881ff 100644 --- a/engines/mads/assets.h +++ b/engines/mads/assets.h @@ -77,7 +77,7 @@ private: void load(Common::SeekableReadStream *stream, int flags); public: SpriteSetCharInfo *_charInfo; - int _field6; + int _usageIndex; public: /** * Constructor diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp index 1303ea264a..d9eb3ffa93 100644 --- a/engines/mads/palette.cpp +++ b/engines/mads/palette.cpp @@ -553,8 +553,8 @@ void Palette::initGamePalette() { _vm->_game->_player._spritesStart + idx]; uint32 mask = 1; - if (asset->_field6) - mask <<= asset->_field6; + if (asset->_usageIndex) + mask <<= asset->_usageIndex; palMask = mask; } diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp index 36efcb31de..eb4b221af9 100644 --- a/engines/mads/scene_data.cpp +++ b/engines/mads/scene_data.cpp @@ -500,8 +500,8 @@ void SceneInfo::load(int sceneId, int v1, const Common::String &resName, _vm->_palette->_paletteUsage.prioritize(artHeader._palette); } - _field4C = _vm->_palette->_paletteUsage.process(artHeader._palette, 0xF800); - if (_field4C > 0) { + _usageIndex = _vm->_palette->_paletteUsage.process(artHeader._palette, 0xF800); + if (_usageIndex > 0) { _vm->_palette->_paletteUsage.transform(artHeader._palette); for (uint i = 0; i < _palAnimData.size(); ++i) { diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h index d2fd624512..67393fc75d 100644 --- a/engines/mads/scene_data.h +++ b/engines/mads/scene_data.h @@ -267,7 +267,7 @@ public: int _depthList[DEPTH_BANDS_SIZE]; int _field4A; - int _field4C; + int _usageIndex; Common::Array _palAnimData; SceneNodeList _nodes; public: -- cgit v1.2.3