benilla-re systems structs docs

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.

chunkrecordchunkrecord
MOMT64 bytesMOVV12 bytes
MOGI32 bytesMOVB4 bytes
MOPV12 bytesMOLT48 bytes
MOPT20 bytesMODS32 bytes
MOPR8 bytesMODD40 bytes
MFOG48 bytesMCVP16 bytes

The derivation is in the doc.

Fields 18

offsetsizetypenamemeaningconfidencefinding
0x01244char *m_textureNamesHolds the MOTX texture name stringsverified, proof onemodels/wmo#material-textures
0x01284char *m_groupNamesHolds the MOGN group name stringsverified, proof onemodels/wmo#group-header
0x01304void *m_groupInfoHolds the MOGI group records, 32 bytes each: flags and boxverified, proof onemodels/wmo#bounding-spheres-and-volume
0x01344float *m_portalVerticesHolds the MOPV portal verticesverified, proof onemodels/wmo#portal-vertex-fade
0x01384void *m_portalsHolds the MOPT portal records, 20 bytes eachverified, proof onemodels/wmo#portal-vertex-fade
0x013c4void *m_portalRefsHolds the MOPR portal references, 8 bytes eachverified, proof onemodels/wmo#portal-vertex-fade
0x015c4float *m_volumePlanesHolds the MCVP convex volume planesverified, proof onemodels/wmo#bounding-spheres-and-volume
0x01684uint32_tm_groupCountHolds the group count, the MOGI size over 32verified, proof onemodels/wmo#root-file-chunks
0x01944uint32_tm_volumePlaneCountHolds the number of convex volume planesverified, proof onemodels/wmo#bounding-spheres-and-volume
0x01a024float[6]m_boundsHolds the bounding boxverified, proof onemodels/wmo#bounding-spheres-and-volume
0x01c04void *m_fileDataHolds the root file dataverified, proof onemodels/wmo#root-file-chunks
0x01c44uint32_tm_fileSizeHolds the root file sizeverified, proof onemodels/wmo#root-file-chunks
0x01d41uint8_tm_loadedHolds whether the root file is parsedverified, proof onemodels/wmo#queries
0x01d84void *m_materialsHolds the MOMT material records, 64 bytes each, in the file dataverified, proof onemodels/wmo#material-textures
0x01dc4uint32_tm_materialCountHolds the number of materialsverified, proof onemodels/wmo#material-textures
0x01e44uint32_tm_groupLinkOffsetHolds the offset of the list node in a group, the head of the loaded group listverified, proof onemodels/wmo#group-header
0x01f04uint32_tm_groupSlotCountHolds the count of group pointers: 384 from the reset, the group count once parsedverified, proof onemodels/wmo#root-file-chunks
0x01f41536void *[384]m_groupsHolds a group object per MOGI entry, allocated once parsedverified, proof onemodels/wmo#root-file-chunks