benilla-re systems structs docs

M2View

struct · models · 44 bytes

Meaning
Holds a view record of an MD20 file: vertex lookup, indices, bone bytes, submeshes, units and palette size
Confidence
verified, proof one
Finding
models/records#view-record

Finding: View record in models: records

A view is 0x2c bytes: five count and pointer pairs and the bone count the vertex shader palette must hold.

offsetholds
+0x00, +0x04vertex count, vertex lookup (16-bit indices into the header's vertices)
+0x08, +0x0cindex count, indices (16-bit, into the lookup)
+0x14four bone lookup bytes per vertex
+0x18, +0x1csubmesh count, submeshes (Submesh record)
+0x20, +0x24texture unit count, texture units (Texture unit record)
+0x28bones the view's palette needs

The derivation is in the doc.

Fields 10

offsetsizetypenamemeaningconfidencefinding
0x00004uint32_tm_vertexCountHolds the number of vertex lookup entriesverified, proof onemodels/records#view-record
0x00044uint16_t *m_vertexLookupHolds the indices into the header verticesverified, proof onemodels/records#view-record
0x00084uint32_tm_indexCountHolds the number of indicesverified, proof onemodels/records#view-record
0x000c4uint16_t *m_indicesHolds the triangle indices into the vertex lookupverified, proof onemodels/records#view-record
0x00144uint32_t *m_boneBytesHolds four bone lookup bytes per vertexverified, proof onemodels/records#view-record
0x00184uint32_tm_submeshCountHolds the number of submeshesverified, proof onemodels/records#view-record
0x001c4M2Submesh *m_submeshesHolds the submeshesverified, proof onemodels/records#view-record
0x00204uint32_tm_unitCountHolds the number of texture unitsverified, proof onemodels/records#view-record
0x00244M2TextureUnit *m_unitsHolds the texture unitsverified, proof onemodels/records#view-record
0x00284uint32_tm_paletteBonesHolds the bones the view palette needsverified, proof onemodels/records#view-record