aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/dialogs.cpp
diff options
context:
space:
mode:
authorStrangerke2013-04-10 11:57:48 +0200
committerStrangerke2013-04-10 11:57:48 +0200
commit5ae15d1e108a22736637664112c38bfaa1018316 (patch)
tree69b22063cb44c901ed5ae4062458388497c4e984 /engines/hopkins/dialogs.cpp
parent55938b39755f2bac9fa180aa3f646fa8041b059c (diff)
downloadscummvm-rg350-5ae15d1e108a22736637664112c38bfaa1018316.tar.gz
scummvm-rg350-5ae15d1e108a22736637664112c38bfaa1018316.tar.bz2
scummvm-rg350-5ae15d1e108a22736637664112c38bfaa1018316.zip
HOPKINS: Make the use of _mouseCursorId less verbose
Diffstat (limited to 'engines/hopkins/dialogs.cpp')
-rw-r--r--engines/hopkins/dialogs.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp
index 8eec73e5d0..f589e7396d 100644
--- a/engines/hopkins/dialogs.cpp
+++ b/engines/hopkins/dialogs.cpp
@@ -418,15 +418,17 @@ void DialogsManager::showInventory() {
newInventoryItem = _vm->_linesMan->checkInventoryHotspots(mousePosX, mousePosY);
if (newInventoryItem != oldInventoryItem)
_vm->_objectsMan->initBorder(newInventoryItem);
- if (_vm->_events->_mouseCursorId != 1 && _vm->_events->_mouseCursorId != 2 && _vm->_events->_mouseCursorId != 3 && _vm->_events->_mouseCursorId != 16) {
+ int cursorId = _vm->_events->_mouseCursorId;
+ if (cursorId != 1 && cursorId != 2 && cursorId != 3 && cursorId != 16) {
if (mouseButton == 2) {
_vm->_objectsMan->nextObjectIcon(newInventoryItem);
- if (_vm->_events->_mouseCursorId != 23)
- _vm->_events->changeMouseCursor(_vm->_events->_mouseCursorId);
+ if (cursorId != 23)
+ _vm->_events->changeMouseCursor(cursorId);
}
}
+ cursorId = _vm->_events->_mouseCursorId;
if (mouseButton == 1) {
- if (_vm->_events->_mouseCursorId == 1 || _vm->_events->_mouseCursorId == 2 || _vm->_events->_mouseCursorId == 3 || _vm->_events->_mouseCursorId == 16 || !_vm->_events->_mouseCursorId)
+ if (cursorId == 1 || cursorId == 2 || cursorId == 3 || cursorId == 16 || !cursorId)
break;
_vm->_objectsMan->takeInventoryObject(_vm->_globals->_inventory[newInventoryItem]);
if (_vm->_events->_mouseCursorId == 8)
@@ -478,11 +480,12 @@ void DialogsManager::showInventory() {
_inventWin1 = _vm->_globals->freeMemory(_inventWin1);
_inventBuf2 = _vm->_globals->freeMemory(_inventBuf2);
- if (_vm->_events->_mouseCursorId == 1)
+ int cursorId = _vm->_events->_mouseCursorId;
+ if (cursorId == 1)
showOptionsDialog();
- else if (_vm->_events->_mouseCursorId == 3)
+ else if (cursorId == 3)
showLoadGame();
- else if (_vm->_events->_mouseCursorId == 2)
+ else if (cursorId == 2)
showSaveGame();
_vm->_events->_mouseCursorId = 4;