aboutsummaryrefslogtreecommitdiff
path: root/queen/command.h
diff options
context:
space:
mode:
Diffstat (limited to 'queen/command.h')
-rw-r--r--queen/command.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/queen/command.h b/queen/command.h
index 55c973e11d..cfa709a3d8 100644
--- a/queen/command.h
+++ b/queen/command.h
@@ -36,25 +36,25 @@ struct CmdText {
//! reset the command sentence
void clear();
-
+
//! display the command sentence using the specified color
void display(uint8 color);
-
+
//! display a temporary command sentence using the specified parameters
void displayTemp(uint8 color, Verb v, const char *name = NULL, bool outlined = false);
-
+
//! display a temporary command sentence using the specified parameters
void displayTemp(uint8 color, const char *name, bool outlined = false);
-
+
//! set the verb for the command sentence
void setVerb(Verb v);
-
+
//! set the link word (between verb and object) for the command sentence
void addLinkWord(Verb v);
-
+
//! add an object name to the command sentence
void addObject(const char *objName);
-
+
//! returns true if the command sentence is empty
bool isEmpty() const;
@@ -62,15 +62,15 @@ struct CmdText {
MAX_COMMAND_LEN = 256,
COMMAND_Y_POS = 151
};
-
+
uint8 _y;
//! flag indicating if the words in the sentence are reversed (hebrew version)
bool _isReversed;
-
+
//! buffer containing the current command sentence
char _command[MAX_COMMAND_LEN];
-
+
QueenEngine *_vm;
};
@@ -90,10 +90,10 @@ struct CmdState {
class Command {
public:
-
+
Command(QueenEngine *vm);
~Command();
-
+
//! initialise command construction
void clear(bool clearTexts);
@@ -114,7 +114,7 @@ private:
//! get a reference to the ObjectData for the specified room object
ObjectData *findObjectData(uint16 objRoomNum) const;
-
+
//! get a reference to the ItemData for the specified inventory object
ItemData *findItemData(Verb invNum) const;
@@ -126,40 +126,40 @@ private:
//! update command state with current selected action
void grabCurrentSelection();
-
+
//! update command state with current selected object
void grabSelectedObject(int16 objNum, uint16 objState, uint16 objName);
-
+
//! update command state with current selected inventory object
void grabSelectedItem();
-
+
//! update command state with current selected room object
void grabSelectedNoun();
-
+
//! update command state with current selected verb
void grabSelectedVerb();
//! if the description is a cutaway file, execute it
bool executeIfCutaway(const char *description);
-
+
//! if the description is a dialog file, execute it
bool executeIfDialog(const char *description);
-
+
//! handle a wrong/invalid user action
bool handleWrongAction();
-
+
//! make Joe speak something for a wrong/invalid action
void sayInvalidAction(Verb action, int16 subj1, int16 subj2);
-
+
//! update an object state
void changeObjectState(Verb action, int16 obj, int16 song, bool cutDone);
-
+
//! reset current action
void cleanupCurrentAction();
-
+
//! OPEN_CLOSE_OTHER(OBJECT_DATA[S][4])
void openOrCloseAssociatedObject(Verb action, int16 obj);
-
+
//! update gamestates - P1_SET_CONDITIONS
int16 setConditions(uint16 command, bool lastCmd);
@@ -168,7 +168,7 @@ private:
//! hide/show objects, redisplay if in the same room as Joe - P3_SET_OBJECTS
void setObjects(uint16 command);
-
+
//! inserts/deletes items (inventory) - P4_SET_ITEMS
void setItems(uint16 command);
@@ -186,13 +186,13 @@ private:
//! returns true if the verb is an action verb
bool isVerbAction(Verb v) const { return (v >= VERB_PANEL_COMMAND_FIRST && v <= VERB_PANEL_COMMAND_LAST) || (v == VERB_WALK_TO); };
-
+
//! return true if the verb is an inventory item
bool isVerbInv(Verb v) const { return v >= VERB_INV_FIRST && v <= VERB_INV_LAST; }
-
+
//! returns true if the specified verb is an inventory scroll
bool isVerbInvScroll(Verb v) const { return v == VERB_SCROLL_UP || v == VERB_SCROLL_DOWN; }
-
+
//! commands list for each possible action
CmdListData *_cmdList;
uint16 _numCmdList;
@@ -215,7 +215,7 @@ private:
//! textual form of the command (displayed between room and panel areas)
CmdText _cmdText;
-
+
//! flag indicating that the current command is fully constructed
bool _parse;