aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorlukaslw2014-06-14 19:26:24 +0200
committerlukaslw2014-06-22 20:09:02 +0200
commitdb542d00f0ecf250e639cea1104889561518b59a (patch)
tree6a92e9bd8f74df86dacca4a4c9a8105f56f83d34 /engines
parent9e94888fa288ef9a4388eb13c118d0b7ac0ada2c (diff)
downloadscummvm-rg350-db542d00f0ecf250e639cea1104889561518b59a.tar.gz
scummvm-rg350-db542d00f0ecf250e639cea1104889561518b59a.tar.bz2
scummvm-rg350-db542d00f0ecf250e639cea1104889561518b59a.zip
PRINCE: German letters fix for inventory names
Diffstat (limited to 'engines')
-rw-r--r--engines/prince/prince.cpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 95f0068811..4e7e0cdb2f 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -728,9 +728,39 @@ int PrinceEngine::hotspot(Graphics::Surface *screen, Common::Array<Mob> &mobList
continue;
}
if (mob._rect.contains(mousePosCamera)) {
+ Common::String mobName = mob._name;
+
+ if (getLanguage() == Common::DE_DEU) {
+ for (uint16 i = 0; i < mobName.size(); i++) {
+ switch (mobName[i]) {
+ case -60:
+ mobName.setChar(-125, i);
+ break;
+ case -42:
+ mobName.setChar(-124, i);
+ break;
+ case -36:
+ mobName.setChar(-123, i);
+ break;
+ case -33:
+ mobName.setChar(127, i);
+ break;
+ case -28:
+ mobName.setChar(-128, i);
+ break;
+ case -10:
+ mobName.setChar(-127, i);
+ break;
+ case -4:
+ mobName.setChar(-126, i);
+ break;
+ }
+ }
+ }
+
uint16 textW = 0;
- for (uint16 i = 0; i < mob._name.size(); i++) {
- textW += _font->getCharWidth(mob._name[i]);
+ for (uint16 i = 0; i < mobName.size(); i++) {
+ textW += _font->getCharWidth(mobName[i]);
}
uint16 x = mousepos.x - textW / 2;
@@ -747,7 +777,7 @@ int PrinceEngine::hotspot(Graphics::Surface *screen, Common::Array<Mob> &mobList
y = _font->getFontHeight() - 2;
}
- _font->drawString(screen, mob._name, x, y, screen->w, 216);
+ _font->drawString(screen, mobName, x, y, screen->w, 216);
return mob._mask;
}
}