summaryrefslogtreecommitdiff
path: root/src/racing/math_util.c
diff options
context:
space:
mode:
authorMaciek Baron <1668712+MaciekBaron@users.noreply.github.com>2025-07-03 13:35:42 +0100
committerGitHub <noreply@github.com>2025-07-03 06:35:42 -0600
commit99689a3f70d8cb38178f92b87ecdcdbbdb200429 (patch)
tree031bbf96ac4c1d17b2f6213b1c6f271a71bb8e2d /src/racing/math_util.c
parent7937896598f3df46eb78c158bde787bc4f12ad7f (diff)
Document player alpha (#396)
* Document player alpha * Fix typo * Document further alpha things * Document movement * Fix indentation
Diffstat (limited to 'src/racing/math_util.c')
-rw-r--r--src/racing/math_util.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/racing/math_util.c b/src/racing/math_util.c
index 69d5c0cbc..05baecf3f 100644
--- a/src/racing/math_util.c
+++ b/src/racing/math_util.c
@@ -1205,7 +1205,7 @@ UNUSED void func_802B8414(uintptr_t addr, Mat4 arg1, s16 arg2, s16 arg3, s32 arg
#ifdef MIPS_TO_C
// generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Oct-29-2023
-void func_802B8614(Player* arg0) {
+void func_802B8614(Player* player) {
f64 sp78;
f64 sp70;
f64 sp68;
@@ -1224,16 +1224,16 @@ void func_802B8614(Player* arg0) {
f64 temp_f4;
f64 temp_f6;
- temp_f6 = (f64) arg0->tyres[FRONT_RIGHT].pos[0];
+ temp_f6 = (f64) player->tyres[FRONT_RIGHT].pos[0];
sp78 = temp_f6;
- sp70 = (f64) arg0->tyres[FRONT_RIGHT].baseHeight;
- sp68 = (f64) arg0->tyres[FRONT_RIGHT].pos[2];
- temp_f30 = (f64) arg0->tyres[FRONT_LEFT].pos[0];
- sp58 = (f64) arg0->tyres[FRONT_LEFT].baseHeight;
- sp50 = (f64) arg0->tyres[FRONT_LEFT].pos[2];
- sp48 = (f64) arg0->tyres[BACK_RIGHT].pos[0];
- sp40 = (f64) arg0->tyres[BACK_RIGHT].baseHeight;
- temp_f4 = (f64) arg0->tyres[BACK_RIGHT].pos[2];
+ sp70 = (f64) player->tyres[FRONT_RIGHT].baseHeight;
+ sp68 = (f64) player->tyres[FRONT_RIGHT].pos[2];
+ temp_f30 = (f64) player->tyres[FRONT_LEFT].pos[0];
+ sp58 = (f64) player->tyres[FRONT_LEFT].baseHeight;
+ sp50 = (f64) player->tyres[FRONT_LEFT].pos[2];
+ sp48 = (f64) player->tyres[BACK_RIGHT].pos[0];
+ sp40 = (f64) player->tyres[BACK_RIGHT].baseHeight;
+ temp_f4 = (f64) player->tyres[BACK_RIGHT].pos[2];
temp_f2 = sp58 - sp70;
sp38 = temp_f4;
temp_f12 = temp_f4 - sp50;
@@ -1242,14 +1242,14 @@ void func_802B8614(Player* arg0) {
temp_f18 = sp48 - temp_f30;
temp_f20 = temp_f30 - temp_f6;
if (0.0 == 0.0) {
- arg0->unk_058 = 0.0f;
- arg0->unk_060 = 0.0f;
- arg0->unk_05C = 1.0f;
+ player->unk_058 = 0.0f;
+ player->unk_060 = 0.0f;
+ player->unk_05C = 1.0f;
return;
}
- arg0->unk_058 = (f32) ((f64) (f32) ((temp_f2 * temp_f12) - (temp_f14 * temp_f16)) / 0.0);
- arg0->unk_05C = (f32) ((f64) (f32) ((temp_f14 * temp_f18) - (temp_f20 * temp_f12)) / 0.0);
- arg0->unk_060 = (f32) ((f64) (f32) ((temp_f20 * temp_f16) - (temp_f2 * temp_f18)) / 0.0);
+ player->unk_058 = (f32) ((f64) (f32) ((temp_f2 * temp_f12) - (temp_f14 * temp_f16)) / 0.0);
+ player->unk_05C = (f32) ((f64) (f32) ((temp_f14 * temp_f18) - (temp_f20 * temp_f12)) / 0.0);
+ player->unk_060 = (f32) ((f64) (f32) ((temp_f20 * temp_f16) - (temp_f2 * temp_f18)) / 0.0);
}
#else
GLOBAL_ASM("asm/non_matchings/racing/math_util/func_802B8614.s")