mirror of
https://gitlab.com/dk64_decomp/dk64.git
synced 2024-11-23 07:01:58 +00:00
Cleanup & Fix Warnings
This commit is contained in:
parent
59df44a278
commit
fcf74e1f86
@ -66,8 +66,7 @@ void func_global_asm_8067DF44(f32, f32, f32, f32, u8, u8);
|
||||
void func_global_asm_807149C8(u8 arg0, u8 arg1, u8 arg2, u8 arg3);
|
||||
f32 func_global_asm_80665E94(f32, f32, f32, f32, f32, f32, s16);
|
||||
|
||||
// Heap stuff???
|
||||
// void func_global_asm_8061130C(void *);
|
||||
void func_global_asm_8061130C(void *);
|
||||
|
||||
// TODO: Signatures are suspect
|
||||
// Returns index into object model2 array
|
||||
@ -291,8 +290,8 @@ void func_global_asm_8067BD08(void);
|
||||
void func_global_asm_80689114(s16 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4, f32 arg5, Actor *arg6);
|
||||
void func_global_asm_8067BD28(void);
|
||||
void func_global_asm_8067BDB8(void);
|
||||
void func_global_asm_8067BDF8();
|
||||
void func_global_asm_8067BF4C();
|
||||
void func_global_asm_8067BDF8(void);
|
||||
void func_global_asm_8067BF4C(void);
|
||||
void func_global_asm_8067C67C(void);
|
||||
void func_global_asm_8067C69C(void);
|
||||
void func_global_asm_8067C6BC(void);
|
||||
@ -303,20 +302,20 @@ void func_global_asm_8067E2E4(Actor *arg0, u8 arg1, f32 arg2);
|
||||
void func_global_asm_8067E348(void);
|
||||
void func_global_asm_8067E3D0(void);
|
||||
void func_global_asm_8067E4D4();
|
||||
void func_global_asm_8067E69C();
|
||||
void func_global_asm_8067E6C4();
|
||||
void func_global_asm_8067E6E4();
|
||||
void func_global_asm_8067E704();
|
||||
void func_global_asm_8067E724();
|
||||
void func_global_asm_8067E69C(void);
|
||||
void func_global_asm_8067E6C4(void);
|
||||
void func_global_asm_8067E6E4(void);
|
||||
void func_global_asm_8067E704(void);
|
||||
void func_global_asm_8067E724(void);
|
||||
void func_global_asm_8067E764(void);
|
||||
void func_global_asm_80680774(void);
|
||||
void func_global_asm_8068086C();
|
||||
u8 func_global_asm_80680908(void);
|
||||
void func_global_asm_8068408C(Actor *arg0);
|
||||
void func_global_asm_8068412C(void);
|
||||
void func_global_asm_806844EC();
|
||||
void func_global_asm_8068450C();
|
||||
void func_global_asm_8068452C();
|
||||
void func_global_asm_806844EC(void);
|
||||
void func_global_asm_8068450C(void);
|
||||
void func_global_asm_8068452C(void);
|
||||
s32 func_global_asm_80663040(s32 arg0);
|
||||
void func_global_asm_80714A9C(void);
|
||||
void func_global_asm_80714670(void);
|
||||
@ -497,9 +496,9 @@ void func_global_asm_8069904C(void);
|
||||
void func_global_asm_8072B324(Actor*, s32);
|
||||
void func_global_asm_806B6958(void);
|
||||
void func_global_asm_806B6C88(s16 arg0, s16 arg1);
|
||||
void func_global_asm_806B75F4();
|
||||
void func_global_asm_806B761C();
|
||||
void func_global_asm_806B7660();
|
||||
void func_global_asm_806B75F4(void);
|
||||
void func_global_asm_806B761C(void);
|
||||
void func_global_asm_806B7660(void);
|
||||
void func_global_asm_806C71A0(void);
|
||||
void func_global_asm_806C71A8(void);
|
||||
void func_global_asm_806C71B0(void);
|
||||
@ -1996,7 +1995,7 @@ void func_global_asm_8065F4F4(GlobalASMStruct58 *arg0);
|
||||
void func_global_asm_80657E24(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 *arg8, s32 *arg9, s32 *argA, s32 *argB);
|
||||
void func_global_asm_8063DED0(OM2_unk7C *arg0);
|
||||
void func_global_asm_8063E078(OM2_unk7C *arg0);
|
||||
void func_global_asm_8061134C(HeapHeader *arg0);
|
||||
void func_global_asm_8061134C(void *arg0);
|
||||
s32 func_global_asm_806419F8(void);
|
||||
void func_global_asm_80641BCC(s16 arg0, s16 arg1, s16 arg2);
|
||||
void func_global_asm_80643274(s32 arg0, s16 arg1, s16 arg2, s16 arg3);
|
||||
|
@ -1725,11 +1725,11 @@ typedef struct {
|
||||
u8 unk15;
|
||||
u8 unk16;
|
||||
u8 unk17;
|
||||
s32 unk18;
|
||||
void *unk18;
|
||||
} OM2_unk28;
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
void *unk0;
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
u8 unkC[0x24 - 0xC];
|
||||
|
@ -1,15 +1,6 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
|
||||
void func_global_asm_80627948(Actor*, s32, s32, s32);
|
||||
u8 func_global_asm_8070E750(u8, s32, s32);
|
||||
|
||||
void *func_global_asm_8068DC54(s32, s32, s32, void *, s32, void *);
|
||||
s32 func_global_asm_806FE078(void *, u8, s32, f32, f32, f32, f32);
|
||||
extern u8* D_bonus_8002D8B0[];
|
||||
int func_global_asm_80717404(); // TODO: Signature
|
||||
extern void* D_global_asm_8074E880[];
|
||||
|
||||
typedef struct {
|
||||
u8 unk0[0x14 - 0x0];
|
||||
u8 unk14;
|
||||
@ -19,6 +10,7 @@ typedef struct {
|
||||
u8 unk19;
|
||||
} AAD_bonus_800252A0;
|
||||
|
||||
extern u8* D_bonus_8002D8B0[];
|
||||
|
||||
// rodata
|
||||
const u32 D_bonus_8002DC90[] = {
|
||||
@ -52,7 +44,15 @@ const f64 D_bonus_8002DD08 = 90.0;
|
||||
const f64 D_bonus_8002DD10 = 0.3;
|
||||
*/
|
||||
|
||||
void func_bonus_800252A0(Gfx *dl, Actor *arg1) {
|
||||
extern void* D_global_asm_8074E880[];
|
||||
|
||||
void func_global_asm_80627948(Actor*, s32, s32, s32);
|
||||
u8 func_global_asm_8070E750(u8, s32, s32);
|
||||
Gfx *func_global_asm_8068DC54(Gfx *, s32, s32, void *, s32, void *);
|
||||
Gfx *func_global_asm_806FE078(Gfx *, u8, s32, f32, f32, f32, f32);
|
||||
int func_global_asm_80717404(); // TODO: Signature
|
||||
|
||||
Gfx *func_bonus_800252A0(Gfx *dl, Actor *arg1) {
|
||||
AAD_bonus_800252A0 *aaD;
|
||||
aaD = arg1->additional_actor_data;
|
||||
gDPPipeSync(dl++);
|
||||
@ -62,7 +62,8 @@ void func_bonus_800252A0(Gfx *dl, Actor *arg1) {
|
||||
gSPDisplayList(dl++, &D_1000118);
|
||||
gSPMatrix(dl++, &D_2000080, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(dl++, &D_2000180, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
func_global_asm_8068DC54(func_global_asm_806FE078(dl, aaD->unk19, 8, 30.0f, 36.0f, 0.0f, 1.5f), 0x26, 0x32, &aaD->unk14, aaD->unk16, &aaD->unk18);
|
||||
dl = func_global_asm_806FE078(dl, aaD->unk19, 8, 30.0f, 36.0f, 0.0f, 1.5f);
|
||||
return func_global_asm_8068DC54(dl, 0x26, 0x32, &aaD->unk14, aaD->unk16, &aaD->unk18);
|
||||
}
|
||||
|
||||
Actor* func_bonus_800253E4(s32 arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
@ -188,11 +189,8 @@ void func_bonus_800264E0(u8 arg0, u8 arg1) {
|
||||
}
|
||||
|
||||
void func_bonus_800265C0(u8 arg0, u8 arg1) {
|
||||
u8 temp;
|
||||
|
||||
current_actor_pointer->unk11C->control_state = 0;
|
||||
temp = (u8) arg1;
|
||||
func_global_asm_8069D2AC(0x81, 0, 0x78, func_global_asm_8070E750(0x1A, temp, 1), 0, 0x28, 8, 8);
|
||||
func_global_asm_8069D2AC(0x81, 0, 0x78, func_global_asm_8070E750(0x1A, arg1, 1), 0, 0x28, 8, 8);
|
||||
playSong(0x57, 1.0f);
|
||||
func_global_asm_806EB0C0(0x43, NULL, 0);
|
||||
current_actor_pointer->control_state++;
|
||||
|
@ -1,15 +1,6 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
|
||||
extern s8 D_bonus_8002D910[];
|
||||
extern s8 D_bonus_8002D91C[];
|
||||
extern s8 D_bonus_8002D920;
|
||||
extern s8 D_bonus_8002D924;
|
||||
extern s8 D_bonus_8002D928;
|
||||
extern s8 D_bonus_8002D92C;
|
||||
extern s8 D_bonus_8002D930;
|
||||
extern s8 D_bonus_8002DEF0[];
|
||||
|
||||
typedef struct {
|
||||
s8 unk0;
|
||||
s8 unk1;
|
||||
@ -26,7 +17,35 @@ typedef struct {
|
||||
u8 unkD;
|
||||
} AAD_8002D010;
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
u8 unk2;
|
||||
u8 unk3;
|
||||
s16 unk4;
|
||||
u8 unk6;
|
||||
u8 unk7;
|
||||
u8 unk8;
|
||||
u8 unk9;
|
||||
s16 unkA;
|
||||
u8 unkC;
|
||||
u8 unkD;
|
||||
} AAD_8002D2F0;
|
||||
|
||||
extern s8 D_bonus_8002D910[];
|
||||
extern s8 D_bonus_8002D91C[];
|
||||
extern s8 D_bonus_8002D920;
|
||||
extern s8 D_bonus_8002D924;
|
||||
extern s8 D_bonus_8002D928;
|
||||
extern s8 D_bonus_8002D92C;
|
||||
extern s8 D_bonus_8002D930;
|
||||
extern s8 D_bonus_8002DEF0[];
|
||||
extern s16 D_80744518;
|
||||
extern u16 D_807ECD60;
|
||||
|
||||
Gfx *func_global_asm_806FE078(Gfx *, u8, s32, f32, f32, f32, f32);
|
||||
s8 func_global_asm_806FDB8C(s32, void*, s32, f32, f32, f32);
|
||||
s32 func_global_asm_806A2A10(s32, s32, u8);
|
||||
void func_global_asm_8061CB08(void);
|
||||
|
||||
Gfx *func_bonus_8002D010(Gfx *dl, Actor *arg1) {
|
||||
s16 pad;
|
||||
@ -76,28 +95,6 @@ Gfx *func_bonus_8002D010(Gfx *dl, Actor *arg1) {
|
||||
return dl;
|
||||
}
|
||||
|
||||
extern s16 D_80744518;
|
||||
extern u16 D_807ECD60;
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
u8 unk2;
|
||||
u8 unk3;
|
||||
s16 unk4;
|
||||
u8 unk6;
|
||||
u8 unk7;
|
||||
u8 unk8;
|
||||
u8 unk9;
|
||||
s16 unkA;
|
||||
u8 unkC;
|
||||
u8 unkD;
|
||||
} AAD_8002D2F0;
|
||||
|
||||
s8 func_global_asm_806FDB8C(s32, void*, s32, f32, f32, f32);
|
||||
s32 func_global_asm_806A2A10(s32, s32, u8);
|
||||
|
||||
void func_global_asm_8061CB08(void);
|
||||
|
||||
void func_bonus_8002D2F0(void) {
|
||||
s32 var_a0;
|
||||
u32 sp28;
|
||||
@ -153,7 +150,7 @@ void func_bonus_8002D2F0(void) {
|
||||
current_actor_pointer->control_state = 3;
|
||||
aaD->unk0 = 0x78;
|
||||
}
|
||||
switch (current_map) { // irregular
|
||||
switch (current_map) {
|
||||
case MAP_RAMBI_ARENA:
|
||||
D_bonus_8002D930--;
|
||||
if (D_bonus_8002D930 <= 0) {
|
||||
|
@ -98,8 +98,8 @@ void func_global_asm_806FDAEC(s16 arg0) {
|
||||
} else {
|
||||
D_global_asm_80754AD0 = var_a1->next;
|
||||
}
|
||||
func_global_asm_8061130C(var_a1->unk4, var_a1);
|
||||
func_global_asm_8061130C(var_a1->unk8, var_a1);
|
||||
func_global_asm_8061130C(var_a1->unk4);
|
||||
func_global_asm_8061130C(var_a1->unk8);
|
||||
func_global_asm_8061130C(var_a1);
|
||||
}
|
||||
|
||||
|
@ -658,11 +658,11 @@ s32 func_global_asm_80634768(Struct80634768 *arg0, Struct80634768_arg1 *arg1, f3
|
||||
void func_global_asm_806348B4(OM2_unk48 *arg0);
|
||||
|
||||
void func_global_asm_806348B4(OM2_unk48 *arg0) {
|
||||
s32 temp_a2;
|
||||
void *temp_a2 = arg0->unk0;
|
||||
|
||||
if (arg0->unk0 != 0) {
|
||||
if (temp_a2 != NULL) {
|
||||
if (arg0->unk24 & 1) {
|
||||
func_global_asm_8061130C(arg0->unk0, arg0);
|
||||
func_global_asm_8061130C(temp_a2);
|
||||
}
|
||||
}
|
||||
arg0->unk24 &= 0xFFFE;
|
||||
|
@ -920,9 +920,10 @@ void func_global_asm_80655AD0(void) {
|
||||
}
|
||||
for (i = 0; i < D_global_asm_807F6C28; i++) {
|
||||
if (chunk_array_pointer[i].unk3 && chunk_array_pointer[i].visible != 2 && !chunk_array_pointer[i].unk4) {
|
||||
if (chunk_array_pointer[i].unk60[D_global_asm_807444FC]) {
|
||||
func_global_asm_8061130C(chunk_array_pointer[i].unk60[D_global_asm_807444FC]);
|
||||
chunk_array_pointer[i].unk60[D_global_asm_807444FC] = 0;
|
||||
void *temp = chunk_array_pointer[i].unk60[D_global_asm_807444FC];
|
||||
if (temp != NULL) {
|
||||
func_global_asm_8061130C(temp);
|
||||
chunk_array_pointer[i].unk60[D_global_asm_807444FC] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,8 +120,6 @@ void func_global_asm_80663A0C(Actor *arg0, GlobalASMStruct84 *arg1) {
|
||||
arg0->unk156++;
|
||||
}
|
||||
|
||||
void func_global_asm_8061130C(GlobalASMStruct83 *);
|
||||
|
||||
void func_global_asm_80663A80(void) {
|
||||
Actor *temp_v1;
|
||||
GlobalASMStruct83 **var_s1;
|
||||
|
@ -82,9 +82,10 @@ void func_global_asm_8066C8B0(s32 arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4,
|
||||
}
|
||||
|
||||
void func_global_asm_8066C904(OM2_unk28 *arg0) {
|
||||
if (arg0->unk18 != 0) {
|
||||
void *temp = arg0->unk18;
|
||||
if (temp != NULL) {
|
||||
if (arg0->unk15 & 1) {
|
||||
func_global_asm_8061130C(arg0->unk18, arg0);
|
||||
func_global_asm_8061130C(temp);
|
||||
}
|
||||
}
|
||||
arg0->unk15 &= 0xFFFE;
|
||||
|
@ -90,14 +90,15 @@ void func_global_asm_8067BDB8(void) {
|
||||
current_actor_pointer->y_position = current_actor_pointer->floor;
|
||||
}
|
||||
|
||||
void func_global_asm_8067BDF8() {
|
||||
s8 sp1F;
|
||||
s32 temp_a1;
|
||||
typedef struct {
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
} AAD_8067BDF8;
|
||||
|
||||
sp1F = 0;
|
||||
// TODO: Which aaD type are they actually expecting here?
|
||||
temp_a1 = current_actor_pointer->PaaD;
|
||||
func_global_asm_8067BF84(0x13, temp_a1, temp_a1 + 1, &sp1F);
|
||||
void func_global_asm_8067BDF8(void) {
|
||||
s8 sp1F = 0;
|
||||
AAD_8067BDF8 *temp_a1 = current_actor_pointer->additional_actor_data;
|
||||
func_global_asm_8067BF84(0x13, temp_a1, &temp_a1->unk1, &sp1F);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_80150/func_global_asm_8067BE30.s")
|
||||
@ -146,12 +147,17 @@ void func_global_asm_8067BE30(void) {
|
||||
}
|
||||
*/
|
||||
|
||||
void func_global_asm_8067BF4C() {
|
||||
s32 temp_v0;
|
||||
typedef struct {
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
u8 unk2;
|
||||
u8 unk3;
|
||||
u8 unk4;
|
||||
} AAD_8067BF4C;
|
||||
|
||||
// TODO: Which aaD type are they actually expecting here?
|
||||
temp_v0 = current_actor_pointer->PaaD;
|
||||
func_global_asm_8067BF84(0x1A, temp_v0 + 2, temp_v0 + 3, temp_v0 + 4);
|
||||
void func_global_asm_8067BF4C(void) {
|
||||
AAD_8067BF4C *temp_v0 = current_actor_pointer->additional_actor_data;
|
||||
func_global_asm_8067BF84(0x1A, &temp_v0->unk2, &temp_v0->unk3, &temp_v0->unk4);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_80150/func_global_asm_8067BF84.s")
|
||||
@ -516,24 +522,24 @@ void func_global_asm_8067E510(void) {
|
||||
func_global_asm_8067E784();
|
||||
}
|
||||
|
||||
void func_global_asm_8067E69C() {
|
||||
void func_global_asm_8067E69C(void) {
|
||||
func_global_asm_8067E784();
|
||||
func_global_asm_8067E43C();
|
||||
}
|
||||
|
||||
void func_global_asm_8067E6C4() {
|
||||
void func_global_asm_8067E6C4(void) {
|
||||
func_global_asm_8067E784();
|
||||
}
|
||||
|
||||
void func_global_asm_8067E6E4() {
|
||||
void func_global_asm_8067E6E4(void) {
|
||||
func_global_asm_8067E784();
|
||||
}
|
||||
|
||||
void func_global_asm_8067E704() {
|
||||
void func_global_asm_8067E704(void) {
|
||||
func_global_asm_8067E784();
|
||||
}
|
||||
|
||||
void func_global_asm_8067E724() {
|
||||
void func_global_asm_8067E724(void) {
|
||||
if ((current_actor_pointer->object_properties_bitfield & 0x10) == 0) {
|
||||
current_actor_pointer->draw_distance = 800;
|
||||
}
|
||||
@ -1061,14 +1067,14 @@ void func_global_asm_8068412C(void) {
|
||||
func_global_asm_806319C4(current_actor_pointer, 0);
|
||||
}
|
||||
|
||||
void func_global_asm_806844EC() {
|
||||
void func_global_asm_806844EC(void) {
|
||||
func_global_asm_8068412C();
|
||||
}
|
||||
|
||||
void func_global_asm_8068450C() {
|
||||
void func_global_asm_8068450C(void) {
|
||||
func_global_asm_8068412C();
|
||||
}
|
||||
|
||||
void func_global_asm_8068452C() {
|
||||
void func_global_asm_8068452C(void) {
|
||||
func_global_asm_8068412C();
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ void func_global_asm_806978FC(void) {
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_9BF30/func_global_asm_80697988.s")
|
||||
|
||||
void func_global_asm_80697230(void);
|
||||
void func_global_asm_8061130C(void *);
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
|
@ -325,7 +325,7 @@ void func_global_asm_8069DA54(void) {
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
func_global_asm_8061130C(temp_a3->unk0, current_actor_pointer);
|
||||
func_global_asm_8061130C(temp_a3->unk0);
|
||||
func_global_asm_806782C0(current_actor_pointer);
|
||||
break;
|
||||
}
|
||||
|
@ -125,12 +125,12 @@ void func_global_asm_806B6C88(s16 arg0, s16 arg1) {
|
||||
// Jumptable
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_BB300/func_global_asm_806B6DB0.s")
|
||||
|
||||
void func_global_asm_806B75F4() {
|
||||
void func_global_asm_806B75F4(void) {
|
||||
func_global_asm_80729B00();
|
||||
func_global_asm_806B6DB0(10000);
|
||||
}
|
||||
|
||||
void func_global_asm_806B761C() {
|
||||
void func_global_asm_806B761C(void) {
|
||||
func_global_asm_80729B00();
|
||||
if (D_global_asm_807FBD70 == 4) {
|
||||
func_global_asm_80724C2C(-100);
|
||||
@ -138,7 +138,7 @@ void func_global_asm_806B761C() {
|
||||
func_global_asm_806B6DB0(10000);
|
||||
}
|
||||
|
||||
void func_global_asm_806B7660() {
|
||||
void func_global_asm_806B7660(void) {
|
||||
func_global_asm_80729B00();
|
||||
if (D_global_asm_807FBD70 == 4) {
|
||||
func_global_asm_80724C2C(-100);
|
||||
|
@ -169,16 +169,15 @@ void *func_global_asm_806111F8(s32 arg0, u32 arg1) {
|
||||
*/
|
||||
|
||||
// free()?
|
||||
void func_global_asm_8061130C(HeapHeader *arg0) {
|
||||
void func_global_asm_8061130C(void *arg0) {
|
||||
// TODO: Oof, I don't like the second condition there but it does match...
|
||||
if ((arg0 != D_global_asm_807F5A64) && ((--arg0)->unkB == 0)) {
|
||||
if (((HeapHeader*)arg0 != D_global_asm_807F5A64) && ((HeapHeader*)arg0 -= 1)->unkB == 0) {
|
||||
func_global_asm_80611408(arg0);
|
||||
}
|
||||
}
|
||||
|
||||
void func_global_asm_8061134C(HeapHeader *arg0) {
|
||||
// TODO: Oof, I don't like the second condition there but it does match...
|
||||
if ((arg0 != D_global_asm_807F5A64) && ((--arg0)->unkB == 0)) {
|
||||
void func_global_asm_8061134C(void *arg0) {
|
||||
if (((HeapHeader*)arg0 != D_global_asm_807F5A64) && ((HeapHeader*)arg0 -= 1)->unkB == 0) {
|
||||
func_global_asm_8061138C(arg0);
|
||||
}
|
||||
}
|
||||
|
@ -81,16 +81,8 @@ extern u16 D_global_asm_80750AC4;
|
||||
|
||||
u32 func_global_asm_806119A0(void);
|
||||
void func_race_8002D338(Actor *arg0, RaceStruct0 *arg1);
|
||||
s32 func_race_8002E8EC(s32, s32, s32);
|
||||
s32 func_race_8002E8EC(s32 arg0, s32 arg1, s32 arg2);
|
||||
void func_race_80025E9C(Actor *);
|
||||
void func_race_80025FDC();
|
||||
void func_race_80029488();
|
||||
void func_race_8002E9F8(s32 *checkpointFile);
|
||||
void func_race_8002D064();
|
||||
void func_race_8002D0FC();
|
||||
|
||||
extern void func_race_8002CFF0();
|
||||
extern void func_race_8002CFF0(void);
|
||||
|
||||
f32 func_global_asm_80665E48(f32, f32, f32, f32);
|
||||
|
||||
|
@ -1,13 +1,6 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
|
||||
void func_race_80025FDC();
|
||||
void func_race_80029488();
|
||||
void func_race_8002E9F8(s32 *checkpointFile);
|
||||
void func_race_8002D064();
|
||||
void func_race_8002D0FC();
|
||||
extern void func_race_8002CFF0();
|
||||
|
||||
s32 func_global_asm_806119A0(void);
|
||||
f32 func_global_asm_80665E48(f32, f32, f32, f32);
|
||||
s32 func_global_asm_8072177C(void *, s16, s16, s16, s32, s32, s32, s32, s32);
|
||||
|
@ -154,8 +154,9 @@ void func_race_800292D0(Actor *arg0) {
|
||||
}
|
||||
|
||||
// need this forward declaration
|
||||
void initializeSealRace();
|
||||
void sealRaceSetup() {
|
||||
void initializeSealRace(void);
|
||||
|
||||
void sealRaceSetup(void) {
|
||||
initializeSealRace();
|
||||
}
|
||||
|
||||
@ -275,6 +276,8 @@ void func_race_80029F88(Actor *arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
}
|
||||
*/
|
||||
|
||||
s32 func_race_8002E8EC(void *arg0, void *arg1, s32 arg2);
|
||||
|
||||
s32 func_race_8002A080(Struct8002E8EC_arg0 *arg0, Struct8002E8EC_arg1 *arg1) {
|
||||
return D_race_8002FC5C[func_race_8002E8EC(arg0, arg1, 0xA)];
|
||||
}
|
||||
|
@ -10,6 +10,11 @@ D_race_80030108 .float 0.3f
|
||||
D_race_80030110 .double 0.15
|
||||
*/
|
||||
|
||||
void func_race_8002E2C8(Actor *arg0);
|
||||
void func_race_80025E9C(Actor *);
|
||||
|
||||
Gfx *func_global_asm_805FD030(Gfx *);
|
||||
|
||||
void func_race_8002BBD0(Actor *arg0, s32 arg1) {
|
||||
RaceAdditionalActorData *sp1C;
|
||||
RaaD_unk20 *temp_v0;
|
||||
@ -191,8 +196,6 @@ void func_race_8002BDDC(Gfx *dl, Actor *arg1, f32 arg2, f32 arg3, u8 arg4, u8 ar
|
||||
// Displaylist stuff
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_7BD0/func_race_8002C2E8.s")
|
||||
|
||||
Gfx *func_global_asm_805FD030(Gfx *);
|
||||
|
||||
typedef struct {
|
||||
u8 unk0[0x50 - 0x0];
|
||||
f32 unk50[1][4][4];
|
||||
@ -272,7 +275,7 @@ void func_race_8002CFF0(void) {
|
||||
temp_v0->unk24 = 2;
|
||||
}
|
||||
|
||||
void castleCarRaceSetup() {
|
||||
void castleCarRaceSetup(void) {
|
||||
RaceAdditionalActorData2 *RaaD;
|
||||
|
||||
func_global_asm_80677FA8(ACTOR_UNKNOWN_306, 0); // Spawn actor 306
|
||||
@ -282,7 +285,7 @@ void castleCarRaceSetup() {
|
||||
RaaD->unk24 = 2;
|
||||
}
|
||||
|
||||
void initializeSealRace() {
|
||||
void initializeSealRace(void) {
|
||||
RaceAdditionalActorData2 *RaaD;
|
||||
|
||||
func_global_asm_80677FA8(ACTOR_UNKNOWN_306, 0); // Spawn actor 306
|
||||
@ -292,8 +295,6 @@ void initializeSealRace() {
|
||||
RaaD->unk24 = 2;
|
||||
}
|
||||
|
||||
void func_race_8002E2C8(Actor *arg0);
|
||||
|
||||
void func_race_8002D0FC(void) {
|
||||
RaceAdditionalActorData2 *RaaD;
|
||||
|
||||
@ -764,8 +765,6 @@ void func_race_8002E464(s32 arg0, Actor *arg1) {
|
||||
func_race_8002CAC8(arg0, arg1, arg1->PaaD);
|
||||
}
|
||||
|
||||
extern void func_race_8002E464(); // TODO: Signature
|
||||
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
s32 unk4;
|
||||
@ -930,16 +929,14 @@ s32 func_race_8002E8EC(Struct8002E8EC_arg0 *arg0, Struct8002E8EC_arg1 *arg1, s32
|
||||
|
||||
if (arg1->unk45 != 0) {
|
||||
var_v1 = 0;
|
||||
} else {
|
||||
if (arg0->unk36 != 0) {
|
||||
if (func_global_asm_806F8AD4(0xB, 0) >= arg2) {
|
||||
var_v1 = 1;
|
||||
} else {
|
||||
var_v1 = 3;
|
||||
}
|
||||
} else if (arg0->unk36 != 0) {
|
||||
if (func_global_asm_806F8AD4(0xB, 0) >= arg2) {
|
||||
var_v1 = 1;
|
||||
} else {
|
||||
var_v1 = 2;
|
||||
var_v1 = 3;
|
||||
}
|
||||
} else {
|
||||
var_v1 = 2;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
|
@ -1,7 +1,46 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
|
||||
extern u16 D_global_asm_80750AC4;
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
u16 unk6;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
u8 unk10;
|
||||
u8 unk11;
|
||||
u8 unk12;
|
||||
u8 unk13;
|
||||
f32 unk14;
|
||||
u8 unk18;
|
||||
u8 unk19;
|
||||
u16 unk1A;
|
||||
s32 unk1C[1]; // TODO: How many?
|
||||
} Struct8002EDD4_arg0;
|
||||
|
||||
// TODO: Is this the same as RaceStruct6?
|
||||
typedef struct RaceStruct13 {
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u16 *unk4;
|
||||
u16 unk8;
|
||||
u16 unkA;
|
||||
s32 unkC;
|
||||
s32 unk10;
|
||||
s32 unk14;
|
||||
s32 unk18;
|
||||
s32 unk1C;
|
||||
s32 unk20;
|
||||
s32 unk24;
|
||||
s32 unk28;
|
||||
s32 unk2C;
|
||||
s32 unk30;
|
||||
s32 unk34;
|
||||
s16 unk38;
|
||||
u16 unk3A;
|
||||
u16 unk3C;
|
||||
} RaceStruct13;
|
||||
|
||||
// TODO: Any struct overlap with existing structs?
|
||||
typedef struct {
|
||||
@ -60,8 +99,36 @@ typedef struct RaceStruct2 {
|
||||
s16 unkA;
|
||||
RaceStruct2_unkC *unkC;
|
||||
} RaceStruct2;
|
||||
|
||||
extern RaceStruct2 *D_race_8002FCF0;
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
s16 unk6;
|
||||
} Struct8002F280_arg0;
|
||||
|
||||
typedef struct RaceStruct10 {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
s16 unk6;
|
||||
f32 unk8;
|
||||
f32 unkC;
|
||||
} RaceStruct10;
|
||||
|
||||
extern u16 D_global_asm_80750AC4;
|
||||
|
||||
void func_race_80025FDC();
|
||||
void func_race_8002D0FC();
|
||||
void func_race_8002DCF0(void*, s32);
|
||||
void *func_race_8002E960(u8);
|
||||
void *func_race_8002E9AC(u8);
|
||||
f32 func_race_8002F04C(f32, f32, f32, f32, f32, f32, f32, f32);
|
||||
void func_race_8002F36C(RaceStruct13*, RaceStruct13*);
|
||||
void func_race_8002E9F8(s32 *checkpointFile);
|
||||
|
||||
// regalloc
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_A960/func_race_8002E960.s")
|
||||
|
||||
@ -140,24 +207,6 @@ void func_race_8002ED04(f32 arg0, s32 arg1, u8 arg2) {
|
||||
sp1C->unk0 = arg1;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
u16 unk6;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
u8 unk10;
|
||||
u8 unk11;
|
||||
u8 unk12;
|
||||
u8 unk13;
|
||||
f32 unk14;
|
||||
u8 unk18;
|
||||
u8 unk19;
|
||||
u16 unk1A;
|
||||
s32 unk1C[1]; // TODO: How many?
|
||||
} Struct8002EDD4_arg0;
|
||||
|
||||
void func_race_8002EDD4(Struct8002EDD4_arg0 *arg0) {
|
||||
f32 spD0[4][4];
|
||||
f32 sp90[4][4];
|
||||
@ -206,29 +255,12 @@ f32 func_race_8002F04C(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_A960/func_race_8002F0AC.s")
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
s16 unk6;
|
||||
} Struct8002F280_arg0;
|
||||
|
||||
u8 func_race_8002F280(Struct8002F280_arg0 *arg0) {
|
||||
f32 p1 = (current_actor_pointer->x_position - arg0->unk0);
|
||||
f32 p2 = (current_actor_pointer->z_position - arg0->unk4);
|
||||
return func_global_asm_806CC14C((s16)(((s32)(func_global_asm_80611BB4(p1, p2) * 651.8986f)) & 0xFFF), arg0->unk6) < 0x400;
|
||||
}
|
||||
|
||||
f32 func_race_8002F04C(f32, f32, f32, f32, f32, f32, f32, f32);
|
||||
typedef struct RaceStruct10 {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
s16 unk6;
|
||||
f32 unk8;
|
||||
f32 unkC;
|
||||
} RaceStruct10;
|
||||
|
||||
f32 func_race_8002F304(RaceStruct10 *arg0, f32 arg1, f32 arg2) {
|
||||
return func_race_8002F04C(
|
||||
arg0->unk0,
|
||||
@ -242,33 +274,6 @@ f32 func_race_8002F304(RaceStruct10 *arg0, f32 arg1, f32 arg2) {
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: Is this the same as RaceStruct6?
|
||||
typedef struct RaceStruct13 {
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u16 *unk4;
|
||||
u16 unk8;
|
||||
u16 unkA;
|
||||
s32 unkC;
|
||||
s32 unk10;
|
||||
s32 unk14;
|
||||
s32 unk18;
|
||||
s32 unk1C;
|
||||
s32 unk20;
|
||||
s32 unk24;
|
||||
s32 unk28;
|
||||
s32 unk2C;
|
||||
s32 unk30;
|
||||
s32 unk34;
|
||||
s16 unk38;
|
||||
u16 unk3A;
|
||||
u16 unk3C;
|
||||
} RaceStruct13;
|
||||
|
||||
void func_race_8002DCF0(void*, s32);
|
||||
void func_race_8002F36C(RaceStruct13*, RaceStruct13*);
|
||||
void *func_race_8002E9AC(u8);
|
||||
|
||||
void func_race_8002F36C(RaceStruct13 *arg0, RaceStruct13 *arg1) {
|
||||
RaceStruct2_unkC *temp_v0;
|
||||
s32 temp;
|
||||
@ -364,10 +369,6 @@ f32 func_race_8002F90C(RaceStruct6 *arg0, RaceStruct6 *arg1, RaceStruct6 *arg2)
|
||||
// rodata
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_A960/func_race_8002F950.s")
|
||||
|
||||
/*
|
||||
void *func_race_8002E960(u8);
|
||||
void *func_race_8002E9AC(u8);
|
||||
|
||||
// TODO: Any struct overlap with existing structs?
|
||||
typedef struct {
|
||||
u16 unk0;
|
||||
@ -399,6 +400,7 @@ typedef struct {
|
||||
s16 unk4;
|
||||
} Struct8002F950_temp_v0_2;
|
||||
|
||||
/*
|
||||
void func_race_8002F950(Struct8002F950 *arg0) {
|
||||
Actor *temp_a0;
|
||||
f32 temp_f0;
|
||||
|
Loading…
Reference in New Issue
Block a user