From 0c7b90cf97f26483c8b6a98ae099a295f61e72ab Mon Sep 17 00:00:00 2001 From: MegaIDK <125525714+MegaIDK@users.noreply.github.com> Date: Thu, 14 Sep 2023 08:48:57 -0300 Subject: [PATCH] document object_fish (#1359) * initial commit of object_fish documentation * spaces after offset * separate categories * extra owner * name changes * forgor the .c * format * changed name of funcit * forgor some OutName --- assets/xml/objects/object_fish.xml | 395 ++++++++++++------ .../actors/ovl_En_Fishing/z_en_fishing.c | 39 +- 2 files changed, 294 insertions(+), 140 deletions(-) diff --git a/assets/xml/objects/object_fish.xml b/assets/xml/objects/object_fish.xml index 07e0e3d233..b4de27c4e6 100644 --- a/assets/xml/objects/object_fish.xml +++ b/assets/xml/objects/object_fish.xml @@ -1,162 +1,315 @@  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + - + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + - + + + + + + + + + + + + + - - - + + + + + + + + + + + diff --git a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c index 33e49d6e5b..1f39649988 100644 --- a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c +++ b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c @@ -948,8 +948,8 @@ void EnFishing_Init(Actor* thisx, PlayState* play2) { thisx->bgCheckFlags |= BGCHECKFLAG_PLAYER_800; // Added in MM if ((thisx->params < 115) || (thisx->params == 200)) { - SkelAnime_InitFlex(play, &this->skelAnime, &gFishingFishSkel, &gFishingFishAnim, NULL, NULL, 0); - Animation_MorphToLoop(&this->skelAnime, &gFishingFishAnim, 0.0f); + SkelAnime_InitFlex(play, &this->skelAnime, &gFishingBassSkel, &gFishingBassAnim, NULL, NULL, 0); + Animation_MorphToLoop(&this->skelAnime, &gFishingBassAnim, 0.0f); } else { SkelAnime_InitFlex(play, &this->skelAnime, &gFishingLoachSkel, &gFishingLoachAnim, NULL, NULL, 0); Animation_MorphToLoop(&this->skelAnime, &gFishingLoachAnim, 0.0f); @@ -3931,8 +3931,8 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { SkelAnime_Free(&this->skelAnime, play); if (this->unk_148 == 0) { - SkelAnime_InitFlex(play, &this->skelAnime, &gFishingFishSkel, &gFishingFishAnim, 0, 0, 0); - Animation_MorphToLoop(&this->skelAnime, &gFishingFishAnim, 0.0f); + SkelAnime_InitFlex(play, &this->skelAnime, &gFishingBassSkel, &gFishingBassAnim, 0, 0, 0); + Animation_MorphToLoop(&this->skelAnime, &gFishingBassAnim, 0.0f); } else { SkelAnime_InitFlex(play, &this->skelAnime, &gFishingLoachSkel, &gFishingLoachAnim, 0, 0, 0); Animation_MorphToLoop(&this->skelAnime, &gFishingLoachAnim, 0.0f); @@ -4176,32 +4176,33 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { } } -s32 EnFishing_FishOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { +s32 EnFishing_BassOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { EnFishing* this = THIS; - if (limbIndex == FISHING_FISH_LIMB_0D) { + if (limbIndex == FISHING_BASS_LIMB_JAW) { rot->z -= this->unk_168 - 11000; - } else if ((limbIndex == FISHING_FISH_LIMB_02) || (limbIndex == FISHING_FISH_LIMB_03)) { + } else if ((limbIndex == FISHING_BASS_LIMB_MIDDLE_SEGMENT_ROOT) || + (limbIndex == FISHING_BASS_LIMB_BACK_SEGMENT_ROOT)) { rot->y += this->unk_164; - } else if (limbIndex == FISHING_FISH_LIMB_04) { + } else if (limbIndex == FISHING_BASS_LIMB_END_ROOT) { rot->y += this->unk_16E; - } else if (limbIndex == FISHING_FISH_LIMB_0E) { + } else if (limbIndex == FISHING_BASS_LIMB_RIGHT_PECTORAL_FIN) { rot->y -= this->unk_16A; - } else if (limbIndex == FISHING_FISH_LIMB_0F) { + } else if (limbIndex == FISHING_BASS_LIMB_LEFT_PECTORAL_FIN) { rot->y += this->unk_16A; - } else if (limbIndex == FISHING_FISH_LIMB_08) { + } else if (limbIndex == FISHING_BASS_LIMB_TOP_REAR_FIN) { rot->y += this->unk_16C; - } else if (limbIndex == FISHING_FISH_LIMB_09) { + } else if (limbIndex == FISHING_BASS_LIMB_BOTTOM_REAR_FIN) { rot->y -= this->unk_16C; } return false; } -void EnFishing_FishPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { +void EnFishing_BassPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { EnFishing* this = THIS; - if (limbIndex == FISHING_FISH_LIMB_0D) { + if (limbIndex == FISHING_BASS_LIMB_JAW) { Matrix_MultVec3f(&sFishMouthOffset, &this->fishMouthPos); } } @@ -4209,11 +4210,11 @@ void EnFishing_FishPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec s32 EnFishing_LoachOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { EnFishing* this = THIS; - if (limbIndex == FISHING_LOACH_LIMB_03) { + if (limbIndex == FISHING_LOACH_LIMB_MIDDLE_SEGMENT) { rot->y += this->unk_1C4[0]; - } else if (limbIndex == FISHING_LOACH_LIMB_04) { + } else if (limbIndex == FISHING_LOACH_LIMB_LOWER_BACK_FIN) { rot->y += this->unk_1C4[1]; - } else if (limbIndex == FISHING_LOACH_LIMB_05) { + } else if (limbIndex == FISHING_LOACH_LIMB_TAIL_FIN) { rot->y += this->unk_1C4[2]; } @@ -4224,7 +4225,7 @@ void EnFishing_LoachPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Ve static Vec3f sLoachMouthOffset = { 500.0f, 500.0f, 0.0f }; EnFishing* this = THIS; - if (limbIndex == FISHING_LOACH_LIMB_0B) { + if (limbIndex == FISHING_LOACH_LIMB_JAW) { Matrix_MultVec3f(&sLoachMouthOffset, &this->fishMouthPos); } } @@ -4245,7 +4246,7 @@ void EnFishing_DrawFish(Actor* thisx, PlayState* play) { Matrix_Translate(0.0f, 0.0f, this->unk_164 * 10.0f * 0.01f, MTXMODE_APPLY); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, - EnFishing_FishOverrideLimbDraw, EnFishing_FishPostLimbDraw, &this->actor); + EnFishing_BassOverrideLimbDraw, EnFishing_BassPostLimbDraw, &this->actor); } else { Matrix_Translate(0.0f, 0.0f, 3000.0f, MTXMODE_APPLY); Matrix_RotateYF(BINANG_TO_RAD(this->unk_164), MTXMODE_APPLY);