aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle
diff options
context:
space:
mode:
authorStrangerke2013-08-20 07:44:41 +0200
committerStrangerke2013-08-20 07:44:41 +0200
commit50ef208e311540ca5cb55e98e6af5c7efbaf06f5 (patch)
tree9825bb1153cde0c8895e89e01373abc9293193c0 /engines/mortevielle
parent5fdfc0996ca184fe78b930c41afce0031eb1746d (diff)
downloadscummvm-rg350-50ef208e311540ca5cb55e98e6af5c7efbaf06f5.tar.gz
scummvm-rg350-50ef208e311540ca5cb55e98e6af5c7efbaf06f5.tar.bz2
scummvm-rg350-50ef208e311540ca5cb55e98e6af5c7efbaf06f5.zip
MORTEVIELLE: Add some more checks in order to handle properly the first character of some German menu entries
Diffstat (limited to 'engines/mortevielle')
-rw-r--r--engines/mortevielle/menu.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/engines/mortevielle/menu.cpp b/engines/mortevielle/menu.cpp
index c75409311b..5885d329b0 100644
--- a/engines/mortevielle/menu.cpp
+++ b/engines/mortevielle/menu.cpp
@@ -168,17 +168,23 @@ void Menu::setText(MenuItem item, Common::String name) {
_inventoryStringArray[item._actionId].insertChar(' ', 0);
}
break;
- case MENU_MOVE:
+ case MENU_MOVE: {
+ // If the first character isn't '*' or ' ' then it's missing a heading space
+ char c = s[0];
+ if (c != '*' && c != ' ')
+ s.insertChar(' ', 0);
+
while (s.size() < 22)
s += ' ';
_moveStringArray[item._actionId] = s;
+ }
break;
case MENU_ACTION: {
// If the first character isn't '*' or ' ' then it's missing a heading space
char c = s[0];
if (c != '*' && c != ' ')
- s = ' ' + s;
+ s.insertChar(' ', 0);
while (s.size() < 10)
s += ' ';
@@ -190,7 +196,7 @@ void Menu::setText(MenuItem item, Common::String name) {
// If the first character isn't '*' or ' ' then it's missing a heading space
char c = s[0];
if (c != '*' && c != ' ')
- s = ' ' + s;
+ s.insertChar(' ', 0);
while (s.size() < 10)
s += ' ';
@@ -677,13 +683,16 @@ void Menu::initMenu() {
_moveStringArray[i] = "* ";
for (int i = 1; i < 22; i++) {
_actionStringArray[i] = _vm->getString(i + kMenuActionStringIndex);
-
+ if ((_actionStringArray[i][0] != '*') && (_actionStringArray[i][0] != ' '))
+ _actionStringArray[i].insertChar(' ', 0);
while (_actionStringArray[i].size() < 10)
_actionStringArray[i] += ' ';
if (i < 9) {
if (i < 6) {
_selfStringArray[i] = _vm->getString(i + kMenuSelfStringIndex);
+ if ((_selfStringArray[i][0] != '*') && (_selfStringArray[i][0] != ' '))
+ _selfStringArray[i].insertChar(' ', 0);
while (_selfStringArray[i].size() < 10)
_selfStringArray[i] += ' ';
}