From c5ced2347c07e1e4f1d2b2c1a3da1c4d4463773f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 25 May 2014 22:31:37 -0400 Subject: MADS: Improve user interface animations --- engines/mads/user_interface.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/mads/user_interface.cpp') diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index 68f578489e..e21a0f6243 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -104,7 +104,7 @@ void UISlots::draw(bool updateFlag, bool delFlag) { UISlot &slot = (*this)[idx]; if (dirtyArea._active && dirtyArea._bounds.width() > 0 - && dirtyArea._bounds.height() > 0 && slot._flags >= -20) { + && dirtyArea._bounds.height() > 0 && slot._flags > -20) { if (slot._flags >= IMG_ERASE) { // Merge area @@ -449,7 +449,8 @@ void UserInterface::mergeFrom(MSurface *src, const Common::Rect &srcBounds, for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) { // Process each line of the area for (int xCtr = 0; xCtr < copyRect.width(); ++xCtr) { - // Check for the range used for on-screen text, which should be kept intact + // Check for the range used for the user interface background, + // which are the only pixels that can be replaced if ((destPtr[xCtr] >= 8 && destPtr[xCtr] <= 15) && (int)srcPtr[xCtr] != transparencyIndex) destPtr[xCtr] = srcPtr[xCtr]; } @@ -884,7 +885,7 @@ void UserInterface::inventoryAnim() { // Loop through the slots list for inventory animation entry for (uint i = 0; i < _uiSlots.size(); ++i) { if (_uiSlots[i]._segmentId == IMG_SPINNING_OBJECT) - _uiSlots[i]._flags = IMG_UPDATE_ONLY; + _uiSlots[i]._flags = IMG_FULL_UPDATE; } // Add a new slot entry for the inventory animation -- cgit v1.2.3