[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


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) {





More information about the Scummvm-git-logs mailing list