[Scummvm-cvs-logs] SF.net SVN: scummvm:[53597] scummvm/trunk/engines/scumm

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Tue Oct 19 01:54:36 CEST 2010


Revision: 53597
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53597&view=rev
Author:   athrxx
Date:     2010-10-18 23:54:35 +0000 (Mon, 18 Oct 2010)

Log Message:
-----------
SCUMM/FM-TOWNS JAPANESE: fix font spacing issues

(improves MI1 intro)

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/charset.cpp
    scummvm/trunk/engines/scumm/string.cpp

Modified: scummvm/trunk/engines/scumm/charset.cpp
===================================================================
--- scummvm/trunk/engines/scumm/charset.cpp	2010-10-18 23:40:36 UTC (rev 53596)
+++ scummvm/trunk/engines/scumm/charset.cpp	2010-10-18 23:54:35 UTC (rev 53597)
@@ -365,7 +365,7 @@
 int CharsetRendererCommon::getFontHeight() {
 	if (_vm->_useCJKMode) {
 		if (_vm->_game.platform == Common::kPlatformFMTowns) {
-			static const uint8 sjisFontHeightM1[] = { 0, 8, 10, 9, 10, 9, 10, 0, 0 };
+			static const uint8 sjisFontHeightM1[] = { 0, 8, 9, 8, 9, 8, 9, 0, 0, 0 };
 			static const uint8 sjisFontHeightM2[] = { 0, 8, 9, 9, 9, 8, 9, 9, 9, 8 };
 			static const uint8 sjisFontHeightI4[] = { 0, 8, 9, 9, 9, 8, 8, 8, 8, 8 };
 			const uint8 *htbl = (_vm->_game.id == GID_MONKEY) ? sjisFontHeightM1 : ((_vm->_game.id == GID_INDY4) ? sjisFontHeightI4 : sjisFontHeightM2);
@@ -381,7 +381,7 @@
 int CharsetRendererClassic::getCharWidth(uint16 chr) {
 	int spacing = 0;
 
-	if (_vm->_useCJKMode) {
+ 	if (_vm->_useCJKMode) {
 		if (_vm->_game.platform == Common::kPlatformFMTowns) {
 			if ((chr & 0x00ff) == 0x00fd) {
 				chr >>= 8;
@@ -394,8 +394,8 @@
 			if (spacing) {
 				if (_vm->_game.id == GID_MONKEY) {
 					spacing++;
-					if (_curId == 2)
-						spacing++;
+					//if (_curId == 2)
+					//	spacing++;
 				} else if (_vm->_game.id != GID_INDY4 && _curId == 1) {
 					spacing++;
 				}
@@ -669,7 +669,7 @@
 					if (_vm->_game.id == GID_MONKEY) {
 						_vm->_cjkFont->setShadowMode((_curId == 2 || _curId == 4 || _curId == 6) ? Graphics::FontSJIS::kShadowTypeOutline : Graphics::FontSJIS::kShadowTypeNone);
 					} else if (_vm->_game.id == GID_MONKEY2) {
-						_vm->_cjkFont->setShadowMode((_curId != 1 && _curId != 3 && _curId != 5) ? Graphics::FontSJIS::kShadowTypeOutline : Graphics::FontSJIS::kShadowTypeNone);
+						_vm->_cjkFont->setShadowMode((_curId != 1 && _curId != 5 && _curId != 9) ? Graphics::FontSJIS::kShadowTypeOutline : Graphics::FontSJIS::kShadowTypeNone);
 					} else if (_vm->_game.id == GID_INDY4) {
 						_vm->_cjkFont->setShadowMode((_curId == 2 || _curId == 3 || _curId == 4) ? Graphics::FontSJIS::kShadowTypeOutline : Graphics::FontSJIS::kShadowTypeNone);
 					}					

Modified: scummvm/trunk/engines/scumm/string.cpp
===================================================================
--- scummvm/trunk/engines/scumm/string.cpp	2010-10-18 23:40:36 UTC (rev 53596)
+++ scummvm/trunk/engines/scumm/string.cpp	2010-10-18 23:54:35 UTC (rev 53597)
@@ -601,7 +601,12 @@
 			} else if (!(_game.platform == Common::kPlatformFMTowns) && _string[0].height) {
 				_nextTop += _string[0].height;
 			} else {
+				bool useCJK = _useCJKMode;
+				// SCUMM5 FM-Towns doesn't use the height of the ROM font here.
+				if (_game.platform == Common::kPlatformFMTowns && _game.version == 5)
+					_useCJKMode = false;
 				_nextTop += _charset->getFontHeight();
+				_useCJKMode = useCJK;
 			}
 			if (_game.version > 3) {
 				// FIXME: is this really needed?


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