CMap::SafeOpen
function · terrain · host
- Address
0x694130· 73 bytes, up to0x694178- Signature
int32_t __fastcall (const char *path, void **file)- Meaning
- Opens a file, trying ten times before ending the program with an error
- Confidence
- verified, proof one
- Finding
- terrain/files#tile-file-read
Finding: Tile file read in terrain: files
0x6c1e70(path) opens the ADT, takes its size into +0x67c and a buffer of that size into
+0x678, and reads the whole file. During a map load it reads and parses at once under the
critical section 0xce8270; otherwise it queues an asynchronous read of the whole file whose
completion, 0x6c21f0, parses it, releases the request and closes the file. The pending request
is kept in the WDT entry's second dword.
The derivation is in the doc.
Callers 3
- ReadAreaFile terrain
- CMapObj::Load models
- CMapObj::LoadGroupFile models
Callees 3
- DebugPrintStub unassigned
- SFile::Open storm
- SErrDisplayAppFatal storm
Calls and jumps by a bare address, from tables/calls.tsv.