aboutsummaryrefslogtreecommitdiff
path: root/engines/queen/command.h
diff options
context:
space:
mode:
authorGregory Montoir2007-11-05 20:53:30 +0000
committerGregory Montoir2007-11-05 20:53:30 +0000
commit20b3ee2057daeb076f57545d2e5b99a7bbc1d257 (patch)
treedae2bc9bd18333aea2f937d09a73506f91647a13 /engines/queen/command.h
parent773d0dc3c6b42909273432f12bb8d9d367314c5f (diff)
downloadscummvm-rg350-20b3ee2057daeb076f57545d2e5b99a7bbc1d257.tar.gz
scummvm-rg350-20b3ee2057daeb076f57545d2e5b99a7bbc1d257.tar.bz2
scummvm-rg350-20b3ee2057daeb076f57545d2e5b99a7bbc1d257.zip
made CmdText a virtual class, so that language tweaks can be handled in subclasses.
svn-id: r29424
Diffstat (limited to 'engines/queen/command.h')
-rw-r--r--engines/queen/command.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/engines/queen/command.h b/engines/queen/command.h
index e0a6cef80a..e787bb3c1b 100644
--- a/engines/queen/command.h
+++ b/engines/queen/command.h
@@ -33,47 +33,50 @@ namespace Queen {
class QueenEngine;
-struct CmdText {
+class CmdText {
+public:
+
+ static CmdText *makeCmdTextInstance(uint8 y, QueenEngine *vm);
CmdText(uint8 y, QueenEngine *vm);
+ virtual ~CmdText() {}
//! reset the command sentence
void clear();
//! display the command sentence using the specified color
- void display(InkColor color);
+ void display(InkColor color, const char *command = 0, bool outlined = false);
//! display a temporary command sentence using the specified parameters
- void displayTemp(InkColor color, Verb v, const char *name = NULL, bool outlined = false);
+ void displayTemp(InkColor color, Verb v);
//! display a temporary command sentence using the specified parameters
- void displayTemp(InkColor color, const char *name, bool outlined = false);
+ virtual void displayTemp(InkColor color, const char *name, bool outlined);
//! 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);
+ virtual void addLinkWord(Verb v);
//! add an object name to the command sentence
- void addObject(const char *objName);
+ virtual void addObject(const char *objName);
//! returns true if the command sentence is empty
- bool isEmpty() const;
+ bool isEmpty() const { return _command[0] == 0; }
enum {
MAX_COMMAND_LEN = 256,
COMMAND_Y_POS = 151
};
- uint8 _y;
-
- //! flag indicating if the words in the sentence are reversed (hebrew version)
- bool _isReversed;
+protected:
//! buffer containing the current command sentence
char _command[MAX_COMMAND_LEN];
+ uint8 _y;
+
QueenEngine *_vm;
};
@@ -217,7 +220,7 @@ private:
uint16 _numCmdGameState;
//! textual form of the command (displayed between room and panel areas)
- CmdText _cmdText;
+ CmdText *_cmdText;
//! flag indicating that the current command is fully constructed
bool _parse;