aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorrichiesams2013-08-24 00:10:34 -0500
committerrichiesams2013-08-24 00:23:42 -0500
commitaed38867ceb4fc13f221322aae15054fece7cff2 (patch)
tree78a77867458103e7df4292fbf855d6a4f80fe8d1 /engines
parent0da3d3e5eb3c332f943a63fea4e3777fb24ba577 (diff)
downloadscummvm-rg350-aed38867ceb4fc13f221322aae15054fece7cff2.tar.gz
scummvm-rg350-aed38867ceb4fc13f221322aae15054fece7cff2.tar.bz2
scummvm-rg350-aed38867ceb4fc13f221322aae15054fece7cff2.zip
ZVISION: Change variable name to match its purpose
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/events.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/zvision/events.cpp b/engines/zvision/events.cpp
index f751d02386..94e8f088dd 100644
--- a/engines/zvision/events.cpp
+++ b/engines/zvision/events.cpp
@@ -140,7 +140,7 @@ void ZVision::onMouseUp(const Common::Point &pos) {
void ZVision::onMouseMove(const Common::Point &pos) {
Common::Point imageCoord(_renderManager->screenSpaceToImageSpace(pos));
- bool isWithinAHotspot = false;
+ bool cursorWasChanged = false;
for (Common::List<MouseEvent *>::iterator iter = _mouseEvents.begin(); iter != _mouseEvents.end(); iter++) {
cursorWasChanged = cursorWasChanged || (*iter)->onMouseMove(pos, imageCoord);
}
@@ -184,14 +184,14 @@ void ZVision::onMouseMove(const Common::Point &pos) {
Common::Rational velocity = (Common::Rational(MAX_ROTATION_SPEED, ROTATION_SCREEN_EDGE_OFFSET) * (pos.x - _workingWindow.left)) - MAX_ROTATION_SPEED;
_renderManager->setBackgroundVelocity(velocity.toInt());
_cursorManager->setLeftCursor();
- isWithinAHotspot = true;
+ cursorWasChanged = true;
} else if (pos.x <= _workingWindow.right && pos.x > _workingWindow.right - ROTATION_SCREEN_EDGE_OFFSET) {
// Linear function of distance to the right edge (y = mx)
// We use fixed point math to get better accuracy
Common::Rational velocity = Common::Rational(MAX_ROTATION_SPEED, ROTATION_SCREEN_EDGE_OFFSET) * (pos.x - _workingWindow.right + ROTATION_SCREEN_EDGE_OFFSET);
_renderManager->setBackgroundVelocity(velocity.toInt());
_cursorManager->setRightCursor();
- isWithinAHotspot = true;
+ cursorWasChanged = true;
} else {
_renderManager->setBackgroundVelocity(0);
}
@@ -202,14 +202,14 @@ void ZVision::onMouseMove(const Common::Point &pos) {
Common::Rational velocity = (Common::Rational(MAX_ROTATION_SPEED, ROTATION_SCREEN_EDGE_OFFSET) * (pos.y - _workingWindow.top)) - MAX_ROTATION_SPEED;
_renderManager->setBackgroundVelocity(velocity.toInt());
_cursorManager->setUpCursor();
- isWithinAHotspot = true;
+ cursorWasChanged = true;
} else if (pos.y <= _workingWindow.bottom && pos.y > _workingWindow.bottom - ROTATION_SCREEN_EDGE_OFFSET) {
// Linear function of distance to the bottom edge (y = mx)
// We use fixed point math to get better accuracy
Common::Rational velocity = Common::Rational(MAX_ROTATION_SPEED, ROTATION_SCREEN_EDGE_OFFSET) * (pos.y - _workingWindow.bottom + ROTATION_SCREEN_EDGE_OFFSET);
_renderManager->setBackgroundVelocity(velocity.toInt());
_cursorManager->setDownCursor();
- isWithinAHotspot = true;
+ cursorWasChanged = true;
} else {
_renderManager->setBackgroundVelocity(0);
}
@@ -218,7 +218,7 @@ void ZVision::onMouseMove(const Common::Point &pos) {
_renderManager->setBackgroundVelocity(0);
}
- if (!isWithinAHotspot) {
+ if (!cursorWasChanged) {
_cursorManager->revertToIdle();
}
}