diff --git a/include/functions.h b/include/functions.h index 49efe79ae9..ca04a6c470 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2536,10 +2536,10 @@ void SkelAnime_DrawFlexLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** s void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor); void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, - OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDraw unkDraw, Actor* actor, + OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw, Actor* actor, Mtx** mtx); void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, - OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDraw unkDraw, Actor* actor); + OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw, Actor* actor); void SkelAnime_GetFrameData(AnimationHeader* animationSeg, s32 currentFrame, s32 limbCount, Vec3s* dst); s16 Animation_GetLength(void* animation); s16 Animation_GetLastFrame(void* animation); @@ -2676,59 +2676,59 @@ u32 func_8013A4C4(s32 flag); s16 func_8013A504(s16 val); s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos, Vec3s* rot, f32 distanceMin, f32 distanceMax, s16 angleError); Actor* func_8013A7C0(GlobalContext* globalCtx, s32 arg1); -// void func_8013A860(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_TYPE4 param_10); -Gfx* func_8013AB00(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, void* func1, void* func2, void* func3, Actor* actor, Gfx* gfx); +Gfx* func_8013A860(GlobalContext* globalCtx, s32 idx, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkActorDraw, Actor* actor, Mtx** mtx, Gfx* gfx); +Gfx* func_8013AB00(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkActorDraw, Actor* actor, Gfx* gfx); s32 func_8013AD6C(GlobalContext* globalCtx); -void func_8013AD9C(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 arg5); -void func_8013AED4(u16* param_1, u16 param_2, u16 param_3); -void func_8013AF00(f32 arg0[], UNK_TYPE arg1, UNK_TYPE arg2); -// void func_8013B010(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_8013B0C8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); -// void func_8013B350(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); -s32 func_8013B6B0(Path* path, UNK_PTR arg1, s32* arg2, s32 arg3, s32 arg4, s32* arg5, f32 arg6[], Vec3f* arg7, s16 arg8); +s32 func_8013AD9C(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 arg5); +void func_8013AED4(u16* arg0, u16 arg1, u16 arg2); +void func_8013AF00(f32* arg0, s32 arg1, s32 arg2); +s32 func_8013B010(f32* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, f32* arg6); +void func_8013B0C8(s32 arg0, f32 arg1, s32 arg2, f32* arg3, f32* arg4); +void func_8013B350(Vec3f* arg0, f32* arg1, f32 arg2, s32 arg3, s32 arg4, Vec3s* arg5, f32* arg6); +s32 func_8013B6B0(Path* path, f32* arg1, s32* arg2, s32 arg3, s32 arg4, s32* arg5, f32* arg6, Vec3f* arg7, s32 arg8); void func_8013B878(GlobalContext* globalCtx, Path* path, s32 arg2, Vec3f* arg3); Path* func_8013BB34(GlobalContext* globalCtx, u8 arg1, s32 arg2); -Actor* func_8013BB7C(Actor* actor, GlobalContext* globalCtx, s32 actorCategory, s32 actorId); +Actor* func_8013BB7C(Actor* actor, GlobalContext* globalCtx, u8 actorCategory, s16 actorId); s32 func_8013BC6C(SkelAnime* skelAnime, ActorAnimationEntryS* arg1, s32 arg2); -// void func_8013BD40(void); -s32 func_8013BEDC(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32* arg3); -// void func_8013C068(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); -// void func_8013C624(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_8013C8B8(void); -void func_8013C964(Actor* actor, GlobalContext* globalCtx, f32 param_3, f32 param_4, s32 param_5, s16 param_6); -// void func_8013CC2C(void); -// 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_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(Vec3f* arg0, PosRot* arg1, ActorShape* arg2, s16* arg3, s16* arg4, s16* arg5, s16* arg6); -UNK_TYPE func_8013D5E8(s16 arg0, UNK_TYPE arg1, s16 arg2); -Path* func_8013D648(GlobalContext* globalCtx, s16 arg1, s32 arg2); -UNK_TYPE func_8013D68C(Path* path, s16 arg1, UNK_PTR arg2); -// void func_8013D720(void); -UNK_TYPE func_8013D768(Actor* actor, UNK_PTR arg1, s16 arg2); -// void func_8013D83C(void); -s32 func_8013D8DC(s8 arg0, GlobalContext* globalCtx); -s8 func_8013D924(s32 arg0, GlobalContext* globalCtx); +s32 func_8013BD40(Actor* actor, Path* path, s32 arg2); +Path* func_8013BEDC(GlobalContext* globalCtx, u8 arg1, u8 arg2, s32* arg3); +s32 func_8013C068(Path* path, s32 arg1, Vec3f* arg2, f32 arg3, s32 arg4); +s32 func_8013C624(Actor* actor, Path* path, s32* arg2, f32* arg3, s32 arg4, s32 arg5); +s32 func_8013C8B8(Path* path, s32 arg1, Vec3f* arg2); +s32 func_8013C964(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, s32 arg4, s32 arg5); +void func_8013CC2C(s32 arg0, s32 arg1, u8* arg2, s32 arg3); +void func_8013CD64(Vec3f* arg0, Vec3f* arg1, u8* arg2, f32 arg3, u8 arg4, u8* arg5, s8* arg6); +void func_8013CF04(Actor* actor, GraphicsContext** gfxCtxPtr, u8* arg2); +s16 func_8013D0E0(s16* arg0, s16 arg1, s16 arg2, f32 arg3, f32 arg4, f32 arg5); +s32 func_8013D2E0(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, Vec3s* arg3, Vec3s* arg4, Vec3s* arg5, u16* arg6); +s32 func_8013D5E8(s16 arg0, s16 arg1, s16 arg2); +Path* func_8013D648(GlobalContext* globalCtx, s16 arg1, s16 arg2); +s32 func_8013D68C(Path* path, s32 arg1, Vec3f* arg2); +s16 func_8013D720(Vec3f* arg0, Vec3f* arg1, f32* arg2); +s32 func_8013D768(Actor* actor, Vec3f* arg1, s16 arg2); +s16 func_8013D83C(Path* path, s32 pointIdx, Vec3f* pos, f32* distSq); +s8 func_8013D8DC(s8 arg0, GlobalContext* globalCtx); +s8 func_8013D924(s16 arg0, GlobalContext* globalCtx); Actor* func_ActorCategoryIterateById(GlobalContext* globalCtx, Actor* actorListStart, u8 actorCategory, s16 actorId); -void func_8013D9C8(GlobalContext* globalCtx, s16* arg1, s16* arg2, UNK_TYPE arg3); -u8 func_8013DB90(GlobalContext* globalCtx, UNK_PTR arg1, f32 arg2); -// void func_8013DC40(void); -void func_8013DCE0(GlobalContext* globalCtx, Vec3f* param_2, Actor* actor, EnDno_ActorUnkStruct* param_4, Path* param_5, s32 param_6, s32 param_7, s32 param_8, s32 param_9, s32 param_10); -void func_8013DE04(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1, EnDno_ActorUnkFunc arg2, EnDno_ActorUnkFunc arg3, EnDno_ActorUnkFunc arg4, EnDno_ActorUnkFunc arg5); -s32 func_8013DF3C(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1); -// void func_8013E054(void); -// void func_8013E07C(void); -s32 func_8013E0A4(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1); +s32 func_8013D9C8(GlobalContext* globalCtx, s16* arg1, s16* arg2, s32 arg3); +u8 func_8013DB90(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2); +s32 func_8013DC40(Path* arg0, s32 arg1, s32 arg2, Vec3f* arg3); +void func_8013DCE0(GlobalContext* globalCtx, Vec3f* arg1, Actor* arg2, struct_8013DF3C_arg1* arg3, Path* arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, u8 arg9); +s32 func_8013DE04(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1, struct_8013DF3C_arg1_unk_func1 arg2, struct_8013DF3C_arg1_unk_func2 arg3, struct_8013DF3C_arg1_unk_func2 arg4, struct_8013DF3C_arg1_unk_func2 arg5); +void func_8013DF3C(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1); +s32 func_8013E054(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1); +s32 func_8013E07C(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1); +s32 func_8013E0A4(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1); void func_8013E1C8(SkelAnime* skelAnime, struct_80B8E1A8 animations[], s32 animationIndex, s32* actorAnimationIndex); -s32 func_8013E2D4(Actor* actor, s16 arg1, s32 arg2, s32 arg3); -s32 func_8013E3B8(Actor* actor, s16 cutscenes[], s32 cutsceneArrayLen); -// void func_8013E4B0(void); -s32 func_8013E5CC(Vec3f* param_1, Vec3s* param_2, Vec3f* param_3, Vec3f* param_4, Vec3f* param_5, Vec3f* param_6); -// void func_8013E640(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7); -// void func_8013E748(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_8013E7C0(void); -// void func_8013E8F8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7); -s32 func_8013E950(Vec3f* param_1, Vec3f* param_2, s16 param_3, Vec3f* param_4, Vec3f* param_5, s16* param_6, s16* param_7, s16* param_8, s16* param_9, u16 param_10, u16 param_11, u16 param_12, u16 param_13); +s32 func_8013E2D4(Actor* actor, s16 arg1, s16 arg2, s32 arg3); +s32 func_8013E3B8(Actor* actor, s16 cutscenes[], s16 len); +void func_8013E4B0(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, Plane* plane); +s32 func_8013E5CC(Vec3f* arg0, Vec3s* arg1, Vec3f* arg2, Vec3f* arg3, Vec3f* arg4, Vec3f* arg5); +Actor* func_8013E640(GlobalContext* globalCtx, Actor* arg1, Actor* actorListStart, u8 actorCategory, s16 actorId, void* arg5, func_8013E640_arg6 arg6); +s32 func_8013E748(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, s32 arg4, Vec3s* arg5, func_8013E748_arg6 arg6); +s32 func_8013E7C0(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2); +void func_8013E8F8(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, s32 arg4, s16 arg5, s16 arg6); +s32 func_8013E950(Vec3f* arg0, Vec3f* arg1, s16 arg2, Vec3f* arg3, Vec3f* arg4, s16* arg5, s16* arg6, s16* arg7, s16* arg8, u16 arg9, u16 arg10, u16 arg11, u16 arg12); // void func_8013EC10(void); void func_8013EC44(f32 arg0, u8 arg1, u8 arg2, u8 arg3); void func_8013ECE0(f32 xyzDistToPlayerSq, u8 arg1, u8 arg2, u8 arg3); diff --git a/include/z64.h b/include/z64.h index 2425f47be3..bf430d1431 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1567,6 +1567,38 @@ typedef struct { /* 0x8 */ s32 unk8; } struct_80133038_arg2; // size = 0xC +typedef s32 (*func_8013E748_arg6)(struct GlobalContext*, Actor*, Vec3s*); + +typedef s32 (*func_8013E640_arg6)(struct GlobalContext*, Actor*, Actor*, void*); + +struct struct_8013DF3C_arg1; +typedef void (*struct_8013DF3C_arg1_unk_func1)(struct GlobalContext*, struct struct_8013DF3C_arg1*); +typedef s32 (*struct_8013DF3C_arg1_unk_func2)(struct GlobalContext*, struct struct_8013DF3C_arg1*); + +typedef struct struct_8013DF3C_arg1 { + /* 0x00 */ Path* setupPathList; + /* 0x04 */ s32 pathIndex; + /* 0x08 */ Vec3s* points; + /* 0x0C */ s32 count; + /* 0x10 */ s32 unk_10; + /* 0x14 */ s32 unk_14; + /* 0x18 */ s32 unk_18; + /* 0x1C */ u8 unk_1C; + /* 0x1D */ u8 unk_1D; + /* 0x20 */ Vec3f unk_20; + /* 0x2C */ Vec3f unk_2C; + /* 0x38 */ Vec3f unk_38; + /* 0x44 */ Vec3f* unk_44; + /* 0x48 */ Actor* actor; + /* 0x4C */ f32 unk_4C; + /* 0x50 */ f32 unk_50; + /* 0x54 */ Vec3s unk_54; + /* 0x5C */ struct_8013DF3C_arg1_unk_func1 unk_5C; + /* 0x60 */ struct_8013DF3C_arg1_unk_func2 unk_60; + /* 0x64 */ struct_8013DF3C_arg1_unk_func2 unk_64; + /* 0x68 */ struct_8013DF3C_arg1_unk_func2 unk_68; +} struct_8013DF3C_arg1; // size = 0x6C + typedef struct { /* 0x00 */ u32 type; /* 0x04 */ u32 setScissor; diff --git a/include/z64actor.h b/include/z64actor.h index 7923e3da95..2b35bec243 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -76,32 +76,6 @@ typedef struct { /* 0x3A */ s16 unk3A; } ActorEnTest20C; // size = 0x3C -struct EnDno_ActorUnkStruct; -typedef s32 (*EnDno_ActorUnkFunc)(struct GlobalContext*, struct EnDno_ActorUnkStruct*); - -typedef struct EnDno_ActorUnkStruct { - /* 0x00 */ Vec3f unk_00; - /* 0x0C */ UNK_TYPE1 unk_0C[0x4]; - /* 0x10 */ s16 unk_10; - /* 0x12 */ UNK_TYPE1 unk_12[0xA]; - /* 0x1C */ u8 unk_1C; - /* 0x1D */ u8 unk_1D; - /* 0x20 */ Vec3f unk_20; - /* 0x2C */ Vec3f unk_2C; - /* 0x38 */ Vec3f unk_38; - /* 0x44 */ UNK_TYPE1 unk_44[0x4]; - /* 0x48 */ struct Actor* unk_48; - /* 0x4C */ f32 unk_4C; - /* 0x50 */ f32 unk_50; - /* 0x54 */ s16 unk_54; - /* 0x56 */ s16 unk_56; - /* 0x58 */ s32 unk_58; - /* 0x5C */ EnDno_ActorUnkFunc unk_5C; - /* 0x60 */ EnDno_ActorUnkFunc unk_60; - /* 0x64 */ EnDno_ActorUnkFunc unk_64; - /* 0x68 */ EnDno_ActorUnkFunc unk_68; -} EnDno_ActorUnkStruct; // size >= 0x6C - typedef struct { /* 0x00 */ s16 id; /* 0x02 */ u8 type; diff --git a/include/z64animation.h b/include/z64animation.h index 2eed33ffda..abd95423bd 100644 --- a/include/z64animation.h +++ b/include/z64animation.h @@ -213,7 +213,9 @@ typedef s32 (*OverrideLimbDrawFlex)(struct GlobalContext* globalCtx, s32 limbInd typedef void (*PostLimbDrawFlex)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList1, Gfx** dList2, Vec3s* rot, struct Actor* actor); -typedef void (*UnkActorDraw)(struct GlobalContext* globalCtx, s32 limbIndex, struct Actor* actor); +typedef void (*UnkActorDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, struct Actor* actor); + +typedef void (*UnkActorDraw)(struct GlobalContext* globalCtx, s32 limbIndex, struct Actor* actor, Gfx** gfx); typedef void (*AnimationEntryCallback)(struct GlobalContext*, AnimationEntryData*); diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index ad3e93a5fc..7f79bb51c3 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -474,7 +474,7 @@ void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* joi } void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable, - OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDraw unkDraw, + OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw, Actor* actor, Mtx** mtx) { StandardLimb* limb; Gfx* newDList; @@ -538,7 +538,7 @@ void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec } void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, - OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDraw unkDraw, + OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw, Actor* actor) { StandardLimb* rootLimb; s32 pad; diff --git a/src/overlays/actors/ovl_En_Dno/z_en_dno.c b/src/overlays/actors/ovl_En_Dno/z_en_dno.c index a99777edaa..3fe0b02998 100644 --- a/src/overlays/actors/ovl_En_Dno/z_en_dno.c +++ b/src/overlays/actors/ovl_En_Dno/z_en_dno.c @@ -709,8 +709,8 @@ void func_80A72C04(EnDno* this, GlobalContext* globalCtx) { func_8013DCE0(globalCtx, &this->unk_334, &this->actor, &this->unk_340, globalCtx->setupPathList, ENDNO_GET_7F(&this->actor), 1, 0, 1, 0); func_8013DF3C(globalCtx, &this->unk_340); - this->actor.world.rot.y = this->unk_340.unk_56; - this->actor.world.rot.x = this->unk_340.unk_54; + this->actor.world.rot.y = this->unk_340.unk_54.y; + this->actor.world.rot.x = this->unk_340.unk_54.x; Actor_SetSwitchFlag(globalCtx, ENDNO_GET_3F80(&this->actor)); this->actionFunc = func_80A730A0; } @@ -721,8 +721,8 @@ void func_80A72CF8(EnDno* this, GlobalContext* globalCtx) { this->actor.floorHeight, this->actor.world.pos.z, 0, 0, 0, 0x201); } -s32 func_80A72D8C(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1) { - Actor* actor = arg1->unk_48; +s32 func_80A72D8C(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1) { + Actor* actor = arg1->actor; s32 pad; s32 ret = false; f32 sp38; @@ -748,21 +748,21 @@ s32 func_80A72D8C(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1) { ret = true; } else { sp38 = actor->speedXZ / sqrtf(arg1->unk_4C); - sp2C = ABS(arg1->unk_54 - actor->world.rot.x); + sp2C = ABS(arg1->unk_54.x - actor->world.rot.x); temp_v0_2 = sp2C; temp_v0_2 *= sp38; temp_v0_2 += 0x71C; - sp2C = ABS(arg1->unk_56 - actor->world.rot.y); + sp2C = ABS(arg1->unk_54.y - actor->world.rot.y); - Math_ScaledStepToS(&actor->world.rot.x, arg1->unk_54, temp_v0_2); - Math_ScaledStepToS(&actor->world.rot.y, arg1->unk_56, (s32)(sp2C * sp38) + 0x71C); + Math_ScaledStepToS(&actor->world.rot.x, arg1->unk_54.x, temp_v0_2); + Math_ScaledStepToS(&actor->world.rot.y, arg1->unk_54.y, (s32)(sp2C * sp38) + 0x71C); } return ret; } -s32 func_80A72FAC(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1) { - Actor* actor = arg1->unk_48; +s32 func_80A72FAC(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1) { + Actor* actor = arg1->actor; EnDno* dno = (EnDno*)actor; f32 sp24 = Math_CosS(-actor->world.rot.x) * actor->speedXZ; f32 sp20 = gFramerateDivisorHalf; diff --git a/src/overlays/actors/ovl_En_Dno/z_en_dno.h b/src/overlays/actors/ovl_En_Dno/z_en_dno.h index 1f7bff87f2..ed9ee52c64 100644 --- a/src/overlays/actors/ovl_En_Dno/z_en_dno.h +++ b/src/overlays/actors/ovl_En_Dno/z_en_dno.h @@ -34,7 +34,7 @@ typedef struct EnDno { /* 0x32C */ s32 unk_32C; /* 0x330 */ UNK_TYPE1 unk_330[0x4]; /* 0x334 */ Vec3f unk_334; - /* 0x340 */ EnDno_ActorUnkStruct unk_340; + /* 0x340 */ struct_8013DF3C_arg1 unk_340; /* 0x3AC */ s16 unk_3AC; /* 0x3AE */ s16 unk_3AE; /* 0x3B0 */ u16 unk_3B0; diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 381dd693f8..194780688e 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -187,7 +187,7 @@ static ActorAnimationEntryS sAnimations[] = { { &D_0601B3C4, 0.0f, 0, -1, 2, 0 }, { &D_0601B3C4, 1.0f, 0, -1, 0, -4 }, { &D_06019EB4, 1.0f, 0, -1, 2, -4 }, }; -static s16 D_808F6C0C[] = { +static u16 D_808F6C0C[] = { 4000, 4, 1, 3, 6000, 4, 1, 6, 4000, 4, 1, 3, 6000, 4, 1, 6, }; @@ -215,11 +215,11 @@ s32 func_808F3178(EnIn* this, GlobalContext* globalCtx) { this->unk260 = tmp = func_8013DB90(globalCtx, &this->unk248, -6.0f); if (this->unk260 != 0 && prevUnk260 == 0 && tmp & 0xFF) { - Audio_PlayActorSound2(&this->actor, 0x802); + Audio_PlayActorSound2(&this->actor, NA_SE_PL_WALK_CONCRETE); } this->unk261 = tmp = func_8013DB90(globalCtx, &this->unk254, -6.0f); if (this->unk261 != 0 && prevUnk261 == 0 && tmp & 0xFF) { - Audio_PlayActorSound2(&this->actor, 0x802); + Audio_PlayActorSound2(&this->actor, NA_SE_PL_WALK_CONCRETE); } return 0; } @@ -285,15 +285,15 @@ void func_808F3414(EnIn* this, GlobalContext* globalCtx) { sp30.x = player->actor.world.pos.x; sp30.y = player->bodyPartsPos[7].y + 3.0f; sp30.z = player->actor.world.pos.z; - func_8013D2E0(&sp30, &this->actor.focus, &this->actor.shape, &this->unk352, &this->unk358, &this->unk35E, - D_808F6C0C); + func_8013D2E0(&sp30, &this->actor.focus.pos, &this->actor.shape.rot, &this->unk352, &this->unk358, + &this->unk35E, D_808F6C0C); } else { - Math_SmoothStepToS(&this->unk352, 0, 4, 1000, 1); - Math_SmoothStepToS(&this->unk354, 0, 4, 1000, 1); - Math_SmoothStepToS(&this->unk358, 0, 4, 1000, 1); - Math_SmoothStepToS(&this->unk35A, 0, 4, 1000, 1); - Math_SmoothStepToS(&this->unk35E, 0, 4, 1000, 1); - Math_SmoothStepToS(&this->unk360, 0, 4, 1000, 1); + Math_SmoothStepToS(&this->unk352.x, 0, 4, 1000, 1); + Math_SmoothStepToS(&this->unk352.y, 0, 4, 1000, 1); + Math_SmoothStepToS(&this->unk358.x, 0, 4, 1000, 1); + Math_SmoothStepToS(&this->unk358.y, 0, 4, 1000, 1); + Math_SmoothStepToS(&this->unk35E.x, 0, 4, 1000, 1); + Math_SmoothStepToS(&this->unk35E.y, 0, 4, 1000, 1); } func_808F322C(this, 3); func_808F3178(this, globalCtx); @@ -330,7 +330,7 @@ void func_808F3618(EnIn* this, GlobalContext* globalCtx) { void func_808F3690(EnIn* this, GlobalContext* globalCtx) { s16 sp36; - Vec3f sp28; // unsure if Vec3f, but it is probably size 0xC + Vec3f sp28; Math_SmoothStepToF(&this->actor.speedXZ, 1.0f, 0.4f, 1000.0f, 0.0f); sp36 = this->actor.speedXZ * 400.0f; @@ -1566,14 +1566,14 @@ s32 EnIn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, if (limbIndex == 16) { Matrix_InsertTranslation(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY); - Matrix_InsertXRotation_s(this->unk35A, MTXMODE_APPLY); - Matrix_InsertZRotation_s(-this->unk358, MTXMODE_APPLY); + Matrix_InsertXRotation_s(this->unk358.y, MTXMODE_APPLY); + Matrix_InsertZRotation_s(-this->unk358.x, MTXMODE_APPLY); Matrix_InsertTranslation(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY); func_808F6334(this, globalCtx); } if (limbIndex == 9) { - Matrix_RotateY(this->unk360, MTXMODE_APPLY); - Matrix_InsertXRotation_s(this->unk35E, MTXMODE_APPLY); + Matrix_RotateY(this->unk35E.y, MTXMODE_APPLY); + Matrix_InsertXRotation_s(this->unk35E.x, MTXMODE_APPLY); } if (limbIndex == 9 || limbIndex == 10 || limbIndex == 13) { rot->y += (s16)(Math_SinS(this->unk376[limbIndex]) * 200.0f); diff --git a/src/overlays/actors/ovl_En_In/z_en_in.h b/src/overlays/actors/ovl_En_In/z_en_in.h index ca67df4311..0a6f4be750 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.h +++ b/src/overlays/actors/ovl_En_In/z_en_in.h @@ -36,15 +36,10 @@ typedef struct EnIn { /* 0x261 */ u8 unk261; /* 0x262 */ Vec3s jointTable[20]; /* 0x2DA */ Vec3s morphTable[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]; + /* 0x352 */ Vec3s unk352; + /* 0x358 */ Vec3s unk358; + /* 0x35E */ Vec3s unk35E; + /* 0x364 */ char unk364[0x12]; /* 0x376 */ s16 unk376[20]; /* 0x39E */ s16 unk39E[20]; /* 0x3C6 */ char unk3C6[0xBC]; diff --git a/src/overlays/actors/ovl_En_Ot/z_en_ot.c b/src/overlays/actors/ovl_En_Ot/z_en_ot.c index b47fc80253..5018a6bc2d 100644 --- a/src/overlays/actors/ovl_En_Ot/z_en_ot.c +++ b/src/overlays/actors/ovl_En_Ot/z_en_ot.c @@ -822,9 +822,9 @@ void func_80B5D160(EnOt* this, GlobalContext* globalCtx) { } } -s32 func_80B5D37C(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1) { +s32 func_80B5D37C(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1) { s32 pad; - EnOt* temp_s0 = (EnOt*)arg1->unk_48; + EnOt* temp_s0 = (EnOt*)arg1->actor; f32 sp24; f32 sp20; @@ -843,10 +843,10 @@ s32 func_80B5D37C(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1) { return false; } -s32 func_80B5D470(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1) { +s32 func_80B5D470(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1) { s32 pad; s32 ret; - Actor* temp_s1 = arg1->unk_48; + Actor* temp_s1 = arg1->actor; Vec3f sp50; Vec3f sp44; f32 temp; @@ -871,14 +871,14 @@ s32 func_80B5D470(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1) { ret = true; } else { temp = SQ(temp_s1->speedXZ) / arg1->unk_50; - sp34 = ABS(arg1->unk_54 - temp_s1->world.rot.x); + sp34 = ABS(arg1->unk_54.x - temp_s1->world.rot.x); sp2C = (s32)(sp34 * temp) + 0xAAA; - sp34 = ABS(arg1->unk_56 - temp_s1->world.rot.y); + sp34 = ABS(arg1->unk_54.y - temp_s1->world.rot.y); - Math_SmoothStepToS(&temp_s1->world.rot.x, arg1->unk_54, 1, sp2C, 0); + Math_SmoothStepToS(&temp_s1->world.rot.x, arg1->unk_54.x, 1, sp2C, 0); sp2C = (s32)(sp34 * temp) + 0xAAA; - Math_SmoothStepToS(&temp_s1->world.rot.y, arg1->unk_56, 1, sp2C, 0); + Math_SmoothStepToS(&temp_s1->world.rot.y, arg1->unk_54.y, 1, sp2C, 0); Math_SmoothStepToS(&temp_s1->shape.rot.y, temp_s1->world.rot.y, 2, sp2C, 0); } diff --git a/src/overlays/actors/ovl_En_Ot/z_en_ot.h b/src/overlays/actors/ovl_En_Ot/z_en_ot.h index f0adb73e47..3a52b48c6c 100644 --- a/src/overlays/actors/ovl_En_Ot/z_en_ot.h +++ b/src/overlays/actors/ovl_En_Ot/z_en_ot.h @@ -36,7 +36,7 @@ typedef struct EnOt { /* 0x01D8 */ Vec3s jointTable[19]; /* 0x024A */ Vec3s morphTable[19]; /* 0x02BC */ s32 animIdx; - /* 0x02C0 */ EnDno_ActorUnkStruct unk_2C0; + /* 0x02C0 */ struct_8013DF3C_arg1 unk_2C0; /* 0x032C */ u16 unk_32C; /* 0x0330 */ Vec3f unk_330; /* 0x033C */ s32 unk_33C; diff --git a/src/overlays/actors/ovl_En_Pm/z_en_pm.c b/src/overlays/actors/ovl_En_Pm/z_en_pm.c index 55b888a535..62749bf09e 100644 --- a/src/overlays/actors/ovl_En_Pm/z_en_pm.c +++ b/src/overlays/actors/ovl_En_Pm/z_en_pm.c @@ -1854,7 +1854,8 @@ void func_80AFAA44(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* } } -void func_80AFABAC(GlobalContext* globalCtx, s32 arg1, EnPm* this, Gfx** gfx) { +void func_80AFABAC(GlobalContext* globalCtx, s32 arg1, Actor* thisx, Gfx** gfx) { + EnPm* this = THIS; s32 phi_v0; s32 phi_v1; diff --git a/src/overlays/actors/ovl_En_Pm/z_en_pm.h b/src/overlays/actors/ovl_En_Pm/z_en_pm.h index 0261221d73..d571f43bd6 100644 --- a/src/overlays/actors/ovl_En_Pm/z_en_pm.h +++ b/src/overlays/actors/ovl_En_Pm/z_en_pm.h @@ -18,7 +18,7 @@ typedef struct EnPm { /* 0x01DC */ ColliderSphere colliderSphere; /* 0x0234 */ Path* unk_234; /* 0x0238 */ Vec3f unk_238; - /* 0x0244 */ s32 unk_244; + /* 0x0244 */ f32 unk_244; /* 0x0248 */ s32 unk_248; /* 0x024C */ s32 unk_24C; /* 0x0250 */ s32 unk_250; diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index 3a8db78397..fcf86fdcd2 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -126,7 +126,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(1, 0xE), }; -static s16 D_80BAE800[] = { +static u16 D_80BAE800[] = { 4000, 4, 1, 3, 6000, 4, 1, 6, 4000, 4, 1, 3, 6000, 4, 1, 6, }; @@ -496,15 +496,15 @@ void func_80BAB4F0(EnSuttari* this, GlobalContext* globalCtx) { sp30.x = player->actor.world.pos.x; sp30.y = player->bodyPartsPos[7].y + 3.0f; sp30.z = player->actor.world.pos.z; - func_8013D2E0(&sp30, &this->actor.focus, &this->actor.shape, &this->unk2D6, &this->unk2DC, &this->unk2E2, - D_80BAE800); + func_8013D2E0(&sp30, &this->actor.focus.pos, &this->actor.shape.rot, &this->unk2D6, &this->unk2DC, + &this->unk2E2, D_80BAE800); } else { - Math_SmoothStepToS(&this->unk2D6, 0, 4, 0x3E8, 1); - Math_SmoothStepToS(&this->unk2D8, 0, 4, 0x3E8, 1); - Math_SmoothStepToS(&this->unk2DC, 0, 4, 0x3E8, 1); - Math_SmoothStepToS(&this->unk2DE, 0, 4, 0x3E8, 1); - Math_SmoothStepToS(&this->unk2E2, 0, 4, 0x3E8, 1); - Math_SmoothStepToS(&this->unk2E4, 0, 4, 0x3E8, 1); + Math_SmoothStepToS(&this->unk2D6.x, 0, 4, 0x3E8, 1); + Math_SmoothStepToS(&this->unk2D6.y, 0, 4, 0x3E8, 1); + Math_SmoothStepToS(&this->unk2DC.x, 0, 4, 0x3E8, 1); + Math_SmoothStepToS(&this->unk2DC.y, 0, 4, 0x3E8, 1); + Math_SmoothStepToS(&this->unk2E2.x, 0, 4, 0x3E8, 1); + Math_SmoothStepToS(&this->unk2E2.y, 0, 4, 0x3E8, 1); } } func_8013D9C8(globalCtx, this->unk2FA, this->unk31A, 16); @@ -530,29 +530,26 @@ s16 func_80BAB698(Path* path, s32 idx, Vec3f* pos, f32* distSQ) { s32 func_80BAB758(EnSuttari* this, Path* path, s32 arg2) { Vec3s* sp5C = Lib_SegmentedToVirtual(path->points); - s32 sp58; + s32 sp58 = path->count; + s32 idx = arg2; + s32 ret = false; f32 sp54; - s32 ret; - s32 pad4C; f32 sp48; f32 sp44; f32 sp40; f32 sp3C; Vec3f sp30; - if (sp5C[arg2].x) {} - sp58 = path->count; - ret = false; - Math_Vec3s_ToVec3f(&sp30, &sp5C[arg2]); - if (arg2 == 0) { + Math_Vec3s_ToVec3f(&sp30, &sp5C[idx]); + if (idx == 0) { sp54 = sp5C[1].x - sp5C[0].x; sp48 = sp5C[1].z - sp5C[0].z; - } else if (arg2 == sp58 - 1) { + } else if (idx == sp58 - 1) { sp54 = sp5C[sp58 - 1].x - sp5C[sp58 - 2].x; sp48 = sp5C[sp58 - 1].z - sp5C[sp58 - 2].z; } else { - sp54 = sp5C[arg2 + 1].x - sp5C[arg2 - 1].x; - sp48 = sp5C[arg2 + 1].z - sp5C[arg2 - 1].z; + sp54 = sp5C[idx + 1].x - sp5C[idx - 1].x; + sp48 = sp5C[idx + 1].z - sp5C[idx - 1].z; } func_8017B7F8(&sp30, RADF_TO_BINANG(func_80086B30(sp54, sp48)), &sp44, &sp40, &sp3C); if (((sp44 * this->actor.world.pos.x) + (sp40 * this->actor.world.pos.z) + sp3C) > 0.0f) { @@ -987,12 +984,12 @@ void func_80BACA14(EnSuttari* this, GlobalContext* globalCtx) { func_80BAB434(this); if (player->transformation == PLAYER_FORM_GORON || player->transformation == PLAYER_FORM_ZORA) { if (this->actor.playerHeightRel < 60.0f && this->actor.xzDistToPlayer < 500.0f) { - this->unk3F2 = this->unk2DE; + this->unk3F2 = this->unk2DC.y; this->actionFunc = func_80BACBB0; } } else if ((player->transformation == PLAYER_FORM_HUMAN) && CUR_EQUIP_VALUE_VOID(EQUIP_SWORD) != 0) { if (func_800B84D0(&this->actor, globalCtx)) { - this->unk3F2 = this->unk2DE; + this->unk3F2 = this->unk2DC.y; func_80BAAB78(this, globalCtx); this->actionFunc = func_80BADA9C; } else if (this->actor.xzDistToPlayer < 200.0f) { @@ -1007,7 +1004,7 @@ void func_80BACBB0(EnSuttari* this, GlobalContext* globalCtx) { Player* player = GET_PLAYER(globalCtx); s16 target; - this->unk3F2 = this->unk2DE; + this->unk3F2 = this->unk2DC.y; if (player->transformation == PLAYER_FORM_HUMAN || player->transformation == PLAYER_FORM_DEKU) { this->actionFunc = func_80BACA14; } @@ -1037,7 +1034,7 @@ void func_80BACBB0(EnSuttari* this, GlobalContext* globalCtx) { void func_80BACD2C(EnSuttari* this, GlobalContext* globalCtx) { Player* player = GET_PLAYER(globalCtx); - this->unk3F2 = this->unk2DE; + this->unk3F2 = this->unk2DC.y; if (player->transformation == PLAYER_FORM_HUMAN || player->transformation == PLAYER_FORM_DEKU) { this->actionFunc = func_80BACA14; } @@ -1207,7 +1204,7 @@ void func_80BAD380(EnSuttari* this, GlobalContext* globalCtx) { this->flags2 |= 4; EnSuttari_SetNextEntrance(globalCtx, 0xD670); } else { - this->unk3F2 = this->unk2DE; + this->unk3F2 = this->unk2DC.y; Math_ApproachF(&this->actor.speedXZ, 4.0f, 0.2f, 0.5f); Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor); func_80BAB374(this, globalCtx); @@ -1307,7 +1304,7 @@ void func_80BADA9C(EnSuttari* this, GlobalContext* globalCtx) { s16 frameCount = Animation_GetLastFrame(sAnimations[this->animationIdx].animation); if (this->flags1 & 1) { - this->unk3F2 = this->unk2DE; + this->unk3F2 = this->unk2DC.y; func_80BAA9B4(this); } else if ((this->animationIdx == 7) && (curFrame == frameCount)) { this->animationIdx = 1; @@ -1383,14 +1380,14 @@ void func_80BADE14(EnSuttari* this, GlobalContext* globalCtx) { if (this->unk1F4[1] == -0x63) { this->actor.speedXZ = 0.0f; } else { - this->unk3F2 = this->unk2DE; + this->unk3F2 = this->unk2DC.y; Math_ApproachF(&this->actor.speedXZ, 6.0f, 0.2f, 0.5f); } Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor); } void func_80BADE8C(EnSuttari* this, GlobalContext* globalCtx) { - this->unk3F2 = this->unk2DE; + this->unk3F2 = this->unk2DC.y; Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0); if (func_800B84D0(&this->actor, globalCtx)) { this->actor.flags &= ~0x10000; @@ -1407,7 +1404,7 @@ void func_80BADF3C(EnSuttari* this, GlobalContext* globalCtx) { if (this->unk1F4[0] == -0x63) { Actor_MarkForDeath(&this->actor); } - this->unk3F2 = this->unk2DE; + this->unk3F2 = this->unk2DC.y; if (DECR(this->unk3F6) == 0) { Math_ApproachF(&this->actor.speedXZ, 6.0f, 0.2f, 0.5f); } @@ -1478,13 +1475,13 @@ s32 EnSuttari_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL if (!(this->flags1 & 4)) { Matrix_InsertTranslation(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY); Matrix_InsertXRotation_s(this->unk3F2, MTXMODE_APPLY); - Matrix_InsertZRotation_s(-this->unk2DC, MTXMODE_APPLY); + Matrix_InsertZRotation_s(-this->unk2DC.x, MTXMODE_APPLY); Matrix_InsertTranslation(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY); } } if (limbIndex == 8) { - Matrix_InsertXRotation_s(-this->unk2E4, MTXMODE_APPLY); - Matrix_InsertZRotation_s(-this->unk2E2, MTXMODE_APPLY); + Matrix_InsertXRotation_s(-this->unk2E2.y, MTXMODE_APPLY); + Matrix_InsertZRotation_s(-this->unk2E2.x, MTXMODE_APPLY); } if (limbIndex == 8 || limbIndex == 9 || limbIndex == 0xC) { rot->y += (s16)(Math_SinS(this->unk2FA[limbIndex]) * 200.0f); diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.h b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.h index 93423fe77c..9c62be60f6 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.h +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.h @@ -27,15 +27,10 @@ typedef struct EnSuttari { /* 0x1FC */ UNK_TYPE1 unk_1FC[0x1A]; /* 0x216 */ Vec3s jointTable[16]; /* 0x276 */ Vec3s morphTable[16]; - /* 0x2D6 */ s16 unk2D6; - /* 0x2D8 */ s16 unk2D8; - /* 0x2DA */ UNK_TYPE1 unk_2DA[0x2]; - /* 0x2DC */ s16 unk2DC; - /* 0x2DE */ s16 unk2DE; - /* 0x2E0 */ UNK_TYPE1 unk_2E0[0x2]; - /* 0x2E2 */ s16 unk2E2; - /* 0x2E4 */ s16 unk2E4; - /* 0x2E6 */ UNK_TYPE1 unk_2E6[0x14]; + /* 0x2D6 */ Vec3s unk2D6; + /* 0x2DC */ Vec3s unk2DC; + /* 0x2E2 */ Vec3s unk2E2; + /* 0x2E8 */ UNK_TYPE1 unk_2E8[0x12]; /* 0x2FA */ s16 unk2FA[16]; /* 0x31A */ s16 unk31A[16]; /* 0x33A */ UNK_TYPE1 unk_33A[0xB6]; @@ -46,7 +41,7 @@ typedef struct EnSuttari { /* 0x3F8 */ Vec3f unk3F8; /* 0x404 */ Path* unk404; /* 0x408 */ Vec3f unk408; - /* 0x414 */ s32 unk414; + /* 0x414 */ f32 unk414; /* 0x418 */ s32 unk418; /* 0x41C */ s32 unk41C; /* 0x420 */ s32 unk420; diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 9cc79183e0..31f4d19226 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -934,7 +934,7 @@ void func_808DAA60(EnSw* this, GlobalContext* globalCtx) { Vec3f sp34; f32 temp_f16; - sp44 = (Vec3s*)Lib_SegmentedToVirtual(this->unk_1E4->unk_04); + sp44 = (Vec3s*)Lib_SegmentedToVirtual(this->unk_1E4->points); sp40 = 0; if (DECR(this->unk_454) == 0) { @@ -1009,7 +1009,7 @@ void func_808DACF4(EnSw* this, GlobalContext* globalCtx) { if ((temp_f6 != 0) && (temp_f6 < (s32)sp4C)) { Math_Vec3f_Copy(&this->actor.world.pos, &this->unk_374); this->unk_4A0 += this->unk_49C; - if ((this->unk_4A0 >= this->unk_1E4->unk_00) || (this->unk_4A0 < 0)) { + if ((this->unk_4A0 >= this->unk_1E4->count) || (this->unk_4A0 < 0)) { this->unk_49C = -this->unk_49C; this->unk_4A0 += this->unk_49C * 2; } diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.h b/src/overlays/actors/ovl_En_Sw/z_en_sw.h index b64b6d02a6..975e4e36d8 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.h +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.h @@ -11,17 +11,12 @@ typedef void (*EnSwActionFunc)(struct EnSw*, GlobalContext*); #define ENSW_GET_3FC(thisx) (((thisx)->params & 0x3FC) >> 2) #define ENSW_GET_FF00(thisx) ((((thisx)->params & 0xFF00) >> 8) & 0xFF) -typedef struct { - u8 unk_00; - s32 unk_04; -} EnSwUnkStruct; - typedef struct EnSw { /* 0x0000 */ Actor actor; /* 0x0144 */ SkelAnime skelAnime; /* 0x0188 */ EnSwActionFunc actionFunc; /* 0x018C */ ColliderSphere collider; - /* 0x01E4 */ EnSwUnkStruct* unk_1E4; + /* 0x01E4 */ Path* unk_1E4; /* 0x01E8 */ Vec3s jointTable[30]; /* 0x029C */ Vec3s morphTable[30]; /* 0x0350 */ Vec3f unk_350;