Fix broken build due to GhostHeader

This commit is contained in:
Ryan Myers
2021-09-10 15:44:20 -04:00
parent 6b3c0d3138
commit 094782c388
3 changed files with 17 additions and 27 deletions
+6 -20
View File
@@ -203,25 +203,9 @@ s32 func_8007497C(u64 *arg0) {
GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007497C.s")
#endif
// Ghost data follows directly after the header
/* Size: 8 bytes */
typedef struct GhostHeader {
s16 checksum;
s8 unk2;
s8 unk3;
s16 unk4;
s16 numberFrames;
} GhostHeader;
/* Size: 12 bytes */
typedef struct GhostDataFrame {
u8 pad0[12];
} GhostDataFrame;
#ifdef NON_MATCHING
// regalloc issues
s32 func_80074A4C(GhostHeader *ghostHeader) {
s16 func_80074A4C(GhostHeader *ghostHeader) {
s16 i;
s16 len;
s16 sum;
@@ -235,14 +219,16 @@ s32 func_80074A4C(GhostHeader *ghostHeader) {
return sum;
}
#else
s16 func_80074A4C(GhostHeader *ghostHeader);
GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074A4C.s")
#endif
void func_80074AA8(GhostHeader *ghostHeader, s16 arg1, s16 arg2, s16 numberFrames, u8 *dest) {
void func_80074AA8(GhostHeader *ghostHeader, s16 characterID, s16 time, s16 numberFrames, u8 *dest) {
ghostHeader->checksum = 0;
ghostHeader->unk2 = arg1;
ghostHeader->characterID = characterID;
ghostHeader->unk3 = 0;
ghostHeader->unk4 = arg2;
ghostHeader->time = time;
ghostHeader->numberFrames = numberFrames;
bcopy(dest, (u8*)ghostHeader + 8, numberFrames * sizeof(GhostDataFrame));
ghostHeader->checksum = func_80074A4C(ghostHeader);
+11 -6
View File
@@ -9,13 +9,17 @@
#include "structs.h"
#include "camera.h"
// Ghost data follows directly after the header
/* Size: 8 bytes */
typedef struct GhostHeaderChecksum {
u8 levelID;
u8 vehicleID; // 0 = Car, 1 = Hovercraft, 2 = Plane
} GhostHeaderChecksum;
typedef struct GhostHeader {
//GhostHeaderChecksum checksum;
s16 checksum;
s8 unk2;
s8 unk3;
s16 unk4;
u8 characterID; // 9 = T.T.
u8 unk3; // Might just be padding?
s16 time; // In frames, where 60 frames = 1 second.
s16 numberFrames;
} GhostHeader;
@@ -36,7 +40,7 @@ s32 func_80073C4C(void);
s32 func_80073C54(void);
s32 func_80073F5C(s32 arg0, s32 arg1);
s32 func_80074148(s32 arg0, Settings *arg1);
void func_80074AA8(GhostHeader *ghostHeader, s16 arg1, s16 arg2, s16 numberFrames, u8 *dest);
void func_80074AA8(GhostHeader *ghostHeader, s16 characterID, s16 time, s16 numberFrames, u8 *dest);
s32 func_80075AEC(s32 controllerIndex);
s32 func_80075D38(s32 controllerIndex);
s32 func_80075DC4(s32 controllerIndex);
@@ -52,5 +56,6 @@ s32 func_8007497C(u64 *arg0); //Non matching
s32 func_80074B1C(void); //Non matching
s32 func_800762C8(s32 controllerIndex, s32 fileNum); //Non matching
s32 func_80076924(s32 controllerIndex, s32 arg1, s32 *arg2); //Non matching
s16 func_80074A4C(GhostHeader *ghostHeader); //Non matching
#endif
-1
View File
@@ -208,7 +208,6 @@ Settings *get_settings(void);
s32 is_in_tracks_mode(void);
s32 *load_asset_section_from_rom(s32);
void load_asset_to_address(u32, s32*, s32, s32);
void free_from_memory_pool(s32*);
void func_8006C1AC(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
void func_8006C2E4(void);
s16 func_8006C2F0(void);