CMapObj
struct · models · 2036 bytes
- Meaning
- Holds a map object in 0x7f4 fixed bytes the allocation extends: root file, chunk pointers, counts, bounds and groups
- Confidence
- verified, proof one
- Finding
- models/wmo#root-file-chunks
Finding: Root file chunks in models: map objects
A root file is parsed in a fixed chunk order without reading the tags: after the version chunk,
MOHD, MOTX, MOMT, MOGN, MOGI, MOSB, MOPV, MOPT, MOPR, MOVV, MOVB, MOLT,
MODS, MODN, MODD and MFOG follow one another, each pointer stored and each record count
derived from the chunk size. Only the last, MCVP, is tested: it is taken when it lies inside the
file and carries its tag.
| chunk | record | chunk | record |
|---|---|---|---|
MOMT | 64 bytes | MOVV | 12 bytes |
MOGI | 32 bytes | MOVB | 4 bytes |
MOPV | 12 bytes | MOLT | 48 bytes |
MOPT | 20 bytes | MODS | 32 bytes |
MOPR | 8 bytes | MODD | 40 bytes |
MFOG | 48 bytes | MCVP | 16 bytes |
The derivation is in the doc.
Fields 18
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0124 | 4 | char * | m_textureNames | Holds the MOTX texture name strings | verified, proof one | models/wmo#material-textures |
0x0128 | 4 | char * | m_groupNames | Holds the MOGN group name strings | verified, proof one | models/wmo#group-header |
0x0130 | 4 | void * | m_groupInfo | Holds the MOGI group records, 32 bytes each: flags and box | verified, proof one | models/wmo#bounding-spheres-and-volume |
0x0134 | 4 | float * | m_portalVertices | Holds the MOPV portal vertices | verified, proof one | models/wmo#portal-vertex-fade |
0x0138 | 4 | void * | m_portals | Holds the MOPT portal records, 20 bytes each | verified, proof one | models/wmo#portal-vertex-fade |
0x013c | 4 | void * | m_portalRefs | Holds the MOPR portal references, 8 bytes each | verified, proof one | models/wmo#portal-vertex-fade |
0x015c | 4 | float * | m_volumePlanes | Holds the MCVP convex volume planes | verified, proof one | models/wmo#bounding-spheres-and-volume |
0x0168 | 4 | uint32_t | m_groupCount | Holds the group count, the MOGI size over 32 | verified, proof one | models/wmo#root-file-chunks |
0x0194 | 4 | uint32_t | m_volumePlaneCount | Holds the number of convex volume planes | verified, proof one | models/wmo#bounding-spheres-and-volume |
0x01a0 | 24 | float[6] | m_bounds | Holds the bounding box | verified, proof one | models/wmo#bounding-spheres-and-volume |
0x01c0 | 4 | void * | m_fileData | Holds the root file data | verified, proof one | models/wmo#root-file-chunks |
0x01c4 | 4 | uint32_t | m_fileSize | Holds the root file size | verified, proof one | models/wmo#root-file-chunks |
0x01d4 | 1 | uint8_t | m_loaded | Holds whether the root file is parsed | verified, proof one | models/wmo#queries |
0x01d8 | 4 | void * | m_materials | Holds the MOMT material records, 64 bytes each, in the file data | verified, proof one | models/wmo#material-textures |
0x01dc | 4 | uint32_t | m_materialCount | Holds the number of materials | verified, proof one | models/wmo#material-textures |
0x01e4 | 4 | uint32_t | m_groupLinkOffset | Holds the offset of the list node in a group, the head of the loaded group list | verified, proof one | models/wmo#group-header |
0x01f0 | 4 | uint32_t | m_groupSlotCount | Holds the count of group pointers: 384 from the reset, the group count once parsed | verified, proof one | models/wmo#root-file-chunks |
0x01f4 | 1536 | void *[384] | m_groups | Holds a group object per MOGI entry, allocated once parsed | verified, proof one | models/wmo#root-file-chunks |