diff options
author | Simon Howard | 2008-05-02 17:32:09 +0000 |
---|---|---|
committer | Simon Howard | 2008-05-02 17:32:09 +0000 |
commit | 6b1ac97d99599ed5e8d8557313237f3ebb102ead (patch) | |
tree | ad70f70e87671fbf17ffa379de843dc3c4bc2b63 /src/w_checksum.c | |
parent | 05ad516a0cc829416b270f7c49aba579171a6da7 (diff) | |
download | chocolate-doom-6b1ac97d99599ed5e8d8557313237f3ebb102ead.tar.gz chocolate-doom-6b1ac97d99599ed5e8d8557313237f3ebb102ead.tar.bz2 chocolate-doom-6b1ac97d99599ed5e8d8557313237f3ebb102ead.zip |
Add WAD I/O abstraction layer - first step for mmapped WAD access.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1133
Diffstat (limited to 'src/w_checksum.c')
-rw-r--r-- | src/w_checksum.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/w_checksum.c b/src/w_checksum.c index 339c4eb9..ceda95d8 100644 --- a/src/w_checksum.c +++ b/src/w_checksum.c @@ -31,10 +31,10 @@ #include "w_checksum.h" #include "w_wad.h" -static FILE **open_wadfiles = NULL; +static wad_file_t **open_wadfiles = NULL; static int num_open_wadfiles = 0; -static int GetFileNumber(FILE *handle) +static int GetFileNumber(wad_file_t *handle) { int i; int result; @@ -51,7 +51,7 @@ static int GetFileNumber(FILE *handle) // Allocate another slot for this file. open_wadfiles = realloc(open_wadfiles, - sizeof(FILE *) * (num_open_wadfiles + 1)); + sizeof(wad_file_t *) * (num_open_wadfiles + 1)); open_wadfiles[num_open_wadfiles] = handle; result = num_open_wadfiles; @@ -67,7 +67,7 @@ static void ChecksumAddLump(md5_context_t *md5_context, lumpinfo_t *lump) strncpy(buf, lump->name, 8); buf[8] = '\0'; MD5_UpdateString(md5_context, buf); - MD5_UpdateInt32(md5_context, GetFileNumber(lump->handle)); + MD5_UpdateInt32(md5_context, GetFileNumber(lump->wad_file)); MD5_UpdateInt32(md5_context, lump->position); MD5_UpdateInt32(md5_context, lump->size); } |