blizzless-diiis
blizzless-diiis copied to clipboard
01 template for CoreTOC.dat reading
This will help get us the MPQ Info Names SNOids ect ect very important when updating . Taged as Documentation
//------------------------------------------------
//--- 010 Editor v13.0.1 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
#define NUM_SNO_GROUPS 70
typedef struct {
DWORD entryCounts[NUM_SNO_GROUPS];
DWORD entryOffsets[NUM_SNO_GROUPS];
DWORD entryUnkCounts[NUM_SNO_GROUPS];
DWORD i0;
} TOCHeader;
int goto(int pos) {
local int x = FTell();
FSeek(pos);
return x;
}
struct {
local int i, oldPos;
TOCHeader header;
for(i = 0; i < NUM_SNO_GROUPS; i++) {
if(header.entryCounts[i] > 0) {
oldPos = goto(header.entryOffsets[i] + sizeof(TOCHeader));
struct EntryData {
struct {
DWORD snoGroup;
DWORD snoId;
DWORD pName;
local int p = goto(header.entryOffsets[i] + sizeof(TOCHeader) + 12 * header.entryCounts[i] + pName);
string name;
FSeek(p);
} entries[header.entryCounts[i]]<bgcolor=0xffaabb,optimize=false>;
} groupData<optimize=false>;
FSeek(oldPos);
}
}
} CoreTOC;
I'd vote to open a wiki for this.
I think a Wiki Would actually be nice to have