diff options
| author | Paul Gilbert | 2014-03-23 09:19:28 -0400 |
|---|---|---|
| committer | Paul Gilbert | 2014-03-23 09:19:28 -0400 |
| commit | 0d158075019940ccf25b4e5b9bd4676e9a06f87d (patch) | |
| tree | f6401d511b1f2633c7901c4603a492665dd6a862 /engines/mads/user_interface.cpp | |
| parent | 6fed5933a84421f413daeb0983281381acc7c128 (diff) | |
| download | scummvm-rg350-0d158075019940ccf25b4e5b9bd4676e9a06f87d.tar.gz scummvm-rg350-0d158075019940ccf25b4e5b9bd4676e9a06f87d.tar.bz2 scummvm-rg350-0d158075019940ccf25b4e5b9bd4676e9a06f87d.zip | |
MADS: Fixes for animating inventory item
Diffstat (limited to 'engines/mads/user_interface.cpp')
| -rw-r--r-- | engines/mads/user_interface.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index 4a35d24ad0..2ea656d0c5 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -125,7 +125,7 @@ void UISlots::draw(bool updateFlag, bool delFlag) { if (slot._slotType >= ST_NONE && !(slot._slotType & 0x40)) { if (!dirtyArea._active) { - error("TODO: Original code here doesn't make sense!"); + error("Should never reach this point, even in original"); } if (dirtyArea._textActive) { @@ -133,10 +133,12 @@ void UISlots::draw(bool updateFlag, bool delFlag) { if (slot._field2 == 200) { MSprite *sprite = asset->getFrame(slot._frameNumber & 0x7F); - sprite->copyTo(&userInterface, slot._position); + sprite->copyTo(&userInterface, slot._position, + sprite->getTransparencyIndex()); } else { MSprite *sprite = asset->getFrame(slot._frameNumber - 1); - sprite->copyTo(&userInterface, slot._position); + sprite->copyTo(&userInterface, slot._position, + sprite->getTransparencyIndex()); } } } @@ -175,7 +177,7 @@ void UISlots::draw(bool updateFlag, bool delFlag) { slot._slotType -= 20; } else { if (updateFlag) - slot._slotType &= 0xBF; + slot._slotType &= ~0x40; else slot._slotType |= 0x40; } @@ -613,7 +615,7 @@ void UserInterface::inventoryAnim() { if (++_invFrameNumber > asset->getCount()) _invFrameNumber = 1; - // Loop through the slots list for ?? entry + // Loop through the slots list for inventory animation entry for (uint i = 0; i < _uiSlots.size(); ++i) { if (_uiSlots[i]._field2 == 200) _uiSlots[i]._slotType = -5; |
