23 if (
pFile !=
nullptr) {
29 pFile = fopen(pFilename.c_str(),
"rb");
31 log->
Warning(L
"Failed to open file: %S", pFilename.c_str());
38 log->
Warning(L
"Invalid format: %S", pFilename.c_str());
43 typedef struct HWLNode {
47 std::vector<HWLNode> vNodes;
50 fread(&uNumItems, 4, 1,
pFile);
52 for (
unsigned int i = 0; i < uNumItems; ++i) {
53 fread(tmpName, 20, 1,
pFile);
58 vNodes.push_back(node);
61 for (
unsigned int i = 0; i < uNumItems; ++i) {
63 fread(&uOffset, 4, 1,
pFile);
64 vNodes[i].uOffset = uOffset;
67 for (HWLNode &node : vNodes) {
68 mNodes[node.sName] = node.uOffset;
97 size_t uOffset = it->second;
99 fseek(
pFile, uOffset, SEEK_SET);