[Scummvm-cvs-logs] scummvm master -> 299bfa3696aaf3c689798faef198d714eb234f4f
dreammaster
dreammaster at scummvm.org
Sun Mar 15 00:26:06 CET 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
299bfa3696 MADS: Fix showing inventory pictures when inventory animating is off
Commit: 299bfa3696aaf3c689798faef198d714eb234f4f
https://github.com/scummvm/scummvm/commit/299bfa3696aaf3c689798faef198d714eb234f4f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-03-14T19:24:56-04:00
Commit Message:
MADS: Fix showing inventory pictures when inventory animating is off
Changed paths:
engines/mads/user_interface.cpp
diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp
index eced2fd..93a555d 100644
--- a/engines/mads/user_interface.cpp
+++ b/engines/mads/user_interface.cpp
@@ -864,13 +864,13 @@ void UserInterface::loadInventoryAnim(int objectId) {
Scene &scene = _vm->_game->_scene;
noInventoryAnim();
- if (_vm->_invObjectsAnimated) {
- Common::String resName = Common::String::format("*OB%.3dI", objectId);
- SpriteAsset *asset = new SpriteAsset(_vm, resName, ASSET_SPINNING_OBJECT);
- _invSpritesIndex = scene._sprites.add(asset, 1);
- if (_invSpritesIndex >= 0) {
- _invFrameNumber = 1;
- }
+ // WORKAROUND: Even in still mode, we now load the animation frames for the
+ // object, so we can show the first frame as a 'still'
+ Common::String resName = Common::String::format("*OB%.3dI", objectId);
+ SpriteAsset *asset = new SpriteAsset(_vm, resName, ASSET_SPINNING_OBJECT);
+ _invSpritesIndex = scene._sprites.add(asset, 1);
+ if (_invSpritesIndex >= 0) {
+ _invFrameNumber = 1;
}
}
@@ -902,10 +902,13 @@ void UserInterface::inventoryAnim() {
_invSpritesIndex < 0)
return;
- // Move to the next frame number in the sequence, resetting if at the end
- SpriteAsset *asset = scene._sprites[_invSpritesIndex];
- if (++_invFrameNumber > asset->getCount())
- _invFrameNumber = 1;
+ // WORKAROUND: Fix still inventory display, which was broken in the original
+ if (_vm->_invObjectsAnimated) {
+ // Move to the next frame number in the sequence, resetting if at the end
+ SpriteAsset *asset = scene._sprites[_invSpritesIndex];
+ if (++_invFrameNumber > asset->getCount())
+ _invFrameNumber = 1;
+ }
// Loop through the slots list for inventory animation entry
for (uint i = 0; i < _uiSlots.size(); ++i) {
More information about the Scummvm-git-logs
mailing list