From f6cfd1d53b3ac47744c8393c49ecf51a99633fc4 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 7 Apr 2014 23:48:43 -0400 Subject: MADS: Implement missing dirty rect merged area pointer --- engines/mads/user_interface.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'engines/mads/user_interface.cpp') 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]); -- cgit v1.2.3