aboutsummaryrefslogtreecommitdiff
path: root/queen/verb.h
diff options
context:
space:
mode:
Diffstat (limited to 'queen/verb.h')
-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;
}