FindArchiveRoot
function · client
- Address
0x4022d0· 74 bytes, up to0x402319- Signature
uint32_t __fastcall (const char *name)- Meaning
- Returns the first archive root, 0 or 1, under which a file exists, or 2 when neither holds it
- Confidence
- verified, proof two
- Finding
- storm/mount#base-and-speech-archives
Finding: Base and speech archives in storm: mounting the archives
speech2.MPQ opens next, if present, at the next priority. Then each patch that opened gets a child record for
the prefix speech2 if a real speech2.MPQ exists. Then the ten base archives, model, texture, terrain,
wmo, sound, misc, interface, fonts, speech, dbc (.MPQ), at the fixed priorities 0x3f down to 0x36
whether or not each opens. A base or speech2 name is tried under Data\ and then ..\Data\. An open that fails with error 0x26, 0x8510006c or 0x85100083 ends the client with Failed to open archive %s (the rooted path; storm/errorlog#fatal-error-display), speech2 included. A base archive that fails with another code, missing included, ends it with Failed to open archive %s: %s; a speech2 or patch failing so is skipped.
The derivation is in the doc.
Callers 3
- FindBaseArchiveRoot client
- InitializeGlobal client
- MountArchives client
Callees 2
- FormatArchivePath client
- OsFileExists os
Calls and jumps by a bare address, from tables/calls.tsv.