aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorGregory Montoir2003-10-30 13:08:38 +0000
committerGregory Montoir2003-10-30 13:08:38 +0000
commit4db6235db722d42da8bd0631646f6cc982972209 (patch)
tree3122f07cf63fb91985cf59d2eae2cee206074e49 /queen
parentd8ffcaf34009343213ad0d6765024b0b09055b26 (diff)
downloadscummvm-rg350-4db6235db722d42da8bd0631646f6cc982972209.tar.gz
scummvm-rg350-4db6235db722d42da8bd0631646f6cc982972209.tar.bz2
scummvm-rg350-4db6235db722d42da8bd0631646f6cc982972209.zip
add methods needed by Command
svn-id: r11011
Diffstat (limited to 'queen')
-rw-r--r--queen/verb.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/queen/verb.h b/queen/verb.h
index 351e9df14b..2de7222f18 100644
--- a/queen/verb.h
+++ b/queen/verb.h
@@ -72,35 +72,35 @@ public:
_verb = VERB_NONE;
}
- Verb(VerbEnum v) {
+ Verb(VerbEnum v) {
_verb = v;
}
//! _verb is open/close/move/give/look at/pick up/talk to
- bool isPanelCommand() const {
+ bool isPanelCommand() const {
return
- _verb >= VERB_PANEL_COMMAND_FIRST &&
+ _verb >= VERB_PANEL_COMMAND_FIRST &&
_verb <= VERB_PANEL_COMMAND_LAST;
}
- bool isScrollInventory() const {
+ bool isScrollInventory() const {
return
_verb == VERB_SCROLL_UP ||
_verb == VERB_SCROLL_DOWN;
}
- bool isInventory() const {
+ bool isInventory() const {
return
_verb >= VERB_INV_FIRST &&
_verb <= VERB_INV_LAST;
}
- bool isJournal() const {
+ bool isJournal() const {
return _verb == VERB_USE_JOURNAL;
}
- bool isTwoLevelsCommand() const {
- return
+ bool isTwoLevelsCommand() const {
+ return
_verb == VERB_GIVE ||
_verb == VERB_USE;
}
@@ -115,6 +115,17 @@ public:
return _verb == VERB_SKIP_TEXT;
}
+ bool isAction() const {
+ return
+ isPanelCommand() ||
+ _verb == VERB_WALK_TO ||
+ isScrollInventory();
+ }
+
+ bool isNone() const {
+ return _verb == VERB_NONE;
+ }
+
VerbEnum value() const {
return _verb;
}
@@ -130,6 +141,10 @@ public:
return _verb == other._verb;
}
+ bool operator!=(const Verb& other) const {
+ return _verb != other._verb;
+ }
+
static void initName(int i, char* name) {
_verbName[i] = name;
}