MCPcopy Create free account
hub / github.com/diasurgical/devilution / LoadBetTable

Function LoadBetTable

3rdParty/StormLib/src/SBaseFileTable.cpp:2300–2321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2298}
2299
2300TMPQBetTable * LoadBetTable(TMPQArchive * ha)
2301{
2302 TMPQExtHeader * pExtTable;
2303 TMPQBetTable * pBetTable = NULL;
2304 TMPQHeader * pHeader = ha->pHeader;
2305
2306 // If the BET table position is not 0, we expect the table to be present
2307 if(pHeader->BetTablePos64 != 0 && pHeader->BetTableSize64 != 0)
2308 {
2309 // Attempt to load the HET table (Hash Extended Table)
2310 pExtTable = LoadExtTable(ha, pHeader->BetTablePos64, (size_t)pHeader->BetTableSize64, BET_TABLE_SIGNATURE, MPQ_KEY_BLOCK_TABLE);
2311 if(pExtTable != NULL)
2312 {
2313 // If succeeded, we translate the BET table
2314 // to more readable form
2315 pBetTable = TranslateBetTable(ha, (TMPQBetHeader *)pExtTable);
2316 STORM_FREE(pExtTable);
2317 }
2318 }
2319
2320 return pBetTable;
2321}
2322#endif
2323
2324int LoadAnyHashTable(TMPQArchive * ha)

Callers 2

BuildFileTable_HetBetFunction · 0.85
SFileGetFileInfoFunction · 0.85

Calls 2

LoadExtTableFunction · 0.85
TranslateBetTableFunction · 0.85

Tested by

no test coverage detected