aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2013-09-18 08:07:20 +0200
committerStrangerke2013-09-18 08:07:20 +0200
commitedc147774100ffcdfb6aeaa896151e75790564ce (patch)
tree1ce64d83176f4179d85fa65d56382b763ab6e468
parent9ba81f6097cf02a5e38c797746d4e8a5d46e8a6c (diff)
downloadscummvm-rg350-edc147774100ffcdfb6aeaa896151e75790564ce.tar.gz
scummvm-rg350-edc147774100ffcdfb6aeaa896151e75790564ce.tar.bz2
scummvm-rg350-edc147774100ffcdfb6aeaa896151e75790564ce.zip
AVALANCHE: Remove index hack used for mouse pointer (Pascal to C conversion)
-rw-r--r--engines/avalanche/gyro.cpp6
-rw-r--r--engines/avalanche/lucerna.cpp10
-rw-r--r--engines/avalanche/menu.cpp8
-rw-r--r--engines/avalanche/scrolls.cpp4
4 files changed, 14 insertions, 14 deletions
diff --git a/engines/avalanche/gyro.cpp b/engines/avalanche/gyro.cpp
index ec4929e456..cea537da31 100644
--- a/engines/avalanche/gyro.cpp
+++ b/engines/avalanche/gyro.cpp
@@ -196,9 +196,9 @@ Common::String Gyro::intToStr(int32 num) {
void Gyro::newMouse(byte id) {
if (id == _currentMouse)
return;
- _currentMouse = id;
- loadMouse(id - 1);
+ _currentMouse = id;
+ loadMouse(id);
}
/**
@@ -206,7 +206,7 @@ void Gyro::newMouse(byte id) {
* @remarks Originally called 'wait'
*/
void Gyro::setMousePointerWait() {
- newMouse(5);
+ newMouse(4);
}
void Gyro::note(uint16 hertz) {
diff --git a/engines/avalanche/lucerna.cpp b/engines/avalanche/lucerna.cpp
index d5f48dba34..ae6e8b71db 100644
--- a/engines/avalanche/lucerna.cpp
+++ b/engines/avalanche/lucerna.cpp
@@ -1075,17 +1075,17 @@ void Lucerna::checkClick() {
_vm->_gyro->after_the_scroll = false;*/
if ((0 <= cursorPos.y) && (cursorPos.y <= 21))
- _vm->_gyro->newMouse(1); // up arrow
+ _vm->_gyro->newMouse(0); // up arrow
else if ((317 <= cursorPos.y) && (cursorPos.y <= 339))
- _vm->_gyro->newMouse(8); //I-beam
+ _vm->_gyro->newMouse(7); //I-beam
else if ((340 <= cursorPos.y) && (cursorPos.y <= 399))
- _vm->_gyro->newMouse(2); // screwdriver
+ _vm->_gyro->newMouse(1); // screwdriver
else if (!_vm->_menu->isActive()) { // Dropdown can handle its own pointers.
if (_holdLeftMouse) {
- _vm->_gyro->newMouse(7); // Mark's crosshairs
+ _vm->_gyro->newMouse(6); // Mark's crosshairs
guideAvvy(cursorPos); // Normally, if you click on the picture, you're guiding Avvy around.
} else
- _vm->_gyro->newMouse(4); // fletch
+ _vm->_gyro->newMouse(3); // fletch
}
if (_holdLeftMouse) {
diff --git a/engines/avalanche/menu.cpp b/engines/avalanche/menu.cpp
index 69267da55c..a51ec4693e 100644
--- a/engines/avalanche/menu.cpp
+++ b/engines/avalanche/menu.cpp
@@ -715,14 +715,14 @@ void Menu::update() { // TODO: Optimize it ASAP!!! It really needs it...
cursorPos = _vm->getMousePos();
// Change arrow...
if ((0 <= cursorPos.y) && (cursorPos.y <= 21))
- _vm->_gyro->newMouse(1); // Up arrow
+ _vm->_gyro->newMouse(0); // Up arrow
else if ((22 <= cursorPos.y) && (cursorPos.y <= 339)) {
if ((cursorPos.x >= _activeMenuItem._flx1 * 8) && (cursorPos.x <= _activeMenuItem._flx2 * 8) && (cursorPos.y > 21) && (cursorPos.y <= _activeMenuItem._fly * 2 + 1))
- _vm->_gyro->newMouse(3); // Right-arrow
+ _vm->_gyro->newMouse(2); // Right-arrow
else
- _vm->_gyro->newMouse(4); // Fletch
+ _vm->_gyro->newMouse(3); // Fletch
} else if ((340 <= cursorPos.y) && (cursorPos.y <= 399))
- _vm->_gyro->newMouse(2); // Screwdriver
+ _vm->_gyro->newMouse(1); // Screwdriver
_activeMenuItem.lightUp(cursorPos);
diff --git a/engines/avalanche/scrolls.cpp b/engines/avalanche/scrolls.cpp
index 398396de84..043921150d 100644
--- a/engines/avalanche/scrolls.cpp
+++ b/engines/avalanche/scrolls.cpp
@@ -119,7 +119,7 @@ void Scrolls::scrollModeNormal() {
setReadyLight(3);
_vm->_gyro->_seeScroll = true;
CursorMan.showMouse(true);
- _vm->_gyro->newMouse(4);
+ _vm->_gyro->newMouse(3);
::Graphics::Surface temp;
temp.copyFrom(_vm->_graphics->_surface);
@@ -209,7 +209,7 @@ void Scrolls::scrollModeMusic() {
setReadyLight(3);
_vm->_gyro->_seeScroll = true;
CursorMan.showMouse(true);
- _vm->_gyro->newMouse(4);
+ _vm->_gyro->newMouse(3);
// Since there are no sounds in the game yet, it's pretty pointless to implement this function further.
// For now we act like the player just played the right tone.