From c06c05a7696a4145afc74ffe679c9048bfc02246 Mon Sep 17 00:00:00 2001 From: athrxx Date: Sun, 10 Jul 2011 00:44:18 +0200 Subject: GRAPHICS: remove char/line spacing handling from sjis code (as discussed with LordHoto this should rather be handled in the engine) --- engines/scumm/charset.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index 33010af12a..b38bd3b674 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -68,10 +68,7 @@ void ScummEngine::loadCJKFont() { error("SCUMM::Font: Could not open file 'pce.cdbios'"); _cjkFont->setDrawingMode(Graphics::FontSJIS::kShadowMode); - _cjkFont->setCharSpacing(-1); - _cjkFont->setLineSpacing(-1); - _2byteWidth = _cjkFont->getMaxFontWidth(); - _2byteHeight = _cjkFont->getFontHeight(); + _2byteWidth = _2byteHeight = 12; _useCJKMode = true; #endif } else if (_game.id == GID_MONKEY && _game.platform == Common::kPlatformSegaCD && _language == Common::JA_JPN) { @@ -1127,18 +1124,14 @@ void CharsetRendererPCE::drawBits1(const Graphics::Surface &s, byte *dst, const } int CharsetRendererPCE::getDrawWidthIntern(uint16 chr) { - if (_vm->_useCJKMode && chr > 127) { - assert(_vm->_cjkFont); - return _vm->_cjkFont->getCharWidth(chr); - } + if (_vm->_useCJKMode && chr > 127) + return _vm->_2byteWidth; return CharsetRendererV3::getDrawWidthIntern(chr); } int CharsetRendererPCE::getDrawHeightIntern(uint16 chr) { - if (_vm->_useCJKMode && chr > 127) { - assert(_vm->_cjkFont); - return _vm->_cjkFont->getFontHeight(); - } + if (_vm->_useCJKMode && chr > 127) + return _vm->_2byteHeight; return CharsetRendererV3::getDrawHeightIntern(chr); } -- cgit v1.2.3