Bumped Total Progress Script by 1.04% (#371)

* Matched camera.c
This commit is contained in:
MegaMech
2023-08-15 13:07:23 -06:00
committed by GitHub
parent 119b7121bf
commit 27af470a46
29 changed files with 779 additions and 4006 deletions
+11 -20
View File
@@ -2672,39 +2672,30 @@ void func_800C5BD0(void) {
GLOBAL_ASM("asm/non_matchings/audio/external/func_800C5BD0.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800C2474(); // extern
void func_800C284C(?, ?, ?, ?); // extern
void func_800C3F70(); // extern
void func_800C400C(); // extern
void func_800C5A3C(); // extern
void func_800C5BD0(); // extern
void func_800C2474();
void func_800C284C(u8, u8, u8, s32);
void func_800C2474(void);
void func_800C3F70(void);
void func_800C5A3C(void);
void func_800C400C(void);
void func_800C5BD0(void);
extern u8 D_800E9DA0;
void func_800C5C40(void) {
u8 temp_v0;
func_800C2474();
temp_v0 = D_800E9DA0;
if (temp_v0 != 0) {
if (D_800E9DA0 != 0) {
func_800C400C();
} else {
D_800E9DA0 = temp_v0 + 1;
D_800E9DA0++;
func_800C3F70();
}
func_800C5A3C();
func_800C284C(2, 0, 0xFF, 1);
func_800C5BD0();
}
#else
GLOBAL_ASM("asm/non_matchings/audio/external/func_800C5C40.s")
#endif
extern void func_800C2474();
extern void func_800C284C(u8, u8, u8, s32);
extern void func_800C3F70();
extern void func_800C5A3C();
// game_audio_init?
void func_800C5CB8(void) {
+21 -51
View File
@@ -54,58 +54,28 @@ char heapAudioString36[] = "Already Load Type %d,ID %d\n";
char heapAudioString37[] = "Warning:Emem Over,not alloc %d\n";
char heapAudioString38[] = "Write %d\n";
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern u8 D_803B0380;
extern u8 gBankLoadStatus;
extern ? gSeqLoadStatus;
extern u8 D_803B0500;
extern u8 gUnkLoadStatus[];
void func_800B8DE0(void) {
? *temp_v1_3;
u8 *temp_v1;
u8 *temp_v1_2;
u8 *phi_v1;
u8 *phi_v1_2;
? *phi_v1_3;
void reset_bank_and_seq_load_status(void) {
s32 i;
for (i = 0; i < 64; i++) {
if(gBankLoadStatus[i] != 5) {
gBankLoadStatus[i] = 0;
}
}
phi_v1 = &gBankLoadStatus;
do {
if (*phi_v1 != 5) {
*phi_v1 = 0;
for (i = 0; i < 64; i++) {
if(gUnkLoadStatus[i] != 5) {
gUnkLoadStatus[i] = 0;
}
temp_v1 = phi_v1 + 1;
phi_v1 = temp_v1;
} while (temp_v1 < &gSeqLoadStatus);
phi_v1_2 = &D_803B0380;
do {
if (*phi_v1_2 != 5) {
*phi_v1_2 = 0;
}
for (i = 0; i < 256; i++) {
if (gSeqLoadStatus[i] != 5) {
gSeqLoadStatus[i] = 0;
}
temp_v1_2 = phi_v1_2 + 1;
phi_v1_2 = temp_v1_2;
} while (temp_v1_2 < &gBankLoadStatus);
phi_v1_3 = &gSeqLoadStatus;
do {
if (phi_v1_3->unk0 != 5) {
phi_v1_3->unk0 = 0;
}
if (phi_v1_3->unk1 != 5) {
phi_v1_3->unk1 = 0;
}
if (phi_v1_3->unk2 != 5) {
phi_v1_3->unk2 = 0;
}
if (phi_v1_3->unk3 != 5) {
phi_v1_3->unk3 = 0;
}
temp_v1_3 = phi_v1_3 + 4;
phi_v1_3 = temp_v1_3;
} while (temp_v1_3 != &D_803B0500);
}
}
#else
GLOBAL_ASM("asm/non_matchings/audio/heap/func_800B8DE0.s")
#endif
void discard_bank(s32 bankId) {
s32 i;
@@ -231,7 +201,7 @@ void temporary_pools_init(struct PoolSplit *a) {
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
? discard_bank(s16, s32, s16, struct TemporaryPool *); /* extern */
? discard_sequence(s16, s32); /* extern */
extern ? D_803B0380;
extern ? gUnkLoadStatus;
extern ? gBankLoadStatus;
extern ? gSeqLoadStatus;
extern void *gNotes;
@@ -289,7 +259,7 @@ loop_1:
sp34 = &gBankLoadStatus;
} else if (arg0 == &gUnusedLoadedPool) {
sp33 = 2;
sp34 = &D_803B0380;
sp34 = &gUnkLoadStatus;
}
temp_a2 = var_a3_2->entries[0].id;
if (temp_a2 == -1) {
@@ -781,7 +751,7 @@ GLOBAL_ASM("asm/non_matchings/audio/heap/func_800BA00C.s")
#ifdef MIPS_TO_C
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
? func_800B8DE0(); /* extern */
? reset_bank_and_seq_load_status(); /* extern */
? func_800B914C(? *, s16, s16, u16); /* extern */
? init_note_free_list(); /* extern */
? note_init_all(); /* extern */
@@ -875,7 +845,7 @@ void func_800BA250(void) {
D_803B0370.wantBank = temp_s6->unk20;
D_803B0370.wantUnused = temp_s6->unk24;
temporary_pools_init(&D_803B0370);
func_800B8DE0();
reset_bank_and_seq_load_status();
gNotes = soundAlloc(&gNotesAndBuffersPool, gMaxSimultaneousNotes * 0xC0);
note_init_all();
init_note_free_list();
+1
View File
@@ -118,6 +118,7 @@ extern struct SoundMultiPool gSeqLoadedPool; // D_803AFC48
extern struct SoundMultiPool gBankLoadedPool; // D_803AFE18
extern struct Unk1Pool gUnkPool1; // D_803B01B8
extern u8 gBankLoadStatus[64]; // D_803B03C0
extern u8 gUnkLoadStatus[64];
extern u8 gSeqLoadStatus[256]; // D_803B0400
extern struct SoundMultiPool gUnusedLoadedPool; // D_803AFFE8
extern struct SoundAllocPool gSeqAndBankPool; // D_803AFC18
+561 -811
View File
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -14,6 +14,13 @@
#define BAD_RETURN(cmd) cmd
#endif
typedef struct {
f32 unk_0;
s16 unk_4;
s16 unk_6;
s16 unk_8;
} UnkCameraInner;
typedef struct {
/* 0x00 */ Vec3f pos;
/* 0x0C */ Vec3f lookAt;
@@ -32,12 +39,8 @@ typedef struct {
/* 0x50 */ s32 unk_50;
/* 0x54 */ UnkActorInner unk_54;
// When you hit a wall (or another driver) the camera's pos and lookAt bounce up and down. This is the velocity(?) of that bouncing
/* 0x94 */ f32 unk_94;
/* 0x98 */ s16 unk_98;
/* 0x9A */ s16 unk_9A;
/* 0x94 */ UnkCameraInner unk_94;
// Timer for wall-hit bounce. Counts up instead of down
/* 0x9C */ s16 unk_9C;
/* 0x9E */ s16 pad_9E;
/* 0xA0 */ f32 unk_A0;
/* 0xA4 */ s32 unk_A4;
/* 0xA8 */ s32 unk_A8;
@@ -81,7 +84,4 @@ extern Player *gPlayerTwo;
extern Player *gPlayerThree;
extern Player *gPlayerFour;
// Actually define in main.c, probably need to add to main.h
extern u16 D_80152300[];
#endif
+5 -5
View File
@@ -4850,7 +4850,7 @@ void func_8000EF20(void) {
void func_8000F0E0(void) {
D_80164670 = 0;
D_80164678 = 0;
D_80164678[0] = 0;
D_80164672 = 0;
D_8016467A = 0;
D_80164674 = 0;
@@ -9988,7 +9988,7 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001933C.s")
#endif
void func_8001968C(void) {
D_80164678 = 3;
D_80164678[0] = 3;
}
#ifdef MIPS_TO_C
@@ -10433,12 +10433,12 @@ void func_80019FB4(s32 arg0) {
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80019FB4.s")
#endif
void func_8001A0A4(UNUSED s16 *arg0, UNUSED Camera *arg1, UNUSED Player *arg2, UNUSED s32 arg3, s32 arg4) {
void func_8001A0A4(UNUSED u16 *arg0, UNUSED Camera *arg1, UNUSED Player *arg2, UNUSED s8 arg3, s32 arg4) {
func_80019FB4(arg4);
func_80019C50(arg4);
}
void func_8001A0DC(s16 *arg0, Camera *arg1, Player *arg2, s8 arg3, s32 arg4) {
void func_8001A0DC(u16 *arg0, Camera *arg1, Player *arg2, s8 arg3, s32 arg4) {
func_8001A0A4(arg0, arg1, arg2, arg3, arg4);
func_80019D2C(arg1, arg2, arg4);
}
@@ -10648,7 +10648,7 @@ extern u32 D_801646C8;
extern u16 D_801646CC;
extern ? D_801646D0;
void func_8001A588(s32 arg0, Camera *camera, u16 *arg2, s8 arg3, s32 arg4) {
void func_8001A588(u16 *arg0, Camera *camera, Player *arg2, s8 arg3, s32 arg4) {
s32 sp44;
s16 *sp24;
f64 temp_f0;
+6 -3
View File
@@ -28,6 +28,7 @@ struct unexpiredActors {
/* Function Prototypes */
f32 func_80014EE4(f32 arg0, s32 arg1);
void func_8001C14C(void);
void func_800070F4(void);
void func_80019DF4(void);
@@ -119,13 +120,15 @@ void func_80015390(Camera*, Player*, s32);
void func_8001968C();
void func_8001C05C();
void func_80019DE4();
void func_8001A0A4(s16*, Camera*, Player*, s32, s32);
void func_8001A0DC(s16*, Camera*, Player*, s8, s32);
void func_8001A0A4(u16*, Camera*, Player*, s8, s32);
void func_8001A0DC(u16*, Camera*, Player*, s8, s32);
s32 func_8001A310(s32, s32);
void func_8001ABE0(s32, s32);
void func_8001ABEC(struct struct_801642D8*);
void func_8001C3C4(s32);
void func_8001C42C();
void func_80019ED0(void);
void func_8001A588(u16*, Camera*, Player*, s8, s32);
/* This is where I'd put my static data, if I had any */
// 0 or 1, only 1 when when in extra (mirror) mode
@@ -149,7 +152,7 @@ extern s16 D_80164670;
extern s16 D_80164672;
extern s16 D_80164674;
extern s16 D_80164676;
extern s16 D_80164678;
extern s16 D_80164678[]; // Size 4? Is the three below this fake?
extern s16 D_8016467A;
extern s16 D_8016467C;
extern s16 D_8016467E;
+14 -14
View File
@@ -890,20 +890,20 @@ void func_80022B50(Player *player, UNUSED s8 arg1) {
f32 temp_f0;
s16 var_v0;
var_v0 = player->unk_DB6;
temp_f0 = player->unk_DC4;
var_v0 = player->unk_DB4.unk2;
temp_f0 = player->unk_DB4.unk10;
if (var_v0 < 5) {
var_v0++;
}
player->unk_DA4 = (var_v0 * temp_f0) - (0.7 * (var_v0 * var_v0));
player->unk_DC4 = temp_f0;
player->unk_DB6 = var_v0;
player->unk_DB4.unk10 = temp_f0;
player->unk_DB4.unk2 = var_v0;
}
void func_80022BC4(Player *player, UNUSED s8 arg1) {
f32 temp_f0 = player->unk_DC4;
s16 temp_v0 = player->unk_DB6;
f32 temp_f0 = player->unk_DB4.unk10;
s16 temp_v0 = player->unk_DB4.unk2;
s16 temp_f16;
temp_v0++;
@@ -923,8 +923,8 @@ void func_80022BC4(Player *player, UNUSED s8 arg1) {
temp_f16 = 0;
}
player->unk_DA4 = temp_f16;
player->unk_DC4 = temp_f0;
player->unk_DB6 = temp_v0;
player->unk_DB4.unk10 = temp_f0;
player->unk_DB4.unk2 = temp_v0;
}
void func_80022CA8(Player *player, s8 arg1, UNUSED s8 arg2, s8 arg3) {
@@ -948,8 +948,8 @@ void func_80022D60(UNUSED Player *player, s8 arg1, UNUSED s8 arg2, s8 arg3) {
}
void func_80022DB4(Player *player, UNUSED s8 arg1) {
f32 temp_f0 = player->unk_DC0;
s16 temp_v0 = player->unk_DCC;
f32 temp_f0 = player->unk_DB4.unkC;
s16 temp_v0 = player->unk_DB4.unk18;
s16 temp_f16;
temp_v0++;
@@ -967,13 +967,13 @@ void func_80022DB4(Player *player, UNUSED s8 arg1) {
if (temp_f16 <= 0) {
temp_f16 = 0;
}
player->unk_DD2 = temp_f16;
player->unk_DC0 = temp_f0;
player->unk_DCC = temp_v0;
player->unk_DB4.unk1E = temp_f16;
player->unk_DB4.unkC = temp_f0;
player->unk_DB4.unk18 = temp_v0;
}
void func_80022E84(Player *player, s8 arg1, UNUSED s8 arg2, s8 arg3) {
s16 temp_v0 = player->unk_DD2;
s16 temp_v0 = player->unk_DB4.unk1E;
D_800DDBB4[arg1][arg3 + 0x0].v.ob[1] = 18 - temp_v0;
D_800DDBB4[arg1][arg3 + 0x1].v.ob[1] = 9 - temp_v0;
+45 -35
View File
@@ -615,6 +615,8 @@ void func_80027EDC(Player *player, s8 playerId) {
}
}
void control_cpu_movement(Player*,Camera*, s8, s8);
void func_80028864(Player *player, Camera *camera, s8 arg2, s8 arg3) {
u16 sp1E;
@@ -2532,9 +2534,9 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) {
}
temp_v0_8 = player->unk_000;
var_v1 = temp_v0_8 & 0x4000;
player->unk_DCC = 0;
player->unk_DB4.unk18 = 0;
player->unk_0B6 |= 0x100;
player->unk_DC0 = 3.0f;
player->unk_DB4.unkC = 3.0f;
if ((var_v1 == 0x4000) && ((player->unk_0BC & 0x100000) == 0x100000) && ((temp_v0_8 & 0x100) != 0x100)) {
func_800C9060((u8) arg3, 0x1900A60AU);
var_v1 = player->unk_000 & 0x4000;
@@ -2550,8 +2552,8 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) {
if ((temp_v0_9 < 0x23) && (temp_v0_9 >= 0x1C) && (((player->unk_094 / 18.0f) * 216.0f) >= 20.0f)) {
temp_v0_10 = player->unk_000;
var_v1_2 = temp_v0_10 & 0x4000;
player->unk_DCC = 0;
player->unk_DC0 = 2.8f;
player->unk_DB4.unk18 = 0;
player->unk_DB4.unkC = 2.8f;
if ((var_v1_2 == 0x4000) && ((temp_v0_10 & 0x100) != 0x100)) {
func_800CADD0((u8) arg3, (f32) player->unk_0C2 / 35.0f);
var_v1_2 = player->unk_000 & 0x4000;
@@ -2563,8 +2565,8 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) {
temp_v0_11 = player->unk_0C2;
if ((temp_v0_11 < 0x1C) && (temp_v0_11 >= 4) && (((player->unk_094 / 18.0f) * 216.0f) >= 20.0f)) {
temp_v0_12 = player->unk_000;
player->unk_DCC = 0;
player->unk_DC0 = 1.5f;
player->unk_DB4.unk18 = 0;
player->unk_DB4.unkC = 1.5f;
if (((temp_v0_12 & 0x4000) == 0x4000) && ((temp_v0_12 & 0x100) != 0x100)) {
temp_v0_13 = player->unk_0C2;
if ((temp_v0_13 < 0xB) && (temp_v0_13 >= 4) && (gCurrentCourseId == 2)) {
@@ -2866,9 +2868,9 @@ void func_8002E594(Player *player, Camera *camera, s8 arg2, s8 arg3) {
}
temp_v1 = player->unk_000;
var_v0 = temp_v1 & 0x4000;
player->unk_DCC = 0;
player->unk_DB4.unk18 = 0;
player->unk_0B6 |= 0x100;
player->unk_DC0 = 3.0f;
player->unk_DB4.unkC = 3.0f;
if ((var_v0 == 0x4000) && ((temp_v1 & 0x100) != 0x100)) {
func_800CADD0((u8) arg3, (f32) player->unk_0C2 / 50.0f);
var_v0 = player->unk_000 & 0x4000;
@@ -2881,8 +2883,8 @@ void func_8002E594(Player *player, Camera *camera, s8 arg2, s8 arg3) {
if ((temp_v0_7 < 0x1C) && (temp_v0_7 >= 0xA) && (((player->unk_094 / 18.0f) * 216.0f) >= 20.0f)) {
temp_v1_2 = player->unk_000;
var_v0_2 = temp_v1_2 & 0x4000;
player->unk_DCC = 0;
player->unk_DC0 = 2.0f;
player->unk_DB4.unk18 = 0;
player->unk_DB4.unkC = 2.0f;
if ((var_v0_2 == 0x4000) && ((temp_v1_2 & 0x100) != 0x100)) {
func_800CADD0((u8) arg3, (f32) player->unk_0C2 / 50.0f);
var_v0_2 = player->unk_000 & 0x4000;
@@ -3006,16 +3008,18 @@ GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002E594.s")
#ifdef MIPS_TO_C
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
? func_8002CD48(Player *, s8, s8); /* extern */
static ? D_800E3D98; /* unable to generate initializer */
static ? D_800E3DA4; /* unable to generate initializer */
static ? D_800E3DB0; /* unable to generate initializer */
static ? D_800E3DBC; /* unable to generate initializer */
//? func_8002CD48(Player *, s8, s8); /* extern */
//static ? D_800E3D98; /* unable to generate initializer */
//static ? D_800E3DA4; /* unable to generate initializer */
//static ? D_800E3DB0; /* unable to generate initializer */
//static ? D_800E3DBC; /* unable to generate initializer */
void func_802B63B8(Vec3f, Mat3);
void control_cpu_movement(Player *player, Camera *camera, s8 arg2, s8 arg3) {
f32 spFC;
f32 spF4;
? spE8;
//? spE8;
f32 spDC;
f32 spD0;
f32 spCC;
@@ -3041,18 +3045,24 @@ void control_cpu_movement(Player *player, Camera *camera, s8 arg2, s8 arg3) {
f64 temp_f2;
s32 temp_t1;
spF4.unk0 = D_800E3D98.unk0;
spF4.unk4 = (s32) D_800E3D98.unk4;
spF4.unk8 = (s32) D_800E3D98.unk8;
spE8.unk0 = (s32) D_800E3DA4.unk0;
spE8.unk8 = (s32) D_800E3DA4.unk8;
spE8.unk4 = (s32) D_800E3DA4.unk4;
spDC.unk0 = D_800E3DB0.unk0;
spDC.unk4 = (s32) D_800E3DB0.unk4;
spDC.unk8 = (s32) D_800E3DB0.unk8;
spD0.unk0 = D_800E3DBC.unk0;
spD0.unk4 = (s32) D_800E3DBC.unk4;
spD0.unk8 = (s32) D_800E3DBC.unk8;
Vec3f D_800E3D98 = { 0, 0, 1.0 };
Vec3f D_800E3DA4 = { 0, 0, 0 };
Vec3f D_800E3DB0 = { 0, 0, 0 };
Vec3f D_800E3DBC = { 0, 0, 0 };
//spF4.unk0 = D_800E3D98.unk0;
//spF4.unk4 = (s32) D_800E3D98.unk4;
//spF4.unk8 = (s32) D_800E3D98.unk8;
//spE8.unk0 = (s32) D_800E3DA4.unk0;
//spE8.unk8 = (s32) D_800E3DA4.unk8;
//spE8.unk4 = (s32) D_800E3DA4.unk4;
//spDC.unk0 = D_800E3DB0.unk0;
//spDC.unk4 = (s32) D_800E3DB0.unk4;
//spDC.unk8 = (s32) D_800E3DB0.unk8;
//spD0.unk0 = D_800E3DBC.unk0;
//spD0.unk4 = (s32) D_800E3DBC.unk4;
//spD0.unk8 = (s32) D_800E3DBC.unk8;
player->unk_0BC |= 0x1000;
player->unk_044 |= 0x10;
sp40 = D_80164510[arg3];
@@ -3061,14 +3071,14 @@ void control_cpu_movement(Player *player, Camera *camera, s8 arg2, s8 arg3) {
func_8002B830(player, arg3, arg2);
func_8002CD48(player, arg3, arg2);
sp84 = spDC + (0.0f * player->unk_064);
sp7C = spE4 + (0.0f * player->unk_06C);
sp7C = D_800E3DA4[1] + (0.0f * player->unk_06C);
player->unk_10C = 0;
player->unk_256 = 0;
player->unk_0BC &= 0xFFFF7FFF;
temp_a1 = player->unk_174[0];
spFC = func_80030150(player, arg3);
sp3C = temp_a1;
func_802B63B8(&spF4, (f32 (*)[3]) temp_a1);
func_802B63B8(D_800E3D98, temp_a1);
sp6C = 0.0f;
sp68 = player->unk_034[0];
sp70 = player->unk_034[2];
@@ -3076,7 +3086,7 @@ void control_cpu_movement(Player *player, Camera *camera, s8 arg2, s8 arg3) {
temp_f2 = (f64) sp70;
temp_f8 = (f32) (temp_f0 + (((f64) (spF4 + sp84 + spD0) - (temp_f0 * (0.12 * (f64) player->kartFriction))) / 6000.0));
sp68 = temp_f8;
temp_f8_2 = (f32) (temp_f2 + (((f64) (spFC + sp7C + spD8) - (temp_f2 * (0.12 * (f64) player->kartFriction))) / 6000.0));
temp_f8_2 = (f32) (temp_f2 + (((f64) (spFC + sp7C + D_800E3DA4[1]) - (temp_f2 * (0.12 * (f64) player->kartFriction))) / 6000.0));
sp70 = temp_f8_2;
temp_f12 = player->pos[0];
temp_f14 = player->pos[2];
@@ -3107,9 +3117,9 @@ void control_cpu_movement(Player *player, Camera *camera, s8 arg2, s8 arg3) {
player->unk_034[0] = sp68;
player->unk_034[1] = sp6C;
player->unk_034[2] = sp70;
temp_v0->unk0 = sp68;
temp_v0->unk4 = sp6C;
temp_v0->unk8 = temp_f8_2;
D_80165070[arg3][0] = sp68;
D_80165070[arg3][1] = sp6C;
D_80165070[arg3][2] = temp_f8_2;
temp_f2_2 = player->unk_094;
temp_v1 = &gKartTopSpeedTable[player->characterId];
temp_f12_2 = *temp_v1;
@@ -3499,7 +3509,7 @@ void func_80030A34(Player *player) {
f32 var_f2;
if (((player->unk_0CA & 2) != 2) && ((player->unk_0CA & 8) != 8)) {
if ((((player->unk_094 / 18.0f) * 216.0f) >= 8.0f) && (player->unk_DC0 < 1.0f)) {
if ((((player->unk_094 / 18.0f) * 216.0f) >= 8.0f) && (player->unk_DB4.unkC < 1.0f)) {
switch (player->unk_0F8) { /* irregular */
case 1:
if (random_int(0x000AU) != 8) {
+1 -1
View File
@@ -57,7 +57,7 @@ UNUSED void func_8003DE4C(Player *player, Vec3f arg1) {
arg1[1] = 0.0f;
func_802B63B8(arg1, player->unk_174);
}
// Stick to ground?
void func_8003E048(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
*arg5 += arg1[0] * player->unk_110.unk3C[2] * 1;
*arg6 += arg1[1] * player->unk_110.unk3C[2] * 0.1;
+17 -17
View File
@@ -537,8 +537,8 @@ void func_8008D3C4(Player* player, s8 arg1) {
player->unk_0BC |= 0x2000;
player->statusEffects &= ~0x200;
player->unk_DB4 = 0;
player->unk_DBC = 8.0f;
player->unk_DB4.unk0 = 0;
player->unk_DB4.unk8 = 8.0f;
if (D_8015F890 != 1) {
if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) {
@@ -712,9 +712,9 @@ void func_8008DABC(Player *player, s8 arg1) {
func_8008C354(player, arg1);
if ((player->unk_0BC & 0x4000000) == 0) {
player->unk_DB6 = 0;
player->unk_DB4.unk2 = 0;
player->unk_238 = 0;
player->unk_DC4 = 4.5f;
player->unk_DB4.unk10 = 4.5f;
D_8018D990[arg1] = 0;
player->unk_0BC &= ~0x08000010;
D_80165190[0][arg1] = 1;
@@ -751,7 +751,7 @@ void func_8008DC08(Player* player, s8 arg1) {
switch (D_8018D990[arg1]) {
case 0:
player->unk_DC4 = 4.5f;
player->unk_DB4.unk10 = 4.5f;
if (player->unk_238 < 0x3D) {
++player->unk_238;
}
@@ -780,7 +780,7 @@ void func_8008DC08(Player* player, s8 arg1) {
break;
case 1:
player->unk_DC4 = 4.5f;
player->unk_DB4.unk10 = 4.5f;
player->pos[1] += 0.13;
++player->unk_238;
@@ -817,7 +817,7 @@ void func_8008DC08(Player* player, s8 arg1) {
D_8018D990[arg1] = 3;
}
player->unk_DC4 = 4.5f;
player->unk_DB4.unk10 = 4.5f;
player->pos[1] -= 0.085;
if ((player->unk_0BC & 8) != 8) {
@@ -828,9 +828,9 @@ void func_8008DC08(Player* player, s8 arg1) {
func_8008D9C0(player);
break;
case 3:
player->unk_DC4 = 3.0f;
player->unk_DB4.unk10 = 3.0f;
player->unk_0BC &= ~0x04000000;
player->unk_DB6 = 0;
player->unk_DB4.unk2 = 0;
player->unk_0BC |= 0x08000000;
player->unk_224 = 1.0f;
player->boundingBoxSize = gKartBoundingBoxSizeTable[player->characterId];
@@ -937,8 +937,8 @@ void func_8008E3C0(Player* player, UNUSED s8 arg1) {
player->unk_0BC &= ~0x40000000;
player->unk_224 = 1.0f;
player->boundingBoxSize = gKartBoundingBoxSizeTable[player->characterId];
player->unk_DC4 = 3.0f;
player->unk_DB6 = 0;
player->unk_DB4.unk10 = 3.0f;
player->unk_DB4.unk2 = 0;
player->unk_0BC |= 0x08000000;
if ((player->unk_0BC & 0x20000) == 0x20000) {
@@ -1167,8 +1167,8 @@ void func_8008EC88(Player* player, s8 arg1) {
player->unk_0BC |= 0x100000;
player->statusEffects &= ~0x00800000;
player->unk_DB4 = 0;
player->unk_DBC = 8.0f;
player->unk_DB4.unk0 = 0;
player->unk_DB4.unk8 = 8.0f;
if (D_8015F890 != 1) {
if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) == 0)) {
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008001);
@@ -1772,9 +1772,9 @@ void func_80090778(Player* player) {
func_8008C354(player, playerIndex);
func_8008F86C(player, playerIndex);
player->unk_DB4 = 0;
player->unk_DB4.unk0 = 0;
player->unk_0C2 = 0;
player->unk_DBC = 0.0f;
player->unk_DB4.unk8 = 0.0f;
if ((player->unk_0BC & 0x40000000) == 0x40000000) {
if ((player->unk_0BC & 0x20000) == 0x20000) {
player->unk_0BC &= ~0x20000;
@@ -2059,11 +2059,11 @@ void func_80091298(Player *player, s8 arg1) {
if (player->unk_0B2 == 0) {
if ((player->pos[1] - (player->boundingBoxSize + 1.0f)) <= spC[arg1]) {
player->pos[1] = (f32) ((f64) (spC[arg1] + player->boundingBoxSize) + 1.08);
player->unk_DCC = 0;
player->unk_DB4.unk18 = 0;
player->unk_0A8 = 0;
player->unk_07C = 0;
player->unk_0C0 = 0;
player->unk_DC0 = 3.0f;
player->unk_DB4.unkC = 3.0f;
player->unk_044 &= ~0x800;
player->kartGravity = gKartGravityTable[player->characterId];
player->unk_0D4[0] = 0;
+2
View File
@@ -129,4 +129,6 @@ extern struct UnkStruct_800DC5EC *D_800DC5EC;
extern u16 D_800DC5B0;
extern s32 gPlayerWinningIndex;
extern u16 D_80152300[];
#endif
+1 -1
View File
@@ -333,7 +333,7 @@ void func_802B5AAC(Mat4 arg0, s16 arg1) {
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
void func_802B5B14(Vec3f arg0, Vec3s arg1) {
UNUSED void func_802B5B14(Vec3f arg0, Vec3s arg1) {
f32 sp70;
f32 sp6C;
f32 sp68;
+53 -53
View File
@@ -108,13 +108,13 @@ void spawn_player(Player *player, s8 playerIndex, f32 startingRow, f32 startingC
player->unk_D9A = 0;
player->unk_DA4 = 0;
player->unk_DA6 = 0;
player->unk_DB4 = 0;
player->unk_DB6 = 0;
player->unk_DCC = 0;
player->unk_DCE = 0;
player->unk_DD0 = 0;
player->unk_DD2 = 0;
player->unk_DD4 = 0;
player->unk_DB4.unk0 = 0;
player->unk_DB4.unk2 = 0;
player->unk_DB4.unk18 = 0;
player->unk_DB4.unk1A = 0;
player->unk_DB4.unk1C = 0;
player->unk_DB4.unk1E = 0;
player->unk_DB4.unk20 = 0;
player->unk_042 = 0;
@@ -158,11 +158,11 @@ void spawn_player(Player *player, s8 playerIndex, f32 startingRow, f32 startingC
player->unk_DA0 = 0.0f;
player->unk_DA8 = 0.0f;
player->unk_DB0 = 0.0f;
player->unk_DB8 = 0.0f;
player->unk_DBC = 0.0f;
player->unk_DC0 = 0.0f;
player->unk_DC4 = 0.0f;
player->unk_DC8 = 0.0f;
player->unk_DB4.unk4 = 0.0f;
player->unk_DB4.unk8 = 0.0f;
player->unk_DB4.unkC = 0.0f;
player->unk_DB4.unk10 = 0.0f;
player->unk_DB4.unk14 = 0.0f;
player->unk_084 = 0.0f;
player->unk_088 = 0.0f;
player->unk_08C = 0.0f;
@@ -1040,7 +1040,7 @@ void func_8003CD98(Player *player, Camera *camera, s8 arg2, s8 arg3) {
void func_8003D080(void) {
UNUSED s32 pad;
Player* ptr = &gPlayers[0];
Player* player = &gPlayers[0];
func_8005D290();
if (gGamestate == ENDING_SEQUENCE) {
@@ -1054,18 +1054,18 @@ void func_8003D080(void) {
switch (gModeSelection) {
case GRAND_PRIX:
if (gCurrentCourseId == 10) {
func_8001C4D0(0.0f, ptr->pos[1], D_8016524C, ptr->unk_02C[1], 8, 0);
camera_init(0.0f, player->pos[1], D_8016524C, player->unk_02C[1], 8, 0);
} else {
func_8001C4D0((D_80165210[7] + D_80165210[6]) / 2, ptr->pos[1], D_8016524C, ptr->unk_02C[1], 8, 0);
camera_init((D_80165210[7] + D_80165210[6]) / 2, player->pos[1], D_8016524C, player->unk_02C[1], 8, 0);
}
break;
case TIME_TRIALS:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 0);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 1, 0);
break;
default:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 10, 0);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 10, 0);
break;
}
break;
@@ -1074,45 +1074,45 @@ void func_8003D080(void) {
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
switch (gModeSelection) {
case GRAND_PRIX:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 1);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 1, 0);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 1, 1);
break;
case BATTLE:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 1);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 9, 0);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 9, 1);
break;
default:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 1);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 1, 0);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 1, 1);
break;
}
break;
case SCREEN_MODE_3P_4P_SPLITSCREEN:
if (gModeSelection == BATTLE) {
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 1);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 2);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 9, 0);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 9, 1);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 9, 2);
if (gPlayerCountSelection1 == 4) {
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 3);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 9, 3);
}
} else {
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 1);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 2);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 1, 0);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 1, 1);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 1, 2);
if (gPlayerCountSelection1 == 4) {
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 3);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 1, 3);
}
}
break;
@@ -1120,24 +1120,24 @@ void func_8003D080(void) {
} else {
switch (gActiveScreenMode) {
case SCREEN_MODE_1P:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 0);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 0);
break;
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 1);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 0);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 1);
break;
case SCREEN_MODE_3P_4P_SPLITSCREEN:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 1);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 2);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 3);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 0);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 1);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 2);
player++;
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 3);
break;
}
}
@@ -1199,8 +1199,8 @@ void func_8003DB5C(void) {
Player *player = gPlayerOne;
s32 i;
func_8001C4D0(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 0);
func_8001C4D0(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 1);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 0);
camera_init(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 1);
for (i = 0; i < 8; i++, player++) {
func_80027A20(player, i, 1, 0);