[Scummvm-cvs-logs] SF.net SVN: scummvm: [32602] scummvm/trunk/tools/create_drascula

sev at users.sourceforge.net sev at users.sourceforge.net
Sat Jun 7 22:40:59 CEST 2008


Revision: 32602
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32602&view=rev
Author:   sev
Date:     2008-06-07 13:40:59 -0700 (Sat, 07 Jun 2008)

Log Message:
-----------
Make .dat file a bit smaller.

Modified Paths:
--------------
    scummvm/trunk/tools/create_drascula/create_drascula.cpp
    scummvm/trunk/tools/create_drascula/create_drascula.h
    scummvm/trunk/tools/create_drascula/staticdata.h

Modified: scummvm/trunk/tools/create_drascula/create_drascula.cpp
===================================================================
--- scummvm/trunk/tools/create_drascula/create_drascula.cpp	2008-06-07 20:00:51 UTC (rev 32601)
+++ scummvm/trunk/tools/create_drascula/create_drascula.cpp	2008-06-07 20:40:59 UTC (rev 32602)
@@ -40,9 +40,6 @@
 
 #define DRASCULA_DAT_VER 1	// 1 byte
 
-typedef unsigned char   uint8;
-typedef unsigned short uint16;
-
 static void writeByte(FILE *fp, uint8 b) {
 	fwrite(&b, 1, 1, fp);
 }
@@ -66,9 +63,9 @@
 	// Write charmap
 	writeUint16BE(outFile, ARRAYSIZE(charMap));
 	for (i = 0; i < ARRAYSIZE(charMap); i++) {
-		writeUint16BE(outFile, charMap[i].inChar);
+		writeByte(outFile, charMap[i].inChar);
 		writeUint16BE(outFile, charMap[i].mappedChar);
-		writeUint16BE(outFile, charMap[i].charType);
+		writeByte(outFile, charMap[i].charType);
 	}
 
 	// Write item locations

Modified: scummvm/trunk/tools/create_drascula/create_drascula.h
===================================================================
--- scummvm/trunk/tools/create_drascula/create_drascula.h	2008-06-07 20:00:51 UTC (rev 32601)
+++ scummvm/trunk/tools/create_drascula/create_drascula.h	2008-06-07 20:40:59 UTC (rev 32602)
@@ -45,6 +45,9 @@
 #define NUM_TEXTMISC 3
 #define NUM_TEXTD1 11
 
+typedef unsigned char   uint8;
+typedef unsigned short uint16;
+
 enum Verbs {
 	kVerbDefault = -1,
 	kVerbLook = 1,
@@ -69,9 +72,9 @@
 };
 
 struct CharInfo {
-	int inChar;
-	int mappedChar;
-	int charType;	// 0 - letters, 1 - signs, 2 - accented
+	char inChar;
+	uint16 mappedChar;
+	char charType;	// 0 - letters, 1 - signs, 2 - accented
 };
 
 struct RoomUpdate {

Modified: scummvm/trunk/tools/create_drascula/staticdata.h
===================================================================
--- scummvm/trunk/tools/create_drascula/staticdata.h	2008-06-07 20:00:51 UTC (rev 32601)
+++ scummvm/trunk/tools/create_drascula/staticdata.h	2008-06-07 20:40:59 UTC (rev 32602)
@@ -44,7 +44,7 @@
 	{    'W', 213,   0 }, {    'X', 222,   0 },
 	{    'Y', 231,   0 }, {    'Z', 240,   0 },
 	// ---------------------------------------
-	{   0xa7, 250,   0 }, {    ' ', 250,   0 },
+	{ '\247', 250,   0 }, {    ' ', 250,   0 },
 	//               Signs
 	// ---------------------------------------
 	{    '.',   6,   1 }, {    ',',  15,   1 },


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