Merge pull request #172 from Ryan-Myers/master

Finish header files in src folder
This commit is contained in:
David Benepe
2021-09-17 12:27:06 -05:00
committed by GitHub
32 changed files with 401 additions and 372 deletions
+47
View File
@@ -937,4 +937,51 @@ typedef struct unk80027FC4 {
s16 unk6;
} unk80027FC4;
// Unused
typedef struct GhostHeaderChecksum {
u8 levelID;
u8 vehicleID; // 0 = Car, 1 = Hovercraft, 2 = Plane
} GhostHeaderChecksum;
/* Size: 8 bytes */
typedef struct GhostHeader {
//GhostHeaderChecksum checksum;
s16 checksum;
u8 characterID; // 9 = T.T.
u8 unk3; // Might just be padding?
s16 time; // In frames, where 60 frames = 1 second.
s16 nodeCount;
} GhostHeader;
/* Size: 12 bytes */
typedef struct GhostNode {
s16 x;
s16 y;
s16 z;
s16 zRotation; // This order is correct.
s16 xRotation;
s16 yRotation;
} GhostNode;
/* Size: 12 bytes */
typedef struct GhostDataFrame {
u8 pad0[12];
} GhostDataFrame;
/* Size: 0x18 bytes */
typedef struct unk8011D510 {
/* 0x00 */ s16 unk0;
/* 0x02 */ s16 unk2;
/* 0x04 */ s16 unk4;
/* 0x06 */ u16 unk6;
/* 0x08 */ f32 unk8;
/* 0x0C */ f32 unkC;
/* 0x10 */ f32 unk10;
/* 0x14 */ f32 unk14;
} unk8011D510;
typedef struct unk80042178 {
u8 pad0[0x20];
} unk80042178;
#endif
+6 -7
View File
@@ -37,15 +37,14 @@ typedef struct unk80115D1C {
u8 unk2;
} unk80115D1C;
extern void alCSPNew(ALCSPlayer *seqp, ALSeqpConfig *config);
extern void alCSPSetBank(ALCSPlayer *seqp, ALBank *b);
void alCSPNew(ALCSPlayer *seqp, ALSeqpConfig *config); //lib/src/al/csplayer.c
void alCSPSetBank(ALCSPlayer *seqp, ALBank *b); //lib/src/unknown_0C8660.c
void func_8000B010(ALCSPlayer *, u8); //lib/src/mips1/alseqplayer.c
void *alHeapDBAlloc(u8 *file, s32 line, ALHeap *hp, s32 num, s32 size); //lib/src/al
void func_80004A60(u8, u16); //unknown_003260.c //Could be s32, s32
s32 alCSPSetChlPan(ALCSPlayer *seqp, u8 chan, ALPan pan); //unknown_0C84E0.c
void alCSPSetChlVol(ALCSPlayer *, u8 chan, u8 vol); //unknown_0C84E0.c
void *alHeapDBAlloc(u8 *file, s32 line, ALHeap *hp, s32 num, s32 size); //lib/src/al/alHeapDBAlloc.c
s32 alCSPSetChlPan(ALCSPlayer *seqp, u8 chan, ALPan pan); //lib/src/unknown_0C84E0.c
void alCSPSetChlVol(ALCSPlayer *, u8 chan, u8 vol); //lib/src/unknown_0C84E0.c
s32 alCSPGetChlVol(ALCSPlayer *seqp, u8 chan); //lib/src/al
void func_80063BA0(ALCSPlayer *seqp, u8 arg1, u8 arg2); //unknown_0646A0.c
void func_80063BA0(ALCSPlayer *seqp, u8 arg1, u8 arg2); //lib/src/unknown_0647A0.c
u8 func_80063C00(ALCSPlayer *seqp, u8 arg1); //lib/src/mips1/al/unknown_064800.c
u8 alSeqpGetChlFXMix(ALSeqPlayer *seqp, u8 chan); //lib/src/al/alSeqpGetChlFXMix.c
void func_8006492C(u8 arg0); //lib/src/mips1/al/reverb.c
+5 -4
View File
@@ -71,12 +71,13 @@ Vp D_800DD148[20] = {
{ 0, 0, 0x01FF, 0, 0, 0, 0x01FF, 0 },
};
f32 D_800DD288[6] = {
0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -281.0f
unk8011D510 D_800DD288 = {
0, 0, 0, 0, 1.0f, 0.0f, 0.0f, -281.0f,
};
f32 D_800DD2A0[6] = {
0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f
unk8011D510 D_800DD2A0 = {
0, 0, 0, 0, 1.0f, 0.0f, 0.0f, 0.0f,
};
Matrix D_800DD2B8 = {
+5 -3
View File
@@ -67,9 +67,9 @@ extern s16 D_800DD138[8];
// RSP Viewports
extern Vp D_800DD148[20];
extern f32 D_800DD288[6];
extern unk8011D510 D_800DD288;
extern f32 D_800DD2A0[6];
extern unk8011D510 D_800DD2A0;
extern Matrix D_800DD2B8;
@@ -83,9 +83,11 @@ extern s32 D_A4000000;
extern s32 SP_IMEM;
//TODO: Remove from here once header files for below are created with these signatures.
//TODO: Figure out where these functions live: unknown_070110?
void func_8006F870(Matrix, Matrix); //unknown_070110
void func_800705F8(s32, f32, f32, f32); //From unknown_070110
void func_8006FE74(Matrix *, unk8011D510 *); // Non Matching unknown_070110?
void func_8006F768(Matrix *, Matrix *, Matrix *); // Non Matching unknown_070110?
f32 sqrtf(f32); //IDO?
+4 -4
View File
@@ -212,7 +212,7 @@ s16 func_80074A4C(GhostHeader *ghostHeader) {
s32 temp;
sum = 0;
len = (ghostHeader->numberFrames * sizeof(GhostDataFrame)) + sizeof(GhostHeader);
len = (ghostHeader->nodeCount * sizeof(GhostDataFrame)) + sizeof(GhostHeader);
for(i = sizeof(GhostHeader); i < len; i++) {
sum += ((u8*)ghostHeader)[i];
}
@@ -222,13 +222,13 @@ s16 func_80074A4C(GhostHeader *ghostHeader) {
GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074A4C.s")
#endif
void func_80074AA8(GhostHeader *ghostHeader, s16 characterID, s16 time, s16 numberFrames, u8 *dest) {
void func_80074AA8(GhostHeader *ghostHeader, s16 characterID, s16 time, s16 nodeCount, u8 *dest) {
ghostHeader->checksum = 0;
ghostHeader->characterID = characterID;
ghostHeader->unk3 = 0;
ghostHeader->time = time;
ghostHeader->numberFrames = numberFrames;
bcopy(dest, (u8*)ghostHeader + 8, numberFrames * sizeof(GhostDataFrame));
ghostHeader->nodeCount = nodeCount;
bcopy(dest, (u8*)ghostHeader + 8, nodeCount * sizeof(GhostDataFrame));
ghostHeader->checksum = func_80074A4C(ghostHeader);
}
+1 -20
View File
@@ -9,25 +9,6 @@
#include "structs.h"
#include "camera.h"
typedef struct GhostHeaderChecksum {
u8 levelID;
u8 vehicleID; // 0 = Car, 1 = Hovercraft, 2 = Plane
} GhostHeaderChecksum;
typedef struct GhostHeader {
//GhostHeaderChecksum checksum;
s16 checksum;
u8 characterID; // 9 = T.T.
u8 unk3; // Might just be padding?
s16 time; // In frames, where 60 frames = 1 second.
s16 numberFrames;
} GhostHeader;
/* Size: 12 bytes */
typedef struct GhostDataFrame {
u8 pad0[12];
} GhostDataFrame;
extern s32 *D_800DE440;
extern u8 gN64FontCodes[68];
extern s32 D_800DE488;
@@ -40,7 +21,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 characterID, s16 time, s16 numberFrames, u8 *dest);
void func_80074AA8(GhostHeader *ghostHeader, s16 characterID, s16 time, s16 nodeCount, u8 *dest);
s32 func_80075AEC(s32 controllerIndex);
s32 func_80075D38(s32 controllerIndex);
s32 func_80075DC4(s32 controllerIndex);
-2
View File
@@ -125,8 +125,6 @@ typedef struct FontData {
#define unk8012A7E8_TOTAL_SIZE (sizeof(unk8012A7E8) * unk8012A7E8_COUNT)
#define unk8012A7EC_TOTAL_SIZE (sizeof(unk8012A7EC) * unk8012A7EC_COUNT)
//TextureHeader *load_texture(s32 arg0); //texture_sprites.c NON_MATCHING
void load_fonts(void);
void func_800C4164(s32 arg0);
void set_text_font(s32 arg0);
+1
View File
@@ -4,6 +4,7 @@
#include "game_text.h"
#include "menu.h"
#include "unknown_00BC20.h"
#include "unknown_043920.h"
/************ .data ************/
-2
View File
@@ -21,8 +21,6 @@ typedef struct unk8012A798 {
extern u32 osTvType;
void func_8005A3B0(void); //unknown_043920.c
void func_800C29F0(void);
void func_800C2AB4(void);
void func_800C2AF4(s32 arg0);
+2 -1
View File
@@ -71,7 +71,8 @@ typedef struct unk800B7D10 {
s32 unk14;
} unk800B7D10;
unk800B7D10 *get_stack_pointer(void); // Non Matching with own file
//Functions below don't have files or matches yet
unk800B7D10 *get_stack_pointer(void); // Non Matching with own file?
s32 *func_8006F510(void); // Non Matching unknown_070110
void func_8006F53C(s32*); // Non Matching unknown_070110
+1
View File
@@ -22,6 +22,7 @@
#include "thread30.h"
#include "unknown_00BC20.h"
#include "unknown_06B2B0.h"
#include "unknown_078050.h"
/**
* @file Contains all the code used for every menu in the game.
+1 -4
View File
@@ -646,10 +646,7 @@ extern s16 D_800E1E2C[10];
extern s16 D_800E1E40[10];
void render_textured_rectangle(Gfx **dlist, DrawTexture *arg1,
s32 arg2, s32 arg3, u8 red, u8 green, u8 blue, u8 alpha); // Non Matching src/unknown_078050.c
void func_80078D00(Gfx**, void *element, s32, s32, f32, f32, u32, s32); //Non Matching src/unknown_078050.c
s32 get_random_number_from_range(s32, s32); // Non Matching src/unknown_070110.c
s32 get_random_number_from_range(s32, s32); // No file to pull from yet.
void func_8007FF88(void);
void func_80080E6C(void);
+2
View File
@@ -5,6 +5,8 @@
#include "macros.h"
#include "memory.h"
#include "asset_sections.h"
#include "unknown_0255E0.h"
#include "unknown_043920.h"
/************ .data ************/
-3
View File
@@ -14,9 +14,6 @@ typedef struct unk8011D624 {
extern s32 D_800DCEA0;
extern s32 D_800DCEA4;
void func_80024D54(Gfx *, s32, s32, s32, s32); //Non Matching src/unknown_0255E0.c
void func_8005C25C(void); //src/unkown_043920.c
void func_8005F850(void);
void func_800619F4(s32 arg0);
+1 -1
View File
@@ -281,7 +281,7 @@ void func_800049F8(void * sndState,s16 type, u32 arg2) {
}
u16 func_80004A3C(u8 arg0){
u16 func_80004A3C(u8 arg0) {
return D_80119C28[arg0];
}
+1 -1
View File
@@ -115,10 +115,10 @@ void func_800049D8(void);
void func_800049F8(void * sndState,s16 type, u32 arg2);
u16 func_80004A3C(u8 arg0);
// Non Matching
ALMicroTime _sndpVoiceHandler(void *node);
void func_80004668(ALBank *bnk, s16 sndIndx, u8, s32);
void audioNewThread(ALSynConfig *c, OSPri p, s32 arg2);
void func_80004A60(u8, u16); //Could be s32, s32
#endif
+2
View File
@@ -8,5 +8,7 @@ void func_80008168(void);
void func_80009558(u16, f32 x, f32 y, f32 z, s32, s32 *); // Non Matching
void func_80009968(f32, f32, f32, u8, u8, s32); // Non Matching
void func_800096D8(s32, f32, f32, f32); // Non Matching
// Yeah this one seems excessive, and it's Non Matching
void func_800098A4(s32, s32, f32, f32, f32, s32, s32, s32, s32, s32, s32, s32, s32);
#endif
+1
View File
@@ -12,6 +12,7 @@
#include "thread0_epc.h"
#include "controller_pak.h"
#include "unknown_06B2B0.h"
#include "unknown_043920.h"
/************ .data ************/
+3 -1
View File
@@ -116,7 +116,6 @@ extern s32 D_800DC85C;
extern u8 D_800DC860;
extern u16 D_800DC864;
void free_tt_ghost_data(void); //unknown_043920.c
f32 func_800707F8(s16); //?
Object *func_8000BF44(s32 arg0);
@@ -232,5 +231,8 @@ s32 func_80014814(s32 *);
void func_80015348(s32, s32);
Object *func_8000EA54(unk80027FC4*, s32);
s32 func_8001F460(Object*, s32, Object*);
void func_80011570(Object *, f32, f32, f32);
s32 func_80016DE8(f32, f32, f32, f32, s32, unk80042178 *);
#endif
+1
View File
@@ -14,6 +14,7 @@
#include "memory.h"
#include "unknown_043920.h"
#include "camera.h"
#include "waves.h"
/************ .data ************/

Some files were not shown because too many files have changed in this diff Show More