From a848bb138d7898eacee3181d33fc5c1b7114c639 Mon Sep 17 00:00:00 2001 From: Parker Burnett Date: Thu, 20 Oct 2022 20:01:59 -0700 Subject: [PATCH] Hg and Hgo documented (#1112) * inital work * en_hg done-zo * finished hgo * forgot to format... * review comments from anon * fixing review comments * fixing comments * update name * fix --- assets/xml/objects/object_harfgibud.xml | 235 ++++++++--------- src/overlays/actors/ovl_En_Hg/z_en_hg.c | 300 ++++++++++++---------- src/overlays/actors/ovl_En_Hg/z_en_hg.h | 8 +- src/overlays/actors/ovl_En_Hgo/z_en_hgo.c | 258 +++++++++++-------- src/overlays/actors/ovl_En_Hgo/z_en_hgo.h | 20 +- tools/disasm/functions.txt | 50 ++-- 6 files changed, 477 insertions(+), 394 deletions(-) diff --git a/assets/xml/objects/object_harfgibud.xml b/assets/xml/objects/object_harfgibud.xml index 61e1fc4576..99578e996f 100644 --- a/assets/xml/objects/object_harfgibud.xml +++ b/assets/xml/objects/object_harfgibud.xml @@ -1,128 +1,131 @@  + - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/overlays/actors/ovl_En_Hg/z_en_hg.c b/src/overlays/actors/ovl_En_Hg/z_en_hg.c index 127ea54afd..38062e995f 100644 --- a/src/overlays/actors/ovl_En_Hg/z_en_hg.c +++ b/src/overlays/actors/ovl_En_Hg/z_en_hg.c @@ -15,22 +15,39 @@ void EnHg_Destroy(Actor* thisx, PlayState* play); void EnHg_Update(Actor* thisx, PlayState* play); void EnHg_Draw(Actor* thisx, PlayState* play); -void func_80BCF354(EnHg* this); -void func_80BCF398(EnHg* this, PlayState* play); -void func_80BCF468(EnHg* this); -void func_80BCF468(EnHg* this); -void func_80BCF4AC(EnHg* this, PlayState* play); -void func_80BCF5F0(EnHg* this); -void func_80BCF634(EnHg* this, PlayState* play); -void func_80BCF68C(EnHg* this); -void func_80BCF6D0(EnHg* this, PlayState* play); -void func_80BCF8A0(EnHg* this, PlayState* play); -void func_80BCF93C(EnHg* this); -void func_80BCF95C(EnHg* this, PlayState* play); +void EnHg_SetupWait(EnHg* this); +void EnHg_Wait(EnHg* this, PlayState* play); +void EnHg_SetupChasePlayer(EnHg* this); +void EnHg_ChasePlayer(EnHg* this, PlayState* play); +void EnHg_SetupChasePlayerWait(EnHg* this); +void EnHg_ChasePlayerWait(EnHg* this, PlayState* play); +void EnHg_SetupReactToHit(EnHg* this); +void EnHg_ReactToHit(EnHg* this, PlayState* play); +void EnHg_PlayCutscene(EnHg* this, PlayState* play); +void EnHg_SetupCsAction(EnHg* this); +void EnHg_HandleCsAction(EnHg* this, PlayState* play); s32 EnHg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx); void EnHg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx); -ActorInit En_Hg_InitVars = { +typedef enum { + /* 0 */ HG_ANIM_IDLE, + /* 1 */ HG_ANIM_LURCH_FORWARD, + /* 2 */ HG_ANIM_RECOIL, + /* 3 */ HG_ANIM_LEAN_FORWARD, + /* 4 */ HG_ANIM_REACH_FORWARD, + /* 5 */ HG_ANIM_CURL_UP, + /* 6 */ HG_ANIM_CROUCHED_PANIC, + /* 7 */ HG_ANIM_PANIC, +} HgAnimation; + +typedef enum { + /* 0 */ HG_CS_FIRST_ENCOUNTER, + /* 1 */ HG_CS_GET_MASK, + /* 2 */ HG_CS_SUBSEQUENT_ENCOUNTER, + /* 3 */ HG_CS_SONG_OF_HEALING, +} HgCsIndex; + +const ActorInit En_Hg_InitVars = { ACTOR_EN_HG, ACTORCAT_PROP, FLAGS, @@ -102,17 +119,17 @@ static CollisionCheckInfoInit2 sColChkInfoInit2 = { }; static AnimationInfo sAnimationInfo[] = { - { &object_harfgibud_Anim_00260C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, - { &object_harfgibud_Anim_009D44, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, - { &object_harfgibud_Anim_00A164, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, - { &object_harfgibud_Anim_000370, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, - { &object_harfgibud_Anim_001138, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, - { &object_harfgibud_Anim_0015D4, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, - { &object_harfgibud_Anim_001960, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, - { &object_harfgibud_Anim_00AE1C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, + { &gPamelasFatherIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, + { &gPamelasFatherLurchForwardAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, + { &gPamelasFatherRecoilFromHitAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, + { &gPamelasFatherLeanForwardAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, + { &gPamelasFatherReachForwardAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, + { &gPamelasFatherCurlUpAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, + { &gPamelasFatherCrouchedPanicAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, + { &gPamelasFatherPanicAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, }; -static u32 D_80BD00C8 = false; +static u32 sHasSoundPlayed = false; void EnHg_Init(Actor* thisx, PlayState* play) { EnHg* this = THIS; @@ -120,8 +137,8 @@ void EnHg_Init(Actor* thisx, PlayState* play) { s32 i; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 36.0f); - SkelAnime_InitFlex(play, &this->skelAnime, &gHarfgibudGibdoSkel, &object_harfgibud_Anim_00260C, this->jointTable, - this->morphTable, HARFGIBUD_GIBDO_LIMB_MAX); + SkelAnime_InitFlex(play, &this->skelAnime, &gPamelasFatherGibdoSkel, &gPamelasFatherIdleAnim, this->jointTable, + this->morphTable, PAMELAS_FATHER_GIBDO_LIMB_MAX); Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit2); @@ -138,7 +155,7 @@ void EnHg_Init(Actor* thisx, PlayState* play) { this->cutscenes[i] = currentCutscene; currentCutscene = ActorCutscene_GetAdditionalCutscene(currentCutscene); } - func_80BCF354(this); + EnHg_SetupWait(this); } void EnHg_Destroy(Actor* thisx, PlayState* play) { @@ -147,16 +164,16 @@ void EnHg_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->collider); } -void func_80BCF354(EnHg* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); - this->actionFunc = func_80BCF398; +void EnHg_SetupWait(EnHg* this) { + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_IDLE); + this->actionFunc = EnHg_Wait; } -void func_80BCF398(EnHg* this, PlayState* play) { +void EnHg_Wait(EnHg* this, PlayState* play) { if (this->actor.colChkInfo.health == 1) { if ((this->actor.xzDistToPlayer < 200.0f && this->actor.playerHeightRel < 40.0f) && !Cutscene_CheckActorAction(play, 0x1E3)) { - func_80BCF468(this); + EnHg_SetupChasePlayer(this); } if ((gSaveContext.sceneLayer == 0) && (play->csCtx.currentCsIndex == 0) && ((play->csCtx.frames == 20) || (play->csCtx.frames == 60))) { @@ -165,12 +182,12 @@ void func_80BCF398(EnHg* this, PlayState* play) { } } -void func_80BCF468(EnHg* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); - this->actionFunc = func_80BCF4AC; +void EnHg_SetupChasePlayer(EnHg* this) { + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_LURCH_FORWARD); + this->actionFunc = EnHg_ChasePlayer; } -void func_80BCF4AC(EnHg* this, PlayState* play) { +void EnHg_ChasePlayer(EnHg* this, PlayState* play) { Player* player = GET_PLAYER(play); s32 pad; @@ -184,38 +201,39 @@ void func_80BCF4AC(EnHg* this, PlayState* play) { } if ((Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) > 200.0f) && (Math_Vec3f_DistXZ(&player->actor.world.pos, &this->actor.home.pos) > 200.0f)) { - func_80BCF5F0(this); + EnHg_SetupChasePlayerWait(this); } } } -void func_80BCF5F0(EnHg* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); - this->actionFunc = func_80BCF634; +void EnHg_SetupChasePlayerWait(EnHg* this) { + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_IDLE); + this->actionFunc = EnHg_ChasePlayerWait; } -void func_80BCF634(EnHg* this, PlayState* play) { +void EnHg_ChasePlayerWait(EnHg* this, PlayState* play) { Player* player = GET_PLAYER(play); if (Math_Vec3f_DistXZ(&player->actor.world.pos, &this->actor.home.pos) < 200.0f) { - func_80BCF468(this); + EnHg_SetupChasePlayer(this); } } -void func_80BCF68C(EnHg* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); - this->actionFunc = func_80BCF6D0; +void EnHg_SetupReactToHit(EnHg* this) { + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_RECOIL); + this->actionFunc = EnHg_ReactToHit; } -void func_80BCF6D0(EnHg* this, PlayState* play) { +void EnHg_ReactToHit(EnHg* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - func_80BCF5F0(this); + EnHg_SetupChasePlayerWait(this); } } -void func_80BCF710(EnHg* this, PlayState* play) { +void EnHg_HandleTatlDialog(EnHg* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { + // "...Sort of looks different..." Message_StartTextbox(play, 0x24F, &this->actor); } else { func_800B8614(&this->actor, play, 80.0f); @@ -223,53 +241,53 @@ void func_80BCF710(EnHg* this, PlayState* play) { } } -void func_80BCF778(EnHg* this, PlayState* play) { +void EnHg_PlayRedeadSfx(EnHg* this, PlayState* play) { if (this->actor.colChkInfo.health == 1) { - if (this->actionFunc == func_80BCF4AC || this->actionFunc == func_80BCF6D0 || - this->actionFunc == func_80BCF634) { + if ((this->actionFunc == EnHg_ChasePlayer) || (this->actionFunc == EnHg_ReactToHit) || + (this->actionFunc == EnHg_ChasePlayerWait)) { func_800B9010(&this->actor, NA_SE_EN_HALF_REDEAD_LOOP - SFX_FLAG); } } } -void func_80BCF7D8(EnHg* this, PlayState* play) { - if (this->actor.colChkInfo.health) { +void EnHg_UpdateCollision(EnHg* this, PlayState* play) { + if (this->actor.colChkInfo.health != 0) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; - func_80BCF68C(this); + EnHg_SetupReactToHit(this); } Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); - if (this->actionFunc != func_80BCF6D0 && this->actionFunc != func_80BCF8A0 && - this->actionFunc != func_80BCF95C) { + if ((this->actionFunc != EnHg_ReactToHit) && (this->actionFunc != EnHg_PlayCutscene) && + (this->actionFunc != EnHg_HandleCsAction)) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); } } } -void func_80BCF88C(EnHg* this) { - this->actionFunc = func_80BCF8A0; +void EnHg_SetupCutscene(EnHg* this) { + this->actionFunc = EnHg_PlayCutscene; } -void func_80BCF8A0(EnHg* this, PlayState* play) { - if (ActorCutscene_GetCanPlayNext(this->cutscenes[this->unk218])) { - ActorCutscene_Start(this->cutscenes[this->unk218], &this->actor); - func_80BCF93C(this); +void EnHg_PlayCutscene(EnHg* this, PlayState* play) { + if (ActorCutscene_GetCanPlayNext(this->cutscenes[this->cutsceneIndex])) { + ActorCutscene_Start(this->cutscenes[this->cutsceneIndex], &this->actor); + EnHg_SetupCsAction(this); } else { if (ActorCutscene_GetCurrentIndex() == 0x7C) { ActorCutscene_Stop(0x7C); } - ActorCutscene_SetIntentToPlay(this->cutscenes[this->unk218]); + ActorCutscene_SetIntentToPlay(this->cutscenes[this->cutsceneIndex]); } } -void func_80BCF93C(EnHg* this) { +void EnHg_SetupCsAction(EnHg* this) { this->cutscenes[3] = 0x63; this->cutscenes[2] = 0; - this->actionFunc = func_80BCF95C; + this->actionFunc = EnHg_HandleCsAction; } -void func_80BCF95C(EnHg* this, PlayState* play) { +void EnHg_HandleCsAction(EnHg* this, PlayState* play) { if (Cutscene_CheckActorAction(play, 484)) { s32 actionIndex = Cutscene_GetActorActionIndex(play, 484); @@ -278,109 +296,129 @@ void func_80BCF95C(EnHg* this, PlayState* play) { switch (play->csCtx.actorActions[actionIndex]->action) { case 1: this->animIndex = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_IDLE); break; + case 2: this->cutscenes[2] = 0; - this->animIndex = 3; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); + this->animIndex = HG_ANIM_LEAN_FORWARD; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_LEAN_FORWARD); break; + case 3: this->cutscenes[2] = 0; - this->animIndex = 5; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); + this->animIndex = HG_ANIM_CURL_UP; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_CURL_UP); break; + case 4: this->cutscenes[2] = 0; - this->animIndex = 7; - if ((this->unk218 == 1) || (this->unk218 == 3)) { + this->animIndex = HG_ANIM_PANIC; + if ((this->cutsceneIndex == HG_CS_GET_MASK) || (this->cutsceneIndex == HG_CS_SONG_OF_HEALING)) { func_8019F128(NA_SE_EN_HALF_REDEAD_TRANS); } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 7); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_PANIC); break; + case 5: - this->animIndex = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); + this->animIndex = HG_ANIM_LURCH_FORWARD; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_LURCH_FORWARD); break; + case 6: gSaveContext.save.weekEventReg[75] |= 0x20; Actor_Kill(&this->actor); break; } - } else { - if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - switch (this->animIndex) { - case 3: - this->animIndex = 4; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); - break; - case 5: - this->animIndex = 6; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 6); - break; - } + } else if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { + switch (this->animIndex) { + case HG_ANIM_LEAN_FORWARD: + this->animIndex = HG_ANIM_REACH_FORWARD; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_REACH_FORWARD); + break; + + case HG_ANIM_CURL_UP: + this->animIndex = HG_ANIM_CROUCHED_PANIC; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_CROUCHED_PANIC); + break; } } + switch (this->animIndex) { - case 3: - case 4: + case HG_ANIM_LEAN_FORWARD: + case HG_ANIM_REACH_FORWARD: func_800B9010(&this->actor, NA_SE_EN_HALF_REDEAD_LOOP - SFX_FLAG); break; - case 5: - case 6: + + case HG_ANIM_CURL_UP: + case HG_ANIM_CROUCHED_PANIC: func_800B9010(&this->actor, NA_SE_EN_HALF_REDEAD_SCREAME - SFX_FLAG); break; - case 7: - if ((this->unk218 == 0) || (this->unk218 == 2)) { + + case HG_ANIM_PANIC: + if ((this->cutsceneIndex == HG_CS_FIRST_ENCOUNTER) || + (this->cutsceneIndex == HG_CS_SUBSEQUENT_ENCOUNTER)) { func_800B9010(&this->actor, NA_SE_EN_HALF_REDEAD_SCREAME - SFX_FLAG); } break; } + Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex); return; + } else if (play->csCtx.state == 0) { - func_80BCF354(this); + EnHg_SetupWait(this); } + this->cutscenes[3] = 0x63; } -void func_80BCFC0C(EnHg* this, PlayState* play) { +void EnHg_WaitForPlayerAction(EnHg* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (this->actor.colChkInfo.health == 1 && !(fabsf(this->actor.playerHeightRel) >= 80.0f)) { - if (player->stateFlags2 & PLAYER_STATE2_8000000) { - if (!D_80BD00C8) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); - } - D_80BD00C8 = true; - } else { - D_80BD00C8 = false; + // If the player has gone upstairs this interaction will not trigger + if ((this->actor.colChkInfo.health != 1) || (fabsf(this->actor.playerHeightRel) >= 80.0f)) { + return; + } + + if (player->stateFlags2 & PLAYER_STATE2_8000000) { + if (!sHasSoundPlayed) { + play_sound(NA_SE_SY_TRE_BOX_APPEAR); } - if (play->msgCtx.ocarinaMode == 3) { - if (play->msgCtx.lastPlayedSong == OCARINA_SONG_HEALING && - gSaveContext.save.playerForm == PLAYER_FORM_HUMAN) { - if (INV_CONTENT(ITEM_MASK_GIBDO) == ITEM_MASK_GIBDO) { - this->unk218 = 3; + sHasSoundPlayed = true; + } else { + sHasSoundPlayed = false; + } + + if (play->msgCtx.ocarinaMode == 3) { + if ((play->msgCtx.lastPlayedSong == OCARINA_SONG_HEALING) && + (gSaveContext.save.playerForm == PLAYER_FORM_HUMAN)) { + if (INV_CONTENT(ITEM_MASK_GIBDO) == ITEM_MASK_GIBDO) { + this->cutsceneIndex = HG_CS_SONG_OF_HEALING; + } else { + this->cutsceneIndex = HG_CS_GET_MASK; + } + + EnHg_SetupCutscene(this); + } + + } else { + if ((this->actor.xzDistToPlayer < 60.0f) && (fabsf(this->actor.playerHeightRel) < 40.0f)) { + if ((this->actionFunc != EnHg_PlayCutscene) && (this->actionFunc != EnHg_HandleCsAction)) { + + if (!(gSaveContext.save.weekEventReg[61] & 2)) { + gSaveContext.save.weekEventReg[61] |= 2; + this->cutsceneIndex = HG_CS_FIRST_ENCOUNTER; } else { - this->unk218 = 1; + this->cutsceneIndex = HG_CS_SUBSEQUENT_ENCOUNTER; } - func_80BCF88C(this); + + EnHg_SetupCutscene(this); + return; } - } else { - if (this->actor.xzDistToPlayer < 60.0f && fabsf(this->actor.playerHeightRel) < 40.0f) { - if ((this->actionFunc != func_80BCF8A0) && (this->actionFunc != func_80BCF95C)) { - if (!(gSaveContext.save.weekEventReg[61] & 2)) { - gSaveContext.save.weekEventReg[61] |= 2; - this->unk218 = 0; - } else { - this->unk218 = 2; - } - func_80BCF88C(this); - return; - } - } - func_80BCF710(this, play); } + + EnHg_HandleTatlDialog(this, play); } } @@ -389,10 +427,10 @@ void EnHg_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); SkelAnime_Update(&this->skelAnime); - func_80BCF7D8(this, play); - func_80BCFC0C(this, play); + EnHg_UpdateCollision(this, play); + EnHg_WaitForPlayerAction(this, play); Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 25.0f, 0.0f, 5); - func_80BCF778(this, play); + EnHg_PlayRedeadSfx(this, play); } s32 EnHg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { @@ -401,9 +439,9 @@ s32 EnHg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po void EnHg_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { EnHg* this = THIS; - if (limbIndex == HARFGIBUD_GIBDO_LIMB_EYEBROWS) { - Matrix_Get(&this->unk1D8); - } else if (limbIndex == HARFGIBUD_GIBDO_LIMB_HEAD) { + if (limbIndex == PAMELAS_FATHER_GIBDO_LIMB_EYEBROWS) { + Matrix_Get(&this->mf); + } else if (limbIndex == PAMELAS_FATHER_GIBDO_LIMB_HEAD) { Matrix_MultZero(&this->actor.focus.pos); } } @@ -415,8 +453,8 @@ void EnHg_Draw(Actor* thisx, PlayState* play) { func_8012C28C(play->state.gfxCtx); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnHg_OverrideLimbDraw, EnHg_PostLimbDraw, &this->actor); - Matrix_Put(&this->unk1D8); + Matrix_Put(&this->mf); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_OPA_DISP++, gHarfgibudGibdoEyebrowsDL); + gSPDisplayList(POLY_OPA_DISP++, gPamelasFatherGibdoEyebrowsDL); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/src/overlays/actors/ovl_En_Hg/z_en_hg.h b/src/overlays/actors/ovl_En_Hg/z_en_hg.h index eff7dbf9af..1211a4cf37 100644 --- a/src/overlays/actors/ovl_En_Hg/z_en_hg.h +++ b/src/overlays/actors/ovl_En_Hg/z_en_hg.h @@ -14,11 +14,11 @@ typedef struct EnHg { /* 0x144 */ ColliderCylinder collider; /* 0x190 */ SkelAnime skelAnime; /* 0x1D4 */ EnHgActionFunc actionFunc; - /* 0x1D8 */ MtxF unk1D8; - /* 0x218 */ s32 unk218; + /* 0x1D8 */ MtxF mf; + /* 0x218 */ s32 cutsceneIndex; /* 0x21C */ s32 animIndex; - /* 0x220 */ Vec3s jointTable[HARFGIBUD_GIBDO_LIMB_MAX]; - /* 0x292 */ Vec3s morphTable[HARFGIBUD_GIBDO_LIMB_MAX]; + /* 0x220 */ Vec3s jointTable[PAMELAS_FATHER_GIBDO_LIMB_MAX]; + /* 0x292 */ Vec3s morphTable[PAMELAS_FATHER_GIBDO_LIMB_MAX]; /* 0x304 */ UNK_TYPE1 pad304[0xC]; /* 0x310 */ u16 cutscenes[4]; } EnHg; // size = 0x318 diff --git a/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c b/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c index add718bdc4..56a88e45bd 100644 --- a/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c +++ b/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c @@ -15,19 +15,40 @@ void EnHgo_Destroy(Actor* thisx, PlayState* play); void EnHgo_Update(Actor* thisx, PlayState* play); void EnHgo_Draw(Actor* thisx, PlayState* play); -void func_80BD03EC(EnHgo* this); -void func_80BD0410(EnHgo* this, PlayState* play); -void func_80BD0434(EnHgo* this, PlayState* play); -void func_80BD049C(EnHgo* this); -void func_80BD04E0(EnHgo* this, PlayState* play); +void EnHgo_SetupDoNothing(EnHgo* this); +void EnHgo_DoNothing(EnHgo* this, PlayState* play); +void EnHgo_UpdateCollision(EnHgo* this, PlayState* play); +void EnHgo_SetupTalk(EnHgo* this); +void EnHgo_Talk(EnHgo* this, PlayState* play); void EnHgo_SetupDialogueHandler(EnHgo* this); void EnHgo_DefaultDialogueHandler(EnHgo* this, PlayState* play); -void func_80BD06FC(EnHgo* this, PlayState* play); -s32 func_80BD0898(EnHgo* this, PlayState* play); +void EnHgo_HandlePlayerChoice(EnHgo* this, PlayState* play); +s32 EnHgo_HandleCsAction(EnHgo* this, PlayState* play); s32 EnHgo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx); void EnHgo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx); -ActorInit En_Hgo_InitVars = { +#define TALK_FLAG_NONE 0 +#define TALK_FLAG_HAS_SPOKEN_WITH_HUMAN (1 << 0) +#define TALK_FLAG_HAS_SPOKEN_WITH_OTHER_MASK_FORM (1 << 1) +#define TALK_FLAG_HAS_SPOKEN_WITH_GIBDO_MASK (1 << 2) + +typedef enum { + /* 0 */ HGO_EYE_OPEN, + /* 1 */ HGO_EYE_HALF, + /* 2 */ HGO_EYE_CLOSED +} EyeState; + +typedef enum { + /* 0 */ HGO_ANIM_ARMS_FOLDED, + /* 1 */ HGO_ANIM_ASTONISHED, + /* 2 */ HGO_ANIM_KNEEL_DOWN_AND_HUG, + /* 3 */ HGO_ANIM_CONSOLE, + /* 4 */ HGO_ANIM_CONSOLE_HEAD_UP, + /* 5 */ HGO_ANIM_REACH_DOWN_TO_LIFT, + /* 6 */ HGO_ANIM_TOSS, +} HgoAnimation; + +const ActorInit En_Hgo_InitVars = { ACTOR_EN_HGO, ACTORCAT_NPC, FLAGS, @@ -40,13 +61,13 @@ ActorInit En_Hgo_InitVars = { }; static AnimationInfo sAnimationInfo[] = { - { &object_harfgibud_Anim_00B644, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, - { &object_harfgibud_Anim_013684, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, - { &object_harfgibud_Anim_0152EC, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, - { &object_harfgibud_Anim_015C70, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, - { &object_harfgibud_Anim_0165F0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, - { &object_harfgibud_Anim_014220, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, - { &object_harfgibud_Anim_014A9C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, + { &gPamelasFatherArmsFoldedAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, + { &gPamelasFatherAstonishedAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, + { &gPamelasFatherKneelDownAndHugAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, + { &gPamelasFatherConsoleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, + { &gPamelasFatherConsoleHeadUpAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, + { &gPamelasFatherReachDownToLiftAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, + { &gPamelasFatherTossAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, }; static ColliderCylinderInit sCylinderInit = { @@ -71,33 +92,27 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static TexturePtr sEyeTextures[] = { - object_harfgibud_Tex_011138, - object_harfgibud_Tex_011938, - object_harfgibud_Tex_012138, -}; - void EnHgo_Init(Actor* thisx, PlayState* play) { - EnHgo* this = THIS; s32 pad; + EnHgo* this = THIS; ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 36.0f); - SkelAnime_InitFlex(play, &this->skelAnime, &gHarfgibudHumanSkel, &object_harfgibud_Anim_00B644, this->jointTable, - this->morphTable, HARFGIBUD_HUMAN_LIMB_MAX); + SkelAnime_InitFlex(play, &this->skelAnime, &gPamelasFatherHumanSkel, &gPamelasFatherArmsFoldedAnim, + this->jointTable, this->morphTable, PAMELAS_FATHER_HUMAN_LIMB_MAX); Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&thisx->colChkInfo, NULL, &sColChkInfoInit); thisx->targetMode = 6; - this->unk_30C = 0; - this->unk_30E = 0; - this->unk_314 = 0; - this->unk_310 = 0; - this->unk_312 = 0; + this->eyeIndex = 0; + this->blinkTimer = 0; + this->textId = 0; + this->talkFlags = TALK_FLAG_NONE; + this->isInCutscene = false; if ((gSaveContext.save.weekEventReg[75] & 0x20) || (gSaveContext.save.weekEventReg[52] & 0x20)) { - func_80BD049C(this); + EnHgo_SetupTalk(this); } else { thisx->draw = NULL; - func_80BD03EC(this); + EnHgo_SetupDoNothing(this); } } @@ -107,59 +122,59 @@ void EnHgo_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->collider); } -void func_80BD03EC(EnHgo* this) { +void EnHgo_SetupDoNothing(EnHgo* this) { this->actor.flags &= ~ACTOR_FLAG_1; - this->actionFunc = func_80BD0410; + this->actionFunc = EnHgo_DoNothing; } -void func_80BD0410(EnHgo* this, PlayState* play) { +void EnHgo_DoNothing(EnHgo* this, PlayState* play) { } -void func_80BD0420(EnHgo* this) { - this->actionFunc = func_80BD0434; +void EnHgo_SetupInitCollision(EnHgo* this) { + this->actionFunc = EnHgo_UpdateCollision; } -void func_80BD0434(EnHgo* this, PlayState* play) { +void EnHgo_UpdateCollision(EnHgo* this, PlayState* play) { this->collider.dim.pos.x = this->actor.focus.pos.x; this->collider.dim.pos.y = this->actor.world.pos.y; this->collider.dim.pos.z = this->actor.focus.pos.z; CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); } -void func_80BD049C(EnHgo* this) { +void EnHgo_SetupTalk(EnHgo* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); - this->actionFunc = func_80BD04E0; + this->actionFunc = EnHgo_Talk; } -void func_80BD04E0(EnHgo* this, PlayState* play) { +void EnHgo_Talk(EnHgo* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { if (Player_GetMask(play) == PLAYER_MASK_GIBDO) { - if (!(this->unk_310 & 4)) { - this->unk_310 |= 4; + if (!(this->talkFlags & TALK_FLAG_HAS_SPOKEN_WITH_GIBDO_MASK)) { + this->talkFlags |= TALK_FLAG_HAS_SPOKEN_WITH_GIBDO_MASK; Message_StartTextbox(play, 0x15A5, &this->actor); - this->unk_314 = 0x15A5; // That mask is a gibdo + this->textId = 0x15A5; // That mask is a gibdo } else { Message_StartTextbox(play, 0x15A7, &this->actor); - this->unk_314 = 0x15A7; // can I research that mask + this->textId = 0x15A7; // can I research that mask } } else if (gSaveContext.save.playerForm == PLAYER_FORM_HUMAN) { - if (!(this->unk_310 & 1)) { - this->unk_310 |= 1; + if (!(this->talkFlags & TALK_FLAG_HAS_SPOKEN_WITH_HUMAN)) { + this->talkFlags |= TALK_FLAG_HAS_SPOKEN_WITH_HUMAN; Message_StartTextbox(play, 0x158F, &this->actor); - this->unk_314 = 0x158F; // Isn't this a fairy + this->textId = 0x158F; // Isn't this a fairy } else { Message_StartTextbox(play, 0x1593, &this->actor); - this->unk_314 = 0x1593; // Never seen a fairy this lively + this->textId = 0x1593; // Never seen a fairy this lively } } else { - if (!(this->unk_310 & 2)) { - this->unk_310 |= 2; + if (!(this->talkFlags & TALK_FLAG_HAS_SPOKEN_WITH_OTHER_MASK_FORM)) { + this->talkFlags |= TALK_FLAG_HAS_SPOKEN_WITH_OTHER_MASK_FORM; Message_StartTextbox(play, 0x1595, &this->actor); - this->unk_314 = 0x1595; // ghost radar is reacting + this->textId = 0x1595; // ghost radar is reacting } else { Message_StartTextbox(play, 0x1598, &this->actor); - this->unk_314 = 0x1598; // you seem to be similar to a ghost + this->textId = 0x1598; // you seem to be similar to a ghost } } EnHgo_SetupDialogueHandler(this); @@ -182,12 +197,12 @@ void EnHgo_DefaultDialogueHandler(EnHgo* this, PlayState* play) { break; case TEXT_STATE_5: - func_80BD06FC(this, play); + EnHgo_HandlePlayerChoice(this, play); break; case TEXT_STATE_DONE: if (Message_ShouldAdvance(play)) { - func_80BD049C(this); + EnHgo_SetupTalk(this); } break; } @@ -196,109 +211,128 @@ void EnHgo_DefaultDialogueHandler(EnHgo* this, PlayState* play) { this->actor.shape.rot.y = this->actor.world.rot.y; } -void func_80BD06FC(EnHgo* this, PlayState* play) { +// Handles the next dialogue based on player's selection +void EnHgo_HandlePlayerChoice(EnHgo* this, PlayState* play) { if (Message_ShouldAdvance(play)) { - switch (this->unk_314) { + switch (this->textId) { case 0x158F: Message_StartTextbox(play, 0x1590, &this->actor); - this->unk_314 = 0x1590; + this->textId = 0x1590; break; + case 0x1590: if (gSaveContext.save.weekEventReg[14] & 4) { Message_StartTextbox(play, 0x1591, &this->actor); - this->unk_314 = 0x1591; + this->textId = 0x1591; break; } + Message_StartTextbox(play, 0x1592, &this->actor); - this->unk_314 = 0x1592; + this->textId = 0x1592; break; + case 0x1591: Message_StartTextbox(play, 0x1592, &this->actor); - this->unk_314 = 0x1592; + this->textId = 0x1592; break; + case 0x1593: Message_StartTextbox(play, 0x1594, &this->actor); - this->unk_314 = 0x1594; + this->textId = 0x1594; break; + case 0x1595: Message_StartTextbox(play, 0x1596, &this->actor); - this->unk_314 = 0x1596; + this->textId = 0x1596; break; + case 0x1596: Message_StartTextbox(play, 0x1597, &this->actor); - this->unk_314 = 0x1597; + this->textId = 0x1597; break; + case 0x1598: Message_StartTextbox(play, 0x1599, &this->actor); - this->unk_314 = 0x1599; + this->textId = 0x1599; break; + case 0x15A5: Message_StartTextbox(play, 0x15A6, &this->actor); - this->unk_314 = 0x15A6; + this->textId = 0x15A6; break; + case 0x15A6: Message_StartTextbox(play, 0x15A7, &this->actor); - this->unk_314 = 0x15A7; + this->textId = 0x15A7; break; + case 0x15A7: func_801477B4(play); - func_80BD049C(this); + EnHgo_SetupTalk(this); break; } } } -s32 func_80BD0898(EnHgo* this, PlayState* play) { +s32 EnHgo_HandleCsAction(EnHgo* this, PlayState* play) { s32 actionIndex; if (Cutscene_CheckActorAction(play, 486)) { actionIndex = Cutscene_GetActorActionIndex(play, 486); - if (this->unk_316 != play->csCtx.actorActions[actionIndex]->action) { - this->unk_316 = play->csCtx.actorActions[actionIndex]->action; + if (this->csAction != play->csCtx.actorActions[actionIndex]->action) { + this->csAction = play->csCtx.actorActions[actionIndex]->action; switch (play->csCtx.actorActions[actionIndex]->action) { case 1: - this->unk_218 = 0; + this->animIndex = HGO_ANIM_ARMS_FOLDED; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); break; + case 2: this->actor.draw = EnHgo_Draw; - this->unk_218 = 1; + this->animIndex = HGO_ANIM_ASTONISHED; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; + case 3: - this->unk_218 = 2; + this->animIndex = HGO_ANIM_KNEEL_DOWN_AND_HUG; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); break; + case 4: - this->unk_218 = 3; + this->animIndex = HGO_ANIM_CONSOLE; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); break; + case 5: - this->unk_218 = 4; + this->animIndex = HGO_ANIM_CONSOLE_HEAD_UP; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); break; + case 6: - this->unk_218 = 5; + this->animIndex = HGO_ANIM_REACH_DOWN_TO_LIFT; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); break; } } else if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - switch (this->unk_218) { - case 1: - if ((Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) && (this->unk_312 == 0)) { - this->unk_312 = 1; + switch (this->animIndex) { + case HGO_ANIM_ASTONISHED: + if ((Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) && + (this->isInCutscene == false)) { + this->isInCutscene = true; if ((gSaveContext.sceneLayer == 0) && ((play->csCtx.currentCsIndex == 2) || (play->csCtx.currentCsIndex == 4))) { Actor_PlaySfxAtPos(&this->actor, NA_SE_VO_GBVO02); } } break; - case 2: - this->unk_218 = 3; + + case HGO_ANIM_KNEEL_DOWN_AND_HUG: + this->animIndex = HGO_ANIM_CONSOLE; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); break; - case 5: - this->unk_218 = 6; + + case HGO_ANIM_REACH_DOWN_TO_LIFT: + this->animIndex = HGO_ANIM_TOSS; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 6); } } @@ -306,30 +340,32 @@ s32 func_80BD0898(EnHgo* this, PlayState* play) { Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex); return true; } + if ((play->csCtx.state == 0) && (((gSaveContext.save.weekEventReg[75]) & 0x20)) && - (this->actionFunc == func_80BD0410)) { + (this->actionFunc == EnHgo_DoNothing)) { this->actor.shape.rot.y = this->actor.world.rot.y; Actor_Spawn(&play->actorCtx, play, ACTOR_ELF_MSG2, this->actor.focus.pos.x, this->actor.focus.pos.y, this->actor.focus.pos.z, 7, 0, 0, 0x7F5A); - func_80BD0420(this); + EnHgo_SetupInitCollision(this); } - this->unk_316 = 0x63; + + this->csAction = 0x63; return false; } -void func_80BD0B8C(EnHgo* this, PlayState* play) { +void EnHgo_UpdateModel(EnHgo* this, PlayState* play) { Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos); - if (this->unk_30E > 2) { - this->unk_30E--; - } else if (this->unk_30E == 2) { - this->unk_30C = 1; - this->unk_30E = 1; - } else if (this->unk_30E == 1) { - this->unk_30C = 2; - this->unk_30E = 0; + if (this->blinkTimer > 2) { + this->blinkTimer--; + } else if (this->blinkTimer == 2) { + this->eyeIndex = HGO_EYE_HALF; + this->blinkTimer = 1; + } else if (this->blinkTimer == 1) { + this->eyeIndex = HGO_EYE_CLOSED; + this->blinkTimer = 0; } else { - this->unk_30C = 0; - this->unk_30E = 60; + this->eyeIndex = HGO_EYE_OPEN; + this->blinkTimer = 60; } } @@ -339,13 +375,13 @@ void EnHgo_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); SkelAnime_Update(&this->skelAnime); - if (func_80BD0898(this, play)) { + if (EnHgo_HandleCsAction(this, play)) { Actor_TrackNone(&this->headRot, &this->torsoRot); - } else if (this->actionFunc != func_80BD0410) { - if (this->actionFunc != func_80BD0434) { + } else if (this->actionFunc != EnHgo_DoNothing) { + if (this->actionFunc != EnHgo_UpdateCollision) { Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); - func_80BD0B8C(this, play); + EnHgo_UpdateModel(this, play); } } } @@ -353,7 +389,7 @@ void EnHgo_Update(Actor* thisx, PlayState* play) { s32 EnHgo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { EnHgo* this = THIS; - if (limbIndex == HARFGIBUD_HUMAN_LIMB_HEAD) { + if (limbIndex == PAMELAS_FATHER_HUMAN_LIMB_HEAD) { rot->x += this->headRot.y; rot->z += this->headRot.x; } @@ -363,22 +399,28 @@ s32 EnHgo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnHgo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx) { EnHgo* this = THIS; - if (limbIndex == HARFGIBUD_HUMAN_LIMB_HEAD) { - Matrix_Get(&this->unk_1D8); + if (limbIndex == PAMELAS_FATHER_HUMAN_LIMB_HEAD) { + Matrix_Get(&this->mf); Matrix_MultZero(&this->actor.focus.pos); } } +static TexturePtr sEyeTextures[] = { + gPamelasFatherHumanEyeOpenTex, + gPamelasFatherHumanEyeHalfTex, + gPamelasFatherHumanEyeClosedTex, +}; + void EnHgo_Draw(Actor* thisx, PlayState* play) { EnHgo* this = THIS; OPEN_DISPS(play->state.gfxCtx); func_8012C28C(play->state.gfxCtx); - gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sEyeTextures[this->unk_30C])); + gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sEyeTextures[this->eyeIndex])); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnHgo_OverrideLimbDraw, &EnHgo_PostLimbDraw, &this->actor); - Matrix_Put(&this->unk_1D8); + Matrix_Put(&this->mf); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_OPA_DISP++, gHarfgibudHumanEyebrowsDL); + gSPDisplayList(POLY_OPA_DISP++, gPamelasFatherHumanEyebrowsDL); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/src/overlays/actors/ovl_En_Hgo/z_en_hgo.h b/src/overlays/actors/ovl_En_Hgo/z_en_hgo.h index c9b0b53e1a..6882c11277 100644 --- a/src/overlays/actors/ovl_En_Hgo/z_en_hgo.h +++ b/src/overlays/actors/ovl_En_Hgo/z_en_hgo.h @@ -13,18 +13,18 @@ typedef struct EnHgo { /* 0x144 */ ColliderCylinder collider; /* 0x190 */ SkelAnime skelAnime; /* 0x1D4 */ EnHgoActionFunc actionFunc; - /* 0x1D8 */ MtxF unk_1D8; - /* 0x218 */ s32 unk_218; - /* 0x21C */ Vec3s jointTable[HARFGIBUD_HUMAN_LIMB_MAX]; - /* 0x28E */ Vec3s morphTable[HARFGIBUD_HUMAN_LIMB_MAX]; + /* 0x1D8 */ MtxF mf; + /* 0x218 */ s32 animIndex; + /* 0x21C */ Vec3s jointTable[PAMELAS_FATHER_HUMAN_LIMB_MAX]; + /* 0x28E */ Vec3s morphTable[PAMELAS_FATHER_HUMAN_LIMB_MAX]; /* 0x300 */ Vec3s headRot; /* 0x306 */ Vec3s torsoRot; // Set, but not used - /* 0x30C */ s16 unk_30C; - /* 0x30E */ s16 unk_30E; - /* 0x310 */ s16 unk_310; - /* 0x312 */ s16 unk_312; - /* 0x314 */ u16 unk_314; - /* 0x316 */ u16 unk_316; + /* 0x30C */ s16 eyeIndex; + /* 0x30E */ s16 blinkTimer; + /* 0x310 */ s16 talkFlags; + /* 0x312 */ s16 isInCutscene; + /* 0x314 */ u16 textId; + /* 0x316 */ u16 csAction; } EnHgo; // size = 0x318 #endif // Z_EN_HGO_H diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index 05c62d7e5b..47ce688cae 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -15672,39 +15672,39 @@ 0x80BCEF0C:("EffKamejimaWave_Draw",), 0x80BCF1D0:("EnHg_Init",), 0x80BCF328:("EnHg_Destroy",), - 0x80BCF354:("func_80BCF354",), - 0x80BCF398:("func_80BCF398",), - 0x80BCF468:("func_80BCF468",), - 0x80BCF4AC:("func_80BCF4AC",), - 0x80BCF5F0:("func_80BCF5F0",), - 0x80BCF634:("func_80BCF634",), - 0x80BCF68C:("func_80BCF68C",), - 0x80BCF6D0:("func_80BCF6D0",), - 0x80BCF710:("func_80BCF710",), - 0x80BCF778:("func_80BCF778",), - 0x80BCF7D8:("func_80BCF7D8",), - 0x80BCF88C:("func_80BCF88C",), - 0x80BCF8A0:("func_80BCF8A0",), - 0x80BCF93C:("func_80BCF93C",), - 0x80BCF95C:("func_80BCF95C",), - 0x80BCFC0C:("func_80BCFC0C",), + 0x80BCF354:("EnHg_SetupWait",), + 0x80BCF398:("EnHg_Wait",), + 0x80BCF468:("EnHg_SetupChasePlayer",), + 0x80BCF4AC:("EnHg_ChasePlayer",), + 0x80BCF5F0:("EnHg_SetupChasePlayerWait",), + 0x80BCF634:("EnHg_ChasePlayerWait",), + 0x80BCF68C:("EnHg_SetupReactToHit",), + 0x80BCF6D0:("EnHg_ReactToHit",), + 0x80BCF710:("EnHg_HandleTatlDialog",), + 0x80BCF778:("EnHg_PlayRedeadSfx",), + 0x80BCF7D8:("EnHg_UpdateCollision",), + 0x80BCF88C:("EnHg_SetupCutscene",), + 0x80BCF8A0:("EnHg_PlayCutscene",), + 0x80BCF93C:("EnHg_SetupCsAction",), + 0x80BCF95C:("EnHg_HandleCsAction",), + 0x80BCFC0C:("EnHg_WaitForPlayerAction",), 0x80BCFDC4:("EnHg_Update",), 0x80BCFE54:("EnHg_OverrideLimbDraw",), 0x80BCFE70:("EnHg_PostLimbDraw",), 0x80BCFEC4:("EnHg_Draw",), 0x80BD02B0:("EnHgo_Init",), 0x80BD03C0:("EnHgo_Destroy",), - 0x80BD03EC:("func_80BD03EC",), - 0x80BD0410:("func_80BD0410",), - 0x80BD0420:("func_80BD0420",), - 0x80BD0434:("func_80BD0434",), - 0x80BD049C:("func_80BD049C",), - 0x80BD04E0:("func_80BD04E0",), + 0x80BD03EC:("EnHgo_SetupDoNothing",), + 0x80BD0410:("EnHgo_DoNothing",), + 0x80BD0420:("EnHgo_SetupInitCollision",), + 0x80BD0434:("EnHgo_UpdateCollision",), + 0x80BD049C:("EnHgo_SetupTalk",), + 0x80BD04E0:("EnHgo_Talk",), 0x80BD064C:("EnHgo_SetupDialogueHandler",), 0x80BD0660:("EnHgo_DefaultDialogueHandler",), - 0x80BD06FC:("func_80BD06FC",), - 0x80BD0898:("func_80BD0898",), - 0x80BD0B8C:("func_80BD0B8C",), + 0x80BD06FC:("EnHgo_HandlePlayerChoice",), + 0x80BD0898:("EnHgo_HandleCsAction",), + 0x80BD0B8C:("EnHgo_UpdateModel",), 0x80BD0C30:("EnHgo_Update",), 0x80BD0CF0:("EnHgo_OverrideLimbDraw",), 0x80BD0D38:("EnHgo_PostLimbDraw",),