aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula/interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/drascula/interface.cpp')
-rw-r--r--engines/drascula/interface.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp
index 1495694a1b..1d17c77f83 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -120,7 +120,7 @@ void DrasculaEngine::showMenu() {
x = whichObject();
strcpy(textIcon, iconName[x]);
- for (n = 1; n < 43; n++) {
+ for (n = 1; n < ARRAYSIZE(inventoryObjects); n++) {
h = inventoryObjects[n];
if (h != 0) {
@@ -194,11 +194,10 @@ void DrasculaEngine::enterName() {
}
bool DrasculaEngine::checkMenuFlags() {
- for (int n = 0; n < 43; n++) {
- if (whichObject() == n) {
- if (inventoryObjects[n] != 0 && checkAction(inventoryObjects[n]))
- return true;
- }
+ int n = whichObject();
+ if (n != 0) {
+ if (inventoryObjects[n] != 0 && checkAction(inventoryObjects[n]))
+ return true;
}
return false;