[Scummvm-cvs-logs] SF.net SVN: scummvm: [20853] scummvm/trunk/engines/cine
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Feb 24 16:34:04 CET 2006
Revision: 20853
Author: fingolfin
Date: 2006-02-24 16:33:12 -0800 (Fri, 24 Feb 2006)
ViewCVS: http://svn.sourceforge.net/scummvm?rev=20853&view=rev
Log Message:
-----------
Use static/const on data tables when possible (this helps the compiler to optimize things better)
Modified Paths:
--------------
scummvm/trunk/engines/cine/auto00.cpp
scummvm/trunk/engines/cine/auto00.h
scummvm/trunk/engines/cine/font.cpp
scummvm/trunk/engines/cine/font.h
scummvm/trunk/engines/cine/part.cpp
scummvm/trunk/engines/cine/prc.cpp
Modified: scummvm/trunk/engines/cine/auto00.cpp
===================================================================
--- scummvm/trunk/engines/cine/auto00.cpp 2006-02-25 00:28:30 UTC (rev 20852)
+++ scummvm/trunk/engines/cine/auto00.cpp 2006-02-25 00:33:12 UTC (rev 20853)
@@ -22,9 +22,11 @@
*
*/
+#include "cine/auto00.h"
+
namespace Cine {
-unsigned char AUT000[] = {
+const unsigned char AUT000[] = {
0x00, 0x32, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Modified: scummvm/trunk/engines/cine/auto00.h
===================================================================
--- scummvm/trunk/engines/cine/auto00.h 2006-02-25 00:28:30 UTC (rev 20852)
+++ scummvm/trunk/engines/cine/auto00.h 2006-02-25 00:33:12 UTC (rev 20853)
@@ -27,7 +27,7 @@
namespace Cine {
-extern unsigned char AUT000[];
+extern const unsigned char AUT000[];
#define AUT000_size sizeof(AUT000);
Modified: scummvm/trunk/engines/cine/font.cpp
===================================================================
--- scummvm/trunk/engines/cine/font.cpp 2006-02-25 00:28:30 UTC (rev 20852)
+++ scummvm/trunk/engines/cine/font.cpp 2006-02-25 00:33:12 UTC (rev 20853)
@@ -26,7 +26,7 @@
namespace Cine {
-characterEntry fontParamTable[256] = {
+const characterEntry fontParamTable[256] = {
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},
{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},
Modified: scummvm/trunk/engines/cine/font.h
===================================================================
--- scummvm/trunk/engines/cine/font.h 2006-02-25 00:28:30 UTC (rev 20852)
+++ scummvm/trunk/engines/cine/font.h 2006-02-25 00:33:12 UTC (rev 20853)
@@ -32,10 +32,8 @@
uint8 characterWidth;
};
-typedef struct characterEntry characterEntry;
+extern const characterEntry fontParamTable[256];
-extern characterEntry fontParamTable[256];
-
} // End of namespace Cine
#endif
Modified: scummvm/trunk/engines/cine/part.cpp
===================================================================
--- scummvm/trunk/engines/cine/part.cpp 2006-02-25 00:28:30 UTC (rev 20852)
+++ scummvm/trunk/engines/cine/part.cpp 2006-02-25 00:33:12 UTC (rev 20853)
@@ -103,7 +103,7 @@
void closePart(void) {
}
-const char *bundleNames[] = {
+static const char *bundleNames[] = {
"EGOUBASE",
"LABYBASE",
"PROCEGOU",
Modified: scummvm/trunk/engines/cine/prc.cpp
===================================================================
--- scummvm/trunk/engines/cine/prc.cpp 2006-02-25 00:28:30 UTC (rev 20852)
+++ scummvm/trunk/engines/cine/prc.cpp 2006-02-25 00:33:12 UTC (rev 20853)
@@ -73,7 +73,7 @@
checkDataDisk(-1);
if ((gameType == Cine::GID_FW) && (!strcmp(pPrcName, "AUTO00.PRC"))) {
- unsigned char *readPtr = AUT000;
+ const unsigned char *readPtr = AUT000;
processPendingUpdates(1);
More information about the Scummvm-git-logs
mailing list