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.
| type | class | base | N | size | block |
|---|---|---|---|---|---|
| 0 | CGObject_C | 0x128 | 3 | 308 (no pool) | |
| 1 | CGItem_C | 0x408 | 35 | 1172 | 512 |
| 2 | CGContainer_C | 0x8c8 | 107 | 2676 | 32 |
| 3 | CGUnit_C | 0x1158 | 170 | 5120 | 64 |
| 4 | CGPlayer_C | 0x2508 | 465 | 11340 | 64 |
| 5 | CGGameObject_C | 0x2f0 | 8 | 784 | 64 |
| 6 | CGDynamicObject_C | 0x1e0 | 3 | 492 | 32 |
| 7 | CGCorpse_C | 0x350 | 6 | 872 | 32 |
The derivation is in the doc.
Fields 11
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0110 | 4 | uint32_t * | m_gameObjectFields | Holds the address of field 6, GAMEOBJECT_CREATED_BY, written by 0x5f6ef0 | verified, proof one | objectlayer/gameobjects#the-game-object |
0x0118 | 240 | uint8_t[240] | m_gameObjectWatchers | Holds the 20 game object field watcher lists, 12 bytes each | verified, proof one | objectlayer/gameobjects#the-game-object |
0x0208 | 8 | uint8_t[8] | m_transportLink | Holds the object's link in the transport list | verified, proof one | objectlayer/gameobjects#the-game-object |
0x0210 | 4 | void * | m_handler | Holds the type handler | verified, proof one | objectlayer/gameobjects#the-game-object |
0x0214 | 4 | void * | m_record | Holds the record, once it arrives | verified, proof one | objectlayer/gameobjects#the-game-object |
0x0218 | 64 | float[16] | m_worldMatrix | Holds the world matrix: translation, rotation and scale | verified, proof one | objectlayer/gameobjects#the-game-object |
0x0260 | 24 | float[6] | m_worldBox | Holds the model's collision box carried by the world matrix | verified, proof one | objectlayer/gameobjects#world-transform-and-box |
0x0278 | 4 | int32_t | m_pathTimeOffset | Holds the path time offset: the update's last u32 less the time | verified, proof one | objectlayer/gameobjects#the-game-object |
0x027c | 4 | uint32_t | m_state | Holds GAMEOBJECT_STATE as the handler last saw it | verified, proof one | objectlayer/gameobjects#the-game-object |
0x0280 | 4 | uint32_t | m_pendingAnimEvent | Holds an animation event waiting for the model | verified, proof one | objectlayer/gameobjects#the-game-object |
0x0284 | 4 | uint32_t | m_collides | Holds 1 when the object collides | verified, proof one | objectlayer/gameobjects#the-game-object |