From 9de2038db8af749bb7913b7d18c3ddcdfd7d07fb Mon Sep 17 00:00:00 2001 From: feacur Date: Sun, 10 Nov 2024 23:03:16 +0100 Subject: [PATCH] Document EnGo `.unk_212` as `.attentionCooldown` --- src/overlays/actors/ovl_En_Go/z_en_go.c | 12 ++++++------ src/overlays/actors/ovl_En_Go/z_en_go.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index b09f6ee3af..49cf65b8d3 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -823,13 +823,13 @@ void EnGo_WakeUp(EnGo* this, PlayState* play) { this->skelAnime.curFrame = 12.0f; this->skelAnime.playSpeed = 0.0f; if (ENGO_GET_TYPE(this) != ENGO_TYPE_DMT_BIGGORON) { - this->unk_212 = 30; + this->attentionCooldown = 30; return; } } } - if (DECR(this->unk_212) == 0) { + if (DECR(this->attentionCooldown) == 0) { Audio_PlaySfxGeneral(NA_SE_EN_GOLON_SIT_DOWN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); EnGo_SetupAction(this, func_80A405CC); @@ -874,7 +874,7 @@ void func_80A405CC(EnGo* this, PlayState* play) { if (!(frame < lastFrame)) { this->skelAnime.curFrame = lastFrame; this->skelAnime.playSpeed = 0.0f; - this->unk_212 = Rand_S16Offset(30, 30); + this->attentionCooldown = Rand_S16Offset(30, 30); if ((ENGO_GET_TYPE(this) == ENGO_TYPE_DMT_BOMB_FLOWER) && !GET_INFTABLE(INFTABLE_EB)) { EnGo_SetupAction(this, func_80A40B1C); } else { @@ -909,7 +909,7 @@ void EnGo_BiggoronActionFunc(EnGo* this, PlayState* play) { play->msgCtx.stateTimer = 4; play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING; } else { - if ((DECR(this->unk_212) == 0) && !EnGo_IsCameraModified(this, play)) { + if ((DECR(this->attentionCooldown) == 0) && !EnGo_IsCameraModified(this, play)) { EnGo_ReverseAnimation(this); this->skelAnime.playSpeed = -0.1f; this->skelAnime.playSpeed *= ENGO_GET_TYPE(this) == ENGO_TYPE_DMT_BIGGORON ? 0.5f : 1.0f; @@ -932,13 +932,13 @@ void func_80A408D8(EnGo* this, PlayState* play) { this->skelAnime.curFrame = 12.0f; this->skelAnime.playSpeed = 0.0f; if (ENGO_GET_TYPE(this) != ENGO_TYPE_DMT_BIGGORON) { - this->unk_212 = 30; + this->attentionCooldown = 30; return; } } } - if (DECR(this->unk_212) == 0) { + if (DECR(this->attentionCooldown) == 0) { EnGo_SetupAction(this, func_80A40494); } else if (EnGo_IsCameraModified(this, play)) { EnGo_ReverseAnimation(this); diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.h b/src/overlays/actors/ovl_En_Go/z_en_go.h index c4cb7db68e..cd0ddfd86a 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.h +++ b/src/overlays/actors/ovl_En_Go/z_en_go.h @@ -55,7 +55,7 @@ typedef struct EnGo { /* 0x020C */ s16 unk_20C; /* 0x020E */ s16 knockbackCooldown; /* 0x0210 */ s16 unk_210; - /* 0x0212 */ s16 unk_212; + /* 0x0212 */ s16 attentionCooldown; /* 0x0214 */ s16 blinkTimer; // unused /* 0x0216 */ s16 eyeTexIndex; // unused /* 0x0218 */ s16 waypoint;