mirror of
https://github.com/n64decomp/mk64
synced 2026-08-06 09:32:33 -04:00
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:
+46
-46
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user