aboutsummaryrefslogtreecommitdiff
path: root/queen/command.cpp
diff options
context:
space:
mode:
authorGregory Montoir2004-04-03 17:58:58 +0000
committerGregory Montoir2004-04-03 17:58:58 +0000
commit8f6ae7973e895e40ecbf84afa95a0aa81508113b (patch)
treea29329c8cddf2c6daf3f07845033fb4266b4137e /queen/command.cpp
parent330cf4338327a7246f693192aa5c687d3eb5be79 (diff)
downloadscummvm-rg350-8f6ae7973e895e40ecbf84afa95a0aa81508113b.tar.gz
scummvm-rg350-8f6ae7973e895e40ecbf84afa95a0aa81508113b.tar.bz2
scummvm-rg350-8f6ae7973e895e40ecbf84afa95a0aa81508113b.zip
patch #910779 (with minor tweaks), fotaq hebrew support :
- reversed button captions in journal - reversed command text in pinnacle room - reverse order of lines in dialogue chooser thanks Ori Avtalion ! svn-id: r13447
Diffstat (limited to 'queen/command.cpp')
-rw-r--r--queen/command.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/queen/command.cpp b/queen/command.cpp
index 084cc83026..fb3d8a4590 100644
--- a/queen/command.cpp
+++ b/queen/command.cpp
@@ -35,16 +35,21 @@
namespace Queen {
+CmdText::CmdText(bool reversed, uint8 y, QueenEngine *vm)
+ : _isReversed(reversed), _y(y), _vm(vm) {
+ clear();
+}
+
void CmdText::clear() {
memset(_command, 0, sizeof(_command));
}
void CmdText::display(uint8 color) {
_vm->display()->textCurrentColor(color);
- _vm->display()->setTextCentered(COMMAND_Y_POS, _command, false);
+ _vm->display()->setTextCentered(_y, _command, false);
}
-void CmdText::displayTemp(uint8 color, Verb v, const char *name) {
+void CmdText::displayTemp(uint8 color, Verb v, const char *name, bool outlined) {
char temp[MAX_COMMAND_LEN] = "";
if (_isReversed) {
if (name != NULL)
@@ -58,17 +63,17 @@ void CmdText::displayTemp(uint8 color, Verb v, const char *name) {
}
}
_vm->display()->textCurrentColor(color);
- _vm->display()->setTextCentered(COMMAND_Y_POS, temp, false);
+ _vm->display()->setTextCentered(_y, temp, outlined);
}
-void CmdText::displayTemp(uint8 color, const char *name) {
+void CmdText::displayTemp(uint8 color, const char *name, bool outlined) {
char temp[MAX_COMMAND_LEN];
if (_isReversed)
sprintf(temp, "%s %s", name, _command);
else
sprintf(temp, "%s %s", _command, name);
_vm->display()->textCurrentColor(color);
- _vm->display()->setTextCentered(COMMAND_Y_POS, temp, false);
+ _vm->display()->setTextCentered(_y, temp, outlined);
}
void CmdText::setVerb(Verb v) {
@@ -117,9 +122,7 @@ void CmdState::init() {
}
Command::Command(QueenEngine *vm)
- : _vm(vm) {
- _cmdText._isReversed = (vm->resource()->getLanguage() == HEBREW);
- _cmdText._vm = vm;
+ : _cmdText((vm->resource()->getLanguage() == HEBREW), CmdText::COMMAND_Y_POS, vm), _vm(vm) {
}
void Command::clear(bool clearTexts) {