SCI: bugfix in GetLongest() for Japanese SQ4

This commit is contained in:
Martin Kiewitz 2014-11-02 19:31:37 +01:00
parent 8ffd8793ed
commit 11ba447483

View File

@ -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