[Scummvm-cvs-logs] SF.net SVN: scummvm:[48751] scummvm/trunk/backends/platform/wii/osystem_gfx .cpp

dhewg at users.sourceforge.net dhewg at users.sourceforge.net
Tue Apr 20 20:24:14 CEST 2010


Revision: 48751
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48751&view=rev
Author:   dhewg
Date:     2010-04-20 18:24:14 +0000 (Tue, 20 Apr 2010)

Log Message:
-----------
Round up the game texture dimensions if the requested size is incompatible to the hardware.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/wii/osystem_gfx.cpp

Modified: scummvm/trunk/backends/platform/wii/osystem_gfx.cpp
===================================================================
--- scummvm/trunk/backends/platform/wii/osystem_gfx.cpp	2010-04-20 17:24:13 UTC (rev 48750)
+++ scummvm/trunk/backends/platform/wii/osystem_gfx.cpp	2010-04-20 18:24:14 UTC (rev 48751)
@@ -240,11 +240,24 @@
 	}
 #endif
 
-	if (_gameWidth != width || _gameHeight != height) {
-		assert((width <= 640) && (height <= 480));
+	uint newWidth, newHeight;
+	if (_pfGame.bytesPerPixel > 1) {
+		newWidth = ROUNDUP(width, 4);
+		newHeight = ROUNDUP(height, 4);
+	} else {
+		newWidth = ROUNDUP(width, 8);
+		newHeight = ROUNDUP(height, 4);
+	}
 
-		_gameWidth = width;
-		_gameHeight = height;
+	if (_gameWidth != newWidth || _gameHeight != newHeight) {
+		assert((newWidth <= 640) && (newHeight <= 480));
+
+		if (width != newWidth || height != newHeight)
+			printf("extending texture for compability: %ux%u -> %ux%u\n",
+					width, height, newWidth, newHeight);
+
+		_gameWidth = newWidth;
+		_gameHeight = newHeight;
 		update = true;
 	}
 


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