[Scummvm-cvs-logs] SF.net SVN: scummvm:[33087] scummvm/trunk/engines/cine

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Thu Jul 17 09:13:42 CEST 2008


Revision: 33087
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33087&view=rev
Author:   buddha_
Date:     2008-07-17 07:13:41 +0000 (Thu, 17 Jul 2008)

Log Message:
-----------
Patch #2019455: Patch for reducing the BSS size of Cine engine.

Modified Paths:
--------------
    scummvm/trunk/engines/cine/cine.h
    scummvm/trunk/engines/cine/gfx.cpp
    scummvm/trunk/engines/cine/texte.cpp
    scummvm/trunk/engines/cine/texte.h

Modified: scummvm/trunk/engines/cine/cine.h
===================================================================
--- scummvm/trunk/engines/cine/cine.h	2008-07-17 00:38:11 UTC (rev 33086)
+++ scummvm/trunk/engines/cine/cine.h	2008-07-17 07:13:41 UTC (rev 33087)
@@ -94,6 +94,7 @@
 
 	Common::StringList _volumeResourceFiles;
 	StringPtrHashMap _volumeEntriesMap;
+	TextHandler _textHandler;
 
 private:
 	void initialize(void);

Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp	2008-07-17 00:38:11 UTC (rev 33086)
+++ scummvm/trunk/engines/cine/gfx.cpp	2008-07-17 07:13:41 UTC (rev 33087)
@@ -337,7 +337,7 @@
 		x += 5;
 	} else if ((width = fontParamTable[(unsigned char)character].characterWidth)) {
 		idx = fontParamTable[(unsigned char)character].characterIdx;
-		drawSpriteRaw(textTable[idx][0], textTable[idx][1], 16, 8, _backBuffer, x, y);
+		drawSpriteRaw(g_cine->_textHandler.textTable[idx][0], g_cine->_textHandler.textTable[idx][1], 16, 8, _backBuffer, x, y);
 		x += width + 1;
 	}
 
@@ -938,7 +938,7 @@
 		x += 5;
 	} else if ((width = fontParamTable[(unsigned char)character].characterWidth)) {
 		idx = fontParamTable[(unsigned char)character].characterIdx;
-		drawSpriteRaw2(textTable[idx][0], 0, 16, 8, _backBuffer, x, y);
+		drawSpriteRaw2(g_cine->_textHandler.textTable[idx][0], 0, 16, 8, _backBuffer, x, y);
 		x += width + 1;
 	}
 

Modified: scummvm/trunk/engines/cine/texte.cpp
===================================================================
--- scummvm/trunk/engines/cine/texte.cpp	2008-07-17 00:38:11 UTC (rev 33086)
+++ scummvm/trunk/engines/cine/texte.cpp	2008-07-17 07:13:41 UTC (rev 33087)
@@ -31,8 +31,6 @@
 
 byte *textDataPtr;
 
-byte textTable[256][2][16 * 8];
-
 const char **failureMessages;
 const CommandeType *defaultActionCommand;
 const CommandeType *systemMenu;
@@ -77,14 +75,14 @@
 		loadRelatedPalette(pFileName);
 
 		for (i = 0; i < numCharacters; i++) {
-			gfxConvertSpriteToRaw(textTable[i][0], tempBuffer, 16, 8);
-			generateMask(textTable[i][0], textTable[i][1], 16 * 8, 0);
+			gfxConvertSpriteToRaw(g_cine->_textHandler.textTable[i][0], tempBuffer, 16, 8);
+			generateMask(g_cine->_textHandler.textTable[i][0], g_cine->_textHandler.textTable[i][1], 16 * 8, 0);
 			tempBuffer += dataSize;
 		}
 	} else {
 		for (i = 0; i < 90; i++) {
-			gfxConvertSpriteToRaw(textTable[i][0], tempBuffer, 8, 8);
-			generateMask(textTable[i][0], textTable[i][1], 8 * 8, 0);
+			gfxConvertSpriteToRaw(g_cine->_textHandler.textTable[i][0], tempBuffer, 8, 8);
+			generateMask(g_cine->_textHandler.textTable[i][0], g_cine->_textHandler.textTable[i][1], 8 * 8, 0);
 			tempBuffer += 0x40;
 		}
 	}

Modified: scummvm/trunk/engines/cine/texte.h
===================================================================
--- scummvm/trunk/engines/cine/texte.h	2008-07-17 00:38:11 UTC (rev 33086)
+++ scummvm/trunk/engines/cine/texte.h	2008-07-17 07:13:41 UTC (rev 33087)
@@ -34,8 +34,11 @@
 typedef char CommandeType[20];
 
 extern byte *textDataPtr;
-extern byte textTable[256][2][16 * 8];
 
+struct TextHandler {
+	byte textTable[256][2][16 * 8];
+};
+
 extern const char **failureMessages;
 extern const CommandeType *defaultActionCommand;
 extern const CommandeType *systemMenu;


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