mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-12 19:04:38 +00:00
Decompile code_800D2E30 and use struct in code_800A9F30 (#80)
* Match func_800AA000 * Match z_camera/func_800437F0 * Decompile code_800D2E30, use struct in 800A9F30 * Format * Remove 'U' from literals * Remove bss, cleanup z_camera * Review changes, rename temp * Move externs to variables.h
This commit is contained in:
parent
21750d5aee
commit
eefbe9afe1
12 changed files with 197 additions and 424 deletions
|
@ -22,9 +22,20 @@ typedef struct {
|
|||
Vec3s pos;
|
||||
} SplineData; // originally called SplinedatZ
|
||||
|
||||
// 47 lines
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800437F0.s")
|
||||
// had an attempt at this but didn't get very close
|
||||
f32 func_800437F0(f32 arg0, f32 arg1) {
|
||||
f32 percent = 0.4f;
|
||||
f32 ret = fabsf(arg1);
|
||||
|
||||
if (arg0 < ret) {
|
||||
ret = 1;
|
||||
} else if (ret < (f32)arg0 * (1 - percent)) { //! float cast needed to match
|
||||
ret = (SQ(arg1) * (1 - percent)) / SQ((1 - percent) * arg0);
|
||||
} else {
|
||||
ret = 1 - (0.4f * SQ(arg0 - ret)) / SQ(0.4f * arg0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
f32 func_8004389C(f32 a, f32 b, f32 c, f32 d) {
|
||||
f32 temp1 = a - b;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue