aboutsummaryrefslogtreecommitdiff
path: root/src/StormLib.h
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2020-10-24 08:19:07 +0200
committerLadislav Zezula <zezula@volny.cz>2020-10-24 08:19:07 +0200
commit51d49e2e167ecf835040f6bbda41579685d89e94 (patch)
treefabd66434e694553b44c13c272ed33d64a82a1a5 /src/StormLib.h
parent7e4f377e0b45c737f26309ae602addc05c9b6b30 (diff)
TBitArray made private
Diffstat (limited to 'src/StormLib.h')
-rw-r--r--src/StormLib.h68
1 files changed, 28 insertions, 40 deletions
diff --git a/src/StormLib.h b/src/StormLib.h
index 81f8c59..62a8f37 100644
--- a/src/StormLib.h
+++ b/src/StormLib.h
@@ -479,20 +479,8 @@ typedef void (WINAPI * SFILE_DOWNLOAD_CALLBACK)(void * pvUserData, ULONGLONG Byt
typedef void (WINAPI * SFILE_ADDFILE_CALLBACK)(void * pvUserData, DWORD dwBytesWritten, DWORD dwTotalBytes, bool bFinalCall);
typedef void (WINAPI * SFILE_COMPACT_CALLBACK)(void * pvUserData, DWORD dwWorkType, ULONGLONG BytesProcessed, ULONGLONG TotalBytes);
-typedef struct TFileStream TFileStream;
-
-//-----------------------------------------------------------------------------
-// Structure for bit arrays used for HET and BET tables
-
-typedef struct _TBitArray
-{
- DWORD NumberOfBytes; // Total number of bytes in "Elements"
- DWORD NumberOfBits; // Total number of bits that are available
- BYTE Elements[1]; // Array of elements (variable length)
-} TBitArray;
-
-void GetBits(TBitArray * array, unsigned int nBitPosition, unsigned int nBitLength, void * pvBuffer, int nResultSize);
-void SetBits(TBitArray * array, unsigned int nBitPosition, unsigned int nBitLength, void * pvBuffer, int nResultSize);
+struct TFileStream;
+struct TBitArray;
//-----------------------------------------------------------------------------
// Structures related to MPQ format
@@ -719,14 +707,14 @@ typedef struct _TMPQHetHeader
{
TMPQExtHeader ExtHdr;
- DWORD dwTableSize; // Size of the entire HET table, including HET_TABLE_HEADER (in bytes)
- DWORD dwEntryCount; // Number of occupied entries in the HET table
- DWORD dwTotalCount; // Total number of entries in the HET table
- DWORD dwNameHashBitSize; // Size of the name hash entry (in bits)
- DWORD dwIndexSizeTotal; // Total size of file index (in bits)
- DWORD dwIndexSizeExtra; // Extra bits in the file index
- DWORD dwIndexSize; // Effective size of the file index (in bits)
- DWORD dwIndexTableSize; // Size of the block index subtable (in bytes)
+ DWORD dwTableSize; // Size of the entire HET table, including HET_TABLE_HEADER (in bytes)
+ DWORD dwEntryCount; // Number of occupied entries in the HET table
+ DWORD dwTotalCount; // Total number of entries in the HET table
+ DWORD dwNameHashBitSize; // Size of the name hash entry (in bits)
+ DWORD dwIndexSizeTotal; // Total size of file index (in bits)
+ DWORD dwIndexSizeExtra; // Extra bits in the file index
+ DWORD dwIndexSize; // Effective size of the file index (in bits)
+ DWORD dwIndexTableSize; // Size of the block index subtable (in bytes)
} TMPQHetHeader;
@@ -735,25 +723,25 @@ typedef struct _TMPQBetHeader
{
TMPQExtHeader ExtHdr;
- DWORD dwTableSize; // Size of the entire BET table, including the header (in bytes)
- DWORD dwEntryCount; // Number of entries in the BET table. Must match HET_TABLE_HEADER::dwEntryCount
+ DWORD dwTableSize; // Size of the entire BET table, including the header (in bytes)
+ DWORD dwEntryCount; // Number of entries in the BET table. Must match HET_TABLE_HEADER::dwEntryCount
DWORD dwUnknown08;
- DWORD dwTableEntrySize; // Size of one table entry (in bits)
- DWORD dwBitIndex_FilePos; // Bit index of the file position (within the entry record)
- DWORD dwBitIndex_FileSize; // Bit index of the file size (within the entry record)
- DWORD dwBitIndex_CmpSize; // Bit index of the compressed size (within the entry record)
- DWORD dwBitIndex_FlagIndex; // Bit index of the flag index (within the entry record)
- DWORD dwBitIndex_Unknown; // Bit index of the ??? (within the entry record)
- DWORD dwBitCount_FilePos; // Bit size of file position (in the entry record)
- DWORD dwBitCount_FileSize; // Bit size of file size (in the entry record)
- DWORD dwBitCount_CmpSize; // Bit size of compressed file size (in the entry record)
- DWORD dwBitCount_FlagIndex; // Bit size of flags index (in the entry record)
- DWORD dwBitCount_Unknown; // Bit size of ??? (in the entry record)
- DWORD dwBitTotal_NameHash2; // Total bit size of the NameHash2
- DWORD dwBitExtra_NameHash2; // Extra bits in the NameHash2
- DWORD dwBitCount_NameHash2; // Effective size of NameHash2 (in bits)
- DWORD dwNameHashArraySize; // Size of NameHash2 table, in bytes
- DWORD dwFlagCount; // Number of flags in the following array
+ DWORD dwTableEntrySize; // Size of one table entry (in bits)
+ DWORD dwBitIndex_FilePos; // Bit index of the file position (within the entry record)
+ DWORD dwBitIndex_FileSize; // Bit index of the file size (within the entry record)
+ DWORD dwBitIndex_CmpSize; // Bit index of the compressed size (within the entry record)
+ DWORD dwBitIndex_FlagIndex; // Bit index of the flag index (within the entry record)
+ DWORD dwBitIndex_Unknown; // Bit index of the ??? (within the entry record)
+ DWORD dwBitCount_FilePos; // Bit size of file position (in the entry record)
+ DWORD dwBitCount_FileSize; // Bit size of file size (in the entry record)
+ DWORD dwBitCount_CmpSize; // Bit size of compressed file size (in the entry record)
+ DWORD dwBitCount_FlagIndex; // Bit size of flags index (in the entry record)
+ DWORD dwBitCount_Unknown; // Bit size of ??? (in the entry record)
+ DWORD dwBitTotal_NameHash2; // Total bit size of the NameHash2
+ DWORD dwBitExtra_NameHash2; // Extra bits in the NameHash2
+ DWORD dwBitCount_NameHash2; // Effective size of NameHash2 (in bits)
+ DWORD dwNameHashArraySize; // Size of NameHash2 table, in bytes
+ DWORD dwFlagCount; // Number of flags in the following array
} TMPQBetHeader;