22 #ifndef QUEEN_COMMAND_H 23 #define QUEEN_COMMAND_H 25 #include "common/util.h" 26 #include "queen/structs.h" 44 void display(InkColor color,
const char *command = 0,
bool outlined =
false);
50 virtual void displayTemp(InkColor color,
const char *name,
bool outlined);
59 virtual void addObject(
const char *objName);
65 MAX_COMMAND_LEN = 256,
100 void clear(
bool clearTexts);
103 void executeCurrentAction();
109 void readCommandsFrom(byte *&ptr);
112 MAX_MATCHING_CMDS = 50
118 ObjectData *findObjectData(uint16 objRoomNum)
const;
121 ItemData *findItemData(Verb invNum)
const;
124 int16 executeCommand(uint16 comId, int16 condResult);
127 int16 makeJoeWalkTo(int16 x, int16 y, int16 objNum, Verb v,
bool mustWalk);
130 void grabCurrentSelection();
133 void grabSelectedObject(int16 objNum, uint16 objState, uint16 objName);
136 void grabSelectedItem();
139 void grabSelectedNoun();
142 void grabSelectedVerb();
145 bool executeIfCutaway(
const char *description);
148 bool executeIfDialog(
const char *description);
151 bool handleWrongAction();
154 void sayInvalidAction(Verb action, int16 subj1, int16 subj2);
157 void changeObjectState(Verb action, int16 obj, int16 song,
bool cutDone);
160 void cleanupCurrentAction();
163 void openOrCloseAssociatedObject(Verb action, int16 obj);
166 int16 setConditions(uint16 command,
bool lastCmd);
169 void setAreas(uint16 command);
172 void setObjects(uint16 command);
175 void setItems(uint16 command);
181 void lookAtSelectedObject();
184 void lookForCurrentObject(int16 cx, int16 cy);
187 void lookForCurrentIcon(int16 cx, int16 cy);
190 bool isVerbAction(Verb v)
const {
return (v >= VERB_PANEL_COMMAND_FIRST && v <= VERB_PANEL_COMMAND_LAST) || (v == VERB_WALK_TO); }
193 bool isVerbInv(Verb v)
const {
return v >= VERB_INV_FIRST && v <= VERB_INV_LAST; }
196 bool isVerbInvScroll(Verb v)
const {
return v == VERB_SCROLL_UP || v == VERB_SCROLL_DOWN; }
208 uint16 _numCmdObject;
212 uint16 _numCmdInventory;
216 uint16 _numCmdGameState;
228 int _mouseKey, _selPosX, _selPosY;
Definition: structs.h:479
virtual void addLinkWord(Verb v)
set the link word (between verb and object) for the command sentence
bool isEmpty() const
returns true if the command sentence is empty
Definition: command.h:62
void clear()
reset the command sentence
virtual void addObject(const char *objName)
add an object name to the command sentence
Definition: structs.h:390
Definition: structs.h:265
void display(InkColor color, const char *command=0, bool outlined=false)
display the command sentence using the specified color
void setVerb(Verb v)
set the verb for the command sentence
Definition: structs.h:315
void displayTemp(InkColor color, Verb v)
display a temporary command sentence using the specified parameters
Definition: structs.h:431
char _command[MAX_COMMAND_LEN]
buffer containing the current command sentence
Definition: command.h:72
Definition: structs.h:185
Definition: structs.h:447
Definition: structs.h:463