1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 15:34:41 +00:00

Match and improve some non matchings (#254)

This commit is contained in:
Roman971 2020-07-15 17:23:57 +02:00 committed by GitHub
parent 4e1fc875c3
commit 106f7a3f6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 51 additions and 451 deletions

View file

@ -3707,31 +3707,31 @@ void func_800344BC(Actor* actor, struct_80034A14_arg1* arg1, s16 arg2, s16 arg3,
sp44 = Math_Vec3f_Yaw(&sp30, &arg1->unk_18);
sp40 = Math_Vec3f_Yaw(&actor->posRot.pos, &arg1->unk_18) - actor->shape.rot.y;
temp1 = (sp40 < -arg2) ? -arg2 : ((sp40 > arg2) ? arg2 : sp40);
temp1 = CLAMP(sp40, -arg2, arg2);
Math_SmoothScaleMaxMinS(&arg1->unk_08.y, temp1, 6, 2000, 1);
sp40 = (ABS(sp40) >= 0x8000) ? 0 : ((sp40 >= 0) ? sp40 : -sp40);
arg1->unk_08.y = ((arg1->unk_08.y < -sp40) ? -sp40 : ((arg1->unk_08.y > sp40) ? sp40 : arg1->unk_08.y));
sp40 = (ABS(sp40) >= 0x8000) ? 0 : ABS(sp40);
arg1->unk_08.y = CLAMP(arg1->unk_08.y, -sp40, sp40);
sp40 = sp40 - arg1->unk_08.y;
temp1 = (sp40 < -arg5) ? -arg5 : ((sp40 > arg5) ? arg5 : sp40);
Math_SmoothScaleMaxMinS(&arg1->unk_08.z, temp1, 6, 2000, 1);
temp1 = CLAMP(sp40, -arg5, arg5);
Math_SmoothScaleMaxMinS(&arg1->unk_0E.y, temp1, 6, 2000, 1);
sp40 = (ABS(sp40) >= 0x8000) ? 0 : ((sp40 >= 0) ? sp40 : -sp40);
arg1->unk_08.z = ((arg1->unk_08.z < -sp40) ? -sp40 : ((arg1->unk_08.z > sp40) ? sp40 : arg1->unk_08.z));
sp40 = (ABS(sp40) >= 0x8000) ? 0 : ABS(sp40);
arg1->unk_0E.y = CLAMP(arg1->unk_0E.y, -sp40, sp40);
if (arg8 != 0) {
if (arg3) {} // Seems necessary to match
Math_SmoothScaleMaxMinS(&actor->shape.rot.y, sp44, 6, 2000, 1);
}
temp1 = (sp46 < arg4) ? arg4 : ((sp46 > arg3) ? arg3 : sp46);
Math_SmoothScaleMaxMinS(&arg1->unk_08, temp1, 6, 2000, 1);
temp1 = CLAMP(sp46, arg4, arg3);
Math_SmoothScaleMaxMinS(&arg1->unk_08.x, temp1, 6, 2000, 1);
temp2 = sp46 - arg1->unk_08.x;
temp1 = (temp2 < arg7) ? arg7 : ((temp2 > arg6) ? arg6 : temp2);
temp1 = CLAMP(temp2, arg7, arg6);
Math_SmoothScaleMaxMinS(&arg1->unk_0E.x, temp1, 6, 2000, 1);
}
#else