Mercurial > hg > dmlib
diff src/dmpack.h @ 1037:d674ddc0fc82
Change PACK file format to use 64 bit fileoffsets. Also switch some
fields around for nicety. This breaks compatibility, so bump version.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 01 Mar 2015 16:59:00 +0200 |
parents | 2e9ba01294b3 |
children | 0115b3dd9064 |
line wrap: on
line diff
--- a/src/dmpack.h Sun Mar 01 16:57:50 2015 +0200 +++ b/src/dmpack.h Sun Mar 01 16:59:00 2015 +0200 @@ -10,17 +10,18 @@ #define DPACK_IDENT "TNSPDPCK" // Magic ident -#define DPACK_VERSION (0x0120) // Version +#define DPACK_VERSION (0x0200) // Version typedef struct _DMPackEntry { - Uint32 size; // Size (UNCOMPRESSED) - Uint32 offset; // Offset in pack file - Uint32 length; // (Compressed) data length char filename[DMRES_NAME_LEN + 1]; // +1 for NUL byte + Uint64 offset; // Offset in pack file + Uint32 length; // Compressed data length + Uint32 size; // Size of UNCOMPRESSED data + Uint32 flags; // Stored flags, see DMF_* in dmres.h - Uint32 flags, privFlags; + Uint32 privFlags; // PrivFlags are not stored struct _DMPackEntry *next, *prev; } DMPackEntry; @@ -38,7 +39,7 @@ char ident[8]; // Magic identifier Uint16 version; // Version Uint32 dirEntries; // Number of entries - Uint32 dirOffset; // Offset of the directory + Uint64 dirOffset; // Offset of the directory } DMPackFileHeader;