diff options
author | Paul Gilbert | 2014-04-07 23:48:43 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-04-07 23:48:43 -0400 |
commit | f6cfd1d53b3ac47744c8393c49ecf51a99633fc4 (patch) | |
tree | fa9d4053593f0d5b25858142cdb7fc3990113b5d /engines/mads/user_interface.cpp | |
parent | 7e13f488abeb6a7530d591bae880fdb185c8fef1 (diff) | |
download | scummvm-rg350-f6cfd1d53b3ac47744c8393c49ecf51a99633fc4.tar.gz scummvm-rg350-f6cfd1d53b3ac47744c8393c49ecf51a99633fc4.tar.bz2 scummvm-rg350-f6cfd1d53b3ac47744c8393c49ecf51a99633fc4.zip |
MADS: Implement missing dirty rect merged area pointer
Diffstat (limited to 'engines/mads/user_interface.cpp')
-rw-r--r-- | engines/mads/user_interface.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index d7f198f3ce..f51372e0dd 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -134,15 +134,17 @@ void UISlots::draw(bool updateFlag, bool delFlag) { userInterface._dirtyAreas.merge(1, userInterface._uiSlots.size()); for (uint idx = 0; idx < size(); ++idx) { - DirtyArea &dirtyArea = userInterface._dirtyAreas[idx]; + DirtyArea *dirtyArea = &userInterface._dirtyAreas[idx]; UISlot &slot = (*this)[idx]; if (slot._flags >= IMG_STATIC && !(slot._flags & 0x40)) { - if (!dirtyArea._active) { - error("Should never reach this point, even in original"); + if (!dirtyArea->_active) { + do { + dirtyArea = dirtyArea->_mergedArea; + } while (!dirtyArea->_active); } - if (dirtyArea._textActive) { + if (dirtyArea->_textActive) { SpriteAsset *asset = scene._sprites[slot._spritesIndex]; if (slot._segmentId == IMG_SPINNING_OBJECT) { @@ -655,7 +657,7 @@ void UserInterface::doBackgroundAnimation() { _noSegmentsActive = !_someSegmentsActive; _someSegmentsActive = false; - for (int idx = 0; idx < uiEntries.size(); ++idx) { + for (int idx = 0; idx < (int)uiEntries.size(); ++idx) { AnimUIEntry &uiEntry = uiEntries[idx]; if (uiEntry._counter < 0) { @@ -699,7 +701,7 @@ void UserInterface::doBackgroundAnimation() { } } - for (int idx = 0; idx < uiEntries.size(); ++idx) { + for (uint idx = 0; idx < uiEntries.size(); ++idx) { int imgScan = uiEntries[idx]._counter; if (imgScan >= 0) { _uiSlots.add(frameEntries[imgScan]); |