2023-08-07 17:07:23 +00:00
|
|
|
// GhostTape is 0x268 large
|
|
|
|
// GhostRecBuf is 0x3e00
|
|
|
|
|
2023-09-03 19:32:49 +00:00
|
|
|
struct GhostPacket
|
|
|
|
{
|
|
|
|
// just position,
|
|
|
|
// or union for several packets?
|
|
|
|
|
|
|
|
short pos[3];
|
|
|
|
short time;
|
|
|
|
short rot[2];
|
|
|
|
|
|
|
|
void* bufferPacket;
|
|
|
|
|
|
|
|
// 0x10 -- size of packet
|
|
|
|
};
|
2023-09-03 17:52:22 +00:00
|
|
|
|
2023-08-07 17:07:23 +00:00
|
|
|
struct GhostTape
|
|
|
|
{
|
2023-08-07 17:19:02 +00:00
|
|
|
// 0x0
|
2023-08-07 17:07:23 +00:00
|
|
|
struct GhostHeader* gh;
|
2023-08-07 17:19:02 +00:00
|
|
|
void* ptrStart; // gh->0x28
|
|
|
|
void* ptrEnd; // gh->0x28 + gh->size
|
2023-08-11 13:01:45 +00:00
|
|
|
void* ptrCurr;
|
2023-08-07 17:19:02 +00:00
|
|
|
|
2023-08-11 13:01:45 +00:00
|
|
|
// 0x10
|
2023-08-11 16:47:57 +00:00
|
|
|
int unk10;
|
2023-08-11 13:15:40 +00:00
|
|
|
|
|
|
|
// 0x14
|
2023-08-11 16:47:57 +00:00
|
|
|
int timeElapsedInRace;
|
|
|
|
|
|
|
|
// 0x18
|
|
|
|
int timeInPacket32_backup;
|
|
|
|
|
|
|
|
// 0x1c
|
|
|
|
int unk1C;
|
|
|
|
int unk20;
|
|
|
|
|
|
|
|
// 0x24
|
2023-08-11 20:14:35 +00:00
|
|
|
// all in GhostReplay_Init2, unused?
|
2023-08-11 16:47:57 +00:00
|
|
|
short unk1[3];
|
|
|
|
short unk2[3];
|
|
|
|
short unk3[3];
|
|
|
|
short unk4[3];
|
2023-08-11 13:57:07 +00:00
|
|
|
|
2023-08-11 16:47:57 +00:00
|
|
|
// 0x3C
|
|
|
|
int timeInPacket01;
|
|
|
|
|
|
|
|
// 0x40
|
|
|
|
int timeInPacket32;
|
|
|
|
|
|
|
|
// 0x44
|
|
|
|
int timeBetweenPackets;
|
2023-08-11 13:15:40 +00:00
|
|
|
|
2023-08-11 16:15:01 +00:00
|
|
|
// 0x48
|
2023-08-11 16:47:57 +00:00
|
|
|
int numPacketsInArray;
|
2023-08-11 16:15:01 +00:00
|
|
|
|
2023-08-11 15:51:22 +00:00
|
|
|
// 0x4C
|
2023-08-11 16:47:57 +00:00
|
|
|
int packetID;
|
2023-08-11 13:57:07 +00:00
|
|
|
|
2023-08-11 14:37:39 +00:00
|
|
|
// 0x50
|
2023-09-03 19:32:49 +00:00
|
|
|
struct GhostPacket packets[0x21];
|
2023-08-07 17:19:02 +00:00
|
|
|
|
|
|
|
// 0x260
|
|
|
|
int constDEADC0ED;
|
2023-08-07 17:07:23 +00:00
|
|
|
|
|
|
|
// 0x264
|
|
|
|
struct GhostHeader* gh_again; // duplicate?
|
|
|
|
|
|
|
|
// 0x268 bytes large
|
2023-08-07 17:19:02 +00:00
|
|
|
};
|
2023-08-07 17:07:23 +00:00
|
|
|
|
2023-09-03 17:52:22 +00:00
|
|
|
|
2023-08-07 02:01:59 +00:00
|
|
|
struct GhostHeader
|
|
|
|
{
|
|
|
|
// 0x0
|
2023-08-07 18:32:20 +00:00
|
|
|
short magic;
|
2023-08-07 02:01:59 +00:00
|
|
|
short size;
|
|
|
|
|
|
|
|
// 0x4
|
|
|
|
short levelID;
|
|
|
|
|
|
|
|
// 0x6
|
|
|
|
short characterID;
|
|
|
|
|
|
|
|
// 0x8
|
|
|
|
int speedApprox; // useless decoy
|
|
|
|
int ySpeed; // useless decoy
|
|
|
|
|
|
|
|
// 0x10
|
|
|
|
int timeElapsedInRace;
|
2023-08-07 16:56:59 +00:00
|
|
|
|
2023-08-07 19:06:36 +00:00
|
|
|
// 0x14
|
|
|
|
// try fresh-boot time trial, dereference 8008fbf4,
|
|
|
|
// you'll see it's all zeros, beat the race, double-deref 8008d754,
|
|
|
|
// and it's still all zeros, could be accident, or a throw-off.
|
|
|
|
// Only time this is non-zero is if pre-existing memory isn't wiped
|
|
|
|
char emptyPadding[0x14];
|
2023-08-07 16:56:59 +00:00
|
|
|
|
2023-08-10 16:00:24 +00:00
|
|
|
// 0x28
|
2023-11-06 18:38:58 +00:00
|
|
|
//char recordBuffer[0]; // yes, zero bytes
|
|
|
|
};
|
|
|
|
|
|
|
|
#define GHOSTHEADER_GETRECORDBUFFER(x) \
|
|
|
|
((unsigned int)x + sizeof(struct GhostHeader))
|