benilla-re systems structs docs

CMap::SafeRead

function · terrain · host

Address
0x694180 · 101 bytes, up to 0x6941e4
Signature
int32_t __fastcall (const char *path, void *file, void *buffer, uint32_t size)
Meaning
Reads a file's bytes, trying ten times, and returns 0 after the last failure
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

Callees 2

Calls and jumps by a bare address, from tables/calls.tsv.