benilla-re systems structs docs

s_detailDoodadModels

global · terrain

Address
0xcafffc · 4 bytes, up to 0xcaffff
Type
void **
Meaning
Holds the detail model records indexed by GroundEffectDoodad id, which 0x6b1a90 fills
Confidence
verified, proof one
Finding
terrain/detail#detail-doodad-model-load

Finding: Detail doodad model load in terrain: detail doodads

A detail model record is three dwords: +0 the GroundEffectDoodad row's model path, +4 the model, +8 its texture. 0x6b1f80(id) takes the record at [0xcafffc][id]: none gives 0; a record without a model starts the load and gives 0; one with a model gives CM2Model::IsLoaded(model, 0, 0). The load 0x6b2460 builds World\NoDXT\Detail\ followed by the path as written in a 0x104-byte buffer, creates the model through 0x707350 with flags 0, stores it at +4, and registers 0x6b24e0 as its loaded callback with the record; it returns 1, or 0 when no model is made. The callback stores at +8 what 0x6c4c20 returns for a name the model's header holds.

The derivation is in the doc.