mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
Decompile Fishing and document object_fish (#856)
* Start decompiling Fishing * Decompile more functions in Fishing * Decompile a few more functions in Fishing * Decompile func_80B6E9E0 and func_80B7825C (non matching) * Minor Fishing cleanups * Migrate fishing bss to C and match 3 functions * Decompile and match Fishing_Update * Migrate fishing data to C and minor cleanups * Fix the object_fish xml and use its symbols in Fishing * Partially document Fishing and object_fish * Add more documentation/cleanups to Fishing and object_fish * Use object_fish symbols in Demo_Ec and fix naming * Minor fixes to Fishing docs * Apply review suggestions for Fishing * Apply 2 more review suggestions for Fishing * Apply some review suggestions for Fishing
This commit is contained in:
parent
89f684b026
commit
fa0a0fe81b
55 changed files with 5814 additions and 20562 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "vt.h"
|
||||
#include "objects/object_zo/object_zo.h"
|
||||
#include "objects/object_ec/object_ec.h"
|
||||
#include "objects/object_fish/object_fish.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
|
||||
#define FLAGS 0x00000010
|
||||
|
@ -116,9 +117,6 @@ extern FlexSkeletonHeader D_06007958;
|
|||
// Object_GE1
|
||||
extern FlexSkeletonHeader D_06000330;
|
||||
|
||||
// Object_ZO
|
||||
extern FlexSkeletonHeader D_0600BFA8;
|
||||
|
||||
// Object_KZ
|
||||
extern FlexSkeletonHeader D_060086D0;
|
||||
|
||||
|
@ -134,9 +132,6 @@ extern FlexSkeletonHeader D_06004258;
|
|||
// Object_OS
|
||||
extern FlexSkeletonHeader D_06004658;
|
||||
|
||||
// Object_Fish
|
||||
extern FlexSkeletonHeader D_060085F8;
|
||||
|
||||
// Object_RS
|
||||
extern FlexSkeletonHeader D_06004868;
|
||||
|
||||
|
@ -166,7 +161,6 @@ extern Gfx D_06005880[];
|
|||
extern Gfx D_06009198[];
|
||||
extern Gfx D_06009430[];
|
||||
extern Gfx D_06009690[];
|
||||
extern Gfx D_060074C8[];
|
||||
|
||||
void DemoEc_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DemoEc* this = THIS;
|
||||
|
@ -1044,9 +1038,9 @@ void DemoEc_DrawMaskShopOwner(DemoEc* this, GlobalContext* globalCtx) {
|
|||
DemoEc_DrawSkeleton(this, globalCtx, &D_060035D8, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
void DemoEc_InitFishingMan(DemoEc* this, GlobalContext* globalCtx) {
|
||||
void DemoEc_InitFishingOwner(DemoEc* this, GlobalContext* globalCtx) {
|
||||
DemoEc_UseDrawObject(this, globalCtx);
|
||||
DemoEc_InitSkelAnime(this, globalCtx, &D_060085F8);
|
||||
DemoEc_InitSkelAnime(this, globalCtx, &gFishingOwnerSkel);
|
||||
DemoEc_UseAnimationObject(this, globalCtx);
|
||||
DemoEc_ChangeAnimation(this, &gDemoEcPotionShopOwnerAnim, 0, 0.0f, false);
|
||||
func_8096D5D4(this, globalCtx);
|
||||
|
@ -1055,28 +1049,32 @@ void DemoEc_InitFishingMan(DemoEc* this, GlobalContext* globalCtx) {
|
|||
this->drawConfig = EC_DRAW_FISHING_MAN;
|
||||
}
|
||||
|
||||
void DemoEc_UpdateFishingMan(DemoEc* this, GlobalContext* globalCtx) {
|
||||
void DemoEc_UpdateFishingOwner(DemoEc* this, GlobalContext* globalCtx) {
|
||||
DemoEc_UpdateSkelAnime(this);
|
||||
func_8096D594(this, globalCtx);
|
||||
DemoEc_UpdateEyes(this);
|
||||
DemoEc_UpdateBgFlags(this, globalCtx);
|
||||
}
|
||||
|
||||
void DemoEc_FishingManPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx,
|
||||
Gfx** gfx) {
|
||||
void DemoEc_FishingOwnerPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx,
|
||||
Gfx** gfx) {
|
||||
DemoEc* this = THIS;
|
||||
|
||||
if ((limbIndex == 8) && !(HIGH_SCORE(HS_FISHING) & 0x1000)) {
|
||||
gSPDisplayList((*gfx)++, SEGMENTED_TO_VIRTUAL(D_060074C8));
|
||||
gSPDisplayList((*gfx)++, SEGMENTED_TO_VIRTUAL(gFishingOwnerHatDL));
|
||||
}
|
||||
}
|
||||
|
||||
void DemoEc_DrawFishingMan(DemoEc* this, GlobalContext* globalCtx) {
|
||||
static void* eyeTextures[] = { 0x06009250, 0x06009650, 0x06009A50 };
|
||||
void DemoEc_DrawFishingOwner(DemoEc* this, GlobalContext* globalCtx) {
|
||||
static void* eyeTextures[] = {
|
||||
gFishingOwnerEyeOpenTex,
|
||||
gFishingOwnerEyeHalfTex,
|
||||
gFishingOwnerEyeClosedTex,
|
||||
};
|
||||
s32 eyeTexIndex = this->eyeTexIndex;
|
||||
void* eyeTexture = eyeTextures[eyeTexIndex];
|
||||
|
||||
DemoEc_DrawSkeleton(this, globalCtx, eyeTexture, NULL, NULL, DemoEc_FishingManPostLimbDraw);
|
||||
DemoEc_DrawSkeleton(this, globalCtx, eyeTexture, NULL, NULL, DemoEc_FishingOwnerPostLimbDraw);
|
||||
}
|
||||
|
||||
void DemoEc_InitBombchuShopOwner(DemoEc* this, GlobalContext* globalCtx) {
|
||||
|
@ -1096,6 +1094,7 @@ void DempEc_UpdateBombchuShopOwner(DemoEc* this, GlobalContext* globalCtx) {
|
|||
DemoEc_UpdateEyes(this);
|
||||
DemoEc_UpdateBgFlags(this, globalCtx);
|
||||
}
|
||||
|
||||
void DemoEc_DrawBombchuShopOwner(DemoEc* this, GlobalContext* globalCtx) {
|
||||
static void* eyeTextures[] = { 0x06003968, 0x06003D68, 0x06004168 };
|
||||
s32 eyeTexIndex = this->eyeTexIndex;
|
||||
|
@ -1210,7 +1209,7 @@ static DemoEcInitFunc sInitFuncs[] = {
|
|||
DemoEc_InitCuccoLady,
|
||||
DemoEc_InitPotionShopOwner,
|
||||
DemoEc_InitMaskShopOwner,
|
||||
DemoEc_InitFishingMan,
|
||||
DemoEc_InitFishingOwner,
|
||||
DemoEc_InitBombchuShopOwner,
|
||||
DemoEc_InitGorons,
|
||||
DemoEc_InitGorons,
|
||||
|
@ -1290,7 +1289,7 @@ static DemoEcUpdateFunc sUpdateFuncs[] = {
|
|||
DemoEc_UpdateCuccoLady,
|
||||
DemoEc_UpdatePotionShopOwner,
|
||||
DemoEc_UpdateMaskShopOwner,
|
||||
DemoEc_UpdateFishingMan,
|
||||
DemoEc_UpdateFishingOwner,
|
||||
DempEc_UpdateBombchuShopOwner,
|
||||
DemoEc_UpdateGorons,
|
||||
DemoEc_UpdateMalon,
|
||||
|
@ -1325,7 +1324,7 @@ static DemoEcDrawFunc sDrawFuncs[] = {
|
|||
DemoEc_DrawKingZora, DemoEc_DrawMido,
|
||||
DemoEc_DrawCucco, DemoEc_DrawCuccoLady,
|
||||
DemoEc_DrawPotionShopOwner, DemoEc_DrawMaskShopOwner,
|
||||
DemoEc_DrawFishingMan, DemoEc_DrawBombchuShopOwner,
|
||||
DemoEc_DrawFishingOwner, DemoEc_DrawBombchuShopOwner,
|
||||
DemoEc_DrawGorons, DemoEc_DrawMalon,
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -8,7 +8,56 @@ struct Fishing;
|
|||
|
||||
typedef struct Fishing {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x404];
|
||||
/* 0x014C */ char unk_14C[0x004];
|
||||
/* 0x0150 */ u8 unk_150;
|
||||
/* 0x0151 */ u8 unk_151;
|
||||
/* 0x0152 */ u8 unk_152;
|
||||
/* 0x0154 */ s16 unk_154;
|
||||
/* 0x0156 */ u8 unk_156;
|
||||
/* 0x0157 */ u8 unk_157;
|
||||
/* 0x0158 */ s16 unk_158;
|
||||
/* 0x015A */ s16 unk_15A;
|
||||
/* 0x015C */ s16 unk_15C;
|
||||
/* 0x015E */ s16 unk_15E;
|
||||
/* 0x0160 */ s16 unk_160;
|
||||
/* 0x0162 */ s16 unk_162;
|
||||
/* 0x0164 */ s16 unk_164;
|
||||
/* 0x0166 */ s16 unk_166;
|
||||
/* 0x0168 */ s16 unk_168;
|
||||
/* 0x016A */ s16 unk_16A;
|
||||
/* 0x016C */ s16 unk_16C;
|
||||
/* 0x016E */ s16 unk_16E;
|
||||
/* 0x0170 */ s16 unk_170;
|
||||
/* 0x0172 */ s16 unk_172;
|
||||
/* 0x0174 */ s16 unk_174;
|
||||
/* 0x0176 */ s16 unk_176;
|
||||
/* 0x0178 */ s16 unk_178;
|
||||
/* 0x017A */ s16 unk_17A[4];
|
||||
/* 0x0184 */ f32 unk_184;
|
||||
/* 0x0188 */ f32 unk_188;
|
||||
/* 0x018C */ f32 unk_18C;
|
||||
/* 0x0190 */ f32 unk_190;
|
||||
/* 0x0194 */ f32 unk_194;
|
||||
/* 0x0198 */ f32 unk_198;
|
||||
/* 0x019C */ f32 unk_19C;
|
||||
/* 0x01A0 */ s16 unk_1A0;
|
||||
/* 0x01A2 */ s16 unk_1A2;
|
||||
/* 0x01A4 */ s16 unk_1A4;
|
||||
/* 0x01A8 */ f32 unk_1A8;
|
||||
/* 0x01AC */ f32 unk_1AC;
|
||||
/* 0x01B0 */ f32 unk_1B0;
|
||||
/* 0x01B4 */ Vec3f unk_1B4;
|
||||
/* 0x01C0 */ Vec3f fishMouthPos;
|
||||
/* 0x01CC */ s16 unk_1CC[3];
|
||||
/* 0x01D2 */ u8 unk_1D2;
|
||||
/* 0x01D3 */ u8 unk_1D3;
|
||||
/* 0x01D4 */ u8 unk_1D4;
|
||||
/* 0x01D5 */ u8 unk_1D5;
|
||||
/* 0x01D8 */ SkelAnime skelAnime;
|
||||
/* 0x021C */ LightNode* lightNode;
|
||||
/* 0x0220 */ LightInfo lightInfo;
|
||||
/* 0x0230 */ ColliderJntSph collider;
|
||||
/* 0x0250 */ ColliderJntSphElement colliderElements[12];
|
||||
} Fishing; // size = 0x0550
|
||||
|
||||
extern const ActorInit Fishing_InitVars;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue