benilla-re systems structs docs

CGGameObject_C

struct · objectlayer · 784 bytes

Vtable
0x80c330
Meaning
Holds a game object: the object, watcher lists, type handler, record, world matrix and box, state
Confidence
verified, proof one
Finding
objectlayer/classes#class-sizes-and-pools

Finding: Class sizes and pools in objectlayer: classes

Each type's allocation size is its members, its field array and a second per-field array, in bytes base + 4·N; N comes from a small function per type. At startup the manager creates one pool per type 1 to 7 with that size, the class name and a block count. An object comes from its type's pool, which stores the pool handle at +0x10; the active player instead gets a heap block of 26648 bytes.

typeclassbaseNsizeblock
0CGObject_C0x1283308 (no pool)
1CGItem_C0x408351172512
2CGContainer_C0x8c8107267632
3CGUnit_C0x1158170512064
4CGPlayer_C0x25084651134064
5CGGameObject_C0x2f0878464
6CGDynamicObject_C0x1e0349232
7CGCorpse_C0x350687232

The derivation is in the doc.

Fields 11

offsetsizetypenamemeaningconfidencefinding
0x01104uint32_t *m_gameObjectFieldsHolds the address of field 6, GAMEOBJECT_CREATED_BY, written by 0x5f6ef0verified, proof oneobjectlayer/gameobjects#the-game-object
0x0118240uint8_t[240]m_gameObjectWatchersHolds the 20 game object field watcher lists, 12 bytes eachverified, proof oneobjectlayer/gameobjects#the-game-object
0x02088uint8_t[8]m_transportLinkHolds the object's link in the transport listverified, proof oneobjectlayer/gameobjects#the-game-object
0x02104void *m_handlerHolds the type handlerverified, proof oneobjectlayer/gameobjects#the-game-object
0x02144void *m_recordHolds the record, once it arrivesverified, proof oneobjectlayer/gameobjects#the-game-object
0x021864float[16]m_worldMatrixHolds the world matrix: translation, rotation and scaleverified, proof oneobjectlayer/gameobjects#the-game-object
0x026024float[6]m_worldBoxHolds the model's collision box carried by the world matrixverified, proof oneobjectlayer/gameobjects#world-transform-and-box
0x02784int32_tm_pathTimeOffsetHolds the path time offset: the update's last u32 less the timeverified, proof oneobjectlayer/gameobjects#the-game-object
0x027c4uint32_tm_stateHolds GAMEOBJECT_STATE as the handler last saw itverified, proof oneobjectlayer/gameobjects#the-game-object
0x02804uint32_tm_pendingAnimEventHolds an animation event waiting for the modelverified, proof oneobjectlayer/gameobjects#the-game-object
0x02844uint32_tm_collidesHolds 1 when the object collidesverified, proof oneobjectlayer/gameobjects#the-game-object