benilla-re systems structs docs

CreateModelFromPath

function · models · primitive

Address
0x707350 · 161 bytes, up to 0x7073f0
Meaning
Creates a model instance in a scene from a file path, substituting the error cube when the file fails
Confidence
verified, proof one
Finding
models/scene#model-creation

Finding: Model creation in models: the scene

0x707350(path, flags) asks the cache for the file's shared model with flags & 4 as the open flag, which lets the file and its textures come from loose files on disk (storm/mount#which-opens-ask-the-index). When that fails it loads Spells\ErrorCube.mdx with open flag 0 instead. It allocates a 0x428-byte instance, constructs it and initializes it on the scene; a failed initialization destroys the instance and returns 0. The lookup's own reference is released either way. 0x707400(source, flags) does the same with the source instance's shared model, and the new instance copies the source's attachments.

The derivation is in the doc.

Callers 33

Callees 7

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