1083 LPBYTE pbRootFileEnd = pbRootFile + cbRootFile;
1085 DWORD dwTotalFileCount;
1086 DWORD cbPackagesDat = 0;
1091 if(pRootHandler ==
NULL)
1108 if(dwTotalFileCount == 0)
1139 for(
size_t i = 0; i < dwRootEntries; i++)
1145 if(pbRootFile !=
NULL)
1159 pbPackagesDat =
LoadFileToMemory(hs,
"Base\\Data_D3\\PC\\Misc\\Packages.dat", &cbPackagesDat);
1160 if(pbPackagesDat !=
NULL)
1162 pPackageMap =
CreatePackageMap(pbPackagesDat, pbPackagesDat + cbPackagesDat);
1172 DWORD cbCoreTOC = 0;
1176 if(pbCoreTOC !=
NULL)
1178 ParseCoreTOC(pRootHandler, pPackageMap, pbCoreTOC, pbCoreTOC + cbCoreTOC);
1184 if(pPackageMap !=
NULL)
1186 if(pbPackagesDat !=
NULL)
TRootHandler * pRootHandler
Definition: CascCommon.h:223
DYNAMIC_ARRAY FileTable
Definition: CascRootFile_Diablo3.cpp:149
static PCASC_MAP CreatePackageMap(LPBYTE pbPackagesDat, LPBYTE pbPackagesEnd)
Definition: CascRootFile_Diablo3.cpp:380
#define CASC_ALLOC(type, count)
Definition: CascCommon.h:302
unsigned long long ULONGLONG
Definition: CascPort.h:144
static DWORD ScanDirectoryFile(TCascStorage *hs, LPBYTE pbRootFile, LPBYTE pbFileEnd)
Definition: CascRootFile_Diablo3.cpp:756
static LPBYTE D3Handler_GetKey(TRootHandler_Diablo3 *pRootHandler, const char *szFileName)
Definition: CascRootFile_Diablo3.cpp:985
PCASC_MAP Map_Create(DWORD dwMaxItems, DWORD dwKeyLength, DWORD dwKeyOffset)
Definition: Map.cpp:93
LPBYTE(* ROOT_SEARCH)(struct TRootHandler *pRootHandler, struct _TCascSearch *pSearch, PDWORD PtrFileSize, PDWORD PtrLocaleFlags)
Definition: RootHandler.h:36
#define Array_Create(pArray, type, ItemCountMax)
Definition: DynamicArray.h:35
#define CASC_EXTRA_FILES
Definition: CascCommon.h:53
DWORD dwRootFlags
Definition: RootHandler.h:75
#define ERROR_NOT_ENOUGH_MEMORY
Definition: CascPort.h:208
void Map_Free(PCASC_MAP pMap)
Definition: Map.cpp:279
ROOT_GETKEY GetKey
Definition: RootHandler.h:71
ROOT_INSERT Insert
Definition: RootHandler.h:68
void(* ROOT_ENDSEARCH)(struct TRootHandler *pRootHandler, struct _TCascSearch *pSearch)
Definition: RootHandler.h:43
#define ERROR_FILE_CORRUPT
Definition: CascPort.h:218
#define ROOT_FLAG_HAS_NAMES
Definition: RootHandler.h:21
Definition: CascRootFile_Diablo3.cpp:130
arena_t NULL
Definition: jemalloc_internal.h:624
LPBYTE(* ROOT_GETKEY)(struct TRootHandler *pRootHandler, const char *szFileName)
Definition: RootHandler.h:48
#define DIABLO3_MAX_SUBDIRS
Definition: CascRootFile_Diablo3.cpp:22
ENCODING_KEY EncodingKey
Definition: CascRootFile_Diablo3.cpp:132
PCASC_MAP pRootMap
Definition: CascRootFile_Diablo3.cpp:155
BYTE * LPBYTE
Definition: CascPort.h:152
static LPBYTE D3Handler_Search(TRootHandler_Diablo3 *pRootHandler, TCascSearch *pSearch, PDWORD, PDWORD)
Definition: CascRootFile_Diablo3.cpp:949
#define CASC_FREE(ptr)
Definition: CascCommon.h:303
void * Array_ItemAt(PDYNAMIC_ARRAY pArray, size_t ItemIndex)
Definition: DynamicArray.cpp:81
#define DIABLO3_INVALID_INDEX
Definition: CascRootFile_Diablo3.cpp:24
struct _CASC_FILE_ENTRY * PCASC_FILE_ENTRY
ROOT_SEARCH Search
Definition: RootHandler.h:69
#define FIELD_OFFSET(t, f)
Definition: CascPort.h:122
static int ParseDirectoryFile(TRootHandler_Diablo3 *pRootHandler, LPBYTE pbDirFile, LPBYTE pbFileEnd, DWORD dwRootDirIndex)
Definition: CascRootFile_Diablo3.cpp:806
static int D3Handler_Insert(TRootHandler_Diablo3 *pRootHandler, const char *szFileName, LPBYTE pbEncodingKey)
Definition: CascRootFile_Diablo3.cpp:931
static void D3Handler_Close(TRootHandler_Diablo3 *pRootHandler)
Definition: CascRootFile_Diablo3.cpp:995
ROOT_ENDSEARCH EndSearch
Definition: RootHandler.h:70
unsigned int DWORD
Definition: CascPort.h:139
Definition: CascRootFile_Diablo3.cpp:146
int(* ROOT_INSERT)(struct TRootHandler *pRootHandler, const char *szFileName, LPBYTE pbEncodingKey)
Definition: RootHandler.h:30
static int ParseCoreTOC(TRootHandler_Diablo3 *pRootHandler, PCASC_MAP pPackageMap, LPBYTE pbCoreTocFile, LPBYTE pbCoreTocEnd)
Definition: CascRootFile_Diablo3.cpp:862
BYTE Value[MD5_HASH_SIZE]
Definition: CascCommon.h:98
DYNAMIC_ARRAY FileNames
Definition: CascRootFile_Diablo3.cpp:152
static void D3Handler_EndSearch(TRootHandler_Diablo3 *, TCascSearch *)
Definition: CascRootFile_Diablo3.cpp:980
void(* ROOT_CLOSE)(struct TRootHandler *pRootHandler)
Definition: RootHandler.h:62
ROOT_CLOSE Close
Definition: RootHandler.h:73
#define ERROR_SUCCESS
Definition: CascPort.h:204
size_t ItemCount
Definition: DynamicArray.h:21
static LPBYTE LoadFileToMemory(TCascStorage *hs, LPBYTE pbEncodingKey, DWORD *pcbFileData)
Definition: CascRootFile_Diablo3.cpp:648