[Scummvm-cvs-logs] scummvm master -> adf6c8f09eab48f9268b9e96c1e546ea550fa810

dhewg dhewg at wiibrew.org
Sun Feb 20 12:11:29 CET 2011


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
33f3c1bc98 NEWS: Mention merged GSoC tasks
cc129d94ca NEWS: Mention Wii fix from 50129178
9d7548b2a1 NEWS: Mention recent android fixes
adf6c8f09e SCUMM: More DISABLE_TOWNS_DUAL_LAYER_MODE mess


Commit: 33f3c1bc98ad39fa1b3a394570ca0b92d16fcb1e
    https://github.com/scummvm/scummvm/commit/33f3c1bc98ad39fa1b3a394570ca0b92d16fcb1e
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-02-20T03:09:45-08:00

Commit Message:
NEWS: Mention merged GSoC tasks

Changed paths:
    NEWS



diff --git a/NEWS b/NEWS
index 106ec6f..f05f237 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
    - Added support for Toonstruck.
 
  General
+   - Added support for loadable modules on platforms without a dynamic loader.
+     (GSoC Task)
    - Added Danish translation.
    - Added Norwegian Bokmaal translation.
    - Added Norwegian Nynorsk translation.
@@ -89,11 +91,22 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
    - Corrected memory leaks and minor issues.
 
  SDL:
+   - Added support for OpenGL. (GSoC Task)
    - Closed memory leaks in Mouse Surfaces.
 
- PSP:
+ PSP port:
+   - Added support for loadable modules.
    - Added image viewer.
 
+ PS2 port:
+   - Added support for loadable modules.
+
+ Nintendo DS port:
+   - Added support for loadable modules.
+
+ Wii/GameCube port:
+   - Added support for loadable modules.
+
 1.2.1 (2010-12-19)
  General
    - Add Hungarian translation.


Commit: cc129d94ca5b52f5a69ae76c81aff2286d389ae2
    https://github.com/scummvm/scummvm/commit/cc129d94ca5b52f5a69ae76c81aff2286d389ae2
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-02-20T03:09:51-08:00

Commit Message:
NEWS: Mention Wii fix from 50129178

Changed paths:
    NEWS



diff --git a/NEWS b/NEWS
index f05f237..5ceb96f 100644
--- a/NEWS
+++ b/NEWS
@@ -106,6 +106,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
 
  Wii/GameCube port:
    - Added support for loadable modules.
+   - Fixed 16bit mouse cursors on HE games.
 
 1.2.1 (2010-12-19)
  General


Commit: 9d7548b2a1eceafbed4db0153d43cee6ed5af9b2
    https://github.com/scummvm/scummvm/commit/9d7548b2a1eceafbed4db0153d43cee6ed5af9b2
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-02-20T03:09:56-08:00

Commit Message:
NEWS: Mention recent android fixes

Changed paths:
    NEWS



diff --git a/NEWS b/NEWS
index 5ceb96f..09a99ff 100644
--- a/NEWS
+++ b/NEWS
@@ -108,6 +108,11 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
    - Added support for loadable modules.
    - Fixed 16bit mouse cursors on HE games.
 
+ Android port:
+   - Switched to the official NDK toolchain for building.
+   - Fixed GFX output for various devices.
+   - Fixed various crashes.
+
 1.2.1 (2010-12-19)
  General
    - Add Hungarian translation.


Commit: adf6c8f09eab48f9268b9e96c1e546ea550fa810
    https://github.com/scummvm/scummvm/commit/adf6c8f09eab48f9268b9e96c1e546ea550fa810
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-02-20T03:09:58-08:00

Commit Message:
SCUMM: More DISABLE_TOWNS_DUAL_LAYER_MODE mess

Uglify more code to fix compilation for DS
Only compile-tested

Changed paths:
    engines/scumm/charset.cpp
    engines/scumm/scumm.cpp



diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index d5bcd8f..861e448 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -54,13 +54,14 @@ void ScummEngine::loadCJKFont() {
 	if (_game.version <= 5 && _game.platform == Common::kPlatformFMTowns && _language == Common::JA_JPN) { // FM-TOWNS v3 / v5 Kanji
 #ifdef DISABLE_TOWNS_DUAL_LAYER_MODE
 		error("FM-Towns Kanji font drawing requires dual graphics layer support which is disabled in this build");
-#endif
+#else
 		// use FM-TOWNS font rom, since game files don't have kanji font resources
 		_cjkFont = Graphics::FontSJIS::createFont(Common::kPlatformFMTowns);
 		if (!_cjkFont)
 			error("SCUMM::Font: Could not open file 'FMT_FNT.ROM'");
 		_textSurfaceMultiplier = 2;
 		_useCJKMode = true;
+#endif
 	} else if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine && _language == Common::JA_JPN) {
 		int numChar = 3418;
 		_2byteWidth = 12;
@@ -689,10 +690,12 @@ void CharsetRendererCommon::enableShadow(bool enable) {
 			_shadowMode = kNormalShadowMode;
 		}
 	} else {
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 		if (_vm->_cjkFont) {
 			_vm->_cjkFont->setDrawingMode(Graphics::FontSJIS::kDefaultMode);
 			_vm->_cjkFont->toggleFlippedMode(false);
 		}
+#endif
 		_shadowMode = kNoShadowMode;
 	}
 }
