Imported funcs from sm64 to code_80004740.c and trig_tables.inc.c (#68)

* fixed float issue brought over from zeldaret

* Import trig_tables.inc.c

* Delete game_data_802BA370.s

* Import two funcs from sm64 into code_80004740.c
This commit is contained in:
CoderStig
2021-11-28 15:42:03 -07:00
committed by GitHub
parent 7387724509
commit 632512ada9
132 changed files with 2469 additions and 6154 deletions
+27
View File
@@ -5571,6 +5571,33 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800CA0E4.s")
#endif
#ifdef MIPS_TO_C
switch(D_800EA1C0) {
case 0:
D_800EA0F0 = 1;
func_800CA0E4(&D_800EA0EC, 1);
break;
case 1:
if ((D_800EA0EC.unk0 == 1) && (D_800EA0EC.unk1 == 1)) {
D_800EA0F0 = 1;
func_800CA0E4(&D_800EA0EC, 1);
}
break;
case 2:
if ((D_800EA0EC.unk0 == 1) && (D_800EA0EC.unk1 == 1) && (D_800EA0EC.unk2 == 1)) {
D_800EA0F0 = 1;
func_800CA0E4(&D_800EA0EC, 1);
}
break;
case 3:
if ((D_800EA0EC.unk0 == 1) && (D_800EA0EC.unk1 == 1) && (D_800EA0EC.unk2 == 1) && (D_800EA0EC.unk3 == 1)) {
D_800EA0F0 = 1;
func_800CA0E4(&D_800EA0EC, 1);
}
break;
}
}
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800CA0E4(? *, s8); // extern
extern ? D_800E9EA4;
+54 -101
View File
@@ -1,113 +1,66 @@
#include <ultra64.h>
#include <macros.h>
#include <types.h>
#include <mk64.h>
#include "math_util.h"
#ifdef MIPS_TO_C
//#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_80004740(void *arg0, f32 *arg1) {
s32 sp14;
f32 *temp_a2;
f32 temp_f18;
f32 temp_f18_2;
s32 *temp_a0;
s32 temp_a3;
void *temp_a2_2;
void *temp_v0;
void *temp_v0_2;
void *temp_v1;
void *temp_v1_2;
void *temp_v1_3;
f32 phi_f18;
void *phi_v0;
void *phi_v1;
f32 *phi_a2;
s32 phi_a3;
f32 phi_f18_2;
void *phi_v0_2;
void *phi_v1_2;
f32 *phi_a2_2;
temp_v1 = arg0 + 0x20;
temp_a0 = &sp14;
temp_f18 = *arg1 * 65536.0f;
//phi_a3 = 4;
if (4 != 0x10) {
do {
temp_a3 = phi_a3 + 4;
temp_a2 = phi_a2 + 0x10;
temp_v0 = phi_v0 + 8;
temp_v1_2 = phi_v1 + 8;
sp14 = phi_f18;
temp_v0->unk-8 = temp_a0->unk0;
temp_v1_2->unk-8 = temp_a0->unk2;
sp14 = temp_a2->unk-C * 65536.0f;
temp_v0->unk-6 = temp_a0->unk0;
temp_v1_2->unk-6 = temp_a0->unk2;
sp14 = temp_a2->unk-8 * 65536.0f;
temp_v0->unk-4 = temp_a0->unk0;
temp_v1_2->unk-4 = temp_a0->unk2;
sp14 = temp_a2->unk-4 * 65536.0f;
temp_v0->unk-2 = temp_a0->unk0;
temp_v1_2->unk-2 = temp_a0->unk2;
temp_f18_2 = temp_a2->unk0 * 65536.0f;
void func_80004740(Mtx *dest, Mat4 src) {
#ifdef AVOID_UB
// Avoid type-casting which is technically UB by calling the equivalent
// guMtxF2L function. This helps little-endian systems, as well.
guMtxF2L(src, dest);
#else
s32 asFixedPoint;
register s32 i;
register s16 *a3 = (s16 *) dest; // all integer parts stored in first 16 bytes
register s16 *t0 = (s16 *) dest + 16; // all fraction parts stored in last 16 bytes
register f32 *t1 = (f32 *) src;
} while (temp_a3 != 0x10);
for (i = 0; i < 16; i++) {
asFixedPoint = *t1++ * (1 << 16); //! float-to-integer conversion responsible for PU crashes
*a3++ = GET_HIGH_S16_OF_32(asFixedPoint); // integer part
*t0++ = GET_LOW_S16_OF_32(asFixedPoint); // fraction part
}
temp_a2_2 = phi_a2_2 + 0x10;
temp_v0_2 = phi_v0_2 + 8;
temp_v1_3 = phi_v1_2 + 8;
sp14 = phi_f18_2;
temp_v0_2->unk-8 = temp_a0->unk0;
temp_v1_3->unk-8 = temp_a0->unk2;
sp14 = temp_a2_2->unk-C * 65536.0f;
temp_v0_2->unk-6 = temp_a0->unk0;
temp_v1_3->unk-6 = temp_a0->unk2;
sp14 = temp_a2_2->unk-8 * 65536.0f;
temp_v0_2->unk-4 = temp_a0->unk0;
temp_v1_3->unk-4 = temp_a0->unk2;
sp14 = temp_a2_2->unk-4 * 65536.0f;
temp_v0_2->unk-2 = temp_a0->unk0;
temp_v1_3->unk-2 = temp_a0->unk2;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80004740/func_80004740.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
void func_800048D8(void *arg0, void *arg1, void *arg2) {
temp_f20 = func_802B8018(arg2->unk0);
temp_f22 = func_802B8038(arg2->unk0);
sp3C = func_802B8018(arg2->unk2);
sp38 = func_802B8038(arg2->unk2);
sp34 = func_802B8018(arg2->unk4);
temp_f0 = func_802B8038(arg2->unk4);
temp_f4 = sp38 * temp_f0;
arg0->unk8 = -sp3C;
arg0->unkC = 0.0f;
temp_f12 = temp_f20 * sp3C;
arg0->unk0 = temp_f4;
arg0->unk4 = sp38 * sp34;
arg0->unk10 = (temp_f12 * temp_f0) - (temp_f22 * sp34);
temp_f12_2 = temp_f22 * sp3C;
arg0->unk18 = temp_f20 * sp38;
arg0->unk14 = (temp_f12 * sp34) + (temp_f22 * temp_f0);
arg0->unk1C = 0.0f;
arg0->unk2C = 0.0f;
arg0->unk20 = (temp_f12_2 * temp_f0) + (temp_f20 * sp34);
arg0->unk28 = temp_f22 * sp38;
arg0->unk24 = (temp_f12_2 * sp34) - (temp_f20 * temp_f0);
arg0->unk30 = arg1->unk0;
arg0->unk34 = arg1->unk4;
arg0->unk3C = 1.0f;
arg0->unk38 = arg1->unk8;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80004740/func_800048D8.s")
#endif
extern f32 sins(u16);
extern f32 coss(u16);
void func_800048D8(Mat4 dest, Vec3f b, Vec3s c) {
register f32 sx = sins(c[0]);
register f32 cx = coss(c[0]);
register f32 sy = sins(c[1]);
register f32 cy = coss(c[1]);
register f32 sz = sins(c[2]);
register f32 cz = coss(c[2]);
dest[0][0] = cy * cz;
dest[0][1] = cy * sz;
dest[0][2] = -sy;
dest[0][3] = 0.0f;
dest[1][0] = sx * sy * cz - cx * sz;
dest[1][1] = sx * sy * sz + cx * cz;
dest[1][2] = sx * cy;
dest[1][3] = 0.0f;
dest[2][0] = cx * sy * cz + sx * sz;
dest[2][1] = cx * sy * sz - sx * cz;
dest[2][2] = cx * cy;
dest[2][3] = 0.0f;
dest[3][0] = b[0];
dest[3][1] = b[1];
dest[3][2] = b[2];
dest[3][3] = 1.0f;
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
+25 -25
View File
@@ -55,8 +55,8 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80006018.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32, s16, void *); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32, s16, void *); // extern
f32 coss(s32); // extern
void func_80006114(void *arg0, void *arg1, s16 arg2) {
f32 sp34;
@@ -81,8 +81,8 @@ void func_80006114(void *arg0, void *arg1, s16 arg2) {
arg0 = temp_a3;
sp1C = temp_a0;
sp30 = temp_f10 - arg1->unk8;
sp24 = func_802B8018(temp_a0, phi_a2, temp_a3);
temp_f0 = func_802B8038(temp_a0);
sp24 = sins(temp_a0, phi_a2, temp_a3);
temp_f0 = coss(temp_a0);
temp_f6 = (sp30 * temp_f0) - (sp34 * sp24);
arg0->unk0 = arg1->unk0 + ((sp34 * temp_f0) + (sp30 * sp24));
arg0->unk8 = arg1->unk8 + temp_f6;
@@ -5346,8 +5346,8 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000DD78.s")
f32 func_802ABE30(f32, ?, void *, f32, u16); /* extern */
? func_802ADDC8(void *, ?, f32, f32, f32); /* extern */
s32 func_802B5224(? *, ? *, ? *, u16); /* extern */
f32 func_802B8018(s32, s32, s32); /* extern */
f32 func_802B8038(s32, s32, s32, s32); /* extern */
f32 sins(s32, s32, s32); /* extern */
f32 coss(s32, s32, s32, s32); /* extern */
f32 sqrtf(f32, f32, ? *, ? *); /* extern */
extern ? D_80162FB0;
extern ? D_80162FC0;
@@ -5543,8 +5543,8 @@ void func_8000DF8C(s32 arg0, f32 arg1, s32 arg2, s32 arg3) {
temp_t6 = ((temp_t4 * 0xFFFF) / 360) & 0xFFFF;
sp48 = temp_t4;
sp44 = temp_t6;
sp118 = func_802B8038(temp_t6, phi_a1, phi_a2, phi_a3) * 25.0;
temp_f0_3 = func_802B8018(sp44);
sp118 = coss(temp_t6, phi_a1, phi_a2, phi_a3) * 25.0;
temp_f0_3 = sins(sp44);
temp_v0_2 = D_80164550 + (spCA * 8);
temp_f20_2 = temp_s0->unk50 + 3.5f;
temp_t7 = ((((sp48 + 1) % 360) * 0xFFFF) / 360) & 0xFFFF;
@@ -5555,8 +5555,8 @@ void func_8000DF8C(s32 arg0, f32 arg1, s32 arg2, s32 arg3) {
sp110 = temp_v0_2;
temp_f24_2 = temp_v0_2->unk4 + (temp_f0_3 * 25.0);
D_80162FB0.unk8 = temp_f24_2;
sp118 = func_802B8038(temp_t7) * 25.0;
temp_f10 = func_802B8018(sp44);
sp118 = coss(temp_t7) * 25.0;
temp_f10 = sins(sp44);
D_80162FC0.unk0 = temp_v0_2->unk0 + sp118;
D_80162FC0.unk4 = temp_v0_2->unk2;
D_80162FC0.unk8 = temp_v0_2->unk4 + (temp_f10 * 25.0);
@@ -5571,11 +5571,11 @@ void func_8000DF8C(s32 arg0, f32 arg1, s32 arg2, s32 arg3) {
temp_a0_2 = ((temp_v0_3 * 0xFFFF) / 360) & 0xFFFF;
sp44 = temp_a0_2;
sp48 = temp_v0_3;
sp118 = func_802B8038(temp_a0_2, phi_a1, phi_a2, phi_a3) * 25.0;
sp118 = coss(temp_a0_2, phi_a1, phi_a2, phi_a3) * 25.0;
temp_v0_4 = D_80164550 + (spCA * 8);
temp_f22_3 = temp_v0_4->unk0 + sp118;
temp_f20_3 = temp_s0->unk50 + 3.5f;
temp_f4 = func_802B8018(temp_a0_2) * 25.0;
temp_f4 = sins(temp_a0_2) * 25.0;
temp_a0_3 = ((((sp48 + 1) % 360) * 0xFFFF) / 360) & 0xFFFF;
D_80162FB0.unk0 = temp_f22_3;
D_80162FB0.unk4 = temp_f20_3;
@@ -5583,8 +5583,8 @@ void func_8000DF8C(s32 arg0, f32 arg1, s32 arg2, s32 arg3) {
sp110 = temp_v0_4;
temp_f24_3 = temp_v0_4->unk4 + temp_f4;
D_80162FB0.unk8 = temp_f24_3;
sp118 = func_802B8038(temp_a0_3) * 25.0;
temp_f8 = func_802B8018(temp_a0_3);
sp118 = coss(temp_a0_3) * 25.0;
temp_f8 = sins(temp_a0_3);
D_80162FC0.unk0 = temp_v0_4->unk0 + sp118;
D_80162FC0.unk4 = temp_v0_4->unk2;
D_80162FC0.unk8 = temp_v0_4->unk4 + (temp_f8 * 25.0);
@@ -5688,9 +5688,9 @@ block_42:
temp_t7_2 = (0xFFFF - spC2) & 0xFFFF;
sp108 = 2.0f * phi_f12;
sp48 = temp_t7_2;
sp118 = func_802B8038((bitwise s32) phi_f12, temp_t7_2) * phi_f12;
sp118 = coss((bitwise s32) phi_f12, temp_t7_2) * phi_f12;
temp_t9_2 = (phi_s1_2 + 1) & 0xFFFF;
temp_f18 = func_802B8018((bitwise s32) phi_f12, sp48) * phi_f12;
temp_f18 = sins((bitwise s32) phi_f12, sp48) * phi_f12;
temp_f2_4 = (phi_f20_2 - 2.3f) + (sp108 / 3.0f);
spAC = temp_f2_4;
spA0 = temp_f2_4;
@@ -5705,8 +5705,8 @@ block_42:
} else {
temp_t2_2 = (0xFFFF - spC2) & 0xFFFF;
sp48 = temp_t2_2;
sp118 = func_802B8038(temp_t2_2) * 1.5f;
temp_f18_2 = func_802B8018(sp48) * 1.5f;
sp118 = coss(temp_t2_2) * 1.5f;
temp_f18_2 = sins(sp48) * 1.5f;
temp_f16_2 = phi_f20_2 - 2.3f;
temp_f12_4 = (sp7C % 3) * 0.15f;
temp_f14_2 = temp_f16_2 - temp_f12_4;
@@ -5718,7 +5718,7 @@ block_42:
sp88 = temp_f12_5;
sp4C = sp7C;
temp_f18_3 = temp_f18_2;
temp_f20_5 = phi_f20_2 + func_802B8018((bitwise s32) temp_f12_5, (bitwise s32) temp_f14_2, ((sp7C * 0x13FFEC) / 360) & 0xFFFF);
temp_f20_5 = phi_f20_2 + sins((bitwise s32) temp_f12_5, (bitwise s32) temp_f14_2, ((sp7C * 0x13FFEC) / 360) & 0xFFFF);
sp7C = (sp7C + 1) % 18;
phi_f18 = temp_f18_3;
phi_f20_3 = temp_f20_5;
@@ -10110,8 +10110,8 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80014EE4.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern ? D_801646C0;
void func_800151A4(void *arg0, s32 arg1) {
@@ -10151,12 +10151,12 @@ void func_800151A4(void *arg0, s32 arg1) {
temp_f10 = temp_f16 / temp_f0;
sp40 = temp_f8;
sp3C = temp_f10;
sp28 = 1.0 - func_802B8038(temp_s1 & 0xFFFF);
arg0->unk18 = (sp28 * sp44 * sp40) - (func_802B8018(temp_s1 & 0xFFFF) * temp_f10);
sp28 = 1.0 - coss(temp_s1 & 0xFFFF);
arg0->unk18 = (sp28 * sp44 * sp40) - (sins(temp_s1 & 0xFFFF) * temp_f10);
temp_f2_2 = sp28 * sp40;
arg0->unk1C = func_802B8038(temp_s1 & 0xFFFF) + (temp_f2_2 * sp40);
arg0->unk1C = coss(temp_s1 & 0xFFFF) + (temp_f2_2 * sp40);
sp20 = temp_f2_2;
arg0->unk20 = (func_802B8018(temp_s1 & 0xFFFF) * sp44) + (temp_f2_2 * temp_f10);
arg0->unk20 = (sins(temp_s1 & 0xFFFF) * sp44) + (temp_f2_2 * temp_f10);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800151A4.s")
+52 -52
View File
@@ -61,8 +61,8 @@ GLOBAL_ASM("asm/non_matchings/code_8001F980/func_8001F9E4.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
u16 func_8001FB0C(void *arg0, void *arg1, f32 arg2, f32 arg3) {
f32 sp64;
@@ -108,13 +108,13 @@ u16 func_8001FB0C(void *arg0, void *arg1, f32 arg2, f32 arg3) {
phi_v0 = 0x293C;
}
sp42 = phi_v0;
sp4C = arg1->unk8 + (arg2 * func_802B8038((arg1->unk26 - phi_v0) & 0xFFFF));
sp58 = arg1->unk0 + (arg2 * func_802B8018((arg1->unk26 - phi_v0) & 0xFFFF));
temp_f10 = arg1->unk8 + (arg2 * func_802B8038((arg1->unk26 + phi_v0) & 0xFFFF));
sp4C = arg1->unk8 + (arg2 * coss((arg1->unk26 - phi_v0) & 0xFFFF));
sp58 = arg1->unk0 + (arg2 * sins((arg1->unk26 - phi_v0) & 0xFFFF));
temp_f10 = arg1->unk8 + (arg2 * coss((arg1->unk26 + phi_v0) & 0xFFFF));
sp48 = temp_f10;
sp54 = arg1->unk0 + (arg2 * func_802B8018((arg1->unk26 + phi_v0) & 0xFFFF));
sp44 = arg1->unk8 + (arg3 * func_802B8038((arg1->unk26 + 0x5FFA) & 0xFFFF));
sp50 = arg1->unk0 + (arg3 * func_802B8018((arg1->unk26 + 0x5FFA) & 0xFFFF));
sp54 = arg1->unk0 + (arg2 * sins((arg1->unk26 + phi_v0) & 0xFFFF));
sp44 = arg1->unk8 + (arg3 * coss((arg1->unk26 + 0x5FFA) & 0xFFFF));
sp50 = arg1->unk0 + (arg3 * sins((arg1->unk26 + 0x5FFA) & 0xFFFF));
temp_f12 = arg0->unk14;
temp_f2 = arg0->unk1C;
temp_f16 = sp54 - temp_f12;
@@ -141,8 +141,8 @@ GLOBAL_ASM("asm/non_matchings/code_8001F980/func_8001FB0C.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
u16 func_8001FD78(void *arg0, f32 arg1, ? arg2, f32 arg3) {
f32 sp64;
@@ -168,12 +168,12 @@ u16 func_8001FD78(void *arg0, f32 arg1, ? arg2, f32 arg3) {
f32 temp_f8;
sp42 = 0;
sp58 = arg0->unk1C + (70.0f * func_802B8038(((arg0->unkC0 - arg0->unk2E) - 0x71C) & 0xFFFF));
sp64 = arg0->unk14 + (70.0f * func_802B8018(((arg0->unkC0 - arg0->unk2E) - 0x71C) & 0xFFFF));
sp54 = arg0->unk1C + (70.0f * func_802B8038(((arg0->unkC0 - arg0->unk2E) + 0x71C) & 0xFFFF));
sp60 = arg0->unk14 + (70.0f * func_802B8018(((arg0->unkC0 - arg0->unk2E) + 0x71C) & 0xFFFF));
sp50 = arg0->unk1C + (10.0f * func_802B8038(((arg0->unkC0 - arg0->unk2E) + 0x1C70) & 0xFFFF));
temp_f8 = arg0->unk14 + (10.0f * func_802B8018(((arg0->unkC0 - arg0->unk2E) + 0x1C70) & 0xFFFF));
sp58 = arg0->unk1C + (70.0f * coss(((arg0->unkC0 - arg0->unk2E) - 0x71C) & 0xFFFF));
sp64 = arg0->unk14 + (70.0f * sins(((arg0->unkC0 - arg0->unk2E) - 0x71C) & 0xFFFF));
sp54 = arg0->unk1C + (70.0f * coss(((arg0->unkC0 - arg0->unk2E) + 0x71C) & 0xFFFF));
sp60 = arg0->unk14 + (70.0f * sins(((arg0->unkC0 - arg0->unk2E) + 0x71C) & 0xFFFF));
sp50 = arg0->unk1C + (10.0f * coss(((arg0->unkC0 - arg0->unk2E) + 0x1C70) & 0xFFFF));
temp_f8 = arg0->unk14 + (10.0f * sins(((arg0->unkC0 - arg0->unk2E) + 0x1C70) & 0xFFFF));
sp5C = temp_f8;
temp_f16 = sp58 - arg3;
sp20 = arg3;
@@ -911,8 +911,8 @@ GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80021DA8.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
void func_80021E10(void *arg0, void *arg1, void *arg2) {
f32 sp38;
@@ -925,12 +925,12 @@ void func_80021E10(void *arg0, void *arg1, void *arg2) {
f32 temp_f20;
f32 temp_f6;
sp38 = func_802B8018(arg2->unk0);
temp_f20 = func_802B8038(arg2->unk0);
sp30 = func_802B8018(arg2->unk2);
sp2C = func_802B8038(arg2->unk2);
sp28 = func_802B8018(arg2->unk4);
temp_f0 = func_802B8038(arg2->unk4);
sp38 = sins(arg2->unk0);
temp_f20 = coss(arg2->unk0);
sp30 = sins(arg2->unk2);
sp2C = coss(arg2->unk2);
sp28 = sins(arg2->unk4);
temp_f0 = coss(arg2->unk4);
temp_f12 = sp38 * sp30;
temp_f6 = temp_f12 * temp_f0;
arg0->unk0 = (sp2C * temp_f0) + (temp_f12 * sp28);
@@ -1771,8 +1771,8 @@ GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80023BF0.s")
? func_80022180(void *, ? *); // extern
? func_80042A20(? *, f32 *, f32 *, s32, f32); // extern
? func_8004B414(?, ?, ?, ?); // extern
f32 func_802B8018(u16, s32); // extern
f32 func_802B8038(s32, s32); // extern
f32 sins(u16, s32); // extern
f32 coss(s32, s32); // extern
extern ? D_0D008C78;
extern ? D_0D008D58;
extern ? D_800DDBD4;
@@ -1838,8 +1838,8 @@ void func_80023C84(void *arg0, s8 arg1, s8 arg2) {
temp_t7 = (temp_v0 + (arg0 + (arg2 * 2))->unk48 + temp_v1) & 0xFFFF;
temp_t9 = ((temp_t7 / 0x80) << 7) & 0xFFFF;
spC0 = -temp_v0 - temp_v1;
spB0 = -func_802B8038(temp_t9 & 0xFFFF, temp_t7) * 2.0f;
spAC = -func_802B8018(temp_t9 & 0xFFFF) * 2.0f;
spB0 = -coss(temp_t9 & 0xFFFF, temp_t7) * 2.0f;
spAC = -sins(temp_t9 & 0xFFFF) * 2.0f;
temp_v0_2 = arg0->unkBC;
temp_v1_2 = temp_v0_2 & 0x400;
if (((temp_v0_2 & 0x1000000) == 0x1000000) || (temp_v1_2 == 0x400) || ((temp_v0_2 & 0x80000) == 0x80000) || ((temp_v0_2 & 0x800000) == 0x800000) || (temp_v1_2 == 0x400) || ((arg0->unkCA & 2) == 2) || ((temp_v0_2 & 0x2000000) == 0x2000000) || ((temp_v0_2 & 0x10000) == 0x10000) || ((temp_v0_2 & 8) == 8)) {
@@ -1856,21 +1856,21 @@ void func_80023C84(void *arg0, s8 arg1, s8 arg2) {
spBC = arg0->unk148;
sp9C = phi_f2_2;
spB8 = arg0->unk144;
sp38 = func_802B8018(spC0, 0x400);
spCC = (func_802B8038(spC0 & 0xFFFF) * spAC) + (spB0 * sp38) + arg0->unk14;
sp38 = sins(spC0, 0x400);
spCC = (coss(spC0 & 0xFFFF) * spAC) + (spB0 * sp38) + arg0->unk14;
spD0 = arg0->unk74 + 1.0f;
sp38 = func_802B8038(spC0 & 0xFFFF);
spD4 = ((spB0 * sp38) - (func_802B8018(spC0 & 0xFFFF) * spAC)) + arg0->unk1C;
sp38 = coss(spC0 & 0xFFFF);
spD4 = ((spB0 * sp38) - (sins(spC0 & 0xFFFF) * spAC)) + arg0->unk1C;
func_80042A20(&sp118, &spB4, &spCC, (spC0 + arg0->unk42) & 0xFFFF, *(&D_800DDBD4 + (arg0->unk254 * 4)) * arg0->unk224 * phi_f2_2);
} else {
spC4 = arg0->unkC4;
spC6 = spC0;
spC8 = arg0->unk206 * 2;
sp38 = func_802B8018(spC0, 0x400);
spCC = (func_802B8038(spC0 & 0xFFFF) * spAC) + (spB0 * sp38) + arg0->unk14;
sp38 = sins(spC0, 0x400);
spCC = (coss(spC0 & 0xFFFF) * spAC) + (spB0 * sp38) + arg0->unk14;
spD0 = arg0->unk74 + 1.0f;
sp38 = func_802B8038(spC0 & 0xFFFF);
spD4 = ((spB0 * sp38) - (func_802B8018(spC0 & 0xFFFF) * spAC)) + arg0->unk1C;
sp38 = coss(spC0 & 0xFFFF);
spD4 = ((spB0 * sp38) - (sins(spC0 & 0xFFFF) * spAC)) + arg0->unk1C;
func_80021E10(&sp118, &spCC, &spC4);
func_80021F84(&sp118, *(&D_800DDBD4 + (arg0->unk254 * 4)) * arg0->unk224);
}
@@ -1985,8 +1985,8 @@ GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80023C84.s")
? func_80021F84(? *, f32); // extern
? func_80022180(void *, ? *); // extern
? func_8004B414(?, ?, ?, ?); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32, s32); // extern
f32 sins(s32); // extern
f32 coss(s32, s32); // extern
extern ? D_0D008C78;
extern ? D_0D008D58;
extern ? D_800DDBD4;
@@ -2052,18 +2052,18 @@ void func_80024374(void *arg0, s8 arg1, s8 arg2) {
temp_t6 = (temp_v0 + (arg0 + (arg2 * 2))->unk48 + temp_v1) & 0xFFFF;
temp_t9 = ((temp_t6 / 0x80) << 7) & 0xFFFF;
spC0 = -temp_v0 - temp_v1;
spB0 = -func_802B8038(temp_t9 & 0xFFFF, temp_t6) * 3.0f;
temp_f18 = -func_802B8018(temp_t9 & 0xFFFF) * 3.0f;
spB0 = -coss(temp_t9 & 0xFFFF, temp_t6) * 3.0f;
temp_f18 = -sins(temp_t9 & 0xFFFF) * 3.0f;
spC4 = 0;
temp_s0 = spC0 & 0xFFFF;
spC8 = 0;
spC6 = spC0;
spAC = temp_f18;
sp30 = func_802B8018(temp_s0 & 0xFFFF);
spCC = (func_802B8038(temp_s0 & 0xFFFF) * spAC) + (spB0 * sp30) + arg0->unk14;
sp30 = func_802B8038(temp_s0 & 0xFFFF);
sp30 = sins(temp_s0 & 0xFFFF);
spCC = (coss(temp_s0 & 0xFFFF) * spAC) + (spB0 * sp30) + arg0->unk14;
sp30 = coss(temp_s0 & 0xFFFF);
temp_t8 = arg1 * 4;
spD4 = ((spB0 * sp30) - (func_802B8018(temp_s0 & 0xFFFF) * temp_f18)) + arg0->unk1C;
spD4 = ((spB0 * sp30) - (sins(temp_s0 & 0xFFFF) * temp_f18)) + arg0->unk1C;
spD0 = (sp + temp_t8)->unk94 + *(&D_80165C20 + (*(&D_80183EA0 + temp_t8) * 0xE0));
func_80021E10(&sp118, &spCC, &spC4);
func_80021F84(&sp118, *(&D_800DDBD4 + (arg0->unk254 * 4)) * arg0->unk224);
@@ -2179,7 +2179,7 @@ GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80024374.s")
? func_80022180(void *, ? *); // extern
? func_8004B614(u16, u16, u16, u16, s32, s32, s32); // extern
? func_80062B18(f32 *, f32 *, f32 *, f32, f32, f32, s32, s32); // extern
f32 func_802B8018(s32); // extern
f32 sins(s32); // extern
extern ? D_0D008C78;
extern ? D_0D008CD8;
extern ? D_800DDBB4;
@@ -2303,7 +2303,7 @@ void func_800248D0(void *arg0, s8 arg1, s8 arg2, s8 arg3) {
if ((arg0->unkBC & 8) == 8) {
sp14C = *(&D_80164714 + (arg2 * 0xB8)) - 0x4000;
} else {
sp14C = -(func_802B8018((arg0->unk2E + temp_v0_2->unk48 + arg0->unkC0) & 0xFFFF) * temp_v0_2->unkCC) * D_800ED6D0;
sp14C = -(sins((arg0->unk2E + temp_v0_2->unk48 + arg0->unkC0) & 0xFFFF) * temp_v0_2->unkCC) * D_800ED6D0;
}
sp14E = temp_v0_2->unk48;
sp150 = temp_v0_2->unk50;
@@ -2618,7 +2618,7 @@ GLOBAL_ASM("asm/non_matchings/code_8001F980/func_800248D0.s")
? func_80022180(void *, ? *); // extern
? func_8004B614(u16, u16, u16, u16, s32, s32, s32); // extern
? func_80062B18(f32 *, f32 *, f32 *, f32, f32, f32, s32, s32); // extern
f32 func_802B8018(s32); // extern
f32 sins(s32); // extern
extern ? D_0D008C78;
extern ? D_0D008CD8;
extern ? D_800DDBB4;
@@ -2694,7 +2694,7 @@ void func_800256F4(void *arg0, s8 arg1, s8 arg2, s8 arg3) {
}
temp_v0 = arg0 + (arg2 * 2);
sp44 = temp_v0;
spD4 = -(func_802B8018((temp_v0->unk48 - arg0->unk2E) & 0xFFFF) * 0.0f) * D_800ED6D8;
spD4 = -(sins((temp_v0->unk48 - arg0->unk2E) & 0xFFFF) * 0.0f) * D_800ED6D8;
spD6 = temp_v0->unk48;
spD8 = temp_v0->unk50;
func_80062B18(&spD0, &spCC, &spC8, 0.0f, 1.5f, 0.0f, -temp_v0->unk48, temp_v0->unk50);
@@ -2852,8 +2852,8 @@ GLOBAL_ASM("asm/non_matchings/code_8001F980/func_800256F4.s")
? func_80021F84(? *, f32); // extern
? func_80022180(void *, ? *); // extern
? func_8004B614(u16, u16, u16, u16, s32, s32, s32); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern ? D_0D008C78;
extern ? D_0D008D10;
extern ? D_800DDBB4;
@@ -2906,9 +2906,9 @@ void func_80025DE8(void *arg0, s8 arg1, s8 arg2, s8 arg3) {
void *temp_v0_8;
void *temp_v0_9;
sp9C = (func_802B8018(-arg0->unk2E & 0xFFFF) * -1.5) + arg0->unk14;
sp9C = (sins(-arg0->unk2E & 0xFFFF) * -1.5) + arg0->unk14;
spA0 = ((arg0->unk18 - arg0->unk70) + arg0->unk108) + D_800ED6E0;
temp_f4 = func_802B8038(-arg0->unk2E & 0xFFFF) * -1.5;
temp_f4 = coss(-arg0->unk2E & 0xFFFF) * -1.5;
sp94 = -0xB6;
temp_v0 = arg0 + (arg2 * 2);
spA4 = temp_f4 + arg0->unk1C;
+22 -22
View File
@@ -831,8 +831,8 @@ GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80029200.s")
? func_80029200(Player *, s8); // extern
s16 func_802B7830(f32, f32); // extern
s32 func_802B7C40(f32, s32); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern ? D_800DDBD4;
extern f64 D_800ED788;
extern f64 D_800ED790;
@@ -938,8 +938,8 @@ void func_8002934C(Player *player, s32 arg1, s8 arg2, s8 arg3) {
func_80029200(player, arg2);
temp_a0 = (player->unk_02E + phi_a3->unk48 + player->unk_0C0) & 0xFFFF;
sp20 = temp_a0;
sp28 = func_802B8018(temp_a0);
func_80022634(phi_a3 + 0x50, (func_802B8038(temp_a0) * phi_a3->unkCC) + (phi_a3->unkD4 * sp28), 0x3F000000, phi_a3);
sp28 = sins(temp_a0);
func_80022634(phi_a3 + 0x50, (coss(temp_a0) * phi_a3->unkCC) + (phi_a3->unkD4 * sp28), 0x3F000000, phi_a3);
temp_a0_2 = phi_a3->unk244;
temp_t3 = arg2 * 4;
temp_v1_2 = 4 << temp_t3;
@@ -1226,8 +1226,8 @@ s32 func_802ABD10(u16); // extern
s32 func_802ABD7C(u16); // extern
f32 func_802ABE30(f32, f32, f32, u16); // extern
s32 func_802B7C40(f32); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern ? D_800DDBD4;
void func_8002A194(void *arg0, f32 arg1, f32 arg2, f32 arg3) {
@@ -1264,26 +1264,26 @@ void func_8002A194(void *arg0, f32 arg1, f32 arg2, f32 arg3) {
temp_t7 = (temp_v1 + 0x2000) & 0xFFFF;
sp28 = temp_t7;
sp3A = temp_v1;
arg0->unk1A0 = (func_802B8038(temp_t7) * phi_f20) + arg3;
temp_f12 = (func_802B8018(sp28) * phi_f20) + arg1;
arg0->unk1A0 = (coss(temp_t7) * phi_f20) + arg3;
temp_f12 = (sins(sp28) * phi_f20) + arg1;
arg0->unk198 = temp_f12;
arg0->unk1A8 = func_802ABE30(temp_f12, arg2, arg0->unk1A0, arg0->unk11A);
temp_t8 = (sp3A - 0x2000) & 0xFFFF;
sp28 = temp_t8;
arg0->unk1B8 = (func_802B8038(temp_t8) * phi_f20) + arg3;
temp_f12_2 = (func_802B8018(sp28) * phi_f20) + arg1;
arg0->unk1B8 = (coss(temp_t8) * phi_f20) + arg3;
temp_f12_2 = (sins(sp28) * phi_f20) + arg1;
arg0->unk1B0 = temp_f12_2;
arg0->unk1C0 = func_802ABE30(temp_f12_2, arg2, arg0->unk1B8, arg0->unk11A);
temp_t9 = (sp3A + 0x6000) & 0xFFFF;
sp28 = temp_t9;
arg0->unk1D0 = (func_802B8038(temp_t9) * phi_f20) + arg3;
temp_f12_3 = (func_802B8018(sp28) * phi_f20) + arg1;
arg0->unk1D0 = (coss(temp_t9) * phi_f20) + arg3;
temp_f12_3 = (sins(sp28) * phi_f20) + arg1;
arg0->unk1C8 = temp_f12_3;
arg0->unk1D8 = func_802ABE30(temp_f12_3, arg2, arg0->unk1D0, arg0->unk11A);
temp_t0 = (sp3A - 0x6000) & 0xFFFF;
sp28 = temp_t0;
arg0->unk1E8 = (func_802B8038(temp_t0) * phi_f20) + arg3;
arg0->unk1E0 = (func_802B8018(sp28) * phi_f20) + arg1;
arg0->unk1E8 = (coss(temp_t0) * phi_f20) + arg3;
arg0->unk1E0 = (sins(sp28) * phi_f20) + arg1;
arg0->unk1F0 = func_802ABE30(arg0->unk1C8, arg2, arg0->unk1D0, arg0->unk11A);
if ((arg0->unkBC & 8) != 8) {
temp_f0 = arg0->unk1A8;
@@ -1693,8 +1693,8 @@ GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002AB70.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
u16 func_802B7830(f32, f32, s16, void *); // extern
f32 func_802B8018(s32, void *); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32, void *); // extern
f32 coss(s32); // extern
void func_8002AE38(void *arg0, s8 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) {
s16 sp2E;
@@ -1723,11 +1723,11 @@ void func_8002AE38(void *arg0, s8 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5)
temp_a2 = arg0;
temp_a0 = arg0->unk2E;
arg0 = temp_a2;
sp28 = (func_802B8018(-temp_a0 & 0xFFFF, temp_a2) * arg0->unk94) + arg2;
sp28 = (sins(-temp_a0 & 0xFFFF, temp_a2) * arg0->unk94) + arg2;
temp_a2_2 = arg0;
temp_f2 = temp_a2_2->unk94;
temp_v0 = temp_a2_2->unkBC;
temp_f16 = (func_802B8038(-arg0->unk2E & 0xFFFF) * temp_f2) + arg3;
temp_f16 = (coss(-arg0->unk2E & 0xFFFF) * temp_f2) + arg3;
phi_a2 = temp_a2_2;
if (((temp_v0 & 0x800) != 0x800) && ((temp_v0 & 0x10) != 0x10) && ((temp_a2_2->unk44 & 0x4000) == 0) && ((((temp_f2 / 18.0f) * 216.0f) <= 8.0f) || ((temp_t2 = temp_a2_2->unk7C >> 0x10, ((temp_t2 < 5) != 0)) && (temp_t2 >= -4)))) {
if ((temp_v0 & 0x20) == 0x20) {
@@ -2935,8 +2935,8 @@ s32 func_802ABDB8(u16); // extern
f32 func_802ABE30(f32, f32, f32, u16); // extern
? func_802AD950(s16 *, f32, f32, f32, f32, f32, f32, f32); // extern
? func_802B63B8(f32 *, f32 *); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(f32, f32, s32, s32); // extern
f32 sins(s32); // extern
f32 coss(f32, f32, s32, s32); // extern
extern ? D_800E3CE8;
extern ? D_800E3CF4;
extern ? D_800E3D00;
@@ -3146,9 +3146,9 @@ void func_8002D268(Player *player, s32 arg1, s8 arg2, s8 arg3) {
spB0 = player->unk_100 * -1.0f;
spAC = phi_f14 * 0.0f;
}
sp60 = func_802B8038(phi_f12, phi_f14, (player->unk_02E + player->unk_0C0) & 0xFFFF, 1);
sp60 = coss(phi_f12, phi_f14, (player->unk_02E + player->unk_0C0) & 0xFFFF, 1);
temp_a1 = player->unk_174;
temp_f2_3 = (func_802B8018((player->unk_02E + player->unk_0C0) & 0xFFFF) * -(player->rotX - player->posX)) + ((player->rotZ - player->posZ) * sp60);
temp_f2_3 = (sins((player->unk_02E + player->unk_0C0) & 0xFFFF) * -(player->rotX - player->posX)) + ((player->rotZ - player->posZ) * sp60);
if (D_800ED7E8 < temp_f2_3) {
player->unk_044 |= 8;
} else {
+46 -46
View File
@@ -397,24 +397,24 @@ UNUSED s32 func_800416AC(f32 arg0, f32 arg1) {
return func_802B7830(arg1, arg0);
}
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
f32 func_800416D8(f32 arg0, f32 arg1, u16 arg2) {
f32 sp1C;
sp1C = func_802B8038(arg2);
return (sp1C * arg0) - (func_802B8018(arg2) * arg1);
sp1C = coss(arg2);
return (sp1C * arg0) - (sins(arg2) * arg1);
}
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
f32 func_80041724(f32 arg0, f32 arg1, u16 arg2) {
f32 sp1C;
sp1C = func_802B8018(arg2);
return (func_802B8038(arg2) * arg1) + (sp1C * arg0);
sp1C = sins(arg2);
return (coss(arg2) * arg1) + (sp1C * arg0);
}
s32 func_80041770(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
@@ -560,8 +560,8 @@ GLOBAL_ASM("asm/non_matchings/code_80040E50/func_80041A78.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16, void *); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16, void *); // extern
f32 coss(u16); // extern
void func_80041AD8(void *arg0, u16 arg1) {
f32 sp1C;
@@ -570,8 +570,8 @@ void func_80041AD8(void *arg0, u16 arg1) {
temp_a2 = arg0;
arg0 = temp_a2;
sp1C = func_802B8018(arg1, temp_a2);
temp_f0 = func_802B8038(arg1);
sp1C = sins(arg1, temp_a2);
temp_f0 = coss(arg1);
arg0->unk0 = temp_f0;
arg0->unk10 = -sp1C;
arg0->unk14 = temp_f0;
@@ -619,8 +619,8 @@ GLOBAL_ASM("asm/non_matchings/code_80040E50/func_80041B68.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16, void *); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16, void *); // extern
f32 coss(u16); // extern
void func_80041BBC(void *arg0, u16 arg1, f32 arg2) {
f32 sp1C;
@@ -629,8 +629,8 @@ void func_80041BBC(void *arg0, u16 arg1, f32 arg2) {
temp_a2 = arg0;
arg0 = temp_a2;
sp1C = func_802B8018(arg1, temp_a2);
temp_f12 = func_802B8038(arg1) * arg2;
sp1C = sins(arg1, temp_a2);
temp_f12 = coss(arg1) * arg2;
arg0->unk20 = 0.0f;
arg0->unk0 = temp_f12;
arg0->unk14 = temp_f12;
@@ -654,15 +654,15 @@ GLOBAL_ASM("asm/non_matchings/code_80040E50/func_80041BBC.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
void func_80041C64(void *arg0, s32 arg1, s32 arg2, u16 arg3, f32 arg4) {
f32 sp24;
f32 temp_f12;
sp24 = func_802B8018(arg3);
temp_f12 = func_802B8038(arg3) * arg4;
sp24 = sins(arg3);
temp_f12 = coss(arg3) * arg4;
arg0->unk20 = 0.0f;
arg0->unk0 = temp_f12;
arg0->unk10 = -sp24 * arg4;
@@ -776,8 +776,8 @@ GLOBAL_ASM("asm/non_matchings/code_80040E50/func_80042330.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
void func_800425D0(void *arg0, void *arg1, void *arg2, f32 arg3) {
f32 sp44;
@@ -790,12 +790,12 @@ void func_800425D0(void *arg0, void *arg1, void *arg2, f32 arg3) {
f32 temp_f22;
f32 temp_f8;
sp44 = func_802B8018(arg2->unk0);
temp_f22 = func_802B8038(arg2->unk0);
sp3C = func_802B8018(arg2->unk2);
sp38 = func_802B8038(arg2->unk2);
sp34 = func_802B8018(arg2->unk4);
temp_f0 = func_802B8038(arg2->unk4);
sp44 = sins(arg2->unk0);
temp_f22 = coss(arg2->unk0);
sp3C = sins(arg2->unk2);
sp38 = coss(arg2->unk2);
sp34 = sins(arg2->unk4);
temp_f0 = coss(arg2->unk4);
temp_f12 = sp44 * sp3C;
temp_f8 = temp_f12 * temp_f0;
arg0->unk0 = ((sp38 * temp_f0) + (temp_f12 * sp34)) * arg3;
@@ -849,8 +849,8 @@ GLOBAL_ASM("asm/non_matchings/code_80040E50/func_80042760.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern ? D_80165C18;
void func_800427DC(s32 arg0, void *arg1) {
@@ -866,12 +866,12 @@ void func_800427DC(s32 arg0, void *arg1) {
void *temp_s0;
temp_s0 = (arg0 * 0xE0) + &D_80165C18;
sp3C = func_802B8018(temp_s0->unkB2);
temp_f20 = func_802B8038(temp_s0->unkB2);
sp34 = func_802B8018(temp_s0->unkB4);
sp30 = func_802B8038(temp_s0->unkB4);
sp2C = func_802B8018(temp_s0->unkB6);
temp_f0 = func_802B8038(temp_s0->unkB6);
sp3C = sins(temp_s0->unkB2);
temp_f20 = coss(temp_s0->unkB2);
sp34 = sins(temp_s0->unkB4);
sp30 = coss(temp_s0->unkB4);
sp2C = sins(temp_s0->unkB6);
temp_f0 = coss(temp_s0->unkB6);
temp_f12 = sp3C * sp34;
temp_f8 = temp_f12 * temp_f0;
arg1->unk0 = temp_s0->unk0 * ((sp30 * temp_f0) + (temp_f12 * sp2C));
@@ -901,8 +901,8 @@ GLOBAL_ASM("asm/non_matchings/code_80040E50/func_800427DC.s")
? func_80041500(f32 *, f32, ?, f32); // extern
? func_80041530(f32 *); // extern
? func_80041594(f32 *, f32 *, f32 *); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
void func_80042A20(void *arg0, f32 *arg1, void *arg2, u16 arg3, f32 arg4) {
f32 sp44;
@@ -910,8 +910,8 @@ void func_80042A20(void *arg0, f32 *arg1, void *arg2, u16 arg3, f32 arg4) {
f32 sp2C;
f32 sp24;
sp24 = func_802B8018(arg3);
func_80041500(&sp44, sp24, 0, func_802B8038(arg3));
sp24 = sins(arg3);
func_80041500(&sp44, sp24, 0, coss(arg3));
func_80041530(arg1);
func_80041594(&sp38, arg1, &sp44);
func_80041530(&sp38);
@@ -940,8 +940,8 @@ GLOBAL_ASM("asm/non_matchings/code_80040E50/func_80042A20.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
void func_80042D14(void *arg0, void *arg1, void *arg2) {
f32 sp2C;
@@ -955,10 +955,10 @@ void func_80042D14(void *arg0, void *arg1, void *arg2) {
sp2C = arg1->unk0;
sp28 = arg1->unk4;
sp24 = arg1->unk8;
sp20 = func_802B8018(arg2->unk0);
sp1C = func_802B8038(arg2->unk0);
sp18 = func_802B8018(arg2->unk2);
temp_f0 = func_802B8038(arg2->unk2);
sp20 = sins(arg2->unk0);
sp1C = coss(arg2->unk0);
sp18 = sins(arg2->unk2);
temp_f0 = coss(arg2->unk2);
arg0->unk0 = (sp2C * temp_f0) - (sp24 * sp18);
arg0->unk4 = (sp2C * sp20 * sp18) + (sp28 * sp1C) + (sp24 * sp20 * temp_f0);
arg0->unk8 = ((sp2C * sp1C * sp18) - (sp28 * sp20)) + (sp24 * sp1C * temp_f0);
+12 -12
View File
@@ -4686,7 +4686,7 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004D4E8.s")
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800441E0(s32, s32, ?); // extern
? func_8004B97C(s32, s32, s32, ?, s32); // extern
f32 func_802B8018(s32); // extern
f32 sins(s32); // extern
extern ? D_0D007FE0;
extern u16 D_801656B0;
extern s16 D_80165708;
@@ -4722,8 +4722,8 @@ void func_8004D7B4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
sp5C = arg3 * 2;
do {
temp_s0 = phi_s1 & 0xFFFF;
temp_s5 = (func_802B8018(temp_s0 & 0xFFFF) * temp_f20) + (arg0 - (arg3 / 2));
func_802B8018(temp_s0 & 0xFFFF);
temp_s5 = (sins(temp_s0 & 0xFFFF) * temp_f20) + (arg0 - (arg3 / 2));
sins(temp_s0 & 0xFFFF);
func_800441E0(phi_s2, arg3, 1);
func_8004B97C(temp_s5, phi_s3, arg3, 1, 1);
temp_s4 = phi_s4 + 1;
@@ -4742,7 +4742,7 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004D7B4.s")
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800444B0(s32, s32, ?); // extern
? func_8004B97C(s32, s32, s32, ?, s32); // extern
f32 func_802B8018(s32); // extern
f32 sins(s32); // extern
extern ? D_0D007FE0;
extern u16 D_801656B0;
extern s16 D_80165708;
@@ -4776,8 +4776,8 @@ void func_8004D93C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
if (arg4 > 0) {
do {
temp_s0 = phi_s1 & 0xFFFF;
temp_s6 = (func_802B8018(temp_s0 & 0xFFFF) * temp_f20) + (arg0 - (arg3 / 2));
func_802B8018(temp_s0 & 0xFFFF);
temp_s6 = (sins(temp_s0 & 0xFFFF) * temp_f20) + (arg0 - (arg3 / 2));
sins(temp_s0 & 0xFFFF);
func_800444B0(phi_s2, arg3, 1);
func_8004B97C(temp_s6, phi_s4, arg3, 1, 1);
temp_s5 = phi_s5 + 1;
@@ -4796,7 +4796,7 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004D93C.s")
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80044924(s32, s32, ?); // extern
? func_8004B97C(s32, s32, s32, ?, s32); // extern
f32 func_802B8018(s32); // extern
f32 sins(s32); // extern
extern ? D_0D007FE0;
extern u16 D_801656B0;
extern s16 D_80165708;
@@ -4830,8 +4830,8 @@ void func_8004DAB8(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
if (arg4 > 0) {
do {
temp_s0 = phi_s1 & 0xFFFF;
temp_s6 = (func_802B8018(temp_s0 & 0xFFFF) * temp_f20) + (arg0 - (arg3 / 2));
func_802B8018(temp_s0 & 0xFFFF);
temp_s6 = (sins(temp_s0 & 0xFFFF) * temp_f20) + (arg0 - (arg3 / 2));
sins(temp_s0 & 0xFFFF);
func_80044924(phi_s2, arg3, 1);
func_8004B97C(temp_s6, phi_s4, arg3, 1, 1);
temp_s5 = phi_s5 + 1;
@@ -4881,7 +4881,7 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004DF5C.s")
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800452A4(s32, s32, ?); // extern
? func_8004B97C(u32, s32, s32, ?, s32); // extern
f32 func_802B8018(s32); // extern
f32 sins(s32); // extern
extern u16 D_801656B0;
extern s16 D_80165708;
extern s16 D_80165710;
@@ -4908,8 +4908,8 @@ void func_8004E06C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
if (arg4 > 0) {
do {
temp_s0 = phi_s1 & 0xFFFF;
temp_s6 = (func_802B8018(temp_s0 & 0xFFFF) * temp_f20) + (arg0 - (arg3 / 2));
func_802B8018(temp_s0 & 0xFFFF);
temp_s6 = (sins(temp_s0 & 0xFFFF) * temp_f20) + (arg0 - (arg3 / 2));
sins(temp_s0 & 0xFFFF);
func_800452A4(phi_s2, arg3, 1);
func_8004B97C(temp_s6, phi_s4, arg3, 1, 1);
temp_s5 = phi_s5 + 1;
+149 -149
View File
@@ -5141,8 +5141,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80060B14.s")
? func_8005D794(void *, void *, f32, f32, f32, s32, s32); // extern
? func_8005D7D8(void *, ?, ?); // extern
? func_8005D800(void *, ?, ?); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern f64 D_800EE588;
extern f64 D_800EE590;
extern f64 D_800EE598;
@@ -5173,8 +5173,8 @@ void func_80060BCC(void *arg0, s16 arg1, s32 arg2, ? arg3) {
func_8005D800(temp_s1, 0xFFFFFF, 0xFF);
temp_a0 = (sp54 * 0xB6) & 0xFFFF;
sp3C = temp_a0;
temp_s0->unk530 = (func_802B8038(temp_a0) * D_800EE588) + arg0->unk1C;
temp_s0->unk528 = (func_802B8018(temp_a0) * D_800EE590) + arg0->unk14;
temp_s0->unk530 = (coss(temp_a0) * D_800EE588) + arg0->unk1C;
temp_s0->unk528 = (sins(temp_a0) * D_800EE590) + arg0->unk14;
temp_s0->unk52C = (arg0->unk18 - arg0->unk70) + sp4C + 2.0f;
temp_s0->unk540 = sp44 + 1.0f;
temp_s0->unk534 = (sp48 + 2.0f) / 10.0f;
@@ -5188,8 +5188,8 @@ void func_80060BCC(void *arg0, s16 arg1, s32 arg2, ? arg3) {
func_8005D800(temp_s1_2, 0xFFFFFF, 0xFF);
temp_a0_2 = (sp54 * 0xB6) & 0xFFFF;
sp3C = temp_a0_2;
temp_s0_2->unk530 = (func_802B8038(temp_a0_2) * D_800EE598) + arg0->unk1C;
temp_s0_2->unk528 = (func_802B8018(temp_a0_2) * D_800EE5A0) + arg0->unk14;
temp_s0_2->unk530 = (coss(temp_a0_2) * D_800EE598) + arg0->unk1C;
temp_s0_2->unk528 = (sins(temp_a0_2) * D_800EE5A0) + arg0->unk14;
temp_s0_2->unk52C = (arg0->unk18 - arg0->unk70) + sp4C + 2.0f;
temp_s0_2->unk540 = sp44 + 1.0f;
temp_s0_2->unk534 = (sp48 + 2.0f) / 10.0f;
@@ -5206,8 +5206,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80060BCC.s")
? func_8005D794(s32, f32, f32, f32, s32, s32); // extern
? func_8005D7D8(s32, ?, ?); // extern
? func_8005D800(s32, ?, ?); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE5A8;
extern f64 D_800EE5B0;
@@ -5226,8 +5226,8 @@ void func_80060F50(void *arg0, s16 arg1, ? arg2, s8 arg3) {
} else {
func_8005D800(temp_s1, 0xFFFFFF, 0xFF);
}
temp_s0->unk260 = (func_802B8038(temp_s0->unk278) * D_800EE5A8) + arg0->unk1C;
temp_s0->unk258 = (func_802B8018(temp_s0->unk278) * D_800EE5B0) + arg0->unk14;
temp_s0->unk260 = (coss(temp_s0->unk278) * D_800EE5A8) + arg0->unk1C;
temp_s0->unk258 = (sins(temp_s0->unk278) * D_800EE5B0) + arg0->unk14;
temp_s0->unk25C = D_801652A0[arg3];
arg0->unkDE = arg0->unkDE & 0xFFF7;
}
@@ -5269,8 +5269,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80061094.s")
? func_8005D794(s32, f32, f32, f32, s32, s32); // extern
? func_8005D7D8(s32, ?, ?); // extern
? func_8005D800(s32, ?, ?); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
void func_80061130(void *arg0, s16 arg1, ? arg2, ? arg3) {
s32 sp30;
@@ -5283,8 +5283,8 @@ void func_80061130(void *arg0, s16 arg1, ? arg2, ? arg3) {
func_8005D794(temp_a1, 0.0f, 0.0f, 0.0f, 0, 0);
func_8005D7D8(sp30, 7, 0x3F19999A);
func_8005D800(sp30, 0xFFFFFF, 0xD0);
temp_s0->unk260 = (func_802B8038(temp_s0->unk278) * 6.0f) + arg0->unk1C;
temp_s0->unk258 = (func_802B8018(temp_s0->unk278) * 6.0f) + arg0->unk14;
temp_s0->unk260 = (coss(temp_s0->unk278) * 6.0f) + arg0->unk1C;
temp_s0->unk258 = (sins(temp_s0->unk278) * 6.0f) + arg0->unk14;
temp_s0->unk298 = 0;
temp_s0->unk27C = 0.0f;
temp_s0->unk25C = arg0->unk18 - 5.0f;
@@ -5467,8 +5467,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800615AC.s")
? func_8005D794(void *, s32, f32, f32, f32, s32, s32); // extern
? func_8005D7D8(s32, ?, ?); // extern
? func_8005D800(s32, ?, ?); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
void func_80061754(void *arg0, s16 arg1, ? arg2, ? arg3) {
s32 sp54;
@@ -5505,8 +5505,8 @@ void func_80061754(void *arg0, s16 arg1, ? arg2, ? arg3) {
temp_s0->unkB04 = temp_s0->unkB04 + temp_s1;
}
temp_s1_2 = (sp54 * 0xB6) & 0xFFFF;
temp_s0->unkAD0 = (func_802B8038(temp_s1_2 & 0xFFFF) * -5.0f) + arg0->unk1C;
temp_s0->unkAC8 = (func_802B8018(temp_s1_2 & 0xFFFF) * -5.0f) + arg0->unk14;
temp_s0->unkAD0 = (coss(temp_s1_2 & 0xFFFF) * -5.0f) + arg0->unk1C;
temp_s0->unkAC8 = (sins(temp_s1_2 & 0xFFFF) * -5.0f) + arg0->unk14;
temp_s0->unkACC = (arg0->unk18 - arg0->unk70) + sp4C + 2.0f;
temp_s0->unkAE0 = sp44 + 1.0f;
temp_s0->unkAD4 = sp48 + 1.0f;
@@ -5539,8 +5539,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006199C.s")
? func_8005D794(void *, void *, f32, f32, f32, s32, s32); // extern
? func_8005D7D8(void *, ?, ?); // extern
? func_8005D800(void *, ?, ?); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
void func_80061A34(void *arg0, s16 arg1, s32 arg2, ? arg3) {
s32 sp54;
@@ -5567,8 +5567,8 @@ void func_80061A34(void *arg0, s16 arg1, s32 arg2, ? arg3) {
func_8005D800(temp_s1, 0xFFFFFF, 0xFF);
temp_a0 = (sp54 * 0xB6) & 0xFFFF;
sp3C = temp_a0;
temp_s0->unkAD0 = (func_802B8038(temp_a0) * -2.0) + arg0->unk1C;
temp_s0->unkAC8 = (func_802B8018(temp_a0) * -2.0) + arg0->unk14;
temp_s0->unkAD0 = (coss(temp_a0) * -2.0) + arg0->unk1C;
temp_s0->unkAC8 = (sins(temp_a0) * -2.0) + arg0->unk14;
temp_s0->unkACC = (arg0->unk18 - arg0->unk70) + sp4C + 2.0f;
temp_s0->unkAD4 = (sp48 + 2.0f) / 10.0f;
return;
@@ -5581,8 +5581,8 @@ void func_80061A34(void *arg0, s16 arg1, s32 arg2, ? arg3) {
func_8005D800(temp_s1_2, 0xFFFFFF, 0xFF);
temp_a0_2 = (sp54 * 0xB6) & 0xFFFF;
sp3C = temp_a0_2;
temp_s0_2->unkAD0 = (func_802B8038(temp_a0_2) * -2.0) + arg0->unk1C;
temp_s0_2->unkAC8 = (func_802B8018(temp_a0_2) * -2.0) + arg0->unk14;
temp_s0_2->unkAD0 = (coss(temp_a0_2) * -2.0) + arg0->unk1C;
temp_s0_2->unkAC8 = (sins(temp_a0_2) * -2.0) + arg0->unk14;
temp_s0_2->unkACC = (arg0->unk18 - arg0->unk70) + sp4C + 2.0f;
temp_s0_2->unkAD4 = (sp48 + 2.0f) / 10.0f;
}
@@ -5643,8 +5643,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80061D4C.s")
? func_8005D794(void *, void *, f32, f32, f32, s32, s32); // extern
? func_8005D7D8(void *, ?, ?); // extern
? func_8005D800(void *, ?, ?); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
void func_80061EF4(void *arg0, s16 arg1, s32 arg2, ? arg3) {
s32 sp48;
@@ -5690,8 +5690,8 @@ void func_80061EF4(void *arg0, s16 arg1, s32 arg2, ? arg3) {
} else {
temp_s0->unkAE8 = temp_s0->unkAE8 - 0x888;
}
temp_s0->unkAD0 = (func_802B8038(((temp_s0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk1C;
temp_s0->unkAC8 = (func_802B8018(((temp_s0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14;
temp_s0->unkAD0 = (coss(((temp_s0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk1C;
temp_s0->unkAC8 = (sins(((temp_s0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14;
return;
}
if ((arg0 + (arg2 * 0x48))->unkAE6 > 0) {
@@ -5707,8 +5707,8 @@ void func_80061EF4(void *arg0, s16 arg1, s32 arg2, ? arg3) {
} else {
temp_s0_2->unkAE8 = temp_s0_2->unkAE8 - 0x888;
}
temp_s0_2->unkAD0 = (func_802B8038(((temp_s0_2->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk1C;
temp_s0_2->unkAC8 = (func_802B8018(((temp_s0_2->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14;
temp_s0_2->unkAD0 = (coss(((temp_s0_2->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk1C;
temp_s0_2->unkAC8 = (sins(((temp_s0_2->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14;
}
// Duplicate return node #17. Try simplifying control flow for better match
}
@@ -5722,8 +5722,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80061EF4.s")
? func_8005D794(void *, void *, f32, f32, f32, s32, s32); // extern
? func_8005D7D8(void *, ?, ?); // extern
? func_8005D800(void *, ?, ?); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
void func_800621BC(void *arg0, s16 arg1, s32 arg2, ? arg3) {
s32 sp48;
@@ -5769,8 +5769,8 @@ void func_800621BC(void *arg0, s16 arg1, s32 arg2, ? arg3) {
} else {
temp_s0->unkAE8 = temp_s0->unkAE8 - 0x888;
}
temp_s0->unkAD0 = (func_802B8038(((temp_s0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk1C;
temp_s0->unkAC8 = (func_802B8018(((temp_s0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14;
temp_s0->unkAD0 = (coss(((temp_s0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk1C;
temp_s0->unkAC8 = (sins(((temp_s0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14;
return;
}
if ((arg0 + (arg2 * 0x48))->unkAE6 > 0) {
@@ -5786,8 +5786,8 @@ void func_800621BC(void *arg0, s16 arg1, s32 arg2, ? arg3) {
} else {
temp_s0_2->unkAE8 = temp_s0_2->unkAE8 - 0x888;
}
temp_s0_2->unkAD0 = (func_802B8038(((temp_s0_2->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk1C;
temp_s0_2->unkAC8 = (func_802B8018(((temp_s0_2->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14;
temp_s0_2->unkAD0 = (coss(((temp_s0_2->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk1C;
temp_s0_2->unkAC8 = (sins(((temp_s0_2->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14;
}
// Duplicate return node #17. Try simplifying control flow for better match
}
@@ -6116,8 +6116,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80062AA8.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
void func_80062B18(f32 *arg0, f32 *arg1, f32 *arg2, f32 arg3, f32 arg4, f32 arg5, u16 arg6, u16 arg7) {
f32 sp30;
@@ -6127,18 +6127,18 @@ void func_80062B18(f32 *arg0, f32 *arg1, f32 *arg2, f32 arg3, f32 arg4, f32 arg5
f32 temp_f20_2;
f32 temp_f20_3;
sp28 = func_802B8018(arg7);
sp2C = func_802B8038(arg6);
sp30 = func_802B8038(arg7 & 0xFFFF);
temp_f20 = func_802B8038(arg6 & 0xFFFF);
*arg0 = ((arg3 * temp_f20 * sp30) + (arg4 * sp2C * sp28)) - (func_802B8018(arg6 & 0xFFFF) * arg5);
temp_f20_2 = func_802B8018(arg7 & 0xFFFF);
*arg1 = (func_802B8038(arg7 & 0xFFFF) * arg4) - (arg3 * temp_f20_2);
sp28 = func_802B8018(arg7 & 0xFFFF);
sp2C = func_802B8018(arg6 & 0xFFFF);
sp30 = func_802B8038(arg7 & 0xFFFF);
temp_f20_3 = func_802B8018(arg6 & 0xFFFF);
*arg2 = (func_802B8038(arg6 & 0xFFFF) * arg5) + ((arg3 * temp_f20_3 * sp30) + (arg4 * sp2C * sp28));
sp28 = sins(arg7);
sp2C = coss(arg6);
sp30 = coss(arg7 & 0xFFFF);
temp_f20 = coss(arg6 & 0xFFFF);
*arg0 = ((arg3 * temp_f20 * sp30) + (arg4 * sp2C * sp28)) - (sins(arg6 & 0xFFFF) * arg5);
temp_f20_2 = sins(arg7 & 0xFFFF);
*arg1 = (coss(arg7 & 0xFFFF) * arg4) - (arg3 * temp_f20_2);
sp28 = sins(arg7 & 0xFFFF);
sp2C = sins(arg6 & 0xFFFF);
sp30 = coss(arg7 & 0xFFFF);
temp_f20_3 = sins(arg6 & 0xFFFF);
*arg2 = (coss(arg6 & 0xFFFF) * arg5) + ((arg3 * temp_f20_3 * sp30) + (arg4 * sp2C * sp28));
}
#else
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80062B18.s")
@@ -6266,8 +6266,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80062F98.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE650;
extern f64 D_800EE658;
@@ -6278,8 +6278,8 @@ void func_800630C0(void *arg0, s16 arg1, s8 arg2, ? arg3) {
temp_v0 = arg0 + (arg1 * 0x48);
temp_v0->unk276 = temp_v0->unk276 + 1;
sp1C = temp_v0;
temp_v0->unk260 = (func_802B8038(temp_v0->unk278) * D_800EE650) + arg0->unk1C;
temp_v0->unk258 = (func_802B8018(temp_v0->unk278) * D_800EE658) + arg0->unk14;
temp_v0->unk260 = (coss(temp_v0->unk278) * D_800EE650) + arg0->unk1C;
temp_v0->unk258 = (sins(temp_v0->unk278) * D_800EE658) + arg0->unk14;
temp_v0->unk25C = D_801652A0[arg2];
if (temp_v0->unk276 == 0xF) {
temp_v0->unk274 = 0;
@@ -6328,8 +6328,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800631A8.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32, void *); // extern
f32 sins(s32); // extern
f32 coss(s32, void *); // extern
extern f64 D_800EE660;
void func_80063268(void *arg0, s16 arg1, ? arg2, ? arg3) {
@@ -6347,8 +6347,8 @@ void func_80063268(void *arg0, s16 arg1, ? arg2, ? arg3) {
temp_v0->unk27C = temp_v0->unk27C + 0.25;
arg0 = temp_a2;
sp1C = temp_v0;
temp_v0->unk260 = (func_802B8038((temp_v0->unk298 + temp_v0->unk278) & 0xFFFF, temp_a2) * 5.5) + arg0->unk1C;
temp_v0->unk258 = (func_802B8018((temp_v0->unk298 + temp_v0->unk278) & 0xFFFF) * 5.5) + arg0->unk14;
temp_v0->unk260 = (coss((temp_v0->unk298 + temp_v0->unk278) & 0xFFFF, temp_a2) * 5.5) + arg0->unk1C;
temp_v0->unk258 = (sins((temp_v0->unk298 + temp_v0->unk278) & 0xFFFF) * 5.5) + arg0->unk14;
temp_v0->unk276 = temp_v0->unk276 + 1;
temp_v0->unk25C = temp_v0->unk27C + (arg0->unk18 - 5.0f);
temp_v0->unk296 = temp_v0->unk296 - 5;
@@ -6368,8 +6368,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80063268.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE668;
void func_80063408(void *arg0, s16 arg1, ? arg2, ? arg3) {
@@ -6378,11 +6378,11 @@ void func_80063408(void *arg0, s16 arg1, ? arg2, ? arg3) {
temp_s0 = arg0 + (arg1 * 0x48);
if (temp_s0->unk538 == 1) {
temp_s0->unk530 = (func_802B8038(temp_s0->unk548) * (temp_s0->unk546 * -7)) + arg0->unk1D0;
temp_s0->unk528 = (func_802B8018(temp_s0->unk548) * (temp_s0->unk546 * -7)) + arg0->unk1C8;
temp_s0->unk530 = (coss(temp_s0->unk548) * (temp_s0->unk546 * -7)) + arg0->unk1D0;
temp_s0->unk528 = (sins(temp_s0->unk548) * (temp_s0->unk546 * -7)) + arg0->unk1C8;
} else {
temp_s0->unk530 = (func_802B8038(temp_s0->unk548) * (temp_s0->unk546 * -7)) + arg0->unk1E8;
temp_s0->unk528 = (func_802B8018(temp_s0->unk548) * (temp_s0->unk546 * -7)) + arg0->unk1E0;
temp_s0->unk530 = (coss(temp_s0->unk548) * (temp_s0->unk546 * -7)) + arg0->unk1E8;
temp_s0->unk528 = (sins(temp_s0->unk548) * (temp_s0->unk546 * -7)) + arg0->unk1E0;
}
temp_s0->unk546 = temp_s0->unk546 + 1;
temp_s0->unk52C = temp_s0->unk52C + 1.0f;
@@ -6411,8 +6411,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80063408.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80062B18(f32 *, ? *, f32 *, ?, f32, f32, s32, s32); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE670;
extern f64 D_800EE678;
@@ -6430,16 +6430,16 @@ void func_800635D4(void *arg0, s16 arg1, ? arg2, ? arg3) {
temp_s0->unk528 = arg0->unk1C8 + sp44;
temp_s0->unk530 = arg0->unk1D0 + sp3C;
} else {
temp_s0->unk530 = (func_802B8038(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 16.0f)) + arg0->unk1D0;
temp_s0->unk528 = (func_802B8018(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 16.0f)) + arg0->unk1C8;
temp_s0->unk530 = (coss(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 16.0f)) + arg0->unk1D0;
temp_s0->unk528 = (sins(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 16.0f)) + arg0->unk1C8;
}
} else if ((arg0->unkBC * 2) < 0) {
func_80062B18(&sp44, &sp40, &sp3C, 0x40000000, 0.0f, (-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 16.0f, -temp_s0->unk548, arg0->unk206 * -2);
temp_s0->unk528 = arg0->unk1E0 + sp44;
temp_s0->unk530 = arg0->unk1E8 + sp3C;
} else {
temp_s0->unk530 = (func_802B8038(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 16.0f)) + arg0->unk1E8;
temp_s0->unk528 = (func_802B8018(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 16.0f)) + arg0->unk1E0;
temp_s0->unk530 = (coss(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 16.0f)) + arg0->unk1E8;
temp_s0->unk528 = (sins(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 16.0f)) + arg0->unk1E0;
}
temp_s0->unk546 = temp_s0->unk546 + 1;
temp_s0->unk52C = temp_s0->unk52C + D_800EE670;
@@ -6477,8 +6477,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800635D4.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f32 D_800EE680;
extern f32 D_800EE684;
extern f32 D_800EE688;
@@ -6491,11 +6491,11 @@ void func_800639DC(void *arg0, s16 arg1, ? arg2, ? arg3) {
temp_s0 = arg0 + (arg1 * 0x48);
if (temp_s0->unk538 == 1) {
temp_s0->unk530 = (func_802B8038(temp_s0->unk548) * (D_800EE680 * temp_s0->unk546)) + arg0->unk1D0;
temp_s0->unk528 = (func_802B8018(temp_s0->unk548) * (D_800EE684 * temp_s0->unk546)) + arg0->unk1C8;
temp_s0->unk530 = (coss(temp_s0->unk548) * (D_800EE680 * temp_s0->unk546)) + arg0->unk1D0;
temp_s0->unk528 = (sins(temp_s0->unk548) * (D_800EE684 * temp_s0->unk546)) + arg0->unk1C8;
} else {
temp_s0->unk530 = (func_802B8038(temp_s0->unk548) * (D_800EE688 * temp_s0->unk546)) + arg0->unk1E8;
temp_s0->unk528 = (func_802B8018(temp_s0->unk548) * (D_800EE68C * temp_s0->unk546)) + arg0->unk1E0;
temp_s0->unk530 = (coss(temp_s0->unk548) * (D_800EE688 * temp_s0->unk546)) + arg0->unk1E8;
temp_s0->unk528 = (sins(temp_s0->unk548) * (D_800EE68C * temp_s0->unk546)) + arg0->unk1E0;
}
temp_s0->unk546 = temp_s0->unk546 + 1;
temp_s0->unk52C = temp_s0->unk52C + D_800EE690;
@@ -6528,8 +6528,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800639DC.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE6A0;
extern f64 D_800EE6A8;
@@ -6538,11 +6538,11 @@ void func_80063BD4(void *arg0, s16 arg1, ? arg2, ? arg3) {
temp_s0 = arg0 + (arg1 * 0x48);
if (temp_s0->unk538 == 1) {
temp_s0->unk530 = (func_802B8038(temp_s0->unk548) * (temp_s0->unk546 * -2)) + arg0->unk1D0;
temp_s0->unk528 = (func_802B8018(temp_s0->unk548) * (temp_s0->unk546 * -2)) + arg0->unk1C8;
temp_s0->unk530 = (coss(temp_s0->unk548) * (temp_s0->unk546 * -2)) + arg0->unk1D0;
temp_s0->unk528 = (sins(temp_s0->unk548) * (temp_s0->unk546 * -2)) + arg0->unk1C8;
} else {
temp_s0->unk530 = (func_802B8038(temp_s0->unk548) * (temp_s0->unk546 * -2)) + arg0->unk1E8;
temp_s0->unk528 = (func_802B8018(temp_s0->unk548) * (temp_s0->unk546 * -2)) + arg0->unk1E0;
temp_s0->unk530 = (coss(temp_s0->unk548) * (temp_s0->unk546 * -2)) + arg0->unk1E8;
temp_s0->unk528 = (sins(temp_s0->unk548) * (temp_s0->unk546 * -2)) + arg0->unk1E0;
}
temp_s0->unk546 = temp_s0->unk546 + 1;
temp_s0->unk52C = temp_s0->unk52C + D_800EE6A0;
@@ -6560,8 +6560,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80063BD4.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE6B0;
extern f64 D_800EE6B8;
extern f64 D_800EE6C0;
@@ -6571,11 +6571,11 @@ void func_80063D58(void *arg0, s16 arg1, ? arg2, ? arg3) {
temp_s0 = arg0 + (arg1 * 0x48);
if (temp_s0->unk538 == 1) {
temp_s0->unk530 = (func_802B8038(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 20.0f)) + arg0->unk1D0;
temp_s0->unk528 = (func_802B8018(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 20.0f)) + arg0->unk1C8;
temp_s0->unk530 = (coss(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 20.0f)) + arg0->unk1D0;
temp_s0->unk528 = (sins(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 20.0f)) + arg0->unk1C8;
} else {
temp_s0->unk530 = (func_802B8038(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 20.0f)) + arg0->unk1E8;
temp_s0->unk528 = (func_802B8018(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 20.0f)) + arg0->unk1E0;
temp_s0->unk530 = (coss(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 20.0f)) + arg0->unk1E8;
temp_s0->unk528 = (sins(temp_s0->unk548) * ((-temp_s0->unk546 * (arg0->unk94 / 18.0f) * 216.0f) / 20.0f)) + arg0->unk1E0;
}
temp_s0->unk546 = temp_s0->unk546 + 1;
if (temp_s0->unk546 == 8) {
@@ -6649,8 +6649,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80064184.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE6D8;
extern f64 D_800EE6E0;
extern f64 D_800EE6E8;
@@ -6664,9 +6664,9 @@ void func_800643A8(void *arg0, s16 arg1, ? arg2, ? arg3) {
temp_v0 = arg0 + (arg1 * 0x48);
sp1C = temp_v0;
temp_v0->unk530 = (func_802B8038(temp_v0->unk548) * (D_800EE6D8 * temp_v0->unk546)) + arg0->unk1C;
temp_v0->unk530 = (coss(temp_v0->unk548) * (D_800EE6D8 * temp_v0->unk546)) + arg0->unk1C;
temp_v1 = temp_v0->unk546;
temp_f8 = func_802B8018(temp_v0->unk548);
temp_f8 = sins(temp_v0->unk548);
temp_f18 = temp_v1;
temp_v0->unk546 = temp_v1 + 1;
temp_v0->unk528 = (temp_f8 * (D_800EE6E0 * temp_f18)) + arg0->unk14;
@@ -6688,8 +6688,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800643A8.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16, s32); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16, s32); // extern
f32 coss(u16); // extern
extern f64 D_800EE6F0;
extern f64 D_800EE6F8;
@@ -6712,9 +6712,9 @@ void func_800644E8(void *arg0, s16 arg1, ? arg2, ? arg3) {
sp2C = temp_v0->unkAE6;
sp24 = temp_v0;
temp_f2 = D_800EE6F0 * sp2C;
temp_v0->unkAD0 = (func_802B8038(temp_v0->unkAE8) * temp_f2) + arg0->unk1C;
temp_v0->unkAD0 = (coss(temp_v0->unkAE8) * temp_f2) + arg0->unk1C;
sp18 = temp_f2;
temp_f6 = (func_802B8018(temp_v0->unkAE8, sp2C) * temp_f2) + arg0->unk14;
temp_f6 = (sins(temp_v0->unkAE8, sp2C) * temp_f2) + arg0->unk14;
temp_v0->unkAE6 = temp_v0->unkAE6 + 1;
temp_v0->unkAC8 = temp_f6;
temp_v0->unkACC = temp_v0->unkAF0 + ((sp2C * temp_f4) - (D_800EE6F8 * (sp2C * sp2C)));
@@ -6736,8 +6736,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800644E8.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE700;
extern f64 D_800EE708;
@@ -6759,9 +6759,9 @@ void func_80064664(void *arg0, s16 arg1, ? arg2, ? arg3) {
sp24 = temp_v0;
sp2C = temp_v1;
temp_f2 = D_800EE700 * temp_v1;
temp_v0->unkAD0 = (func_802B8038(temp_v0->unkAE8) * temp_f2) + arg0->unk1C;
temp_v0->unkAD0 = (coss(temp_v0->unkAE8) * temp_f2) + arg0->unk1C;
sp18 = temp_f2;
temp_f6 = (func_802B8018(temp_v0->unkAE8) * temp_f2) + arg0->unk14;
temp_f6 = (sins(temp_v0->unkAE8) * temp_f2) + arg0->unk14;
temp_v0->unkAE6 = temp_v0->unkAE6 + 1;
temp_v0->unkAC8 = temp_f6;
temp_v0->unkACC = temp_v0->unkAF0 + ((temp_v1 * temp_f4) - (D_800EE708 * (temp_v1 * temp_v1)));
@@ -6783,8 +6783,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80064664.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE710;
extern f64 D_800EE718;
@@ -6796,9 +6796,9 @@ void func_800647C8(void *arg0, s16 arg1, ? arg2, ? arg3) {
temp_v0 = arg0 + (arg1 * 0x48);
temp_v0->unkAE6 = temp_v0->unkAE6 + 1;
sp1C = temp_v0;
temp_v0->unkAD0 = (func_802B8038(temp_v0->unkAE8) * (D_800EE710 * temp_v0->unkAE6)) + arg0->unk1C;
temp_v0->unkAD0 = (coss(temp_v0->unkAE8) * (D_800EE710 * temp_v0->unkAE6)) + arg0->unk1C;
temp_v1 = temp_v0->unkAE6;
temp_v0->unkAC8 = (func_802B8018(temp_v0->unkAE8) * (D_800EE718 * temp_v1)) + arg0->unk14;
temp_v0->unkAC8 = (sins(temp_v0->unkAE8) * (D_800EE718 * temp_v1)) + arg0->unk14;
temp_v0->unkACC = arg0->unk74 + 2.0f;
if (temp_v1 == 0xE) {
temp_v0->unkAE4 = 0;
@@ -6862,8 +6862,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80064988.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE738;
void func_800649F4(void *arg0, s16 arg1, ? arg2, ? arg3) {
@@ -6878,10 +6878,10 @@ void func_800649F4(void *arg0, s16 arg1, ? arg2, ? arg3) {
sp24 = temp_v0->unkAE0;
sp20 = temp_v0;
temp_f2 = -sp24;
temp_v0->unkAD0 = (func_802B8038(temp_v0->unkAE8) * (temp_f2 * temp_v0->unkAE6)) + arg0->unk21C;
temp_v0->unkAD0 = (coss(temp_v0->unkAE8) * (temp_f2 * temp_v0->unkAE6)) + arg0->unk21C;
sp1C = temp_f2;
temp_v1 = temp_v0->unkAE6;
temp_v0->unkAC8 = (func_802B8018(temp_v0->unkAE8) * (temp_f2 * temp_v1)) + arg0->unk218;
temp_v0->unkAC8 = (sins(temp_v0->unkAE8) * (temp_f2 * temp_v1)) + arg0->unk218;
temp_v0->unkACC = temp_v0->unkADC + arg0->unk18;
temp_v0->unkAE6 = temp_v1 + 1;
temp_v0->unkAD4 = temp_v0->unkAD4 + D_800EE738;
@@ -6903,8 +6903,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800649F4.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EE740;
extern f64 D_800EE748;
@@ -6920,10 +6920,10 @@ void func_80064B30(void *arg0, s16 arg1, ? arg2, ? arg3) {
sp24 = temp_v0->unkAE0 * D_800EE740;
sp20 = temp_v0;
temp_f2 = -sp24;
temp_v0->unkAD0 = (func_802B8038(temp_v0->unkAE8) * (temp_f2 * temp_v0->unkAE6)) + arg0->unk1C;
temp_v0->unkAD0 = (coss(temp_v0->unkAE8) * (temp_f2 * temp_v0->unkAE6)) + arg0->unk1C;
sp1C = temp_f2;
temp_v1 = temp_v0->unkAE6;
temp_v0->unkAC8 = (func_802B8018(temp_v0->unkAE8) * (temp_f2 * temp_v1)) + arg0->unk14;
temp_v0->unkAC8 = (sins(temp_v0->unkAE8) * (temp_f2 * temp_v1)) + arg0->unk14;
temp_v0->unkAE6 = temp_v1 + 1;
temp_v0->unkACC = temp_v0->unkACC + D_800EE748;
if (temp_v0->unkAE6 == 0xA) {
@@ -6945,8 +6945,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80064B30.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32, void *); // extern
f32 sins(s32); // extern
f32 coss(s32, void *); // extern
extern f64 D_800EE750;
void func_80064C74(void *arg0, s16 arg1, ? arg2, ? arg3) {
@@ -6967,8 +6967,8 @@ void func_80064C74(void *arg0, s16 arg1, ? arg2, ? arg3) {
temp_t7 = temp_a2->unkC0;
arg0 = temp_a2;
sp1C = temp_v0;
temp_v0->unkAD0 = (func_802B8038(((temp_v0->unkAE8 - temp_t5) - temp_t7) & 0xFFFF, temp_a2) * 5.0f) + arg0->unk1C;
temp_v0->unkAC8 = (func_802B8018(((temp_v0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14;
temp_v0->unkAD0 = (coss(((temp_v0->unkAE8 - temp_t5) - temp_t7) & 0xFFFF, temp_a2) * 5.0f) + arg0->unk1C;
temp_v0->unkAC8 = (sins(((temp_v0->unkAE8 - arg0->unk2E) - arg0->unkC0) & 0xFFFF) * 5.0f) + arg0->unk14;
temp_v0->unkACC = arg0->unk18 - 1.0f;
temp_v0->unkAE6 = temp_v0->unkAE6 + 1;
temp_v0->unkAD4 = temp_v0->unkAD4 + D_800EE750;
@@ -8079,8 +8079,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80066998.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800652D4(f32 *, s16 *, f32); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern ? D_0D008C78;
extern ? D_0D008DA0;
extern ? D_0D008DB8;
@@ -8156,8 +8156,8 @@ void func_80066BAC(void *arg0, ? arg1, s16 arg2, s8 arg3) {
temp_v0 = arg0 + (arg3 * 2);
sp24 = temp_ra;
sp20 = temp_v0;
spE4 = (func_802B8038(temp_v0->unk48) * -10.0f) + arg0->unk1C;
spDC = (func_802B8018(sp20->unk48) * -10.0f) + arg0->unk14;
spE4 = (coss(temp_v0->unk48) * -10.0f) + arg0->unk1C;
spDC = (sins(sp20->unk48) * -10.0f) + arg0->unk14;
if (arg0->unk124 >= 300.0f) {
spD4 = *(&D_80164714 + (arg3 * 0xB8)) - 0x4000;
} else {
@@ -8819,8 +8819,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80067964.s")
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004B414(s16, s16, s16, ?); // extern
? func_800652D4(f32 *, s16 *, f32); // extern
f32 func_802B8018(s32, s8, s8); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32, s8, s8); // extern
f32 coss(s32); // extern
extern ? D_0D008DB8;
extern ? D_0D008E20;
extern ? D_800E48D4;
@@ -8861,9 +8861,9 @@ void func_80067D3C(void *arg0, s8 arg1, s32 arg2, s8 arg3, f32 arg4, s32 arg5) {
sp78 = 0;
sp76 = (arg0 + (arg1 * 2))->unk48;
sp24 = temp_v0;
sp7C = (func_802B8018((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF, arg1, arg3) * arg4) + arg0->unk14;
sp7C = (sins((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF, arg1, arg3) * arg4) + arg0->unk14;
sp80 = ((arg0->unk18 + arg0->unk70) - (sp + (arg0->unk254 * 4))->unk54) - 2.0f;
sp84 = (func_802B8038((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF) * arg4) + arg0->unk1C;
sp84 = (coss((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF) * arg4) + arg0->unk1C;
func_800652D4(&sp7C, &sp74, temp_v0->unk804 * arg0->unk224);
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
@@ -8913,8 +8913,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80067D3C.s")
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004B414(s16, s16, s16, ?); // extern
? func_800652D4(f32 *, s16 *, f32); // extern
f32 func_802B8018(s32, s8, s8); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32, s8, s8); // extern
f32 coss(s32); // extern
extern ? D_0D008DB8;
extern ? D_0D008E20;
extern ? D_800E48F4;
@@ -8956,9 +8956,9 @@ void func_8006801C(void *arg0, s8 arg1, s32 arg2, s8 arg3, f32 arg4, s32 arg5) {
sp78 = 0;
sp76 = (arg0 + (arg1 * 2))->unk48;
sp24 = temp_v0;
sp7C = (func_802B8018((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF, arg1, arg3) * arg4) + arg0->unk14;
sp7C = (sins((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF, arg1, arg3) * arg4) + arg0->unk14;
sp80 = ((arg0->unk18 + arg0->unk70) - (sp + (arg0->unk254 * 4))->unk54) - 2.0f;
sp84 = (func_802B8038((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF) * arg4) + arg0->unk1C;
sp84 = (coss((0x4000 - (arg0->unk2E + arg0->unkC0)) & 0xFFFF) * arg4) + arg0->unk1C;
func_800652D4(&sp7C, &sp74, (temp_v0->unk804 * arg0->unk224) * D_800EE7C8);
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
@@ -9007,8 +9007,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006801C.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800652D4(f32 *, s16 *, f32); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern ? D_0D008C78;
extern ? D_0D008C90;
extern ? D_0D008DA0;
@@ -9066,8 +9066,8 @@ void func_80068310(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) {
spA0 = temp_v0->unk7FC;
sp24 = temp_v1;
sp28 = temp_v0;
spA4 = (func_802B8038(temp_v1->unk48) * -10.0f) + arg0->unk1C;
temp_f4 = func_802B8018(sp24->unk48) * -10.0f;
spA4 = (coss(temp_v1->unk48) * -10.0f) + arg0->unk1C;
temp_f4 = sins(sp24->unk48) * -10.0f;
sp94 = 0;
temp_a0 = &sp9C;
sp9C = temp_f4 + arg0->unk14;
@@ -9188,8 +9188,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80068310.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800652D4(f32 *, s16 *, f32); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern ? D_0D008C78;
extern ? D_0D008DA0;
extern ? D_0D008DB8;
@@ -9241,8 +9241,8 @@ void func_80068724(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) {
sp88 = arg0->unk18 - 3.0f;
sp20 = temp_v1;
sp24 = temp_v0;
sp8C = (func_802B8038(temp_v1->unk48) * -10.0f) + arg0->unk1C;
temp_f8 = func_802B8018(sp20->unk48) * -10.0f;
sp8C = (coss(temp_v1->unk48) * -10.0f) + arg0->unk1C;
temp_f8 = sins(sp20->unk48) * -10.0f;
sp7C = 0;
temp_a0 = &sp84;
sp84 = temp_f8 + arg0->unk14;
@@ -9344,8 +9344,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80068724.s")
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004B35C(?, ?, ?, ?); // extern
? func_800652D4(f32 *, s16 *, f32); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern ? D_0D008D58;
extern ? D_0D008DA0;
extern ? D_800E8B40;
@@ -9387,8 +9387,8 @@ void func_80068AA4(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) {
sp68 = arg0->unk18 - 3.0f;
sp24 = temp_v1;
sp28 = temp_v0;
sp6C = (func_802B8038(temp_v1->unk48) * (-2.5 * temp_v0->unk816)) + arg0->unk1C;
temp_f18 = func_802B8018(temp_v1->unk48);
sp6C = (coss(temp_v1->unk48) * (-2.5 * temp_v0->unk816)) + arg0->unk1C;
temp_f18 = sins(temp_v1->unk48);
temp_a0 = &sp64;
sp5C = 0;
sp64 = (temp_f18 * (-2.5 * temp_v0->unk816)) + arg0->unk14;
@@ -9456,8 +9456,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80068AA4.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800652D4(f32 *, s16 *, f32); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern ? D_0D008C78;
extern ? D_0D008C90;
extern ? D_0D008DA0;
@@ -9516,8 +9516,8 @@ void func_80068DA0(void *arg0, ? arg1, ? arg2, s8 arg3, s8 arg4) {
spA0 = temp_v1->unk7FC + (arg0->unk18 - 3.0f);
sp28 = temp_v1;
sp24 = temp_v0;
spA4 = (func_802B8038(temp_v0->unk48) * -10.0f) + arg0->unk1C;
temp_f16 = func_802B8018(temp_v0->unk48) * -10.0f;
spA4 = (coss(temp_v0->unk48) * -10.0f) + arg0->unk1C;
temp_f16 = sins(temp_v0->unk48) * -10.0f;
sp94 = 0;
temp_a0 = &sp9C;
sp9C = temp_f16 + arg0->unk14;
@@ -10767,8 +10767,8 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006A7C0.s")
? func_80021F84(? *, f32); // extern
? func_80022180(void *, ? *); // extern
? func_8004B614(s16, s16, s16, s16, s32, s32, s32); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(s32); // extern
f32 sins(u16); // extern
f32 coss(s32); // extern
extern ? D_0D008C78;
extern ? D_0D008DB8;
extern ? D_800E4934;
@@ -10930,12 +10930,12 @@ void func_8006AFD0(void *arg0, s8 arg1, s16 arg2, s8 arg3) {
sp13C = *(&D_8018D590 + ((arg1 * 0xC) + temp_t7_2));
temp_t6_2 = arg2 * 2;
temp_v1_2 = (arg1 * 6) + temp_t6_2 + &D_8018D890;
sp12C = -(func_802B8038(temp_a0) * (*temp_v1_2 * 4));
sp12C = -(coss(temp_a0) * (*temp_v1_2 * 4));
sp3C = temp_v1_2;
sp40 = temp_t6_2;
sp12E = sp54->unk48;
sp58 = func_802B8038(sp46);
sp130 = (*(&D_8018D7D0 + ((arg1 * 6) + temp_t6_2)) - (*(&D_8018D860 + ((arg1 * 6) + temp_t6_2)) * sp58)) - (func_802B8018(sp46) * (*sp3C * 8));
sp58 = coss(sp46);
sp130 = (*(&D_8018D7D0 + ((arg1 * 6) + temp_t6_2)) - (*(&D_8018D860 + ((arg1 * 6) + temp_t6_2)) * sp58)) - (sins(sp46) * (*sp3C * 8));
func_80021E10(&sp140, &sp134, &sp12C);
func_80021F84(&sp140, phi_f20_2);
func_80022180(gGfxPool + (D_80164AF0 << 6) + 0xFAC0, &sp140);
+29 -29
View File
@@ -4487,8 +4487,8 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80078220.s")
s16 func_800872D8(s32, s32); // extern
? func_800877C4(s32); // extern
? func_8008BF18(s32); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern f64 D_800EEB50;
extern f64 D_800EEB58;
extern f64 D_800EEB60;
@@ -4543,7 +4543,7 @@ void func_80078288(s32 arg0) {
func_800877C4(arg0);
temp_t1 = temp_s0->unkBE + temp_s0->unkC4;
temp_s0->unkBE = temp_t1;
temp_s0->unk28 = temp_s0->unk1C * func_802B8018(temp_t1 & 0xFFFF);
temp_s0->unk28 = temp_s0->unk1C * sins(temp_t1 & 0xFFFF);
func_8008BF18(arg0);
if (temp_s0->unk8 <= 0.0) {
func_80086FD4(arg0);
@@ -4560,10 +4560,10 @@ void func_80078288(s32 arg0) {
sp36 = temp_t6;
temp_v0_2 = D_800DC4FC;
temp_f2 = sp3C;
temp_s0->unk10 = (func_802B8018(temp_a0) * temp_f2) + temp_v0_2->posX;
temp_s0->unk10 = (sins(temp_a0) * temp_f2) + temp_v0_2->posX;
sp24 = temp_f2;
temp_s0->unk14 = sp3E + temp_v0_2->unk_074;
temp_s0->unk18 = (func_802B8038(sp36) * temp_f2) + D_800DC4FC->posZ;
temp_s0->unk18 = (coss(sp36) * temp_f2) + D_800DC4FC->posZ;
temp_s0->unkC4 = random_int(0x400) + 0x100;
temp_v0_3 = random_int(0x64);
temp_f8 = temp_v0_3;
@@ -4590,10 +4590,10 @@ void func_80078288(s32 arg0) {
sp36 = temp_t3;
temp_v0_5 = camera1;
temp_f2_2 = sp3C;
temp_s0->unk10 = (func_802B8018(temp_a0_2) * temp_f2_2) + temp_v0_5->unk0;
temp_s0->unk10 = (sins(temp_a0_2) * temp_f2_2) + temp_v0_5->unk0;
sp24 = temp_f2_2;
temp_s0->unk14 = temp_v0_5->unk4 + D_800EEB68;
temp_s0->unk18 = (func_802B8038(sp36) * temp_f2_2) + camera1->unk8;
temp_s0->unk18 = (coss(sp36) * temp_f2_2) + camera1->unk8;
temp_s0->unkC4 = random_int(0x400) + 0x100;
temp_v0_6 = random_int(0x64);
temp_f8_2 = temp_v0_6;
@@ -5967,8 +5967,8 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A4D4.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern ? D_80165C18;
void func_8007A66C(s32 arg0, void *arg1, void *arg2) {
@@ -5980,13 +5980,13 @@ void func_8007A66C(s32 arg0, void *arg1, void *arg2) {
temp_t8 = (0x8000 - arg2->unk26) & 0xFFFF;
temp_s0 = temp_t8;
sp24 = func_802B8038(temp_t8 & 0xFFFF);
sp24 = coss(temp_t8 & 0xFFFF);
temp_v0 = (arg0 * 0xE0) + &D_80165C18;
temp_v0->unk4 = (arg1->unk14 + (sp24 * (temp_v0->unk10 + temp_v0->unk28))) - ((temp_v0->unk30 + temp_v0->unk18) * func_802B8018(temp_s0 & 0xFFFF));
temp_v0->unk4 = (arg1->unk14 + (sp24 * (temp_v0->unk10 + temp_v0->unk28))) - ((temp_v0->unk30 + temp_v0->unk18) * sins(temp_s0 & 0xFFFF));
sp20 = temp_v0;
temp_v0->unk8 = temp_v0->unk2C + (arg1->unk74 + temp_v0->unk14);
sp24 = func_802B8018(temp_s0 & 0xFFFF);
temp_v0->unkC = ((temp_v0->unk30 + temp_v0->unk18) * func_802B8038(temp_s0 & 0xFFFF)) + (arg1->unk1C + (sp24 * (temp_v0->unk10 + temp_v0->unk28)));
sp24 = sins(temp_s0 & 0xFFFF);
temp_v0->unkC = ((temp_v0->unk30 + temp_v0->unk18) * coss(temp_s0 & 0xFFFF)) + (arg1->unk1C + (sp24 * (temp_v0->unk10 + temp_v0->unk28)));
}
#else
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A66C.s")
@@ -5994,8 +5994,8 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A66C.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern ? D_80165C18;
void func_8007A778(s32 arg0, void *arg1, void *arg2) {
@@ -6007,13 +6007,13 @@ void func_8007A778(s32 arg0, void *arg1, void *arg2) {
temp_t8 = (0x8000 - arg2->unk26) & 0xFFFF;
temp_s0 = temp_t8;
sp24 = func_802B8038(temp_t8 & 0xFFFF);
sp24 = coss(temp_t8 & 0xFFFF);
temp_v0 = (arg0 * 0xE0) + &D_80165C18;
temp_v0->unk4 = (arg1->unk14 + (sp24 * (temp_v0->unk10 + temp_v0->unk28))) - ((temp_v0->unk30 + temp_v0->unk18) * func_802B8018(temp_s0 & 0xFFFF));
temp_v0->unk4 = (arg1->unk14 + (sp24 * (temp_v0->unk10 + temp_v0->unk28))) - ((temp_v0->unk30 + temp_v0->unk18) * sins(temp_s0 & 0xFFFF));
sp20 = temp_v0;
temp_v0->unk8 = temp_v0->unk2C + (arg1->unk18 + temp_v0->unk14);
sp24 = func_802B8018(temp_s0 & 0xFFFF);
temp_v0->unkC = ((temp_v0->unk30 + temp_v0->unk18) * func_802B8038(temp_s0 & 0xFFFF)) + (arg1->unk1C + (sp24 * (temp_v0->unk10 + temp_v0->unk28)));
sp24 = sins(temp_s0 & 0xFFFF);
temp_v0->unkC = ((temp_v0->unk30 + temp_v0->unk18) * coss(temp_s0 & 0xFFFF)) + (arg1->unk1C + (sp24 * (temp_v0->unk10 + temp_v0->unk28)));
}
#else
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A778.s")
@@ -7524,8 +7524,8 @@ s32 func_8007223C(s32, ?); // extern
? func_8007C684(s32); // extern
? func_8007CA70(); // extern
? func_8008B78C(s32); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern ? D_800E4470;
extern ? D_800E44B0;
extern ? D_80165C18;
@@ -7556,11 +7556,11 @@ void func_8007CC00(void) {
temp_t4 = (0x8000 - ((temp_v0 * 0xB8) + camera1)->unk26) & 0xFFFF;
temp_s1 = temp_t4;
temp_s3 = &D_800DC4DC[temp_v0];
temp_f20 = func_802B8038(temp_t4 & 0xFFFF);
temp_s0->unk4 = (temp_s3->posX + (temp_f20 * (temp_s0->unk10 + temp_s0->unk28))) - ((temp_s0->unk30 + temp_s0->unk18) * func_802B8018(temp_s1 & 0xFFFF));
temp_f20 = coss(temp_t4 & 0xFFFF);
temp_s0->unk4 = (temp_s3->posX + (temp_f20 * (temp_s0->unk10 + temp_s0->unk28))) - ((temp_s0->unk30 + temp_s0->unk18) * sins(temp_s1 & 0xFFFF));
temp_s0->unk8 = temp_s0->unk2C + (6.5 + temp_s3->unk_074 + temp_s0->unk14);
temp_f20_2 = func_802B8018(temp_s1 & 0xFFFF);
temp_s0->unkC = ((temp_s0->unk30 + temp_s0->unk18) * func_802B8038(temp_s1 & 0xFFFF)) + (temp_s3->posZ + (temp_f20_2 * (temp_s0->unk10 + temp_s0->unk28)));
temp_f20_2 = sins(temp_s1 & 0xFFFF);
temp_s0->unkC = ((temp_s0->unk30 + temp_s0->unk18) * coss(temp_s1 & 0xFFFF)) + (temp_s3->posZ + (temp_f20_2 * (temp_s0->unk10 + temp_s0->unk28)));
func_8007C550(temp_s2);
if (func_8007223C(temp_s2, 0x80) != 0) {
temp_s0->unk74 = &D_800E44B0;
@@ -10167,8 +10167,8 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80080DE4.s")
f32 func_800416D8(f32, f32, s32, ? *, u16, s32); // extern
f32 func_80041724(f32, f32, s32); // extern
? func_800723A4(s32); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern ? D_800E594C;
extern ? D_800E597C;
extern f64 D_800EF0B8;
@@ -10204,8 +10204,8 @@ void func_80080E8C(s32 arg0, s32 arg1, s32 arg2) {
temp_s0->unk18 = temp_v0->unkC + sp38;
temp_t7 = (*(&D_800E597C + sp28) + temp_v0->unkC0) & 0xFFFF;
temp_s1_2 = temp_t7;
temp_s0->unk38 = func_802B8018(temp_t7 & 0xFFFF) * D_800EF0B8;
temp_s0->unk40 = func_802B8038(temp_s1_2 & 0xFFFF) * D_800EF0C0;
temp_s0->unk38 = sins(temp_t7 & 0xFFFF) * D_800EF0B8;
temp_s0->unk40 = coss(temp_s1_2 & 0xFFFF) * D_800EF0C0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80080E8C.s")
+27 -27
View File
@@ -285,8 +285,8 @@ GLOBAL_ASM("asm/non_matchings/code_80086E70/func_800873F4.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern ? D_80165C18;
void func_8008751C(s32 arg0) {
@@ -295,8 +295,8 @@ void func_8008751C(s32 arg0) {
temp_v0 = (arg0 * 0xE0) + &D_80165C18;
sp1C = temp_v0;
temp_v0->unk38 = func_802B8018(temp_v0->unkC0) * temp_v0->unk34;
temp_v0->unk40 = func_802B8038(temp_v0->unkC0) * temp_v0->unk34;
temp_v0->unk38 = sins(temp_v0->unkC0) * temp_v0->unk34;
temp_v0->unk40 = coss(temp_v0->unkC0) * temp_v0->unk34;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008751C.s")
@@ -304,8 +304,8 @@ GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008751C.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern ? D_80165C18;
void func_8008757C(s32 arg0) {
@@ -313,11 +313,11 @@ void func_8008757C(s32 arg0) {
void *temp_s0;
temp_s0 = (arg0 * 0xE0) + &D_80165C18;
sp24 = func_802B8038(temp_s0->unkBE);
temp_s0->unk38 = func_802B8018(temp_s0->unkC0) * (temp_s0->unk34 * sp24);
temp_s0->unk3C = func_802B8018(temp_s0->unkBE) * -temp_s0->unk34;
sp24 = func_802B8038(temp_s0->unkBE);
temp_s0->unk40 = func_802B8038(temp_s0->unkC0) * (temp_s0->unk34 * sp24);
sp24 = coss(temp_s0->unkBE);
temp_s0->unk38 = sins(temp_s0->unkC0) * (temp_s0->unk34 * sp24);
temp_s0->unk3C = sins(temp_s0->unkBE) * -temp_s0->unk34;
sp24 = coss(temp_s0->unkBE);
temp_s0->unk40 = coss(temp_s0->unkC0) * (temp_s0->unk34 * sp24);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008757C.s")
@@ -325,8 +325,8 @@ GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008757C.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern ? D_80165C18;
void func_80087620(s32 arg0) {
@@ -335,8 +335,8 @@ void func_80087620(s32 arg0) {
temp_v0 = (arg0 * 0xE0) + &D_80165C18;
sp1C = temp_v0;
temp_v0->unk38 = func_802B8018((temp_v0->unkC0 + 0x8000) & 0xFFFF) * temp_v0->unk34;
temp_v0->unk40 = func_802B8038((temp_v0->unkC0 + 0x8000) & 0xFFFF) * temp_v0->unk34;
temp_v0->unk38 = sins((temp_v0->unkC0 + 0x8000) & 0xFFFF) * temp_v0->unk34;
temp_v0->unk40 = coss((temp_v0->unkC0 + 0x8000) & 0xFFFF) * temp_v0->unk34;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80086E70/func_80087620.s")
@@ -344,8 +344,8 @@ GLOBAL_ASM("asm/non_matchings/code_80086E70/func_80087620.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern ? D_80165C18;
void func_800876A0(s32 arg0) {
@@ -354,8 +354,8 @@ void func_800876A0(s32 arg0) {
temp_v0 = (arg0 * 0xE0) + &D_80165C18;
sp18 = temp_v0;
temp_v0->unk28 = temp_v0->unk28 + (temp_v0->unk34 * func_802B8018(temp_v0->unkC0));
temp_v0->unk30 = temp_v0->unk30 + (temp_v0->unk34 * func_802B8038(temp_v0->unkC0));
temp_v0->unk28 = temp_v0->unk28 + (temp_v0->unk34 * sins(temp_v0->unkC0));
temp_v0->unk30 = temp_v0->unk30 + (temp_v0->unk34 * coss(temp_v0->unkC0));
}
#else
GLOBAL_ASM("asm/non_matchings/code_80086E70/func_800876A0.s")
@@ -704,8 +704,8 @@ GLOBAL_ASM("asm/non_matchings/code_80086E70/func_80087E08.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32); // extern
f32 func_802B8038(u16); // extern
f32 sins(s32); // extern
f32 coss(u16); // extern
extern ? D_80165C18;
void func_80088038(s32 arg0, f32 arg1, s32 arg2) {
@@ -724,8 +724,8 @@ void func_80088038(s32 arg0, f32 arg1, s32 arg2) {
sp1C = temp_v0;
sp24 = temp_f4;
sp20 = temp_v0->unk30;
temp_v0->unk28 = func_802B8018(temp_t0 & 0xFFFF) * arg1;
temp_f2 = func_802B8038(temp_v0->unkC4) * arg1;
temp_v0->unk28 = sins(temp_t0 & 0xFFFF) * arg1;
temp_f2 = coss(temp_v0->unkC4) * arg1;
temp_v0->unk30 = temp_f2;
temp_v0->unk38 = temp_v0->unk28 - temp_f4;
temp_v0->unk40 = temp_f2 - sp20;
@@ -2603,8 +2603,8 @@ GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008BD14.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
extern ? D_80165C18;
void func_8008BE0C(s32 arg0, s16 arg1, u16 arg2) {
@@ -2615,12 +2615,12 @@ void func_8008BE0C(s32 arg0, s16 arg1, u16 arg2) {
void *temp_v0;
temp_f2 = arg1;
temp_f6 = func_802B8018(arg2) * temp_f2;
temp_f6 = sins(arg2) * temp_f2;
temp_v0 = (arg0 * 0xE0) + &D_80165C18;
sp1C = temp_v0;
sp18 = temp_f2;
temp_v0->unk10 = temp_f6 + D_800DC4FC->posX;
temp_v0->unk18 = (func_802B8038(arg2) * temp_f2) + D_800DC4FC->posZ;
temp_v0->unk18 = (coss(arg2) * temp_f2) + D_800DC4FC->posZ;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008BE0C.s")
+6 -6
View File
@@ -2997,8 +2997,8 @@ GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80090868.s")
? func_8009E088(s8, ?); /* extern */
? func_800C9018(u8, ?); /* extern */
s32 func_802B5224(f32 *, ? *); /* extern */
f32 func_802B8018(s32); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(s32); /* extern */
f32 coss(s32); /* extern */
extern ? D_80004334;
extern void *D_80164550;
extern ? D_801652A0;
@@ -3122,8 +3122,8 @@ block_49:
arg0->unk1C = sp4C;
temp_v0_5 = arg1 * 0x1C70;
sp28 = temp_v0_5;
arg0->unk1C = (func_802B8038((temp_v0_5 - arg0->unk2E) & 0xFFFF) * -5.0f) + arg0->unk1C;
temp_f6 = func_802B8018((temp_v0_5 - arg0->unk2E) & 0xFFFF) * -5.0f;
arg0->unk1C = (coss((temp_v0_5 - arg0->unk2E) & 0xFFFF) * -5.0f) + arg0->unk1C;
temp_f6 = sins((temp_v0_5 - arg0->unk2E) & 0xFFFF) * -5.0f;
arg0->unkC6 = arg0->unkC6 + 8;
arg0->unk14 = temp_f6 + arg0->unk14;
if (arg0->unkC6 >= 0xF0) {
@@ -3136,8 +3136,8 @@ block_49:
case 4:
temp_v0_6 = arg0->unkC8;
if ((temp_v0_6 == 0x96) || (temp_v0_6 == 0xC8) || (temp_v0_6 == 0xFA)) {
arg0->unk1C = (func_802B8038(-arg0->unk2E & 0xFFFF) * -10.0f) + arg0->unk1C;
arg0->unk14 = (func_802B8018(-arg0->unk2E & 0xFFFF) * -10.0f) + arg0->unk14;
arg0->unk1C = (coss(-arg0->unk2E & 0xFFFF) * -10.0f) + arg0->unk1C;
arg0->unk14 = (sins(-arg0->unk2E & 0xFFFF) * -10.0f) + arg0->unk14;
}
if (arg0->unkC8 == 0xFC) {
temp_v0_7 = D_80164550;
+4 -4
View File
@@ -4214,8 +4214,8 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097E58.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32); // extern
f32 func_802B8038(s32); // extern
f32 sins(s32); // extern
f32 coss(s32); // extern
extern s32 D_8018D9B0;
extern u32 D_8018E7B8;
extern s32 D_8018E7D0;
@@ -4272,8 +4272,8 @@ void *func_800987D0(void *arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4, s32 arg5
D_8018E7B8 = 1;
phi_v0 = 1;
}
temp_f24 = func_802B8018((((D_8018E7D0 * 0x4E20) / phi_v0) % 0x4E20) & 0xFFFF);
temp_f0 = func_802B8038((((D_8018E7D0 * 0x4E20) / D_8018E7B8) % 0x4E20) & 0xFFFF);
temp_f24 = sins((((D_8018E7D0 * 0x4E20) / phi_v0) % 0x4E20) & 0xFFFF);
temp_f0 = coss((((D_8018E7D0 * 0x4E20) / D_8018E7B8) % 0x4E20) & 0xFFFF);
temp_t8 = D_8018E7D0;
temp_f6 = temp_t8;
phi_f6 = temp_f6;
+3 -3
View File
@@ -283,7 +283,7 @@ GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800AFF58.s")
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800AF9E4(s32, s32, s32, ?, s32, s32, s32, s32); // extern
? func_800AFF58(s32); // extern
f32 func_802B8018(s32); // extern
f32 sins(s32); // extern
extern ? D_800E8680;
extern ? D_800E8688;
extern f32 D_800F2B44;
@@ -359,8 +359,8 @@ void func_800B0004(void) {
phi_s2 = 0;
loop_5:
temp_s1 = phi_s0 + 1;
temp_s4 = func_802B8018((D_8018EDB0 - (phi_s0 * D_8018EDB2)) & 0xFFFF) * 84.0f * phi_s0 * temp_f22;
func_800AF9E4((phi_s3 * 0x10) + spBC + (sp64 * 0x10), phi_s0, phi_fp, 0x54, temp_s4, func_802B8018((D_8018EDB0 - (temp_s1 * D_8018EDB2)) & 0xFFFF) * 84.0f * temp_s1 * temp_f22, phi_s2, 0x54);
temp_s4 = sins((D_8018EDB0 - (phi_s0 * D_8018EDB2)) & 0xFFFF) * 84.0f * phi_s0 * temp_f22;
func_800AF9E4((phi_s3 * 0x10) + spBC + (sp64 * 0x10), phi_s0, phi_fp, 0x54, temp_s4, sins((D_8018EDB0 - (temp_s1 * D_8018EDB2)) & 0xFFFF) * 84.0f * temp_s1 * temp_f22, phi_s2, 0x54);
phi_s0 = temp_s1;
phi_s3 += 4;
phi_s2 += 0x54;
+2 -2
View File
@@ -153,7 +153,7 @@ GLOBAL_ASM("asm/non_matchings/code_80280650/func_80280884.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8006BB34(void *, ?, s16, s16); // extern
f32 func_802B8018(u16); // extern
f32 sins(u16); // extern
extern f32 D_80286B70;
extern s16 D_802874CA;
@@ -164,7 +164,7 @@ void func_8028088C(void *arg0) {
func_8006BB34(arg0 + 0x10, 0x3F800000, arg0->unk2E, arg0->unk2C);
arg0->unk14 = arg0->unk14 + D_80286B70;
temp_f0 = func_802B8018(arg0->unk30);
temp_f0 = sins(arg0->unk30);
temp_t3 = arg0->unk3C + 1;
temp_at = temp_t3 < 0x321;
arg0->unk30 = arg0->unk30 + arg0->unk32;
+40 -40
View File
@@ -50,19 +50,19 @@ void func_80282048(void) {
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80282008(f32 *); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(s32); // extern
f32 sins(u16); // extern
f32 coss(s32); // extern
void func_80282050(Vec3f arg0, UNUSED f32 arg1, u16 arg2) {
f32 sp2C;
f32 sp28;
func_80282008(&sp2C);
sp28 = func_802B8018(arg2);
arg0[0] = (func_802B8038(arg2 & 0xFFFF) * sp2C) + (sp34 * sp28);
sp28 = sins(arg2);
arg0[0] = (coss(arg2 & 0xFFFF) * sp2C) + (sp34 * sp28);
arg0[1] = sp30;
sp28 = func_802B8038(arg2 & 0xFFFF);
arg0[2] = (sp34 * sp28) - (func_802B8018(arg2 & 0xFFFF) * sp2C);
sp28 = coss(arg2 & 0xFFFF);
arg0[2] = (sp34 * sp28) - (sins(arg2 & 0xFFFF) * sp2C);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282050.s")
@@ -71,18 +71,18 @@ GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282050.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80282008(f32 *); // extern
f32 func_802B8018(s32); // extern
f32 func_802B8038(u16); // extern
f32 sins(s32); // extern
f32 coss(u16); // extern
void func_802820F8(void *arg0, u16 arg2) {
f32 sp2C;
f32 sp28;
func_80282008(&sp2C);
sp28 = func_802B8038(arg2);
arg0->unk8 = (sp34 * sp28) - (func_802B8018(arg2 & 0xFFFF) * sp30);
sp28 = func_802B8018(arg2 & 0xFFFF);
arg0->unk4 = (func_802B8038(arg2 & 0xFFFF) * sp30) + (sp34 * sp28);
sp28 = coss(arg2);
arg0->unk8 = (sp34 * sp28) - (sins(arg2 & 0xFFFF) * sp30);
sp28 = sins(arg2 & 0xFFFF);
arg0->unk4 = (coss(arg2 & 0xFFFF) * sp30) + (sp34 * sp28);
arg0->unk0 = sp2C;
}
#else
@@ -260,8 +260,8 @@ GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282454.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(u16); // extern
f32 func_802B8038(s32); // extern
f32 sins(u16); // extern
f32 coss(s32); // extern
void func_80282504(void *arg0, void *arg1, f32 arg2, s32 arg3, u16 arg4) {
f32 sp24;
@@ -271,12 +271,12 @@ void func_80282504(void *arg0, void *arg1, f32 arg2, s32 arg3, u16 arg4) {
temp_a0 = arg3 & 0xFFFF;
sp20 = temp_a0;
sp24 = func_802B8038(temp_a0);
sp24 = coss(temp_a0);
sp1C = arg4;
arg1->unk0 = (func_802B8018(arg4) * (arg2 * sp24)) + arg0->unk0;
arg1->unk4 = (func_802B8018(sp22) * arg2) + arg0->unk4;
sp24 = func_802B8038(sp22);
arg1->unk8 = (func_802B8038(sp1E) * (arg2 * sp24)) + arg0->unk8;
arg1->unk0 = (sins(arg4) * (arg2 * sp24)) + arg0->unk0;
arg1->unk4 = (sins(sp22) * arg2) + arg0->unk4;
sp24 = coss(sp22);
arg1->unk8 = (coss(sp1E) * (arg2 * sp24)) + arg0->unk8;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282504.s")
@@ -285,8 +285,8 @@ GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80282504.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80282008(? *); // extern
f32 func_802B8018(u16); // extern
f32 func_802B8038(u16); // extern
f32 sins(u16); // extern
f32 coss(u16); // extern
void func_802825C8(void *arg0, void *arg1, void *arg2, void *arg3) {
? sp3C;
@@ -299,16 +299,16 @@ void func_802825C8(void *arg0, void *arg1, void *arg2, void *arg3) {
f32 temp_f20_4;
func_80282008(&sp3C);
temp_f20 = func_802B8038(arg3->unk0);
sp38 = -((arg2->unk8 * temp_f20) - (func_802B8018(arg3->unk0) * arg2->unk4));
temp_f20_2 = func_802B8018(arg3->unk0);
sp34 = (func_802B8038(arg3->unk0) * arg2->unk4) + (arg2->unk8 * temp_f20_2);
temp_f20 = coss(arg3->unk0);
sp38 = -((arg2->unk8 * temp_f20) - (sins(arg3->unk0) * arg2->unk4));
temp_f20_2 = sins(arg3->unk0);
sp34 = (coss(arg3->unk0) * arg2->unk4) + (arg2->unk8 * temp_f20_2);
sp30 = arg2->unk0;
temp_f20_3 = func_802B8018(arg3->unk2);
arg0->unk0 = (func_802B8038(arg3->unk2) * sp30) + (arg1->unk0 + (sp38 * temp_f20_3));
temp_f20_3 = sins(arg3->unk2);
arg0->unk0 = (coss(arg3->unk2) * sp30) + (arg1->unk0 + (sp38 * temp_f20_3));
arg0->unk4 = sp34 + arg1->unk4;
temp_f20_4 = func_802B8038(arg3->unk2);
arg0->unk8 = (arg1->unk8 + (sp38 * temp_f20_4)) - (func_802B8018(arg3->unk2) * sp30);
temp_f20_4 = coss(arg3->unk2);
arg0->unk8 = (arg1->unk8 + (sp38 * temp_f20_4)) - (sins(arg3->unk2) * sp30);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_802825C8.s")
@@ -604,7 +604,7 @@ s32 func_80282364(void *, ?, s16); // extern
? func_80282454(?32 *, ?32 *, s32 *, s16 *, s16 *); // extern
? func_80282504(?32 *, ?32 *, s32, s16, s32); // extern
? func_80282F00(void *, s16); // extern
f32 func_802B8018(u16); // extern
f32 sins(u16); // extern
void func_80282F44(s32 arg0, void *arg1, void *arg2) {
s32 sp5C;
@@ -626,7 +626,7 @@ void func_80282F44(s32 arg0, void *arg1, void *arg2) {
temp_s0 = arg1 + temp_t9;
sp30 = temp_t9;
temp_v0 = sp30 + &sp50;
*temp_v0 = *temp_v0 + (temp_s0->unk48 * func_802B8018(temp_s0->unk4E));
*temp_v0 = *temp_v0 + (temp_s0->unk48 * sins(temp_s0->unk4E));
if ((sp50 < 0x3800) && (sp50 >= -0x37FF)) {
func_80282504(&sp44, &sp38, sp5C, sp50, sp52);
}
@@ -660,7 +660,7 @@ GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_802830B4.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80282364(void *, ?, s16, void *); // extern
f32 func_802B8038(s32, void *); // extern
f32 coss(s32, void *); // extern
void func_80283100(void *arg0, f32 *arg1) {
f32 temp_f4;
@@ -673,7 +673,7 @@ void func_80283100(void *arg0, f32 *arg1) {
if (arg0->unk60 != 0) {
temp_a0 = arg0->unk64 & 0xFFFF;
arg0 = temp_a3;
temp_f4 = (func_802B8038(temp_a0, temp_a3) * arg0->unk60) / 256.0f;
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);
@@ -892,8 +892,8 @@ GLOBAL_ASM("asm/non_matchings/code_80281FA0/func_80283430.s")
s32 func_8028336C(? *, ? *); // extern
? func_80283428(); // extern
? func_80284AE8(? *); // extern
f32 func_802B8018(f32, s32); // extern
f32 func_802B8038(u16); // extern
f32 sins(f32, s32); // extern
f32 coss(u16); // extern
extern s32 D_802876D8;
extern ? D_802876E0;
extern ? D_802876EC;
@@ -968,11 +968,11 @@ s32 func_80283648(? *arg0) {
}
temp_t9 = phi_f0 & 0xFFFF;
sp2C = temp_t9;
sp38 = func_802B8018(65536.0f, temp_t9);
arg0->unk18 = func_802B8038(sp6C) * sp38;
arg0->unk1C = func_802B8038(sp2E);
sp38 = func_802B8018((bitwise f32) sp2E);
arg0->unk20 = func_802B8018((bitwise f32) sp6C) * -sp38;
sp38 = sins(65536.0f, temp_t9);
arg0->unk18 = coss(sp6C) * sp38;
arg0->unk1C = coss(sp2E);
sp38 = sins((bitwise f32) sp2E);
arg0->unk20 = sins((bitwise f32) sp6C) * -sp38;
func_80282008(arg0, &D_802876EC);
func_80282008(sp34, &D_802876E0);
if ((D_800DC50C == 9) && (gIsMirrorMode != 0)) {
+8 -8
View File
@@ -688,8 +688,8 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_80297A50.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
f32 func_802B8018(s32, void *); // extern
f32 func_802B8038(u16, void *); // extern
f32 sins(s32, void *); // extern
f32 coss(u16, void *); // extern
extern f64 D_802B9610;
void update_obj_yoshi_valley_egg(void *arg0) {
@@ -700,8 +700,8 @@ void update_obj_yoshi_valley_egg(void *arg0) {
temp_t7 = arg0->unk10 + 0x5B;
arg0->unk10 = temp_t7;
arg0 = temp_a1;
arg0->unk18 = (func_802B8018(temp_t7 & 0xFFFF, temp_a1) * arg0->unk8) + arg0->unk24;
arg0->unk20 = (func_802B8038(arg0->unk10, arg0) * arg0->unk8) + arg0->unk2C;
arg0->unk18 = (sins(temp_t7 & 0xFFFF, temp_a1) * arg0->unk8) + arg0->unk24;
arg0->unk20 = (coss(arg0->unk10, arg0) * arg0->unk8) + arg0->unk2C;
if ((arg0->unk2 & 0x400) != 0) {
arg0->unk28 = arg0->unk28 - D_802B9610;
if (arg0->unk28 < -3.0f) {
@@ -7661,8 +7661,8 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_802A2F34.s")
? func_802A29BC(void *, ? *, ? *); /* extern */
? func_802A2AD0(void *, ? *); /* extern */
? func_802A2C78(void *, ? *, ? *); /* extern */
f32 func_802B8018(s32); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(s32); /* extern */
f32 coss(s32); /* extern */
extern ? D_801502C0;
extern s32 D_8015F8E0;
extern ? D_8015F9B8;
@@ -7696,8 +7696,8 @@ void func_802A3008(void *arg0) {
sp4C.unk0 = D_802B8874.unk0;
sp4C.unk4 = D_802B8874.unk4;
sp4C.unk8 = D_802B8874.unk8;
sp48 = func_802B8018((temp_s1->unk26 - 0x8000) & 0xFFFF);
temp_f0 = func_802B8038((temp_s1->unk26 - 0x8000) & 0xFFFF);
sp48 = sins((temp_s1->unk26 - 0x8000) & 0xFFFF);
temp_f0 = coss((temp_s1->unk26 - 0x8000) & 0xFFFF);
temp_v0 = gDisplayListHead;
D_801502C0.unk0 = temp_f0;
D_801502C0.unk8 = -sp48;
+8 -8
View File
@@ -1852,9 +1852,9 @@ void update_obj_green_shell(void *arg0) {
arg0->unk2C = sp74;
return;
}
sp6C = func_802B8018(arg0->unk12) * 6.0f;
sp6C = sins(arg0->unk12) * 6.0f;
sp70 = arg0->unkC - temp_s1_2->unk_070;
sp74 = func_802B8038(arg0->unk12, MIPS2C_ERROR(Read from unset register $a1)) * 6.0f;
sp74 = coss(arg0->unk12, MIPS2C_ERROR(Read from unset register $a1)) * 6.0f;
func_802B63B8(&sp6C, temp_s1_2->unk_174);
arg0->unk18 = sp6C + temp_s1_2->posX;
arg0->unk1C = sp70 + temp_s1_2->posY;
@@ -1900,9 +1900,9 @@ void update_obj_green_shell(void *arg0) {
}
temp_t4 = arg0->unk12 + temp_v0_3->unk10;
arg0->unk12 = temp_t4;
sp6C = func_802B8018(temp_t4 & 0xFFFF) * 8.0f;
sp6C = sins(temp_t4 & 0xFFFF) * 8.0f;
sp70 = arg0->unkC - temp_s1_4->unk_070;
temp_f18 = func_802B8038(arg0->unk12, MIPS2C_ERROR(Read from unset register $a1)) * 8.0f;
temp_f18 = coss(arg0->unk12, MIPS2C_ERROR(Read from unset register $a1)) * 8.0f;
sp74 = temp_f18;
func_802B63B8((bitwise f32 *) 8.0f, &sp6C, temp_s1_4->unk_174);
sp78 = arg0->unk18;
@@ -2354,11 +2354,11 @@ block_16:
arg0->unk2C = sp94;
return;
}
temp_f10 = func_802B8018(arg0->unk12) * 8.0f;
temp_f10 = sins(arg0->unk12) * 8.0f;
sp8C = temp_f10;
temp_f4 = arg0->unkC - temp_s1_2->unk_070;
sp90 = temp_f4;
sp94 = func_802B8038(arg0->unk12) * 8.0f;
sp94 = coss(arg0->unk12) * 8.0f;
func_802B63B8(&sp8C, temp_s1_2->unk_174);
arg0->unk18 = temp_f10 + temp_s1_2->posX;
arg0->unk1C = temp_f4 + temp_s1_2->posY;
@@ -2472,9 +2472,9 @@ block_16:
}
temp_t6 = arg0->unk12 + temp_v0_7->unk10;
arg0->unk12 = temp_t6;
sp8C = func_802B8018(temp_t6 & 0xFFFF) * 8.0f;
sp8C = sins(temp_t6 & 0xFFFF) * 8.0f;
sp90 = arg0->unkC - temp_s1_3->unk_070;
sp94 = func_802B8038(arg0->unk12) * 8.0f;
sp94 = coss(arg0->unk12) * 8.0f;
func_802B63B8(&sp8C, temp_s1_3->unk_174);
sp38 = arg0->unk18;
sp3C = arg0->unk1C;
+101 -107
View File
@@ -3,10 +3,18 @@
#include <types.h>
#include <common_structs.h>
// Location based from sm64.
// This may need to be moved before framebuffers.c
// If math_util has data that does not line-up with trig_tables.
#include "trig_tables.inc.c"
f32 func_802B4F60(s32 arg0, f32 arg2, f32 arg3); // static
f32 func_802B6434(f32, f32, f32 *, f32 *); // static
s16 func_802B7830(f32 y, f32 x);
extern f32 gSineTable[];
extern f32 gCosineTable[];
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_802B4F60(s32 arg0, ? arg2, ? arg3) {
@@ -485,8 +493,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B5794.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_802B53C8(void *); /* extern */
f32 func_802B8018(s32); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(s32); /* extern */
f32 coss(s32); /* extern */
void func_802B59DC(void *arg0, s32 arg1) {
f32 sp2C;
@@ -497,9 +505,9 @@ void func_802B59DC(void *arg0, s32 arg1) {
temp_a0 = arg1 & 0xFFFF;
sp24 = temp_a0;
temp_f0 = func_802B8018(temp_a0);
temp_f0 = sins(temp_a0);
sp2C = temp_f0;
sp28 = func_802B8038(temp_a0);
sp28 = coss(temp_a0);
func_802B53C8(arg0);
arg0->unk18 = temp_f0;
arg0->unk24 = -temp_f0;
@@ -515,8 +523,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B59DC.s")
//This function did not have a glabel in the original assembly, as such it may
//be unused/unnamed
? func_802B53C8(void *); /* extern */
f32 func_802B8018(s32); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(s32); /* extern */
f32 coss(s32); /* extern */
void func_802B5A44(void *arg0, s32 arg1) {
f32 sp2C;
@@ -527,9 +535,9 @@ void func_802B5A44(void *arg0, s32 arg1) {
temp_a0 = arg1 & 0xFFFF;
sp24 = temp_a0;
temp_f0 = func_802B8018(temp_a0);
temp_f0 = sins(temp_a0);
sp2C = temp_f0;
sp28 = func_802B8038(temp_a0);
sp28 = coss(temp_a0);
func_802B53C8(arg0);
arg0->unk20 = temp_f0;
arg0->unk8 = -temp_f0;
@@ -545,8 +553,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B5A44.s")
//This function did not have a glabel in the original assembly, as such it may
//be unused/unnamed
? func_802B53C8(void *); /* extern */
f32 func_802B8018(s32); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(s32); /* extern */
f32 coss(s32); /* extern */
void func_802B5AAC(void *arg0, s32 arg1) {
f32 sp2C;
@@ -557,9 +565,9 @@ void func_802B5AAC(void *arg0, s32 arg1) {
temp_a0 = arg1 & 0xFFFF;
sp24 = temp_a0;
temp_f0 = func_802B8018(temp_a0);
temp_f0 = sins(temp_a0);
sp2C = temp_f0;
sp28 = func_802B8038(temp_a0);
sp28 = coss(temp_a0);
func_802B53C8(arg0);
arg0->unk4 = temp_f0;
arg0->unk10 = -temp_f0;
@@ -572,8 +580,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B5AAC.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
f32 func_802B8018(u16); /* extern */
f32 func_802B8038(u16); /* extern */
f32 sins(u16); /* extern */
f32 coss(u16); /* extern */
void func_802B5B14(void *arg0, void *arg1) {
f32 sp70;
@@ -599,12 +607,12 @@ void func_802B5B14(void *arg0, void *arg1) {
f32 temp_f4;
f32 temp_f6;
sp38 = func_802B8018(arg1->unk0);
temp_f20 = func_802B8038(arg1->unk0);
sp30 = func_802B8018(arg1->unk2);
sp2C = func_802B8038(arg1->unk2);
sp28 = func_802B8018(arg1->unk4);
temp_f0 = func_802B8038(arg1->unk4);
sp38 = sins(arg1->unk0);
temp_f20 = coss(arg1->unk0);
sp30 = sins(arg1->unk2);
sp2C = coss(arg1->unk2);
sp28 = sins(arg1->unk4);
temp_f0 = coss(arg1->unk4);
temp_f4 = arg0->unk0;
temp_f12 = sp38 * sp30;
sp3C = temp_f4;
@@ -631,8 +639,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B5B14.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
f32 func_802B8018(s32); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(s32); /* extern */
f32 coss(s32); /* extern */
void func_802B5CAC(u16 arg0, s32 arg1, void *arg2) {
f32 sp2C;
@@ -644,11 +652,11 @@ void func_802B5CAC(u16 arg0, s32 arg1, void *arg2) {
temp_a0 = arg1 & 0xFFFF;
sp1C = temp_a0;
sp2C = func_802B8018(temp_a0);
sp28 = func_802B8038(temp_a0);
sp2C = sins(temp_a0);
sp28 = coss(temp_a0);
sp1C = arg0;
sp24 = func_802B8018(arg0);
temp_f10 = sp28 * func_802B8038(arg0);
sp24 = sins(arg0);
temp_f10 = sp28 * coss(arg0);
arg2->unk0 = sp28 * sp24;
arg2->unk4 = sp2C;
arg2->unk8 = -temp_f10;
@@ -672,8 +680,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B5D30.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
f32 func_802B8018(s32); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(s32); /* extern */
f32 coss(s32); /* extern */
extern ? gSegmentTable;
void func_802B5D64(u32 arg0, u16 arg1, s32 arg2, s32 arg3) {
@@ -700,12 +708,12 @@ void func_802B5D64(u32 arg0, u16 arg1, s32 arg2, s32 arg3) {
temp_a0 = arg2 & 0xFFFF;
temp_s0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000;
sp20 = temp_a0;
sp48 = func_802B8018(temp_a0);
sp44 = func_802B8038(temp_a0);
sp48 = sins(temp_a0);
sp44 = coss(temp_a0);
sp20 = arg1;
sp40 = func_802B8018(arg1);
sp40 = sins(arg1);
temp_a0_2 = arg3 & 3;
temp_f10 = sp44 * func_802B8038(arg1) * -120.0f;
temp_f10 = sp44 * coss(arg1) * -120.0f;
sp2C = sp44 * sp40 * 120.0f;
sp2D = 120.0f * sp48;
sp2E = temp_f10;
@@ -775,8 +783,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B5F00.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
f32 func_802B8018(u16); /* extern */
f32 func_802B8038(u16); /* extern */
f32 sins(u16); /* extern */
f32 coss(u16); /* extern */
void func_802B5F74(void *arg0, void *arg1, void *arg2) {
f32 sp3C;
@@ -789,12 +797,12 @@ void func_802B5F74(void *arg0, void *arg1, void *arg2) {
f32 temp_f20;
f32 temp_f6;
sp3C = func_802B8018(arg2->unk0);
temp_f20 = func_802B8038(arg2->unk0);
sp34 = func_802B8018(arg2->unk2);
sp30 = func_802B8038(arg2->unk2);
sp2C = func_802B8018(arg2->unk4);
temp_f0 = func_802B8038(arg2->unk4);
sp3C = sins(arg2->unk0);
temp_f20 = coss(arg2->unk0);
sp34 = sins(arg2->unk2);
sp30 = coss(arg2->unk2);
sp2C = sins(arg2->unk4);
temp_f0 = coss(arg2->unk4);
temp_f12 = sp3C * sp34;
temp_f6 = temp_f12 * temp_f0;
arg0->unk0 = (sp30 * temp_f0) + (temp_f12 * sp2C);
@@ -823,8 +831,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B5F74.s")
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
//This function did not have a glabel in the original assembly, as such it may
//be unused/unnamed
f32 func_802B8018(u16); /* extern */
f32 func_802B8038(u16); /* extern */
f32 sins(u16); /* extern */
f32 coss(u16); /* extern */
void func_802B60B4(void *arg0, void *arg1, void *arg2) {
f32 sp3C;
@@ -837,12 +845,12 @@ void func_802B60B4(void *arg0, void *arg1, void *arg2) {
f32 temp_f20;
f32 temp_f6;
sp3C = func_802B8018(arg2->unk0);
temp_f20 = func_802B8038(arg2->unk0);
sp34 = func_802B8018(arg2->unk2);
sp30 = func_802B8038(arg2->unk2);
sp2C = func_802B8018(arg2->unk4);
temp_f0 = func_802B8038(arg2->unk4);
sp3C = sins(arg2->unk0);
temp_f20 = coss(arg2->unk0);
sp34 = sins(arg2->unk2);
sp30 = coss(arg2->unk2);
sp2C = sins(arg2->unk4);
temp_f0 = coss(arg2->unk4);
temp_f12 = sp3C * sp34;
temp_f6 = temp_f12 * temp_f0;
arg0->unk0 = (sp30 * temp_f0) + (temp_f12 * sp2C);
@@ -871,8 +879,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B60B4.s")
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
//This function did not have a glabel in the original assembly, as such it may
//be unused/unnamed
f32 func_802B8018(u16); /* extern */
f32 func_802B8038(u16); /* extern */
f32 sins(u16); /* extern */
f32 coss(u16); /* extern */
void func_802B6214(void *arg0, void *arg1, void *arg2) {
f32 sp3C;
@@ -885,12 +893,12 @@ void func_802B6214(void *arg0, void *arg1, void *arg2) {
f32 temp_f20;
f32 temp_f6;
sp3C = func_802B8018(arg2->unk0);
temp_f20 = func_802B8038(arg2->unk0);
sp34 = func_802B8018(arg2->unk2);
sp30 = func_802B8038(arg2->unk2);
sp2C = func_802B8018(arg2->unk4);
temp_f0 = func_802B8038(arg2->unk4);
sp3C = sins(arg2->unk0);
temp_f20 = coss(arg2->unk0);
sp34 = sins(arg2->unk2);
sp30 = coss(arg2->unk2);
sp2C = sins(arg2->unk4);
temp_f0 = coss(arg2->unk4);
temp_f12 = sp3C * sp34;
temp_f6 = temp_f12 * temp_f0;
arg0->unk0 = (sp30 * temp_f0) + (temp_f12 * sp2C);
@@ -996,8 +1004,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B64B0.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
f32 func_802B8018(s32, void *); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(s32, void *); /* extern */
f32 coss(s32); /* extern */
void func_802B64C4(void *arg0, s32 arg1) {
f32 sp2C;
@@ -1014,8 +1022,8 @@ void func_802B64C4(void *arg0, s32 arg1) {
temp_a0 = arg1 & 0xFFFF;
sp18 = temp_a0;
arg0 = temp_a2;
sp2C = func_802B8018(temp_a0, temp_a2);
temp_f0 = func_802B8038(temp_a0);
sp2C = sins(temp_a0, temp_a2);
temp_f0 = coss(temp_a0);
temp_f2 = arg0->unk0;
temp_f12 = arg0->unk8;
temp_f4 = temp_f0 * temp_f2;
@@ -1032,8 +1040,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B64C4.s")
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_802B6A84(f32, ?, f32 *, s16, f32, ?, f32); /* extern */
f32 func_802B7CE8(f32, f32, s32); /* extern */
f32 func_802B8018(u16); /* extern */
f32 func_802B8038(u16); /* extern */
f32 sins(u16); /* extern */
f32 coss(u16); /* extern */
static f64 D_802B9FB8 = 3.141592653589793;
static f64 D_802B9FC0 = 360.0;
@@ -1067,8 +1075,8 @@ void func_802B6540(void *arg0, f32 arg1, f32 arg2, f32 arg3, u16 arg4) {
f32 *phi_a3_2;
sp38 = arg4;
sp40 = func_802B8018(arg4);
temp_f0 = func_802B8038(arg4);
sp40 = sins(arg4);
temp_f0 = coss(arg4);
sp8C = temp_f0;
spAC = temp_f0;
sp94 = -sp40;
@@ -1228,8 +1236,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B68F8.s")
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
//This function did not have a glabel in the original assembly, as such it may
//be unused/unnamed
f32 func_802B8018(s32, void *); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(s32, void *); /* extern */
f32 coss(s32); /* extern */
void func_802B6A84(void *arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4) {
f32 sp54;
@@ -1253,8 +1261,8 @@ void func_802B6A84(void *arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4) {
temp_a0 = arg1 & 0xFFFF;
sp34 = temp_a0;
arg0 = temp_a2;
sp54 = func_802B8018(temp_a0, temp_a2);
temp_f0 = func_802B8038(temp_a0);
sp54 = sins(temp_a0, temp_a2);
temp_f0 = coss(temp_a0);
temp_f12 = arg2 * arg2;
temp_f6 = 1.0f - temp_f0;
arg0->unk0 = ((1.0f - temp_f12) * temp_f0) + temp_f12;
@@ -1285,8 +1293,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B6A84.s")
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
//This function did not have a glabel in the original assembly, as such it may
//be unused/unnamed
f32 func_802B8018(f32, s32, void *); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(f32, s32, void *); /* extern */
f32 coss(s32); /* extern */
void func_802B6BC0(void *arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4) {
f32 sp3C;
@@ -1308,8 +1316,8 @@ void func_802B6BC0(void *arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4) {
sp2C = temp_a0;
arg0 = temp_a2;
arg2 = temp_f14;
sp3C = func_802B8018(temp_f14, temp_a0, temp_a2);
temp_f18 = func_802B8038(temp_a0);
sp3C = sins(temp_f14, temp_a0, temp_a2);
temp_f18 = coss(temp_a0);
temp_f0 = sqrtf((arg2 * arg2) + (arg4 * arg4));
if (temp_f0 != 0.0f) {
temp_f12 = 1.0f / temp_f0;
@@ -1351,8 +1359,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B6BC0.s")
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
//This function did not have a glabel in the original assembly, as such it may
//be unused/unnamed
f32 func_802B8018(s32); /* extern */
f32 func_802B8038(s32); /* extern */
f32 sins(s32); /* extern */
f32 coss(s32); /* extern */
void func_802B6D58(void *arg0, void *arg1, void *arg2) {
f32 sp3C;
@@ -1368,15 +1376,15 @@ void func_802B6D58(void *arg0, void *arg1, void *arg2) {
f32 temp_f20;
f32 temp_f6;
sp3C = func_802B8018(arg2->unk0 & 0xFFFF);
temp_f20 = func_802B8038(arg2->unk0 & 0xFFFF);
temp_f0 = func_802B8018(arg2->unk4 & 0xFFFF);
sp3C = sins(arg2->unk0 & 0xFFFF);
temp_f20 = coss(arg2->unk0 & 0xFFFF);
temp_f0 = sins(arg2->unk4 & 0xFFFF);
sp34 = temp_f0;
temp_f0_2 = func_802B8038(arg2->unk4 & 0xFFFF);
temp_f0_2 = coss(arg2->unk4 & 0xFFFF);
sp30 = temp_f0_2;
temp_f0_3 = func_802B8018(arg2->unk8 & 0xFFFF);
temp_f0_3 = sins(arg2->unk8 & 0xFFFF);
sp2C = temp_f0_3;
temp_f0_4 = func_802B8038(arg2->unk8 & 0xFFFF);
temp_f0_4 = coss(arg2->unk8 & 0xFFFF);
temp_f12 = sp3C * temp_f0;
temp_f6 = temp_f12 * temp_f0_4;
arg0->unk0 = (temp_f0_2 * temp_f0_4) + (temp_f12 * temp_f0_3);
@@ -1534,14 +1542,14 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B75F8.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
extern u16 D_802BF370;
extern u16 gArctanTable;
static f32 D_802B9FD8 = 1000000.0f;
u16 func_802B7790(f32 arg0, f32 arg1) {
f32 temp_f0;
if (arg1 == 0.0f) {
return D_802BF370;
return gArctanTable;
}
temp_f0 = arg0 / arg1;
if (D_802B9FD8 < temp_f0) {
@@ -1550,7 +1558,7 @@ u16 func_802B7790(f32 arg0, f32 arg1) {
}
return 0xC000;
}
return (&D_802BF370)[(temp_f0 * 1024.0f) + 0.5f];
return (&gArctanTable)[(temp_f0 * 1024.0f) + 0.5f];
}
#else
GLOBAL_ASM("asm/non_matchings/math_util/func_802B7790.s")
@@ -1861,27 +1869,13 @@ void func_802B7F7C(void *arg0, void *arg1, void *arg2) {
GLOBAL_ASM("asm/non_matchings/math_util/func_802B7F7C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
extern ? D_802BA370;
f32 func_802B8018(s32 arg0) {
return *(&D_802BA370 + (((arg0 & 0xFFFF) >> 4) * 4));
f32 sins(u16 arg0) {
return gSineTable[arg0 >> 4];
}
#else
GLOBAL_ASM("asm/non_matchings/math_util/func_802B8018.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
extern ? D_802BB370;
f32 func_802B8038(s32 arg0) {
return *(&D_802BB370 + (((arg0 & 0xFFFF) >> 4) * 4));
f32 coss(u16 arg0) {
return gCosineTable[arg0 >> 4];
}
#else
GLOBAL_ASM("asm/non_matchings/math_util/func_802B8038.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
@@ -1996,8 +1990,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B80D0.s")
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
//This function did not have a glabel in the original assembly, as such it may
//be unused/unnamed
? func_802B8018(s32); /* extern */
? func_802B8038(s32); /* extern */
? sins(s32); /* extern */
? coss(s32); /* extern */
extern ? gSegmentTable;
void func_802B8414(u32 arg0, void *arg1, u16 arg2, s32 arg3, s32 arg4) {
@@ -2023,11 +2017,11 @@ void func_802B8414(u32 arg0, void *arg1, u16 arg2, s32 arg3, s32 arg4) {
temp_a0 = arg3 & 0xFFFF;
temp_s0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000;
sp20 = temp_a0;
func_802B8018(temp_a0);
func_802B8038(temp_a0);
sins(temp_a0);
coss(temp_a0);
sp20 = arg2;
func_802B8018(arg2);
func_802B8038(arg2);
sins(arg2);
coss(arg2);
sp40 = 0.0f;
sp44 = 0.0f;
sp48 = 1.0f;
+35
View File
@@ -0,0 +1,35 @@
#ifndef MATH_UTIL_H
#define MATH_UTIL_H
#include <PR/ultratypes.h>
#include "types.h"
/*
* The sine and cosine tables overlap, but "#define gCosineTable (gSineTable +
* 0x400)" doesn't give expected codegen; gSineTable and gCosineTable need to
* be different symbols for code to match. Most likely the tables were placed
* adjacent to each other, and gSineTable cut short, such that reads overflow
* into gCosineTable.
*
* These kinds of out of bounds reads are undefined behavior, and break on
* e.g. GCC (which doesn't place the tables next to each other, and probably
* exploits array sizes for range analysis-based optimizations as well).
* Thus, for non-IDO compilers we use the standard-compliant version.
*/
extern f32 gSineTable[];
#ifdef AVOID_UB
#define gCosineTable (gSineTable + 0x400)
#else
extern f32 gCosineTable[];
#endif
//#define sins(x) gSineTable[(u16) (x) >> 4]
//#define coss(x) gCosineTable[(u16) (x) >> 4]
//#define min(a, b) ((a) <= (b) ? (a) : (b))
//#define max(a, b) ((a) > (b) ? (a) : (b))
#define sqr(x) ((x) * (x))
#endif // MATH_UTIL_H