mirror of
https://github.com/n64decomp/mk64
synced 2026-07-10 05:26:49 -04:00
Match code_8003DC40 (#223)
Matched its rodata too Required making a minor adjustment to the Player struct, which required updating a couple of other files Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
+18
-19
@@ -4,6 +4,7 @@
|
||||
#include "variables.h"
|
||||
#include "kart_attributes.h"
|
||||
#include "memory.h"
|
||||
#include "code_8001F980.h"
|
||||
#include "code_80027D00.h"
|
||||
#include "code_8008C1D0.h"
|
||||
|
||||
@@ -1342,34 +1343,32 @@ GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002A194.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_8002A5F4(void *arg0, f32 arg1, void *arg2, f32 arg3, f32 arg4) {
|
||||
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
|
||||
void func_8002A5F4(Vec3f arg0, f32 arg1, Vec3f arg2, f32 arg3, f32 arg4) {
|
||||
f32 temp_f0;
|
||||
f32 temp_f2;
|
||||
f32 temp_f12;
|
||||
f32 temp_f14;
|
||||
f32 temp_f16;
|
||||
f32 temp_f18;
|
||||
f32 temp_f20;
|
||||
f32 temp_f20_2;
|
||||
f32 temp_f2;
|
||||
|
||||
temp_f0 = arg2->unk0;
|
||||
temp_f2 = arg2->unk4;
|
||||
temp_f12 = arg2->unk8;
|
||||
temp_f14 = -arg0->unk0;
|
||||
temp_f16 = -arg0->unk4;
|
||||
temp_f18 = -arg0->unk8;
|
||||
temp_f0 = arg2[0];
|
||||
temp_f2 = arg2[1];
|
||||
temp_f12 = arg2[2];
|
||||
temp_f14 = -arg0[0];
|
||||
temp_f16 = -arg0[1];
|
||||
temp_f18 = -arg0[2];
|
||||
temp_f20 = (temp_f14 * temp_f0) + (temp_f16 * temp_f2) + (temp_f18 * temp_f12);
|
||||
if (arg1 < -arg4) {
|
||||
temp_f20 = (temp_f14 * temp_f0) + (temp_f16 * temp_f2) + (temp_f18 * temp_f12);
|
||||
arg2->unk0 = (temp_f0 - (temp_f20 * temp_f14)) - (temp_f20 * temp_f14 * arg3);
|
||||
arg2->unk4 = (temp_f2 - (temp_f20 * temp_f16)) - (temp_f20 * temp_f16 * arg3);
|
||||
arg2->unk8 = (temp_f12 - (temp_f20 * temp_f18)) - (temp_f20 * temp_f18 * arg3);
|
||||
return;
|
||||
arg2[0] = temp_f0 - (temp_f20 * temp_f14) - (temp_f20 * temp_f14 * arg3);
|
||||
arg2[1] = temp_f2 - (temp_f20 * temp_f16) - (temp_f20 * temp_f16 * arg3);
|
||||
arg2[2] = temp_f12 - (temp_f20 * temp_f18) - (temp_f20 * temp_f18 * arg3);
|
||||
} else {
|
||||
arg2[0] = temp_f0 - (temp_f20 * temp_f14);
|
||||
arg2[1] = temp_f2 - (temp_f20 * temp_f16);
|
||||
arg2[2] = temp_f12 - (temp_f20 * temp_f18);
|
||||
}
|
||||
temp_f20_2 = (temp_f14 * temp_f0) + (temp_f16 * temp_f2) + (temp_f18 * temp_f12);
|
||||
arg2->unk0 = temp_f0 - (temp_f20_2 * temp_f14);
|
||||
arg2->unk4 = temp_f2 - (temp_f20_2 * temp_f16);
|
||||
arg2->unk8 = temp_f12 - (temp_f20_2 * temp_f18);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002A5F4.s")
|
||||
|
||||
Reference in New Issue
Block a user