aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-04-16 23:03:46 +0000
committerMartin Kiewitz2010-04-16 23:03:46 +0000
commit88f6a39312a27cfa70cfea283b63665894dc7579 (patch)
tree9ec13be439ba866b8237322c8cf5224d089af945 /engines
parentb191acf7cc3822f325ea4fac6b8db7aa30342dcd (diff)
downloadscummvm-rg350-88f6a39312a27cfa70cfea283b63665894dc7579.tar.gz
scummvm-rg350-88f6a39312a27cfa70cfea283b63665894dc7579.tar.bz2
scummvm-rg350-88f6a39312a27cfa70cfea283b63665894dc7579.zip
SCI: handle given coordinate to draw() inside SJIS font support as if the horizontal part would be the center of the character, fixes not perfectly centered japanese text. I assume that PC98 ROM also handled it that way. The actual cause for those "bad" coordinates is GetLongest(), but that behaviour is definitely how sierra sci does it
svn-id: r48678
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/fontsjis.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/sci/graphics/fontsjis.cpp b/engines/sci/graphics/fontsjis.cpp
index 3e2d5217f7..5f065355f6 100644
--- a/engines/sci/graphics/fontsjis.cpp
+++ b/engines/sci/graphics/fontsjis.cpp
@@ -74,7 +74,12 @@ byte GfxFontSjis::getCharHeight(uint16 chr) {
void GfxFontSjis::draw(uint16 chr, int16 top, int16 left, byte color, bool greyedOutput) {
// TODO: Check, if character fits on screen - if it doesn't we need to skip it
// Normally SCI cuts the character and draws the part that fits, but the common SJIS doesn't support that
- _screen->putKanjiChar(_commonFont, left, top, chr, color);
+ // It seems as if the PC98 ROM actually uses the given position as the center of the character, that's why we
+ // subtract 4 here. Otherwise the characters will be slightly to the right. The actual cause for "bad" coordinates
+ // is GetLongest() inside GfxText16. It leaves the last character that is causing a split to a new line within the
+ // current line instead of removing it. That way the result will actually be too long (not our fault, sierra sci
+ // does it the same way)
+ _screen->putKanjiChar(_commonFont, left - 4, top, chr, color);
}
} // End of namespace Sci