aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2014-11-02 19:31:37 +0100
committerMartin Kiewitz2014-11-02 19:31:37 +0100
commit11ba4474830ad0557de5a8c2b47dcd3000bc0032 (patch)
tree3c0569a83dfde88f92e683a253bd62bcc4eecf9d
parent8ffd8793ed1f50872c572c6886a5e9100e8312e4 (diff)
downloadscummvm-rg350-11ba4474830ad0557de5a8c2b47dcd3000bc0032.tar.gz
scummvm-rg350-11ba4474830ad0557de5a8c2b47dcd3000bc0032.tar.bz2
scummvm-rg350-11ba4474830ad0557de5a8c2b47dcd3000bc0032.zip
SCI: bugfix in GetLongest() for Japanese SQ4
-rw-r--r--engines/sci/graphics/text16.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 3769cd3af9..c5c2054add 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -201,14 +201,17 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId
}
// it's meant to pass through here
case 0xA:
- case 0x9781: // this one is used by SQ4/japanese as line break as well
- curCharCount++; textPtr++;
- // and it's also meant to pass through here
case 0:
SetFont(previousFontId);
_ports->penColor(previousPenColor);
return curCharCount;
+ case 0x9781: // this one is used by SQ4/japanese as line break as well
+ curCharCount += 2; textPtr += 2;
+ SetFont(previousFontId);
+ _ports->penColor(previousPenColor);
+ return curCharCount;
+
case ' ':
lastSpaceCharCount = curCharCount; // return count up to (but not including) breaking space
lastSpacePtr = textPtr + 1; // remember position right after the current space