With the struct defined as it is currently, my memory dumping script (which matches the C header exactly) prints output that looks like the following, for example:
"TActor_0": {
"name": "Krystal",
"address": "0x806ED020",
"fields": {
"rotation": [-25166, 0, 0],
"unk0x6": 2,
"scale": 0.0494999997317791,
"position": [2108.28564453125, -41.19002151489258, 16808.6328125],
"positionMirror": [2108.28564453125, -41.19002151489258, 16808.6328125],
"speed": [0, 0, 0],
"ptr0x30": "0x00000000",
"unk0x34": 65535,
"linkedActor": "0x800EC398",
"unk0x3c": [68, 255, 0],
"unk0x44": 68,
"unk0x46": 18432,
"ptr0x48": "0x00000100",
"unk0x4c": 520094208,
"ptr0x50": "0x00000000",
"ptr0x54": "0x00803981",
"unk0x58": 3900731102,
"ptr0x5c": "0x7C000000",
"ptr0x60": "0x00806286",
"ptr0x64": "0x08806ED9",
"ptr0x68": "0xD8806EDE",
"ptr0x6c": "0x38802529",
"ptr0x70": "0xD0806EDF",
"unk0x74": 545287903,
"positionMirror2": [-2199023255552, 0, 1.1794696944357306e-38],
"positionMirror3": [2.3158967801400164e-36, -1.2252182749418445e-27, -4.008937194294739e-26],
however, since positionMirror2
and positionMirror3
are actually always the same as position
and positionMirror
when the game is running, clearly that's not correct output. Looking into it in the debugger, I realized that the actual amount of space between linkedActor
and positionMirror2
in practice is 68 bytes (or 44 if using hex format values, as shown in the image I've attached) whereas the C header definition currently only adds up to 55 bytes across the following section:
u8 unk0x3c[3];
UNK_TYPE_16 unk0x44;
UNK_TYPE_16 unk0x46;
void* ptr0x48;
UNK_TYPE_32 unk0x4c;
void* ptr0x50;
void* ptr0x54;
UNK_TYPE_32 unk0x58;
void* ptr0x5c;
void* ptr0x60;
void* ptr0x64;
void* ptr0x68;
void* ptr0x6c;
void* ptr0x70;
UNK_TYPE_32 unk0x74;
After adjusting my script to reflect what I was actually seeing in memory, it then produced output that looks like this, which has the correct values for positionMirror2
and positionMirror3
, as well as what look to me like more meaningful values for the surrounding fields:
"TActor_0": {
"name": "Krystal",
"address": "0x806ED020",
"fields": {
"rotation": [-25166, 0, 0],
"unk0x6": 2,
"scale": 0.0494999997317791,
"position": [2108.28564453125, -41.19002151489258, 16808.6328125],
"positionMirror": [2108.28564453125, -41.19002151489258, 16808.6328125],
"speed": [0, 0, 0],
"ptr0x30": "0x00000000",
"unk0x34": 65535,
"linkedActor": "0x800EC398",
"unk0x3c": 17663,
"unk0x3e": 0,
"unk0x40": 17480,
"unk0x42": 0,
"unk0x44": 65567,
"unk0x48": 131072,
"ptr0x4c": "0x00000000",
"ptr0x50": "0x803981E8",
"ptr0x54": "0x806EDE7C",
"ptr0x58": "0x00000000",
"ptr0x5c": "0x80628608",
"ptr0x60": "0x806ED9D8",
"ptr0x64": "0x806EDE38",
"ptr0x68": "0x802529D0",
"ptr0x6c": "0x806EDF20",
"ptr0x70": "0x806EDFD4",
"ptr0x74": "0x00000000",
"ptr0x78": "0x00000000",
"ptr0x7c": "0x806ED104",
"positionMirror2": [2108.28564453125, -41.19002151489258, 16808.6328125],
"positionMirror3": [2108.28564453125, -41.19002151489258, 16808.6328125],
If you want, I can make a PR that updates the C header definition with the same adjustments I did for my script. Figured I'd open an issue for it first though as there was a fair amount of background info that needed explaining.
