1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-22 06:45:31 +00:00

Document func_80A3F0E4 as EnGo_UpdateBlinking

reason: `EnGo2_EyeMouthTexState` code analogy
This commit is contained in:
feacur 2024-11-10 11:37:08 +01:00
parent 78d0d41e95
commit 8784c81a3d
2 changed files with 12 additions and 9 deletions

View file

@ -426,12 +426,15 @@ void func_80A3F060(EnGo* this, PlayState* play) {
Npc_TrackPoint(&this->actor, &this->interactInfo, 4, trackingMode);
}
void func_80A3F0E4(EnGo* this) {
if (DECR(this->unk_214) == 0) {
this->unk_216++;
if (this->unk_216 >= 3) {
this->unk_214 = Rand_S16Offset(30, 30);
this->unk_216 = 0;
void EnGo_UpdateBlinking(EnGo* this) {
// @unused
// although this function runs a similar logic as `EnGo2_EyeMouthTexState`
// its results are never used: this Goron always sets `gGoronCsEyeOpenTex`
if (DECR(this->blinkTimer) == 0) {
this->eyeTexIndex++;
if (this->eyeTexIndex >= 3) {
this->blinkTimer = Rand_S16Offset(30, 30);
this->eyeTexIndex = 0;
}
}
}
@ -1054,7 +1057,7 @@ void EnGo_Update(Actor* thisx, PlayState* play) {
}
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
func_80A3F0E4(this);
EnGo_UpdateBlinking(this);
func_80A3F908(this, play);
this->actionFunc(this, play);
func_80A3F060(this, play);

View file

@ -56,8 +56,8 @@ typedef struct EnGo {
/* 0x020E */ s16 unk_20E;
/* 0x0210 */ s16 unk_210;
/* 0x0212 */ s16 unk_212;
/* 0x0214 */ s16 unk_214;
/* 0x0216 */ s16 unk_216;
/* 0x0214 */ s16 blinkTimer; // unused
/* 0x0216 */ s16 eyeTexIndex; // unused
/* 0x0218 */ s16 unk_218;
/* 0x021A */ s16 unk_21A;
/* 0x021C */ s16 unk_21C;