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

Document EnGo opening Goron's cage

This commit is contained in:
feacur 2024-11-10 17:00:08 +01:00
parent 687e70e33d
commit 78d0d41e95

View file

@ -98,6 +98,9 @@ typedef enum EnGoType {
#define ENGO_GET_PATH_INDEX(this) PARAMS_GET_U((this)->actor.params, 0, 4)
#define ENGO_PATH_INDEX_NONE 0xF // likely the count of available paths
#define ENGO2_CAGED_FLAG(this) PARAMS_GET_NOMASK((this)->actor.params, 8)
#define ENGO2_IS_CAGE_OPEN(this, play) Flags_GetSwitch(play, ENGO2_CAGED_FLAG(this))
void EnGo_SetupAction(EnGo* this, EnGoActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
@ -149,7 +152,7 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
}
}
case ENGO_TYPE_FIRE_GENERIC:
if (Flags_GetSwitch(play, PARAMS_GET_NOMASK(thisx->params, 8))) {
if (ENGO2_IS_CAGE_OPEN((EnGo*)thisx, play)) {
return 0x3052;
} else {
return 0x3051;
@ -373,8 +376,8 @@ void EnGo_ChangeAnim(EnGo* this, s32 index) {
s32 EnGo_IsActorSpawned(EnGo* this, PlayState* play) {
if (ENGO_GET_TYPE(this) == ENGO_TYPE_DMT_BIGGORON) {
return true;
} else if (play->sceneId == SCENE_FIRE_TEMPLE && !Flags_GetSwitch(play, PARAMS_GET_NOMASK(this->actor.params, 8)) &&
LINK_IS_ADULT && ENGO_GET_TYPE(this) == ENGO_TYPE_FIRE_GENERIC) {
} else if (play->sceneId == SCENE_FIRE_TEMPLE && !ENGO2_IS_CAGE_OPEN(this, play) && LINK_IS_ADULT &&
ENGO_GET_TYPE(this) == ENGO_TYPE_FIRE_GENERIC) {
return true;
} else if (play->sceneId == SCENE_GORON_CITY && LINK_IS_ADULT && ENGO_GET_TYPE(this) == ENGO_TYPE_CITY_LINK) {
return true;
@ -503,7 +506,7 @@ s32 EnGo_FollowPath(EnGo* this, PlayState* play) {
if (ENGO_GET_TYPE(this) != ENGO_TYPE_CITY_LINK) {
return true;
} else if (Flags_GetSwitch(play, PARAMS_GET_NOMASK(this->actor.params, 8))) {
} else if (ENGO2_IS_CAGE_OPEN(this, play)) {
return true;
} else if (this->unk_218 >= this->actor.shape.rot.z) {
this->unk_218 = 0;
@ -763,8 +766,7 @@ void func_80A4008C(EnGo* this, PlayState* play) {
}
void EnGo_GoronLinkRolling(EnGo* this, PlayState* play) {
if ((EnGo_FollowPath(this, play) == true) && Flags_GetSwitch(play, PARAMS_GET_NOMASK(this->actor.params, 8)) &&
(this->unk_218 == 0)) {
if ((EnGo_FollowPath(this, play) == true) && ENGO2_IS_CAGE_OPEN(this, play) && (this->unk_218 == 0)) {
this->actor.speed = 0.0f;
EnGo_SetupAction(this, func_80A4008C);
SET_INFTABLE(INFTABLE_109);