@@ -719,6 +722,7 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
 	if (chr == '@')
 		return;
 
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 	if (_vm->_useCJKMode && chr > 127) {
 		if (_vm->_game.platform == Common::kPlatformFMTowns) {
 			charPtr = 0;
@@ -729,7 +733,9 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
 			height = _vm->_2byteHeight;
 			charPtr = _vm->get2byteCharPtr(chr);
 		}
-	} else {
+	} else
+#endif
+	{
 		charPtr = _fontPtr + chr * 8;
 		width = getCharWidth(chr);
 		height = 8;
@@ -772,14 +778,18 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
 		dst = vs->getPixels(_left, drawTop);
 		if (charPtr)
 			drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight, vs->bytesPerPixel);
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 		else if (_vm->_cjkFont)
 			_vm->_cjkFont->drawChar(vs, chr, _left, drawTop, _color, _shadowColor);
+#endif
 	} else {
 		dst = (byte *)_vm->_textSurface.getBasePtr(_left * _vm->_textSurfaceMultiplier, _top * _vm->_textSurfaceMultiplier);
 		if (charPtr)
 			drawBits1(_vm->_textSurface, dst, charPtr, drawTop, origWidth, origHeight, _vm->_textSurface.bytesPerPixel, (_vm->_textSurfaceMultiplier == 2 && !is2byte));
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 		else if (_vm->_cjkFont)
 			_vm->_cjkFont->drawChar(_vm->_textSurface, chr, _left * _vm->_textSurfaceMultiplier, _top * _vm->_textSurfaceMultiplier, _color, _shadowColor);
+#endif
 		if (is2byte)
 			origWidth /= _vm->_textSurfaceMultiplier;
 	}
@@ -805,10 +815,14 @@ void CharsetRendererV3::drawChar(int chr, Graphics::Surface &s, int x, int y) {
 	int width, height;
 	int is2byte = (chr >= 0x80 && _vm->_useCJKMode) ? 1 : 0;
 	if (is2byte) {
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 		if (_vm->_game.platform == Common::kPlatformFMTowns) {
 			_vm->_cjkFont->drawChar(s, chr, x * _vm->_textSurfaceMultiplier, y * _vm->_textSurfaceMultiplier, _color, _shadowColor);
 			return;
-		} else {
+		}
+		else
+#endif
+		{
 			charPtr = _vm->get2byteCharPtr(chr);
 			width = _vm->_2byteWidth;
 			height = _vm->_2byteHeight;
@@ -922,9 +936,7 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
 
 		origHeight = height = getFontHeight();
 		offsX = offsY = 0;
-	} else
-#endif	
-	if (_vm->_useCJKMode && (chr >= 128) && !noSjis) {
+	} else if (_vm->_useCJKMode && (chr >= 128) && !noSjis) {
 		enableShadow(true);
 		origWidth = width = _vm->_2byteWidth;
 		origHeight = height = _vm->_2byteHeight;
@@ -934,7 +946,9 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
 			width++;
 			height++;
 		}
-	} else {
+	} else
+#endif	
+	{
 		uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
 		assert(charOffs < 0x14000);
 		if (!charOffs)
@@ -1076,9 +1090,12 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr,
 			drawTop = _top - _vm->_screenTop;
 		}
 
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 		if (!charPtr && _vm->_cjkFont) {
 			_vm->_cjkFont->drawChar(dstSurface, _vm->_cjkChar, _left * _vm->_textSurfaceMultiplier, (_top - _vm->_screenTop) * _vm->_textSurfaceMultiplier, _vm->_townsCharsetColorMap[1], _shadowColor);
-		} else if (is2byte) {
+		} else
+#endif
+		if (is2byte) {
 			drawBits1(dstSurface, dstPtr, charPtr, drawTop, origWidth, origHeight, dstSurface.bytesPerPixel);
 		} else {
 			drawBitsN(dstSurface, dstPtr, charPtr, *_fontPtr, drawTop, origWidth, origHeight, _vm->_textSurfaceMultiplier == 2);
@@ -1129,10 +1146,13 @@ void CharsetRendererClassic::drawChar(int chr, Graphics::Surface &s, int x, int
 
 	if (is2byte) {
 		enableShadow(true);
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 		if (_vm->_game.platform == Common::kPlatformFMTowns) {
 			_vm->_cjkFont->drawChar(s, chr, x * _vm->_textSurfaceMultiplier, y * _vm->_textSurfaceMultiplier, _color, _shadowColor);
 			return;
-		} else {
+		} else
+#endif
+		{
 			charPtr = _vm->get2byteCharPtr(chr);
 			width = _vm->_2byteWidth;
 			height = _vm->_2byteHeight;
@@ -1170,7 +1190,6 @@ void CharsetRendererClassic::drawBitsN(const Graphics::Surface &s, byte *dst, co
 	int color;
 	byte numbits, bits;
 
-	byte *dst2 = dst;
 	int pitch = s.pitch - width;
 
 	assert(bpp == 1 || bpp == 2 || bpp == 4 || bpp == 8);
@@ -1179,6 +1198,8 @@ void CharsetRendererClassic::drawBitsN(const Graphics::Surface &s, byte *dst, co
 	byte *cmap = _vm->_charsetColorMap;
 
 #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+	byte *dst2 = dst;
+
 	if (_vm->_game.platform == Common::kPlatformFMTowns)
 		cmap = _vm->_townsCharsetColorMap;
 	if (scale2x) {
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 83df53d..c2556d6 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -284,9 +284,9 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
 	_16BitPalette = NULL;
 #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 	_townsScreen = 0;
-#endif
 	_cjkFont = 0;
 	_cjkChar = 0;
+#endif
 	_shadowPalette = NULL;
 	_shadowPaletteSize = 0;
 	memset(_currentPalette, 0, sizeof(_currentPalette));
@@ -637,8 +637,8 @@ ScummEngine::~ScummEngine() {
 
 #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
 	delete _townsScreen;
-#endif
 	delete _cjkFont;
+#endif
 
 	delete _debugger;
 






More information about the Scummvm-git-logs mailing list