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.
| offset | holds |
|---|---|
+0x00, +0x04 | vertex count, vertex lookup (16-bit indices into the header's vertices) |
+0x08, +0x0c | index count, indices (16-bit, into the lookup) |
+0x14 | four bone lookup bytes per vertex |
+0x18, +0x1c | submesh count, submeshes (Submesh record) |
+0x20, +0x24 | texture unit count, texture units (Texture unit record) |
+0x28 | bones the view's palette needs |
The derivation is in the doc.
Fields 10
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 4 | uint32_t | m_vertexCount | Holds the number of vertex lookup entries | verified, proof one | models/records#view-record |
0x0004 | 4 | uint16_t * | m_vertexLookup | Holds the indices into the header vertices | verified, proof one | models/records#view-record |
0x0008 | 4 | uint32_t | m_indexCount | Holds the number of indices | verified, proof one | models/records#view-record |
0x000c | 4 | uint16_t * | m_indices | Holds the triangle indices into the vertex lookup | verified, proof one | models/records#view-record |
0x0014 | 4 | uint32_t * | m_boneBytes | Holds four bone lookup bytes per vertex | verified, proof one | models/records#view-record |
0x0018 | 4 | uint32_t | m_submeshCount | Holds the number of submeshes | verified, proof one | models/records#view-record |
0x001c | 4 | M2Submesh * | m_submeshes | Holds the submeshes | verified, proof one | models/records#view-record |
0x0020 | 4 | uint32_t | m_unitCount | Holds the number of texture units | verified, proof one | models/records#view-record |
0x0024 | 4 | M2TextureUnit * | m_units | Holds the texture units | verified, proof one | models/records#view-record |
0x0028 | 4 | uint32_t | m_paletteBones | Holds the bones the view palette needs | verified, proof one | models/records#view-record |