aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2004-03-26 18:00:13 +0000
committerGregory Montoir2004-03-26 18:00:13 +0000
commit33dc4ae1a6360d419abad8ef1097879edb305c25 (patch)
tree71b1ee4b9932f671c4cc82a010df58850c7fe1fc
parent11ef1b614a374eb5f4076aa9b13eba9a9b83c4ee (diff)
downloadscummvm-rg350-33dc4ae1a6360d419abad8ef1097879edb305c25.tar.gz
scummvm-rg350-33dc4ae1a6360d419abad8ef1097879edb305c25.tar.bz2
scummvm-rg350-33dc4ae1a6360d419abad8ef1097879edb305c25.zip
does this fixes the journal issue for spanish version ?
svn-id: r13384
-rw-r--r--queen/logic.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/queen/logic.cpp b/queen/logic.cpp
index 5e8eeb0be7..ff5dd7a875 100644
--- a/queen/logic.cpp
+++ b/queen/logic.cpp
@@ -43,6 +43,17 @@
namespace Queen {
+static char *trim(char *str) {
+ char *p = str + strlen(str) - 1;
+ while (p != str && *p == ' ') {
+ *p-- = '\0';
+ }
+ while (str != p && *str == ' ') {
+ ++str;
+ }
+ return str;
+}
+
Logic::Logic(QueenEngine *vm)
: _queen2jas(NULL), _credits(NULL), _vm(vm) {
_joe.x = _joe.y = 0;
@@ -204,6 +215,15 @@ void Logic::initialise() {
_joeResponse[0] = 0;
for (i = 1; i <= JOE_RESPONSE_MAX; i++)
_joeResponse[i] = _queen2jas->nextLine();
+
+ // FIXME - the spanish version adds some space characters (0x20) at the
+ // beginning and the end of the journal button captions. As we don't need
+ // that 'trick' to center horizontally the texts, we simply trim them.
+ if (_vm->resource()->getLanguage() == SPANISH) {
+ for (i = 30; i <= 35; i++) {
+ _joeResponse[i] = trim(_joeResponse[i]);
+ }
+ }
_aAnim = new char*[_numAAnim + 1];
_aAnim[0] = 0;