diff options
author | Shauren <shauren.trinity@gmail.com> | 2019-10-29 19:01:39 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2019-10-29 19:01:39 +0100 |
commit | c7b41574376c21eb37ed6d45dc4f1b3bf1b528c4 (patch) | |
tree | d14503fb201a38ea913627a7b00a8fd395e3a2a9 /dep/CascLib/src/CascCommon.h | |
parent | 4328e1dfb2ba0900e6a053622f16da1cd5debc9b (diff) |
Dep/CascLib: Update to ladislav-zezula/CascLib@225777494069b0b0e18bea3ffeb3773d44a70b30
Diffstat (limited to 'dep/CascLib/src/CascCommon.h')
-rw-r--r-- | dep/CascLib/src/CascCommon.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dep/CascLib/src/CascCommon.h b/dep/CascLib/src/CascCommon.h index a0caa5d85eb..7700c782cbf 100644 --- a/dep/CascLib/src/CascCommon.h +++ b/dep/CascLib/src/CascCommon.h @@ -86,6 +86,16 @@ typedef struct _CASC_TAG_ENTRY char TagName[1]; // Tag name. Variable length. } CASC_TAG_ENTRY, *PCASC_TAG_ENTRY; +// Information about index file +typedef struct _CASC_INDEX +{ + LPTSTR szFileName; // Full name of the index file + LPBYTE pbFileData; // Loaded content of the index file + size_t cbFileData; // Size of the index file + DWORD NewSubIndex; // New subindex + DWORD OldSubIndex; // Old subindex +} CASC_INDEX, *PCASC_INDEX; + // Normalized header of the index files. // Both version 1 and version 2 are converted to this structure typedef struct _CASC_INDEX_HEADER @@ -292,6 +302,8 @@ struct TCascStorage QUERY_KEY BuildFiles; // List of supported build files TFileStream * DataFiles[CASC_MAX_DATA_FILES]; // Array of open data files + CASC_INDEX IndexFiles[CASC_INDEX_COUNT]; // Array of found index files + CASC_MAP IndexEKeyMap; CASC_CKEY_ENTRY EncodingCKey; // Information about ENCODING file CASC_CKEY_ENTRY DownloadCKey; // Information about DOWNLOAD file @@ -317,6 +329,7 @@ struct TCascStorage CASC_ARRAY ExtraKeysList; // List additional encryption keys CASC_MAP EncryptionKeys; // Map of encryption keys + ULONGLONG LastFailKeyName; // The value of the encryption key that recently was NOT found. }; @@ -465,7 +478,10 @@ DWORD CascDecrypt(TCascStorage * hs, LPBYTE pbOutBuffer, PDWORD pcbOutBuffer, LP //----------------------------------------------------------------------------- // Support for index files +bool CopyEKeyEntry(TCascStorage * hs, PCASC_CKEY_ENTRY pCKeyEntry); + DWORD LoadIndexFiles(TCascStorage * hs); +void FreeIndexFiles(TCascStorage * hs); //----------------------------------------------------------------------------- // Support for ROOT file |