1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-08 15:30:14 +00:00

En_Tite OK (#555)

* EnTite_Update matching

* Fixes to update

* made good progress, func_80B1A2A0 is in a good place to be matching soon

* Merge stuff

* func_80B19E94 done, func_80B18CC4 done

* EnTite_Destroy and EnTite_Init done

* Commenting out sDamageTable and EnTite_Init until all the data matches

* Some more small functions done

* more progress

* func_80B19918 done

* func_80B18E7C done

* func_80B19524 done

* more progress

* EnTite_Draw equiv but nonmatching, file otherwise done

* Found some unstaged changed on old laptop

* Draw matching: File fully matching!

* Documentation

* finished documentation

* deleted data files

* update spec

* fixed waterY -> yDistToWater rename after merge

* ran format.sh

* fixing accidental renames in camera

* Fixed some obvious number/comment formatting issues

* Removed unecessary prototypes

* merge

* running format.sh

* suggestions

* more pr comment changes

* format to push

* one more change

* more renames (see pr comments)

* merge

* renames

* format.sh

* fix renames

* function comment formatting

* merge + format

* endless merge fixes

* merge fixes until  die

* yet again a merge fix

* pr suggestions
This commit is contained in:
AdamKiddle 2020-12-31 20:00:30 +00:00 committed by GitHub
parent 5a2bd7a035
commit 600bad1f20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
147 changed files with 1431 additions and 3642 deletions

View file

@ -528,12 +528,12 @@ void func_80AA71AC(EnMb* this, GlobalContext* globalCtx) {
this->unk_32A--;
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.initPosRot.rot.y, 1, 0x3E8, 0);
}
yDist = this->actor.yDistFromLink;
yDist = this->actor.yDistToLink;
yDistAbs = ABS(yDist);
if ((yDistAbs <= 20.0f) && func_80AA652C(this, globalCtx)) {
yawDiff = this->actor.shape.rot.y - this->actor.yawTowardsLink;
yawDiffAbs = ABS(yawDiff);
if ((yawDiffAbs <= 0x4000) || (func_8002DDE4(globalCtx) != 0) && (this->actor.xzDistFromLink < 160.0f)) {
if ((yawDiffAbs <= 0x4000) || (func_8002DDE4(globalCtx) != 0) && (this->actor.xzDistToLink < 160.0f)) {
func_80AA66A0(this, globalCtx);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_VOICE);
func_80AA6AC8(this);
@ -597,8 +597,8 @@ void func_80AA74BC(EnMb* this, GlobalContext* globalCtx) {
if (this->unk_32E == 0) {
yawDiff = this->actor.shape.rot.y - this->actor.yawTowardsLink;
if ((ABS(this->actor.yDistFromLink) <= 20.0f) && (func_80AA652C(this, globalCtx) != 0) &&
(ABS(yawDiff) <= 0x4000) && (this->actor.xzDistFromLink <= 200.0f)) {
if ((ABS(this->actor.yDistToLink) <= 20.0f) && (func_80AA652C(this, globalCtx) != 0) &&
(ABS(yawDiff) <= 0x4000) && (this->actor.xzDistToLink <= 200.0f)) {
func_80AA6AC8(this);
} else {
endFrame = Animation_GetLastFrame(&D_06002C10);
@ -607,7 +607,7 @@ void func_80AA74BC(EnMb* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_NORM);
}
} else if (this->actor.xzDistFromLink <= 160.0f) {
} else if (this->actor.xzDistToLink <= 160.0f) {
this->actor.speedXZ = -5.0f;
} else {
this->actor.speedXZ = 0.0f;
@ -692,7 +692,7 @@ void func_80AA7938(EnMb* this, GlobalContext* globalCtx) {
}
}
func_8002F71C(globalCtx, &this->actor, ((650.0f - this->actor.xzDistFromLink) * 0.04f) + 4.0f,
func_8002F71C(globalCtx, &this->actor, ((650.0f - this->actor.xzDistToLink) * 0.04f) + 4.0f,
this->actor.posRot.rot.y, 8.0f);
player->invincibilityTimer = oldInvincibilityTimer;
@ -709,7 +709,7 @@ void func_80AA7938(EnMb* this, GlobalContext* globalCtx) {
sp74 = this->effSpawnPos;
sp74.y = this->actor.groundY;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MONBLIN_HAM_LAND);
func_800AA000(this->actor.xzDistFromLink, 0xFF, 0x14, 0x96);
func_800AA000(this->actor.xzDistToLink, 0xFF, 0x14, 0x96);
EffectSsBlast_SpawnWhiteShockwave(globalCtx, &sp74, &sp68, &sp68);
func_80033480(globalCtx, &sp74, 2.0f, 3, 0x12C, 0xB4, 1);
Camera_AddQuake(&globalCtx->mainCamera, 2, 0x19, 5);
@ -884,7 +884,7 @@ void func_80AA8378(EnMb* this, GlobalContext* globalCtx) {
if (this->unk_32E != 0) {
Animation_PlayOnce(&this->skelAnime, &D_0600E18C);
this->unk_32E = 0;
func_800AA000(this->actor.xzDistFromLink, 0xFF, 0x14, 0x96);
func_800AA000(this->actor.xzDistToLink, 0xFF, 0x14, 0x96);
Camera_AddQuake(&globalCtx->mainCamera, 2, 25, 5);
} else {
func_80AA6898(this);
@ -943,7 +943,7 @@ void func_80AA8514(EnMb* this, GlobalContext* globalCtx) {
Actor_Kill(&this->actor);
}
} else if (((s32)this->skelAnime.curFrame == 15) || ((s32)this->skelAnime.curFrame == 22)) {
func_800AA000(this->actor.xzDistFromLink, 0xFF, 0x14, 0x96);
func_800AA000(this->actor.xzDistToLink, 0xFF, 0x14, 0x96);
func_80033260(globalCtx, &this->actor, &effPosition, 50.0f, 0xA, 3.0f, 0x190, 0x3C, 0);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN);
Camera_AddQuake(&globalCtx->mainCamera, 2, 0x19, 5);
@ -974,7 +974,7 @@ void func_80AA87D8(EnMb* this, GlobalContext* globalCtx) {
(Math_Vec3f_DistXZ(&this->actor.initPosRot.pos, &player->actor.posRot.pos) < this->unk_364)) {
Math_SmoothStepToS(&this->actor.posRot.rot.y, this->actor.yawTowardsLink, 1, 750, 0);
this->actor.flags |= 1;
if ((this->actor.xzDistFromLink < 500.0f) && (yawDiff <= 0x1387)) {
if ((this->actor.xzDistToLink < 500.0f) && (yawDiff <= 0x1387)) {
func_80AA6AC8(this);
}
} else {
@ -1030,11 +1030,11 @@ void func_80AA8AEC(EnMb* this, GlobalContext* globalCtx) {
}
this->unk_330 = Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->waypointPos);
Math_SmoothStepToS(&this->actor.posRot.rot.y, this->unk_330, 1, 0x5DC, 0);
yDistAbs = (this->actor.yDistFromLink >= 0.0f) ? this->actor.yDistFromLink : -this->actor.yDistFromLink;
yDistAbs = (this->actor.yDistToLink >= 0.0f) ? this->actor.yDistToLink : -this->actor.yDistToLink;
if (yDistAbs <= 20.0f && func_80AA652C(this, globalCtx) != 0) {
yawDiff = (this->actor.shape.rot.y - this->actor.yawTowardsLink);
yawDiffAbs = ABS(yawDiff);
if (yawDiffAbs <= 0x4000 || func_8002DDE4(globalCtx) != 0 && this->actor.xzDistFromLink < 160.0f) {
if (yawDiffAbs <= 0x4000 || func_8002DDE4(globalCtx) != 0 && this->actor.xzDistToLink < 160.0f) {
func_80AA66A0(this, globalCtx);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_VOICE);
func_80AA6AC8(this);