small changes. One matching func, Two nonmatching funcs (#355)

* Various decomp and non_matchings.
This commit is contained in:
tomas
2023-08-08 18:41:17 +00:00
committed by GitHub
parent a240af0693
commit cf9841d39f
6 changed files with 194 additions and 598 deletions
+1
View File
@@ -146,6 +146,7 @@ void func_800CA388(u8);
void func_800CA414(u16, u16);
void func_800CA49C(u8);
void func_800CAACC(u8);
void func_800CAEC4(u8, f32);
void func_800CB134();
void func_800CB2C4(void);
void func_800C5CB8(void);
+182 -270
View File
@@ -1,6 +1,7 @@
#include <ultra64.h>
#include <macros.h>
#include <defines.h>
#include <mk64.h>
#include "variables.h"
#include "kart_attributes.h"
#include "memory.h"
@@ -2056,71 +2057,66 @@ void func_8002C7E4(Player *player, s8 arg1, s8 arg2) {
}
}
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
void func_800CAEC4(u8, f32); /* extern */
void func_8002C954(Player *player, s8 arg1, f32 *arg2) {
f32 *temp_v0_3;
#ifdef NON_MATCHING
void func_8002C954(Player *player, s8 arg1, Vec3fs *arg2) {
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f0_4;
f32 temp_f14;
f32 temp_f2;
f32 var_f14;
f64 temp_f0_3;
s16 temp_t1;
s16 temp_v0_2;
s32 temp_v0;
s32 temp_v1;
temp_v0 = player->unk_0BC;
temp_v1 = temp_v0 & 0x10000;
Vec3fs *new_var;
temp_f0 = player->pos[1] - player->unk_074;
if ((((temp_v1 != 0x10000) && ((temp_v0 & 0x100000) == 0x100000)) || (((temp_f0 >= 20.0f) || (temp_f0 < -1.0f)) && (temp_v1 == 0) && (temp_v0 & 8)) || ((player->unk_110.unk34 == 0) && (temp_v1 == 0))) && ((temp_v0_2 = player->unk_0CA, ((temp_v0_2 & 2) == 0)) || !(temp_v0_2 & 8))) {
func_8008F494(player, arg1);
if ((((player->unk_0BC & 0x10000) != 0x10000) &&
((player->unk_0BC & 0x100000) == 0x100000) ||
((((temp_f0 >= 20.0f) ||
(temp_f0 < (-1.0f))) &&
((player->unk_0BC & 0x10000) == 0)) &&
(player->unk_0BC & 8)) ||
((player->unk_110.unk34 == 0) &&
((player->unk_0BC & 0x10000) == 0))) &&
(((player->unk_0CA & 2) == 0) ||
(!(player->unk_0CA & 8)))) {
func_8008F494(player, arg1);
}
if ((player->unk_046 & 0x20) != 0x20) {
if ((player->unk_110.unk3C < -1.0f) || (player->unk_110.unk40 < -1.0f)) {
if ((player->unk_110.unk3C[0] < (-1.0f)) || (player->unk_110.unk3C[1] < (-1.0f))) {
player->unk_256 = 1;
}
player->unk_046 |= 0x20;
}
new_var = arg2;
if (((player->unk_000 & 0x4000) == 0x4000) && (((player->unk_094 / 18.0f) * 216.0f) > 30.0f)) {
func_8001CA24(player, 3.0f);
}
temp_t1 = (u16) player->unk_256 + 1;
player->unk_046 |= 0x10;
player->unk_256 = temp_t1;
if ((temp_t1 & 0xFFFF) >= 0xA) {
player->unk_256++;
if (player->unk_256 >= 0xA) {
player->unk_256 = 0;
}
if ((player->unk_0C4 >= 0) && (((player->unk_094 / 18.0f) * 216.0f) > 5.0f)) {
func_80031F48(player, 18.0f);
}
if ((player->unk_000 & 0x4000) == 0x4000) {
temp_v0_3 = D_80165070[arg1];
temp_f0_2 = temp_v0_3->unk0 - arg2->unk0;
temp_f14 = temp_v0_3->unk4 - arg2->unk4;
temp_f2 = temp_v0_3->unk8 - arg2->unk8;
var_f14 = sqrtf((temp_f0_2 * temp_f0_2) + (temp_f14 * temp_f14) + (temp_f2 * temp_f2)) / 3.0f;
if ((f64) var_f14 >= 1.0) {
Vec3fs *vec = &D_80165070[arg1];
var_f14 = sqrtf((((vec->x - arg2->x) * (vec->x - arg2->x)) + ((vec->y - new_var->y) * (vec->y - new_var->y))) + ((vec->z - arg2->z) * (vec->z - arg2->z))) / 3;
if (var_f14 >= 1.0) {
var_f14 = 1.0f;
}
temp_f0_3 = (f64) var_f14;
if ((temp_f0_3 <= 0.6) && (((player->unk_094 / 18.0f) * 216.0f) >= 40.0f) && !(player->unk_000 & 0x100)) {
func_800CAEC4((u8) arg1, 0.6f);
if ((var_f14 <= 0.6) &&
(((player->unk_094 / 18.0f) * 216.0f) >= 40.0f) &&
(!(player->unk_000 & 0x100))) {
func_800CAEC4(arg1, 0.6F);
} else if (!(player->unk_000 & 0x100)) {
if ((temp_f0_3 <= 0.6) && (temp_f0_4 = (player->unk_094 / 18.0f) * 216.0f, (temp_f0_4 < 40.0f)) && (temp_f0_4 >= 10.0f)) {
func_800CAEC4((u8) arg1, 0.3f);
if ((var_f14 <= 0.6) &&
(((player->unk_094 / 18.0f) * 216.0f) < 40.0f) &&
(((player->unk_094 / 18.0f) * 216.0f) >= 10.0f)) {
func_800CAEC4(arg1, 0.3F);
} else {
func_800CAEC4((u8) arg1, var_f14);
func_800CAEC4(arg1, var_f14);
}
}
}
if (player->unk_0BC & 0x2000) {
func_8008D554(player);
player->unk_08C /= 2.0f;
player->unk_08C /= 2;
}
}
#else
@@ -5234,124 +5230,108 @@ void func_80037BB4(Player *player, Vec3f arg1) {
}
}
#ifdef MIPS_TO_C
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
? func_80030C34(Player *); /* extern */
? func_80033AE0(Player *, struct Controller *, s8); /* extern */
s32 func_800388B0(struct Controller *); /* extern */
void func_80037CFC(Player *player, struct Controller *controller, u8 arg2) {
s16 temp_v0_4;
s32 temp_t0;
s32 temp_t4;
s32 temp_v0_2;
s32 temp_v0_3;
s32 var_v0;
s32 var_v0_2;
s32 var_v1;
u16 temp_v0;
u16 temp_v1;
u16 temp_v1_2;
var_v0 = player->unk_0BC;
var_v1 = var_v0 & 0x80;
if ((var_v1 != 0x80) && ((var_v0 & 0x40) != 0x40) && ((var_v0 & 0x400) != 0x400) && ((var_v0 & 0x4000) != 0x4000) && ((var_v0 & 0x01000000) != 0x01000000) && ((var_v0 & 0x02000000) != 0x02000000) && ((var_v0 & 0x10000) != 0x10000) && ((var_v0 & 0x20000) != 0x20000)) {
if (((var_v0 & 0x04000000) != 0x04000000) && ((var_v0 & 8) != 8) && ((var_v0 & 2) != 2) && ((var_v0 & 0x10) != 0x10) && (controller->buttonPressed & 0x10)) {
func_8002AA50(player);
temp_v0 = player->unk_000;
if (((temp_v0 & 0x4000) == 0x4000) && ((temp_v0 & 0x100) != 0x100)) {
func_800C9060(arg2, 0x19008000U);
void func_80037CFC(Player *player, struct Controller *controller, s8 arg2) {
if (((player->unk_0BC & 0x80) != 0x80) &&
((player->unk_0BC & 0x40) != 0x40) &&
((player->unk_0BC & 0x400) != 0x400) &&
((player->unk_0BC & 0x4000) != 0x4000) &&
((player->unk_0BC & 0x01000000) != 0x01000000) &&
((player->unk_0BC & 0x02000000) != 0x02000000) && ((player->unk_0BC & 0x10000) != 0x10000) &&
((player->unk_0BC & 0x20000) != 0x20000)) {
if (((player->unk_0BC & 0x04000000) != 0x04000000) &&
((player->unk_0BC & 8) != 8) &&
((player->unk_0BC & 2) != 2) &&
((player->unk_0BC & 0x10) != 0x10) &&
(controller->buttonPressed & 0x10)) {
func_8002AA50(player);
if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) {
func_800C9060(arg2, 0x19008000);
}
}
}
temp_v0_2 = player->unk_0BC;
if ((temp_v0_2 & 8) != 8) {
func_80033AE0(player, controller, (s8) arg2);
} else if (((temp_v0_2 & 2) == 2) && (player->unk_110.unk3C[2] <= 5.0f)) {
func_80033AE0(player, controller, (s8) arg2);
}
temp_t4 = player->unk_0BC & ~1;
player->unk_0BC = temp_t4;
var_v0_2 = temp_t4;
if (!(temp_t4 & 0x100000) && !(temp_t4 & 4)) {
if (((player->unk_094 / 18.0f) * 216.0f) <= 12.0f) {
temp_v1 = controller->button;
if (temp_v1 & 0x8000) {
temp_t0 = temp_t4 | 0x20;
if (temp_v1 & 0x4000) {
player->unk_0BC = temp_t0;
var_v0_2 = temp_t0;
if ((temp_t0 & 0x20) != 0x20) {
var_v0_2 = temp_t0;
player->unk_09C += 100.0f;
if ((player->unk_0BC & 8) != 8) {
func_80033AE0(player, controller, arg2);
} else if (((player->unk_0BC & 2) == 2) && (player->unk_110.unk3C[2] <= 5.0f)) {
func_80033AE0(player, controller, arg2);
}
player->unk_0BC &= ~1;
if ((!(player->unk_0BC & 0x100000)) && (!(player->unk_0BC & 4))) {
if (((player->unk_094 / 18.0f) * 216.0f) <= 12.0f) {
if (controller->button & 0x8000) {
if (controller->button & 0x4000) {
player->unk_0BC |= 0x20;
if ((player->unk_0BC & 0x20) != 0x20) {
player->unk_09C += 100.0f;
}
}
}
}
if (((player->unk_0BC & 0x20) == 0x20) &&
(((controller->button & 0x4000) == 0) ||
(!(controller->button & 0x8000)))) {
player->unk_0BC &= ~0x20;
}
}
if (((var_v0_2 & 0x20) == 0x20) && ((temp_v1_2 = controller->button, ((temp_v1_2 & 0x4000) == 0)) || !(temp_v1_2 & 0x8000))) {
player->unk_0BC = var_v0_2 & ~0x20;
}
}
if ((player->unk_044 & 1) != 1) {
if (controller->button & 0x8000) {
func_80030FC8(player);
func_80030E00(player);
} else {
if (gModeSelection == 3) {
func_80031F48(player, 2.0f);
if ((player->unk_044 & 1) != 1) {
if (controller->button & 0x8000) {
func_80030FC8(player);
func_80030E00(player);
} else {
func_80031F48(player, 1.0f);
if (gModeSelection == 3)
{
func_80031F48(player, 2.0f);
}
else
{
func_80031F48(player, 1.0f);
}
func_80030C34(player);
}
func_80030C34(player);
}
if (controller->button & 0x4000) {
func_800323E4(player);
func_8003221C(player);
} else {
player->unk_20C = 0.0f;
func_80032050(player);
}
}
temp_v0_3 = player->unk_0BC;
if (!(temp_v0_3 & 0x100000) && !(temp_v0_3 & 4)) {
if ((func_800388B0(controller) < -0x31) && (((player->unk_094 / 18.0f) * 216.0f) <= 5.0f) && (controller->button & 0x4000)) {
player->unk_09C = 140.0f;
player->unk_044 |= 1;
player->unk_20C = 0.0f;
player->unk_08C = (140.0f * 140.0f) / 25.0f;
}
if ((func_800388B0(controller) >= -0x1D) || !(controller->button & 0x4000)) {
temp_v0_4 = player->unk_044;
if ((temp_v0_4 & 1) == 1) {
player->unk_044 = temp_v0_4 & 0xFFFE;
player->unk_09C = 0.0f;
if (controller->button & 0x4000) {
func_800323E4(player);
func_8003221C(player);
} else {
player->unk_20C = 0.0f;
func_80032050(player);
}
}
if ((!(player->unk_0BC & 0x100000)) && (!(player->unk_0BC & 4))) {
if (((func_800388B0(controller) < (-0x31)) &&
(((player->unk_094 / 18.0f) * 216.0f) <= 5.0f)) &&
(controller->button & 0x4000)) {
player->unk_09C = 140.0f;
player->unk_044 |= 1;
player->unk_08C = (player->unk_09C * player->unk_09C) / 25.0f;
player->unk_20C = 0.0f;
}
if ((func_800388B0(controller) >= -0x1D) || (!(controller->button & 0x4000))) {
if ((player->unk_044 & 1) == 1) {
player->unk_044 &= 0xFFFE;
player->unk_09C = 0.0f;
}
}
}
}
} else {
if ((var_v0 & 0x4000) == 0x4000) {
if ((player->unk_0BC & 0x4000) == 0x4000){
if (controller->button & 0x8000) {
func_80030FC8(player);
var_v0 = player->unk_0BC;
} else {
func_80031F48(player, 5.0f);
var_v0 = player->unk_0BC;
}
var_v1 = var_v0 & 0x80;
}
if ((var_v1 == 0x80) || ((var_v0 & 0x40) == 0x40) || ((var_v0 & 0x01000000) == 0x01000000) || ((var_v0 & 0x02000000) == 0x02000000)) {
if (controller->button & 0x8000) {
func_80030E00(player);
func_800332E8(player, (s32) (s8) arg2);
return;
}
func_80030C34(player);
func_800337CC(player, 5.0f, (s32) (s8) arg2);
if (((((player->unk_0BC & 0x80) == 0x80) ||
((player->unk_0BC & 0x40) == 0x40)) ||
((player->unk_0BC & 0x01000000) == 0x01000000)) ||
((player->unk_0BC & 0x02000000) == 0x02000000)) {
if (controller->button & 0x8000) {
func_80030E00(player);
func_800332E8(player, arg2);
return;
}
func_80030C34(player);
func_800337CC(player, 5.0f, arg2);
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80037CFC.s")
#endif
void func_800381AC(Player *player, struct Controller *controller, s8 arg2) {
if (((player->unk_000 & 0x8000) == 0x8000) &&
@@ -5389,13 +5369,13 @@ void func_800382DC(void) {
u16 temp_v0_5;
u16 temp_v0_6;
switch (gActiveScreenMode) { /* irregular */
switch (gActiveScreenMode) {
case SCREEN_MODE_1P:
switch (gModeSelection) { /* switch 1; irregular */
case 0: /* switch 1 */
switch (gModeSelection) {
case 0:
func_800381AC(gPlayerOne, gControllerOne, 0);
return;
case 1: /* switch 1 */
case 1:
if (D_8015F890 != 1) {
func_800381AC(gPlayerOne, gControllerOne, 0);
temp_v0_3 = gPlayerTwo->unk_000;
@@ -5560,28 +5540,10 @@ void func_80038BE4(Player *player, s16 arg1) {
player->unk_08C = (player->unk_09C * player->unk_09C) / 25.0f;
}
#ifdef MIPS_TO_C
//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
? func_80029B4C(Player *, f32, f32, f32); /* extern */
? func_8002AE38(Player *, s8, f32, f32, f32, f32); /* extern */
? func_8002C4F8(Player *, s8); /* extern */
? func_8002C954(Player *, s8, f32 *); /* extern */
? func_8002CD48(Player *, s8, s8); /* extern */
static ? D_800E4328; /* unable to generate initializer */
static ? D_800E4334; /* unable to generate initializer */
static ? D_800E4340; /* unable to generate initializer */
static ? D_800E434C; /* unable to generate initializer */
#ifdef NON_MATCHING
// 70.22% matching
// really could use some working
void func_80038C6C(Player *player, Camera *camera, s8 arg2, s8 arg3) {
f32 sp11C;
f32 sp114;
f32 sp110;
f32 sp10C;
f32 sp108;
f32 spFC;
f32 spF8;
f32 spF4;
f32 spF0;
f32 spEC;
f32 spE8;
f32 spE4;
@@ -5595,108 +5557,64 @@ void func_80038C6C(Player *player, Camera *camera, s8 arg2, s8 arg3) {
f32 sp8C;
f32 sp88;
f32 sp7C;
f32 *sp50;
f32 *temp_a1;
f32 *temp_v0_2;
f32 *temp_v0_3;
f32 temp_f0_2;
f32 temp_f0_3;
f32 temp_f0_4;
f32 temp_f10;
f32 temp_f10_2;
f32 temp_f12_2;
f32 temp_f16;
f32 temp_f2_2;
f32 temp_f2_3;
f32 temp_f2_4;
f32 temp_f4;
f32 temp_f8;
f64 temp_f0;
f64 temp_f12;
f64 temp_f2;
s16 temp_v0;
s32 temp_t6;
sp114.unk0 = D_800E4328.unk0;
sp114.unk4 = (s32) D_800E4328.unk4;
sp114.unk8 = (s32) D_800E4328.unk8;
sp108.unk0 = D_800E4334.unk0;
sp108.unk4 = (s32) D_800E4334.unk4;
sp108.unk8 = (s32) D_800E4334.unk8;
spFC.unk0 = D_800E4340.unk0;
spFC.unk4 = (s32) D_800E4340.unk4;
spFC.unk8 = (s32) D_800E4340.unk8;
spF0.unk0 = D_800E434C.unk0;
spF0.unk4 = (s32) D_800E434C.unk4;
spF0.unk8 = (s32) D_800E434C.unk8;
f32 divOptimize;
// data
Vec3f sp114 = {0.0, 0.0, 1.0};
Vec3f sp108 = {0.0, 0.0, 0.0};
Vec3f spFC = {0.0, 0.0, 0.0};
Vec3f spF0 = {0.0, 0.0, 0.0};
player->unk_084 = -10.0f;
player->unk_088 = 28.0f;
player->unk_214 = 250.0f;
func_8002B830(player, arg3, arg2);
func_8002CD48(player, arg3, arg2);
player->unk_02E += player->unk_078;
spF0 = 0.0f;
spF4 = 0.0f;
spF8 = 0.0f;
player->unk_02C[1] += player->unk_078;
spF0[0] = 0.0f;
spF0[1] = 0.0f;
spF0[2] = 0.0f;
func_8002AB70(player);
temp_a1 = player->unk_174[0];
spA4 = (spFC + player->unk_064) * 0.0f;
spA4 = (spFC[0] + player->unk_064) * 0.0f;
spA0 = player->kartGravity * -1.0f;
sp110 = 0.0f;
sp10C = 0.0f;
sp108 = 0.0f;
sp50 = temp_a1;
sp9C = (sp104 + player->unk_06C) * 0.0f;
func_802B63B8(&sp108, (f32 (*)[3]) temp_a1);
spA4 += sp108;
sp9C += sp110;
sp11C = player->unk_08C;
func_802B63B8(&sp114, (f32 (*)[3]) sp50);
sp88 = player->unk_034[0];
temp_f8 = player->unk_034[1];
sp8C = temp_f8;
temp_f0 = (f64) sp88;
sp90 = player->unk_034[2];
temp_f2 = (f64) sp90;
sp88 = (f32) (temp_f0 + ((((f64) (sp114 + spA4 + spF0) - (temp_f0 * (0.12 * (f64) player->kartFriction))) / 6000.0) / 1.0));
temp_f12 = (f64) temp_f8;
sp90 = (f32) (temp_f2 + ((((f64) (sp11C + sp9C + spF8) - (temp_f2 * (0.12 * (f64) player->kartFriction))) / 6000.0) / 1.0));
sp8C = (f32) (temp_f12 + ((((f64) (sp118 + spA0 + spF4) - (temp_f12 * (0.12 * (f64) player->kartFriction))) / 6000.0) / 1.0));
temp_v0 = player->unk_044;
if ((temp_v0 & 0x10) == 0x10) {
player->unk_044 = temp_v0 & 0xFFEF;
sp108[2] = 0.0f;
sp108[1] = 0.0f;
sp108[0] = 0.0f;
sp9C = (spFC[2] + player->unk_06C) * 0.0f;
func_802B63B8(sp108, player->unk_174);
spA4 += sp108[0];
sp9C += sp108[2];
sp114[2] = player->unk_08C;
func_802B63B8(sp114, player->unk_174);
sp88 = (player->unk_034[0] + ((((((sp114[0] + spA4) + spF0[0])) - (player->unk_034[0] * (0.12 * (player->kartFriction)))) / 6000.0) / 1.0));
sp90 = (player->unk_034[2] + ((((((sp114[2] + sp9C) + spF0[2])) - (player->unk_034[2] * (0.12 * (player->kartFriction)))) / 6000.0) / 1.0));
sp8C = (player->unk_034[1] + ((((((sp114[1] + spA0) + spF0[1])) - (player->unk_034[1] * (0.12 * (player->kartFriction)))) / 6000.0) / 1.0));
if ((player->unk_044 & 0x10) == 0x10) {
player->unk_044 &= 0xFFEF;
}
temp_f0_2 = player->pos[0];
spE0 = temp_f0_2;
temp_f2_2 = player->pos[1];
temp_f16 = player->pos[2];
player->rotX = temp_f0_2;
player->rotY = temp_f2_2;
player->rotZ = temp_f16;
spEC = player->unk_034[0] + temp_f0_2;
spE8 = player->unk_034[1] + temp_f2_2;
spD8 = temp_f16;
temp_f4 = player->unk_034[2] + temp_f16;
spE4 = temp_f4;
player->rotX = player->pos[0];
player->rotY = player->pos[1];
player->rotZ = player->pos[2];
spEC = player->unk_034[0] + player->pos[0];
spE8 = player->unk_034[1] + player->pos[1];
spD8 = player->pos[2];
spE4 = player->unk_034[2] + player->pos[2];
func_8002AAC0(player);
temp_f10 = spE8 + player->kartHopVelocity;
spE8 = temp_f10;
temp_f10_2 = (f32) ((f64) temp_f10 - 0.02);
spE8 = temp_f10_2;
func_802AD950(&player->unk_110, player->boundingBoxSize, spEC, temp_f10_2, temp_f4, player->rotX, player->rotY, player->rotZ);
spE8 += player->kartHopVelocity;
spE8 -= 0.02;
func_802AD950(&player->unk_110, player->boundingBoxSize, spEC, spE8, spE4, player->rotX, player->rotY, player->rotZ);
player->unk_058 = 0.0f;
player->unk_060 = 0.0f;
player->unk_05C = 1.0f;
func_802B6540((f32 (*)[3]) sp50, 0.0f, 1.0f, 0.0f, (s16) (s32) player->unk_02E);
func_802B6540(player->unk_174, 0.0f, 1.0f, 0.0f, player->unk_02C[1]);
player->unk_0BC |= 8;
player->unk_0C2 += 1;
sp98 = player->unk_110.unk3C[2];
if (sp98 <= 0.0f) {
player->unk_0C2 = 0;
temp_t6 = player->unk_0BC & ~2;
player->unk_0BC = temp_t6;
player->unk_0BC = temp_t6 & ~8;
player->kartHopVelocity = (f32) player->unk_0C2;
player->unk_0BC &= ~2;
player->unk_0BC &= ~8;
player->kartHopVelocity = player->unk_0C2;
}
sp98 = player->unk_110.unk3C[2];
if (sp98 <= 0.0f) {
@@ -5720,46 +5638,40 @@ void func_80038C6C(Player *player, Camera *camera, s8 arg2, s8 arg3) {
}
}
player->unk_074 = func_802ABE30(spEC, spE8, spE4, player->unk_110.unk3A);
func_80029B4C(player, spEC, spE8, spE4);
func_80029B4C(player, &spEC, &spE8, &spE4);
func_8002AE38(player, arg3, spE0, spD8, spEC, spE4);
player->unk_22C = player->unk_094;
player->unk_094 = sqrtf((sp90 * sp90) + (sp88 * sp88));
player->pos[0] = spEC;
player->pos[2] = spE4;
player->pos[1] = spE8;
player->unk_064 = sp108;
player->unk_06C = sp110;
player->unk_064 = sp108[0];
player->unk_06C = sp108[2];
player->unk_034[0] = sp88;
player->unk_034[1] = sp8C;
player->unk_034[2] = sp90;
temp_v0_2 = D_80165070[arg3];
temp_v0_2->unk0 = sp88;
temp_v0_2->unk4 = sp8C;
temp_v0_2->unk8 = sp90;
D_80165070[arg3][0] = sp88;
D_80165070[arg3][1] = sp8C;
D_80165070[arg3][2] = sp90;
if ((player->unk_000 & 0x4000) == 0x4000) {
temp_f2_3 = player->unk_094;
temp_v0_3 = &gKartTopSpeedTable[player->characterId];
temp_f12_2 = *temp_v0_3;
if (temp_f12_2 < temp_f2_3) {
temp_f0_3 = temp_f12_2 / temp_f2_3;
player->unk_034[0] *= temp_f0_3;
player->unk_034[1] *= temp_f0_3;
player->unk_034[2] *= temp_f0_3;
player->unk_094 = *temp_v0_3;
if (gKartTopSpeedTable[player->characterId] < player->unk_094) {
divOptimize = gKartTopSpeedTable[player->characterId] / player->unk_094;
player->unk_034[0] *= divOptimize;
player->unk_034[1] *= divOptimize;
player->unk_034[2] *= divOptimize;
player->unk_094 = gKartTopSpeedTable[player->characterId];
}
}
if ((player->unk_044 & 1) == 1) {
temp_f2_4 = player->unk_094;
if (temp_f2_4 > 1.0f) {
temp_f0_4 = 1.0f / temp_f2_4;
if ((player->unk_044 & 1) == 1){
if (player->unk_094 > 1.0f){
player->unk_094 = 1.0f;
player->unk_034[0] *= temp_f0_4;
player->unk_034[1] *= temp_f0_4;
player->unk_034[2] *= temp_f0_4;
player->unk_034[0] *= 1.0f / player->unk_094;
player->unk_034[1] *= 1.0f / player->unk_094;
player->unk_034[2] *= 1.0f / player->unk_094;
}
}
if (player->unk_110.unk3C[2] >= 500.0f) {
player->unk_078 = (s16) ((s16) player->unk_078 / 2);
player->unk_078 = (s16) player->unk_078 / 2;
}
func_8002C4F8(player, arg3);
}
+2
View File
@@ -68,10 +68,12 @@ void func_8003777C(Player*, Vec3f, Vec3f);
void func_800378E8(Player*, Vec3f, Vec3f);
void func_80037A4C(Player*, Vec3f, Vec3f);
void func_80037BB4(Player*player, Vec3f);
void func_80033AE0(Player*, struct Controller*, s8);
void func_800382DC();
s16 func_80038534(struct Controller*);
s16 func_800388B0(struct Controller*);
void func_80038BE4(Player*, s16);
void func_80038C6C(Player*, Camera*, s8, s8);
/* This is where I'd put my static data, if I had any */