[Scummvm-cvs-logs] SF.net SVN: scummvm:[44911] scummvm/trunk/engines/kyra/screen.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun Oct 11 14:01:20 CEST 2009
Revision: 44911
http://scummvm.svn.sourceforge.net/scummvm/?rev=44911&view=rev
Author: lordhoto
Date: 2009-10-11 12:01:20 +0000 (Sun, 11 Oct 2009)
Log Message:
-----------
Fix regression introduced with r44907.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/screen.cpp
Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp 2009-10-11 12:00:56 UTC (rev 44910)
+++ scummvm/trunk/engines/kyra/screen.cpp 2009-10-11 12:01:20 UTC (rev 44911)
@@ -1135,7 +1135,7 @@
int Screen::getCharWidth(uint16 c) const {
const int width = _fonts[_currentFont]->getCharWidth(c);
- return width + (_currentFont != FID_SJIS_FNT) ? _charWidth : 0;
+ return width + ((_currentFont != FID_SJIS_FNT) ? _charWidth : 0);
}
int Screen::getTextWidth(const char *str) const {
@@ -3315,7 +3315,7 @@
_sjisWidth = _font->getMaxFontWidth() >> 1;
_fontHeight = _font->getFontHeight() >> 1;
- _asciiWidth = _font->getCharWidth('a');
+ _asciiWidth = _font->getCharWidth('a') >> 1;
}
void SJISFont::unload() {
@@ -3332,10 +3332,10 @@
}
int SJISFont::getCharWidth(uint16 c) const {
- if ((c & 0xFF) >= 0xA1 && (c & 0xFF) <= 0xDF)
+ if (c <= 0x7F || (c >= 0xA1 && c <= 0xDF))
+ return _asciiWidth;
+ else
return _sjisWidth;
- else
- return _asciiWidth;
}
void SJISFont::setColorMap(const uint8 *src) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list