mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-20 13:45:07 -04:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user