[Scummvm-cvs-logs] SF.net SVN: scummvm:[44907] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun Oct 11 13:34:30 CEST 2009
Revision: 44907
http://scummvm.svn.sourceforge.net/scummvm/?rev=44907&view=rev
Author: lordhoto
Date: 2009-10-11 11:34:30 +0000 (Sun, 11 Oct 2009)
Log Message:
-----------
Cleanup.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/screen.cpp
scummvm/trunk/engines/kyra/screen.h
Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp 2009-10-11 11:30:24 UTC (rev 44906)
+++ scummvm/trunk/engines/kyra/screen.cpp 2009-10-11 11:34:30 UTC (rev 44907)
@@ -1134,10 +1134,8 @@
}
int Screen::getCharWidth(uint16 c) const {
- if (isSJISChar(c))
- return _fonts[FID_SJIS_FNT]->getCharWidth(c);
- else
- return _fonts[_currentFont]->getCharWidth(c) + _charWidth;
+ const int width = _fonts[_currentFont]->getCharWidth(c);
+ return width + (_currentFont != FID_SJIS_FNT) ? _charWidth : 0;
}
int Screen::getTextWidth(const char *str) const {
@@ -1204,18 +1202,6 @@
}
}
-bool Screen::isSJISChar(uint16 c) const {
- if (!_useSJIS)
- return false;
-
- if (c & 0xFF00)
- return true;
- else if ((c & 0xFF) >= 0xA1 && (c & 0xFF) <= 0xDF)
- return true;
-
- return false;
-}
-
uint16 Screen::fetchChar(const char *&s) const {
if (_currentFont != FID_SJIS_FNT)
return (uint8)*s++;
@@ -3346,7 +3332,7 @@
}
int SJISFont::getCharWidth(uint16 c) const {
- if (_screen->isSJISChar(c))
+ if ((c & 0xFF) >= 0xA1 && (c & 0xFF) <= 0xDF)
return _sjisWidth;
else
return _asciiWidth;
Modified: scummvm/trunk/engines/kyra/screen.h
===================================================================
--- scummvm/trunk/engines/kyra/screen.h 2009-10-11 11:30:24 UTC (rev 44906)
+++ scummvm/trunk/engines/kyra/screen.h 2009-10-11 11:34:30 UTC (rev 44907)
@@ -426,8 +426,6 @@
const ScreenDim *_curDim;
- bool isSJISChar(uint16 ch) const;
-
// shape handling
uint8 *encodeShape(int x, int y, int w, int h, int flags);
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