From 4ecd12d93c79171473711a6b536655122b4a1d4c Mon Sep 17 00:00:00 2001 From: feacur Date: Mon, 11 Nov 2024 15:18:34 +0100 Subject: [PATCH] Document EnGo2 `.unk_211` as `.isUncurled` --- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 14 +++++++------- src/overlays/actors/ovl_En_Go2/z_en_go2.h | 11 ++++++----- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index 459b2e375c..52b404f85f 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -1320,7 +1320,7 @@ void EnGo2_RollingAnimation(EnGo2* this, PlayState* play) { } EnGo2_SwapInitialFrameAnimFrameCount(this); this->trackingMode = NPC_TRACKING_NONE; - this->unk_211 = false; + this->isUncurled = false; this->isAwake = false; this->actionFunc = EnGo2_ActionCurledUp; } @@ -1346,7 +1346,7 @@ void EnGo2_WakeUp(EnGo2* this, PlayState* play) { void EnGo2_GetItemAnimation(EnGo2* this, PlayState* play) { Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_UNCURL_SIT_STAND); - this->unk_211 = true; + this->isUncurled = true; this->actionFunc = func_80A46B40; this->skelAnime.playSpeed = 0.0f; this->actor.speed = 0.0f; @@ -1559,7 +1559,7 @@ void EnGo2_Init(Actor* thisx, PlayState* play) { this->alpha = this->actor.shape.shadowAlpha = 0; this->reverse = 0; this->isAwake = false; - this->unk_211 = false; + this->isUncurled = false; this->goronState = 0; this->waypoint = 0; this->unk_216 = this->actor.shape.rot.z; @@ -1680,7 +1680,7 @@ void func_80A46B40(EnGo2* this, PlayState* play) { u8 index = PARAMS_GET_S(this->actor.params, 0, 5); f32 height; - if (this->unk_211 == true) { + if (this->isUncurled == true) { EnGo2_BiggoronAnimation(this); EnGo2_GoronLinkAnimation(this, play); EnGo2_SelectGoronWakingUp(this); @@ -1698,7 +1698,7 @@ void func_80A46B40(EnGo2* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; } func_80A454CC(this); - this->unk_211 = true; + this->isUncurled = true; this->collider.dim.height = D_80A4816C[index].height; } else { height = D_80A4816C[index].height; @@ -1911,7 +1911,7 @@ void EnGo2_GoronLinkStopRolling(EnGo2* this, PlayState* play) { } else { SET_INFTABLE(INFTABLE_10C); this->trackingMode = NPC_TRACKING_NONE; - this->unk_211 = false; + this->isUncurled = false; this->isAwake = false; this->actionFunc = EnGo2_ActionCurledUp; } @@ -2006,7 +2006,7 @@ void EnGo2_Update(Actor* thisx, PlayState* play) { } #endif this->actionFunc(this, play); - if (this->unk_211 == true) { + if (this->isUncurled == true) { func_80034F54(play, this->unk_226, this->unk_24A, GORON_LIMB_MAX); } func_80A45288(this, play); diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.h b/src/overlays/actors/ovl_En_Go2/z_en_go2.h index 97cf21fc37..d2f2012bfd 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.h +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.h @@ -40,7 +40,6 @@ typedef enum GoronType { // /* 0x0A */ GORON_FIRE_MAZE_UPPER, // /* 0x0B */ GORON_FIRE_HIGHEST - typedef struct EnGo2DataStruct1 { s16 unused; s16 yDist; @@ -77,9 +76,9 @@ typedef struct EnGo2 { /* 0x020C */ u8 unk_20C; // counter for GORON_CITY_LINK animation /* 0x020D */ u8 dialogState; /* 0x020E */ u8 reverse; - /* 0x020F */ u8 isAwake; // Conditional + /* 0x020F */ u8 isAwake; /* 0x0210 */ s8 waypoint; - /* 0x0211 */ u8 unk_211; // Conditional + /* 0x0211 */ u8 isUncurled; // goron link: 0 - rolling, 1 - frozen // biggoron: 0 - give eyedrops, 1 - applying eyedrops, 2 - getting claimcheck // generic fire: 0 - @@ -90,7 +89,8 @@ typedef struct EnGo2 { /* 0x0216 */ u8 unk_216; // Set to z rotation, checked by waypoint /* 0x0218 */ f32 interactRange; /* 0x021C */ char unk_21C[0x04]; - /* 0x0220 */ f32 alpha; // Set to 0, used by func_80A45360, smoothed to this->actor.shape.shadowAlpha from either 0 or 255.0f + /* 0x0220 */ f32 + alpha; // Set to 0, used by func_80A45360, smoothed to this->actor.shape.shadowAlpha from either 0 or 255.0f /* 0x0224 */ s16 blinkTimer; /* 0x0226 */ s16 unk_226[GORON_LIMB_MAX]; // Remains unknown /* 0x024A */ s16 unk_24A[GORON_LIMB_MAX]; // Remains unknown @@ -101,7 +101,8 @@ typedef struct EnGo2 { /* 0x04B8 */ Vec3s jointTable[GORON_LIMB_MAX]; /* 0x0524 */ Vec3s morphTable[GORON_LIMB_MAX]; /* 0x0590 */ s16 bounceTimer; // timer - /* 0x0592 */ s16 animTimer; // animTimer. Plays NA_SE_EN_MORIBLIN_WALK, NA_SE_EV_IRON_DOOR_OPEN, NA_SE_EV_IRON_DOOR_CLOSE + /* 0x0592 */ s16 + animTimer; // animTimer. Plays NA_SE_EN_MORIBLIN_WALK, NA_SE_EV_IRON_DOOR_OPEN, NA_SE_EV_IRON_DOOR_CLOSE /* 0x0594 */ s32 getItemId; /* 0x0598 */ char unk_598[0x02]; /* 0x059A */ s16 subCamId;