mirror of
https://github.com/n64decomp/mk64
synced 2026-06-17 06:25:33 -04:00
Assorted, unrelated matches (#267)
* Assorted matches Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
@@ -112,7 +112,6 @@ void update_simple_objects();
|
||||
|
||||
// audio/external.c
|
||||
extern void func_800C98B8(Vec3f, Vec3f, u32);
|
||||
extern void func_800C9060(u8, s32);
|
||||
extern void func_800C90F4(u8, uintptr_t);
|
||||
extern void func_800C99E0(Vec3f, s32);
|
||||
extern void func_800C9D80(Vec3f, Vec3f, u32);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
void play_sound2(s32);
|
||||
void func_800C8EAC(u16);
|
||||
void func_800C8EF8();
|
||||
void func_800C9060(u8, u32);
|
||||
void func_800C90F4(u8, uintptr_t);
|
||||
void func_800CA008(u8, u8);
|
||||
void func_800CA0A0();
|
||||
|
||||
+108
-148
@@ -4,6 +4,10 @@
|
||||
#include <defines.h>
|
||||
#include "camera.h"
|
||||
#include "math_util.h"
|
||||
#include "memory.h"
|
||||
#include "waypoints.h"
|
||||
#include "variables.h"
|
||||
#include "code_8001F980.h"
|
||||
|
||||
Camera cameras[4];
|
||||
Camera *camera1 = &cameras[0];
|
||||
@@ -11,6 +15,11 @@ Camera *camera2 = &cameras[1];
|
||||
Camera *camera3 = &cameras[2];
|
||||
Camera *camera4 = &cameras[3];
|
||||
|
||||
// Future BSS section, replaces unknown amount of stuff in bss_8001C4D0.s
|
||||
// f32 D_80164A30;
|
||||
// s32 D_80164A2C;
|
||||
// f32 D_8016524C; <- could maybe, maybe be part of spawn_players' bss stuff?
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
void func_80014DE4(s32, s32, s32, Camera *); /* extern */
|
||||
@@ -67,7 +76,7 @@ void func_8001C4D0(f32 posX, f32 posY, f32 posZ, s16 rot, u32 arg4, s32 cameraId
|
||||
temp_a3->pos[0] = posX;
|
||||
temp_a3->pos[1] = posY;
|
||||
temp_a3->pos[2] = posZ;
|
||||
temp_a3->rotZ = 0;
|
||||
temp_a3->someBitFlags = 0;
|
||||
temp_a3->lookAt[2] = 150.0f;
|
||||
temp_a3->lookAt[1] = (f32) ((f64) posY - 3.0);
|
||||
temp_a3->lookAt[0] = 0.0f;
|
||||
@@ -221,74 +230,57 @@ void func_8001CA24(Player *player, f32 arg1) {
|
||||
camera->unk_94 = arg1;
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
|
||||
void func_802B6540(f32 *, ?, f32, ?, s32); /* extern */
|
||||
extern f32 D_80164A30;
|
||||
s16 gCurrentCourseId; /* unable to generate initializer */
|
||||
|
||||
void func_8001CA78(s32 arg0, Camera *camera, f32 *arg2, f32 *arg3, f32 *arg4, f32 *arg5) {
|
||||
f32 sp74;
|
||||
f32 sp70;
|
||||
f32 sp6C;
|
||||
f32 sp68;
|
||||
f32 sp64;
|
||||
f32 sp60;
|
||||
f32 sp5C;
|
||||
f32 sp4C;
|
||||
f32 sp48;
|
||||
f32 sp44;
|
||||
f32 temp_f0;
|
||||
f32 temp_f12;
|
||||
f32 temp_f16;
|
||||
f32 temp_f18;
|
||||
f32 temp_f2;
|
||||
void func_8001CA78(Player *player, Camera *camera, Vec3f arg2, f32 *arg3, f32 *arg4, f32 *arg5, s16 huh, s8 wut) {
|
||||
Mat3 sp74;
|
||||
Vec3f sp68;
|
||||
Vec3f sp5C;
|
||||
f32 posX;
|
||||
f32 posY;
|
||||
f32 posZ;
|
||||
f32 var_f14;
|
||||
f32 var_f14_2;
|
||||
f32 temp_f18;
|
||||
f32 temp_f16;
|
||||
s32 stackPadding0;
|
||||
struct TrackWayPoint *temp_s2;
|
||||
|
||||
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];
|
||||
sp64 = camera->unk_3C[2];
|
||||
arg2->unk0 = camera->lookAt[0];
|
||||
temp_s2 = &(*D_80164550)[*gWaypointCountByPathIndex - 0xA];
|
||||
arg2->unk4 = (f32) camera->lookAt[1];
|
||||
arg2->unk8 = (f32) camera->lookAt[2];
|
||||
func_802B6540(&sp74, 0, 1.0f, 0, -0x00008000);
|
||||
func_802B63B8(&sp5C, &sp74);
|
||||
if (gCurrentCourseId == 0x000A) {
|
||||
var_f14 = sp5C;
|
||||
temp_s2 = &D_80164550[0][gWaypointCountByPathIndex[0] - 10];
|
||||
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];
|
||||
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, 1, 0, -0x00008000);
|
||||
func_802B63B8(sp5C, sp74);
|
||||
if (gCurrentCourseId == COURSE_TOADS_TURNPIKE) {
|
||||
var_f14 = sp5C[0];
|
||||
} else {
|
||||
var_f14 = sp5C + (f32) temp_s2->wayPointX;
|
||||
var_f14 = sp5C[0] + temp_s2->wayPointX;
|
||||
}
|
||||
arg2->unk0 += (var_f14 - camera->lookAt[0]) * 1.0f;
|
||||
arg2->unk4 = (f32) (arg2->unk4 + (((sp60 + ((f32) temp_s2->wayPointY + D_80164A30)) - camera->lookAt[1]) * 1.0f));
|
||||
arg2->unk8 = (f32) (arg2->unk8 + (((sp64 + (bitwise f32) D_8016524C) - camera->lookAt[2]) * 1.0f));
|
||||
func_802B63B8(&sp68, &sp74);
|
||||
if (gCurrentCourseId == 0x000A) {
|
||||
var_f14_2 = sp68;
|
||||
temp_f16 = sp5C[2] + D_8016524C;
|
||||
temp_f18 = sp5C[1] + (temp_s2->wayPointY + D_80164A30);
|
||||
arg2[0] += (var_f14 - camera->lookAt[0]) * 1;
|
||||
arg2[1] += (temp_f18 - camera->lookAt[1]) * 1;
|
||||
arg2[2] += (temp_f16 - camera->lookAt[2]) * 1;
|
||||
func_802B63B8(sp68, sp74);
|
||||
if (gCurrentCourseId == COURSE_TOADS_TURNPIKE) {
|
||||
var_f14 = sp68[0];
|
||||
} else {
|
||||
var_f14_2 = sp68 + (f32) temp_s2->wayPointX;
|
||||
var_f14 = sp68[0] + temp_s2->wayPointX;
|
||||
}
|
||||
sp4C = var_f14_2;
|
||||
temp_f16 = sp70 + (bitwise f32) D_8016524C;
|
||||
sp44 = temp_f16;
|
||||
temp_f18 = sp6C + ((f32) temp_s2->wayPointY + D_80164A30 + 6.0f);
|
||||
sp48 = temp_f18;
|
||||
move_f32_towards(&D_80164A30, 0.0f, 0.02f);
|
||||
temp_f0 = camera->pos[0];
|
||||
*arg3 = ((var_f14_2 - temp_f0) * 1.0f) + temp_f0;
|
||||
temp_f2 = camera->pos[1];
|
||||
*arg4 = ((temp_f18 - temp_f2) * 1.0f) + temp_f2;
|
||||
temp_f12 = camera->pos[2];
|
||||
*arg5 = ((temp_f16 - temp_f12) * 1.0f) + temp_f12;
|
||||
temp_f16 = sp68[2] + D_8016524C;
|
||||
temp_f18 = sp68[1] + (temp_s2->wayPointY + D_80164A30 + 6.0f);
|
||||
move_f32_towards(&D_80164A30, 0, 0.02f);
|
||||
posX = camera->pos[0];
|
||||
*arg3 = ((var_f14 - posX) * 1) + posX;
|
||||
posY = camera->pos[1];
|
||||
*arg4 = ((temp_f18 - posY) * 1) + posY;
|
||||
posZ = camera->pos[2];
|
||||
*arg5 = ((temp_f16 - posZ) * 1) + posZ;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_8001CA78.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
|
||||
@@ -496,13 +488,11 @@ GLOBAL_ASM("asm/non_matchings/camera/func_8001CCEC.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
void func_802B6540(f32 *, f32, ?, f32, s32); /* extern */
|
||||
//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 sp74;
|
||||
f32 sp70;
|
||||
f32 sp6C;
|
||||
f32 sp68;
|
||||
@@ -532,12 +522,12 @@ void func_8001D53C(Player *player, Camera *camera, f32 *arg2, f32 *arg3, f32 *ar
|
||||
arg2->unk4 = (f32) camera->lookAt[1];
|
||||
arg2->unk8 = (f32) camera->lookAt[2];
|
||||
sp38 = arg7 * 4;
|
||||
func_802B6540(&sp74, 0.0f, 0x3F800000, 0.0f, (s32) arg6);
|
||||
func_802B63B8(&sp5C, &sp74);
|
||||
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, &sp74);
|
||||
func_802B63B8(&sp68, (f32 (*)[3]) &sp74[0]);
|
||||
var_f0 = (f32) ((f64) sp6C + ((f64) player->unk_074 + 1.5));
|
||||
if ((player->unk_0CA & 1) == 1) {
|
||||
var_f0 = sp6C + (sp3C + 10.0f);
|
||||
@@ -776,79 +766,66 @@ void func_8001D944(Player *player, Camera *camera, f32 *arg2, f32 *arg3, f32 *ar
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_8001D944.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
void func_8001CA78(Player *, Camera *, f32 *, f32 *, f32 *, f32 *, s32, s32); /* extern */
|
||||
|
||||
void func_8001E0C4(Camera *camera, Player *player, s8 arg2) {
|
||||
f32 sp84;
|
||||
s32 stackPadding0[6];
|
||||
f32 temp_f12;
|
||||
f32 sp80;
|
||||
f32 sp7C;
|
||||
f32 temp_f14;
|
||||
s32 stackPadding1;
|
||||
f32 sp74;
|
||||
f32 sp70;
|
||||
f32 sp6C;
|
||||
f32 sp60;
|
||||
f32 temp_f0;
|
||||
f32 temp_f12;
|
||||
f32 temp_f14;
|
||||
f32 temp_f2;
|
||||
f32 temp_f2_2;
|
||||
s16 temp_v0;
|
||||
Vec3f sp60;
|
||||
s16 temp_t7;
|
||||
s16 var_a2;
|
||||
s32 stackPadding2[5];
|
||||
s32 stackPadding3[3];
|
||||
s32 test = 3;
|
||||
|
||||
temp_v0 = player->unk_078;
|
||||
if (temp_v0 == 0) {
|
||||
if (player->unk_078 == 0) {
|
||||
var_a2 = 0x0064;
|
||||
} else if (temp_v0 < 0) {
|
||||
var_a2 = 0x87 - (temp_v0 / 3);
|
||||
} else if (player->unk_078 < 0) {
|
||||
var_a2 = 0x87 - (player->unk_078 / 3);
|
||||
} else {
|
||||
var_a2 = (temp_v0 / 3) + 0x87;
|
||||
var_a2 = (player->unk_078 / 3) + 0x87;
|
||||
}
|
||||
func_800224F0(&camera->unk_2C, player->unk_02C[1], var_a2);
|
||||
func_8001CA78(player, camera, &sp60, &sp74, &sp70, &sp6C, (s32) camera->unk_2C, (s32) arg2);
|
||||
camera->rotZ = (u16) camera->rotZ & 0xFFFB;
|
||||
func_802ADDC8(&camera->unk_54, (f32) 3, sp74, sp70, sp6C);
|
||||
temp_f0 = camera->unk_54.unk44;
|
||||
if (temp_f0 < 0.0f) {
|
||||
sp74 += -camera->unk_54.unk60[0] * temp_f0 * 1.0f;
|
||||
sp70 = (f32) ((f64) sp70 + ((f64) (-camera->unk_54.unk60[1] * camera->unk_54.unk44) * 0.5));
|
||||
sp6C += -camera->unk_54.unk60[2] * camera->unk_54.unk44 * 1.0f;
|
||||
func_8001CA78(player, camera, sp60, &sp74, &sp70, &sp6C, camera->unk_2C, arg2);
|
||||
camera->someBitFlags &= ~0x0004;
|
||||
temp_t7 = func_802ADDC8(&camera->unk_54, test, sp74, sp70, sp6C);
|
||||
if (camera->unk_54.unk3C[2] < 0.0f) {
|
||||
sp74 += -camera->unk_54.unk60[0] * camera->unk_54.unk3C[2] * 1;
|
||||
sp70 += -camera->unk_54.unk60[1] * camera->unk_54.unk3C[2] * 0.5;
|
||||
sp6C += -camera->unk_54.unk60[2] * camera->unk_54.unk3C[2] * 1;
|
||||
}
|
||||
temp_f2 = camera->unk_54.unk3C;
|
||||
if (temp_f2 < 0.0f) {
|
||||
camera->rotZ = (u16) camera->rotZ | 6;
|
||||
sp74 = (f32) ((f64) sp74 + ((f64) (-camera->unk_54.unk48[0] * temp_f2) * 1.5));
|
||||
sp70 += -camera->unk_54.unk48[1] * camera->unk_54.unk3C * 1.0f;
|
||||
sp6C = (f32) ((f64) sp6C + ((f64) (-camera->unk_54.unk48[2] * camera->unk_54.unk3C) * 1.5));
|
||||
if (camera->unk_54.unk3C[0] < 0.0f) {
|
||||
camera->someBitFlags = camera->someBitFlags | 4 | 2;
|
||||
sp74 += -camera->unk_54.unk48[0] * camera->unk_54.unk3C[0] * 1.5;
|
||||
sp70 += -camera->unk_54.unk48[1] * camera->unk_54.unk3C[0] * 1;
|
||||
sp6C += -camera->unk_54.unk48[2] * camera->unk_54.unk3C[0] * 1.5;
|
||||
}
|
||||
temp_f2_2 = camera->unk_54.unk40;
|
||||
if (temp_f2_2 < 0.0f) {
|
||||
camera->rotZ = (u16) camera->rotZ | 6;
|
||||
sp74 = (f32) ((f64) sp74 + ((f64) (-camera->unk_54.unk54[0] * temp_f2_2) * 1.5));
|
||||
sp70 += -camera->unk_54.unk54[1] * camera->unk_54.unk40 * 1.0f;
|
||||
sp6C = (f32) ((f64) sp6C + ((f64) (-camera->unk_54.unk54[2] * camera->unk_54.unk40) * 1.5));
|
||||
if (camera->unk_54.unk3C[1] < 0.0f) {
|
||||
camera->someBitFlags = camera->someBitFlags | 4 | 2;
|
||||
sp74 += -camera->unk_54.unk54[0] * camera->unk_54.unk3C[1] * 1.5;
|
||||
sp70 += -camera->unk_54.unk54[1] * camera->unk_54.unk3C[1] * 1;
|
||||
sp6C += -camera->unk_54.unk54[2] * camera->unk_54.unk3C[1] * 1.5;
|
||||
}
|
||||
if (((s16) M2C_ERROR(Read from unset register $v0) == 0) && (((u16) camera->rotZ & 2) != 2)) {
|
||||
if ((temp_t7 == 0) && ((camera->someBitFlags & 2) != 2)) {
|
||||
camera->unk_AC = camera->unk_2C;
|
||||
}
|
||||
camera->lookAt[0] = sp60;
|
||||
camera->lookAt[1] = sp64;
|
||||
camera->lookAt[2] = sp68;
|
||||
camera->lookAt[0] = sp60[0];
|
||||
camera->lookAt[1] = sp60[1];
|
||||
camera->lookAt[2] = sp60[2];
|
||||
camera->pos[0] = sp74;
|
||||
camera->pos[1] = sp70;
|
||||
temp_f12 = camera->lookAt[0] - camera->pos[0];
|
||||
camera->pos[2] = sp6C;
|
||||
temp_f12 = camera->lookAt[0] - camera->pos[0];
|
||||
sp80 = camera->lookAt[1] - camera->pos[1];
|
||||
sp84 = temp_f12;
|
||||
temp_f14 = camera->lookAt[2] - camera->pos[2];
|
||||
sp7C = temp_f14;
|
||||
camera->rot[1] = atan2s(temp_f12, temp_f14);
|
||||
camera->rot[0] = atan2s(sqrtf((sp84 * sp84) + (temp_f14 * temp_f14)), sp80);
|
||||
camera->rot[0] = atan2s(sqrtf((temp_f12 * temp_f12) + (temp_f14 * temp_f14)), sp80);
|
||||
camera->rot[2] = 0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_8001E0C4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
@@ -930,7 +907,7 @@ void func_8001E45C(Camera *camera, Player *player, s8 arg2) {
|
||||
func_800224F0(&camera->unk_2C, (s16) (player->unk_02C[1] + camera->unk_B0), var_a3);
|
||||
func_8001CCEC(player, camera, &sp64, &sp84, &sp80, &sp7C, &sp58, (s32) camera->unk_2C, (s32) arg2);
|
||||
}
|
||||
camera->rotZ = (u16) camera->rotZ & 0xFFFB;
|
||||
camera->someBitFlags = (u16) camera->someBitFlags & 0xFFFB;
|
||||
func_802ADDC8(&camera->unk_54, (f32) 3, sp84, sp80, sp7C);
|
||||
camera->pos[0] = sp84;
|
||||
camera->pos[1] = sp80;
|
||||
@@ -1069,7 +1046,7 @@ void func_8001EA0C(Camera *camera, Player *player, s8 arg2) {
|
||||
func_800224F0(&camera->unk_2C, (s16) (player->unk_02C[1] + camera->unk_B0), var_a3);
|
||||
func_8001D944(player, camera, &sp64, &sp84, &sp80, &sp7C, &sp58, (s32) camera->unk_2C, (s32) arg2);
|
||||
}
|
||||
camera->rotZ = (u16) camera->rotZ & 0xFFFB;
|
||||
camera->someBitFlags = (u16) camera->someBitFlags & 0xFFFB;
|
||||
func_802ADDC8(&camera->unk_54, (f32) 3, sp84, sp80, sp7C);
|
||||
camera->pos[0] = sp84;
|
||||
camera->pos[1] = sp80;
|
||||
@@ -1417,43 +1394,26 @@ block_66:
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_8001F394.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
extern u16 D_80152300;
|
||||
extern s32 D_80164A2C;
|
||||
|
||||
void func_8001F87C(s32 cameraId) {
|
||||
Camera *temp_v0_2;
|
||||
Player *var_a2;
|
||||
s32 var_a1;
|
||||
u16 temp_v0;
|
||||
s32 playerIndex;
|
||||
// Why?
|
||||
s32 test = cameraId;
|
||||
|
||||
if (gActiveScreenMode == SCREEN_MODE_1P) {
|
||||
var_a1 = 0;
|
||||
var_a2 = gPlayerOne;
|
||||
if (gModeSelection == GRAND_PRIX) {
|
||||
loop_3:
|
||||
temp_v0 = var_a2->unk_000;
|
||||
if (!(temp_v0 & 0x200) && !(temp_v0 & 0x80)) {
|
||||
if (var_a1 == 0x60E8) {
|
||||
if(gPlayerOne){}
|
||||
if (gActiveScreenMode == 0) {
|
||||
if (gModeSelection == 0) {
|
||||
for (playerIndex = 0; playerIndex < 8; playerIndex++) {
|
||||
if ((gPlayerOne[playerIndex].unk_000 & 0x200) || (gPlayerOne[playerIndex].unk_000 & 0x80)) break;
|
||||
if (playerIndex == 7) {
|
||||
D_80164A2C += 1;
|
||||
}
|
||||
if ((var_a1 == 0x60E8) && (D_80164A2C == 0x0000003C)) {
|
||||
if ((playerIndex == 7) && (D_80164A2C == 0x0000003C)) {
|
||||
D_80164A28 = 2;
|
||||
*(&D_80152300 + (cameraId * 2)) = 1;
|
||||
temp_v0_2 = &cameras[cameraId];
|
||||
temp_v0_2->rot[1] = var_a2->unk_02E;
|
||||
temp_v0_2->unk2C = (s16) var_a2->unk_02E;
|
||||
}
|
||||
var_a1 += 0xDD8;
|
||||
var_a2 += 0xDD8;
|
||||
if (var_a1 != 0x6EC0) {
|
||||
goto loop_3;
|
||||
D_80152300[test] = 1;
|
||||
cameras[test].rot[1] = gPlayerOne[playerIndex].unk_02C[1];
|
||||
cameras[test].unk_2C = gPlayerOne[playerIndex].unk_02C[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/camera/func_8001F87C.s")
|
||||
#endif
|
||||
|
||||
+10
-1
@@ -11,7 +11,7 @@ typedef struct {
|
||||
// I think these are the "nautical angles" between pos and lookAt
|
||||
// rot[0] = pitch, rot[1] = yaw, rot[2] = roll?
|
||||
/* 0x24 */ Vec3s rot;
|
||||
/* 0x2A */ s16 rotZ;
|
||||
/* 0x2A */ u16 someBitFlags;
|
||||
/* 0x2C */ s16 unk_2C;
|
||||
/* 0x2E */ s16 unk_2E;
|
||||
/* 0x30 */ Vec3f unk_30;
|
||||
@@ -41,7 +41,13 @@ typedef struct {
|
||||
|
||||
void func_8001CA10(Camera*);
|
||||
void func_8001CA24(Player*, f32);
|
||||
void func_8001CA78(Player*, Camera*, Vec3f, f32*, f32*, f32*, s16, s8);
|
||||
void func_8001D794(Player*, Camera*, Vec3f, f32*, f32*, f32*, s16);
|
||||
void func_8001E0C4(Camera*, Player*, s8);
|
||||
void func_8001F87C(s32);
|
||||
|
||||
extern s32 D_80164A2C;
|
||||
extern f32 D_80164A30;
|
||||
|
||||
extern Camera cameras[];
|
||||
extern Camera *camera1;
|
||||
@@ -53,4 +59,7 @@ extern Player *gPlayerTwo;
|
||||
extern Player *gPlayerThree;
|
||||
extern Player *gPlayerFour;
|
||||
|
||||
// Actually define in main.c, probably need to add to main.h
|
||||
extern u16 D_80152300[];
|
||||
|
||||
#endif
|
||||
|
||||
+215
-270
@@ -3474,10 +3474,7 @@ s16 func_8000CC88(f32 posX, f32 posY, f32 posZ, Player *player, s32 playerId, s3
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
|
||||
extern s16 D_801631E0;
|
||||
extern s32 D_80163488;
|
||||
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
s16 func_8000CD24(f32 posX, f32 posY, f32 posZ, s16 wayPointIndex, Player *player, s32 playerId, s32 pathIndex) {
|
||||
s16 sp5E;
|
||||
s32 sp48;
|
||||
@@ -3494,20 +3491,14 @@ s16 func_8000CD24(f32 posX, f32 posY, f32 posZ, s16 wayPointIndex, Player *playe
|
||||
s16 temp_v0_6;
|
||||
s16 temp_v0_7;
|
||||
s16 var_v0;
|
||||
s32 temp_t0;
|
||||
s32 temp_t2;
|
||||
s32 temp_t4;
|
||||
s32 temp_t8;
|
||||
struct TrackWayPoint *temp_v1;
|
||||
u16 temp_v0;
|
||||
void *temp_v1_3;
|
||||
void *temp_v1_4;
|
||||
struct TrackWayPoint *temp_v1_3;
|
||||
struct TrackWayPoint *temp_v1_4;
|
||||
|
||||
temp_v0 = player->unk_000;
|
||||
var_f24 = posZ;
|
||||
var_f20 = posX;
|
||||
var_f22 = posY;
|
||||
if (((temp_v0 & 0x4000) != 0) && ((temp_v0 & 0x1000) == 0)) {
|
||||
if ((player->unk_000 & 0x4000) && !(player->unk_000 & 0x1000)) {
|
||||
temp_v0_2 = func_8000C884(var_f20, var_f22, var_f24, wayPointIndex, pathIndex, (u16) func_802ABD40(player->unk_110.unk3A));
|
||||
sp5E = temp_v0_2;
|
||||
if (temp_v0_2 == -1) {
|
||||
@@ -3515,11 +3506,10 @@ s16 func_8000CD24(f32 posX, f32 posY, f32 posZ, s16 wayPointIndex, Player *playe
|
||||
}
|
||||
goto block_17;
|
||||
}
|
||||
temp_t0 = playerId * 2;
|
||||
sp48 = temp_t0;
|
||||
if (*(&D_801631E0 + temp_t0) == 1) {
|
||||
sp48 = playerId * 2;
|
||||
if (D_801631E0[playerId] == 1) {
|
||||
temp_a0 = player->unk_0CA;
|
||||
if ((temp_a0 & 1) != 0) {
|
||||
if (temp_a0 & 1) {
|
||||
temp_v1 = &D_80164550[pathIndex][wayPointIndex];
|
||||
player->pos[0] = (f32) temp_v1->wayPointX;
|
||||
player->pos[1] = (f32) temp_v1->wayPointY;
|
||||
@@ -3530,11 +3520,10 @@ s16 func_8000CD24(f32 posX, f32 posY, f32 posZ, s16 wayPointIndex, Player *playe
|
||||
if (playerId == ((s32) D_80163488 % 8)) {
|
||||
func_802ADDC8(&player->unk_110, 10.0f, var_f20, var_f22, var_f24);
|
||||
temp_v0_3 = func_802ABD40(player->unk_110.unk3A);
|
||||
temp_t8 = temp_v0_3 & 0xFFFF;
|
||||
temp_v1_2 = sp48 + D_80163318;
|
||||
*temp_v1_2 = temp_v0_3;
|
||||
sp44 = temp_v1_2;
|
||||
var_v0 = func_8000C884(var_f20, var_f22, var_f24, wayPointIndex, pathIndex, (u16) temp_t8);
|
||||
var_v0 = func_8000C884(var_f20, var_f22, var_f24, wayPointIndex, pathIndex, (u16) (temp_v0_3 & 0xFFFF));
|
||||
sp5E = var_v0;
|
||||
if (var_v0 == -1) {
|
||||
sp44 = temp_v1_2;
|
||||
@@ -3543,25 +3532,23 @@ s16 func_8000CD24(f32 posX, f32 posY, f32 posZ, s16 wayPointIndex, Player *playe
|
||||
}
|
||||
if (var_v0 == -1) {
|
||||
temp_v0_4 = func_8000C0BC(var_f20, var_f22, var_f24, (u16) *temp_v1_2, &pathIndex);
|
||||
temp_t4 = temp_v0_4 * 8;
|
||||
sp5E = temp_v0_4;
|
||||
temp_v1_3 = D_80164550[pathIndex] + temp_t4;
|
||||
player->pos[0] = (f32) temp_v1_3->unk0;
|
||||
player->pos[1] = (f32) temp_v1_3->unk2;
|
||||
player->pos[2] = (f32) temp_v1_3->unk4;
|
||||
temp_v1_3 = &D_80164550[pathIndex][temp_v0_4];
|
||||
player->pos[0] = (f32) temp_v1_3->wayPointX;
|
||||
player->pos[1] = (f32) temp_v1_3->wayPointY;
|
||||
player->pos[2] = (f32) temp_v1_3->wayPointZ;
|
||||
}
|
||||
} else {
|
||||
temp_v0_5 = func_8000C9DC(var_f20, var_f22, var_f24, wayPointIndex, pathIndex);
|
||||
sp5E = temp_v0_5;
|
||||
if (temp_v0_5 == -1) {
|
||||
temp_v0_6 = func_8000BD94(var_f20, var_f22, var_f24, pathIndex);
|
||||
temp_t2 = temp_v0_6 * 8;
|
||||
sp5E = temp_v0_6;
|
||||
temp_v1_4 = D_80164550[pathIndex] + temp_t2;
|
||||
var_f20 = (f32) temp_v1_4->unk0;
|
||||
var_f22 = (f32) temp_v1_4->unk2;
|
||||
temp_v1_4 = &D_80164550[pathIndex][temp_v0_6];
|
||||
var_f20 = (f32) temp_v1_4->wayPointX;
|
||||
var_f22 = (f32) temp_v1_4->wayPointY;
|
||||
player->pos[0] = var_f20;
|
||||
var_f24 = (f32) temp_v1_4->unk4;
|
||||
var_f24 = (f32) temp_v1_4->wayPointZ;
|
||||
player->pos[1] = var_f22;
|
||||
player->pos[2] = var_f24;
|
||||
func_802ADDC8(&player->unk_110, 10.0f, var_f20, var_f22, var_f24);
|
||||
@@ -6697,79 +6684,55 @@ loop_13:
|
||||
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80012AC0.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern s16 D_801631E0;
|
||||
|
||||
void func_80012DC0(s32 playerId, Player *player) {
|
||||
f32 sp84;
|
||||
TrainCarStuff *temp_v0;
|
||||
TrainCarStuff *temp_v0_2;
|
||||
TrainStuff *var_s0;
|
||||
TrainStuff *var_s6;
|
||||
TrainStuff *var_s7;
|
||||
f32 temp_f14;
|
||||
f32 temp_f16;
|
||||
f32 temp_f24;
|
||||
f32 temp_f26;
|
||||
f64 temp_f0;
|
||||
f64 temp_f0_2;
|
||||
f64 temp_f0_3;
|
||||
f64 temp_f0_4;
|
||||
s32 var_s1;
|
||||
TrainCarStuff *trainCar;
|
||||
f32 playerPosX;
|
||||
f32 playerPosZ;
|
||||
f32 x_dist;
|
||||
f32 z_dist;
|
||||
s32 trainIndex;
|
||||
s32 passengerCarIndex;
|
||||
|
||||
if (*(&D_801631E0 + (playerId * 2)) != 1) {
|
||||
var_s7 = D_801635A0;
|
||||
var_s6 = D_801635A0;
|
||||
if ((player->unk_0BC << 7) >= 0) {
|
||||
temp_f24 = player->pos[0];
|
||||
temp_f26 = player->pos[2];
|
||||
do {
|
||||
temp_f16 = var_s6->locomotive.position[0];
|
||||
temp_f14 = var_s6->locomotive.position[2];
|
||||
sp84 = temp_f16;
|
||||
temp_f0 = (f64) (temp_f24 - temp_f16);
|
||||
if ((temp_f0 > -100.0) && (temp_f0 < 100.0)) {
|
||||
temp_f0_2 = (f64) (temp_f26 - temp_f14);
|
||||
if ((temp_f0_2 > -100.0) && (temp_f0_2 < 100.0)) {
|
||||
if (func_80006018(sp84, temp_f14, var_s6->locomotive.velocity[0], var_s6->locomotive.velocity[2], 60.0f, 20.0f, temp_f24, temp_f26) == (s32) 1U) {
|
||||
if (D_801631E0[playerId] != 1) {
|
||||
if (!(player->unk_0BC & 0x01000000)) {
|
||||
playerPosX = player->pos[0];
|
||||
playerPosZ = player->pos[2];
|
||||
for (trainIndex = 0; trainIndex < NUM_TRAINS; trainIndex++) {
|
||||
trainCar = &D_801635A0[trainIndex].locomotive;
|
||||
x_dist = playerPosX - trainCar->position[0];
|
||||
z_dist = playerPosZ - trainCar->position[2];
|
||||
if ((x_dist > -100.0) && (x_dist < 100.0)) {
|
||||
if ((z_dist > -100.0) && (z_dist < 100.0)) {
|
||||
if (func_80006018(trainCar->position[0], trainCar->position[2], trainCar->velocity[0], trainCar->velocity[2], 60.0f, 20.0f, playerPosX, playerPosZ) == 1) {
|
||||
player->statusEffects |= 0x400000;
|
||||
}
|
||||
temp_v0 = &var_s6->tender;
|
||||
if ((var_s6->tender.isActive == (s16) 1U) && (func_80006018(temp_v0->position[0], temp_v0->position[2], temp_v0->velocity[0], temp_v0->velocity[2], 30.0f, 20.0f, temp_f24, temp_f26) == (s32) 1U)) {
|
||||
player->statusEffects |= 0x400000;
|
||||
}
|
||||
}
|
||||
}
|
||||
var_s1 = 0;
|
||||
var_s0 = var_s7;
|
||||
loop_13:
|
||||
if (var_s0->passengerCars[0].isActive == (s16) 1U) {
|
||||
temp_f0_3 = (f64) (temp_f24 - var_s0->passengerCars[0].position[0]);
|
||||
if ((temp_f0_3 > -100.0) && (temp_f0_3 < 100.0)) {
|
||||
temp_f0_4 = (f64) (temp_f26 - var_s0->passengerCars[0].position[2]);
|
||||
if (temp_f0_4 > -100.0) {
|
||||
temp_v0_2 = var_s0->passengerCars;
|
||||
if ((temp_f0_4 < 100.0) && (func_80006018(temp_v0_2->position[0], temp_v0_2->position[2], temp_v0_2->velocity[0], temp_v0_2->velocity[2], 30.0f, 20.0f, temp_f24, temp_f26) == (s32) 1U)) {
|
||||
trainCar = &D_801635A0[trainIndex].tender;
|
||||
if (trainCar->isActive == 1) {
|
||||
if (func_80006018(trainCar->position[0], trainCar->position[2], trainCar->velocity[0], trainCar->velocity[2], 30.0f, 20.0f, playerPosX, playerPosZ) == 1) {
|
||||
player->statusEffects |= 0x400000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var_s1 += 0x24;
|
||||
var_s0 += 0x24;
|
||||
if (var_s1 != 0xB4) {
|
||||
goto loop_13;
|
||||
|
||||
for (passengerCarIndex = 0; passengerCarIndex < NUM_PASSENGER_CAR_ENTRIES; passengerCarIndex++) {
|
||||
trainCar = &D_801635A0[trainIndex].passengerCars[passengerCarIndex];
|
||||
x_dist = playerPosX - trainCar->position[0];
|
||||
z_dist = playerPosZ - trainCar->position[2];
|
||||
if (trainCar->isActive == 1) {
|
||||
if ((x_dist > -100.0) && (x_dist < 100.0)) {
|
||||
if ((z_dist > -100.0) && (z_dist < 100.0)) {
|
||||
if (func_80006018(trainCar->position[0], trainCar->position[2], trainCar->velocity[0], trainCar->velocity[2], 30.0f, 20.0f, playerPosX, playerPosZ) == 1) {
|
||||
player->statusEffects |= 0x400000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var_s7 += 0x10C;
|
||||
var_s6 += 0x10C;
|
||||
} while (var_s7 != D_801637B8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80012DC0.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
@@ -7030,47 +6993,40 @@ void func_800133C4(void) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800133C4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern ? D_801637EC;
|
||||
#ifdef NEEDS_RODATA
|
||||
// data_0DD0A0_3.s
|
||||
extern f64 D_800ED158;// = 300.0;
|
||||
extern f64 D_800ED160;// = -300.0;
|
||||
|
||||
void func_80013854(Player *player) {
|
||||
f32 sp70;
|
||||
PaddleWheelBoatStuff *var_s0;
|
||||
f32 temp_f12;
|
||||
f32 temp_f14;
|
||||
f32 temp_f24;
|
||||
f32 temp_f26;
|
||||
f32 temp_f28;
|
||||
f32 var_f18;
|
||||
f64 temp_f0;
|
||||
f64 temp_f0_2;
|
||||
s32 temp_v0;
|
||||
s32 someIndex;
|
||||
PaddleWheelBoatStuff *tempPaddleWheelBoat;
|
||||
f32 x_diff;
|
||||
f32 y_diff;
|
||||
f32 z_diff;
|
||||
f32 playerX;
|
||||
f32 playerZ;
|
||||
f32 playerY;
|
||||
|
||||
temp_v0 = player->unk_0BC;
|
||||
if (((temp_v0 << 7) >= 0) && ((temp_v0 << 6) >= 0)) {
|
||||
temp_f26 = player->pos[0];
|
||||
var_f18 = player->pos[1];
|
||||
temp_f28 = player->pos[2];
|
||||
var_s0 = D_801637C0;
|
||||
do {
|
||||
if (var_s0->isActive == 1) {
|
||||
temp_f12 = var_s0->position[0];
|
||||
temp_f14 = var_s0->position[2];
|
||||
temp_f24 = var_f18 - var_s0->position[1];
|
||||
temp_f0 = (f64) (temp_f26 - temp_f12);
|
||||
if ((temp_f0 > -300.0) && (temp_f0 < 300.0)) {
|
||||
temp_f0_2 = (f64) (temp_f28 - temp_f14);
|
||||
if ((temp_f0_2 > -300.0) && (temp_f0_2 < 300.0)) {
|
||||
sp70 = var_f18;
|
||||
if ((func_80006018(temp_f12, temp_f14, var_s0->velocity[0], var_s0->velocity[2], 200.0f, 60.0f, temp_f26, temp_f28) == (s32) 1) && ((f64) temp_f24 < 60.0)) {
|
||||
if (((player->unk_0BC << 7) >= 0) && ((player->unk_0BC << 6) >= 0)) {
|
||||
playerX = player->pos[0];
|
||||
playerY = player->pos[1];
|
||||
playerZ = player->pos[2];
|
||||
for (someIndex = 0; someIndex < NUM_PADDLE_WHEEL_BOATS; someIndex++) {
|
||||
tempPaddleWheelBoat = &D_801637C0[someIndex];
|
||||
if (tempPaddleWheelBoat->isActive == 1) {
|
||||
x_diff = playerX - tempPaddleWheelBoat->position[0];
|
||||
y_diff = playerY - tempPaddleWheelBoat->position[1];
|
||||
z_diff = playerZ - tempPaddleWheelBoat->position[2];
|
||||
if ((x_diff > -300.0) && (x_diff < 300.0)) {
|
||||
if ((z_diff > -300.0) && (z_diff < 300.0)) {
|
||||
if ((func_80006018(tempPaddleWheelBoat->position[0], tempPaddleWheelBoat->position[2], tempPaddleWheelBoat->velocity[0], tempPaddleWheelBoat->velocity[2], 200.0f, 60.0f, playerX, playerZ) == 1) && (y_diff < 60.0)) {
|
||||
player->statusEffects |= 0x80000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var_s0 += 0x2C;
|
||||
} while (var_s0 != &D_801637EC);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -7892,75 +7848,69 @@ UNUSED void func_8001530C(void) {
|
||||
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
//void func_80015390(Camera *, Player *, ?, s32); /* extern */
|
||||
void func_80015390(Camera*, Player*, s32,s32);
|
||||
void func_80015314(s32 playerId, s32 arg1, s32 cameraId) {
|
||||
Camera *temp_a0 = &camera1[cameraId];
|
||||
Player *player = &gPlayerOne[playerId];
|
||||
Camera *temp_a0;
|
||||
Player *temp_a1;
|
||||
|
||||
//temp_a1 = &gPlayerOne[playerId];
|
||||
//temp_a0 = &camera1[cameraId];
|
||||
temp_a0->unk_2C = player->unk_02C[1];
|
||||
func_80015390(temp_a0, player, 0, playerId);
|
||||
// wtf is up with the pointer accesses here?
|
||||
// What aren't they just doing thing = &some_pointer[some_index]?
|
||||
temp_a1 = gPlayerOne;
|
||||
temp_a0 = camera1;
|
||||
temp_a1 += playerId;
|
||||
temp_a0 += cameraId;
|
||||
temp_a0->unk_2C = temp_a1->unk_02C[1];
|
||||
func_80015390(temp_a0, temp_a1, 0);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80015314.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
void func_8001D794(Player *, Camera *, f32 *, f32 *, f32 *, f32 *, s32); /* extern */
|
||||
|
||||
void func_80015390(Camera *camera, s32 arg1, s32 arg2) {
|
||||
f32 sp94;
|
||||
void func_80015390(Camera *camera, Player *player, s32 arg2) {
|
||||
s32 stackPadding0[3];
|
||||
s32 stackPadding1[3];
|
||||
f32 temp_f12;
|
||||
f32 sp90;
|
||||
f32 sp8C;
|
||||
f32 temp_f14;
|
||||
Player *temp_s1;
|
||||
f32 sp84;
|
||||
f32 sp80;
|
||||
f32 sp7C;
|
||||
f32 sp64;
|
||||
Player *temp_s1;
|
||||
f32 temp_f12;
|
||||
f32 temp_f14;
|
||||
s16 temp_v0;
|
||||
s32 stackPadding2[3];
|
||||
Vec3f sp64;
|
||||
s32 stackPadding3[3];
|
||||
s32 stackPadding4[3];
|
||||
s32 stackPadding5[3];
|
||||
s16 var_a2;
|
||||
s32 temp_v0_2;
|
||||
|
||||
/*
|
||||
Doing the more sensible:
|
||||
temp_s1 = &gPlayerOne[camera->playerId];
|
||||
temp_v0 = temp_s1->unk_078;
|
||||
if (temp_v0 == 0) {
|
||||
leads to some regalloc differences
|
||||
*/
|
||||
temp_s1 = gPlayerOne;
|
||||
temp_s1 += camera->playerId;
|
||||
if (temp_s1->unk_078 == 0) {
|
||||
var_a2 = 0x0064;
|
||||
} else if (temp_v0 < 0) {
|
||||
var_a2 = 0xA0 - (temp_v0 / 16);
|
||||
} else if (temp_s1->unk_078 < 0) {
|
||||
var_a2 = 0xA0 - (temp_s1->unk_078 / 16);
|
||||
} else {
|
||||
var_a2 = (temp_v0 / 16) + 0xA0;
|
||||
var_a2 = 0xA0 + (temp_s1->unk_078 / 16);
|
||||
}
|
||||
temp_v0_2 = temp_s1->unk_0BC;
|
||||
if (!(temp_v0_2 & 0x80) && !(temp_v0_2 & 0x40)) {
|
||||
if (!((temp_s1->unk_0BC & 0x80) || (temp_s1->unk_0BC & 0x40))) {
|
||||
func_800224F0(&camera->unk_2C, temp_s1->unk_02C[1], var_a2);
|
||||
}
|
||||
func_8001D794(temp_s1, camera, &sp64, &sp84, &sp80, &sp7C, (s32) camera->unk_2C);
|
||||
func_8001D794(temp_s1, camera, sp64, &sp84, &sp80, &sp7C, camera->unk_2C);
|
||||
func_802ADDC8(&camera->unk_54, 10.0f, sp84, sp80, sp7C);
|
||||
camera->lookAt[0] = sp64;
|
||||
camera->lookAt[1] = sp68;
|
||||
camera->lookAt[2] = sp6C;
|
||||
camera->lookAt[0] = sp64[0];
|
||||
camera->lookAt[1] = sp64[1];
|
||||
camera->lookAt[2] = sp64[2];
|
||||
camera->pos[0] = sp84;
|
||||
camera->pos[1] = sp80;
|
||||
temp_f12 = camera->lookAt[0] - camera->pos[0];
|
||||
camera->pos[2] = sp7C;
|
||||
sp90 = camera->lookAt[1] - camera->pos[1];
|
||||
sp94 = temp_f12;
|
||||
temp_f12 = camera->lookAt[0] - camera->pos[0];
|
||||
sp90 = camera->lookAt[1] - camera->pos[1];
|
||||
temp_f14 = camera->lookAt[2] - camera->pos[2];
|
||||
sp8C = temp_f14;
|
||||
camera->rot[1] = atan2s(temp_f12, temp_f14);
|
||||
camera->rot[0] = atan2s(sqrtf((sp94 * sp94) + (temp_f14 * temp_f14)), sp90);
|
||||
camera->rot[0] = atan2s(sqrtf((temp_f12 * temp_f12) + (temp_f14 * temp_f14)), sp90);
|
||||
camera->rot[2] = 0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80015390.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
@@ -10727,20 +10677,17 @@ void func_8001ABEC(struct struct_801642D8 *arg0) {
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
|
||||
void func_8001AB74(s32, void *, s32); /* extern */
|
||||
void func_8001ABE0(s32, void *, s32 *); /* extern */
|
||||
void func_8001ABEC(void *, s16); /* extern */
|
||||
s32 func_8007AF78(s16, s16, s32 *); /* extern */
|
||||
void func_800C92CC(s32, ?, s32, struct Actor *); /* extern */
|
||||
void func_800CAC60(s32); /* extern */
|
||||
void func_800CAD40(u8, s16); /* extern */
|
||||
extern s16 D_801631E0;
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
? func_8001AB74(s32, struct struct_801642D8 *, u8); /* extern */
|
||||
? func_800C92CC(s32, ?, s32, struct Actor *); /* extern */
|
||||
? func_800CAC60(s32); /* extern */
|
||||
? func_800CAD40(u8, s16); /* extern */
|
||||
extern ? D_801631E0;
|
||||
extern s16 D_80163478;
|
||||
extern ? D_801642D8;
|
||||
extern u16 D_801646CC;
|
||||
|
||||
void func_8001AC10(s32 playerId, s32 arg1, s32 *arg2) {
|
||||
void func_8001AC10(s32 playerId) {
|
||||
Player *sp2C;
|
||||
struct Actor *sp28;
|
||||
Player *temp_t9;
|
||||
@@ -10755,7 +10702,6 @@ void func_8001AC10(s32 playerId, s32 arg1, s32 *arg2) {
|
||||
s16 temp_v1_8;
|
||||
s16 temp_v1_9;
|
||||
s16 var_v0;
|
||||
s32 *var_a2;
|
||||
s32 temp_a0;
|
||||
s32 temp_v1;
|
||||
s32 var_v1;
|
||||
@@ -10773,22 +10719,21 @@ void func_8001AC10(s32 playerId, s32 arg1, s32 *arg2) {
|
||||
struct Actor *temp_a3_8;
|
||||
struct Actor *temp_a3_9;
|
||||
struct TrackWayPoint *temp_v0_2;
|
||||
struct struct_801642D8 *temp_s0;
|
||||
u16 temp_v0;
|
||||
void *temp_s0;
|
||||
|
||||
var_a2 = arg2;
|
||||
temp_t9 = &gPlayerOne[playerId];
|
||||
sp2C = temp_t9;
|
||||
if ((gModeSelection != (s32) TIME_TRIALS) && (D_801646CC != (u16) 1) && !(temp_t9->unk_000 & 0x800)) {
|
||||
if ((gModeSelection != (s32) 1) && (D_801646CC != (u16) 1) && !(temp_t9->unk_000 & 0x800)) {
|
||||
temp_s0 = (playerId * 0x10) + &D_801642D8;
|
||||
temp_a1 = temp_s0->unk0;
|
||||
switch (temp_a1) { /* switch 1 */
|
||||
case 0: /* switch 1 */
|
||||
temp_s0->unk2 = -1;
|
||||
if ((((playerId * 0x14) + 0x64) < D_80164450[playerId]) && (temp_s0->unk4 >= 0x259) && (temp_s0->unk6 < 3) && (temp_v1 = gLapCountByPlayerId[playerId], var_a2 = gPlayerPositions, ((temp_v1 < 3) != 0))) {
|
||||
func_8001AB74(playerId, temp_s0, func_8007AF78((s16) temp_v1, gPlayerPositions[playerId].unk2, gPlayerPositions));
|
||||
temp_s0->ffff = -1;
|
||||
if ((((playerId * 0x14) + 0x64) < D_80164450[playerId]) && (temp_s0->timer >= 0x259) && (temp_s0->laps < 3) && (temp_v1 = gLapCountByPlayerId[playerId], ((temp_v1 < 3) != 0))) {
|
||||
func_8001AB74(playerId, temp_s0, func_8007AF78((s32) (s16) temp_v1, gPlayerPositions[playerId].unk2));
|
||||
} else {
|
||||
func_8001ABE0(playerId, temp_s0, var_a2);
|
||||
func_8001ABE0(playerId, (s32) temp_s0);
|
||||
}
|
||||
default: /* switch 1 */
|
||||
break;
|
||||
@@ -10813,32 +10758,32 @@ void func_8001AC10(s32 playerId, s32 arg1, s32 *arg2) {
|
||||
break;
|
||||
}
|
||||
} else if (temp_a1 == 1) {
|
||||
temp_s0->unk2 = func_802B2D70(sp2C);
|
||||
temp_v1_3 = temp_s0->unk2;
|
||||
temp_s0->ffff = func_802B2D70(sp2C);
|
||||
temp_v1_3 = temp_s0->ffff;
|
||||
if ((temp_v1_3 >= 0) && (temp_v1_3 < 0x64)) {
|
||||
sp2C->statusEffects |= 0x40000;
|
||||
temp_s0->unk0 = 2;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->unk6 = (s16) (temp_s0->unk6 + 1);
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->laps += 1;
|
||||
temp_s0->unkE = (s16) ((random_int(3U) * 0x14) + 0xA);
|
||||
} else {
|
||||
temp_s0->unk0 = 0;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2: /* switch 1 */
|
||||
temp_a3 = &gActorList[temp_s0->unk2];
|
||||
temp_a3 = &gActorList[temp_s0->ffff];
|
||||
if (!(temp_a3->flags & 0x8000) || (temp_a3->type != 6) || (temp_a3->state != 0) || (playerId != temp_a3->rot[0])) {
|
||||
temp_s0->unk0 = 0;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
sp2C->statusEffects &= 0xFFFBFFFF;
|
||||
} else if (temp_s0->unkE < temp_s0->unk4) {
|
||||
} else if (temp_s0->unkE < temp_s0->timer) {
|
||||
temp_s0->unk0 = 3;
|
||||
}
|
||||
break;
|
||||
case 3: /* switch 1 */
|
||||
temp_a3_2 = &gActorList[temp_s0->unk2];
|
||||
temp_a3_2 = &gActorList[temp_s0->ffff];
|
||||
if (!(temp_a3_2->flags & 0x8000) || (temp_a3_2->type != 6) || (temp_a3_2->state != 0) || (playerId != temp_a3_2->rot[0])) {
|
||||
if (playerId != temp_a3_2->rot[0]) {
|
||||
|
||||
@@ -10854,19 +10799,19 @@ void func_8001AC10(s32 playerId, s32 arg1, s32 *arg2) {
|
||||
}
|
||||
}
|
||||
sp2C->statusEffects &= 0xFFFBFFFF;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
break;
|
||||
case 34: /* switch 1 */
|
||||
temp_s0->unk2 = func_802B2D70(sp2C);
|
||||
temp_v1_4 = temp_s0->unk2;
|
||||
temp_s0->ffff = func_802B2D70(sp2C);
|
||||
temp_v1_4 = temp_s0->ffff;
|
||||
if ((temp_v1_4 >= 0) && (temp_v1_4 < 0x64)) {
|
||||
temp_a3_3 = &gActorList[temp_v1_4];
|
||||
temp_a3_3->state = 4;
|
||||
sp2C->statusEffects |= 0x40000;
|
||||
temp_s0->unk0 = 0x0023;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->unk6 = (s16) (temp_s0->unk6 + 1);
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->laps += 1;
|
||||
temp_a2 = D_80163478;
|
||||
temp_v0_2 = &D_80164550[*gPathIndexByPlayerId][(s32) (gNearestWaypointByPlayerId[temp_a2] + 0x1E) % (s32) gWaypointCountByPathIndex[gPathIndexByPlayerId[temp_a2]]];
|
||||
temp_a3_3->velocity[0] = (f32) ((f64) ((f32) temp_v0_2->wayPointX - sp2C->pos[0]) / 20.0);
|
||||
@@ -10876,14 +10821,14 @@ void func_8001AC10(s32 playerId, s32 arg1, s32 *arg2) {
|
||||
func_800C92CC(playerId & 0xFF, 0x29008009, temp_a2 * 2, temp_a3_3);
|
||||
func_800C98B8(sp2C->pos, sp2C->unk_034, 0x19018014U);
|
||||
} else {
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
}
|
||||
break;
|
||||
case 35: /* switch 1 */
|
||||
temp_a3_4 = &gActorList[temp_s0->unk2];
|
||||
temp_a3_4 = &gActorList[temp_s0->ffff];
|
||||
if (!(temp_a3_4->flags & 0x8000) || (temp_a3_4->type != 6) || (temp_a3_4->state != 4) || (playerId != temp_a3_4->rot[0])) {
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
sp2C->statusEffects &= 0xFFFBFFFF;
|
||||
} else {
|
||||
@@ -10891,13 +10836,13 @@ void func_8001AC10(s32 playerId, s32 arg1, s32 *arg2) {
|
||||
temp_a3_4->velocity[1] = (f32) ((f64) temp_a3_4->velocity[1] - 0.4);
|
||||
temp_a3_4->pos[2] += temp_a3_4->velocity[2];
|
||||
temp_a3_4->pos[1] += temp_a3_4->velocity[1];
|
||||
if (temp_s0->unk4 >= 0x15) {
|
||||
if (temp_s0->timer >= 0x15) {
|
||||
temp_s0->unk0 = 0x0024;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 36: /* switch 1 */
|
||||
temp_a3_5 = &gActorList[temp_s0->unk2];
|
||||
temp_a3_5 = &gActorList[temp_s0->ffff];
|
||||
if (!(temp_a3_5->flags & 0x8000) || (temp_a3_5->type != 6) || (temp_a3_5->state != 4) || (playerId != temp_a3_5->rot[0])) {
|
||||
if (playerId != temp_a3_5->rot[0]) {
|
||||
|
||||
@@ -10911,17 +10856,17 @@ void func_8001AC10(s32 playerId, s32 arg1, s32 *arg2) {
|
||||
temp_a3_5->pos[1] = func_802AE1C0(temp_a3_5->pos[0], (f32) ((f64) temp_a3_5->pos[1] + 30.0), temp_a3_5->pos[2]) + (temp_a3_5->boundingBoxSize + 1.0f);
|
||||
}
|
||||
sp2C->statusEffects &= 0xFFFBFFFF;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
break;
|
||||
case 4: /* switch 1 */
|
||||
if ((s32) gNumActors < 0x50) {
|
||||
temp_s0->unk2 = func_802B1C9C(sp2C);
|
||||
temp_v1_5 = temp_s0->unk2;
|
||||
temp_s0->ffff = func_802B1C9C(sp2C);
|
||||
temp_v1_5 = temp_s0->ffff;
|
||||
if ((temp_v1_5 >= 0) && (temp_v1_5 < 0x64)) {
|
||||
temp_s0->unk0 = 5;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->unk6 = (s16) (temp_s0->unk6 + 1);
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->laps += 1;
|
||||
temp_s0->unkE = (s16) ((random_int(3U) * 0x14) + 0xA);
|
||||
} else {
|
||||
goto block_71;
|
||||
@@ -10932,34 +10877,34 @@ block_71:
|
||||
}
|
||||
break;
|
||||
case 5: /* switch 1 */
|
||||
temp_a3_6 = &gActorList[temp_s0->unk2];
|
||||
temp_a3_6 = &gActorList[temp_s0->ffff];
|
||||
if (!(temp_a3_6->flags & 0x8000) || (temp_a3_6->type != 7) || (temp_a3_6->state != 0) || (playerId != temp_a3_6->rot[2])) {
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
} else if (temp_s0->unkE < temp_s0->unk4) {
|
||||
temp_s0->unk4 = 0;
|
||||
} else if (temp_s0->unkE < temp_s0->timer) {
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 6;
|
||||
}
|
||||
break;
|
||||
case 6: /* switch 1 */
|
||||
temp_a3_7 = &gActorList[temp_s0->unk2];
|
||||
temp_a3_7 = &gActorList[temp_s0->ffff];
|
||||
if (!(temp_a3_7->flags & 0x8000) || (temp_a3_7->type != 7) || (temp_a3_7->state != 0) || (playerId != temp_a3_7->rot[2])) {
|
||||
temp_s0->unk0 = 0;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
} else {
|
||||
temp_a3_7->state = 1;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
}
|
||||
break;
|
||||
case 7: /* switch 1 */
|
||||
if ((s32) gNumActors < 0x50) {
|
||||
temp_s0->unk2 = func_802B1E48(sp2C);
|
||||
temp_v1_6 = temp_s0->unk2;
|
||||
temp_s0->ffff = func_802B1E48(sp2C);
|
||||
temp_v1_6 = temp_s0->ffff;
|
||||
if ((temp_v1_6 >= 0) && (temp_v1_6 < 0x64)) {
|
||||
temp_s0->unk0 = 8;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->unk6 = (s16) (temp_s0->unk6 + 1);
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->laps += 1;
|
||||
temp_s0->unkE = (s16) ((random_int(3U) * 0x14) + 0xA);
|
||||
} else {
|
||||
goto block_92;
|
||||
@@ -10970,34 +10915,34 @@ block_92:
|
||||
}
|
||||
break;
|
||||
case 8: /* switch 1 */
|
||||
temp_a3_8 = &gActorList[temp_s0->unk2];
|
||||
temp_a3_8 = &gActorList[temp_s0->ffff];
|
||||
if (!(temp_a3_8->flags & 0x8000) || (temp_a3_8->type != 8) || (temp_a3_8->state != 0) || (playerId != temp_a3_8->rot[2])) {
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
} else if (temp_s0->unkE < temp_s0->unk4) {
|
||||
} else if (temp_s0->unkE < temp_s0->timer) {
|
||||
temp_s0->unk0 = 9;
|
||||
}
|
||||
break;
|
||||
case 9: /* switch 1 */
|
||||
func_8001ABEC(temp_s0, temp_a1);
|
||||
temp_a3_9 = &gActorList[temp_s0->unk2];
|
||||
func_8001ABEC(temp_s0);
|
||||
temp_a3_9 = &gActorList[temp_s0->ffff];
|
||||
if (!(temp_a3_9->flags & 0x8000) || (temp_a3_9->type != 8) || (temp_a3_9->state != 0) || (playerId != temp_a3_9->rot[2])) {
|
||||
temp_s0->unk0 = 0;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
} else {
|
||||
temp_a3_9->state = 1;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
}
|
||||
break;
|
||||
case 10: /* switch 1 */
|
||||
if ((s32) gNumActors < 0x50) {
|
||||
temp_s0->unk2 = func_802B17F4(sp2C);
|
||||
temp_v1_7 = temp_s0->unk2;
|
||||
temp_s0->ffff = func_802B17F4(sp2C);
|
||||
temp_v1_7 = temp_s0->ffff;
|
||||
if ((temp_v1_7 >= 0) && (temp_v1_7 < 0x64)) {
|
||||
temp_s0->unk0 = 0x000B;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->unk6 = (s16) (temp_s0->unk6 + 1);
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->laps += 1;
|
||||
temp_s0->unkE = (s16) ((random_int(3U) * 0x14) + 0x3C);
|
||||
} else {
|
||||
goto block_113;
|
||||
@@ -11008,7 +10953,7 @@ block_113:
|
||||
}
|
||||
break;
|
||||
case 11: /* switch 1 */
|
||||
temp_a3_10 = &gActorList[temp_s0->unk2];
|
||||
temp_a3_10 = &gActorList[temp_s0->ffff];
|
||||
if (temp_a3_10->state == 6) {
|
||||
var_v1 = 0;
|
||||
if (temp_a3_10->unk1A != -1) {
|
||||
@@ -11030,20 +10975,20 @@ block_113:
|
||||
temp_s0->unk0 = 0;
|
||||
goto block_131;
|
||||
}
|
||||
if (temp_s0->unkE < temp_s0->unk4) {
|
||||
if (temp_s0->unkE < temp_s0->timer) {
|
||||
temp_s0->unk0 = 0x000C;
|
||||
temp_s0->unk8 = 0;
|
||||
block_131:
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 12: /* switch 1 */
|
||||
if (((s16) temp_s0->unk4 % 10) == 0) {
|
||||
if (((s16) temp_s0->timer % 10) == 0) {
|
||||
temp_v1_8 = temp_s0->unk8;
|
||||
if (temp_v1_8 < 5) {
|
||||
var_v0 = 0;
|
||||
temp_a3_11 = &gActorList[temp_s0->unk2];
|
||||
temp_a3_11 = &gActorList[temp_s0->ffff];
|
||||
switch (temp_v1_8) { /* switch 2 */
|
||||
case 0: /* switch 2 */
|
||||
if (temp_a3_11->unk1A != -1) {
|
||||
@@ -11077,34 +11022,34 @@ block_146:
|
||||
}
|
||||
temp_s0->unk8 = (s16) (temp_s0->unk8 + 1);
|
||||
} else {
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 13: /* switch 1 */
|
||||
temp_s0->unk2 = func_802B2C40(sp2C);
|
||||
temp_v1_9 = temp_s0->unk2;
|
||||
temp_s0->ffff = func_802B2C40(sp2C);
|
||||
temp_v1_9 = temp_s0->ffff;
|
||||
if ((temp_v1_9 >= 0) && (temp_v1_9 < 0x64)) {
|
||||
temp_s0->unk0 = 0x000E;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->unk6 = (s16) (temp_s0->unk6 + 1);
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->laps += 1;
|
||||
temp_s0->unkE = (s16) ((random_int(3U) * 0x14) + 0xA);
|
||||
} else {
|
||||
temp_s0->unk0 = 0;
|
||||
}
|
||||
break;
|
||||
case 14: /* switch 1 */
|
||||
temp_a3_12 = &gActorList[temp_s0->unk2];
|
||||
temp_a3_12 = &gActorList[temp_s0->ffff];
|
||||
if (!(temp_a3_12->flags & 0x8000) || (temp_a3_12->type != 0x000D) || (temp_a3_12->state != 0) || (playerId != (s32) temp_a3_12->velocity[0])) {
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
} else if (temp_s0->unkE < temp_s0->unk4) {
|
||||
} else if (temp_s0->unkE < temp_s0->timer) {
|
||||
temp_s0->unk0 = 0x000F;
|
||||
}
|
||||
break;
|
||||
case 15: /* switch 1 */
|
||||
temp_a3_13 = &gActorList[temp_s0->unk2];
|
||||
temp_a3_13 = &gActorList[temp_s0->ffff];
|
||||
if (!(temp_a3_13->flags & 0x8000) || (temp_a3_13->type != 0x000D) || (temp_a3_13->state != 0) || (playerId != (s32) temp_a3_13->velocity[0])) {
|
||||
if (playerId != temp_a3_13->rot[0]) {
|
||||
|
||||
@@ -11117,88 +11062,88 @@ block_146:
|
||||
temp_a3_13->pos[1] = func_802AE1C0(temp_a3_13->pos[0], (f32) ((f64) temp_a3_13->pos[1] + 30.0), temp_a3_13->pos[2]) + temp_a3_13->boundingBoxSize;
|
||||
}
|
||||
}
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
break;
|
||||
case 22: /* switch 1 */
|
||||
func_802B2EBC(sp2C);
|
||||
func_800CAC60(playerId & 0xFF);
|
||||
func_8009E5BC();
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0x0017;
|
||||
temp_s0->unk6 = (s16) (temp_s0->unk6 + 1);
|
||||
temp_s0->laps += 1;
|
||||
break;
|
||||
case 23: /* switch 1 */
|
||||
if (temp_s0->unk4 >= 0xF1) {
|
||||
if (temp_s0->timer >= 0xF1) {
|
||||
func_800CAD40((u8) playerId, temp_a1);
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
}
|
||||
break;
|
||||
case 25: /* switch 1 */
|
||||
sp2C->statusEffects |= 0x2000;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0x001A;
|
||||
temp_s0->unk6 = (s16) (temp_s0->unk6 + 1);
|
||||
temp_s0->laps += 1;
|
||||
break;
|
||||
case 26: /* switch 1 */
|
||||
if (!(sp2C->unk_0BC & 0x200)) {
|
||||
temp_s0->unk0 = 0;
|
||||
}
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
break;
|
||||
case 27: /* switch 1 */
|
||||
sp2C->statusEffects |= 0x800;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0x001C;
|
||||
temp_s0->unk6 = (s16) (temp_s0->unk6 + 1);
|
||||
temp_s0->laps += 1;
|
||||
break;
|
||||
case 28: /* switch 1 */
|
||||
if ((sp2C->unk_0BC << 0) >= 0) {
|
||||
if (!(sp2C->unk_0BC & 0x80000000)) {
|
||||
temp_s0->unk0 = 0;
|
||||
}
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
break;
|
||||
case 29: /* switch 1 */
|
||||
sp2C->statusEffects |= 0x200;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
temp_s0->unk6 = (s16) (temp_s0->unk6 + 1);
|
||||
temp_s0->laps += 1;
|
||||
break;
|
||||
case 30: /* switch 1 */
|
||||
if (temp_s0->unk4 >= 0x3D) {
|
||||
if (temp_s0->timer >= 0x3D) {
|
||||
sp2C->statusEffects |= 0x200;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0x001D;
|
||||
}
|
||||
break;
|
||||
case 31: /* switch 1 */
|
||||
if (temp_s0->unk4 >= 0x3D) {
|
||||
if (temp_s0->timer >= 0x3D) {
|
||||
sp2C->statusEffects |= 0x200;
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0x001E;
|
||||
}
|
||||
break;
|
||||
case 32: /* switch 1 */
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0x0021;
|
||||
temp_s0->unkE = 0x0258;
|
||||
break;
|
||||
case 33: /* switch 1 */
|
||||
if (((s16) temp_s0->unk4 % 60) == 0) {
|
||||
if (((s16) temp_s0->timer % 60) == 0) {
|
||||
sp2C->statusEffects |= 0x200;
|
||||
if (temp_s0->unkE < temp_s0->unk4) {
|
||||
temp_s0->unk4 = 0;
|
||||
if (temp_s0->unkE < temp_s0->timer) {
|
||||
temp_s0->timer = 0;
|
||||
temp_s0->unk0 = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (temp_s0->unk4 < 0x2710) {
|
||||
temp_s0->unk4 = (s16) (temp_s0->unk4 + 1);
|
||||
if (temp_s0->timer < 0x2710) {
|
||||
temp_s0->timer += 1;
|
||||
}
|
||||
if (sp2C->unk_0BC & 0x80002200) {
|
||||
temp_s0->unk4 = 0;
|
||||
temp_s0->timer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+9
-2
@@ -82,13 +82,15 @@ void func_80011AE4(s32);
|
||||
void func_80012220(VehicleStuff*);
|
||||
void func_800122D8();
|
||||
void func_80012A48(TrainCarStuff*, s16);
|
||||
void func_80012AC0();
|
||||
void func_80012DC0(s32, Player*);
|
||||
void func_800133C4();
|
||||
void func_80013854(Player*);
|
||||
f32 func_80013C74(s16, s16);
|
||||
void func_80013D20(VehicleStuff*);
|
||||
void func_80013F7C(s32, Player*, VehicleStuff*, f32, f32, s32, u32);
|
||||
f32 func_800145A8(s16, f32, s16);
|
||||
void func_800146B8(s32, s32, VehicleStuff*);
|
||||
void func_80012AC0();
|
||||
void func_800133C4();
|
||||
void func_8001487C();
|
||||
void func_800148C4(s32, Player*);
|
||||
void func_8001490C(s32);
|
||||
@@ -103,6 +105,8 @@ void func_80014CC0(s32, Player*);
|
||||
void func_80014D08(s32);
|
||||
void func_80014D30(s32, s32);
|
||||
void func_8001530C();
|
||||
void func_80015314(s32, s32, s32);
|
||||
void func_80015390(Camera*, Player*, s32);
|
||||
void func_8001968C();
|
||||
void func_8001C05C();
|
||||
void func_80019DE4();
|
||||
@@ -125,6 +129,9 @@ extern f32 D_800DCA4C[];
|
||||
|
||||
// See bss_80005FD0.s
|
||||
extern UnkActorInner D_80162E70;
|
||||
extern s16 D_80162EB0;
|
||||
extern u16 D_801631E0[8];
|
||||
extern s32 D_80163488;
|
||||
|
||||
extern s32 D_8016337C;
|
||||
extern s32 gModeSelection;
|
||||
|
||||
+95
-125
@@ -757,10 +757,10 @@ void func_80029200(Player *player, s8 arg1) {
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
static f32 D_800DDBD4[8] = { 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f };
|
||||
|
||||
void func_8002934C(Player *player, struct Camera *arg1, s8 arg2, s8 arg3) {
|
||||
void func_8002934C(Player *player, Camera *camera, s8 arg2, s8 arg3) {
|
||||
f32 sp50;
|
||||
f32 sp28;
|
||||
void *sp24;
|
||||
@@ -798,8 +798,8 @@ void func_8002934C(Player *player, struct Camera *arg1, s8 arg2, s8 arg3) {
|
||||
void *temp_a3;
|
||||
|
||||
temp_a3 = player + (arg2 * 2);
|
||||
temp_a3->unk48 = atan2s(player->pos[0] - arg1->unk0, player->pos[2] - arg1->unk8);
|
||||
player->unk_244[arg2] = (u16) ((s32) ((player->unk_02E + (s16) temp_a3->unk48 + player->unk_0C0) & 0xFFFF) / 128);
|
||||
player->unk_048[arg2] = atan2s(player->pos[0] - camera->pos[0], player->pos[2] - camera->pos[2]);
|
||||
player->unk_244[arg2] = (u16) ((s32) ((player->unk_02C[1] + player->unk_048[arg2] + player->unk_0C0) & 0xFFFF) / 128);
|
||||
temp_v1 = player->unk_0BC;
|
||||
temp_f0 = player->unk_230 - player->unk_23C;
|
||||
temp_f2 = D_800DDBD4[player->characterId] * 18.0f * player->unk_224;
|
||||
@@ -835,7 +835,7 @@ void func_8002934C(Player *player, struct Camera *arg1, s8 arg2, s8 arg3) {
|
||||
}
|
||||
sp24 = temp_a3;
|
||||
func_80029200(player, arg2);
|
||||
temp_a0 = (player->unk_02E + temp_a3->unk48 + player->unk_0C0) & 0xFFFF;
|
||||
temp_a0 = (player->unk_02C[1] + temp_a3->unk48 + player->unk_0C0) & 0xFFFF;
|
||||
sp20 = temp_a0;
|
||||
sp28 = sins((u16) temp_a0);
|
||||
move_s16_towards(temp_a3 + 0x50, (s16) (s32) ((coss((u16) temp_a0) * (f32) temp_a3->unkCC) + ((f32) temp_a3->unkD4 * sp28)), 0.5f);
|
||||
@@ -868,7 +868,7 @@ block_28:
|
||||
if (((player->unk_0BC & 8) == 8) && ((player->unk_0CA & 2) == 2)) {
|
||||
temp_a3->unk50 = 0;
|
||||
}
|
||||
temp_t9 = (player->unk_02E + temp_a3->unk48 + player->unk_0C0) & 0xFFFF;
|
||||
temp_t9 = (player->unk_02C[1] + temp_a3->unk48 + player->unk_0C0) & 0xFFFF;
|
||||
if (((player->unk_0BC & 0x80) == 0x80) || ((player->unk_0BC & 0x40) == 0x40) || ((player->unk_0BC & 0x80000) == 0x80000) || ((player->unk_0BC & 0x800000) == 0x800000) || ((player->unk_0BC & 0x20000) == 0x20000) || (player->unk_044 & 0x800)) {
|
||||
if (temp_t9 >= 0x7FF9) {
|
||||
temp_t6 = ((s32) (-temp_t9 & 0xFFFF) / var_a1) & 0xFFFF;
|
||||
@@ -902,7 +902,7 @@ block_28:
|
||||
if (((temp_v1_5 & 0x80000) == 0x80000) || ((temp_v1_5 & 0x800000) == 0x800000) || (player->unk_044 & 0x800)) {
|
||||
temp_a3->unk24C = 4U;
|
||||
}
|
||||
if (((player->unk_0BC & 0x400) == 0x400) || ((player->unk_0BC & 0x01000000) == 0x01000000) || ((player->unk_0BC & 0x02000000) == 0x02000000) || ((player->unk_0BC << 0xF) < 0) || (player->unk_0BC & 0x80) || (player->unk_0BC & 0x40)) {
|
||||
if (((player->unk_0BC & 0x400) == 0x400) || ((player->unk_0BC & 0x01000000) == 0x01000000) || ((player->unk_0BC & 0x02000000) == 0x02000000) || (player->unk_0BC & 0x10000) || (player->unk_0BC & 0x80) || (player->unk_0BC & 0x40)) {
|
||||
var_a2 = 1 << temp_t3;
|
||||
player->unk_002 |= var_a2;
|
||||
temp_t9_2 = arg3 * 2;
|
||||
@@ -935,7 +935,6 @@ block_28:
|
||||
player->unk_002 |= var_a2;
|
||||
}
|
||||
}
|
||||
/* Warning: struct Camera is not defined (only forward-declared) */
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002934C.s")
|
||||
#endif
|
||||
@@ -5551,140 +5550,119 @@ void func_80036C5C(Player *arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
void func_80036CB4(Player *player) {
|
||||
s32 var_v0;
|
||||
s32 var_v0_2;
|
||||
s32 var_v1;
|
||||
s32 test;
|
||||
|
||||
var_v0 = player->unk_0BC;
|
||||
var_v1 = var_v0 & 0x10;
|
||||
if ((var_v1 == 0x10) && ((player->unk_000 & 0x4000) == 0x4000)) {
|
||||
var_v0_2 = (s16) player->unk_0C0 / 182;
|
||||
if (var_v0_2 > 0) {
|
||||
var_v0_2 = (s16) player->unk_0C0 / 182;
|
||||
player->unk_07C = (((s32) ((((s32) player->unk_07C >> 0x10) * 0xD) + 0x2B1) / 106) + 0x28) << 0x10;
|
||||
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_000 & 0x4000) == 0x4000)) {
|
||||
if ((player->unk_0C0 / 182) > 0) {
|
||||
test = ((((player->unk_07C >> 0x10) * 0xD) + 0x2B1) / 106) + 0x28;
|
||||
player->unk_07C = test << 0x10;
|
||||
}
|
||||
if (var_v0_2 < 0) {
|
||||
player->unk_07C = (((s32) ((((s32) player->unk_07C >> 0x10) * 0xD) + 0x2B1) / 106) - 0x35) << 0x10;
|
||||
if ((player->unk_0C0 / 182) < 0) {
|
||||
test = ((((player->unk_07C >> 0x10) * 0xD) + 0x2B1) / 106) - 0x35;
|
||||
player->unk_07C = test << 0x10;
|
||||
}
|
||||
var_v0 = player->unk_0BC & ~0x10;
|
||||
player->unk_0BC = var_v0;
|
||||
var_v1 = var_v0 & 0x10;
|
||||
player->unk_0BC &= ~0x10;
|
||||
}
|
||||
if ((var_v1 == 0x10) && ((player->unk_000 & 0x4000) != 0x4000)) {
|
||||
player->unk_0BC = var_v0 & ~0x10;
|
||||
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_000 & 0x4000) != 0x4000)) {
|
||||
player->unk_0BC &= ~0x10;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80036CB4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
void func_80036DB4(Player *player, f32 *arg1, f32 *arg2) {
|
||||
#ifdef NEEDS_RODATA
|
||||
// data_0DD0A0_3_0_0.s
|
||||
extern f64 D_800EDD90;// = 0.02;
|
||||
extern f64 D_800EDD98;// = 0.01;
|
||||
extern f64 D_800EDDA0;// = 0.05;
|
||||
extern f64 D_800EDDA8;// = 0.1;
|
||||
extern f64 D_800EDDB0;// = 0.15;
|
||||
extern f64 D_800EDDB8;// = 0.1;
|
||||
extern f64 D_800EDDC0;// = 0.05;
|
||||
|
||||
void func_80036DB4(Player *player, Vec3f arg1, Vec3f arg2) {
|
||||
s16 thing;
|
||||
s16 stackPadding0;
|
||||
f32 sp20;
|
||||
f32 var_f14;
|
||||
f32 var_f18;
|
||||
f32 var_f2;
|
||||
f64 var_f10;
|
||||
s16 var_v0;
|
||||
s32 temp_a0;
|
||||
s32 temp_t0;
|
||||
s32 temp_t6;
|
||||
|
||||
temp_t0 = player->unk_0BC;
|
||||
if (((temp_t0 & 0x1000) == 0x1000) || ((temp_t0 & 0x20) == 0x20)) {
|
||||
arg1->unk0 = 0.0f;
|
||||
arg1->unk4 = 0.0f;
|
||||
arg1->unk8 = 0.0f;
|
||||
func_802B63B8(arg1, (f32 (*)[3]) player->unk_174[0]);
|
||||
if (((player->unk_0BC & 0x1000) == 0x1000) || ((player->unk_0BC & 0x20) == 0x20)) {
|
||||
arg1[0] = 0.0f;
|
||||
arg1[1] = 0.0f;
|
||||
arg1[2] = 0.0f;
|
||||
func_802B63B8(arg1, player->unk_174);
|
||||
} else {
|
||||
temp_a0 = temp_t0 & 0x10;
|
||||
if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) {
|
||||
var_f14 = -player->unk_20C;
|
||||
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
|
||||
var_f18 = player->unk_208 + (var_f2 * 3.0f) + (var_f14 * 10.0f);
|
||||
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_0BC & 2) != 2)) {
|
||||
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 3.0f) + (-player->unk_20C * 10.0f);
|
||||
sp20 = player->unk_084 * 3.0f;
|
||||
} else if (!(temp_t0 & 0x800) && !(player->unk_044 & 0x4000)) {
|
||||
var_v0 = player->unk_0FA;
|
||||
if (var_v0 > 0) {
|
||||
var_v0 *= -1;
|
||||
} else if (!(player->unk_0BC & 0x800) && !(player->unk_044 & 0x4000)) {
|
||||
thing = player->unk_0FA;
|
||||
if (thing > 0) {
|
||||
thing *= -1;
|
||||
}
|
||||
temp_t6 = (s32) player->unk_07C >> 0x10;
|
||||
temp_t6 = player->unk_07C >> 0x10;
|
||||
if ((temp_t6 < 0x15) && (temp_t6 >= -0x14)) {
|
||||
if (var_v0 < 0x14) {
|
||||
var_f14 = -player->unk_20C;
|
||||
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
|
||||
var_f10 = (f64) (player->unk_208 + (var_f2 / 3.0f)) + ((f64) -player->unk_09C * 0.02) + (f64) (var_f14 * 50.0f);
|
||||
goto block_16;
|
||||
if (thing < 0x14) {
|
||||
var_f18 = (player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) + (-player->unk_09C * 0.02) + (-player->unk_20C * 50.0f);
|
||||
} else {
|
||||
var_f18 = (player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) + ((temp_t6 * 0.01) + (-player->unk_09C * 0.05)) + (-player->unk_20C * 50.0f);
|
||||
}
|
||||
var_f14 = -player->unk_20C;
|
||||
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
|
||||
var_f18 = (f32) ((f64) (player->unk_208 + (var_f2 / 3.0f)) + (((f64) temp_t6 * 0.01) + ((f64) -player->unk_09C * 0.05)) + (f64) (var_f14 * 50.0f));
|
||||
} else {
|
||||
var_f14 = -player->unk_20C;
|
||||
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
|
||||
var_f10 = (f64) (player->unk_208 + (var_f2 / 3.0f)) + (((f64) temp_t6 * 0.1) + ((f64) -player->unk_09C * 0.15)) + (f64) (var_f14 * 50.0f);
|
||||
block_16:
|
||||
var_f18 = (f32) var_f10;
|
||||
var_f18 = (player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) + ((temp_t6 * 0.1) + (-player->unk_09C * 0.15)) + (-player->unk_20C * 50.0f);
|
||||
}
|
||||
sp20 = player->unk_084;
|
||||
} else {
|
||||
var_f14 = -player->unk_20C;
|
||||
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
|
||||
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 1.5) + (((player->unk_07C >> 0x10) * 0.1) + (-player->unk_09C * 0.05)) + (-player->unk_20C * 50.0f);
|
||||
sp20 = player->unk_084;
|
||||
var_f18 = (f32) ((f64) player->unk_208 + ((f64) var_f2 * 1.5) + (((f64) ((s32) player->unk_07C >> 0x10) * 0.1) + ((f64) -player->unk_09C * 0.05)) + (f64) (var_f14 * 50.0f));
|
||||
}
|
||||
if ((temp_t0 & 0x200) == 0x200) {
|
||||
if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) {
|
||||
var_f18 = player->unk_208 + (var_f2 * 3.0f) + (var_f14 * 10.0f);
|
||||
if ((player->unk_0BC & 0x200) == 0x200) {
|
||||
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_0BC & 2) != 2)) {
|
||||
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 3.0f) + (-player->unk_20C * 10.0f);
|
||||
sp20 = player->unk_084 * 3.0f;
|
||||
} else {
|
||||
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f);
|
||||
sp20 = player->unk_084;
|
||||
var_f18 = player->unk_208 + (var_f2 / 3.0f);
|
||||
}
|
||||
}
|
||||
arg1->unk4 = 0.0f;
|
||||
arg1->unk0 = (player->unk_090 + var_f18) * player->unk_094;
|
||||
arg1->unk8 = (f32) (player->unk_094 * sp20);
|
||||
func_802B63B8(arg1, (f32 (*)[3]) player->unk_174[0]);
|
||||
arg1[0] = (player->unk_090 + var_f18) * player->unk_094;
|
||||
arg1[1] = 0.0f;
|
||||
arg1[2] = player->unk_094 * sp20;
|
||||
func_802B63B8(arg1, player->unk_174);
|
||||
}
|
||||
arg2->unk0 = arg1->unk0;
|
||||
arg2->unk4 = (f32) arg1->unk4;
|
||||
arg2->unk8 = (f32) arg1->unk8;
|
||||
arg2[0] = arg1[0];
|
||||
arg2[1] = arg1[1];
|
||||
arg2[2] = arg1[2];
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80036DB4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
#ifdef NEEDS_RODATA
|
||||
// data_0DD0A0_3_0_0.s
|
||||
extern f64 D_800EDDC8;// = 0.02;
|
||||
extern f64 D_800EDDD0;// = 0.01;
|
||||
extern f64 D_800EDDD8;// = 0.05;
|
||||
extern f64 D_800EDDE0;// = 0.1;
|
||||
extern f64 D_800EDDE8;// = 0.15;
|
||||
extern f64 D_800EDDF0;// = 0.1;
|
||||
extern f64 D_800EDDF8;// = 0.05;
|
||||
|
||||
void func_800371F4(Player *player, f32 *arg1, f32 *arg2) {
|
||||
f32 sp20;
|
||||
f32 var_f14;
|
||||
f32 var_f18;
|
||||
f32 var_f2;
|
||||
s16 var_v0;
|
||||
s32 temp_a0;
|
||||
s32 temp_t0;
|
||||
f32 sp20;
|
||||
f32 var_f18;
|
||||
s32 temp_t6;
|
||||
|
||||
temp_t0 = player->unk_0BC;
|
||||
if (((temp_t0 & 0x1000) == 0x1000) || ((temp_t0 & 0x20) == 0x20)) {
|
||||
arg1->unk0 = 0.0f;
|
||||
arg1->unk4 = 0.0f;
|
||||
arg1->unk8 = 0.0f;
|
||||
func_802B63B8(arg1, (f32 (*)[3]) player->unk_174[0]);
|
||||
if (((player->unk_0BC & 0x1000) == 0x1000) || ((player->unk_0BC & 0x20) == 0x20)) {
|
||||
arg1[0] = 0.0f;
|
||||
arg1[1] = 0.0f;
|
||||
arg1[2] = 0.0f;
|
||||
func_802B63B8(arg1, player->unk_174);
|
||||
} else {
|
||||
temp_a0 = temp_t0 & 0x10;
|
||||
if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) {
|
||||
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
|
||||
var_f14 = -player->unk_20C * 50.0f;
|
||||
var_f18 = player->unk_208 + (var_f2 * 3.0f) + var_f14;
|
||||
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_0BC & 2) != 2)) {
|
||||
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 3.0f) + (-player->unk_20C * 50.0f);
|
||||
sp20 = player->unk_084 * 3.0f;
|
||||
} else if (!(temp_t0 & 0x800) && !(player->unk_044 & 0x4000)) {
|
||||
} else if (!(player->unk_0BC & 0x800) && !(player->unk_044 & 0x4000)) {
|
||||
var_v0 = player->unk_0FA;
|
||||
if (var_v0 > 0) {
|
||||
var_v0 *= -1;
|
||||
@@ -5692,43 +5670,35 @@ void func_800371F4(Player *player, f32 *arg1, f32 *arg2) {
|
||||
temp_t6 = (s32) player->unk_07C >> 0x10;
|
||||
if ((temp_t6 < 0x15) && (temp_t6 >= -0x14)) {
|
||||
if (var_v0 < 0x14) {
|
||||
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
|
||||
var_f14 = -player->unk_20C * 50.0f;
|
||||
var_f18 = (f32) ((f64) (player->unk_208 + (var_f2 / 3.0f)) + ((f64) -player->unk_09C * 0.02) + (f64) var_f14);
|
||||
var_f18 = (player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) + (-player->unk_09C * 0.02) + (-player->unk_20C * 50.0f);
|
||||
} else {
|
||||
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
|
||||
var_f14 = -player->unk_20C * 50.0f;
|
||||
var_f18 = (f32) (((f64) (player->unk_208 + (var_f2 / 3.0f)) - (((f64) temp_t6 * 0.01) + ((f64) player->unk_09C * 0.05))) + (f64) var_f14);
|
||||
var_f18 = ((player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) - ((temp_t6 * 0.01) + (player->unk_09C * 0.05))) + (-player->unk_20C * 50.0f);
|
||||
}
|
||||
} else {
|
||||
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
|
||||
var_f14 = -player->unk_20C * 50.0f;
|
||||
var_f18 = (f32) (((f64) (player->unk_208 + (var_f2 / 3.0f)) - (((f64) temp_t6 * 0.1) + ((f64) player->unk_09C * 0.15))) + (f64) var_f14);
|
||||
var_f18 = ((player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) - ((temp_t6 * 0.1) + (player->unk_09C * 0.15))) + (-player->unk_20C * 50.0f);
|
||||
}
|
||||
sp20 = player->unk_084;
|
||||
} else {
|
||||
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
|
||||
var_f14 = -player->unk_20C * 50.0f;
|
||||
var_f18 = ((player->unk_208 + ((f64) (-(player->unk_094 / 18.0f) * 216.0f) * 1.5)) - (((player->unk_07C >> 0x10) * 0.1) + (player->unk_09C * 0.05))) + (-player->unk_20C * 50.0f);
|
||||
sp20 = player->unk_084;
|
||||
var_f18 = (f32) ((((f64) player->unk_208 + ((f64) var_f2 * 1.5)) - (((f64) ((s32) player->unk_07C >> 0x10) * 0.1) + ((f64) player->unk_09C * 0.05))) + (f64) var_f14);
|
||||
}
|
||||
if ((temp_t0 & 0x200) == 0x200) {
|
||||
if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) {
|
||||
var_f18 = player->unk_208 + (var_f2 * 3.0f) + var_f14;
|
||||
if ((player->unk_0BC & 0x200) == 0x200) {
|
||||
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_0BC & 2) != 2)) {
|
||||
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 3.0f) + (-player->unk_20C * 50.0f);
|
||||
sp20 = player->unk_084 * 3.0f;
|
||||
} else {
|
||||
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f);
|
||||
sp20 = player->unk_084;
|
||||
var_f18 = player->unk_208 + (var_f2 / 3.0f);
|
||||
}
|
||||
}
|
||||
arg1->unk4 = 0.0f;
|
||||
arg1->unk0 = -(player->unk_090 + var_f18) * player->unk_094;
|
||||
arg1->unk8 = (f32) (player->unk_094 * sp20);
|
||||
func_802B63B8(arg1, (f32 (*)[3]) player->unk_174[0]);
|
||||
arg1[0] = -(player->unk_090 + var_f18) * player->unk_094;
|
||||
arg1[1] = 0.0f;
|
||||
arg1[2] = player->unk_094 * sp20;
|
||||
func_802B63B8(arg1, player->unk_174);
|
||||
}
|
||||
arg2->unk0 = arg1->unk0;
|
||||
arg2->unk4 = (f32) arg1->unk4;
|
||||
arg2->unk8 = (f32) arg1->unk8;
|
||||
arg2[0] = arg1[0];
|
||||
arg2[1] = arg1[1];
|
||||
arg2[2] = arg1[2];
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_800371F4.s")
|
||||
|
||||
@@ -51,6 +51,8 @@ void func_800332E8(Player*, s32);
|
||||
void func_800337CC(Player*, f32, s32);
|
||||
void func_80033850(Player*, f32);
|
||||
void func_80036C5C(Player*);
|
||||
void func_80036CB4(Player*);
|
||||
void func_80036DB4(Player*, Vec3f, Vec3f);
|
||||
void func_80037614(Player*, Vec3f, Vec3f);
|
||||
void func_8003777C(Player*, Vec3f, Vec3f);
|
||||
void func_800378E8(Player*, Vec3f, Vec3f);
|
||||
|
||||
+155
-158
@@ -190,25 +190,22 @@ void func_8006ED60() {
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern OSMesgQueue gDmaMesgQueue;
|
||||
extern void *gMainReceivedMesg;
|
||||
extern OSIoMesg gDmaIoMesg;
|
||||
extern s8 _other_texturesSegmentRomStart;
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
extern ? _other_texturesSegmentRomStart;
|
||||
|
||||
u8 *func_8006ED94(s32 arg0, u8 *arg1, u32 arg2, s32 arg3) {
|
||||
void *sp28;
|
||||
u32 temp_a1;
|
||||
void *temp_a0;
|
||||
s32 func_8006ED94(s32 *arg0, s32 arg1, s32 arg2, s32 arg3) {
|
||||
u8 *sp28;
|
||||
s32 temp_a1;
|
||||
u8 *temp_a0;
|
||||
|
||||
temp_a0 = arg1 + arg3;
|
||||
temp_a1 = (arg2 + 0xF) & ~0xF;
|
||||
arg2 = temp_a1;
|
||||
sp28 = temp_a0;
|
||||
osInvalDCache(temp_a0, temp_a1);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, (arg0 & 0xFFFFFF) + &_other_texturesSegmentRomStart, sp28, arg2, &gDmaMesgQueue);
|
||||
osInvalDCache(temp_a0, (u32) temp_a1);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, (u32) (((s32) arg0 & 0xFFFFFF) + &_other_texturesSegmentRomStart), sp28, (u32) arg2, &gDmaMesgQueue);
|
||||
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, 1);
|
||||
mio0decode(temp_a0, arg1);
|
||||
mio0decode(temp_a0, (u8 *) arg1);
|
||||
return arg1;
|
||||
}
|
||||
#else
|
||||
@@ -719,18 +716,25 @@ GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006F8CC.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_8006F008(); // extern
|
||||
void func_8006F8CC(); // extern
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
typedef struct {
|
||||
/* 0x00 */ char pad0[4];
|
||||
/* 0x04 */ f32 unk_04;
|
||||
/* 0x08 */ f32 unk8; /* inferred */
|
||||
/* 0x0C */ f32 unk_0C;
|
||||
/* 0x10 */ char pad10[0x10]; /* maybe part of unk_0C[5]? */
|
||||
} struct_D_8018CE10; /* size = 0x20 */
|
||||
|
||||
? func_8006F008(); /* extern */
|
||||
? func_8006F8CC(); /* extern */
|
||||
extern s32 D_801655D8;
|
||||
extern s32 D_801655E8;
|
||||
extern s32 D_801655F8;
|
||||
extern s32 D_80165608;
|
||||
extern s32 D_80165618;
|
||||
extern s32 D_80165628;
|
||||
extern s32 D_80165658;
|
||||
extern ? D_80165658;
|
||||
extern s16 D_801656F0;
|
||||
extern s16 D_80165730;
|
||||
extern s8 D_8016576A;
|
||||
extern s8 D_8016579C;
|
||||
extern s8 D_801657AE;
|
||||
@@ -754,14 +758,13 @@ extern s8 D_801658DC;
|
||||
extern s8 D_801658E4;
|
||||
extern s8 D_801658EC;
|
||||
extern s8 D_801658F4;
|
||||
extern s8 D_801658FE;
|
||||
extern ? D_8018CF28;
|
||||
extern ? D_8018CF50;
|
||||
extern ? D_8018CFAC;
|
||||
extern ? D_8018CFB4;
|
||||
extern ? D_8018CFBC;
|
||||
extern ? D_8018CFC4;
|
||||
extern f32 D_8018D050;
|
||||
extern ? D_8018D050;
|
||||
extern ? D_8018D0F0;
|
||||
extern s32 D_8018D114;
|
||||
extern s32 D_8018D160;
|
||||
@@ -793,40 +796,35 @@ extern s32 D_8018D2A4;
|
||||
extern s32 D_8018D2AC;
|
||||
extern s32 D_8018D2B4;
|
||||
extern s32 D_8018D2BC;
|
||||
extern s32 D_8018D2C8;
|
||||
extern ? D_8018D2C8;
|
||||
extern s16 D_8018D2F0;
|
||||
extern s16 D_8018D2F8;
|
||||
extern s32 D_8018D320;
|
||||
|
||||
void func_8006FA94(void) {
|
||||
? *temp_a1;
|
||||
? *temp_a2;
|
||||
? *temp_v1;
|
||||
s16 temp_a0_2;
|
||||
? *var_a0_2;
|
||||
? *var_a1;
|
||||
? *var_a1_2;
|
||||
? *var_a2;
|
||||
? *var_a2_2;
|
||||
? *var_a3;
|
||||
? *var_t0;
|
||||
? *var_v1;
|
||||
Player *temp_v0_3;
|
||||
Player *temp_v0_4;
|
||||
Player *temp_v0_5;
|
||||
Player *var_v0;
|
||||
s16 temp_t7;
|
||||
s16 var_a0;
|
||||
s32 temp_t6;
|
||||
s32 temp_v0;
|
||||
s32 temp_v0_2;
|
||||
s8 temp_ra;
|
||||
u32 temp_a0;
|
||||
void *temp_v0_3;
|
||||
void *temp_v0_4;
|
||||
void *temp_v0_5;
|
||||
? *phi_v1;
|
||||
? *phi_a1;
|
||||
? *phi_a2;
|
||||
? *phi_a0;
|
||||
? *phi_a1_2;
|
||||
? *phi_a2_2;
|
||||
struct_D_8018CE10 *phi_v1_2;
|
||||
s16 phi_a0_2;
|
||||
? *phi_a3;
|
||||
Player *phi_v0;
|
||||
? *phi_t0;
|
||||
struct_D_8018CE10 *var_v1_2;
|
||||
|
||||
func_8006F8CC();
|
||||
func_8006F008();
|
||||
osSetTime(0, 0);
|
||||
osSetTime(/* u64+0x0 */ 0, /* u64+0x4 */ 0);
|
||||
D_8018D170 = 0;
|
||||
D_8018D190 = 0;
|
||||
D_8018D188 = 0;
|
||||
@@ -850,94 +848,95 @@ void func_8006FA94(void) {
|
||||
D_80165658.unk0 = 0;
|
||||
temp_ra = D_8018EDF3;
|
||||
D_801658BC = D_801658C6;
|
||||
if (temp_ra != ONE_PLAYERS_SELECTED) {
|
||||
if (temp_ra != TWO_PLAYERS_SELECTED) {
|
||||
if (temp_ra != THREE_PLAYERS_SELECTED) {
|
||||
if (temp_ra != FOUR_PLAYERS_SELECTED) {
|
||||
|
||||
} else {
|
||||
if (gModeSelection == VERSUS) {
|
||||
D_8018D114 = 0xA;
|
||||
D_8018D178 = 0x1E;
|
||||
D_8018D180 = 0x1E;
|
||||
} else {
|
||||
D_8018D114 = 0xB;
|
||||
D_8018D178 = 0x1E;
|
||||
D_8018D180 = 0x1E;
|
||||
}
|
||||
D_8018D2AC = 0xA;
|
||||
}
|
||||
} else if (gModeSelection == VERSUS) {
|
||||
D_8018D114 = 8;
|
||||
D_8018D178 = 0x64;
|
||||
D_8018D180 = 0x96;
|
||||
D_8018D2AC = 0x3C;
|
||||
} else {
|
||||
D_8018D180 = 9;
|
||||
D_8018D178 = 0x64;
|
||||
D_8018D180 = 0x96;
|
||||
D_8018D2AC = 0x3C;
|
||||
}
|
||||
} else if (gScreenModeSelection == SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL) {
|
||||
switch (temp_ra) { /* irregular */
|
||||
case 1:
|
||||
if (gModeSelection == 0) {
|
||||
D_8018D114 = 0;
|
||||
D_8018D178 = 0x00000096;
|
||||
D_8018D114 = 0x000000F0;
|
||||
} else {
|
||||
D_8018D114 = 1;
|
||||
D_8018D178 = 0x0000000A;
|
||||
D_8018D180 = 0;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (gScreenModeSelection == 1) {
|
||||
temp_v0 = gModeSelection;
|
||||
if (temp_v0 == GRAND_PRIX) {
|
||||
if (temp_v0 == 0) {
|
||||
D_8018D114 = 2;
|
||||
D_8018D178 = 0x96;
|
||||
D_8018D180 = 0xF0;
|
||||
D_8018D2AC = 0x3C;
|
||||
} else if (temp_v0 == VERSUS) {
|
||||
D_8018D178 = 0x00000096;
|
||||
D_8018D180 = 0x000000F0;
|
||||
D_8018D2AC = 0x0000003C;
|
||||
} else if (temp_v0 == 2) {
|
||||
D_8018D114 = 3;
|
||||
D_8018D178 = 0x1E;
|
||||
D_8018D180 = 0x1E;
|
||||
D_8018D2AC = 0x3C;
|
||||
D_8018D178 = 0x0000001E;
|
||||
D_8018D180 = 0x0000001E;
|
||||
D_8018D2AC = 0x0000003C;
|
||||
} else {
|
||||
D_8018D114 = 4;
|
||||
D_8018D178 = 0x28;
|
||||
D_8018D180 = 0x28;
|
||||
D_8018D2AC = 0x3C;
|
||||
D_8018D178 = 0x00000028;
|
||||
D_8018D180 = 0x00000028;
|
||||
D_8018D2AC = 0x0000003C;
|
||||
}
|
||||
} else {
|
||||
temp_v0_2 = gModeSelection;
|
||||
if (temp_v0_2 == GRAND_PRIX) {
|
||||
if (temp_v0_2 == 0) {
|
||||
D_8018D114 = 5;
|
||||
} else if (temp_v0_2 == VERSUS) {
|
||||
} else if (temp_v0_2 == 2) {
|
||||
D_8018D114 = 6;
|
||||
} else {
|
||||
D_8018D114 = 7;
|
||||
}
|
||||
}
|
||||
} else if (gModeSelection == GRAND_PRIX) {
|
||||
D_8018D114 = 0;
|
||||
D_8018D178 = 0x96;
|
||||
D_8018D114 = 0xF0;
|
||||
} else {
|
||||
D_8018D114 = 1;
|
||||
D_8018D178 = 0xA;
|
||||
D_8018D180 = 0;
|
||||
break;
|
||||
case 3:
|
||||
if (gModeSelection == 2) {
|
||||
D_8018D114 = 8;
|
||||
D_8018D178 = 0x00000064;
|
||||
D_8018D180 = 0x00000096;
|
||||
D_8018D2AC = 0x0000003C;
|
||||
} else {
|
||||
D_8018D180 = 9;
|
||||
D_8018D178 = 0x00000064;
|
||||
D_8018D180 = 0x00000096;
|
||||
D_8018D2AC = 0x0000003C;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (gModeSelection == 2) {
|
||||
D_8018D114 = 0x0000000A;
|
||||
D_8018D178 = 0x0000001E;
|
||||
D_8018D180 = 0x0000001E;
|
||||
} else {
|
||||
D_8018D114 = 0x0000000B;
|
||||
D_8018D178 = 0x0000001E;
|
||||
D_8018D180 = 0x0000001E;
|
||||
}
|
||||
D_8018D2AC = 0x0000000A;
|
||||
break;
|
||||
}
|
||||
if (gEnableDebugMode == 0) {
|
||||
D_8016576A = 0;
|
||||
D_8016579C = 0;
|
||||
}
|
||||
var_a0 = 0;
|
||||
if (temp_ra > 0) {
|
||||
phi_v1 = &D_8018CFBC;
|
||||
phi_a1 = &D_8018CFAC;
|
||||
phi_a2 = &D_8018CFC4;
|
||||
phi_a0 = &D_8018CFB4;
|
||||
var_a0_2 = &D_8018CFB4;
|
||||
var_a2 = &D_8018CFC4;
|
||||
var_a1 = &D_8018CFAC;
|
||||
var_v1 = &D_8018CFBC;
|
||||
do {
|
||||
temp_a0 = phi_a0 + 1;
|
||||
temp_v1 = phi_v1 + 1;
|
||||
temp_a1 = phi_a1 + 1;
|
||||
temp_a2 = phi_a2 + 1;
|
||||
temp_v1->unk-1 = 0;
|
||||
temp_a1->unk-1 = 0;
|
||||
temp_a2->unk-1 = 0;
|
||||
temp_a0->unk-1 = 0;
|
||||
phi_v1 = temp_v1;
|
||||
phi_a1 = temp_a1;
|
||||
phi_a2 = temp_a2;
|
||||
phi_a0 = temp_a0;
|
||||
} while (temp_a0 < (temp_ra + &D_8018CFB4));
|
||||
var_a0_2 += 1;
|
||||
var_v1 += 1;
|
||||
var_a1 += 1;
|
||||
var_a2 += 1;
|
||||
var_v1->unk-1 = 0;
|
||||
var_a1->unk-1 = 0;
|
||||
var_a2->unk-1 = 0;
|
||||
var_a0_2->unk-1 = 0;
|
||||
} while ((u32) var_a0_2 < (u32) (temp_ra + &D_8018CFB4));
|
||||
var_a0 = 0;
|
||||
}
|
||||
D_8018D204 = 1;
|
||||
D_8018D1FC = 0;
|
||||
@@ -961,8 +960,8 @@ void func_8006FA94(void) {
|
||||
D_801656F0 = 0;
|
||||
D_801657B2 = 0;
|
||||
D_801657D8 = D_801657B2;
|
||||
D_8018D214 = D_801657D8;
|
||||
D_801657B0 = D_8018D214;
|
||||
D_8018D214 = (s32) D_801657D8;
|
||||
D_801657B0 = (s8) D_8018D214;
|
||||
D_801657AE = D_801657B0;
|
||||
D_8018D20C = 0;
|
||||
D_8018D2F8 = 0;
|
||||
@@ -987,58 +986,56 @@ void func_8006FA94(void) {
|
||||
D_8018D16C = temp_t7;
|
||||
D_8018D17C = temp_t7;
|
||||
D_8018D174 = temp_t7;
|
||||
phi_a1_2 = &D_8018D050;
|
||||
phi_a2_2 = &D_8018D0F0;
|
||||
phi_v1_2 = D_8018CE10;
|
||||
phi_a0_2 = 0;
|
||||
phi_a3 = &D_8018CF50;
|
||||
phi_v0 = gPlayerOne;
|
||||
phi_t0 = &D_8018CF28;
|
||||
var_v0 = gPlayerOne;
|
||||
var_t0 = &D_8018CF28;
|
||||
var_a3 = &D_8018CF50;
|
||||
var_v1_2 = D_8018CE10;
|
||||
var_a2_2 = &D_8018D0F0;
|
||||
var_a1_2 = &D_8018D050;
|
||||
do {
|
||||
phi_a1_2->unk0 = -32.0f;
|
||||
phi_a2_2->unk0 = -32.0f;
|
||||
phi_v1_2->unk_0C = 0.0f;
|
||||
phi_v1_2->unk_08 = 0.0f;
|
||||
phi_v1_2->unk_04 = 0.0f;
|
||||
phi_a3->unk0 = phi_a0_2;
|
||||
phi_t0->unk0 = phi_v0;
|
||||
phi_v0->unk_040 = -1;
|
||||
temp_v0_3 = phi_v0 + 0xDD8;
|
||||
phi_t0->unk4 = temp_v0_3;
|
||||
phi_a3->unk2 = phi_a0_2 + 1;
|
||||
phi_v1_2->unk24 = 0.0f;
|
||||
phi_v1_2->unk28 = 0.0f;
|
||||
phi_v1_2->unk2C = 0.0f;
|
||||
phi_a2_2->unk4 = -32.0f;
|
||||
phi_a1_2->unk4 = -32.0f;
|
||||
temp_v0_3->unk40 = -1;
|
||||
var_a1_2->unk0 = -32.0f;
|
||||
var_a2_2->unk0 = -32.0f;
|
||||
var_v1_2->unk_0C = 0.0f;
|
||||
var_v1_2->unk8 = 0.0f;
|
||||
var_v1_2->unk_04 = 0.0f;
|
||||
var_a3->unk0 = var_a0;
|
||||
var_t0->unk0 = var_v0;
|
||||
var_v0->unk_040 = -1;
|
||||
temp_v0_3 = var_v0 + 0xDD8;
|
||||
var_t0->unk4 = temp_v0_3;
|
||||
var_a3->unk2 = (s16) (var_a0 + 1);
|
||||
var_v1_2->unk24 = 0.0f;
|
||||
var_v1_2->unk28 = 0.0f;
|
||||
var_v1_2->unk2C = 0.0f;
|
||||
var_a2_2->unk4 = -32.0f;
|
||||
var_a1_2->unk4 = -32.0f;
|
||||
temp_v0_3->unk_040 = -1;
|
||||
temp_v0_4 = temp_v0_3 + 0xDD8;
|
||||
phi_a3->unk4 = phi_a0_2 + 2;
|
||||
phi_t0->unk8 = temp_v0_4;
|
||||
phi_v1_2->unk44 = 0.0f;
|
||||
phi_v1_2->unk48 = 0.0f;
|
||||
phi_v1_2->unk4C = 0.0f;
|
||||
phi_a2_2->unk8 = -32.0f;
|
||||
phi_a1_2->unk8 = -32.0f;
|
||||
temp_v0_4->unk40 = -1;
|
||||
var_a3->unk4 = (s16) (var_a0 + 2);
|
||||
var_t0->unk8 = temp_v0_4;
|
||||
var_v1_2->unk44 = 0.0f;
|
||||
var_v1_2->unk48 = 0.0f;
|
||||
var_v1_2->unk4C = 0.0f;
|
||||
var_a2_2->unk8 = -32.0f;
|
||||
var_a1_2->unk8 = -32.0f;
|
||||
temp_v0_4->unk_040 = -1;
|
||||
temp_v0_5 = temp_v0_4 + 0xDD8;
|
||||
phi_t0->unkC = temp_v0_5;
|
||||
phi_a3->unk6 = phi_a0_2 + 3;
|
||||
temp_a0_2 = phi_a0_2 + 4;
|
||||
phi_v1_2->unk64 = 0.0f;
|
||||
phi_v1_2->unk68 = 0.0f;
|
||||
phi_v1_2->unk6C = 0.0f;
|
||||
phi_a2_2->unkC = -32.0f;
|
||||
phi_a1_2->unkC = -32.0f;
|
||||
temp_v0_5->unk40 = -1;
|
||||
phi_a1_2 += 0x10;
|
||||
phi_a2_2 += 0x10;
|
||||
phi_v1_2 += 0x80;
|
||||
phi_a0_2 = temp_a0_2;
|
||||
phi_a3 += 8;
|
||||
phi_v0 = temp_v0_5 + 0xDD8;
|
||||
phi_t0 += 0x10;
|
||||
} while (temp_a0_2 != 8);
|
||||
var_t0->unkC = temp_v0_5;
|
||||
var_a3->unk6 = (s16) (var_a0 + 3);
|
||||
var_a0 += 4;
|
||||
var_v1_2->unk64 = 0.0f;
|
||||
var_v1_2->unk68 = 0.0f;
|
||||
var_v1_2->unk6C = 0.0f;
|
||||
var_a2_2->unkC = -32.0f;
|
||||
var_a1_2->unkC = -32.0f;
|
||||
temp_v0_5->unk_040 = -1;
|
||||
var_v0 = temp_v0_5 + 0xDD8;
|
||||
var_a1_2 += 0x10;
|
||||
var_a2_2 += 0x10;
|
||||
var_v1_2 += 0x80;
|
||||
var_a3 += 8;
|
||||
var_t0 += 0x10;
|
||||
} while (var_a0 != (s16) 8);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006FA94.s")
|
||||
|
||||
+122
-192
@@ -10,6 +10,7 @@
|
||||
#include "code_80057C60.h"
|
||||
#include "code_80071F00.h"
|
||||
#include "code_80086E70.h"
|
||||
#include "common_textures.h"
|
||||
|
||||
s32 find_unused_obj_index(s32* arg0) {
|
||||
s32 temp_v0;
|
||||
@@ -34,25 +35,12 @@ s32 find_unused_obj_index(s32* arg0) {
|
||||
return temp_v1;
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
//void func_80072428(s32, s32 *); // extern
|
||||
extern s8 D_80165CE2[];
|
||||
|
||||
void func_80071F6C(s32 arg0, s32 arg1) {
|
||||
s32 temp_a0;
|
||||
s32 temp_a1;
|
||||
|
||||
temp_a1 = arg0;
|
||||
temp_a0 = arg0;
|
||||
arg0 = temp_a1;
|
||||
func_80072428(arg0);
|
||||
D_80165CE2[0xE0] = 0;
|
||||
arg0 = -1;
|
||||
// Not actually sure about the pointer type, but its definitely SOME type of pointer
|
||||
void func_80071F6C(s32 *arg0) {
|
||||
func_80072428(*arg0);
|
||||
D_80165C18[*arg0].unk_0CA = 0;
|
||||
*arg0 = -1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80071F6C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
@@ -147,7 +135,7 @@ loop_3:
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80072044.s")
|
||||
#endif
|
||||
|
||||
void func_80072100(s32 arg0) {
|
||||
void func_80072100(s32 *arg0) {
|
||||
func_80071F6C(arg0);
|
||||
}
|
||||
|
||||
@@ -2776,62 +2764,50 @@ void func_80077428(s32 arg0) {
|
||||
func_80086E70(arg0);
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
void func_80077450(s32 objectIndex) {
|
||||
s16 stackPadding0;
|
||||
s16 sp3C;
|
||||
s16 sp3A;
|
||||
s16 sp38;
|
||||
s16 temp_v0;
|
||||
struct_80165C18_entry *temp_s0;
|
||||
|
||||
temp_s0 = &D_80165C18[objectIndex];
|
||||
temp_v0 = temp_s0->unk_0A6;
|
||||
switch (temp_v0) { /* irregular */
|
||||
switch (D_80165C18[objectIndex].unk_0A6) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
func_80077428(objectIndex);
|
||||
break;
|
||||
case 2:
|
||||
f32_step_up_towards(&temp_s0->unk_000, 0.1f, 0.01f);
|
||||
if ((temp_s0->unk_004[1] <= (f32) temp_s0->unk_084[5]) && (func_80073B00(objectIndex, &temp_s0->unk_0A0, 0x000000FF, 0, 0x00000010, 0, 0) != 0)) {
|
||||
f32_step_up_towards(&D_80165C18[objectIndex].unk_000, 0.1f, 0.01f);
|
||||
if ((D_80165C18[objectIndex].unk_004[1] <= D_80165C18[objectIndex].unk_084[5]) && (func_80073B00(objectIndex, &D_80165C18[objectIndex].unk_0A0, 0x000000FF, 0, 0x00000010, 0, 0) != 0)) {
|
||||
func_80086F60(objectIndex);
|
||||
func_80072428(objectIndex);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (temp_s0->unk_048 != 0) {
|
||||
temp_s0->unk_084[4] = (s16) ((s32) (temp_s0->unk_084[4] + 1) % 3);
|
||||
func_8005C6B4(temp_s0->unk8D, &sp3C, &sp3A, &sp38);
|
||||
temp_s0->unk_084[0] = sp3C;
|
||||
temp_s0->unk_084[1] = sp3A;
|
||||
temp_s0->unk_084[2] = sp38;
|
||||
if (D_80165C18[objectIndex].unk_048 != 0) {
|
||||
D_80165C18[objectIndex].unk_084[4] = (s16) ((s32) (D_80165C18[objectIndex].unk_084[4] + 1) % 3);
|
||||
func_8005C6B4(D_80165C18[objectIndex].unk_084[4], &sp3C, &sp3A, &sp38);
|
||||
D_80165C18[objectIndex].unk_084[0] = sp3C;
|
||||
D_80165C18[objectIndex].unk_084[1] = sp3A;
|
||||
D_80165C18[objectIndex].unk_084[2] = sp38;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80077450.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
#ifdef NEEDS_RODATA
|
||||
|
||||
void func_80077584(s32 objectIndex) {
|
||||
f64 temp_f0;
|
||||
s16 temp_v1;
|
||||
struct_80165C18_entry *temp_v0;
|
||||
|
||||
temp_v0 = &D_80165C18[objectIndex];
|
||||
temp_v1 = temp_v0->unk_0AE;
|
||||
if ((temp_v1 != 0) && (temp_v1 == 1) && ((u8) temp_v0->unk_0D8 != 0)) {
|
||||
temp_f0 = (f64) temp_v0->unk_038[1];
|
||||
if (temp_f0 >= -0.5) {
|
||||
temp_v0->unk_038[1] = (f32) (temp_f0 - 0.15);
|
||||
if ((temp_v0->unk_0AE != 0) && (temp_v0->unk_0AE == 1) && ((u8) temp_v0->unk_0D8 != 0)) {
|
||||
if (temp_v0->unk_038[1] >= -0.5) {
|
||||
temp_v0->unk_038[1] -= 0.15;
|
||||
} else {
|
||||
temp_v0->unk_038[2] = 0.0f;
|
||||
temp_v0->unk_038[0] = 0.0f;
|
||||
}
|
||||
}
|
||||
temp_v0->unk_0B2[2] = (u16) temp_v0->unk_0B2[2] + temp_v0->unk_084[3];
|
||||
temp_v0->unk_0B2[2] += temp_v0->unk_084[3];
|
||||
func_80087710(objectIndex);
|
||||
func_8008BF18(objectIndex);
|
||||
}
|
||||
@@ -2840,9 +2816,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80077584.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
void func_80077450(s32); /* extern */
|
||||
void func_80077584(s32); /* extern */
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
extern s32 D_8018C630;
|
||||
extern ? D_8018C830;
|
||||
|
||||
@@ -2860,7 +2834,7 @@ void func_80077640(void) {
|
||||
func_80077450(temp_s0);
|
||||
func_80077584(temp_s0);
|
||||
if (temp_s2->unk_0A6 == 0) {
|
||||
func_80072100((s32) var_s1);
|
||||
func_80072100(var_s1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2871,83 +2845,73 @@ void func_80077640(void) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80077640.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern s32 D_0D028DD8;
|
||||
s16 gCurrentCourseId; /* unable to generate initializer */
|
||||
#ifdef NEEDS_RODATA
|
||||
// data_0DD0A0_3_0.s
|
||||
extern f32 D_800EEB38;// = 0.1f;
|
||||
|
||||
void func_80077700(s32 objectIndex, f32 *arg1, s32 arg2) {
|
||||
void func_80077700(s32 objectIndex, Vec3f arg1, s32 arg2) {
|
||||
s32 stackPadding1;
|
||||
u16 stackPadding0;
|
||||
u16 temp_s0;
|
||||
u16 sp3E;
|
||||
u16 sp3C;
|
||||
struct_80165C18_entry *sp34;
|
||||
s16 temp_v1;
|
||||
s32 temp_s0;
|
||||
struct_80165C18_entry *temp_v0;
|
||||
|
||||
func_800723A4(objectIndex, 0);
|
||||
temp_v0 = &D_80165C18[objectIndex];
|
||||
temp_v0->unk_0D5 = 7;
|
||||
temp_v0->unk_060 = &D_0D028DD8;
|
||||
temp_v0->unk_068 = &D_0D028DD8;
|
||||
temp_v0->unk_000 = 0.1f;
|
||||
temp_v0->unk_044 = arg1->unk4;
|
||||
temp_v1 = gCurrentCourseId;
|
||||
switch (temp_v1) { /* irregular */
|
||||
case 0:
|
||||
sp34 = temp_v0;
|
||||
func_8008BD14(objectIndex, (s16) (s32) arg1->unk0, (s16) (s32) ((f64) arg1->unk4 + 25.0), (s16) (s32) arg1->unk8, (u16) 0x00000014, (u16) 0x0000001E, (u16) 0x00000014);
|
||||
temp_v0->unk_034 = 1.5f;
|
||||
temp_v0->unk_038[1] = 1.5f;
|
||||
D_80165C18[objectIndex].unk_0D5 = 7;
|
||||
D_80165C18[objectIndex].unk_060 = (s32 *) D_0D028DD8;
|
||||
D_80165C18[objectIndex].unk_068 = (s32 *) D_0D028DD8;
|
||||
D_80165C18[objectIndex].unk_000 = 0.1f;
|
||||
D_80165C18[objectIndex].unk_044 = arg1[1];
|
||||
switch (gCurrentCourseId) {
|
||||
case COURSE_MARIO_RACEWAY:
|
||||
func_8008BD14(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x00000014, 0x0000001E, 0x00000014);
|
||||
D_80165C18[objectIndex].unk_034 = 1.5f;
|
||||
D_80165C18[objectIndex].unk_038[1] = 1.5f;
|
||||
break;
|
||||
case 4:
|
||||
sp34 = temp_v0;
|
||||
func_8008BD14(objectIndex, (s16) (s32) arg1->unk0, (s16) (s32) ((f64) arg1->unk4 + 25.0), (s16) (s32) arg1->unk8, (u16) 0x00000014, (u16) 0x0000001E, (u16) 0x00000014);
|
||||
temp_v0->unk_034 = 2.0f;
|
||||
temp_v0->unk_038[1] = 2.0f;
|
||||
case COURSE_YOSHI_VALLEY:
|
||||
func_8008BD14(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x00000014, 0x0000001E, 0x00000014);
|
||||
D_80165C18[objectIndex].unk_034 = 2.0f;
|
||||
D_80165C18[objectIndex].unk_038[1] = 2.0f;
|
||||
break;
|
||||
case 7:
|
||||
sp34 = temp_v0;
|
||||
func_8008BD14(objectIndex, (s16) (s32) arg1->unk0, (s16) (s32) ((f64) arg1->unk4 + 30.0), (s16) (s32) arg1->unk8, (u16) 0x00000010, (u16) 0x00000028, (u16) 0x00000010);
|
||||
temp_v0->unk_034 = 2.0f;
|
||||
temp_v0->unk_038[1] = 2.0f;
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
func_8008BD14(objectIndex, arg1[0], arg1[1] + 30.0, arg1[2], 0x00000010, 0x00000028, 0x00000010);
|
||||
D_80165C18[objectIndex].unk_034 = 2.0f;
|
||||
D_80165C18[objectIndex].unk_038[1] = 2.0f;
|
||||
break;
|
||||
case 8:
|
||||
sp34 = temp_v0;
|
||||
func_8008BD14(objectIndex, (s16) (s32) arg1->unk0, (s16) (s32) ((f64) arg1->unk4 + 25.0), (s16) (s32) arg1->unk8, (u16) 0x00000014, (u16) 0x0000001E, (u16) 0x00000014);
|
||||
temp_v0->unk_034 = 1.5f;
|
||||
temp_v0->unk_038[1] = 1.0f;
|
||||
case COURSE_LUIGI_RACEWAY:
|
||||
func_8008BD14(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x00000014, 0x0000001E, 0x00000014);
|
||||
D_80165C18[objectIndex].unk_034 = 1.5f;
|
||||
D_80165C18[objectIndex].unk_038[1] = 1.0f;
|
||||
break;
|
||||
}
|
||||
temp_s0 = (random_int(0x0010U) << 0xC) & 0xFFFF;
|
||||
temp_s0 = random_int(0x0010U) << 0xC;
|
||||
sp3E = random_int(0x0010U) << 0xC;
|
||||
sp3C = random_int(0x0010U) << 0xC;
|
||||
func_8008B888(objectIndex, 0U, ((s32) (arg2 * 0xFFFF) / 20) & 0xFFFF, 0U);
|
||||
func_8008B8BC(objectIndex, temp_s0 & 0xFFFF, sp3E, sp3C);
|
||||
func_8008B888(objectIndex, 0U, (arg2 * 0xFFFF) / 20, 0U);
|
||||
func_8008B8BC(objectIndex, temp_s0, sp3E, sp3C);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80077700.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 func_80072044(? *, ? *, ?); // extern
|
||||
void func_80077700(s32, s32, s32); // extern
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
extern s32 D_80183E7C;
|
||||
extern s32 D_8018C970;
|
||||
|
||||
s32 func_80077A54(s32 arg0, s32 arg1) {
|
||||
s32 func_80077A54(Vec3f arg0, s32 arg1) {
|
||||
s32 sp1C;
|
||||
s32 temp_v0;
|
||||
s32 phi_a0;
|
||||
s32 var_a0;
|
||||
|
||||
temp_v0 = func_80072044(&D_8018C970, &D_80183E7C, 0x40);
|
||||
phi_a0 = temp_v0;
|
||||
temp_v0 = func_80072044(&D_8018C970, &D_80183E7C, 0x00000040);
|
||||
var_a0 = temp_v0;
|
||||
if (temp_v0 != -1) {
|
||||
sp1C = temp_v0;
|
||||
func_80077700(temp_v0, arg0, arg1);
|
||||
phi_a0 = sp1C;
|
||||
func_80077700(var_a0, arg0, arg1);
|
||||
var_a0 = sp1C;
|
||||
}
|
||||
return phi_a0;
|
||||
return var_a0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80077A54.s")
|
||||
@@ -3081,22 +3045,20 @@ loop_3:
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80077D5C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern Vtx D_0D005770;
|
||||
extern s32 D_0D0293D8;
|
||||
#ifdef NEEDS_RODATA
|
||||
// data_0DD0A0_3_0.s
|
||||
extern f32 D_800EEB3C;// = 0.15f;
|
||||
|
||||
void func_80077E20(s32 objectIndex) {
|
||||
struct_80165C18_entry *sp18;
|
||||
struct_80165C18_entry *temp_v0;
|
||||
|
||||
temp_v0 = &D_80165C18[objectIndex];
|
||||
temp_v0->unk_064 = &D_0D0293D8;
|
||||
temp_v0->unk_06C = (s32) &D_0D0293D8;
|
||||
temp_v0->unk_074 = (s32) &D_0D005770;
|
||||
temp_v0->unk_064 = D_0D0293D8;
|
||||
temp_v0->unk_06C = D_0D0293D8;
|
||||
// There's something up with the handling of D_0D005770 and the loading of 0x10 right here
|
||||
temp_v0->unk_074 = D_0D005770;
|
||||
temp_v0->unk_0DA = 0x10;
|
||||
temp_v0->unk_0D9 = 0x10;
|
||||
sp18 = temp_v0;
|
||||
temp_v0->unk_0D9 = temp_v0->unk_0DA;
|
||||
temp_v0->unk_000 = 0.15f;
|
||||
func_800721C0(objectIndex, 0x00000010);
|
||||
func_80086EF0(objectIndex);
|
||||
@@ -3250,10 +3212,9 @@ void func_80078170(s32 arg0, ? arg1) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80078170.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
extern Vtx D_0D005770;
|
||||
extern s32 D_0D0293D8;
|
||||
#ifdef NEEDS_RODATA
|
||||
// data_0DD0A0_3_0.x
|
||||
extern f32 D_800EEB48;// = 0.15f;
|
||||
|
||||
void func_80078220(s32 objectIndex) {
|
||||
struct_80165C18_entry *temp_v0;
|
||||
@@ -3271,7 +3232,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80078220.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
extern s32 gGamestate;
|
||||
|
||||
void func_80078288(s32 objectIndex) {
|
||||
@@ -5547,19 +5508,18 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007C280.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_8007BDA8(); // extern
|
||||
void func_8007C280(); // extern
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
? func_8007C280(); /* extern */
|
||||
|
||||
void func_8007C2F8(s32 arg0) {
|
||||
if (arg0 != 0) {
|
||||
if (arg0 != 1) {
|
||||
return;
|
||||
}
|
||||
switch (arg0) { /* irregular */
|
||||
case 0:
|
||||
func_8007BDA8();
|
||||
return;
|
||||
case 1:
|
||||
func_8007C280();
|
||||
return;
|
||||
}
|
||||
func_8007BDA8();
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007C2F8.s")
|
||||
@@ -5625,7 +5585,7 @@ UNUSED void func_8007C49C(void) {
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
void func_8007C4A4(s32 objectIndex) {
|
||||
struct_80165C18_entry *sp20;
|
||||
s32 sp1C;
|
||||
@@ -6282,10 +6242,8 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007D6A8.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 func_80072044(? *, ? *, ?); // extern
|
||||
void func_800723A4(s32, ?); // extern
|
||||
void func_8007D6A8(s32, s32); // extern
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
? func_8007D6A8(s32, s32); /* extern */
|
||||
extern s32 D_80183E4C;
|
||||
extern s32 D_80183E5C;
|
||||
extern s32 D_8018C3F0;
|
||||
@@ -6293,17 +6251,17 @@ extern s32 D_8018C630;
|
||||
|
||||
void func_8007D714(s32 arg0) {
|
||||
s32 sp1C;
|
||||
s32 phi_v0;
|
||||
s32 var_v0;
|
||||
|
||||
if (arg0 == 1) {
|
||||
phi_v0 = func_80072044(&D_8018C3F0, &D_80183E4C, 0x28);
|
||||
var_v0 = func_80072044(&D_8018C3F0, &D_80183E4C, 0x00000028);
|
||||
} else {
|
||||
phi_v0 = func_80072044(&D_8018C630, &D_80183E5C, 0x1E);
|
||||
var_v0 = func_80072044(&D_8018C630, &D_80183E5C, 0x0000001E);
|
||||
}
|
||||
if (phi_v0 != -1) {
|
||||
sp1C = phi_v0;
|
||||
func_800723A4(phi_v0, 0);
|
||||
func_8007D6A8(phi_v0, arg0);
|
||||
if (var_v0 != -1) {
|
||||
sp1C = var_v0;
|
||||
func_800723A4(var_v0, 0);
|
||||
func_8007D6A8(var_v0, arg0);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -8109,28 +8067,17 @@ void func_80080A14(s32 objectIndex, Player *player) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
void func_80080A4C(s32 objectIndex, s32 cameraPlayerId) {
|
||||
Camera *sp1C;
|
||||
Player *sp18;
|
||||
Player *temp_a3;
|
||||
struct_80165C18_entry *temp_v0;
|
||||
Camera *camera = &camera1[cameraPlayerId];
|
||||
Player *player = &gPlayerOne[cameraPlayerId];
|
||||
|
||||
sp1C = &camera1[cameraPlayerId];
|
||||
temp_a3 = &gPlayerOne[cameraPlayerId];
|
||||
if (gScreenModeSelection != 3) {
|
||||
sp18 = temp_a3;
|
||||
if ((func_80072320(objectIndex, 0x00000010) != 0) && (func_80088A58(objectIndex, temp_a3, 500.0f) != 0)) {
|
||||
func_8001CA10(sp1C);
|
||||
temp_v0 = &D_80165C18[objectIndex];
|
||||
func_800C98B8(temp_v0->unk_004, temp_v0->unk_038, 0x1900800FU);
|
||||
if ((func_80072320(objectIndex, 0x00000010) != 0) && (func_80088A58(objectIndex, player, 500.0f) != 0)) {
|
||||
func_8001CA10(camera);
|
||||
func_800C98B8(D_80165C18[objectIndex].unk_004, D_80165C18[objectIndex].unk_038, 0x1900800FU);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80080A4C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
@@ -10897,21 +10844,18 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80085F74.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_80073444(s32, void *, void *, ?, s32); // extern
|
||||
void func_80085BB4(s32); // extern
|
||||
void func_8008B7D4(f32, s32, s32); // extern
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
extern ? D_06007200;
|
||||
extern ? D_0600B000;
|
||||
extern ? D_800E6734;
|
||||
extern f32 D_8018D01C;
|
||||
f32 D_800E6734[0][3]; /* unable to generate initializer */
|
||||
|
||||
void func_80086074(s32 arg0, s32 arg1) {
|
||||
void *temp_v0;
|
||||
f32 *temp_v0;
|
||||
|
||||
temp_v0 = (arg1 * 0xC) + &D_800E6734;
|
||||
func_8008B7D4(temp_v0->unk0 * D_8018D01C, temp_v0->unk4, temp_v0->unk8);
|
||||
func_80073444(arg0, (arg1 << 9) + &D_06007200, (arg1 << 0xC) + &D_0600B000, 0x40, 0x40);
|
||||
temp_v0 = D_800E6734[arg1];
|
||||
func_8008B7D4(arg0, temp_v0->unk0 * D_8018D01C, temp_v0->unk4, temp_v0->unk8);
|
||||
func_80073444(arg0, (arg1 << 9) + &D_06007200, (arg1 << 0xC) + &D_0600B000, 0x40U, (u16) 0x00000040);
|
||||
func_80085BB4(arg0);
|
||||
}
|
||||
#else
|
||||
@@ -10936,40 +10880,26 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80086110.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_80085CA0(s32, s32); // extern
|
||||
void func_80085E38(s32, s32); // extern
|
||||
void func_80085F74(s32, s32); // extern
|
||||
void func_80086110(s32, s32, s32); // extern
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
? func_80085CA0(s32, s32); /* extern */
|
||||
? func_80085E38(s32, s32); /* extern */
|
||||
? func_80085F74(s32, s32); /* extern */
|
||||
? func_80086110(s32, s32, s32); /* extern */
|
||||
|
||||
void func_80086158(s32 arg0, s32 arg1) {
|
||||
s32 temp_a2;
|
||||
s32 phi_a2;
|
||||
|
||||
temp_a2 = arg1;
|
||||
phi_a2 = temp_a2;
|
||||
if (arg1 != 0) {
|
||||
if (arg1 != 1) {
|
||||
if (arg1 != 2) {
|
||||
|
||||
} else {
|
||||
arg1 = temp_a2;
|
||||
func_80085F74(arg0, temp_a2);
|
||||
goto block_7;
|
||||
}
|
||||
} else {
|
||||
arg1 = temp_a2;
|
||||
func_80085E38(arg0, temp_a2);
|
||||
goto block_7;
|
||||
}
|
||||
} else {
|
||||
arg1 = temp_a2;
|
||||
func_80085CA0(arg0, temp_a2);
|
||||
block_7:
|
||||
phi_a2 = arg1;
|
||||
switch (arg1) { /* irregular */
|
||||
case 0:
|
||||
func_80085CA0(arg0, arg1);
|
||||
break;
|
||||
case 1:
|
||||
func_80085E38(arg0, arg1);
|
||||
break;
|
||||
case 2:
|
||||
func_80085F74(arg0, arg1);
|
||||
break;
|
||||
}
|
||||
if (phi_a2 >= 3) {
|
||||
func_80086110(arg0, phi_a2 - 3, phi_a2);
|
||||
if (arg1 >= 3) {
|
||||
func_80086110(arg0, arg1 - 3, arg1);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
+8
-2
@@ -5,9 +5,9 @@
|
||||
#include "camera.h"
|
||||
|
||||
s32 find_unused_obj_index(s32*);
|
||||
void func_80071F6C(s32);
|
||||
void func_80071F6C(s32*);
|
||||
s32 func_80072044(s32*, s32*, s32);
|
||||
void func_80072100(s32);
|
||||
void func_80072100(s32*);
|
||||
void func_800721C0(s32, s32);
|
||||
void func_800721E8(s32, s32);
|
||||
void func_80072214(s32, s32);
|
||||
@@ -126,11 +126,16 @@ void func_80076E14(s32);
|
||||
void func_80076ED8(s32);
|
||||
void func_800773D8(s32, s32);
|
||||
void func_80077428(s32);
|
||||
void func_80077450(s32);
|
||||
void func_80077584(s32);
|
||||
void func_80077640();
|
||||
void func_80077700(s32, Vec3f, s32);
|
||||
void func_80077AB0(Vec3f, s32);
|
||||
void func_80077B14(s32);
|
||||
void func_80077B3C(s32);
|
||||
void func_80077BCC(s32);
|
||||
void func_80077E20(s32);
|
||||
void func_80078220(s32);
|
||||
void func_80078C68();
|
||||
void func_80078C70(s32);
|
||||
void func_80078F64();
|
||||
@@ -167,6 +172,7 @@ void func_800806BC(s32);
|
||||
void func_8008078C(s32);
|
||||
void func_8008085C(s32);
|
||||
void func_80080A14(s32, Player*);
|
||||
void func_80080A4C(s32, s32);
|
||||
void func_80081208();
|
||||
void func_80081210();
|
||||
void func_80081790(s32);
|
||||
|
||||
+386
-491
File diff suppressed because it is too large
Load Diff
@@ -155,9 +155,12 @@ void func_800A11D0(struct_8018D9E0_entry*, s32, s32);
|
||||
void func_800A15EC(struct_8018D9E0_entry*);
|
||||
void func_800A1924(struct_8018D9E0_entry*);
|
||||
void func_800A1A20(struct_8018D9E0_entry*);
|
||||
void func_800A1F30(struct_8018D9E0_entry*);
|
||||
void func_800A2D1C(struct_8018D9E0_entry*);
|
||||
void func_800A3C84(struct_8018D9E0_entry*);
|
||||
void func_800A4550(s32, s32, s32);
|
||||
void func_800A474C(s32, s32, s32);
|
||||
void func_800A4A24(struct_8018D9E0_entry*);
|
||||
void func_800A4B38(struct_8018D9E0_entry*);
|
||||
void func_800A4BC8(struct_8018D9E0_entry*);
|
||||
void func_800A4EF8(struct_8018D9E0_entry*);
|
||||
@@ -165,6 +168,7 @@ void func_800A5084(struct_8018D9E0_entry*);
|
||||
void func_800A5360(struct_8018D9E0_entry*);
|
||||
void func_800A54EC();
|
||||
void func_800A6034(struct_8018D9E0_entry*);
|
||||
void func_800A70E8(struct_8018D9E0_entry*);
|
||||
void func_800A7258(struct_8018D9E0_entry*);
|
||||
void func_800A72FC(struct_8018D9E0_entry*);
|
||||
void func_800A7448(struct_8018D9E0_entry*);
|
||||
@@ -203,7 +207,12 @@ 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_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_800AEE90(struct_8018D9E0_entry*);
|
||||
void func_800AEEBC(struct_8018D9E0_entry*);
|
||||
void func_800AEEE8(struct_8018D9E0_entry*);
|
||||
@@ -225,6 +234,8 @@ void func_80057CE4();
|
||||
|
||||
extern Gfx D_06009410[];
|
||||
|
||||
extern s32 D_800DDB24;
|
||||
|
||||
extern Gfx *D_800E84CC[];
|
||||
extern Gfx *D_800E84EC[];
|
||||
extern Gfx *D_800E850C[];
|
||||
@@ -271,6 +282,7 @@ extern f32 D_800F24B8;
|
||||
extern f64 D_800F24C0;
|
||||
extern s32 D_80165754;
|
||||
extern s32 D_8018D9B0;
|
||||
extern s8 D_8018D9D8;
|
||||
extern s8 D_8018D9D9;
|
||||
extern struct_8018D9E0_entry D_8018D9E0[D_8018D9E0_SIZE]; // D_8018D9E0
|
||||
extern struct_8018DEE0_entry D_8018DEE0[D_8018DEE0_SIZE]; // D_8018DEE0
|
||||
@@ -294,6 +306,7 @@ extern f32 D_8018EDD0;
|
||||
extern f32 D_8018EDD4;
|
||||
extern f32 D_8018EDD8;
|
||||
extern f32 D_8018EDDC;
|
||||
extern s8 D_8018EE08;
|
||||
extern s8 D_802874F5;
|
||||
|
||||
extern u8 _textures_0aSegmentRomStart[];
|
||||
|
||||
+25
-91
@@ -4,7 +4,9 @@
|
||||
#include <common_structs.h>
|
||||
#include "main.h"
|
||||
#include "variables.h"
|
||||
#include "common_textures.h"
|
||||
#include "code_8001F980.h"
|
||||
#include "code_800431B0.h"
|
||||
#include "code_80280650.h"
|
||||
|
||||
void func_80280650(void) {
|
||||
@@ -177,100 +179,32 @@ void func_80280A28(Vec3f arg0, Vec3s arg1, f32 arg2) {
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_80164AF0 + 0x3EB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
//void func_8004B35C(s16, s16, s16, s16); // extern
|
||||
//void func_80280A28(?, f32 *, s16 *, ?); // extern
|
||||
extern u8 D_0D008DB8;
|
||||
extern u8 D_0D008E48;
|
||||
extern s16 D_80164AF0;
|
||||
extern s32 D_8018D48C;
|
||||
#ifdef NON_MATCHING
|
||||
extern u32 D_8018D48C;
|
||||
|
||||
struct UnkStruct80280B50 {
|
||||
s32 unk0;
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
};
|
||||
extern Camera *camera1;
|
||||
|
||||
void func_80280B50(struct UnkStruct80280B50 *arg0, s32 arg1, s32 arg2, s16 arg3) {
|
||||
f32 sp54 = arg0->unk8;
|
||||
f32 sp50 = arg0->unk4;
|
||||
f32 sp4C = arg0->unk0;
|
||||
s16 sp48 = 0;
|
||||
s32 sp46 = camera1->unk26;
|
||||
s16 sp44 = 0;
|
||||
void *sp1C;
|
||||
//s16 *temp_a1 = &sp44;
|
||||
|
||||
//sp4C = arg0->unk0;
|
||||
//temp_a1 = &sp44;
|
||||
//sp50 = arg0->unk4;
|
||||
//sp44 = 0;
|
||||
//sp54 = arg0->unk8;
|
||||
//sp48 = 0;
|
||||
//sp46 = camera1->unk26;
|
||||
func_80280A28(arg1, &sp4C, &sp44, arg1);
|
||||
void func_80280B50(Vec3f arg0, f32 arg1, s32 rgb, s16 alpha) {
|
||||
Vec3f sp4C;
|
||||
Vec3s sp44;
|
||||
s16 red;
|
||||
s16 green;
|
||||
s16 blue;
|
||||
|
||||
sp4C[0] = arg0[0];
|
||||
sp4C[1] = arg0[1];
|
||||
sp4C[2] = arg0[2];
|
||||
sp44[0] = 0;
|
||||
sp44[1] = camera1->rot[1];
|
||||
sp44[2] = 0;
|
||||
func_80280A28(sp4C, sp44, arg1);
|
||||
gSPDisplayList(gDisplayListHead++, D_0D008DB8);
|
||||
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_8018D48C);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(gDisplayListHead++);
|
||||
gDPLoadBlock(gDisplayListHead++, 1, 0, 0, 4082, 0);
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, 4, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 0x7C0, 0x7C0);
|
||||
|
||||
func_8004B35C((arg2 >> 0x10) & 0xFF, (arg2 >> 8) & 0xFF, arg2 & 0xFF, arg3);
|
||||
|
||||
gSPDisplayList(gDisplayListHead, D_0D008E48);
|
||||
D_80164AF0++;
|
||||
/*
|
||||
temp_v0 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0 + 8;
|
||||
temp_v0->unk0 = 0x6000000;
|
||||
temp_v0->unk4 = &D_0D008DB8;
|
||||
temp_v0_2 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_2 + 8;
|
||||
temp_v0_2->unk0 = 0xFD700000;
|
||||
temp_v0_2->unk4 = D_8018D48C;
|
||||
temp_v0_3 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_3 + 8;
|
||||
temp_v0_3->unk4 = 0x7000000;
|
||||
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 = 0x71FF200;
|
||||
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((arg2 >> 0x10) & 0xFF, (arg2 >> 8) & 0xFF, arg2 & 0xFF, arg3);
|
||||
|
||||
|
||||
temp_v0_9 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_9 + 8;
|
||||
temp_v0_9->unk0 = 0x6000000;
|
||||
temp_v0_9->unk4 = &D_0D008E48;
|
||||
*/;
|
||||
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
|
||||
GLOBAL_ASM("asm/non_matchings/code_80280650/func_80280B50.s")
|
||||
|
||||
@@ -76,6 +76,7 @@ f32 func_80280850(f32);
|
||||
void func_80280884();
|
||||
void func_8028093C(struct UnkStruct_80280658*);
|
||||
void func_80280A28(Vec3f, Vec3s, f32 );
|
||||
void func_80280B50(Vec3f, f32, s32, s16);
|
||||
void func_80280FA0(s32);
|
||||
void func_80280FA8(s32);
|
||||
void func_80280FB0();
|
||||
|
||||
+7
-18
@@ -503,30 +503,19 @@ GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_802830B4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 func_80282364(void *, ?, s16, void *); // extern
|
||||
f32 coss(s32, void *); // extern
|
||||
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
void func_80283100(void *arg0, f32 *arg1) {
|
||||
f32 temp_f4;
|
||||
s32 temp_a0;
|
||||
void *temp_a3;
|
||||
void *phi_a3;
|
||||
|
||||
temp_a3 = arg0;
|
||||
phi_a3 = temp_a3;
|
||||
if (arg0->unk60 != 0) {
|
||||
temp_a0 = arg0->unk64 & 0xFFFF;
|
||||
arg0 = temp_a3;
|
||||
temp_f4 = (coss(temp_a0, temp_a3) * arg0->unk60) / 256.0f;
|
||||
arg0->unk64 = arg0->unk64 + arg0->unk68;
|
||||
arg0->unk6E = temp_f4;
|
||||
func_80282364(arg0 + 0x60, 0, arg0->unk6C, arg0);
|
||||
phi_a3 = arg0;
|
||||
temp_f4 = (coss((u32) arg0->unk64 & 0xFFFF) * (f32) arg0->unk60) / 256.0f;
|
||||
arg0->unk64 = (f32) (arg0->unk64 + arg0->unk68);
|
||||
arg0->unk6E = (s16) (s32) temp_f4;
|
||||
func_80282364(arg0 + 0x60, 0, arg0->unk6C);
|
||||
} else {
|
||||
temp_a3->unk64 = 0.0f;
|
||||
arg0->unk64 = 0.0f;
|
||||
}
|
||||
*arg1 = phi_a3->unk20 + phi_a3->unk6E;
|
||||
*arg1 = arg0->unk20 + (f32) arg0->unk6E;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80283100.s")
|
||||
|
||||
+584
-667
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -99,8 +99,9 @@ void process_shell_collision(Vec3f, f32, Vec3f, f32);
|
||||
void func_802AC098(UnkActorInner*, f32*);
|
||||
void func_802AC114(Vec3f, f32, Vec3f, f32);
|
||||
void func_802AD950(UnkActorInner*, f32, f32, f32, f32, f32, f32, f32);
|
||||
void func_802ADDC8(UnkActorInner*, f32, f32, f32, f32);
|
||||
s32 func_802ADDC8(UnkActorInner*, f32, f32, f32, f32);
|
||||
f32 func_802AE1C0(f32, f32, f32);
|
||||
s32 func_802AEE1C(s16, s16, s16, s16, s16, s16, s16, s16);
|
||||
void func_802AF314();
|
||||
void func_802AF588(s32);
|
||||
void func_802AF5AC(s32, s8);
|
||||
|
||||
Reference in New Issue
Block a user