aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/kyra_mr.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2008-05-10 14:12:48 +0000
committerFlorian Kagerer2008-05-10 14:12:48 +0000
commit8bbf257525c9b96a4a69cddd668907a0b2657b0d (patch)
treed4835752227f84703b8af7d2aad446bb2f33564b /engines/kyra/kyra_mr.cpp
parent6979458e26a3f8226aa46adcf0bea76ae8797eb0 (diff)
downloadscummvm-rg350-8bbf257525c9b96a4a69cddd668907a0b2657b0d.tar.gz
scummvm-rg350-8bbf257525c9b96a4a69cddd668907a0b2657b0d.tar.bz2
scummvm-rg350-8bbf257525c9b96a4a69cddd668907a0b2657b0d.zip
implement item animations for MR
svn-id: r31973
Diffstat (limited to 'engines/kyra/kyra_mr.cpp')
-rw-r--r--engines/kyra/kyra_mr.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 1ed347953d..d2987d314f 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -79,6 +79,8 @@ KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngi
_mainCharacter.facing = 5;
_mainCharacter.animFrame = 0x57;
_mainCharacter.walkspeed = 5;
+ memset(_activeItemAnim, 0, sizeof(_activeItemAnim));
+ _nextAnimItem = 0;
_text = 0;
_commandLineY = 189;
_inventoryState = false;
@@ -1125,7 +1127,7 @@ void KyraEngine_MR::update() {
updateMouse();
updateSpecialSceneScripts();
updateCommandLine();
- //XXX
+ updateItemAnimations();
musicUpdate(0);
_screen->updateScreen();
@@ -1137,7 +1139,7 @@ void KyraEngine_MR::updateWithText() {
musicUpdate(0);
updateMouse();
- //XXX
+ updateItemAnimations();
updateSpecialSceneScripts();
updateCommandLine();
musicUpdate(0);
@@ -1265,9 +1267,11 @@ void KyraEngine_MR::updateMouse() {
}
if (type != 0 && type != _handItemSet && !hasItemCollision) {
+ _mouseState = _handItemSet = type;
_handItemSet = type;
_screen->setMouseCursor(offsetX, offsetY, _gameShapes[shape]);
} else if (type == 0 && _handItemSet != _itemInHand && mouse.x > 8 && mouse.x < 311 && mouse.y < 171 && mouse.y > 8) {
+ _mouseState = 0;
setItemMouseCursor();
} else if (mouse.y > 187 && _handItemSet > -4 && type == 0 && !_inventoryState) {
showInventory();