[Scummvm-cvs-logs] SF.net SVN: scummvm:[39475] scummvm/trunk/engines/sword1/screen.cpp

Hkz at users.sourceforge.net Hkz at users.sourceforge.net
Tue Mar 17 08:46:05 CET 2009


Revision: 39475
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39475&view=rev
Author:   Hkz
Date:     2009-03-17 07:46:04 +0000 (Tue, 17 Mar 2009)

Log Message:
-----------
sword1: enable psx background caching for screen 54 (bull's head) too

Modified Paths:
--------------
    scummvm/trunk/engines/sword1/screen.cpp

Modified: scummvm/trunk/engines/sword1/screen.cpp
===================================================================
--- scummvm/trunk/engines/sword1/screen.cpp	2009-03-17 07:02:14 UTC (rev 39474)
+++ scummvm/trunk/engines/sword1/screen.cpp	2009-03-17 07:46:04 UTC (rev 39475)
@@ -372,11 +372,11 @@
 			renderParallax(_parallax[0]);
 		uint8 *src = _layerBlocks[0];
 		uint8 *dest = _screenBuf;
-		uint8 *indxScreen = NULL;
 
 		if(SwordEngine::isPsx()) {
-			indxScreen = psxShrinkedBackgroundToIndexed(_layerBlocks[0], _scrnSizeX, _scrnSizeY);
-			src = indxScreen;
+			if (!_psxCache.decodedBackground)
+				_psxCache.decodedBackground = psxShrinkedBackgroundToIndexed(_layerBlocks[0], _scrnSizeX, _scrnSizeY);
+			src = _psxCache.decodedBackground;
 		}
 
 		for (uint16 cnty = 0; cnty < _scrnSizeY; cnty++)
@@ -388,8 +388,6 @@
 				src++;
 			}
 
-		free(indxScreen);
-
 	} else if (!(SwordEngine::isPsx())) {
 		memcpy(_screenBuf, _layerBlocks[0], _scrnSizeX * _scrnSizeY);
 	} else { //We are using PSX version


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