diff options
| author | Joshua Peisach <itzswirlz2020@outlook.com> | 2023-08-25 23:27:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-25 21:27:49 -0600 |
| commit | 965d1e85b45ba0e596dbbd92ebe3b9799d7e64f0 (patch) | |
| tree | f8fc4e9c63b3e668a70bebb6788180391a7ee640 /src | |
| parent | 0d9396b6316a79768e14676880266acf0fe175d6 (diff) | |
code_80086E70: Match 8008ACE0 (#382)
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/code_80086E70.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/code_80086E70.c b/src/code_80086E70.c index 2843c5db8..d234261dc 100644 --- a/src/code_80086E70.c +++ b/src/code_80086E70.c @@ -1411,28 +1411,12 @@ UNUSED void func_8008ACD8(void) { } -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-09-2023 -void func_8008ACE0(f32 *arg0, f32 arg1) { - f32 temp_f14; - f32 temp_f2; - f64 temp_f0; - f64 temp_f16; - f64 temp_f18; - - temp_f0 = (f64) arg1; - temp_f2 = (f32) (1.0 - temp_f0); - temp_f14 = arg1 * arg1; - temp_f18 = (f64) temp_f14; - temp_f16 = (f64) (temp_f14 * arg1); - arg0->unk0 = (f32) ((f64) (temp_f2 * temp_f2 * temp_f2) / 6.0); - arg0->unk4 = (f32) (((temp_f16 * 0.5) - temp_f18) + 0.6666666666666666); - arg0->unk8 = (f32) ((temp_f16 * -0.5) + (0.5 * temp_f18) + (0.5 * temp_f0) + 0.16666666666666666); - arg0->unkC = (f32) (temp_f16 / 6.0); +void func_8008ACE0(f32 arg0[], f32 arg1) { + arg0[0] = (f32) ((f64) ((f32) (1.0 - arg1) * (f32) (1.0 - arg1) * (f32) (1.0 - arg1)) / 6.0); + arg0[1] = (f32) ((((f64) (arg1 * arg1 * arg1) * 0.5) - arg1 * arg1) + 0.6666666666666666); + arg0[2] = (f32) (((f64) (arg1 * arg1 * arg1) * -0.5) + (0.5 * (arg1 * arg1)) + (0.5 * arg1) + 0.16666666666666666); + arg0[3] = (f32) ((f64) (arg1 * arg1 * arg1) / 6.0); } -#else -GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008ACE0.s") -#endif UNUSED void func_8008ADC0(void) { |
