ovl_en_in OK (#173)

* First pass, 5 still non matching

* data

* cleanup

* Progress on func_808F33B8

* func_808F33B8 is ugly but it matches

* func_808F5728 ugly but matches

* cleanup

* More cleanup/doc a possible inifite loop bug

* Cleanup of the switch

* Readd functions returns

* More progress on THE switch

* Everything matches but the MACROS

* OK

* Add new global Animaion struct

* fix arg name

* PR suggestions pt 1

* PR suggestions pt 2

* Fix up a few things

* Add comment about walking flag

* update functions.txt

* Update 7 to more explicit bits

* More PR cleanup
This commit is contained in:
Derek Hensley 2021-06-10 20:08:25 -07:00 committed by GitHub
parent 059c9075ca
commit 70b67402cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 1692 additions and 84 deletions

View File

@ -807,11 +807,11 @@ f32* func_800B8248(PosRot* param_1, ActorPlayer* param_2);
// void func_800B83F8(void); // void func_800B83F8(void);
s32 func_800B84D0(Actor* actor, GlobalContext* globalCtx); // Actor_IsTalking s32 func_800B84D0(Actor* actor, GlobalContext* globalCtx); // Actor_IsTalking
s32 func_800B8500(Actor* actor, GlobalContext* globalCtx, f32 fParm3, f32 fParm4, s32 param_5); s32 func_800B8500(Actor* actor, GlobalContext* globalCtx, f32 fParm3, f32 fParm4, s32 param_5);
void func_800B85E0(Actor* actor, GlobalContext* globalCtx, f32 uParm3, s32 uParm4); s32 func_800B85E0(Actor* actor, GlobalContext* globalCtx, f32 uParm3, s32 uParm4);
void func_800B8614(Actor* actor, GlobalContext* globalCtx, f32 uParm3); s32 func_800B8614(Actor* actor, GlobalContext* globalCtx, f32 uParm3);
void func_800B863C(Actor* actor, GlobalContext* globalCtx); s32 func_800B863C(Actor* actor, GlobalContext* globalCtx);
u32 func_800B867C(Actor* actor, GlobalContext* globalCtx); u32 func_800B867C(Actor* actor, GlobalContext* globalCtx);
// UNK_TYPE4 func_800B86C8(UNK_TYPE4 param_1, GlobalContext* globalCtx, UNK_TYPE4 param_3); UNK_TYPE4 func_800B86C8(Actor* actor1, GlobalContext* globalCtx, Actor* actor2);
s32 func_800B8708(GlobalContext* globalCtx); s32 func_800B8708(GlobalContext* globalCtx);
// void func_800B8718(void); // void func_800B8718(void);
// void func_800B874C(void); // void func_800B874C(void);
@ -819,7 +819,7 @@ s32 func_800B8708(GlobalContext* globalCtx);
// void func_800B882C(void); // void func_800B882C(void);
// void func_800B886C(void); // void func_800B886C(void);
void func_800B8898(GlobalContext* globalCtx, Actor* actor, UNK_PTR param_3, UNK_PTR param_4); void func_800B8898(GlobalContext* globalCtx, Actor* actor, UNK_PTR param_3, UNK_PTR param_4);
// void func_800B8934(void); s32 func_800B8934(GlobalContext* globalCtx, Actor* actor);
u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx); u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx);
UNK_TYPE4 func_800B8A1C(Actor* actor, GlobalContext* globalCtx, s32 iParm3, f32 fParm4, f32 param_5); UNK_TYPE4 func_800B8A1C(Actor* actor, GlobalContext* globalCtx, s32 iParm3, f32 fParm4, f32 param_5);
// void func_800B8B84(void); // void func_800B8B84(void);
@ -1723,7 +1723,7 @@ void FireObj_Update(GlobalContext* globalCtx, FireObj* fire);
// void func_800F3ED4(void); // void func_800F3ED4(void);
void func_800F40A0(GlobalContext* globalCtx, s32 param_2); void func_800F40A0(GlobalContext* globalCtx, s32 param_2);
// void func_800F415C(void); // void func_800F415C(void);
// void func_800F41E4(void); UNK_TYPE func_800F41E4(GlobalContext* globalCtx, ActorContext* actorCtx);
// void func_800F42A0(void); // void func_800F42A0(void);
// void func_800F43BC(void); // void func_800F43BC(void);
// void func_800F44F4(void); // void func_800F44F4(void);
@ -1789,7 +1789,7 @@ void func_800FD654(GlobalContext* globalCtx, Color_RGB8* pzParm2, f32 fParm3);
// u32 get_days_elapsed(void); // u32 get_days_elapsed(void);
// void reset_days_elapsed(void); // void reset_days_elapsed(void);
// u32 get_current_day(void); // u32 get_current_day(void);
// void func_800FD750(void); void func_800FD750(UNK_TYPE arg0);
// void func_800FD768(void); // void func_800FD768(void);
void func_800FD78C(GlobalContext* globalCtx); void func_800FD78C(GlobalContext* globalCtx);
void func_800FD858(GlobalContext* globalCtx); void func_800FD858(GlobalContext* globalCtx);
@ -2149,7 +2149,7 @@ u32 Item_Give(GlobalContext* globalCtx, u8 param_2);
// void func_80114A9C(void); // void func_80114A9C(void);
// void func_80114B84(void); // void func_80114B84(void);
// void func_80114CA0(void); // void func_80114CA0(void);
// void func_80114E90(void); UNK_TYPE func_80114E90(void);
// void func_80114F2C(void); // void func_80114F2C(void);
// void func_80114FD0(void); // void func_80114FD0(void);
// void func_80115130(void); // void func_80115130(void);
@ -2162,7 +2162,7 @@ u32 Item_Give(GlobalContext* globalCtx, u8 param_2);
void func_80115844(GlobalContext* globalCtx, s16 param_2); void func_80115844(GlobalContext* globalCtx, s16 param_2);
void func_80115908(GlobalContext* globalCtx, u8 param_2); void func_80115908(GlobalContext* globalCtx, u8 param_2);
void func_801159c0(s16 param_1); void func_801159c0(s16 param_1);
// void func_801159EC(void); void func_801159EC(s16 arg0);
// void func_80115A14(void); // void func_80115A14(void);
// void Parameter_AddMagic(void); // void Parameter_AddMagic(void);
// void func_80115D5C(void); // void func_80115D5C(void);
@ -2709,18 +2709,18 @@ UNK_TYPE func_8013BC6C(SkelAnime* skelAnime, UNK_PTR arg1, s32 arg2);
// void func_8013CD64(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7); // void func_8013CD64(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8013CF04(void); // void func_8013CF04(void);
// void func_8013D0E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_8013D0E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_8013D2E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7); void func_8013D2E0(Vec3f* arg0, PosRot* arg1, ActorShape* arg2, s16* arg3, s16* arg4, s16* arg5, s16* arg6);
// void func_8013D5E8(void); UNK_TYPE func_8013D5E8(s16 arg0, UNK_TYPE arg1, s16 arg2);
// void func_8013D648(void); u8* func_8013D648(GlobalContext *globalCtx, s16 arg1, s32 arg2);
// void func_8013D68C(void); UNK_TYPE func_8013D68C(u8* arg0, s16 arg1, UNK_PTR arg2);
// void func_8013D720(void); // void func_8013D720(void);
// void func_8013D768(void); UNK_TYPE func_8013D768(Actor* actor, UNK_PTR arg1, s16 arg2);
// void func_8013D83C(void); // void func_8013D83C(void);
// void func_8013D8DC(void); // void func_8013D8DC(void);
// void func_8013D924(void); // void func_8013D924(void);
Actor* func_ActorCategoryIterateById(GlobalContext* globalCtx, struct Actor* actorListStart, s32 actorCategory, s32 actorId); Actor* func_ActorCategoryIterateById(GlobalContext* globalCtx, struct Actor* actorListStart, s32 actorCategory, s32 actorId);
// void func_8013D9C8(void); void func_8013D9C8(GlobalContext* globalCtx, s16* arg1, s16* arg2, UNK_TYPE arg3);
// void func_8013DB90(void); u8 func_8013DB90(GlobalContext* globalCtx, UNK_PTR arg1, f32 arg2);
// void func_8013DC40(void); // void func_8013DC40(void);
// void func_8013DCE0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE1 param_10); // void func_8013DCE0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE1 param_10);
// void func_8013DE04(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_8013DE04(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
@ -3860,7 +3860,7 @@ void func_8019F230(void);
// void func_8019F780(void); // void func_8019F780(void);
// void func_8019F7D8(void); // void func_8019F7D8(void);
// void func_8019F830(void); // void func_8019F830(void);
// void func_8019F88C(void); void func_8019F88C(Vec3f* arg0, UNK_TYPE arg1, UNK_TYPE arg2);
// void func_8019F900(void); // void func_8019F900(void);
// void func_8019FA18(void); // void func_8019FA18(void);
void func_8019FAD8(Vec3f* param_1, u16 param_2, f32 param_3); void func_8019FAD8(Vec3f* param_1, u16 param_2, f32 param_3);

