diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2023-09-05 15:00:15 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-05 15:00:15 -0600 |
| commit | 7f7ecc5854b5dcf23160a0da25488a7ef07b98a5 (patch) | |
| tree | e324bc5d90d0dd22ffbd17c111fb805f4dd1e916 /src/code_80086E70.c | |
| parent | 67fbcac9ecf3768ceeac68aa37602fb27693553e (diff) | |
assorted matches (#399)
* assorted matches
Diffstat (limited to 'src/code_80086E70.c')
| -rw-r--r-- | src/code_80086E70.c | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/src/code_80086E70.c b/src/code_80086E70.c index 3e01e28ca..11d5c239c 100644 --- a/src/code_80086E70.c +++ b/src/code_80086E70.c @@ -1575,18 +1575,11 @@ void func_8008B44C(s32 arg0) { D_80165C18[arg0].unk_07C++; } -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-24-2023 void func_8008B478(s32 objectIndex, s32 arg1) { f32 sp34; - struct_80165C18_entry *sp24; - f32 temp_f0; - f32 temp_f0_2; + f32 temp; + f32 temp2; f32 var_f6; - s16 (*temp_v0)[4]; - struct_80165C18_entry *temp_v1; - u16 temp_t9; - u32 temp_t3; func_8008B3E4(objectIndex); if (arg1 != 0) { @@ -1594,29 +1587,19 @@ void func_8008B478(s32 objectIndex, s32 arg1) { } else { func_8008B1D4(objectIndex); } - temp_v1 = &D_80165C18[objectIndex]; - temp_t9 = temp_v1->unk_098; - var_f6 = (f32) temp_t9; - if ((s32) temp_t9 < 0) { - var_f6 += 4294967296.0f; - } - sp24 = temp_v1; - temp_f0 = (f32) ((f64) var_f6 / 10000.0); - sp34 = temp_f0; - func_8008B17C(objectIndex, temp_f0); - if (func_8007223C(objectIndex, 0x00000800) != 0) { - sp24 = temp_v1; + + sp34 = ((f32)D_80165C18[objectIndex].unk_098 / 10000.0); + func_8008B17C(objectIndex, sp34); + if (func_8007223C(objectIndex, 0x800) != 0) { func_8008AFE0(objectIndex, sp34); } - temp_v0 = temp_v1->unk_07C; - temp_f0_2 = (f32) temp_v0[0][3]; - temp_t3 = (u32) (10000.0 / (f64) ((((f32) temp_v0->unkE - temp_f0_2) * sp34) + temp_f0_2)); - temp_v1->unk_09A = (s16) temp_t3; - temp_v1->unk_098 += temp_t3; + + var_f6 = D_80165C18[objectIndex].unk_07C[0][3]; + temp = D_80165C18[objectIndex].unk_07C[0][7]; + + D_80165C18[objectIndex].unk_09A = 10000.0 / (((temp - var_f6) * sp34) + var_f6); + D_80165C18[objectIndex].unk_098 += D_80165C18[objectIndex].unk_09A; } -#else -GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008B478.s") -#endif void func_8008B620(s32 objectIndex) { s16 temp_t0; |
