aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-19 00:03:54 -0400
committerPaul Gilbert2015-05-19 00:03:54 -0400
commit485214a831582bab79634555175a79a317039613 (patch)
treef229b1062996652c26998b45ca0a28b3ef1fd5a6 /engines
parent338fd4697642dac417be53d21cfc537a30f74f3c (diff)
downloadscummvm-rg350-485214a831582bab79634555175a79a317039613.tar.gz
scummvm-rg350-485214a831582bab79634555175a79a317039613.tar.bz2
scummvm-rg350-485214a831582bab79634555175a79a317039613.zip
SHERLOCK: Further addition of enums and method renames
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/events.cpp10
-rw-r--r--engines/sherlock/inventory.cpp4
-rw-r--r--engines/sherlock/inventory.h2
-rw-r--r--engines/sherlock/user_interface.cpp4
4 files changed, 11 insertions, 9 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index 84794e6e6a..9d9c764fe5 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -30,6 +30,8 @@
namespace Sherlock {
+enum ButtonFlag { LEFT_BUTTON = 1, RIGHT_BUTTON = 2 };
+
Events::Events(SherlockEngine *vm) {
_vm = vm;
_cursorImages = nullptr;
@@ -143,16 +145,16 @@ void Events::pollEvents() {
case Common::EVENT_KEYUP:
return;
case Common::EVENT_LBUTTONDOWN:
- _mouseButtons |= 1;
+ _mouseButtons |= LEFT_BUTTON;
return;
case Common::EVENT_RBUTTONDOWN:
- _mouseButtons |= 2;
+ _mouseButtons |= RIGHT_BUTTON;
return;
case Common::EVENT_LBUTTONUP:
- _mouseButtons &= ~1;
+ _mouseButtons &= ~LEFT_BUTTON;
return;
case Common::EVENT_RBUTTONUP:
- _mouseButtons &= ~2;
+ _mouseButtons &= ~RIGHT_BUTTON;
return;
default:
break;
diff --git a/engines/sherlock/inventory.cpp b/engines/sherlock/inventory.cpp
index d41e4b9b3e..2e7791e5f8 100644
--- a/engines/sherlock/inventory.cpp
+++ b/engines/sherlock/inventory.cpp
@@ -349,9 +349,9 @@ void Inventory::highlight(int index, byte color) {
}
/**
- * Support method for updating the screen
+ * Support method for refreshing the display of the inventory
*/
-void Inventory::doInvJF() {
+void Inventory::refreshInv() {
Screen &screen = *_vm->_screen;
Talk &talk = *_vm->_talk;
UserInterface &ui = *_vm->_ui;
diff --git a/engines/sherlock/inventory.h b/engines/sherlock/inventory.h
index 979507a387..dd4c16b6c9 100644
--- a/engines/sherlock/inventory.h
+++ b/engines/sherlock/inventory.h
@@ -103,7 +103,7 @@ public:
void highlight(int index, byte color);
- void doInvJF();
+ void refreshInv();
int putNameInInventory(const Common::String &name);
int putItemInInventory(Object &obj);
diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp
index 1607c727eb..ef1da3b29f 100644
--- a/engines/sherlock/user_interface.cpp
+++ b/engines/sherlock/user_interface.cpp
@@ -1198,7 +1198,7 @@ void UserInterface::doInvControl() {
if ((mousePos.y < CONTROLS_Y1) && (inv._invMode == 1) && (_find >= 0) && (_find < 1000)) {
if (!scene._bgShapes[_find]._examine.empty() &&
scene._bgShapes[_find]._examine[0] >= ' ')
- inv.doInvJF();
+ inv.refreshInv();
} else if (_selector != -1 || _find >= 0) {
// Selector is the inventory object that was clicked on, or selected.
// If it's -1, then no inventory item is highlighted yet. Otherwise,
@@ -1206,7 +1206,7 @@ void UserInterface::doInvControl() {
if (_selector != -1 && inv._invMode == INVMODE_LOOK
&& mousePos.y >(CONTROLS_Y1 + 11))
- inv.doInvJF();
+ inv.refreshInv();
if (talk._talkToAbort)
return;