mirror of
https://github.com/n64decomp/mk64
synced 2026-07-28 15:17:01 -04:00
Yet more assorted matches (#278)
* Yet more assorted matches Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
+104
-120
@@ -487,21 +487,18 @@ void func_8001CCEC(Player *player, Camera *camera, f32 *arg2, f32 *arg3, f32 *ar
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_8001CCEC.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
extern ? D_80164A90;
|
||||
extern ? D_80164AA0;
|
||||
|
||||
void func_8001D53C(Player *player, Camera *camera, f32 *arg2, f32 *arg3, f32 *arg4, f32 *arg5, s16 arg6, s16 arg7) {
|
||||
f32 sp70;
|
||||
f32 sp6C;
|
||||
f32 sp68;
|
||||
f32 sp64;
|
||||
f32 sp60;
|
||||
f32 sp5C;
|
||||
f32 sp3C;
|
||||
s32 sp38;
|
||||
f32 var_f0;
|
||||
void func_8001D53C(Player *player, Camera *camera, Vec3f arg2, f32 *arg3, f32 *arg4, f32 *arg5, s16 arg6, s16 arg7) {
|
||||
Mat3 sp74;
|
||||
Vec3f sp68;
|
||||
Vec3f sp5C;
|
||||
f32 stackPadding0;
|
||||
f32 stackPadding1;
|
||||
f32 stackPadding2;
|
||||
f32 stackPadding3;
|
||||
f32 stackPadding4;
|
||||
f32 stackPadding5;
|
||||
f32 stackPadding6;
|
||||
f32 thing;
|
||||
|
||||
if (((u16) player->unk_222 == 0) && (camera->unk_A0 == 0.0f)) {
|
||||
camera->unk_A0 = 0.0f;
|
||||
@@ -511,36 +508,37 @@ void func_8001D53C(Player *player, Camera *camera, f32 *arg2, f32 *arg3, f32 *ar
|
||||
} else {
|
||||
move_f32_towards(&camera->unk_A0, 0.0f, 0.06f);
|
||||
}
|
||||
sp3C = D_801652A0[arg7];
|
||||
sp68 = camera->unk_30[0];
|
||||
sp6C = camera->unk_30[1];
|
||||
sp70 = camera->unk_30[2];
|
||||
sp5C = camera->unk_3C[0];
|
||||
sp60 = camera->unk_3C[1] + camera->unk_A0;
|
||||
sp64 = camera->unk_3C[2];
|
||||
arg2->unk0 = camera->lookAt[0];
|
||||
arg2->unk4 = (f32) camera->lookAt[1];
|
||||
arg2->unk8 = (f32) camera->lookAt[2];
|
||||
sp38 = arg7 * 4;
|
||||
func_802B6540((f32 (*)[3]) &sp74[0], 0.0f, 1.0f, 0.0f, (s16) (s32) arg6);
|
||||
func_802B63B8(&sp5C, (f32 (*)[3]) &sp74[0]);
|
||||
arg2->unk0 += ((sp5C + player->pos[0]) - camera->lookAt[0]) * 1.0f;
|
||||
arg2->unk8 = (f32) (arg2->unk8 + (((sp64 + player->pos[2]) - camera->lookAt[2]) * 1.0f));
|
||||
arg2->unk4 = (f32) (arg2->unk4 + (((sp60 + player->pos[1]) - camera->lookAt[1]) * 1.0f));
|
||||
func_802B63B8(&sp68, (f32 (*)[3]) &sp74[0]);
|
||||
var_f0 = (f32) ((f64) sp6C + ((f64) player->unk_074 + 1.5));
|
||||
thing = D_801652A0[arg7];
|
||||
sp68[0] = camera->unk_30[0];
|
||||
sp68[1] = camera->unk_30[1];
|
||||
sp68[2] = camera->unk_30[2];
|
||||
sp5C[0] = camera->unk_3C[0];
|
||||
sp5C[1] = camera->unk_3C[1] + camera->unk_A0;
|
||||
sp5C[2] = camera->unk_3C[2];
|
||||
arg2[0] = camera->lookAt[0];
|
||||
arg2[1] = camera->lookAt[1];
|
||||
arg2[2] = camera->lookAt[2];
|
||||
func_802B6540(sp74, 0.0f, 1.0f, 0.0f, arg6);
|
||||
func_802B63B8(sp5C, sp74);
|
||||
stackPadding0 = player->pos[0] + sp5C[0];
|
||||
stackPadding2 = player->pos[2] + sp5C[2];
|
||||
stackPadding1 = player->pos[1] + sp5C[1];
|
||||
arg2[0] += (stackPadding0 - camera->lookAt[0]) * 1;
|
||||
arg2[2] += (stackPadding2 - camera->lookAt[2]) * 1;
|
||||
arg2[1] += (stackPadding1 - camera->lookAt[1]) * 1;
|
||||
func_802B63B8(sp68, sp74);
|
||||
stackPadding0 = player->pos[0] + sp68[0];
|
||||
stackPadding2 = player->pos[2] + sp68[2];
|
||||
stackPadding1 = sp68[1] + (player->unk_074 + 1.5);
|
||||
if ((player->unk_0CA & 1) == 1) {
|
||||
var_f0 = sp6C + (sp3C + 10.0f);
|
||||
stackPadding1 = sp68[1] + (thing + 10.0f);
|
||||
}
|
||||
*arg3 = sp68 + player->pos[0];
|
||||
*arg4 = var_f0;
|
||||
*arg5 = sp70 + player->pos[2];
|
||||
*(&D_80164A90 + sp38) = 0.0f;
|
||||
*(&D_80164AA0 + sp38) = 0.0f;
|
||||
*arg3 = stackPadding0;
|
||||
*arg4 = stackPadding1;
|
||||
*arg5 = stackPadding2;
|
||||
D_80164A90[arg7] = 0.0f;
|
||||
D_80164AA0[arg7] = 0.0f;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_8001D53C.s")
|
||||
#endif
|
||||
|
||||
void func_8001D794(Player *player, Camera *camera, Vec3f arg2, f32 *arg3, f32 *arg4, f32 *arg5, s16 arg6) {
|
||||
Mat3 sp6C;
|
||||
@@ -928,43 +926,36 @@ void func_8001E45C(Camera *camera, Player *player, s8 arg2) {
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_8001E45C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
void func_8001D53C(Player *, Camera *, f32 *, f32 *, f32 *, f32 *, s32, s32); /* extern */
|
||||
|
||||
void func_8001E8E8(Camera *camera, Player *player, s8 arg2) {
|
||||
f32 sp8C;
|
||||
f32 stackPadding0[6];
|
||||
f32 temp_f12;
|
||||
f32 sp88;
|
||||
f32 sp84;
|
||||
f32 temp_f14;
|
||||
f32 stackPadding1;
|
||||
f32 sp7C;
|
||||
f32 sp78;
|
||||
f32 sp74;
|
||||
f32 sp5C;
|
||||
f32 temp_f12;
|
||||
f32 temp_f14;
|
||||
Vec3f stackPadding2;
|
||||
Vec3f sp5C;
|
||||
f32 stackPadding3[10];
|
||||
|
||||
camera->unk_B0 = 0;
|
||||
camera->unk2C = (s16) player->unk_02C[1];
|
||||
func_8001D53C(player, camera, &sp5C, &sp7C, &sp78, &sp74, (s32) player->unk_02C[1], (s32) arg2);
|
||||
camera->unk_2C = player->unk_02C[1];
|
||||
func_8001D53C(player, camera, sp5C, &sp7C, &sp78, &sp74, (s16) (s32) player->unk_02C[1], (s16) (s32) arg2);
|
||||
func_802ADDC8(&camera->unk_54, 5.0f, sp7C, sp78, sp74);
|
||||
camera->lookAt[0] = sp5C;
|
||||
camera->lookAt[1] = sp60;
|
||||
camera->lookAt[2] = sp64;
|
||||
camera->lookAt[0] = sp5C[0];
|
||||
camera->lookAt[1] = sp5C[1];
|
||||
camera->lookAt[2] = sp5C[2];
|
||||
camera->pos[0] = sp7C;
|
||||
camera->pos[1] = sp78;
|
||||
temp_f12 = camera->lookAt[0] - camera->pos[0];
|
||||
camera->pos[2] = sp74;
|
||||
temp_f12 = camera->lookAt[0] - camera->pos[0];
|
||||
sp88 = camera->lookAt[1] - camera->pos[1];
|
||||
sp8C = temp_f12;
|
||||
temp_f14 = camera->lookAt[2] - camera->pos[2];
|
||||
sp84 = temp_f14;
|
||||
camera->rot[1] = atan2s(temp_f12, temp_f14);
|
||||
camera->rot[0] = atan2s(sqrtf((sp8C * sp8C) + (temp_f14 * temp_f14)), sp88);
|
||||
camera->rot[0] = atan2s(sqrtf((temp_f12 * temp_f12) + (temp_f14 * temp_f14)), sp88);
|
||||
camera->rot[2] = 0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_8001E8E8.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
@@ -1068,36 +1059,29 @@ GLOBAL_ASM("asm/non_matchings/camera/func_8001EA0C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
void func_80019ED0(); /* extern */
|
||||
void func_8001A0A4(s16 *, Camera *, Player *, s8, s32); /* extern */
|
||||
void func_8001A0DC(s16 *, Camera *, Player *, s8, s32); /* extern */
|
||||
void func_8001A588(u16 *, Camera *, Player *, s8, s32); /* extern */
|
||||
void func_8001E0C4(Camera *, Player *, s8); /* extern */
|
||||
void func_8001E45C(Camera *, Player *, s8); /* extern */
|
||||
void func_8001E8E8(Camera *, Player *, s8); /* extern */
|
||||
void func_8001EA0C(Camera *, Player *, s8); /* extern */
|
||||
void func_8001F87C(s32); /* extern */
|
||||
extern u16 D_80152300;
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
? func_80019ED0(); /* extern */
|
||||
? func_8001A588(u16 *, Camera *, Player *, s8, s32); /* extern */
|
||||
? func_8001E45C(Camera *, Player *, s8); /* extern */
|
||||
? func_8001EA0C(Camera *, Player *, s8); /* extern */
|
||||
extern u16 D_8015F894;
|
||||
extern s8 D_80164A88;
|
||||
extern s8 D_80164A89;
|
||||
|
||||
void func_8001EE98(Player *player, Camera *camera, s8 arg2) {
|
||||
s32 sp34;
|
||||
s16 *sp2C;
|
||||
s16 *temp_a0;
|
||||
s16 *temp_a0_2;
|
||||
s16 *temp_a0_3;
|
||||
s16 *temp_a0_4;
|
||||
s16 *temp_a0_5;
|
||||
s16 *temp_a0_6;
|
||||
u16 *sp2C;
|
||||
s16 temp_v0_2;
|
||||
s16 temp_v0_3;
|
||||
s16 temp_v0_4;
|
||||
s32 temp_v0;
|
||||
s32 var_s0;
|
||||
u16 *temp_a0;
|
||||
u16 *temp_a0_2;
|
||||
u16 *temp_a0_3;
|
||||
u16 *temp_a0_4;
|
||||
u16 *temp_a0_5;
|
||||
u16 *temp_a0_6;
|
||||
u16 *temp_a0_7;
|
||||
u16 temp_v0_2;
|
||||
u16 temp_v0;
|
||||
|
||||
if (camera == camera1) {
|
||||
sp34 = 0;
|
||||
@@ -1112,86 +1096,86 @@ void func_8001EE98(Player *player, Camera *camera, s8 arg2) {
|
||||
if (camera == camera4) {
|
||||
var_s0 = 3;
|
||||
}
|
||||
switch (gModeSelection) { /* irregular */
|
||||
case GRAND_PRIX:
|
||||
switch (gModeSelection) { /* irregular */
|
||||
case 0:
|
||||
if (((player->unk_000 & 0x800) == 0x800) || (D_800DC51C == 1)) {
|
||||
*(&D_80152300 + (var_s0 * 2)) = 3;
|
||||
D_80152300[var_s0] = 3;
|
||||
} else if (D_800DC5FC == 1) {
|
||||
func_8001A0A4((var_s0 * 2) + &D_80152300, camera, player, arg2, var_s0);
|
||||
func_8001A0A4((s32) &D_80152300[var_s0], (s32) camera, (s32) player, (s32) arg2, var_s0);
|
||||
} else {
|
||||
func_8001A0DC((var_s0 * 2) + &D_80152300, camera, player, arg2, var_s0);
|
||||
func_8001A0DC((s16 *) &D_80152300[var_s0], camera, player, arg2, var_s0);
|
||||
}
|
||||
break;
|
||||
case BATTLE:
|
||||
case 3:
|
||||
if ((D_800DC51C == (u16) 1) || ((D_8015F894 == 2) && (D_80164A89 == 1))) {
|
||||
if (D_80164A88 == 0) {
|
||||
func_80019ED0();
|
||||
}
|
||||
D_80164A88 = 1;
|
||||
D_80152300.unk0 = 3;
|
||||
D_80152300.unk2 = 3;
|
||||
D_80152300.unk4 = 3;
|
||||
D_80152300.unk6 = 3;
|
||||
D_80152300->unk0 = 3;
|
||||
D_80152300->unk2 = 3U;
|
||||
D_80152300->unk4 = 3U;
|
||||
D_80152300->unk6 = 3U;
|
||||
} else {
|
||||
D_80164A88 = 0;
|
||||
if (D_800DC5FC == (u16) 1) {
|
||||
temp_a0 = (var_s0 * 2) + &D_80152300;
|
||||
temp_a0 = &D_80152300[var_s0];
|
||||
sp2C = temp_a0;
|
||||
func_8001A0A4(temp_a0, camera, player, arg2, var_s0);
|
||||
func_8001A0A4((s32) temp_a0, (s32) camera, (s32) player, (s32) arg2, var_s0);
|
||||
} else {
|
||||
temp_a0_2 = (var_s0 * 2) + &D_80152300;
|
||||
temp_a0_2 = &D_80152300[var_s0];
|
||||
sp2C = temp_a0_2;
|
||||
func_8001A0DC(temp_a0_2, camera, player, arg2, var_s0);
|
||||
func_8001A0DC((s16 *) temp_a0_2, camera, player, arg2, var_s0);
|
||||
}
|
||||
*sp2C = 9;
|
||||
}
|
||||
break;
|
||||
case TIME_TRIALS:
|
||||
case 1:
|
||||
if (((gPlayerOne->unk_000 & 0x800) == 0x800) || (D_800DC51C == (u16) 1)) {
|
||||
D_80152300.unk0 = 3;
|
||||
*(&D_80152300 + 2) = 3;
|
||||
*(&D_80152300 + 4) = 3;
|
||||
*(&D_80152300 + 6) = 3;
|
||||
D_80152300->unk0 = 3;
|
||||
*(D_80152300 + 2) = 3;
|
||||
*(D_80152300 + 4) = 3;
|
||||
*(D_80152300 + 6) = 3;
|
||||
} else {
|
||||
if (D_800DC5FC == (u16) 1) {
|
||||
temp_a0_3 = (var_s0 * 2) + &D_80152300;
|
||||
temp_a0_3 = &D_80152300[var_s0];
|
||||
sp2C = temp_a0_3;
|
||||
func_8001A0A4(temp_a0_3, camera, player, arg2, var_s0);
|
||||
func_8001A0A4((s32) temp_a0_3, (s32) camera, (s32) player, (s32) arg2, var_s0);
|
||||
} else {
|
||||
temp_a0_4 = (var_s0 * 2) + &D_80152300;
|
||||
temp_a0_4 = &D_80152300[var_s0];
|
||||
sp2C = temp_a0_4;
|
||||
func_8001A0DC(temp_a0_4, camera, player, arg2, var_s0);
|
||||
func_8001A0DC((s16 *) temp_a0_4, camera, player, arg2, var_s0);
|
||||
}
|
||||
*sp2C = 1;
|
||||
}
|
||||
break;
|
||||
case VERSUS:
|
||||
case 2:
|
||||
if (((player->unk_000 & 0x800) == 0x800) || (D_800DC51C == (u16) 1) || (D_8015F894 == 2)) {
|
||||
*(&D_80152300 + (var_s0 * 2)) = 3;
|
||||
D_80152300[var_s0] = 3;
|
||||
} else {
|
||||
if (D_800DC5FC == (u16) 1) {
|
||||
temp_a0_5 = (var_s0 * 2) + &D_80152300;
|
||||
temp_a0_5 = &D_80152300[var_s0];
|
||||
sp2C = temp_a0_5;
|
||||
func_8001A0A4(temp_a0_5, camera, player, arg2, var_s0);
|
||||
func_8001A0A4((s32) temp_a0_5, (s32) camera, (s32) player, (s32) arg2, var_s0);
|
||||
} else {
|
||||
temp_a0_6 = (var_s0 * 2) + &D_80152300;
|
||||
temp_a0_6 = &D_80152300[var_s0];
|
||||
sp2C = temp_a0_6;
|
||||
func_8001A0DC(temp_a0_6, camera, player, arg2, var_s0);
|
||||
func_8001A0DC((s16 *) temp_a0_6, camera, player, arg2, var_s0);
|
||||
}
|
||||
*sp2C = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (D_800DC5FC == 0) {
|
||||
temp_a0_7 = (var_s0 * 2) + &D_80152300;
|
||||
temp_v0_2 = *temp_a0_7;
|
||||
switch (temp_v0_2) { /* switch 1; irregular */
|
||||
temp_a0_7 = &D_80152300[var_s0];
|
||||
temp_v0 = *temp_a0_7;
|
||||
switch (temp_v0) { /* switch 1; irregular */
|
||||
case 3: /* switch 1 */
|
||||
func_8001A588(temp_a0_7, camera, player, arg2, var_s0);
|
||||
return;
|
||||
case 1: /* switch 1 */
|
||||
temp_v0_3 = player->unk_0CA;
|
||||
if (((temp_v0_3 & 1) == 1) || ((temp_v0_3 & 2) == 2)) {
|
||||
temp_v0_2 = player->unk_0CA;
|
||||
if (((temp_v0_2 & 1) == 1) || ((temp_v0_2 & 2) == 2)) {
|
||||
func_8001E8E8(camera, player, arg2);
|
||||
return;
|
||||
}
|
||||
@@ -1202,8 +1186,8 @@ void func_8001EE98(Player *player, Camera *camera, s8 arg2) {
|
||||
func_8001F87C(var_s0);
|
||||
return;
|
||||
case 9: /* switch 1 */
|
||||
temp_v0_4 = player->unk_0CA;
|
||||
if (((temp_v0_4 & 1) == 1) || ((temp_v0_4 & 2) == 2)) {
|
||||
temp_v0_3 = player->unk_0CA;
|
||||
if (((temp_v0_3 & 1) == 1) || ((temp_v0_3 & 2) == 2)) {
|
||||
func_8001E8E8(camera, player, arg2);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -97,12 +97,16 @@ typedef struct {
|
||||
void func_8001CA10(Camera*);
|
||||
void func_8001CA24(Player*, f32);
|
||||
void func_8001CA78(Player*, Camera*, Vec3f, f32*, f32*, f32*, s16, s8);
|
||||
void func_8001D53C(Player*, Camera*, Vec3f, f32*, f32*, f32*, s16, s16);
|
||||
void func_8001D794(Player*, Camera*, Vec3f, f32*, f32*, f32*, s16);
|
||||
void func_8001E0C4(Camera*, Player*, s8);
|
||||
void func_8001E8E8(Camera*, Player*, s8);
|
||||
void func_8001F87C(s32);
|
||||
|
||||
extern s32 D_80164A2C;
|
||||
extern f32 D_80164A30;
|
||||
extern f32 D_80164A90[];
|
||||
extern f32 D_80164AA0[];
|
||||
|
||||
extern Camera cameras[];
|
||||
extern Camera *camera1;
|
||||
|
||||
@@ -13,4 +13,9 @@ void func_80003040();
|
||||
|
||||
void func_800C8F44(u16 arg0);
|
||||
|
||||
extern struct UnkStruct_800DC5EC *D_800DC5EC;
|
||||
extern struct UnkStruct_800DC5EC *D_800DC5F0;
|
||||
extern struct UnkStruct_800DC5EC *D_800DC5F4;
|
||||
extern struct UnkStruct_800DC5EC *D_800DC5F8;
|
||||
|
||||
#endif
|
||||
|
||||
+50
-129
@@ -16,6 +16,7 @@
|
||||
#include "code_8008C1D0.h"
|
||||
#include "skybox_and_splitscreen.h"
|
||||
#include "common_textures.h"
|
||||
#include "audio/external.h"
|
||||
|
||||
// UI Code?
|
||||
void func_80057C60(void) {
|
||||
@@ -4049,7 +4050,7 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005F90C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
void func_80060504(Player *player, s16 arg1, s32 arg2, s32 arg3) {
|
||||
f32 sp50;
|
||||
f32 sp4C;
|
||||
@@ -4134,71 +4135,49 @@ block_19:
|
||||
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80060504.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
s16 gCurrentCourseId; /* unable to generate initializer */
|
||||
|
||||
void func_800608E0(Player *player, s16 arg1, s32 arg2, s8 arg3) {
|
||||
f32 sp54;
|
||||
#ifdef NEEDS_RODATA
|
||||
// data/data_0DD0A0_3_0.s
|
||||
extern f64 D_800EE580;// = 0.1
|
||||
void func_800608E0(Player *player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) {
|
||||
f32 var_f0;
|
||||
f32 sp50;
|
||||
f32 sp4C;
|
||||
f32 sp48;
|
||||
UnkPlayerStruct258 *temp_s2;
|
||||
f32 temp_f12;
|
||||
f32 temp_f2;
|
||||
f32 var_f0;
|
||||
|
||||
temp_f2 = D_801652A0[arg3];
|
||||
temp_f12 = temp_f2 - player->pos[1];
|
||||
var_f0 = 8.0f - temp_f12;
|
||||
var_f0 = 8.0f - (D_801652A0[arg3] - player->pos[1]);
|
||||
if ((f64) var_f0 <= 0.0) {
|
||||
var_f0 = 0.0f;
|
||||
}
|
||||
sp4C = temp_f12 - 3.0f;
|
||||
sp4C = (D_801652A0[arg3] - player->pos[1]) - 3.0f;
|
||||
if ((player->unk_0DE & 1) && (gCurrentCourseId != 6)) {
|
||||
var_f0 = 2.5f;
|
||||
sp4C = (f32) ((f64) (temp_f2 - player->pos[1]) + 0.1);
|
||||
sp4C = (f32) ((f64) (D_801652A0[arg3] - player->pos[1]) + 0.1);
|
||||
}
|
||||
temp_s2 = &player->unk_258[arg1];
|
||||
sp54 = var_f0;
|
||||
func_8005D794(player, temp_s2, 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0);
|
||||
func_8005D7D8(temp_s2, 3, var_f0);
|
||||
func_8005D794(player, &player->unk_258[arg1], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0);
|
||||
func_8005D7D8(&player->unk_258[arg1], 3, var_f0);
|
||||
if ((gCurrentCourseId == 2) || (gCurrentCourseId == 0x0013)) {
|
||||
func_8005D800(temp_s2, 0, 0x00AF);
|
||||
func_8005D800(&player->unk_258[arg1], 0, 0x00AF);
|
||||
} else {
|
||||
func_8005D800(temp_s2, 0x00FFFFFF, 0x00CF);
|
||||
func_8005D800(&player->unk_258[arg1], 0x00FFFFFF, 0x00CF);
|
||||
}
|
||||
func_80062B18(&sp50, &sp4C, &sp48, 0.0f, sp4C, (((f32) -player->unk_258[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 10.0f) + -4.0f, (u16) (s32) -player->unk_258[arg1].unk_020, (u16) (player->unk_206 * -2));
|
||||
func_80062B18(&sp50, &sp4C, &sp48, 0.0f, sp4C, ((-player->unk_258[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 10.0f) + -4.0f, -player->unk_258[arg1].unk_020, -player->unk_206 * 2);
|
||||
player->unk_258[arg1].unk_000[0] = player->pos[0] + sp50;
|
||||
player->unk_258[arg1].unk_000[1] = player->pos[1] + sp4C;
|
||||
player->unk_258[arg1].unk_000[2] = player->pos[2] + sp48;
|
||||
player->unk_258[arg1].unk_000[1] = player->pos[1] + sp4C;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800608E0.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
? func_800608E0(s16, s8, s32); /* extern */
|
||||
s16 gCurrentCourseId; /* unable to generate initializer */
|
||||
|
||||
void func_80060B14(Player *player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) {
|
||||
s16 temp_v0;
|
||||
|
||||
temp_v0 = gCurrentCourseId;
|
||||
if ((temp_v0 != 0x0010) && (temp_v0 != 0x000D)) {
|
||||
if ((gCurrentCourseId != 0x0010) && (gCurrentCourseId != 0x000D)) {
|
||||
if ((arg1 == 0) && ((player->unk_258[arg2].unk_01E > 0) || (player->unk_258[arg2].unk_01C == 0))) {
|
||||
func_800608E0(arg1, arg3, (s32) arg4);
|
||||
return;
|
||||
}
|
||||
if (player->unk_258[arg2].unk_01E > 0) {
|
||||
func_800608E0(arg1, arg3, (s32) arg4);
|
||||
func_800608E0(player, arg1, arg2, arg3, arg4);
|
||||
} else if (player->unk_258[arg2].unk_01E > 0) {
|
||||
func_800608E0(player, arg1, arg2, arg3, arg4);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80060B14.s")
|
||||
#endif
|
||||
|
||||
#ifdef NEEDS_RODATA
|
||||
// data_0DD0A0_3_0.s
|
||||
@@ -9165,36 +9144,17 @@ void func_8006B87C(UNUSED Player *player, s8 playerIndex) {
|
||||
gPlayerBalloonStatus[playerIndex][2] = BALLOON_STATUS_GONE;
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
void func_8006B8B4(Player *player, s8 playerIndex) {
|
||||
s16 *sp1C;
|
||||
s16 *temp_v1;
|
||||
s16 temp_a3;
|
||||
u16 *temp_v0;
|
||||
u16 temp_t5;
|
||||
u8 temp_a0;
|
||||
|
||||
temp_v1 = &gPlayerBalloonCount[playerIndex];
|
||||
temp_a3 = *temp_v1;
|
||||
if (temp_a3 >= 0) {
|
||||
temp_v0 = (playerIndex * 6) + (temp_a3 * 2) + gPlayerBalloonStatus;
|
||||
temp_t5 = *temp_v0 & 0xFFFE;
|
||||
*temp_v0 = temp_t5;
|
||||
*temp_v0 = temp_t5 | 2;
|
||||
*temp_v1 = temp_a3 - 1;
|
||||
temp_a0 = playerIndex & 0xFF;
|
||||
sp1C = temp_v1;
|
||||
playerIndex = playerIndex;
|
||||
func_800C9060(temp_a0, 0x19009051U);
|
||||
if (*temp_v1 < 0) {
|
||||
if (gPlayerBalloonCount[playerIndex] >= 0) {
|
||||
gPlayerBalloonStatus[playerIndex][gPlayerBalloonCount[playerIndex]] &= ~1;
|
||||
gPlayerBalloonStatus[playerIndex][gPlayerBalloonCount[playerIndex]] |= 2;
|
||||
gPlayerBalloonCount[playerIndex]--;
|
||||
func_800C9060(playerIndex, 0x19009051U);
|
||||
if (gPlayerBalloonCount[playerIndex] < 0) {
|
||||
func_8008FD4C(player, playerIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006B8B4.s")
|
||||
#endif
|
||||
|
||||
void func_8006B974(UNUSED s32 arg0, s8 playerIndex, s8 balloonIndex) {
|
||||
if (gPlayerBalloonCount[playerIndex] >= 0) {
|
||||
@@ -9444,70 +9404,31 @@ void func_8006BB34(struct UnkStruct_8028088C *arg0, f32 arg1, s16 arg2, s16 arg3
|
||||
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006BB34.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
UNUSED void func_8006C0C8(void *arg0, ? arg1, s32 arg2, s16 arg3) {
|
||||
f32 sp54;
|
||||
f32 sp50;
|
||||
f32 sp4C;
|
||||
s16 sp48;
|
||||
s16 sp46;
|
||||
s16 sp44;
|
||||
void *sp1C;
|
||||
void *temp_v0;
|
||||
void *temp_v0_2;
|
||||
void *temp_v0_3;
|
||||
void *temp_v0_4;
|
||||
void *temp_v0_5;
|
||||
void *temp_v0_6;
|
||||
void *temp_v0_7;
|
||||
void *temp_v0_8;
|
||||
void *temp_v0_9;
|
||||
#ifdef NON_MATCHING
|
||||
// identical to code_80280650/func_80280B50
|
||||
void func_8006C0C8(f32 *arg0, f32 arg1, s32 rgb, s16 alpha) {
|
||||
Vec3f sp4C;
|
||||
Vec3s sp44;
|
||||
s16 red;
|
||||
s16 green;
|
||||
s16 blue;
|
||||
|
||||
sp4C = arg0->unk0;
|
||||
sp50 = arg0->unk4;
|
||||
sp44 = 0;
|
||||
sp54 = arg0->unk8;
|
||||
sp48 = 0;
|
||||
sp46 = camera1->unk26;
|
||||
func_800652D4(arg1, &sp4C, &sp44, arg1);
|
||||
temp_v0 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0 + 8;
|
||||
temp_v0->unk0 = 0x06000000;
|
||||
temp_v0->unk4 = &D_0D008DB8;
|
||||
temp_v0_2 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_2 + 8;
|
||||
temp_v0_2->unk0 = 0xFD700000;
|
||||
temp_v0_2->unk4 = (s32) D_8018D48C;
|
||||
temp_v0_3 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_3 + 8;
|
||||
temp_v0_3->unk4 = 0x07000000;
|
||||
temp_v0_3->unk0 = 0xF5700000;
|
||||
temp_v0_4 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_4 + 8;
|
||||
temp_v0_4->unk4 = 0;
|
||||
temp_v0_4->unk0 = 0xE6000000;
|
||||
temp_v0_5 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_5 + 8;
|
||||
temp_v0_5->unk4 = 0x071FF200;
|
||||
temp_v0_5->unk0 = 0xF3000000;
|
||||
temp_v0_6 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_6 + 8;
|
||||
temp_v0_6->unk4 = 0;
|
||||
temp_v0_6->unk0 = 0xE7000000;
|
||||
temp_v0_7 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_7 + 8;
|
||||
temp_v0_7->unk4 = 0;
|
||||
temp_v0_7->unk0 = 0xF5680800;
|
||||
temp_v0_8 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_8 + 8;
|
||||
sp1C = temp_v0_8;
|
||||
temp_v0_8->unk4 = 0x7C07C;
|
||||
temp_v0_8->unk0 = 0xF2000000;
|
||||
func_8004B35C((s16) ((arg2 >> 0x10) & 0xFF), (s16) ((arg2 >> 8) & 0xFF), (s16) (arg2 & 0xFF), arg3);
|
||||
temp_v0_9 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_9 + 8;
|
||||
temp_v0_9->unk0 = 0x06000000;
|
||||
temp_v0_9->unk4 = &D_0D008E48;
|
||||
sp4C[0] = arg0[0];
|
||||
sp4C[1] = arg0[1];
|
||||
sp4C[2] = arg0[2];
|
||||
sp44[0] = 0;
|
||||
sp44[1] = camera1->rot[1];
|
||||
sp44[2] = 0;
|
||||
func_800652D4(sp4C, sp44, arg1);
|
||||
gSPDisplayList(gDisplayListHead++, D_0D008DB8);
|
||||
gDPLoadTextureBlock(gDisplayListHead++, D_8018D48C, G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
// The exact order of operations for red/green/blue is slightly wrong...
|
||||
red = (rgb >> 0x10) & 0xFF;
|
||||
green = (rgb >> 0x08) & 0xFF;
|
||||
blue = (rgb >> 0x00) & 0xFF;
|
||||
func_8004B35C(red, green, blue, alpha);
|
||||
gSPDisplayList(gDisplayListHead++, D_0D008E48);
|
||||
D_80164AF0 += 1;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -96,6 +96,8 @@ void func_8005DA30(Player*, s16, s32, s8, s8);
|
||||
void func_8005DAD0();
|
||||
void func_8005DAD8(UnkPlayerStruct258*, s16, s16, s16);
|
||||
|
||||
void func_800608E0(Player*, s16, s32, s8, s8);
|
||||
void func_80060B14(Player*, s16, s32, s8, s8);
|
||||
void func_80060BCC(Player*, s16, s32, s32);
|
||||
void func_80060F50(Player*, s16, s8, s8);
|
||||
|
||||
|
||||
+162
-320
@@ -6,6 +6,7 @@
|
||||
#include "math_util.h"
|
||||
#include "math_util_2.h"
|
||||
#include "objects.h"
|
||||
#include "waypoints.h"
|
||||
#include "variables.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "code_80071F00.h"
|
||||
@@ -42,47 +43,16 @@ void func_80071F6C(s32 *arg0) {
|
||||
*arg0 = -1;
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern s8 D_80165CE2;
|
||||
extern s8 D_80165DC2;
|
||||
extern ? D_80165DD8;
|
||||
extern ? D_80183D58;
|
||||
|
||||
s32 func_80071FBC(void) {
|
||||
? *var_a0;
|
||||
s32 var_v1;
|
||||
s8 temp_t1;
|
||||
|
||||
var_v1 = 0;
|
||||
if (D_80165CE2 != 0) {
|
||||
var_v1 = 1;
|
||||
s32 objectIndex;
|
||||
s32 someCount = 0;
|
||||
for (objectIndex = 0; objectIndex < OBJECT_LIST_SIZE; objectIndex++) {
|
||||
if (D_80165C18[objectIndex].unk_0CA != 0) {
|
||||
someCount++;
|
||||
}
|
||||
}
|
||||
var_a0 = &D_80165DD8;
|
||||
if (D_80165DC2 != 0) {
|
||||
var_v1 += 1;
|
||||
}
|
||||
do {
|
||||
if (var_a0->unkCA != 0) {
|
||||
var_v1 += 1;
|
||||
}
|
||||
if (var_a0->unk1AA != 0) {
|
||||
var_v1 += 1;
|
||||
}
|
||||
if (var_a0->unk28A != 0) {
|
||||
var_v1 += 1;
|
||||
}
|
||||
temp_t1 = var_a0->unk36A;
|
||||
var_a0 += 0x380;
|
||||
if (temp_t1 != 0) {
|
||||
var_v1 += 1;
|
||||
}
|
||||
} while (var_a0 != &D_80183D58);
|
||||
return var_v1;
|
||||
return someCount;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80071FBC.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
@@ -4473,69 +4443,43 @@ void func_8007A4D4(s32 objectIndex, s32 playerId) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A4D4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
void func_8007A66C(s32 objectIndex, Player *player, Camera *camera) {
|
||||
f32 sp24;
|
||||
struct_80165C18_entry *sp20;
|
||||
s32 temp_t8;
|
||||
struct_80165C18_entry *temp_v0;
|
||||
u16 temp_t8;
|
||||
|
||||
temp_t8 = (0x8000 - camera->rot[1]) & 0xFFFF;
|
||||
sp24 = coss(temp_t8 & 0xFFFF);
|
||||
temp_v0 = &D_80165C18[objectIndex];
|
||||
temp_v0->unk_004[0] = (player->pos[0] + (sp24 * (temp_v0->unk_010[0] + temp_v0->unk_028[0]))) - ((temp_v0->unk_028[2] + temp_v0->unk_010[2]) * sins(temp_t8 & 0xFFFF));
|
||||
sp20 = temp_v0;
|
||||
temp_v0->unk_004[1] = temp_v0->unk_028[1] + (player->unk_074 + temp_v0->unk_010[1]);
|
||||
sp24 = sins(temp_t8 & 0xFFFF);
|
||||
temp_v0->unk_004[2] = ((temp_v0->unk_028[2] + temp_v0->unk_010[2]) * coss(temp_t8 & 0xFFFF)) + (player->pos[2] + (sp24 * (temp_v0->unk_010[0] + temp_v0->unk_028[0])));
|
||||
temp_t8 = 0x8000 - camera->rot[1];
|
||||
D_80165C18[objectIndex].unk_004[0] = (player->pos[0] + (coss(temp_t8) * (D_80165C18[objectIndex].unk_010[0] + D_80165C18[objectIndex].unk_028[0]))) - (sins(temp_t8) * (D_80165C18[objectIndex].unk_010[2] + D_80165C18[objectIndex].unk_028[2]));
|
||||
D_80165C18[objectIndex].unk_004[1] = player->unk_074 + D_80165C18[objectIndex].unk_010[1] + D_80165C18[objectIndex].unk_028[1];
|
||||
D_80165C18[objectIndex].unk_004[2] = (player->pos[2] + (sins(temp_t8) * (D_80165C18[objectIndex].unk_010[0] + D_80165C18[objectIndex].unk_028[0]))) + (coss(temp_t8) * (D_80165C18[objectIndex].unk_010[2] + D_80165C18[objectIndex].unk_028[2]));
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A66C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
void func_8007A778(s32 objectIndex, Player *player, Camera *camera) {
|
||||
f32 sp24;
|
||||
struct_80165C18_entry *sp20;
|
||||
s32 temp_t8;
|
||||
struct_80165C18_entry *temp_v0;
|
||||
u16 temp_t8;
|
||||
|
||||
temp_t8 = (0x8000 - camera->rot[1]) & 0xFFFF;
|
||||
sp24 = coss(temp_t8 & 0xFFFF);
|
||||
temp_v0 = &D_80165C18[objectIndex];
|
||||
temp_v0->unk_004[0] = (player->pos[0] + (sp24 * (temp_v0->unk_010[0] + temp_v0->unk_028[0]))) - ((temp_v0->unk_028[2] + temp_v0->unk_010[2]) * sins(temp_t8 & 0xFFFF));
|
||||
sp20 = temp_v0;
|
||||
temp_v0->unk_004[1] = temp_v0->unk_028[1] + (player->pos[1] + temp_v0->unk_010[1]);
|
||||
sp24 = sins(temp_t8 & 0xFFFF);
|
||||
temp_v0->unk_004[2] = ((temp_v0->unk_028[2] + temp_v0->unk_010[2]) * coss(temp_t8 & 0xFFFF)) + (player->pos[2] + (sp24 * (temp_v0->unk_010[0] + temp_v0->unk_028[0])));
|
||||
temp_t8 = 0x8000 - camera->rot[1];
|
||||
D_80165C18[objectIndex].unk_004[0] = (player->pos[0] + (coss(temp_t8) * (D_80165C18[objectIndex].unk_010[0] + D_80165C18[objectIndex].unk_028[0]))) - (sins(temp_t8) * (D_80165C18[objectIndex].unk_010[2] + D_80165C18[objectIndex].unk_028[2]));
|
||||
D_80165C18[objectIndex].unk_004[1] = player->pos[1] + D_80165C18[objectIndex].unk_010[1] + D_80165C18[objectIndex].unk_028[1];
|
||||
D_80165C18[objectIndex].unk_004[2] = (player->pos[2] + (sins(temp_t8) * (D_80165C18[objectIndex].unk_010[0] + D_80165C18[objectIndex].unk_028[0]))) + (coss(temp_t8) * (D_80165C18[objectIndex].unk_010[2] + D_80165C18[objectIndex].unk_028[2]));
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A778.s")
|
||||
#endif
|
||||
|
||||
UNUSED void func_8007A884(void) {
|
||||
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern ? D_80165CBE;
|
||||
extern s32 D_80183DB8;
|
||||
|
||||
void func_8007A88C(s32 playerId) {
|
||||
if ((*(&D_80165CBE + (*(&D_80183DB8 + (playerId * 4)) * 0xE0)) == 0) && (gPlayerOne[playerId].unk_0BC & 0x400000)) {
|
||||
s32 objectIndex;
|
||||
Player *player;
|
||||
|
||||
objectIndex = D_80183DB8[playerId];
|
||||
player = &gPlayerOne[playerId];
|
||||
|
||||
if ((D_80165C18[objectIndex].unk_0A6 == 0) && (player->unk_0BC & 0x400000)) {
|
||||
func_800790E4(playerId);
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A88C.s")
|
||||
#endif
|
||||
|
||||
void func_8007A910(s32 arg0) {
|
||||
if (D_801657B4 == 0) {
|
||||
func_8007A88C();
|
||||
func_8007A88C(arg0);
|
||||
}
|
||||
func_80079860(arg0);
|
||||
}
|
||||
@@ -5301,23 +5245,18 @@ void func_8007BBBC(s32 objectIndex) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007BBBC.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern ? D_80165CBE;
|
||||
extern f32 D_8018D01C;
|
||||
#ifdef NEEDS_RODATA
|
||||
// data/data_0DD0A0_3_0.s
|
||||
extern f64 D_800EEE08;// -1650.0;
|
||||
|
||||
void func_8007BD04(s32 playerId) {
|
||||
s32 sp1C;
|
||||
s32 temp_t6;
|
||||
u16 temp_v0;
|
||||
s32 objectIndex;
|
||||
|
||||
temp_t6 = *D_80183F28;
|
||||
sp1C = temp_t6;
|
||||
if (*(&D_80165CBE + (temp_t6 * 0xE0)) == 0) {
|
||||
temp_v0 = gNearestWaypointByPlayerId[playerId];
|
||||
if (((s32) temp_v0 >= 0xA0) && ((s32) temp_v0 < 0xAB)) {
|
||||
func_8008B7D4(temp_t6, (f32) ((f64) D_8018D01C * -1650.0), -200.0f, -1650.0f);
|
||||
func_800723A4(sp1C, 1);
|
||||
objectIndex = D_80183F28[0];
|
||||
if (D_80165C18[objectIndex].unk_0A6 == 0) {
|
||||
if (((s32) gNearestWaypointByPlayerId[playerId] >= 0xA0) && ((s32) gNearestWaypointByPlayerId[playerId] < 0xAB)) {
|
||||
func_8008B7D4(objectIndex, D_8018D01C * -1650.0, -200.0f, -1650.0f);
|
||||
func_800723A4(objectIndex, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5585,7 +5524,7 @@ UNUSED void func_8007C49C(void) {
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
void func_8007C4A4(s32 objectIndex) {
|
||||
struct_80165C18_entry *sp20;
|
||||
s32 sp1C;
|
||||
@@ -5710,51 +5649,56 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007C684.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_800723A4(s32, ?); // extern
|
||||
void func_800C9060(s32, ?); // extern
|
||||
extern s32 D_800E5D9C;
|
||||
extern ? D_800E5DB0;
|
||||
extern struct_80165C18_entry D_80165C18;
|
||||
extern s32 D_8018BFA8;
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
extern s16 D_8018CFF0;
|
||||
extern s16 D_8018D048;
|
||||
static ? D_800E5988; /* unable to generate initializer */
|
||||
static ? D_800E5A44; /* unable to generate initializer */
|
||||
static ? D_800E5B08; /* unable to generate initializer */
|
||||
static ? D_800E5BD4; /* unable to generate initializer */
|
||||
static ? D_800E5C90; /* unable to generate initializer */
|
||||
static s32 D_800E5D9C[5] = {
|
||||
(s32) &D_800E5988,
|
||||
(s32) &D_800E5A44,
|
||||
(s32) &D_800E5B08,
|
||||
(s32) &D_800E5BD4,
|
||||
(s32) &D_800E5C90,
|
||||
};
|
||||
static ? D_800E5DB0; /* unable to generate initializer */
|
||||
|
||||
void func_8007C7B4(s32 arg0, s8 arg1) {
|
||||
s32 *sp40;
|
||||
s16 temp_s1_2;
|
||||
s16 temp_s4;
|
||||
s16 temp_s5;
|
||||
s32 *temp_s2;
|
||||
s32 *temp_s3;
|
||||
s32 *var_s2;
|
||||
s32 *var_s3;
|
||||
s32 temp_s1;
|
||||
void *temp_s0;
|
||||
s32 *phi_s3;
|
||||
s32 *phi_s2;
|
||||
s32 temp_v1;
|
||||
struct_80165C18_entry *temp_s0;
|
||||
|
||||
temp_s3 = (arg0 * 4) + &D_8018BFA8;
|
||||
sp40 = temp_s3;
|
||||
phi_s3 = temp_s3;
|
||||
phi_s2 = &D_800E5D9C;
|
||||
var_s3 = &D_8018BFA8[arg0];
|
||||
var_s2 = D_800E5D9C;
|
||||
sp40 = var_s3;
|
||||
do {
|
||||
temp_s1 = *phi_s3;
|
||||
temp_s1 = *var_s3;
|
||||
func_800723A4(temp_s1, 1);
|
||||
temp_s0 = &D_80165C18 + (temp_s1 * 0xE0);
|
||||
temp_s0->unkD1 = arg1;
|
||||
temp_s1_2 = random_int(0x3C) - 0x1E;
|
||||
temp_s4 = random_int(0x14) - 0xA;
|
||||
temp_s5 = random_int(0x50) - 0x28;
|
||||
random_int(0x1000);
|
||||
temp_s2 = phi_s2 + 4;
|
||||
temp_s0->unk10 = temp_s1_2;
|
||||
temp_s0->unk80 = *phi_s2;
|
||||
temp_s0->unk14 = temp_s4;
|
||||
temp_s0->unk18 = temp_s5;
|
||||
phi_s3 += 4;
|
||||
phi_s2 = temp_s2;
|
||||
} while (temp_s2 != &D_800E5DB0);
|
||||
func_800C9060(arg1 & 0xFF, 0x1900705A);
|
||||
if (sp40 == &D_8018BFA8) {
|
||||
temp_s0 = &D_80165C18[temp_s1];
|
||||
temp_s0->unk_0D1 = arg1;
|
||||
temp_s1_2 = random_int(0x003CU) - 0x1E;
|
||||
temp_s4 = random_int(0x0014U) - 0xA;
|
||||
temp_s5 = random_int(0x0050U) - 0x28;
|
||||
random_int(0x1000U);
|
||||
temp_v1 = *var_s2;
|
||||
var_s2 += 4;
|
||||
var_s3 += 4;
|
||||
temp_s0->unk_010[0] = (f32) temp_s1_2;
|
||||
temp_s0->unk_080 = temp_v1;
|
||||
temp_s0->unk_010[1] = (f32) temp_s4;
|
||||
temp_s0->unk_010[2] = (f32) temp_s5;
|
||||
} while (var_s2 != &D_800E5DB0);
|
||||
func_800C9060(arg1 & 0xFF, 0x1900705AU);
|
||||
if (sp40 == D_8018BFA8) {
|
||||
D_8018CFF0 = 1;
|
||||
return;
|
||||
}
|
||||
@@ -6126,96 +6070,45 @@ loop_5:
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007D070.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern f32 D_8018D01C;
|
||||
#ifdef NEEDS_RODATA
|
||||
// data/data_0DD0A0_3_0.s
|
||||
extern f64 D_800EEEE8;// = -1775.0;
|
||||
extern f64 D_800EEEF0;// = 130.0;
|
||||
extern f64 D_800EEEF8;// = -2500.0;
|
||||
extern f64 D_800EEF00;// = 220.0;
|
||||
extern f64 D_800EEF08;// = -2100.0;
|
||||
extern f64 D_800EEF10;// = -290.0;
|
||||
|
||||
void func_8007D360(s32 objectIndex, s32 arg1) {
|
||||
f32 var_f6;
|
||||
f64 var_f10;
|
||||
f64 var_f16;
|
||||
f64 var_f16_2;
|
||||
f64 var_f16_3;
|
||||
f64 var_f16_4;
|
||||
f64 var_f18;
|
||||
f64 var_f8;
|
||||
s32 temp_v0;
|
||||
s32 temp_v0_2;
|
||||
s32 temp_v0_3;
|
||||
s32 temp_v0_4;
|
||||
s32 temp_v0_5;
|
||||
s32 temp_v0_6;
|
||||
s32 temp_v0_7;
|
||||
struct_80165C18_entry *temp_s0;
|
||||
struct_80165C18_entry *temp_s0_2;
|
||||
|
||||
if (arg1 == 1) {
|
||||
temp_v0 = random_int(0x001EU);
|
||||
temp_s0 = &D_80165C18[objectIndex];
|
||||
var_f8 = (f64) temp_v0;
|
||||
if (temp_v0 < 0) {
|
||||
var_f8 += 4294967296.0;
|
||||
}
|
||||
temp_s0->unk_010[0] = (f32) ((-1775.0 - var_f8) * (f64) D_8018D01C);
|
||||
temp_v0_2 = random_int(0x0019U);
|
||||
var_f18 = (f64) temp_v0_2;
|
||||
if (temp_v0_2 < 0) {
|
||||
var_f18 += 4294967296.0;
|
||||
}
|
||||
temp_s0->unk_010[1] = (f32) (var_f18 + 25.0);
|
||||
temp_v0_3 = random_int(0x001EU);
|
||||
var_f16 = (f64) temp_v0_3;
|
||||
if (temp_v0_3 < 0) {
|
||||
var_f16 += 4294967296.0;
|
||||
}
|
||||
temp_s0->unk_010[2] = (f32) (var_f16 + 130.0);
|
||||
temp_s0->unk_01C[1] = 0.0f;
|
||||
temp_s0->unk_01C[0] = (f32) ((f64) D_8018D01C * -2500.0);
|
||||
temp_v0_4 = random_int(0x0096U);
|
||||
var_f16_2 = (f64) temp_v0_4;
|
||||
if (temp_v0_4 < 0) {
|
||||
var_f16_2 += 4294967296.0;
|
||||
}
|
||||
temp_s0->unk_0BE[0] = 0xDC00;
|
||||
temp_s0->unkC6 = 0x0800;
|
||||
temp_s0->unk_01C[2] = (f32) (220.0 - var_f16_2);
|
||||
D_80165C18[objectIndex].unk_010[0] = (f32) ((-1775.0 - random_int(0x001EU)) * (f64) D_8018D01C);
|
||||
D_80165C18[objectIndex].unk_010[1] = (f32) (random_int(0x0019U) + 25.0);
|
||||
D_80165C18[objectIndex].unk_010[2] = (f32) (random_int(0x001EU) + 130.0);
|
||||
D_80165C18[objectIndex].unk_01C[0] = (f32) ((f64) D_8018D01C * -2500.0);
|
||||
D_80165C18[objectIndex].unk_01C[1] = 0.0f;
|
||||
D_80165C18[objectIndex].unk_01C[2] = (f32) (220.0 - random_int(0x0096U));
|
||||
D_80165C18[objectIndex].unk_0BE[0] = 0xDC00;
|
||||
D_80165C18[objectIndex].unk_0C6 = 0x0800;
|
||||
}
|
||||
temp_s0_2 = &D_80165C18[objectIndex];
|
||||
if (arg1 == 2) {
|
||||
temp_s0_2->unk_010[0] = (f32) (-0x55B - random_int(0x001EU)) * D_8018D01C;
|
||||
temp_s0_2->unk_010[1] = (f32) (random_int(0x0019U) + 0xF);
|
||||
temp_s0_2->unk_010[2] = (f32) (random_int(0x001EU) - 0xE8);
|
||||
temp_s0_2->unk_01C[1] = 0.0f;
|
||||
temp_s0_2->unk_01C[0] = (f32) ((f64) D_8018D01C * -2100.0);
|
||||
temp_v0_5 = random_int(0x00C8U);
|
||||
var_f16_3 = (f64) temp_v0_5;
|
||||
if (temp_v0_5 < 0) {
|
||||
var_f16_3 += 4294967296.0;
|
||||
}
|
||||
temp_s0_2->unk_0BE[0] = 0;
|
||||
temp_s0_2->unkC6 = 0;
|
||||
temp_s0_2->unk_01C[2] = (f32) (var_f16_3 + -290.0);
|
||||
D_80165C18[objectIndex].unk_010[0] = (f32) (-0x55B - random_int(0x001EU)) * D_8018D01C;
|
||||
D_80165C18[objectIndex].unk_010[1] = (f32) (random_int(0x0019U) + 0xF);
|
||||
D_80165C18[objectIndex].unk_010[2] = (f32) (random_int(0x001EU) - 0xE8);
|
||||
D_80165C18[objectIndex].unk_01C[0] = (f32) ((f64) D_8018D01C * -2100.0);
|
||||
D_80165C18[objectIndex].unk_01C[1] = 0.0f;
|
||||
D_80165C18[objectIndex].unk_01C[2] = (f32) (random_int(0x00C8U) + -290.0);
|
||||
D_80165C18[objectIndex].unk_0BE[0] = 0;
|
||||
D_80165C18[objectIndex].unk_0C6 = 0;
|
||||
}
|
||||
temp_s0_2->unk_0BE[1] = func_80041770(temp_s0_2->unk_010[0], temp_s0_2->unk_01C[0], temp_s0_2->unk_010[2], temp_s0_2->unk_01C[2]);
|
||||
temp_s0_2->unk_0BE[2] = 0;
|
||||
D_80165C18[objectIndex].unk_0BE[1] = func_80041770(D_80165C18[objectIndex].unk_010[0], D_80165C18[objectIndex].unk_01C[0], D_80165C18[objectIndex].unk_010[2], D_80165C18[objectIndex].unk_01C[2]);
|
||||
D_80165C18[objectIndex].unk_0BE[2] = 0;
|
||||
func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
|
||||
temp_s0_2->unk_0B0 = 0;
|
||||
D_80165C18[objectIndex].unk_0B0 = 0;
|
||||
if (gCCSelection < 2) {
|
||||
temp_v0_6 = random_int(4U);
|
||||
var_f10 = (f64) temp_v0_6;
|
||||
if (temp_v0_6 < 0) {
|
||||
var_f10 += 4294967296.0;
|
||||
}
|
||||
var_f6 = (f32) (var_f10 + 4.0);
|
||||
D_80165C18[objectIndex].unk_034 = (random_int(4U) + 4.0);
|
||||
} else {
|
||||
temp_v0_7 = random_int(4U);
|
||||
var_f16_4 = (f64) temp_v0_7;
|
||||
if (temp_v0_7 < 0) {
|
||||
var_f16_4 += 4294967296.0;
|
||||
}
|
||||
var_f6 = (f32) (var_f16_4 + 5.0);
|
||||
D_80165C18[objectIndex].unk_034 = (random_int(4U) + 5.0);
|
||||
}
|
||||
temp_s0_2->unk_034 = var_f6;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007D360.s")
|
||||
@@ -6712,23 +6605,18 @@ void func_8007E1F4(s32 objectIndex) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007E1F4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern f32 D_8018D01C;
|
||||
#ifdef NEEDS_RODATA
|
||||
// data/data_0DD0A0_3_0.s
|
||||
extern f32 D_800EEF68;// -1371.0f;
|
||||
|
||||
void func_8007E358(s32 objectIndex) {
|
||||
struct_80165C18_entry *sp1C;
|
||||
struct_80165C18_entry *temp_v0;
|
||||
|
||||
temp_v0 = &D_80165C18[objectIndex];
|
||||
temp_v0->unk_004[0] = -1371.0f * D_8018D01C;
|
||||
sp1C = temp_v0;
|
||||
temp_v0->unk_004[1] = 31.0f;
|
||||
temp_v0->unk_004[2] = -217.0f;
|
||||
D_80165C18[objectIndex].unk_004[0] = -1371.0f * D_8018D01C;
|
||||
D_80165C18[objectIndex].unk_004[1] = 31.0f;
|
||||
D_80165C18[objectIndex].unk_004[2] = -217.0f;
|
||||
func_8008B8F0(objectIndex, 0.0f, 0.0f, 0.0f);
|
||||
temp_v0->unk_0A4 = 0;
|
||||
temp_v0->unk_04C = 0;
|
||||
temp_v0->unk_084[7] = 0;
|
||||
D_80165C18[objectIndex].unk_0A4 = 0;
|
||||
D_80165C18[objectIndex].unk_04C = 0;
|
||||
D_80165C18[objectIndex].unk_084[7] = 0;
|
||||
func_80072488(objectIndex);
|
||||
}
|
||||
#else
|
||||
@@ -7139,228 +7027,182 @@ void func_8007EE5C(s32 objectIndex) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007EE5C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern f32 D_8018D01C;
|
||||
#ifdef NEEDS_RODATA
|
||||
// data/data_0DD0A0_3_0.s
|
||||
// jpt_800EEFD0
|
||||
|
||||
void func_8007EFBC(s32 objectIndex) {
|
||||
struct_80165C18_entry *sp24;
|
||||
struct_80165C18_entry *temp_v1;
|
||||
u16 temp_t8;
|
||||
|
||||
temp_v1 = &D_80165C18[objectIndex];
|
||||
temp_t8 = (u16) temp_v1->unk_0AE;
|
||||
switch (temp_t8) {
|
||||
switch (D_80165C18[objectIndex].unk_0AE) {
|
||||
case 1:
|
||||
sp24 = temp_v1;
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0800U, 0x00008000) != 0) {
|
||||
temp_v1->unk1C = (f32) ((f64) D_8018D01C * 200.0);
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0800U, 0x00008000) != 0) {
|
||||
D_80165C18[objectIndex].unk_01C[0] = (f32) ((f64) D_8018D01C * 200.0);
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
case 2:
|
||||
if (f32_step_towards(temp_v1->unk_028, temp_v1->unk1C, 4.0f) != 0) {
|
||||
if (f32_step_towards(D_80165C18[objectIndex].unk_028, D_80165C18[objectIndex].unk_01C[0], 4.0f) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00008000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00008000) != 0) {
|
||||
func_800726CC(objectIndex, 3);
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x0000C000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x0000C000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (f32_step_down_towards(&temp_v1->unk_028[2], -100.0f, 2.0f) != 0) {
|
||||
if (f32_step_down_towards(&D_80165C18[objectIndex].unk_028[2], -100.0f, 2.0f) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00004000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00004000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
func_800726CC(objectIndex, 3);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00010000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00010000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (f32_step_towards(temp_v1->unk_028, 0.0f, 4.0f) != 0) {
|
||||
if (f32_step_towards(D_80165C18[objectIndex].unk_028, 0.0f, 4.0f) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00010000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00010000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
func_800726CC(objectIndex, 3);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00014000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00014000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
if (f32_step_up_towards(&temp_v1->unk_028[2], 0.0f, 2.0f) != 0) {
|
||||
if (f32_step_up_towards(&D_80165C18[objectIndex].unk_028[2], 0.0f, 2.0f) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x0000C000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x0000C000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
func_800726CC(objectIndex, 3);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
func_8008701C(objectIndex, 1);
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007EFBC.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern f32 D_8018D01C;
|
||||
#ifdef NEEDS_RODATA
|
||||
// data/data_0DD0A0_3_0.s
|
||||
// jpt_800EF018
|
||||
|
||||
void func_8007F280(s32 objectIndex) {
|
||||
struct_80165C18_entry *sp24;
|
||||
struct_80165C18_entry *temp_v1;
|
||||
u16 temp_t8;
|
||||
|
||||
temp_v1 = &D_80165C18[objectIndex];
|
||||
temp_t8 = (u16) temp_v1->unk_0AE;
|
||||
switch (temp_t8) {
|
||||
switch (D_80165C18[objectIndex].unk_0AE) {
|
||||
case 1:
|
||||
sp24 = temp_v1;
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00010000) != 0) {
|
||||
temp_v1->unk1C = (f32) ((f64) D_8018D01C * -200.0);
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00010000) != 0) {
|
||||
D_80165C18[objectIndex].unk_01C[0] = (f32) ((f64) D_8018D01C * -200.0);
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
case 2:
|
||||
if (f32_step_towards(temp_v1->unk_028, temp_v1->unk1C, 4.0f) != 0) {
|
||||
if (f32_step_towards(D_80165C18[objectIndex].unk_028, D_80165C18[objectIndex].unk_01C[0], 4.0f) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00010000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00010000) != 0) {
|
||||
func_800726CC(objectIndex, 3);
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00004000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00004000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (f32_step_up_towards(&temp_v1->unk_028[2], 100.0f, 2.0f) != 0) {
|
||||
if (f32_step_up_towards(&D_80165C18[objectIndex].unk_028[2], 100.0f, 2.0f) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x0000C000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x0000C000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
func_800726CC(objectIndex, 3);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00008000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00008000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (f32_step_towards(temp_v1->unk_028, 0.0f, 4.0f) != 0) {
|
||||
if (f32_step_towards(D_80165C18[objectIndex].unk_028, 0.0f, 4.0f) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00008000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00008000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
func_800726CC(objectIndex, 3);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x0000C000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x0000C000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
if (f32_step_down_towards(&temp_v1->unk_028[2], 0.0f, 2.0f) != 0) {
|
||||
if (f32_step_down_towards(&D_80165C18[objectIndex].unk_028[2], 0.0f, 2.0f) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
if (func_80073E18(objectIndex, (u16 *) &temp_v1->unk_0B2[1], 0x0400U, 0x00014000) != 0) {
|
||||
if (func_80073E18(objectIndex, (u16 *) &D_80165C18[objectIndex].unk_0B2[1], 0x0400U, 0x00014000) != 0) {
|
||||
func_80086FD4(objectIndex);
|
||||
func_800726CC(objectIndex, 3);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
func_8008701C(objectIndex, 1);
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007F280.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_8007EFBC(); // extern
|
||||
void func_8007F280(); // extern
|
||||
extern ? D_80165CF5;
|
||||
|
||||
void func_8007F544(s32 arg0) {
|
||||
u8 temp_v0;
|
||||
|
||||
temp_v0 = *(&D_80165CF5 + (arg0 * 0xE0));
|
||||
if (temp_v0 != 1) {
|
||||
if (temp_v0 != 2) {
|
||||
return;
|
||||
}
|
||||
func_8007F280();
|
||||
return;
|
||||
void func_8007F544(s32 objectIndex) {
|
||||
switch (D_80165C18[objectIndex].unk_0DD) { /* irregular */
|
||||
case 1:
|
||||
func_8007EFBC(objectIndex);
|
||||
break;
|
||||
case 2:
|
||||
func_8007F280(objectIndex);
|
||||
break;
|
||||
}
|
||||
func_8007EFBC();
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007F544.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
|
||||
s32 find_unused_obj_index(s32*);
|
||||
void func_80071F6C(s32*);
|
||||
s32 func_80071FBC();
|
||||
s32 func_80072044(s32*, s32*, s32);
|
||||
void func_80072100(s32*);
|
||||
void func_80072120(s32*, s32);
|
||||
void func_80072180();
|
||||
void func_800721C0(s32, s32);
|
||||
void func_800721E8(s32, s32);
|
||||
void func_80072214(s32, s32);
|
||||
@@ -145,7 +148,10 @@ void func_800790B4(s32);
|
||||
void func_800790E4(s32);
|
||||
void func_8007993C(s32, Player*);
|
||||
void func_80079A5C(s32, Player*);
|
||||
void func_8007A66C(s32, Player*, Camera*);
|
||||
void func_8007A778(s32, Player*, Camera*);
|
||||
void func_8007A884();
|
||||
void func_8007A88C(s32);
|
||||
void func_8007A910(s32);
|
||||
void func_8007A948(s32);
|
||||
void func_8007AA44(s32);
|
||||
@@ -154,17 +160,23 @@ u8 gen_random_item(s16, s16);
|
||||
u8 func_8007AF40(s32, s16);
|
||||
u8 func_8007AF78(s32, s16);
|
||||
void func_8007BB9C();
|
||||
void func_8007BD04(s32);
|
||||
void func_8007BDA8();
|
||||
void func_8007C2F8(s32);
|
||||
void func_8007C340();
|
||||
void func_8007C49C();
|
||||
void func_8007D360(s32, s32);
|
||||
s32 func_8007D804(s32);
|
||||
void func_8007D8AC(s32);
|
||||
void func_8007D8D4(s32, s32);
|
||||
void func_8007DA4C(s32);
|
||||
void func_8007DA74(s32);
|
||||
void func_8007DAF8(s32, s32);
|
||||
void func_8007E358(s32);
|
||||
s32 func_8007E50C(s32, Player*, Camera*);
|
||||
void func_8007EFBC(s32);
|
||||
void func_8007F280(s32);
|
||||
void func_8007F544(s32);
|
||||
void func_8007F660(s32, s32, s32);
|
||||
void func_8007F6C4(s32, s32);
|
||||
void func_8007FEA4(s32);
|
||||
@@ -220,6 +232,7 @@ extern s32 D_80183E5C;
|
||||
extern s32 D_8018C1B0;
|
||||
extern s32 D_8018C3F0;
|
||||
extern s32 D_8018C630;
|
||||
extern f32 D_8018D01C;
|
||||
extern s32 D_8018D140;
|
||||
extern s32 D_8018D224;
|
||||
extern s32* D_8018D490;
|
||||
|
||||
+53
-118
@@ -599,15 +599,12 @@ void func_8009265C(void) {
|
||||
add_8018D9E0_entry(0x12B, 0, 0, 2);
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
|
||||
extern u16 D_800DC5E4;
|
||||
#ifdef NEEDS_RODATA
|
||||
// data/data_0DD0A0_3_0.s
|
||||
// jpt_800F0CD8
|
||||
|
||||
void func_80092688(void) {
|
||||
u16 temp_t6;
|
||||
|
||||
temp_t6 = D_800DC5E4;
|
||||
switch (temp_t6) {
|
||||
switch (D_800DC5E4) {
|
||||
case 0:
|
||||
add_8018D9E0_entry(0x1CE, 0, 0, 2);
|
||||
return;
|
||||
@@ -825,27 +822,29 @@ s32 func_80092DF8(s8 *arg) {
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
s32 func_80092E1C(s8 *arg0) {
|
||||
s32 temp_t6;
|
||||
|
||||
temp_t6 = (*arg0 + 0x80) & 0xFF;
|
||||
if ((temp_t6 >= 0x21) && (temp_t6 < 0x2B)) {
|
||||
if ((temp_t6 % 2) != 0) {
|
||||
return ((temp_t6 - 0x21) / 2) + 0x7B;
|
||||
return ((s32) (temp_t6 - 0x21) / 2) + 0x7B;
|
||||
}
|
||||
return ((temp_t6 - 0x21) / 2) + 0x30;
|
||||
return ((s32) (temp_t6 - 0x21) / 2) + 0x30;
|
||||
}
|
||||
if ((temp_t6 >= 0x2B) && (temp_t6 < 0x6E)) {
|
||||
return temp_t6 + 0xA;
|
||||
}
|
||||
if (temp_t6 != 0x6F) {
|
||||
if ((temp_t6 != 0x72) && (temp_t6 != 0x73)) {
|
||||
return -2;
|
||||
}
|
||||
switch (temp_t6) { /* irregular */
|
||||
default:
|
||||
return -2;
|
||||
case 0x6F:
|
||||
return 0x00000078;
|
||||
case 0x72:
|
||||
case 0x73:
|
||||
return temp_t6 + 7;
|
||||
}
|
||||
return 0x78;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80091750/func_80092E1C.s")
|
||||
@@ -14451,28 +14450,17 @@ block_13:
|
||||
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800ABC38.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
s8 *D_800E7500[9] = {
|
||||
"mushroom cup",
|
||||
"flower cup",
|
||||
"star cup",
|
||||
"special cup",
|
||||
"battle",
|
||||
"mushroom cup",
|
||||
"flower cup",
|
||||
"star cup",
|
||||
"special cup",
|
||||
};
|
||||
#ifdef NEEDS_RODATA
|
||||
// data/data_0DD0A0_3_0.s
|
||||
extern char *D_800E7500[9];// = { "mushroom cup", "flower cup", "star cup", "special cup", "battle", "mushroom cup", "flower cup", "star cup", "special cup", };
|
||||
extern f64 D_800F2630;// = 0.05;
|
||||
extern f64 D_800F2638;// = 0.0085;
|
||||
extern f64 D_800F2640;// = 0.4;
|
||||
|
||||
void func_800ABCF4(struct_8018D9E0_entry *arg0) {
|
||||
f64 temp_f0;
|
||||
s32 temp_t1;
|
||||
s32 temp_t1_2;
|
||||
s32 temp_v0;
|
||||
|
||||
temp_v0 = arg0->unk4;
|
||||
switch (temp_v0) { /* irregular */
|
||||
switch (arg0->unk4) { /* irregular */
|
||||
case 0:
|
||||
arg0->column = 0;
|
||||
arg0->unk4 = 1;
|
||||
@@ -14480,26 +14468,23 @@ void func_800ABCF4(struct_8018D9E0_entry *arg0) {
|
||||
/* fallthrough */
|
||||
case 1:
|
||||
func_800A9208(arg0, arg0->unk20);
|
||||
temp_t1 = (s32) (arg0->unk20 - arg0->column) / 4;
|
||||
arg0->unk1C = temp_t1;
|
||||
if (temp_t1 >= 9) {
|
||||
arg0->unk1C = (s32) (arg0->unk20 - arg0->column) / 4;
|
||||
if (arg0->unk1C >= 9) {
|
||||
arg0->unk1C = 8;
|
||||
}
|
||||
arg0->unk24 = (f32) (((f64) arg0->unk1C * 0.05) + 1.0);
|
||||
if (arg0->column >= (arg0->unk20 - 0x14)) {
|
||||
arg0->unk4 = 2;
|
||||
arg0->D_8018DEE0_index = 0;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
break;
|
||||
case 2:
|
||||
func_800A9208(arg0, arg0->unk20);
|
||||
temp_t1_2 = arg0->D_8018DEE0_index + 1;
|
||||
temp_f0 = (f64) (temp_t1_2 - 0xA);
|
||||
arg0->unk1C = (s32) (arg0->unk20 - arg0->column) / 4;
|
||||
arg0->D_8018DEE0_index = temp_t1_2;
|
||||
arg0->D_8018DEE0_index++;
|
||||
temp_f0 = (f64) (arg0->D_8018DEE0_index - 0xA);
|
||||
arg0->unk24 = (f32) ((temp_f0 * 0.0085 * temp_f0) + 0.4);
|
||||
if ((temp_t1_2 >= 9) && ((f64) arg0->unk24 > 1.0)) {
|
||||
if ((arg0->D_8018DEE0_index >= 9) && ((f64) arg0->unk24 > 1.0)) {
|
||||
arg0->unk24 = 1.0f;
|
||||
}
|
||||
break;
|
||||
@@ -14509,46 +14494,34 @@ void func_800ABCF4(struct_8018D9E0_entry *arg0) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800ABCF4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
|
||||
void func_800ABF68(); /* extern */
|
||||
extern s8 D_8018EE08;
|
||||
|
||||
void func_800ABEAC(struct_8018D9E0_entry *arg0) {
|
||||
s32 temp_v0;
|
||||
s32 temp_v0_2;
|
||||
s32 temp_v0_3;
|
||||
|
||||
func_800ABF68();
|
||||
temp_v0 = D_80164A28;
|
||||
switch (temp_v0) { /* irregular */
|
||||
// Why?
|
||||
s32 one = 1;
|
||||
func_800ABF68(arg0);
|
||||
switch (D_80164A28) {
|
||||
case 1:
|
||||
arg0->visible = 1;
|
||||
return;
|
||||
arg0->visible = one;
|
||||
break;
|
||||
case 2:
|
||||
temp_v0_2 = arg0->row;
|
||||
if (temp_v0_2 < 0x104) {
|
||||
arg0->row = temp_v0_2 + 2;
|
||||
return;
|
||||
if (arg0->row < 0x104) {
|
||||
arg0->row += 2;
|
||||
} else {
|
||||
arg0->type = 0;
|
||||
}
|
||||
block_13:
|
||||
arg0->type = 0;
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
if ((gModeSelection != GRAND_PRIX) || (gPlayerCountSelection1 != 1U) || (D_8018EE08 != 0)) {
|
||||
goto block_13;
|
||||
if ((gModeSelection != 0) || (gPlayerCountSelection1 != one) || (D_8018EE08 != 0)) {
|
||||
arg0->type = 0;
|
||||
} else {
|
||||
if (arg0->row < 0x104) {
|
||||
arg0->row += 2;
|
||||
} else {
|
||||
arg0->type = 0;
|
||||
}
|
||||
}
|
||||
temp_v0_3 = arg0->row;
|
||||
if (temp_v0_3 < 0x104) {
|
||||
arg0->row = temp_v0_3 + 2;
|
||||
return;
|
||||
}
|
||||
goto block_13;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800ABEAC.s")
|
||||
#endif
|
||||
|
||||
#ifdef NEEDS_RODATA
|
||||
// data_0DD0A0_3_0.s
|
||||
@@ -16221,56 +16194,18 @@ void func_800AEC54(struct_8018D9E0_entry *arg0) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AEC54.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
|
||||
s32 func_800B5B94(); /* extern */
|
||||
void func_800B6708(); /* extern */
|
||||
extern struct_8018EE10_entry D_8018EE10;
|
||||
MkAnimation *D_800E7E34[0x14] = {
|
||||
D_02001E64,
|
||||
D_02001E74,
|
||||
D_02001E84,
|
||||
D_02001E94,
|
||||
D_02001EA4,
|
||||
D_02001EB4,
|
||||
D_02001EC4,
|
||||
D_02001ED4,
|
||||
D_02001EE4,
|
||||
D_02001EF4,
|
||||
D_02001F04,
|
||||
D_02001F14,
|
||||
D_02001F24,
|
||||
D_02001F34,
|
||||
D_02001F44,
|
||||
D_02001F54,
|
||||
D_02001F64,
|
||||
D_02001F74,
|
||||
D_02001F84,
|
||||
D_02001F94,
|
||||
}; /* const */
|
||||
s16 gCupCourseOrder[5][4]; /* unable to generate initializer; const */
|
||||
|
||||
void func_800AEDBC(struct_8018D9E0_entry *arg0) {
|
||||
s8 temp_v0;
|
||||
s8 temp_v0_2;
|
||||
|
||||
temp_v0 = gTimeTrialDataCourseIndex;
|
||||
if (temp_v0 != arg0->unk1C) {
|
||||
arg0->unk1C = (s32) temp_v0;
|
||||
temp_v0_2 = gTimeTrialDataCourseIndex;
|
||||
arg0 = arg0;
|
||||
func_8009A594(arg0->D_8018DEE0_index, 0, segmented_to_virtual_dupe_2(D_800E7E34[*(gCupCourseOrder + ((((s32) temp_v0_2 / 4) * 8) + (((s32) temp_v0_2 % 4) * 2)))]));
|
||||
if (arg0->unk1C != gTimeTrialDataCourseIndex) {
|
||||
arg0->unk1C = (s32) gTimeTrialDataCourseIndex;
|
||||
func_8009A594(arg0->D_8018DEE0_index, 0, segmented_to_virtual_dupe_2(D_800E7E34[gCupCourseOrder[gTimeTrialDataCourseIndex / 4][gTimeTrialDataCourseIndex % 4]]));
|
||||
if (func_800B5B94() == 0) {
|
||||
func_800B6708();
|
||||
return;
|
||||
} else {
|
||||
D_8018EE10[0].ghostDataSaved = 0;
|
||||
D_8018EE10[1].ghostDataSaved = 0;
|
||||
}
|
||||
D_8018EE10.unk4 = 0;
|
||||
D_8018EE10.unk84 = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AEDBC.s")
|
||||
#endif
|
||||
|
||||
void func_800AEE90(struct_8018D9E0_entry *arg0) {
|
||||
if (D_8018EDEC != 0xB) {
|
||||
|
||||
+7
-3
@@ -67,6 +67,7 @@ void func_800925CC();
|
||||
void func_80092604();
|
||||
void func_80092630();
|
||||
void func_8009265C();
|
||||
void func_80092688();
|
||||
void func_80092C80();
|
||||
s32 char_to_glyph_index(char*);
|
||||
s32 func_80092DF8(s8 *);
|
||||
@@ -207,12 +208,15 @@ void func_800AB020(struct_8018D9E0_entry*);
|
||||
void func_800AB098(struct_8018D9E0_entry*);
|
||||
void func_800AB260(struct_8018D9E0_entry*);
|
||||
void func_800AB290(struct_8018D9E0_entry*);
|
||||
void func_800ABCF4(struct_8018D9E0_entry*);
|
||||
void func_800ABEAC(struct_8018D9E0_entry*);
|
||||
void func_800ABF68(struct_8018D9E0_entry*);
|
||||
void func_800AC128(struct_8018D9E0_entry*);
|
||||
void func_800AC324(struct_8018D9E0_entry*);
|
||||
void func_800AC978(struct_8018D9E0_entry*);
|
||||
void func_800AD1A4(struct_8018D9E0_entry*);
|
||||
void func_800AEC54(struct_8018D9E0_entry*);
|
||||
void func_800AEDBC(struct_8018D9E0_entry*);
|
||||
void func_800AEE90(struct_8018D9E0_entry*);
|
||||
void func_800AEEBC(struct_8018D9E0_entry*);
|
||||
void func_800AEEE8(struct_8018D9E0_entry*);
|
||||
@@ -220,9 +224,6 @@ void func_800AF480(struct_8018D9E0_entry*);
|
||||
void func_800AF4DC(struct_8018D9E0_entry*);
|
||||
void func_800AF740(struct_8018D9E0_entry*);
|
||||
|
||||
// code_80057C60.c
|
||||
void func_80057CE4();
|
||||
|
||||
/* File specific defines */
|
||||
|
||||
#define D_8018D9E0_SIZE 0x20
|
||||
@@ -315,4 +316,7 @@ extern u8 _textures_0bSegmentRomStart[];
|
||||
extern s32 D_8018E7A8; // maybe?
|
||||
extern s8 D_8018E7B0; // maybe?
|
||||
|
||||
// This is tracking which credit "state" we're in, decides which credits are shown (and probably other stuff)
|
||||
extern u16 D_800DC5E4;
|
||||
|
||||
#endif
|
||||
|
||||
+8
-23
@@ -133,31 +133,16 @@ UNUSED void *sm64_vec3f_set(Vec3f dest, f32 x, f32 y, f32 z) {
|
||||
return &dest;
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
void func_802B5350(f32 (*arg0)[4], f32 (*arg1)[4]) {
|
||||
f32 (*var_a2)[4];
|
||||
f32 (*var_v1)[4];
|
||||
f32 temp_f6;
|
||||
s32 var_v0;
|
||||
void func_802B5350(Mat4 arg0, Mat4 arg1) {
|
||||
s32 row;
|
||||
s32 column;
|
||||
|
||||
var_a2 = arg0;
|
||||
var_v0 = 0;
|
||||
var_v1 = arg1;
|
||||
do {
|
||||
var_v0 += 1;
|
||||
var_v1 += 0x10;
|
||||
var_v1->unk-10 = (f32) var_a2[0][0];
|
||||
temp_f6 = var_a2[0][1];
|
||||
var_a2 += 0x10;
|
||||
var_v1->unk-C = temp_f6;
|
||||
var_v1->unk-8 = (f32) var_a2->unk-8;
|
||||
var_v1->unk-4 = (f32) var_a2->unk-4;
|
||||
} while (var_v0 != 4);
|
||||
for (row = 0; row < 4; row++) {
|
||||
for (column = 0; column < 4; column++) {
|
||||
arg1[row][column] = arg0[row][column];
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/math_util/func_802B5350.s")
|
||||
#endif
|
||||
|
||||
// mtxf_copy
|
||||
void func_802B5398(s32 *dest, s32 *src, s32 arg2) {
|
||||
|
||||
@@ -24,6 +24,7 @@ void vec3s_set(Vec3s, s16, s16, s16);
|
||||
void *vec3f_copy(Vec3f, Vec3f);
|
||||
void vec3s_copy(Vec3s, Vec3s);
|
||||
void *sm64_vec3f_set(Vec3f, f32, f32, f32);
|
||||
void func_802B5350(Mat4, Mat4);
|
||||
void func_802B5398(s32*, s32*, s32);
|
||||
void mtxf_identity(Mat4);
|
||||
void func_802B5450(Mat4, Mat4, Vec3f);
|
||||
|
||||
+172
-227
@@ -580,85 +580,76 @@ void func_802A8F14(Gfx *arg0, u8 arg1, u8 arg2) {
|
||||
Gfx D_802B8D58[] = {gsDPTileSync()};
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
|
||||
static Gfx D_802B8D58; /* unable to generate initializer */
|
||||
|
||||
|
||||
|
||||
void func_802A8F80(s32 arg0, s32 arg1, s8 arg2) {
|
||||
s32 sp58;
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
void func_802A8F80(Gfx *displayList, s32 arg1, s8 arg2) {
|
||||
u32 sp58;
|
||||
s32 sp48;
|
||||
s32 sp44;
|
||||
s32 sp40;
|
||||
s32 temp_a1;
|
||||
s32 temp_t5;
|
||||
s32 temp_t8;
|
||||
s32 temp_t9;
|
||||
s32 var_v0;
|
||||
s32 var_v1;
|
||||
u8 temp_a0;
|
||||
u8 temp_a0_2;
|
||||
s32 phi_v1;
|
||||
s32 phi_v0;
|
||||
|
||||
sp58.unk0 = D_802B8D58.unk0;
|
||||
sp58.unk4 = D_802B8D58.unk4;
|
||||
phi_v0 = 0;
|
||||
phi_v0 = 0;
|
||||
sp58.unk0 = D_802B8D58->words.w0;
|
||||
var_v0 = 0;
|
||||
sp58.unk4 = (u32) D_802B8D58->words.w1;
|
||||
switch (arg2) {
|
||||
case 26:
|
||||
sp44 = 0x20;
|
||||
var_v1 = 0x00000020;
|
||||
sp44 = 0x00000020;
|
||||
sp40 = 0;
|
||||
phi_v1 = 0x20;
|
||||
block_9:
|
||||
sp48 = phi_v1;
|
||||
sp48 = var_v1;
|
||||
break;
|
||||
case 44:
|
||||
sp44 = 0x20;
|
||||
var_v1 = 0x00000020;
|
||||
sp44 = 0x00000020;
|
||||
sp40 = 0;
|
||||
phi_v1 = 0x20;
|
||||
phi_v0 = 0x100;
|
||||
var_v0 = 0x100;
|
||||
goto block_9;
|
||||
case 27:
|
||||
sp44 = 0x20;
|
||||
var_v1 = 0x00000040;
|
||||
sp44 = 0x00000020;
|
||||
sp40 = 0;
|
||||
phi_v1 = 0x40;
|
||||
goto block_9;
|
||||
case 28:
|
||||
sp44 = 0x40;
|
||||
var_v1 = 0x00000020;
|
||||
sp44 = 0x00000040;
|
||||
sp40 = 0;
|
||||
phi_v1 = 0x20;
|
||||
goto block_9;
|
||||
case 29:
|
||||
sp44 = 0x20;
|
||||
var_v1 = 0x00000020;
|
||||
sp44 = 0x00000020;
|
||||
sp40 = 3;
|
||||
phi_v1 = 0x20;
|
||||
goto block_9;
|
||||
case 30:
|
||||
sp44 = 0x20;
|
||||
var_v1 = 0x00000040;
|
||||
sp44 = 0x00000020;
|
||||
sp40 = 3;
|
||||
phi_v1 = 0x40;
|
||||
goto block_9;
|
||||
case 31:
|
||||
sp44 = 0x40;
|
||||
var_v1 = 0x00000020;
|
||||
sp44 = 0x00000040;
|
||||
sp40 = 3;
|
||||
phi_v1 = 0x20;
|
||||
goto block_9;
|
||||
}
|
||||
temp_a1 = D_802BA274;
|
||||
temp_a0 = *(temp_a1 + arg1);
|
||||
temp_t9 = temp_a1 + 1;
|
||||
temp_a0 = *(D_802BA274 + arg1);
|
||||
temp_t9 = D_802BA274 + 1;
|
||||
D_802BA274 = temp_t9;
|
||||
temp_a0_2 = *(temp_t9 + arg1);
|
||||
D_802BA274 = temp_t9 + 1;
|
||||
*(arg0 + (D_802BA270 * 8)) = sp58;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = sp5C;
|
||||
displayList[D_802BA270].words.w0 = sp58;
|
||||
displayList[D_802BA270].words.w1 = sp5C;
|
||||
D_802BA270 += 1;
|
||||
*(arg0 + (D_802BA270 * 8)) = (sp40 << 0x15) | 0xF5000000 | 0x100000 | ((((sp48 * 2) + 7) >> 3) << 9) | phi_v0;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = ((temp_a0_2 & 0xF) << 0x12) | (((temp_a0_2 & 0xF0) >> 4) << 0xE) | ((temp_a0 & 0xF) << 8) | (((temp_a0 & 0xF0) >> 4) * 0x10);
|
||||
displayList[D_802BA270].words.w0 = (sp40 << 0x15) | 0xF5000000 | 0x100000 | (((s32) ((sp48 * 2) + 7) >> 3) << 9) | var_v0;
|
||||
displayList[D_802BA270].words.w1 = ((temp_a0_2 & 0xF) << 0x12) | (((u32) (temp_a0_2 & 0xF0) >> 4) << 0xE) | ((temp_a0 & 0xF) << 8) | (((u32) (temp_a0 & 0xF0) >> 4) * 0x10);
|
||||
temp_t5 = D_802BA270 + 1;
|
||||
temp_t8 = temp_t5 * 8;
|
||||
D_802BA270 = temp_t5;
|
||||
*(arg0 + temp_t8) = 0xF2000000;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = ((sp48 - 1) << 0xE) | ((sp44 - 1) * 4);
|
||||
displayList[temp_t5].words.w0 = 0xF2000000;
|
||||
displayList[D_802BA270].words.w1 = ((sp48 - 1) << 0xE) | ((sp44 - 1) * 4);
|
||||
D_802BA270 += 1;
|
||||
}
|
||||
#else
|
||||
@@ -669,111 +660,106 @@ Gfx D_802B8D60[] = { gsDPTileSync() };
|
||||
Gfx D_802B8D68[] = { gsDPLoadSync() };
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
|
||||
static Gfx D_802B8D60; /* unable to generate initializer */
|
||||
static Gfx D_802B8D68; /* unable to generate initializer */
|
||||
|
||||
void func_802A91E4(s32 arg0, s32 arg1, s8 arg2) {
|
||||
s32 sp48;
|
||||
s32 sp40;
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
void func_802A91E4(Gfx *displayList, s32 arg1, s8 arg2) {
|
||||
u32 sp48;
|
||||
u32 sp40;
|
||||
s32 sp2C;
|
||||
s32 sp28;
|
||||
s32 sp24;
|
||||
s32 temp_t1;
|
||||
s32 temp_t6;
|
||||
s32 temp_t6_2;
|
||||
s32 temp_t8;
|
||||
s32 temp_t9;
|
||||
s32 temp_t9_2;
|
||||
s32 temp_v1;
|
||||
s32 var_v0;
|
||||
u32 temp_t1;
|
||||
u32 temp_t2;
|
||||
u32 temp_t6_3;
|
||||
u32 var_a2;
|
||||
u32 var_v0_2;
|
||||
u32 var_v1;
|
||||
u8 temp_a2;
|
||||
u8 temp_a3;
|
||||
s32 phi_v0;
|
||||
u32 phi_v0_2;
|
||||
u32 phi_a2;
|
||||
u32 phi_v1;
|
||||
|
||||
sp48.unk0 = D_802B8D60.unk0;
|
||||
sp48.unk4 = D_802B8D60.unk4;
|
||||
sp40.unk0 = D_802B8D68.unk0;
|
||||
sp40.unk4 = D_802B8D68.unk4;
|
||||
sp48.unk0 = D_802B8D60->words.w0;
|
||||
sp48.unk4 = (u32) D_802B8D60->words.w1;
|
||||
sp40.unk0 = D_802B8D68->words.w0;
|
||||
sp40.unk4 = (u32) D_802B8D68->words.w1;
|
||||
switch (arg2) {
|
||||
case 32:
|
||||
sp28 = 0x20;
|
||||
var_v0 = 0x00000020;
|
||||
sp28 = 0x00000020;
|
||||
sp24 = 0;
|
||||
phi_v0 = 0x20;
|
||||
block_8:
|
||||
sp2C = phi_v0;
|
||||
sp2C = var_v0;
|
||||
break;
|
||||
case 33:
|
||||
sp28 = 0x20;
|
||||
var_v0 = 0x00000040;
|
||||
sp28 = 0x00000020;
|
||||
sp24 = 0;
|
||||
phi_v0 = 0x40;
|
||||
goto block_8;
|
||||
case 34:
|
||||
sp28 = 0x40;
|
||||
var_v0 = 0x00000020;
|
||||
sp28 = 0x00000040;
|
||||
sp24 = 0;
|
||||
phi_v0 = 0x20;
|
||||
goto block_8;
|
||||
case 35:
|
||||
sp28 = 0x20;
|
||||
var_v0 = 0x00000020;
|
||||
sp28 = 0x00000020;
|
||||
sp24 = 3;
|
||||
phi_v0 = 0x20;
|
||||
goto block_8;
|
||||
case 36:
|
||||
sp28 = 0x20;
|
||||
var_v0 = 0x00000040;
|
||||
sp28 = 0x00000020;
|
||||
sp24 = 3;
|
||||
phi_v0 = 0x40;
|
||||
goto block_8;
|
||||
case 37:
|
||||
sp28 = 0x40;
|
||||
var_v0 = 0x00000020;
|
||||
sp28 = 0x00000040;
|
||||
sp24 = 3;
|
||||
phi_v0 = 0x20;
|
||||
goto block_8;
|
||||
}
|
||||
temp_v1 = D_802BA274;
|
||||
temp_a2 = *(arg1 + temp_v1);
|
||||
temp_t9 = temp_v1 + 1;
|
||||
temp_a2 = *(arg1 + D_802BA274);
|
||||
temp_t9 = D_802BA274 + 1;
|
||||
D_802BA274 = temp_t9;
|
||||
temp_t8 = temp_t9 + 1;
|
||||
D_802BA274 = temp_t8;
|
||||
temp_a3 = *(temp_t8 + arg1);
|
||||
D_802BA274 = temp_t8 + 1;
|
||||
temp_t6 = sp24 << 0x15;
|
||||
*(arg0 + (D_802BA270 * 8)) = temp_t6 | 0xFD000000 | 0x100000;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = (temp_a2 << 0xB) + 0x5000000;
|
||||
displayList[D_802BA270].words.w0 = temp_t6 | 0xFD000000 | 0x100000;
|
||||
displayList[D_802BA270].words.w1 = (temp_a2 << 0xB) + 0x05000000;
|
||||
temp_t9_2 = D_802BA270 + 1;
|
||||
D_802BA270 = temp_t9_2;
|
||||
*(arg0 + (temp_t9_2 * 8)) = sp48;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = sp4C;
|
||||
displayList[temp_t9_2].words.w0 = sp48;
|
||||
var_v1 = 0x7FF;
|
||||
displayList[D_802BA270].words.w1 = sp4C;
|
||||
D_802BA270 += 1;
|
||||
*(arg0 + (D_802BA270 * 8)) = temp_t6 | 0xF5000000 | 0x100000 | (temp_a3 & 0xF);
|
||||
temp_t1 = ((temp_a3 & 0xF0) >> 4) << 0x18;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = temp_t1;
|
||||
displayList[D_802BA270].words.w0 = temp_t6 | 0xF5000000 | 0x100000 | (temp_a3 & 0xF);
|
||||
temp_t1 = ((u32) (temp_a3 & 0xF0) >> 4) << 0x18;
|
||||
displayList[D_802BA270].words.w1 = temp_t1;
|
||||
temp_t6_2 = D_802BA270 + 1;
|
||||
D_802BA270 = temp_t6_2;
|
||||
*(arg0 + (temp_t6_2 * 8)) = sp40;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = sp44;
|
||||
temp_t6_3 = (sp2C * 2) >> 3;
|
||||
displayList[temp_t6_2].words.w0 = sp40;
|
||||
displayList[D_802BA270].words.w1 = sp44;
|
||||
temp_t6_3 = (u32) (sp2C * 2) >> 3;
|
||||
D_802BA270 += 1;
|
||||
temp_t2 = (sp2C * sp28) - 1;
|
||||
phi_v1 = 0x7FF;
|
||||
if (temp_t2 < 0x7FF) {
|
||||
phi_v1 = temp_t2;
|
||||
if (temp_t2 < 0x7FFU) {
|
||||
var_v1 = temp_t2;
|
||||
}
|
||||
if (temp_t6_3 == 0) {
|
||||
phi_v0_2 = 1;
|
||||
var_v0_2 = 1;
|
||||
} else {
|
||||
phi_v0_2 = temp_t6_3;
|
||||
var_v0_2 = temp_t6_3;
|
||||
}
|
||||
phi_a2 = temp_t6_3;
|
||||
var_a2 = temp_t6_3;
|
||||
if (temp_t6_3 == 0) {
|
||||
phi_a2 = 1;
|
||||
var_a2 = 1;
|
||||
}
|
||||
*(arg0 + (D_802BA270 * 8)) = 0xF3000000;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = ((phi_v0_2 + 0x7FF) / phi_a2) | temp_t1 | (phi_v1 << 0xC);
|
||||
displayList[D_802BA270].words.w0 = 0xF3000000;
|
||||
displayList[D_802BA270].words.w1 = ((u32) (var_v0_2 + 0x7FF) / var_a2) | temp_t1 | (var_v1 << 0xC);
|
||||
D_802BA270 += 1;
|
||||
}
|
||||
#else
|
||||
@@ -796,220 +782,183 @@ void func_802A9544(Gfx *arg0, u8 arg1, u8 arg2) {
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern s32 D_802BA270;
|
||||
extern s32 D_802BA274;
|
||||
|
||||
void func_802A95B0(s32 arg0, s32 arg1, ? arg2) {
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
void func_802A95B0(Gfx *displayList, u8 *arg1, s32 arg2) {
|
||||
s32 temp_t5;
|
||||
s32 temp_t7;
|
||||
s32 temp_t7_2;
|
||||
s32 temp_v1;
|
||||
u8 temp_v0;
|
||||
|
||||
temp_v1 = D_802BA274;
|
||||
temp_t7 = temp_v1 + 1;
|
||||
temp_v0 = *(temp_v1 + arg1);
|
||||
temp_t7 = D_802BA274 + 1;
|
||||
temp_v0 = arg1[D_802BA274];
|
||||
D_802BA274 = temp_t7;
|
||||
temp_t5 = temp_t7 + 1;
|
||||
D_802BA274 = temp_t5;
|
||||
temp_t7_2 = temp_t5 + 1;
|
||||
D_802BA274 = temp_t7_2;
|
||||
D_802BA274 = temp_t7_2 + 1;
|
||||
*(arg0 + (D_802BA270 * 8)) = ((*(temp_t7_2 + arg1) & 0x3F) << 0x11) | 0x4000000 | (((*(temp_t5 + arg1) & 0x3F) * 0x410) - 1);
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = (((*(temp_t7 + arg1) << 8) | temp_v0) * 0x10) + 0x4000000;
|
||||
D_802BA270 = D_802BA270 + 1;
|
||||
displayList[D_802BA270].words.w0 = ((arg1[temp_t7_2] & 0x3F) << 0x11) | 0x04000000 | (((arg1[temp_t5] & 0x3F) * 0x410) - 1);
|
||||
displayList[D_802BA270].words.w1 = (((arg1[temp_t7] << 8) | temp_v0) * 0x10) + 0x04000000;
|
||||
D_802BA270 += 1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/memory/func_802A95B0.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern s32 D_802BA270;
|
||||
extern s32 D_802BA274;
|
||||
|
||||
void func_802A9674(s32 arg0, s32 arg1, s8 arg2) {
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
void func_802A9674(Gfx *displayList, u8 *arg1, s8 arg2) {
|
||||
s32 temp_t9;
|
||||
s32 temp_v1;
|
||||
u8 temp_v0;
|
||||
|
||||
temp_v1 = D_802BA274;
|
||||
temp_t9 = temp_v1 + 1;
|
||||
temp_v0 = *(temp_v1 + arg1);
|
||||
temp_t9 = D_802BA274 + 1;
|
||||
temp_v0 = arg1[D_802BA274];
|
||||
D_802BA274 = temp_t9;
|
||||
D_802BA274 = temp_t9 + 1;
|
||||
*(arg0 + (D_802BA270 * 8)) = (((arg2 - 0x32) * 0x410) - 1) | 0x4000000;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = (((*(temp_t9 + arg1) << 8) | temp_v0) * 0x10) + 0x4000000;
|
||||
D_802BA270 = D_802BA270 + 1;
|
||||
displayList[D_802BA270].words.w0 = (((arg2 - 0x32) * 0x410) - 1) | 0x04000000;
|
||||
displayList[D_802BA270].words.w1 = (((arg1[temp_t9] << 8) | temp_v0) * 0x10) + 0x04000000;
|
||||
D_802BA270 += 1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/memory/func_802A9674.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern s32 D_802BA270;
|
||||
extern s32 D_802BA274;
|
||||
|
||||
void func_802A9714(s32 arg0, s32 arg1, ? arg2) {
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
void func_802A9714(Gfx *displayList, u8 *arg1, s32 arg2) {
|
||||
s32 temp_t7;
|
||||
s32 temp_v1;
|
||||
s32 temp_v1_2;
|
||||
s32 var_a0;
|
||||
s32 var_a2;
|
||||
s32 var_a3;
|
||||
u8 temp_v0;
|
||||
u8 temp_v0_2;
|
||||
u8 temp_v0_3;
|
||||
s32 phi_a3;
|
||||
s32 phi_a2;
|
||||
s32 phi_a0;
|
||||
|
||||
temp_v1 = D_802BA274;
|
||||
temp_v0 = *(temp_v1 + arg1);
|
||||
temp_t7 = temp_v1 + 1;
|
||||
temp_v0 = arg1[D_802BA274];
|
||||
temp_t7 = D_802BA274 + 1;
|
||||
D_802BA274 = temp_t7;
|
||||
phi_a3 = temp_v0 & 0x1F;
|
||||
phi_a0 = temp_v0 & 0x1F;
|
||||
var_a0 = temp_v0 & 0x1F;
|
||||
var_a3 = temp_v0 & 0x1F;
|
||||
if (gIsMirrorMode != 0) {
|
||||
temp_v0_2 = *(temp_t7 + arg1);
|
||||
temp_v0_2 = arg1[temp_t7];
|
||||
D_802BA274 = temp_t7 + 1;
|
||||
phi_a3 = (temp_v0_2 >> 2) & 0x1F;
|
||||
phi_a2 = ((temp_v0 >> 5) & 7) | ((temp_v0_2 & 3) * 8);
|
||||
var_a2 = ((temp_v0 >> 5) & 7) | ((temp_v0_2 & 3) * 8);
|
||||
var_a3 = (temp_v0_2 >> 2) & 0x1F;
|
||||
} else {
|
||||
temp_v1_2 = D_802BA274;
|
||||
temp_v0_3 = *(temp_v1_2 + arg1);
|
||||
D_802BA274 = temp_v1_2 + 1;
|
||||
phi_a2 = ((temp_v0 >> 5) & 7) | ((temp_v0_3 & 3) * 8);
|
||||
phi_a0 = (temp_v0_3 >> 2) & 0x1F;
|
||||
temp_v0_3 = arg1[D_802BA274];
|
||||
D_802BA274 += 1;
|
||||
var_a2 = ((temp_v0 >> 5) & 7) | ((temp_v0_3 & 3) * 8);
|
||||
var_a0 = (temp_v0_3 >> 2) & 0x1F;
|
||||
}
|
||||
*(arg0 + (D_802BA270 * 8)) = 0xBF000000;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = (phi_a3 << 0x11) | (phi_a2 << 9) | (phi_a0 * 2);
|
||||
D_802BA270 = D_802BA270 + 1;
|
||||
displayList[D_802BA270].words.w0 = 0xBF000000;
|
||||
displayList[D_802BA270].words.w1 = (var_a3 << 0x11) | (var_a2 << 9) | (var_a0 * 2);
|
||||
D_802BA270 += 1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/memory/func_802A9714.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern s32 D_802BA270;
|
||||
extern s32 D_802BA274;
|
||||
|
||||
void func_802A980C(s32 arg0, s32 arg1, ? arg2) {
|
||||
s32 temp_a2;
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
void func_802A980C(Gfx *displayList, u8 *arg1, s32 arg2) {
|
||||
s32 temp_t7;
|
||||
s32 temp_t8;
|
||||
s32 temp_t9;
|
||||
s32 temp_t9_2;
|
||||
s32 temp_v1;
|
||||
s32 temp_v1_2;
|
||||
s32 temp_v1_3;
|
||||
s32 temp_v1_4;
|
||||
s32 var_a0;
|
||||
s32 var_a2;
|
||||
s32 var_a3;
|
||||
s32 var_t0;
|
||||
s32 var_t1;
|
||||
s32 var_t2;
|
||||
u8 temp_v0;
|
||||
u8 temp_v0_2;
|
||||
u8 temp_v0_3;
|
||||
u8 temp_v0_4;
|
||||
u8 temp_v0_5;
|
||||
u8 temp_v0_6;
|
||||
s32 phi_t0;
|
||||
s32 phi_a3;
|
||||
s32 phi_a0;
|
||||
s32 phi_t2;
|
||||
s32 phi_t1;
|
||||
s32 phi_a2;
|
||||
|
||||
temp_v1 = D_802BA274;
|
||||
temp_v0 = *(temp_v1 + arg1);
|
||||
temp_t7 = temp_v1 + 1;
|
||||
temp_v0 = arg1[D_802BA274];
|
||||
temp_t7 = D_802BA274 + 1;
|
||||
D_802BA274 = temp_t7;
|
||||
temp_a2 = gIsMirrorMode;
|
||||
phi_t0 = temp_v0 & 0x1F;
|
||||
phi_a0 = temp_v0 & 0x1F;
|
||||
if (temp_a2 != 0) {
|
||||
temp_v0_2 = *(temp_t7 + arg1);
|
||||
var_a0 = temp_v0 & 0x1F;
|
||||
var_t0 = temp_v0 & 0x1F;
|
||||
if (gIsMirrorMode != 0) {
|
||||
temp_v0_2 = arg1[temp_t7];
|
||||
D_802BA274 = temp_t7 + 1;
|
||||
phi_t0 = (temp_v0_2 >> 2) & 0x1F;
|
||||
phi_a3 = ((temp_v0 >> 5) & 7) | ((temp_v0_2 & 3) * 8);
|
||||
var_a3 = ((temp_v0 >> 5) & 7) | ((temp_v0_2 & 3) * 8);
|
||||
var_t0 = (temp_v0_2 >> 2) & 0x1F;
|
||||
} else {
|
||||
temp_v1_2 = D_802BA274;
|
||||
temp_v0_3 = *(temp_v1_2 + arg1);
|
||||
D_802BA274 = temp_v1_2 + 1;
|
||||
phi_a3 = ((temp_v0 >> 5) & 7) | ((temp_v0_3 & 3) * 8);
|
||||
phi_a0 = (temp_v0_3 >> 2) & 0x1F;
|
||||
temp_v0_3 = arg1[D_802BA274];
|
||||
D_802BA274 += 1;
|
||||
var_a3 = ((temp_v0 >> 5) & 7) | ((temp_v0_3 & 3) * 8);
|
||||
var_a0 = (temp_v0_3 >> 2) & 0x1F;
|
||||
}
|
||||
temp_v1_3 = D_802BA274;
|
||||
temp_v0_4 = *(temp_v1_3 + arg1);
|
||||
temp_t9 = temp_v1_3 + 1;
|
||||
temp_v0_4 = arg1[D_802BA274];
|
||||
temp_t9 = D_802BA274 + 1;
|
||||
D_802BA274 = temp_t9;
|
||||
if (temp_a2 != 0) {
|
||||
temp_v0_5 = *(temp_t9 + arg1);
|
||||
if (gIsMirrorMode != 0) {
|
||||
var_a2 = temp_v0_4 & 0x1F;
|
||||
temp_v0_5 = arg1[temp_t9];
|
||||
D_802BA274 = temp_t9 + 1;
|
||||
phi_t2 = (temp_v0_5 >> 2) & 0x1F;
|
||||
phi_t1 = ((temp_v0_4 >> 5) & 7) | ((temp_v0_5 & 3) * 8);
|
||||
phi_a2 = temp_v0_4 & 0x1F;
|
||||
var_t1 = ((temp_v0_4 >> 5) & 7) | ((temp_v0_5 & 3) * 8);
|
||||
var_t2 = (temp_v0_5 >> 2) & 0x1F;
|
||||
} else {
|
||||
temp_v1_4 = D_802BA274;
|
||||
temp_v0_6 = *(temp_v1_4 + arg1);
|
||||
var_t2 = temp_v0_4 & 0x1F;
|
||||
temp_v0_6 = arg1[D_802BA274];
|
||||
temp_t8 = (temp_v0_6 & 3) * 8;
|
||||
temp_t9_2 = (temp_v0_6 >> 2) & 0x1F;
|
||||
D_802BA274 = temp_v1_4 + 1;
|
||||
phi_t2 = temp_v0_4 & 0x1F;
|
||||
phi_t1 = ((temp_v0_4 >> 5) & 7) | temp_t8;
|
||||
phi_a2 = temp_t9_2;
|
||||
D_802BA274 += 1;
|
||||
var_t1 = ((temp_v0_4 >> 5) & 7) | temp_t8;
|
||||
var_a2 = temp_t9_2;
|
||||
}
|
||||
*(arg0 + (D_802BA270 * 8)) = (phi_t0 << 0x11) | 0xB1000000 | (phi_a3 << 9) | (phi_a0 * 2);
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = (phi_t2 << 0x11) | (phi_t1 << 9) | (phi_a2 * 2);
|
||||
D_802BA270 = D_802BA270 + 1;
|
||||
displayList[D_802BA270].words.w0 = (var_t0 << 0x11) | 0xB1000000 | (var_a3 << 9) | (var_a0 * 2);
|
||||
displayList[D_802BA270].words.w1 = (var_t2 << 0x11) | (var_t1 << 9) | (var_a2 * 2);
|
||||
D_802BA270 += 1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/memory/func_802A980C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern s32 D_802BA270;
|
||||
extern s32 D_802BA274;
|
||||
|
||||
void func_802A99A4(s32 arg0, s32 arg1, ? arg2) {
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
void func_802A99A4(Gfx *displayList, u8 *arg1, s32 arg2) {
|
||||
s32 temp_t3;
|
||||
s32 temp_t6;
|
||||
s32 temp_t7;
|
||||
s32 temp_v1;
|
||||
s32 temp_v1_2;
|
||||
s32 var_a0;
|
||||
s32 var_a2;
|
||||
s32 var_a3;
|
||||
s32 var_t0;
|
||||
u8 temp_v0;
|
||||
u8 temp_v0_2;
|
||||
u8 temp_v0_3;
|
||||
s32 phi_a0;
|
||||
s32 phi_t0;
|
||||
s32 phi_a3;
|
||||
s32 phi_a2;
|
||||
|
||||
temp_v1 = D_802BA274;
|
||||
temp_v0 = *(temp_v1 + arg1);
|
||||
temp_t7 = temp_v1 + 1;
|
||||
temp_v0 = arg1[D_802BA274];
|
||||
temp_t7 = D_802BA274 + 1;
|
||||
D_802BA274 = temp_t7;
|
||||
phi_a0 = temp_v0 & 0x1F;
|
||||
phi_t0 = temp_v0 & 0x1F;
|
||||
var_a0 = temp_v0 & 0x1F;
|
||||
var_t0 = temp_v0 & 0x1F;
|
||||
if (gIsMirrorMode != 0) {
|
||||
temp_v0_2 = *(temp_t7 + arg1);
|
||||
temp_v0_2 = arg1[temp_t7];
|
||||
temp_t3 = temp_t7 + 1;
|
||||
D_802BA274 = temp_t3;
|
||||
var_a2 = ((temp_v0 >> 5) & 7) | ((temp_v0_2 & 3) * 8);
|
||||
var_a3 = (temp_v0_2 >> 2) & 0x1F;
|
||||
D_802BA274 = temp_t3 + 1;
|
||||
phi_t0 = ((temp_v0_2 >> 7) & 1) | ((*(temp_t3 + arg1) & 0xF) * 2);
|
||||
phi_a3 = (temp_v0_2 >> 2) & 0x1F;
|
||||
phi_a2 = ((temp_v0 >> 5) & 7) | ((temp_v0_2 & 3) * 8);
|
||||
var_t0 = ((temp_v0_2 >> 7) & 1) | ((arg1[temp_t3] & 0xF) * 2);
|
||||
} else {
|
||||
temp_v1_2 = D_802BA274;
|
||||
temp_v0_3 = *(temp_v1_2 + arg1);
|
||||
temp_t6 = temp_v1_2 + 1;
|
||||
temp_v0_3 = arg1[D_802BA274];
|
||||
temp_t6 = D_802BA274 + 1;
|
||||
D_802BA274 = temp_t6;
|
||||
var_a3 = ((temp_v0 >> 5) & 7) | ((temp_v0_3 & 3) * 8);
|
||||
var_a2 = (temp_v0_3 >> 2) & 0x1F;
|
||||
D_802BA274 = temp_t6 + 1;
|
||||
phi_a0 = ((temp_v0_3 >> 7) & 1) | ((*(temp_t6 + arg1) & 0xF) * 2);
|
||||
phi_a3 = ((temp_v0 >> 5) & 7) | ((temp_v0_3 & 3) * 8);
|
||||
phi_a2 = (temp_v0_3 >> 2) & 0x1F;
|
||||
var_a0 = ((temp_v0_3 >> 7) & 1) | ((arg1[temp_t6] & 0xF) * 2);
|
||||
}
|
||||
*(arg0 + (D_802BA270 * 8)) = 0xB5000000;
|
||||
(arg0 + (D_802BA270 * 8))->unk4 = (phi_a0 << 0x19) | (phi_t0 << 0x11) | (phi_a3 << 9) | (phi_a2 * 2);
|
||||
D_802BA270 = D_802BA270 + 1;
|
||||
displayList[D_802BA270].words.w0 = 0xB5000000;
|
||||
displayList[D_802BA270].words.w1 = (var_a0 << 0x19) | (var_t0 << 0x11) | (var_a3 << 9) | (var_a2 * 2);
|
||||
D_802BA270 += 1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/memory/func_802A99A4.s")
|
||||
@@ -2124,7 +2073,7 @@ f32 func_802ABEAC(UnkActorInner *arg0, Vec3f arg1) {
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit b04a67bbeb29101ca8f4ea8a24a81fe594677b33
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
void process_shell_collision(f32 *arg0, f32 arg1, f32 *velocity, f32 arg3) {
|
||||
f32 sp40;
|
||||
f32 sp3C;
|
||||
@@ -2137,7 +2086,6 @@ void process_shell_collision(f32 *arg0, f32 arg1, f32 *velocity, f32 arg3) {
|
||||
f32 temp_f0;
|
||||
f32 temp_f0_2;
|
||||
f32 temp_f10;
|
||||
f32 temp_f10_2;
|
||||
f32 temp_f12;
|
||||
f32 temp_f12_2;
|
||||
f32 temp_f14;
|
||||
@@ -2148,7 +2096,6 @@ void process_shell_collision(f32 *arg0, f32 arg1, f32 *velocity, f32 arg3) {
|
||||
f32 temp_f2;
|
||||
f32 temp_f2_2;
|
||||
f32 temp_f6;
|
||||
f32 temp_f8;
|
||||
f64 temp_f16;
|
||||
|
||||
temp_f2 = velocity->unk0;
|
||||
@@ -2176,11 +2123,9 @@ void process_shell_collision(f32 *arg0, f32 arg1, f32 *velocity, f32 arg3) {
|
||||
temp_f12_2 = sp3C - spC;
|
||||
temp_f14_2 = sp38 - temp_f6;
|
||||
temp_f16_3 = (1.0f / sqrtf((temp_f2_2 * temp_f2_2) + (temp_f12_2 * temp_f12_2) + (temp_f14_2 * temp_f14_2))) * sp24;
|
||||
temp_f10_2 = temp_f12_2 * temp_f16_3;
|
||||
temp_f8 = temp_f14_2 * temp_f16_3;
|
||||
velocity->unk0 = temp_f2_2 * temp_f16_3;
|
||||
velocity->unk4 = temp_f10_2;
|
||||
velocity->unk8 = temp_f8;
|
||||
velocity->unk4 = (f32) (temp_f12_2 * temp_f16_3);
|
||||
velocity->unk8 = (f32) (temp_f14_2 * temp_f16_3);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/memory/process_shell_collision.s")
|
||||
|
||||
+76
-107
@@ -753,101 +753,82 @@ void func_8028F4E8(void) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern void *D_800DC5EC;
|
||||
extern void *D_800DC5F0;
|
||||
extern void *D_800DC5F4;
|
||||
extern void *D_800DC5F8;
|
||||
extern f32 D_802BA034;
|
||||
|
||||
void func_8028F588(void) {
|
||||
s16 var_v0;
|
||||
s16 var_v0_2;
|
||||
s16 var_v0_3;
|
||||
s16 var_v0_4;
|
||||
s16 var_v0_5;
|
||||
s16 var_v0_6;
|
||||
s16 var_v0_7;
|
||||
s16 var_v0_8;
|
||||
s32 temp_v0;
|
||||
s16 screenWidth;
|
||||
|
||||
switch (gActiveScreenMode) { /* irregular */
|
||||
switch (gActiveScreenMode) { /* irregular */
|
||||
case SCREEN_MODE_1P:
|
||||
var_v0 = (s16) (s32) (320.0f * D_802BA034);
|
||||
if (var_v0 < 0) {
|
||||
var_v0 = 1;
|
||||
screenWidth = (s16) (s32) (320.0f * D_802BA034);
|
||||
if (screenWidth < 0) {
|
||||
screenWidth = 1;
|
||||
}
|
||||
D_800DC5EC->unk2C = var_v0;
|
||||
var_v0_2 = (s16) (s32) (240.0f * D_802BA034);
|
||||
if (var_v0_2 < 0) {
|
||||
var_v0_2 = 1;
|
||||
D_800DC5EC->screenWidth = screenWidth;
|
||||
screenWidth = (s16) (s32) (240.0f * D_802BA034);
|
||||
if (screenWidth < 0) {
|
||||
screenWidth = 1;
|
||||
}
|
||||
D_800DC5EC->unk2E = var_v0_2;
|
||||
return;
|
||||
D_800DC5EC->screenHeight = screenWidth;
|
||||
break;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
var_v0_3 = (s16) (s32) (160.0f * D_802BA034);
|
||||
if (var_v0_3 <= 0) {
|
||||
var_v0_3 = 1;
|
||||
} else if (var_v0_3 >= 0x140) {
|
||||
var_v0_3 = 0x013C;
|
||||
screenWidth = (s16) (s32) (160.0f * D_802BA034);
|
||||
if (screenWidth <= 0) {
|
||||
screenWidth = 1;
|
||||
} else if (screenWidth >= 0x140) {
|
||||
screenWidth = 0x013C;
|
||||
}
|
||||
D_800DC5EC->unk2C = var_v0_3;
|
||||
D_800DC5F0->unk2C = var_v0_3;
|
||||
var_v0_4 = (s16) (s32) (240.0f * D_802BA034);
|
||||
if (var_v0_4 <= 0) {
|
||||
var_v0_4 = 1;
|
||||
} else if (var_v0_4 >= 0x1E0) {
|
||||
var_v0_4 = 0x01DC;
|
||||
D_800DC5EC->screenWidth = screenWidth;
|
||||
D_800DC5F0->screenWidth = screenWidth;
|
||||
screenWidth = (s16) (s32) (240.0f * D_802BA034);
|
||||
if (screenWidth <= 0) {
|
||||
screenWidth = 1;
|
||||
} else if (screenWidth >= 0x1E0) {
|
||||
screenWidth = 0x01DC;
|
||||
}
|
||||
D_800DC5EC->unk2E = var_v0_4;
|
||||
D_800DC5F0->unk2E = var_v0_4;
|
||||
return;
|
||||
D_800DC5EC->screenHeight = screenWidth;
|
||||
D_800DC5F0->screenHeight = screenWidth;
|
||||
break;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
var_v0_5 = (s16) (s32) (320.0f * D_802BA034);
|
||||
if (var_v0_5 <= 0) {
|
||||
var_v0_5 = 1;
|
||||
} else if (var_v0_5 >= 0x280) {
|
||||
var_v0_5 = 0x027C;
|
||||
screenWidth = (s16) (s32) (320.0f * D_802BA034);
|
||||
if (screenWidth <= 0) {
|
||||
screenWidth = 1;
|
||||
} else if (screenWidth >= 0x280) {
|
||||
screenWidth = 0x027C;
|
||||
}
|
||||
D_800DC5EC->unk2C = var_v0_5;
|
||||
D_800DC5F0->unk2C = var_v0_5;
|
||||
var_v0_6 = (s16) (s32) (120.0f * D_802BA034);
|
||||
if (var_v0_6 <= 0) {
|
||||
var_v0_6 = 1;
|
||||
} else if (var_v0_6 >= 0xF0) {
|
||||
var_v0_6 = 0x00EC;
|
||||
D_800DC5EC->screenWidth = screenWidth;
|
||||
D_800DC5F0->screenWidth = screenWidth;
|
||||
screenWidth = (s16) (s32) (120.0f * D_802BA034);
|
||||
if (screenWidth <= 0) {
|
||||
screenWidth = 1;
|
||||
} else if (screenWidth >= 0xF0) {
|
||||
screenWidth = 0x00EC;
|
||||
}
|
||||
D_800DC5EC->unk2E = var_v0_6;
|
||||
D_800DC5F0->unk2E = var_v0_6;
|
||||
return;
|
||||
D_800DC5EC->screenHeight = screenWidth;
|
||||
D_800DC5F0->screenHeight = screenWidth;
|
||||
break;
|
||||
case SCREEN_MODE_3P_4P_SPLITSCREEN:
|
||||
var_v0_7 = (s16) (s32) (160.0f * D_802BA034);
|
||||
if (var_v0_7 <= 0) {
|
||||
var_v0_7 = 1;
|
||||
} else if (var_v0_7 >= 0x140) {
|
||||
var_v0_7 = 0x013C;
|
||||
screenWidth = (s16) (s32) (160.0f * D_802BA034);
|
||||
if (screenWidth <= 0) {
|
||||
screenWidth = 1;
|
||||
} else if (screenWidth >= 0x140) {
|
||||
screenWidth = 0x013C;
|
||||
}
|
||||
D_800DC5EC->unk2C = var_v0_7;
|
||||
D_800DC5F0->unk2C = var_v0_7;
|
||||
D_800DC5F4->unk2C = var_v0_7;
|
||||
D_800DC5F8->unk2C = var_v0_7;
|
||||
var_v0_8 = (s16) (s32) (120.0f * D_802BA034);
|
||||
if (var_v0_8 <= 0) {
|
||||
var_v0_8 = 1;
|
||||
} else if (var_v0_8 >= 0xF0) {
|
||||
var_v0_8 = 0x00EC;
|
||||
D_800DC5EC->screenWidth = screenWidth;
|
||||
D_800DC5F0->screenWidth = screenWidth;
|
||||
D_800DC5F4->screenWidth = screenWidth;
|
||||
D_800DC5F8->screenWidth = screenWidth;
|
||||
screenWidth = (s16) (s32) (120.0f * D_802BA034);
|
||||
if (screenWidth <= 0) {
|
||||
screenWidth = 1;
|
||||
} else if (screenWidth >= 0xF0) {
|
||||
screenWidth = 0x00EC;
|
||||
}
|
||||
D_800DC5EC->unk2E = var_v0_8;
|
||||
D_800DC5F0->unk2E = var_v0_8;
|
||||
D_800DC5F4->unk2E = var_v0_8;
|
||||
D_800DC5F8->unk2E = var_v0_8;
|
||||
return;
|
||||
D_800DC5EC->screenHeight = screenWidth;
|
||||
D_800DC5F0->screenHeight = screenWidth;
|
||||
D_800DC5F4->screenHeight = screenWidth;
|
||||
D_800DC5F8->screenHeight = screenWidth;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/race_logic/func_8028F588.s")
|
||||
#endif
|
||||
|
||||
void func_8028F8BC(void) {
|
||||
D_802BA034 = (f32) (D_802BA034 - 0.017f);
|
||||
@@ -866,19 +847,12 @@ void func_8028F914(void) {
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
void func_800029B0(); /* extern */
|
||||
void func_80005AE8(Player *); /* extern */
|
||||
void func_800C9F90(?); /* extern */
|
||||
void play_sound2(?); /* extern */
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
? func_800C9F90(?); /* extern */
|
||||
extern s32 D_80162DF0;
|
||||
extern void *gControllerOne;
|
||||
static u16 D_800DC5A8; /* unable to generate initializer */
|
||||
|
||||
void func_8028F970(void) {
|
||||
Player *temp_a0;
|
||||
Player *temp_a0_2;
|
||||
Player *temp_a0_3;
|
||||
Player *var_s3;
|
||||
s32 var_s2;
|
||||
struct Controller *temp_s0;
|
||||
@@ -886,7 +860,6 @@ void func_8028F970(void) {
|
||||
u16 temp_v0;
|
||||
u16 temp_v0_2;
|
||||
u16 temp_v0_3;
|
||||
void *temp_a1;
|
||||
|
||||
if (D_8015F890 == 0) {
|
||||
var_s3 = gPlayers;
|
||||
@@ -895,37 +868,34 @@ loop_2:
|
||||
temp_v0 = var_s3->unk_000;
|
||||
if ((temp_v0 & 0x4000) && !(temp_v0 & 0x1000)) {
|
||||
temp_s0 = &gControllers[var_s2];
|
||||
if (gActiveScreenMode != SCREEN_MODE_3P_4P_SPLITSCREEN) {
|
||||
if (gActiveScreenMode != 3) {
|
||||
temp_v0_2 = temp_s0->buttonPressed;
|
||||
if ((temp_v0_2 & 0x20) && !(temp_s0->button & 0x10)) {
|
||||
if ((temp_v0_2 & L_TRIG) && !(temp_s0->button & R_TRIG)) {
|
||||
temp_s0->buttonPressed = temp_v0_2 & 0xFFDF;
|
||||
temp_t7 = D_800DC5A8 + 1;
|
||||
D_800DC5A8 = temp_t7;
|
||||
if ((temp_t7 & 0xFFFF) >= 3) {
|
||||
D_800DC5A8 = 0;
|
||||
}
|
||||
play_sound2(SOUND_ACTION_PING);
|
||||
play_sound2(0x4900801C);
|
||||
func_800029B0();
|
||||
}
|
||||
}
|
||||
if ((temp_s0->buttonPressed & 0x1000) && (temp_v0_3 = temp_s0->button, ((temp_v0_3 & 0x10) == 0)) && !(temp_v0_3 & 0x20)) {
|
||||
if ((temp_s0->buttonPressed & START_BUTTON) && (temp_v0_3 = temp_s0->button, ((temp_v0_3 & R_TRIG) == 0)) && !(temp_v0_3 & L_TRIG)) {
|
||||
func_8028DF00();
|
||||
D_800DC5FC = ((s32) (temp_s0 - gControllerOne) >> 4) + 1;
|
||||
temp_s0->buttonPressed = 0;
|
||||
func_800C9F90(1);
|
||||
D_80162DF0 = 1;
|
||||
if (gModeSelection == TIME_TRIALS) {
|
||||
temp_a0 = gPlayerOne;
|
||||
if (temp_a0->unk_000 & 0x8100) {
|
||||
func_80005AE8(temp_a0);
|
||||
if (gModeSelection == 1) {
|
||||
if (gPlayerOne->unk_000 & 0x8100) {
|
||||
func_80005AE8(gPlayerOne);
|
||||
}
|
||||
temp_a0_2 = gPlayerTwo;
|
||||
if (temp_a0_2->unk_000 & 0x8100) {
|
||||
func_80005AE8(temp_a0_2);
|
||||
if (gPlayerTwo->unk_000 & 0x8100) {
|
||||
func_80005AE8(gPlayerTwo);
|
||||
}
|
||||
temp_a0_3 = gPlayerThree;
|
||||
if (temp_a0_3->unk_000 & 0x8100) {
|
||||
func_80005AE8(temp_a0_3);
|
||||
if (gPlayerThree->unk_000 & 0x8100) {
|
||||
func_80005AE8(gPlayerThree);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -937,15 +907,14 @@ block_20:
|
||||
var_s3 += 0xDD8;
|
||||
if (var_s2 == 4) {
|
||||
if ((gEnableDebugMode != 0) && (gModeSelection != BATTLE)) {
|
||||
temp_a1 = gControllerOne;
|
||||
if (temp_a1->unk6 & 0x800) {
|
||||
if (gControllerOne->buttonPressed & U_JPAD) {
|
||||
gLapCountByPlayerId->unk0 = 2;
|
||||
}
|
||||
if (temp_a1->unk6 & 0x100) {
|
||||
if (gControllerOne->buttonPressed & R_JPAD) {
|
||||
gLapCountByPlayerId->unk0 = 2;
|
||||
gLapCountByPlayerId->unk4 = 2;
|
||||
}
|
||||
if (temp_a1->unk6 & 0x400) {
|
||||
if (gControllerOne->buttonPressed & D_JPAD) {
|
||||
gLapCountByPlayerId->unk0 = 2;
|
||||
gLapCountByPlayerId->unk4 = 2;
|
||||
gLapCountByPlayerId->unk8 = 2;
|
||||
|
||||
@@ -21,6 +21,7 @@ void func_8028F3E8();
|
||||
void update_race_position_data();
|
||||
void func_8028F474();
|
||||
void func_8028F4E8();
|
||||
void func_8028F588();
|
||||
void func_8028F8BC();
|
||||
void func_8028F914();
|
||||
void func_8028F970();
|
||||
|
||||
@@ -64,7 +64,6 @@ void func_80290CAC(uintptr_t arg0) {
|
||||
}
|
||||
|
||||
extern u16 D_80152300[];
|
||||
s16 func_802ABD40(u16);
|
||||
|
||||
void load_surface_map(s32 arg0, struct UnkStruct_800DC5EC *arg1) {
|
||||
Player *temp_t1 = arg1->player;
|
||||
|
||||
@@ -515,88 +515,92 @@ void func_802A4A0C(Vtx *arg0, struct UnkStruct_800DC5EC *arg1, s32 arg2, s32 arg
|
||||
GLOBAL_ASM("asm/non_matchings/skybox/func_802A4A0C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
extern s32 gScreenModeSelection;
|
||||
void func_802A4D18(void) {
|
||||
f32 phi_f10;
|
||||
#ifdef NEEDS_RODATA
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
// data/data_
|
||||
// jtbl_802B9BB8
|
||||
extern f32 D_802B9BB4;// = 6800.0f;
|
||||
extern f32 D_802B9C04;// = 2700.0f;
|
||||
extern f32 D_802B9C08;// = 1500.0f;
|
||||
extern f32 D_802B9C0C;// = 5000.0f;
|
||||
extern f32 D_802B9C10;// = 4500.0f;
|
||||
extern f32 D_802B9C14;// = 7000.0f;
|
||||
extern f32 D_802B9C18;// = 6800.0f;
|
||||
extern f32 D_802B9C1C;// = 1.3333334f;
|
||||
extern f32 D_802B9C20;// = 0.6666667f;
|
||||
extern f32 D_802B9C24;// = 2.6666667f;
|
||||
extern f32 D_802B9C28;// = 1.3333334f;
|
||||
|
||||
if (gGamestate != RACING) {
|
||||
D_8015014C = 6800.0f; // D_802B9BB4
|
||||
void func_802A4D18(void) {
|
||||
f32 var_f10;
|
||||
|
||||
if (gGamestate != 4) {
|
||||
D_8015014C = 6800.0f;
|
||||
D_80150150 = 3.0f;
|
||||
} else {
|
||||
//if (gCurrentCourseId < COURSE_BIG_DONUT) {
|
||||
switch (gCurrentCourseId) {
|
||||
case 2:
|
||||
case 3:
|
||||
case 13:
|
||||
case 15:
|
||||
case 16:
|
||||
D_8015014C = 2700.0f; // D_802B9C04
|
||||
phi_f10 = 2.0f;
|
||||
goto block_11;
|
||||
case 1:
|
||||
case 17:
|
||||
D_8015014C = 1500.0f; // D_802B9C08
|
||||
D_80150150 = 2.0f;
|
||||
break;
|
||||
case 6:
|
||||
D_8015014C = 5000.0f; // D_802B9C0C
|
||||
D_80150150 = 1.0f;
|
||||
break;
|
||||
case 14:
|
||||
D_8015014C = 4800.0f;
|
||||
phi_f10 = 10.0f;
|
||||
goto block_11;
|
||||
case 0:
|
||||
case 4:
|
||||
case 5:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 12:
|
||||
case 18:
|
||||
D_8015014C = 4500.0f; // D_802B9C10
|
||||
D_80150150 = 9.0f;
|
||||
break;
|
||||
case 11:
|
||||
D_8015014C = 7000.0f; // D_802B9C14;
|
||||
D_80150150 = 10.0f;
|
||||
break;
|
||||
//} endofswitch
|
||||
//} else {
|
||||
default:
|
||||
D_8015014C = 6800.0f; // D_802B9C18
|
||||
phi_f10 = 3.0f;
|
||||
|
||||
D_80150150 = phi_f10;
|
||||
switch (gCurrentCourseId) {
|
||||
case COURSE_BOWSER_CASTLE:
|
||||
case COURSE_BANSHEE_BOARDWALK:
|
||||
case COURSE_RAINBOW_ROAD:
|
||||
case COURSE_BLOCK_FORT:
|
||||
case COURSE_SKYSCRAPER:
|
||||
D_8015014C = 2700.0f;
|
||||
D_80150150 = 2.0f;
|
||||
break;
|
||||
case COURSE_CHOCO_MOUNTAIN:
|
||||
case COURSE_DOUBLE_DECK:
|
||||
D_8015014C = 1500.0f;
|
||||
D_80150150 = 2.0f;
|
||||
break;
|
||||
case COURSE_KOOPA_BEACH:
|
||||
D_8015014C = 5000.0f;
|
||||
D_80150150 = 1.0f;
|
||||
break;
|
||||
case COURSE_WARIO_STADIUM:
|
||||
D_8015014C = 4800.0f;
|
||||
D_80150150 = 10.0f;
|
||||
break;
|
||||
case COURSE_MARIO_RACEWAY:
|
||||
case COURSE_YOSHI_VALLEY:
|
||||
case COURSE_FRAPPE_SNOWLAND:
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
case COURSE_LUIGI_RACEWAY:
|
||||
case COURSE_MOO_MOO_FARM:
|
||||
case COURSE_TOADS_TURNPIKE:
|
||||
case COURSE_SHERBET_LAND:
|
||||
case COURSE_DK_JUNGLE:
|
||||
D_8015014C = 4500.0f;
|
||||
D_80150150 = 9.0f;
|
||||
break;
|
||||
case COURSE_KALAMARI_DESERT:
|
||||
D_8015014C = 7000.0f;
|
||||
D_80150150 = 10.0f;
|
||||
break;
|
||||
default:
|
||||
D_8015014C = 6800.0f;
|
||||
D_80150150 = 3.0f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch(gScreenModeSelection) {
|
||||
case SCREEN_MODE_1P:
|
||||
D_80150148 = 1.3333333730697632f; // D_802B9C1C
|
||||
break;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
D_80150148 = (f32) 2.6666667461395264f; // D_802B9C24
|
||||
break;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
D_80150148 = 0.6666666865348816f; // D_802B9C20
|
||||
break;
|
||||
case SCREEN_MODE_3P_4P_SPLITSCREEN:
|
||||
D_80150148 = 1.3333333730697632f; // D_802B9C28
|
||||
break;
|
||||
switch (gScreenModeSelection) { /* switch 1; irregular */
|
||||
case SCREEN_MODE_1P: /* switch 1 */
|
||||
D_80150148 = 1.333333f;
|
||||
return;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: /* switch 1 */
|
||||
D_80150148 = 2.666666f;
|
||||
return;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: /* switch 1 */
|
||||
D_80150148 = 0.666666f;
|
||||
return;
|
||||
case SCREEN_MODE_3P_4P_SPLITSCREEN: /* switch 1 */
|
||||
D_80150148 = 1.333333f;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/skybox/func_802A4D18.s")
|
||||
#endif
|
||||
|
||||
//extern f32 D_80150134;
|
||||
//extern f32 D_80150138;
|
||||
//extern f32 D_8015013C;
|
||||
|
||||
void func_802A4EF4(void) {
|
||||
switch(gActiveScreenMode) {
|
||||
case SCREEN_MODE_1P:
|
||||
|
||||
@@ -25,6 +25,7 @@ void select_framebuffer();
|
||||
void func_802A4300();
|
||||
void func_802A450C(Vtx*);
|
||||
void func_802A487C(Vtx*, s32, s32, s32, s32);
|
||||
void func_802A4D18();
|
||||
void func_802A4EF4();
|
||||
void func_802A5004();
|
||||
void func_802A50EC();
|
||||
@@ -77,8 +78,8 @@ extern struct GfxPool *gGfxPool;
|
||||
extern f32 D_80150130[];
|
||||
extern u16 D_800DC5B4;
|
||||
extern f32 D_80150148;
|
||||
extern f32 D_80150150;
|
||||
extern f32 D_8015014C;
|
||||
extern f32 D_80150150;
|
||||
|
||||
|
||||
extern u16 D_800DC5C8;
|
||||
|
||||
Reference in New Issue
Block a user