aboutsummaryrefslogtreecommitdiff
path: root/tools/create_kyradat
diff options
context:
space:
mode:
authorFlorian Kagerer2009-02-15 14:49:01 +0000
committerFlorian Kagerer2009-02-15 14:49:01 +0000
commitdee51a77b57bcebcb20bb14a8fe1314b9e194a55 (patch)
treeb7ab4d15bbfac4c1a266560dce23f5cf0e296086 /tools/create_kyradat
parent9daed50e0165f387f597fec4d06b57805e1f717c (diff)
downloadscummvm-rg350-dee51a77b57bcebcb20bb14a8fe1314b9e194a55.tar.gz
scummvm-rg350-dee51a77b57bcebcb20bb14a8fe1314b9e194a55.tar.bz2
scummvm-rg350-dee51a77b57bcebcb20bb14a8fe1314b9e194a55.zip
LOL: fix bug in kyra.dat
svn-id: r38246
Diffstat (limited to 'tools/create_kyradat')
-rw-r--r--tools/create_kyradat/create_kyradat.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp
index 26d8bf7984..3b1b43a2b1 100644
--- a/tools/create_kyradat/create_kyradat.cpp
+++ b/tools/create_kyradat/create_kyradat.cpp
@@ -31,7 +31,7 @@
#include "md5.h"
enum {
- kKyraDatVersion = 37,
+ kKyraDatVersion = 38,
kIndexSize = 12
};
@@ -1074,7 +1074,7 @@ bool extractRaw16(PAKFile &out, const Game *g, const byte *data, const uint32 si
const uint8 *src = data;
uint8 *dst = buffer;
- for (uint i = 0; i < (size >> 1); i++) {
+ for (uint32 i = 0; i < (size >> 1); i++) {
WRITE_BE_UINT16(dst, READ_LE_UINT16(src));
src += 2;
dst += 2;
@@ -1086,6 +1086,7 @@ bool extractRaw16(PAKFile &out, const Game *g, const byte *data, const uint32 si
bool extractLolButtonDefs(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) {
int num = size / 22;
uint8 *buffer = new uint8[size];
+ uint32 outsize = num * 18;
const uint8 *src = data;
uint8 *dst = buffer;
@@ -1110,7 +1111,7 @@ bool extractLolButtonDefs(PAKFile &out, const Game *g, const byte *data, const u
src += 2; dst += 2;
}
- return out.addFile(filename, buffer, size);
+ return out.addFile(filename, buffer, outsize);
}
bool extractMrShapeAnimData(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) {