benilla-re systems structs docs

CM2Shared

struct · models · 356 bytes

Meaning
Holds a model file: its fixed-up data, view, textures, shader ids and buffers
Confidence
verified, proof one
Finding
models/shared#shared-model-object

Finding: Shared model object in models: the shared model

offsetholds
+0x000, +0x004reference count, cache
+0x008flags: 1 loaded, 2 the open flag the load was given
+0x00cread request while loading
+0x010instances waiting for the load (link +0x1c/+0x20 in the instance)
+0x014, +0x018, +0x01crelease list links, release time
+0x020file name, 0x104 bytes
+0x124, +0x128, +0x12cbucket links, name hash
+0x130, +0x134file data, file size
+0x138, +0x13cselected view, texture handles
+0x140 to +0x14cdevice index buffer handles, device vertex buffer handles
+0x150, +0x154, +0x158per-batch vertex and pixel shader ids, copy of the view's submeshes
+0x15c, +0x160instance copies the device buffers hold, most instances one batched draw may take

The derivation is in the doc.

Fields 8

offsetsizetypenamemeaningconfidencefinding
0x00004uint32_tm_refCountHolds the shared model's reference countverified, proof onemodels/shared#shared-model-object
0x00044M2Cache *m_cacheHolds the cache the shared model belongs toverified, proof onemodels/shared#shared-model-object
0x00084uint32_tm_flagsHolds flag 1 when loaded and flag 2 when the load's open flag allows loose filesverified, proof onemodels/shared#shared-model-object
0x0020260char[260]m_nameHolds the file nameverified, proof onemodels/shared#shared-model-object
0x012c4uint32_tm_hashHolds the hash of the file nameverified, proof onemodels/shared#shared-model-object
0x01304void *m_dataHolds the file data with its offsets fixed upverified, proof onemodels/shared#shared-model-object
0x01344uint32_tm_sizeHolds the file sizeverified, proof onemodels/shared#shared-model-object
0x01384void *m_viewHolds the selected viewverified, proof onemodels/shared#shared-model-object