[Scummvm-cvs-logs] CVS: scummvm/queen verb.h,1.1,1.2
Gregory Montoir
cyx at users.sourceforge.net
Thu Oct 30 05:09:22 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen verb.h,NONE,1.1 defs.h,1.19,1.20 structs.h,1.17,1.18 input.h,1.4,1.5 input.cpp,1.4,1.5 logic.h,1.48,1.49 logic.cpp,1.65,1.66 cutaway.cpp,1.45,1.46 talk.cpp,1.27,1.28 xref.txt,1.24,1.25
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen verb.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv19846
Modified Files:
verb.h
Log Message:
add methods needed by Command
Index: verb.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/verb.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- verb.h 30 Oct 2003 10:56:38 -0000 1.1
+++ verb.h 30 Oct 2003 13:08:38 -0000 1.2
@@ -72,35 +72,35 @@
_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 @@
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;
}
@@ -128,6 +139,10 @@
bool operator==(const Verb& other) const {
return _verb == other._verb;
+ }
+
+ bool operator!=(const Verb& other) const {
+ return _verb != other._verb;
}
static void initName(int i, char* name) {
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen verb.h,NONE,1.1 defs.h,1.19,1.20 structs.h,1.17,1.18 input.h,1.4,1.5 input.cpp,1.4,1.5 logic.h,1.48,1.49 logic.cpp,1.65,1.66 cutaway.cpp,1.45,1.46 talk.cpp,1.27,1.28 xref.txt,1.24,1.25
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen verb.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list