View File

@ -957,7 +957,7 @@ extern GameStateOverlay daytelopGameStateInfo;
// extern UNK_TYPE2 D_801BDA78; // extern UNK_TYPE2 D_801BDA78;
// extern UNK_TYPE2 D_801BDA7C; // extern UNK_TYPE2 D_801BDA7C;
// extern UNK_TYPE4 D_801BDA9C; // extern UNK_TYPE4 D_801BDA9C;
// extern UNK_TYPE4 D_801BDAA0; extern UNK_TYPE4 D_801BDAA0;
// extern UNK_TYPE4 D_801BDAA4; // extern UNK_TYPE4 D_801BDAA4;
// extern UNK_TYPE2 D_801BDAA8; // extern UNK_TYPE2 D_801BDAA8;
// extern UNK_TYPE2 D_801BDAAA; // extern UNK_TYPE2 D_801BDAAA;

View File

@ -358,6 +358,15 @@ typedef struct {
/* 0x14 */ f32 morphFrames; /* 0x14 */ f32 morphFrames;
} ActorAnimationEntry; // size = 0x18 } ActorAnimationEntry; // size = 0x18
typedef struct {
/* 0x00 */ AnimationHeader* animationSeg;
/* 0x04 */ f32 playbackSpeed;
/* 0x08 */ s16 frame;
/* 0x0A */ s16 frameCount;
/* 0x0C */ u8 mode;
/* 0x0E */ s16 transitionRate;
} ActorAnimationEntryS; // size = 0x10
typedef enum { typedef enum {
/* 0x000 */ ACTOR_PLAYER, /* 0x000 */ ACTOR_PLAYER,
/* 0x001 */ ACTOR_EN_TEST, /* 0x001 */ ACTOR_EN_TEST,

View File

@ -1827,9 +1827,9 @@ SECTIONS
ovl_En_In : AT(RomLocation) ovl_En_In : AT(RomLocation)
{ {
build/src/overlays/actors/ovl_En_In/z_en_in.o(.text) build/src/overlays/actors/ovl_En_In/z_en_in.o(.text)
build/asm/overlays/ovl_En_In_data.o(.data) build/src/overlays/actors/ovl_En_In/z_en_in.o(.data)
build/src/overlays/actors/ovl_En_In/z_en_in.o(.rodata) build/src/overlays/actors/ovl_En_In/z_en_in.o(.rodata)
build/asm/overlays/ovl_En_In_rodata.o(.rodata) build/src/overlays/actors/ovl_En_In/z_en_in_overlay.o(.ovl)
} }
SegmentEnd = .; SegmentEnd = .;
SegmentSize = SegmentEnd - SegmentStart; SegmentSize = SegmentEnd - SegmentStart;

View File

@ -263,6 +263,55 @@ D_060000D0 = 0x060000D0;
D_06001290 = 0x06001290; D_06001290 = 0x06001290;
D_06001470 = 0x06001470; D_06001470 = 0x06001470;
/* en_in */
D_06014EA8 = 0x06014EA8;
D_06015E38 = 0x06015E38;
D_06016484 = 0x06016484;
D_06016A60 = 0x06016A60;
D_060170DC = 0x060170DC;
D_060177AC = 0x060177AC;
D_06018240 = 0x06018240;
D_060187C8 = 0x060187C8;
D_060198A8 = 0x060198A8;
D_06007A70 = 0x06007A70;
D_06007C48 = 0x06007C48;
D_0601C528 = 0x0601C528;
D_06001C30 = 0x06001C30;
D_06003520 = 0x06003520;
D_060035E0 = 0x060035E0;
D_06004820 = 0x06004820;
D_06004C20 = 0x06004C20;
D_060043E0 = 0x060043E0;
D_06001D10 = 0x06001D10;
D_06014F8C = 0x06014F8C;
D_06000CB0 = 0x06000CB0;
D_060003B4 = 0x060003B4;
D_06001BE0 = 0x06001BE0;
D_06015918 = 0x06015918;
D_0601C0B0 = 0x0601C0B0;
D_0601A140 = 0x0601A140;
D_0601B904 = 0x0601B904;
D_0601B3C4 = 0x0601B3C4;
D_06019EB4 = 0x06019EB4;
D_06014C30 = 0x06014C30;
D_060138D0 = 0x060138D0;
D_060149A8 = 0x060149A8;
D_06014710 = 0x06014710;
D_06013DE0 = 0x06013DE0;
D_06014420 = 0x06014420;
D_06014040 = 0x06014040;
D_06013A00 = 0x06013A00;
D_06013440 = 0x06013440;
D_06013670 = 0x06013670;
D_060145D8 = 0x060145D8;
D_06013F10 = 0x06013F10;
D_06013540 = 0x06013540;
D_06012DF8 = 0x06012DF8;
D_06014AE0 = 0x06014AE0;
D_06012A78 = 0x06012A78;
D_060137A0 = 0x060137A0;
D_06014860 = 0x06014860;
/* z_dm_statue */ /* z_dm_statue */
D_06001788 = 0x06001788; D_06001788 = 0x06001788;
D_06000520 = 0x06000520; D_06000520 = 0x06000520;

View File

@ -31,7 +31,7 @@ extern UNK_TYPE D_06000990;
extern FlexSkeletonHeader D_06008C40; extern FlexSkeletonHeader D_06008C40;
// Probably the same struct as EnFgAnimation, need more info from func_8013BC6C // Probably the same struct as ActorAnimationEntryS, need more info from func_8013BC6C
static UNK_TYPE D_80C1E200[] = { &D_06000990, 0x3F800000, 0x0000FFFF, 0x00000000 }; static UNK_TYPE D_80C1E200[] = { &D_06000990, 0x3F800000, 0x0000FFFF, 0x00000000 };
s32 func_80C1DED0(DmNb* this, s32 arg1) { s32 func_80C1DED0(DmNb* this, s32 arg1) {

View File

@ -79,7 +79,7 @@ static DamageTable sDamageTable = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}; };
static EnFgAnimation sAnimations[] = { static ActorAnimationEntryS sAnimations[] = {
{ &D_06001534, 1.0f, 0, -1, 0, 0 }, { &D_06001534, 1.0f, 0, -1, 0, 0 },
{ &D_06001534, 1.0f, 0, -1, 0, -4 }, { &D_06001534, 1.0f, 0, -1, 0, -4 },
{ &D_060011C0, 1.0f, 0, -1, 0, -4 }, { &D_060011C0, 1.0f, 0, -1, 0, -4 },

View File

@ -26,17 +26,6 @@ typedef enum {
/* 0x05 */ FG_DMGEFFECT_ICEARROW, /* 0x05 */ FG_DMGEFFECT_ICEARROW,
} FrogDamageEffect; } FrogDamageEffect;
// TODO: This is a common struct and may be moved to a more global header
// Typically the frame/transition data is f32, not s16.
typedef struct {
/* 0x00 */ AnimationHeader* animationSeg;
/* 0x04 */ f32 playbackSpeed;
/* 0x08 */ s16 frame;
/* 0x0A */ s16 frameCount;
/* 0x0C */ u8 mode;
/* 0x0E */ s16 transitionRate;
} EnFgAnimation; // size = 0x10
typedef struct { typedef struct {
/* 0x0000 */ u8 type; /* 0x0000 */ u8 type;
/* 0x0001 */ u8 timer; /* 0x0001 */ u8 timer;

View File

@ -445,7 +445,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
this->previousBankValue = (s16)(gSaveContext.roomInf[127][0] & 0xFFFF); this->previousBankValue = (s16)(gSaveContext.roomInf[127][0] & 0xFFFF);
gSaveContext.roomInf[127][0] = gSaveContext.roomInf[127][0] =
(gSaveContext.roomInf[127][0] & 0xFFFF0000) | (((gSaveContext.roomInf[127][0] & 0xFFFF) - globalCtx->msgCtx.bankRupeesSelected) - this->serviceFee); (gSaveContext.roomInf[127][0] & 0xFFFF0000) | (((gSaveContext.roomInf[127][0] & 0xFFFF) - globalCtx->msgCtx.bankRupeesSelected) - this->serviceFee);
func_801159EC((s16)globalCtx->msgCtx.bankRupeesSelected, &gSaveContext); func_801159EC(globalCtx->msgCtx.bankRupeesSelected);
} }
} else { } else {
func_8019F230(); func_8019F230();

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,66 @@
struct EnIn; struct EnIn;
typedef void (*EnInActionFunc)(struct EnIn*, GlobalContext*);
typedef enum {
/* 0 */ ENIN_UNK_TYPE,
/* 1 */ ENIN_HORSE_RIDER_YELLOW_SHIRT,
/* 2 */ ENIN_HORSE_RIDER_BLUE_SHIRT,
/* 3 */ ENIN_YELLOW_SHIRT,
/* 4 */ ENIN_BLUE_SHIRT
} EnInType;
#define ENIN_GET_TYPE(thisx) ((thisx)->params & 0x1FF)
#define ENIN_GET_WALKING_FLAG(thisx) (((thisx)->params & 0x7E00) >> 9) // Only used with ENIN_UNK_TYPE
typedef struct EnIn { typedef struct EnIn {
/* 0x000 */ Actor actor; /* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x388]; /* 0x144 */ EnInActionFunc actionFunc;
/* 0x148 */ SkelAnime skelAnime;
/* 0x18C */ ColliderJntSph colliderJntSph;
/* 0x1AC */ ColliderJntSphElement colliderJntSphElement;
/* 0x1EC */ ColliderCylinder colliderCylinder;
/* 0x238 */ char unk238[0x4];
/* 0x23C */ u8 unk23C;
/* 0x23D */ u8 unk23D;
/* 0x240 */ u8 *unk240;
/* 0x244 */ s16 unk244;
/* 0x248 */ Vec3f unk248;
/* 0x254 */ Vec3f unk254;
/* 0x260 */ u8 unk260;
/* 0x261 */ u8 unk261;
/* 0x262 */ Vec3s limbDrawTbl[20];
/* 0x2DA */ Vec3s transitionDrawTbl[20];
/* 0x352 */ s16 unk352;
/* 0x354 */ s16 unk354;
/* 0x356 */ char unk356[0x2];
/* 0x358 */ s16 unk358;
/* 0x35A */ s16 unk35A;
/* 0x35C */ char unk35C[0x2];
/* 0x35E */ s16 unk35E;
/* 0x360 */ s16 unk360;
/* 0x362 */ char unk362[0x14];
/* 0x376 */ s16 unk376[20];
/* 0x39E */ s16 unk39E[20];
/* 0x3C6 */ char unk3C6[0xBC];
/* 0x482 */ s16 unk482;
/* 0x484 */ s16 unk484;
/* 0x486 */ s16 unk486;
/* 0x488 */ s16 unk488;
/* 0x48A */ u16 unk48A;
/* 0x48C */ s32 unk48C;
/* 0x490 */ char unk490[0x4];
/* 0x494 */ s32 unk494;
/* 0x498 */ char unk498[0xC];
/* 0x4A4 */ struct EnIn* unk4A4;
/* 0x4A8 */ s32 unk4A8;
/* 0x4AC */ s32 unk4AC;
/* 0x4B0 */ s32 unk4B0;
/* 0x4B4 */ Vec3f unk4B4;
/* 0x4C0 */ f32 unk4C0;
/* 0x4C0 */ f32 unk4C4;
/* 0x4C0 */ s32 unk4C8;
} EnIn; // size = 0x4CC } EnIn; // size = 0x4CC
extern const ActorInit En_In_InitVars; extern const ActorInit En_In_InitVars;

View File

@ -6726,7 +6726,7 @@
0x808F3414:("func_808F3414",), 0x808F3414:("func_808F3414",),
0x808F35AC:("func_808F35AC",), 0x808F35AC:("func_808F35AC",),
0x808F35D8:("func_808F35D8",), 0x808F35D8:("func_808F35D8",),
0x808F3608:("func_808F3608",), 0x808F3608:("EnIn_DoNothing",),
0x808F3618:("func_808F3618",), 0x808F3618:("func_808F3618",),
0x808F3690:("func_808F3690",), 0x808F3690:("func_808F3690",),
0x808F374C:("func_808F374C",), 0x808F374C:("func_808F374C",),
@ -6757,8 +6757,8 @@
0x808F621C:("EnIn_Destroy",), 0x808F621C:("EnIn_Destroy",),
0x808F6248:("EnIn_Update",), 0x808F6248:("EnIn_Update",),
0x808F6334:("func_808F6334",), 0x808F6334:("func_808F6334",),
0x808F64A0:("func_808F64A0",), 0x808F64A0:("EnIn_OverrideLimbDraw",),
0x808F67F8:("func_808F67F8",), 0x808F67F8:("EnIn_PostLimbDraw",),
0x808F69B4:("EnIn_Draw",), 0x808F69B4:("EnIn_Draw",),
0x808F74B0:("EnBomChu_Init",), 0x808F74B0:("EnBomChu_Init",),
0x808F7580:("EnBomChu_Destroy",), 0x808F7580:("EnBomChu_Destroy",),