1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-14 13:30:47 +00:00

Ugly match for func_80A7492C

This commit is contained in:
Sirius902 2020-10-02 22:34:54 -07:00
parent 321b44a10d
commit 9f8b35bd0c

View file

@ -247,47 +247,26 @@ void func_80A7489C(EnIk* this) {
EnIk_SetupAction(this, func_80A7492C);
}
#ifdef NON_MATCHING
void func_80A7492C(EnIk *this, GlobalContext *globalCtx) {
f32 temp_f0;
f32 temp_f0_2;
s16 yawDiff;
s32 phi_a0;
s32 absYawDiff;
f32 phi_f2;
s32 absYawDiff_2;
f32 phi_f2_2;
f32 absDist;
phi_a0 = 0x3FFC;
if (this->unk_2FB == 0) {
phi_a0 = 0xAAA;
}
phi_a0 = (this->unk_2FB == 0) ? 0x0AAA : 0x3FFC;
yawDiff = this->actor.yawTowardsLink - this->actor.shape.rot.y;
absYawDiff = ABS(yawDiff);
if ((phi_a0 >= absYawDiff) && (this->actor.xzDistFromLink < 100.0f)) {
temp_f0 = this->actor.yDistFromLink;
if (0.0f <= temp_f0) {
phi_f2 = temp_f0;
} else {
phi_f2 = -temp_f0;
}
if (phi_f2 < 150.0f) {
if ((globalCtx->gameplayFrames & 1) != 0) {
if ((ABS(yawDiff) <= phi_a0) && (this->actor.xzDistFromLink < 100.0f)) {
absDist = ABS(this->actor.yDistFromLink);
if (absDist < 150.0f) {
if ((globalCtx->gameplayFrames & 1)) {
func_80A74E2C(this);
} else {
func_80A751C8(this);
}
} else {
block_13:
absYawDiff_2 = ABS(yawDiff);
if (absYawDiff_2 < 0x4001) {
temp_f0_2 = this->actor.yDistFromLink;
if (0.0f <= temp_f0_2) {
phi_f2_2 = temp_f0_2;
} else {
phi_f2_2 = -temp_f0_2;
}
if (phi_f2_2 < 150.0f) {
if (ABS(yawDiff) < 0x4001) {
absDist = ABS(this->actor.yDistFromLink);
if (absDist < 150.0f) {
func_80A74AAC(this);
} else {
block_21:
@ -303,9 +282,6 @@ block_21:
func_80A745E4(this, globalCtx);
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/func_80A7492C.s")
#endif
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/func_80A74AAC.s")