diff options
author | Eugene Sandulenko | 2008-06-07 20:40:59 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2008-06-07 20:40:59 +0000 |
commit | 9fc94f8cca3e3c70e2bf572c236a337d6cd3b1d8 (patch) | |
tree | 38abe6da37610a35a6d9fe692b9fe437057b6ab8 /tools | |
parent | 6225e8e416c4b7ccc0a5cfa0ba224119309f67f9 (diff) | |
download | scummvm-rg350-9fc94f8cca3e3c70e2bf572c236a337d6cd3b1d8.tar.gz scummvm-rg350-9fc94f8cca3e3c70e2bf572c236a337d6cd3b1d8.tar.bz2 scummvm-rg350-9fc94f8cca3e3c70e2bf572c236a337d6cd3b1d8.zip |
Make .dat file a bit smaller.
svn-id: r32602
Diffstat (limited to 'tools')
-rw-r--r-- | tools/create_drascula/create_drascula.cpp | 7 | ||||
-rw-r--r-- | tools/create_drascula/create_drascula.h | 9 | ||||
-rw-r--r-- | tools/create_drascula/staticdata.h | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/tools/create_drascula/create_drascula.cpp b/tools/create_drascula/create_drascula.cpp index c2c5b79132..118540db81 100644 --- a/tools/create_drascula/create_drascula.cpp +++ b/tools/create_drascula/create_drascula.cpp @@ -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 @@ int main(int argc, char *argv[]) { // 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 diff --git a/tools/create_drascula/create_drascula.h b/tools/create_drascula/create_drascula.h index 3ccda05a2c..ff1281cf0b 100644 --- a/tools/create_drascula/create_drascula.h +++ b/tools/create_drascula/create_drascula.h @@ -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 ItemLocation { }; 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 { diff --git a/tools/create_drascula/staticdata.h b/tools/create_drascula/staticdata.h index 2544b8c7e4..06ca11b419 100644 --- a/tools/create_drascula/staticdata.h +++ b/tools/create_drascula/staticdata.h @@ -44,7 +44,7 @@ const CharInfo charMap[] = { { '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 }, |