aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/animator_hof.cpp2
-rw-r--r--engines/kyra/animator_mr.cpp5
-rw-r--r--engines/kyra/kyra_hof.cpp3
-rw-r--r--engines/kyra/kyra_mr.cpp2
-rw-r--r--engines/kyra/kyra_v2.h1
5 files changed, 5 insertions, 8 deletions
diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp
index 9314f8604e..f9fe281179 100644
--- a/engines/kyra/animator_hof.cpp
+++ b/engines/kyra/animator_hof.cpp
@@ -139,7 +139,7 @@ void KyraEngine_HoF::updateItemAnimations() {
return;
uint16 shpIdx = s->frames[a->currentFrame].index + 64;
- if ((s->itemIndex == _handItemSet || s->itemIndex == _itemInHand) && (!_mouseState && _screen->isMouseVisible())) {
+ if (s->itemIndex == _handItemSet && s->itemIndex == _itemInHand && _screen->isMouseVisible()) {
nextFrame = true;
_screen->setMouseCursor(8, 15, getShapePtr(shpIdx));
}
diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp
index 3498573a90..2b67d4922e 100644
--- a/engines/kyra/animator_mr.cpp
+++ b/engines/kyra/animator_mr.cpp
@@ -197,6 +197,7 @@ void KyraEngine_MR::refreshAnimObjects(int force) {
}
void KyraEngine_MR::updateItemAnimations() {
+ debugC(9, kDebugLevelAnimator, "KyraEngine_MR::updateItemAnimations()");
bool nextFrame = false;
if (_itemAnimData[0].itemIndex == -1)
@@ -215,7 +216,7 @@ void KyraEngine_MR::updateItemAnimations() {
return;
uint16 shpIdx = s->frames[a->currentFrame].index + 248;
- if ((/*s->itemIndex == _handItemSet || */s->itemIndex == _itemInHand) && (!_mouseState && _screen->isMouseVisible())) {
+ if (s->itemIndex == _handItemSet && s->itemIndex == _itemInHand && _screen->isMouseVisible()) {
nextFrame = true;
_screen->setMouseCursor(12, 19, getShapePtr(shpIdx));
}
@@ -240,7 +241,7 @@ void KyraEngine_MR::updateItemAnimations() {
if (animObject->shapeIndex2 == s->itemIndex + 248) {
animObject->shapePtr = getShapePtr(shpIdx);
animObject->shapeIndex1 = shpIdx;
- animObject->needRefresh = 1;
+ animObject->needRefresh = true;
nextFrame = true;
}
}
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index 7aa5f9373b..cd4ed72ae3 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -724,7 +724,7 @@ void KyraEngine_HoF::updateMouse() {
}
if (type != 0 && _handItemSet != type && _screen->isMouseVisible()) {
- _mouseState = _handItemSet = type;
+ _handItemSet = type;
_screen->hideMouse();
_screen->setMouseCursor(xOffset, yOffset, getShapePtr(shapeIndex));
_screen->showMouse();
@@ -732,7 +732,6 @@ void KyraEngine_HoF::updateMouse() {
if (type == 0 && _handItemSet != _itemInHand && _screen->isMouseVisible()) {
if ((mouse.y > 145) || (mouse.x > 6 && mouse.x < 312 && mouse.y > 6 && mouse.y < 135)) {
- _mouseState = 0;
_handItemSet = _itemInHand;
_screen->hideMouse();
if (_itemInHand == -1)
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index d2987d314f..481a3d124f 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -1267,11 +1267,9 @@ 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();
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index e64e51ae37..ca6569a56c 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -101,7 +101,6 @@ protected:
void removeInputTop();
int _mouseX, _mouseY;
- int _mouseState;
struct Event {
Common::Event event;