From aa2d45310dee1f3d9d96a79b836cbc1175d1017b Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Tue, 17 Mar 2020 22:15:19 -0500 Subject: start z_skelanime.c --- src/code/z_skelanime.c | 137 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 126 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index 9b51b29cb..ff51b8f99 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -1,6 +1,8 @@ #include #include +s32 func_800A4478(SkelAnime*,f32,f32); + #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A08A0.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A0B40.s") @@ -21,7 +23,12 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A1FC8.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_GetFrameCount.s") +s32 SkelAnime_GetFrameCount(u32 animation) +{ + u16* virt = (u16*)SEGMENTED_TO_VIRTUAL(animation); + + return (s16)(*virt - 1); +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2044.s") @@ -71,7 +78,23 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A37F0.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3874.s") +typedef struct { + Actor* actor; + SkelAnime* skelAnime; + f32 unk_8; +} UNK_800A3874_A1; +void func_800A54FC(SkelAnime*,Vec3f*,s16); +void func_800A3874(s32 arg0, UNK_800A3874_A1* arg1) +{ + char pad[4]; + Actor* temp_v0 = arg1->actor; + Vec3f pos; + + func_800A54FC(arg1->skelAnime, &pos, temp_v0->shape.rot.y); + temp_v0->posRot.pos.x += pos.x * temp_v0->scale.x; + temp_v0->posRot.pos.y += pos.y * temp_v0->scale.y * arg1->unk_8; + temp_v0->posRot.pos.z += pos.z * temp_v0->scale.z; +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A390C.s") @@ -129,7 +152,9 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A49B0.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_FrameUpdateMatrix.s") +s32 SkelAnime_FrameUpdateMatrix(SkelAnime* skelAnime){ + return skelAnime->mtxUpdate(skelAnime); +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4A20.s") @@ -145,7 +170,10 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4FE4.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_ChangeAnimation.s") +void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, /* 0x10 */ f32 frameCount, /* 0x14 */ u8 unk1, /* 0x18 */ f32 transitionRate) +{ + func_800A4FE4(skelAnime, animation, playbackSpeed, unk0, frameCount, unk1, transitionRate, 0); +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A51E8.s") @@ -167,11 +195,98 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5490.s") +#ifdef NON_MATCHING +void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) +{ + f32 temp_f20; + f32 temp_f20_2; + f32 temp_f22; + f32 temp_f22_2; + f32 temp_f24; + f32 temp_f24_2; + f32 temp_ret; + f32 temp_ret_2; + + if ((skelAnime->unk_35 & 0x10) != 0) + { + pos->z = 0.0f; + pos->x = 0.0f; + } + else + { + + temp_f20 = (f32) *(s16*)(skelAnime->actorDrawTbl); + temp_f22 = (f32) ((s16*)skelAnime->actorDrawTbl)[2]; + temp_f24 = Math_Sins(angle); + temp_ret = Math_Coss(angle); + pos->x = (f32) ((temp_f20 * temp_ret) + (temp_f22 * temp_f24)); + pos->z = (f32) ((temp_f22 * temp_ret) - (temp_f20 * temp_f24)); + temp_f20_2 = (f32) skelAnime->unk_38; + temp_f22_2 = (f32) skelAnime->unk_3C; + temp_f24_2 = Math_Sins(skelAnime->unk_36); + temp_ret_2 = Math_Coss(skelAnime->unk_36); + pos->x -= ((temp_f20_2 * temp_ret_2) + (temp_f22_2 * temp_f24_2)); + pos->z -= ((temp_f22_2 * temp_ret_2) - (temp_f20_2 * temp_f24_2)); + //arg1->unk0 = (f32) (arg1->unk0 - ((temp_f20_2 * temp_ret_2) + (temp_f22_2 * temp_f24_2))); + //arg1->unk8 = (f32) (arg1->unk8 - ((temp_f22_2 * temp_ret_2) - (temp_f20_2 * temp_f24_2))); + } + skelAnime->unk_36 = angle; + skelAnime->unk_38 = *(s16*)(skelAnime->actorDrawTbl); + *(s16*)(skelAnime->actorDrawTbl) = skelAnime->unk_3E; + skelAnime->unk_3C = ((s16*)skelAnime->actorDrawTbl)[2]; + ((s16*)skelAnime->actorDrawTbl)[2] = skelAnime->unk_42; + if ((skelAnime->unk_35 & 2) != 0) + { + if ((skelAnime->unk_35 & 0x10) != 0) + { + pos->y = 0.0f; + } + else + { + pos->y = (f32) ((s16*)skelAnime->actorDrawTbl)[1]; + } + skelAnime->unk_3A = ((s16*)skelAnime->actorDrawTbl)[1]; + ((s16*)skelAnime->actorDrawTbl)[1] = skelAnime->unk_40; + } + else + { + pos->y = 0.0f; + skelAnime->unk_3A = ((s16*)skelAnime->actorDrawTbl)[1]; + } + skelAnime->unk_35 &= ~0x10; +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A54FC.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A56C8.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A56F0.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5774.s") - +#endif + +s32 func_800A56C8(SkelAnime *skelAnime, f32 arg1) +{ + return func_800A4478(skelAnime, arg1, 1.0f); +} + +void func_800A56F0(SkelAnime *skelAnime, s32 arg1) +{ + if (skelAnime->actorDrawTbl != 0) + { + ZeldaArena_FreeDebug(skelAnime->actorDrawTbl, "../z_skelanime.c", 3729); + } + else + { + osSyncPrintf("now_joint あきまへん!!\n"); // now_joint Akimane! ! + } + if (skelAnime->unk_24 != 0) + { + ZeldaArena_FreeDebug(skelAnime->unk_24, "../z_skelanime.c", 3731); + return; + } + osSyncPrintf("morf_joint あきまへん!!\n"); // "morf_joint Akimane !!" +} + +s32 func_800A5774(SkelAnime* skelAnime, Vec3s *dst, Vec3s *src) +{ + s32 i; + for(i = 0; i < skelAnime->limbCount; i++) + { + *dst++ = *src++; + } +} -- cgit v1.2.3 From db5f70ad1cc8477bf7556517517ff5f347c70070 Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Fri, 20 Mar 2020 16:12:26 -0500 Subject: skelanime wip --- src/code/z_skelanime.c | 1390 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 1304 insertions(+), 86 deletions(-) (limited to 'src') diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index ff51b8f99..cf13a38c1 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -2,8 +2,97 @@ #include s32 func_800A4478(SkelAnime*,f32,f32); +void func_800A52F8(SkelAnime* skelAnime, u32 animation); +void func_800A54FC(SkelAnime*,Vec3f*,s16); +s32 func_800A3D70(GlobalContext*,SkelAnime*); +s32 func_800A3E0C(GlobalContext*,SkelAnime*); +void func_800A34DC(GlobalContext*,u8,Vec3s*,Vec3s*,f32); +void func_800A336C(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 limbCount, void* ram); +s32 func_800A4D9C(SkelAnime* skelAnime); +s32 func_800A4EE0(SkelAnime* skelAnime); +s32 func_800A4E38(SkelAnime* skelAnime); +void func_800A1D8C(u32,s32,u8,Vec3s*); +void func_800A2E70(u8,Vec3s*,Vec3s*,Vec3s*,f32); +void func_800A49B0(SkelAnime*); + +typedef struct +{ + u32 limbIndexSeg; + u8 limbCount; + char unk_05[3]; + u8 dListCount; +} SkelAnimeInit; + +//.data +static u32 D_8012A480 = 0; +typedef void (*testfunc)(GlobalContext*,char*); +static testfunc D_8012A484[] = +{ + (testfunc)0x800A3678, + (testfunc)0x800A36A4, + (testfunc)0x800A3714, + (testfunc)0x800A3770, + (testfunc)0x800A37F0, + (testfunc)0x800A3874, +}; + +//.bss +u32 D_801600B0; + +#ifdef NON_MATCHING +void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 arg7) +{ + GraphicsContext* gfxCtx; + Gfx* gfx[3]; + SkelLimbEntry* limbEntry; + Vec3s rot; + Vec3f pos; + Gfx* dList; + + gfxCtx = globalCtx->state.gfxCtx; + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 773); + Matrix_Push(); + limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbIndex++; + rot = actorDrawTable[limbIndex]; + + pos.x = limbEntry->pos.x; + pos.y = limbEntry->pos.y; + pos.z = limbEntry->pos.z; + + dList = &limbEntry->dList[arg7]; + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) + { + func_800D1340(&pos, &rot); + if (dList != NULL) + { + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_skelanime.c", 0x325), G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList); + } + } + + if (appendDlistFunc != NULL) + { + appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor); + } + + if (limbEntry->firstChildIndex != 0xFF) + { + func_800A08A0(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, arg7); + } + + Matrix_Pull(); + if (limbEntry->nextLimbIndex != 0xFF) + { + func_800A08A0(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, arg7); + } + func_800C6B54(&gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x335); +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A08A0.s") +#endif +#undef NON_MATCHING #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A0B40.s") @@ -11,17 +100,376 @@ s32 func_800A4478(SkelAnime*,f32,f32); #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A106C.s") +#ifdef NON_MATCHING +// SkelAnime_DrawLimb +void func_800A1344(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) +{ + GraphicsContext* gfxCtx; + Gfx* gfx[4]; + SkelLimbEntry* limbEntry; + Vec3s rot; + Vec3f pos; + Gfx* dList; + + gfxCtx = globalCtx->state.gfxCtx; + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x434); + Matrix_Push(); + limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbIndex++; + rot = actorDrawTable[limbIndex]; + pos.x = (f32) limbEntry->pos.x; + pos.y = (f32) limbEntry->pos.y; + pos.z = (f32) limbEntry->pos.z; + dList = limbEntry->dList; + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) + { + func_800D1340(&pos, &rot); + if (dList != NULL) + { + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_skelanime.c", 0x44F), G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList); + } + } + + if (appendDlistFunc != NULL) + { + appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor); + } + + if (limbEntry->firstChildIndex != 0xFF) + { + func_800A1344(globalCtx, limbEntry->firstChildIndex, limbTable, + actorDrawTable, updateMtxFunc, appendDlistFunc, actor); + } + + Matrix_Pull(); + + if (limbEntry->nextLimbIndex != 0xFF) + { + func_800A1344(globalCtx, limbEntry->nextLimbIndex, limbTable, + actorDrawTable, updateMtxFunc, appendDlistFunc, actor); + } + + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x461); +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A1344.s") +#endif + +#ifdef NON_MATCHING +void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) +{ + SkelLimbEntry* rootLimb; + Vec3s rot; + Vec3f pos; + Gfx* dList; + GraphicsContext* gfxCtx; + Gfx* gfx[5]; + + if (limbTable == NULL) + { + osSyncPrintf("\x1b[31m"); + osSyncPrintf("Si2_draw():skelがNULLです。\n"); // Si2_draw (): skel is NULL. + osSyncPrintf("\x1b[m"); + return; + } + + gfxCtx = globalCtx->state.gfxCtx; + + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1148); + Matrix_Push(); + rootLimb = SEGMENTED_TO_VIRTUAL(*limbTable); + + pos.x = (f32) actorDrawTable[0].x; + pos.y = (f32) actorDrawTable[0].y; + pos.z = (f32) actorDrawTable[0].z; + + rot = actorDrawTable[1]; + dList = rootLimb->dList; + + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) + { + func_800D1340(&pos, &rot); + if (dList != NULL) + { + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1176), G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList); + } + } + + if (appendDlistFunc != NULL) + { + appendDlistFunc(globalCtx, 1, &dList, &rot, actor); + } + if (rootLimb->firstChildIndex != 0xFF) + { + func_800A1344(globalCtx, rootLimb->firstChildIndex, limbTable, + actorDrawTable, updateMtxFunc, appendDlistFunc, actor); + } + + Matrix_Pull(); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1190); +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_Draw.s") +#endif + +#ifdef NON_MATCHING +// SkelAnime_Draw2Limb +void func_800A180C(GlobalContext *globalCtx, u32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, Mtx** limbMatricies) +{ + Gfx* limbDlist[2]; + Vec3f limbPos; + Vec3s limbRot; + GraphicsContext *gfxCtx; + Gfx* sp34[3]; + SkelLimbEntry* limbEntry; + + gfxCtx = globalCtx->state.gfxCtx; + func_800C6AC4(sp34, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x4BE); + Matrix_Push(); + limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbRot = actorDrawTable[++limbIndex]; + + limbPos.x = (f32) limbEntry->pos.x; + limbPos.y = (f32) limbEntry->pos.y; + limbPos.z = (f32) limbEntry->pos.z; + + limbDlist[0] = limbEntry->dList; + limbDlist[1] = limbEntry->dList; + + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &limbDlist[0], &limbPos, &limbRot, actor) == 0)) + { + func_800D1340(&limbPos, &limbRot); + if (limbDlist[0] != NULL) + { + Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 0x4DA); + gSPMatrix(gfxCtx->polyOpa.p++, *limbMatricies, G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, &limbDlist[0]); + (*limbMatricies)++; + } + else + { + if (&limbDlist[1] != 0) + { + Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 0x4E1); + (*limbMatricies)++; + } + } + } + + if (appendDlistFunc != NULL) + { + appendDlistFunc(globalCtx, limbIndex, &limbDlist[1], &limbRot, actor); + } + + if (limbEntry->firstChildIndex != 0xFF) + { + func_800A180C(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, limbMatricies); + } + + Matrix_Pull(); + + if (limbEntry->nextLimbIndex != 0xFF) + { + func_800A180C(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, + updateMtxFunc, appendDlistFunc, actor, limbMatricies); + } + func_800C6B54(sp34, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x4F1); +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A180C.s") +#endif + +#ifdef NON_MATCHING +// SkelAnime_Draw2 +void func_800A1AC8(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, u32 dListCount, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) +{ + SkelLimbEntry *rootLimb; + Gfx* skelDlist[2]; + Vec3f pos; + Vec3s rot; + GraphicsContext* gfxCtx; + Mtx* limbMatricies; + Gfx *gfx[5]; + + limbMatricies = Graph_Alloc(globalCtx->state.gfxCtx, dListCount << 6); + + if (limbTable == NULL) + { + osSyncPrintf("\x1b[31m"); + osSyncPrintf("Si2_draw_SV():skelがNULLです。\n"); //Si2_draw_SV (): skel is NULL. + osSyncPrintf("\x1b[m"); + return; + } + + gfxCtx = globalCtx->state.gfxCtx; + + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1294); + + gSPSegment(gfxCtx->polyOpa.p++, 0xD, limbMatricies); + Matrix_Push(); + rootLimb = SEGMENTED_TO_VIRTUAL(*limbTable); + + pos.x = (f32) actorDrawTable[0].x; + pos.y = (f32) actorDrawTable[0].y; + pos.z = (f32) actorDrawTable[0].z; + + rot = actorDrawTable[1]; + + skelDlist[0] = skelDlist[1] = rootLimb->dList; + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &skelDlist[0], &pos, &rot, actor) == 0)) + { + func_800D1340(&pos, &rot); + if (skelDlist[0] != NULL) + { + Matrix_ToMtx(limbMatricies, "../z_skelanime.c", 1327); + gSPMatrix(gfxCtx->polyOpa.p++, limbMatricies, G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, skelDlist[0]); + limbMatricies++; + } + else + { + if (skelDlist[1] != 0) + { + Matrix_ToMtx(limbMatricies, "../z_skelanime.c", 1334); + limbMatricies++; + } + } + } + + if (appendDlistFunc != 0) + { + appendDlistFunc(globalCtx, 1, &skelDlist[1], &rot, actor); + } + + if (rootLimb->firstChildIndex != 0xFF) + { + func_800A180C(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, + updateMtxFunc, appendDlistFunc, actor, &limbMatricies); + } + + Matrix_Pull(); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1347); +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A1AC8.s") +#endif +#undef NON_MATCHING + +#ifdef NON_MATCHING +typedef struct +{ + s16 animFrameCount; + u32 rotationValuesSeg; + u32 actorDrawTableSeg; + s16 limit; +} AnimationHeader; + +typedef struct +{ + Vec3s pos; + Vec3s rotations[1]; +} RotationIndex; + +u16 func_800A1D8C(u32 animationSeg, s32 arg1, s32 arg2, Vec3s* arg3) +{ + s32 temp_s2; + s32 temp_s3; + s32 temp_s4; + u16 temp_v0_2; + u16 temp_v0_3; + u16 temp_v0_4; + void *temp_v0; + void *phi_s0; + void *phi_s1; + s32 phi_s4; + u16 phi_return; + AnimationHeader* animation; + Vec3s* rotationValues; + u32* limbTable; + u32 i; + + animation = SEGMENTED_TO_VIRTUAL(animationSeg); + rotationValues = SEGMENTED_TO_VIRTUAL(animation->rotationValuesSeg); + + phi_return = temp_v0; + for(i = 0;i < arg2; i++){ + } + if (arg2 > 0) + { + temp_s3 = (arg1 * 2) + temp_s2; + phi_s0 = arg3; + phi_s1 = (*(&gSegments + (((u32) (temp_v0->unk8 * 0x10) >> 0x1C) * 4)) + (temp_v0->unk8 & 0xFFFFFF)) + 0x80000000; + phi_s4 = 0; +loop_2: + if ((((phi_s0 == 0) || (phi_s1 == 0)) || (temp_s3 == 0)) || (temp_s2 == 0)) + { + LogUtils_LogThreadId("../z_skelanime.c", 0x570); + osSyncPrintf("out = %08x\n", phi_s0); + LogUtils_LogThreadId("../z_skelanime.c", 0x571); + osSyncPrintf("ref_tbl = %08x\n", phi_s1); + LogUtils_LogThreadId("../z_skelanime.c", 0x572); + osSyncPrintf("frame_tbl = %08x\n", temp_s3); + LogUtils_LogThreadId("../z_skelanime.c", 0x573); + osSyncPrintf("tbl = %08x\n", temp_s2); + } + else + { + + } + temp_v0_2 = phi_s1->unk0; + temp_s4 = phi_s4 + 1; + if (temp_v0_2 >= temp_v0->unkC) + { + phi_s0->unk0 = (s16) *(temp_s3 + (temp_v0_2 * 2)); + } + else + { + phi_s0->unk0 = (s16) *(temp_s2 + (temp_v0_2 * 2)); + } + temp_v0_3 = phi_s1->unk2; + if (temp_v0_3 >= temp_v0->unkC) + { + phi_s0->unk2 = (s16) *(temp_s3 + (temp_v0_3 * 2)); + } + else + { + phi_s0->unk2 = (s16) *(temp_s2 + (temp_v0_3 * 2)); + } + temp_v0_4 = phi_s1->unk4; + if (temp_v0_4 >= temp_v0->unkC) + { + phi_s0->unk4 = (s16) *(temp_s3 + (temp_v0_4 * 2)); + } + else + { + phi_s0->unk4 = (s16) *(temp_s2 + (temp_v0_4 * 2)); + } + phi_s0 = phi_s0 + 6; + phi_s1 = phi_s1 + 6; + phi_s4 = temp_s4; + phi_return = temp_v0_4; + if (temp_s4 != arg2) + { + goto loop_2; + } + } + return phi_return; +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A1D8C.s") +#endif -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A1FC8.s") +s32 func_800A1FC8(s32 arg0) +{ + u16* virt = (u16*)SEGMENTED_TO_VIRTUAL(arg0); + return (s16)(*virt); +} s32 SkelAnime_GetFrameCount(u32 animation) { @@ -40,23 +488,93 @@ s32 SkelAnime_GetFrameCount(u32 animation) #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A29BC.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2DBC.s") +s16 func_800A2DBC(s32 arg0) +{ + u16* virt = SEGMENTED_TO_VIRTUAL(arg0); + + return virt[1]; +} + +s16 func_800A2DF4(s32 arg0) +{ + u16* virt = SEGMENTED_TO_VIRTUAL(arg0); + + return *virt; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2DF4.s") +s32 func_800A2E2C(s32 arg0){ + s16* virt = SEGMENTED_TO_VIRTUAL(arg0); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2E2C.s") + return (s16)(*virt - 1); +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2E70.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A32EC.s") +void func_800A32EC(u16* arg0) +{ + *arg0 = 0; +} + +void func_800A32F4(s32 arg0) +{ + D_801600B0 *= 2; +} + +void func_800A3310(void* arg0) +{ + u32* D_8012A480Ptr = &D_8012A480; + + *D_8012A480Ptr |= D_801600B0; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A32F4.s") +AnimationEntry* func_800A3334(AnimationContext* animationCtx, s32 arg1) +{ + AnimationEntry *entry; + s16 index = animationCtx->animationCount; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3310.s") + if (index >= 0x32) + { + return NULL; + } + animationCtx->animationCount = index + 1; + entry = &animationCtx->entries[index]; + entry->unk_00 = arg1; + return entry; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3334.s") +#ifdef NON_MATCHING +typedef struct +{ + u32 unk_00; + u32 rom; +} anim; +void func_800A336C(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 limbCount, void* ram) +{ + s32 sp3C; + anim *sp38; + s32 sp30; + OSMesgQueue temp_a0; + s32 temp_a3; + s32 temp_at; + AnimationEntry* temp_ret; + DmaRequest req; + + temp_ret = func_800A3334(&globalCtx->animationCtx, 0); + if (temp_ret != NULL) + { + temp_a0 = temp_ret->msgQueue; + sp38 = SEGMENTED_TO_VIRTUAL(arg1); + sp3C = temp_ret; + osCreateMesgQueue(temp_ret, &temp_ret->msg, 1); + temp_a3 = sizeof(Vec3s) * limbCount; + DmaMgr_SendRequest2(&req, ram, ((sp38->rom + (u32)&_link_animetionSegmentRomStart) - 0x7000000) + (temp_a3 * arg2), temp_a3, 0, &temp_ret->msgQueue, NULL, "../z_skelanime.c" , 0x7D4); + } +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A336C.s") +#endif +#undef NON_MATCHING #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3478.s") @@ -83,7 +601,7 @@ typedef struct { SkelAnime* skelAnime; f32 unk_8; } UNK_800A3874_A1; -void func_800A54FC(SkelAnime*,Vec3f*,s16); + void func_800A3874(s32 arg0, UNK_800A3874_A1* arg1) { char pad[4]; @@ -96,168 +614,868 @@ void func_800A3874(s32 arg0, UNK_800A3874_A1* arg1) temp_v0->posRot.pos.z += pos.z * temp_v0->scale.z; } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A390C.s") +void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) +{ + AnimationEntry* entry; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A39AC.s") + for(entry = animationCtx->entries; animationCtx->animationCount != 0; entry++, animationCtx->animationCount--) + { + D_8012A484[entry->unk_00](globalCtx, entry->unk_04); + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3B8C.s") + D_801600B0 = 1; + D_8012A480 = 0; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3BC0.s") +#ifdef NON_MATCHING +// some kind of init +void func_800A3F08(GlobalContext*,SkelAnime*,s32,f32,f32,f32,s8,f32); +void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skelAnimeInitSeg, s32 arg3, s8 arg4, Vec3s* actorDrawTable, s32 arg6, s32 arg7) +{ + SkelAnimeInit* skelAnimeInit; + u8 flag; + size_t size; + + skelAnimeInit = SEGMENTED_TO_VIRTUAL(skelAnimeInitSeg); + skelAnime->unk_34 = arg4; + flag = arg4 & 2 == 0 ? 1U : skelAnimeInit->limbCount; + if ((arg4 & 2) != 0) + { + flag = skelAnimeInit->limbCount; + } + else + { + flag = 1; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3BE4.s") + if((arg4 & 1) != 0) + { + flag += skelAnimeInit->limbCount; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3C9C.s") + if((arg4 & 4) != 0) + { + flag += skelAnimeInit->limbCount; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3D70.s") + skelAnime->limbCount = flag; + skelAnime->dListCount = skelAnimeInit->dListCount; + skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(skelAnimeInit->limbIndexSeg); + size = sizeof(Vec3s); + if ((arg4 & 8) != 0) + { + size += 2; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3E0C.s") + if (actorDrawTable == NULL) + { + skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(size, "../z_skelanime.c", 2364); + skelAnime->unk_24 = ZeldaArena_MallocDebug(size, "../z_skelanime.c", 2365); + } + else + { + if (arg7 != flag) + { + __assert("joint_buff_num == joint_num", "../z_skelanime.c", 2369); + } + skelAnime->actorDrawTbl = ALIGN16((u32)actorDrawTable); + skelAnime->unk_24 = ALIGN16(arg6); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3EE8.s") + } + if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) + { + osSyncPrintf("\x1b[31m"); + osSyncPrintf("Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); //Skeleton_Info_Rom_SV_ct Memory allocation error + osSyncPrintf("\x1b[m"); + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3F08.s") + func_800A3F08(globalCtx, skelAnime, arg3, 1.0f, 0.0f, 0.0f, 0, 0.0f); +} +#else +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A39AC.s") +#endif +#undef NON_MATCHING -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A407C.s") +void func_800A3B8C(SkelAnime* skelAnime) +{ + if (skelAnime->unk_01 < 2) + { + skelAnime->mtxUpdate = &func_800A3D70; + } + else + { + skelAnime->mtxUpdate = &func_800A3E0C; + } + skelAnime->unk_28 = 0.0f; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A40DC.s") +//SkelAnime_FrameUpdateMatrixGlobalCtx +void func_800A3BC0(GlobalContext* globalCtx, SkelAnime* skelAnime) +{ + skelAnime->mtxUpdate(globalCtx, skelAnime); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4140.s") +#ifdef NON_MATCHING +s32 func_800A3BE4(GlobalContext* globalCtx, SkelAnime* skelAnime) +{ + f32 prevUnk28 = skelAnime->unk_28; + skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.5f); + if (skelAnime->unk_28 <= 0.0f) + { + func_800A3B8C(skelAnime); + } + func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, 1.0f - (skelAnime->unk_28 / prevUnk28)); + return 0; +} +#else +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3BE4.s") +#endif -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A419C.s") +void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) +{ + f32 updateRate; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A41FC.s") + func_800A336C(globalCtx, skelAnime->animCurrent, skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); + if (skelAnime->unk_28 != 0) + { + updateRate = R_UPDATE_RATE * 0.5f; + skelAnime->unk_28 -= skelAnime->unk_2C * updateRate; + if (skelAnime->unk_28 <= 0.0f) + { + skelAnime->unk_28 = 0.0f; + return; + } + func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, skelAnime->unk_28); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A422C.s") +s32 func_800A3D70(GlobalContext* globalCtx, SkelAnime* skelAnime) +{ + f32 updateRate = R_UPDATE_RATE * 0.5f; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A425C.s") + skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * updateRate; + if (skelAnime->animCurrentFrame < 0.0f) + { + skelAnime->animCurrentFrame += skelAnime->unk_14; + } + else + { + if (skelAnime->unk_14 <= skelAnime->animCurrentFrame){ + skelAnime->animCurrentFrame -= skelAnime->unk_14; + } + } + func_800A3C9C(globalCtx, skelAnime); + return 0; +} + +// returns 1 if animation is done? +s32 func_800A3E0C(GlobalContext* globalCtx, SkelAnime* skelAnime) +{ + f32 updateRate = R_UPDATE_RATE * 0.5f; + + if (skelAnime->animCurrentFrame == skelAnime->animFrameCount) + { + func_800A3C9C(globalCtx, skelAnime); + return 1; + } + skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * updateRate; + if (0.0f < ((skelAnime->animCurrentFrame - skelAnime->animFrameCount) * skelAnime->animPlaybackSpeed)) + { + skelAnime->animCurrentFrame = skelAnime->animFrameCount; + } + else + { + if (skelAnime->animCurrentFrame < 0.0f) + { + skelAnime->animCurrentFrame += skelAnime->unk_14; + } + else + { + if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) + { + skelAnime->animCurrentFrame -= skelAnime->unk_14; + } + } + } + func_800A3C9C(globalCtx, skelAnime); + return 0; +} + + +void func_800A3EE8(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) +{ + skelAnime->unk_28 = 1.0f; + skelAnime->unk_2C = 1.0f / arg2; +} + +s32 func_800A3BE4(GlobalContext* globalCtx, SkelAnime* skelAnime); +void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7); +#ifdef NON_MATCHING +void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7) +{ + + skelAnime->unk_01 = arg6; + if ((arg7 != 0.0f) && + ((animation == skelAnime->animCurrent) || (arg4 != skelAnime->animCurrentFrame))) + { + if(arg7 < 0.0f) + { + func_800A3B8C(skelAnime); + func_800A5774(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); + arg7 = -arg7; + } + else + { + skelAnime->mtxUpdate = &func_800A3BE4; + func_800A336C(globalCtx, animation, (s32) arg4, skelAnime->limbCount, skelAnime->unk_24); + } + skelAnime->unk_28 = 1.0f; + skelAnime->unk_2C = 1.0f / arg7; + } + else + { + func_800A3B8C(skelAnime); + func_800A336C(globalCtx, animation, (s32) arg4, skelAnime->limbCount, skelAnime->actorDrawTbl); + skelAnime->unk_28 = 0.0f; + } + + skelAnime->animCurrentFrame = animation; + skelAnime->unk_0C = arg4; + skelAnime->animCurrentFrame = arg4; + skelAnime->animFrameCount = frameCount; + skelAnime->unk_14 = func_800A1FC8(animation); + skelAnime->animPlaybackSpeed = playbackSpeed; +} +#else +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3F08.s") +#endif +#undef NON_MATCHING + +void func_800A407C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) +{ + func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 2, 0.0f); +} + +void func_800A40DC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) +{ + func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 2, 0.0f); +} + +void func_800A4140(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) +{ + func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); +} + +void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) +{ + func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); +} + +void func_800A3478(GlobalContext*,u8,Vec3s*,Vec3s*); +void func_800A41FC(GlobalContext* globalCtx, SkelAnime* skelAnime) +{ + func_800A3478(globalCtx, skelAnime->limbCount, skelAnime->unk_24, skelAnime->actorDrawTbl); +} + +void func_800A422C(GlobalContext* globalCtx, SkelAnime* skelAnime) +{ + func_800A3478(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A42A0.s") +void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, s32 arg2, f32 arg3) +{ + func_800A336C(globalCtx, arg2, (s32) arg3, skelAnime->limbCount, skelAnime->unk_24); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A42E4.s") +void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, s32 arg2, f32 arg3) +{ + func_800A336C(globalCtx, arg2, (s32) arg3, skelAnime->limbCount, skelAnime->actorDrawTbl); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A431C.s") +void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) +{ + func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, arg2); +} + +void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, s32 arg2, f32 arg3, s32 arg4, f32 arg5, f32 arg6, s32 arg7) +{ + s32 alignedAddr; + func_800A336C(globalCtx, arg2, (s32) arg3, skelAnime->limbCount, skelAnime->actorDrawTbl); + alignedAddr = ALIGN16(arg7); + + func_800A336C(globalCtx, arg4, (s32) arg5, skelAnime->limbCount, alignedAddr); + func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, alignedAddr, arg6); +} + +#ifdef NON_MATCHING +void func_800A43B8(s32 arg0, void *arg1, ? arg2, f32 arg3, s32 arg4, f32 arg5, f32 arg6, s32 arg7) +{ + s32 sp28; + s32 temp_v0; + + func_800A336C(arg3, arg2, (s32) arg3, arg1->unk0, (s32) arg1->unk24); + temp_v0 = (arg7 + 0xF) & -0x10; + sp28 = temp_v0; + func_800A336C(arg0, arg4, (s32) arg5, arg1->unk0, temp_v0); + func_800A34DC(arg0, arg1->unk0, arg1->unk24, sp28, arg6); +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A43B8.s") +#endif + +void func_800A4454(SkelAnime* skelAnime) +{ + skelAnime->unk_01 = 2; + func_800A3B8C(skelAnime); +} + + +s32 func_800A4478(SkelAnime* skelAnime, f32 arg1, f32 updateRate) +{ + f32 temp_f0; + f32 temp_f12; + f32 temp_f2; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4454.s") + temp_f0 = skelAnime->animPlaybackSpeed * updateRate; + temp_f2 = skelAnime->animCurrentFrame - temp_f0; + if (temp_f2 < 0.0f) + { + temp_f2 += skelAnime->unk_14; + } + else + { + temp_f2 = temp_f2; + if (skelAnime->unk_14 <= temp_f2) + { + temp_f2 = temp_f2 - skelAnime->unk_14; + } + } + if (arg1 == 0.0f) + { + if (0.0f < temp_f0) + { + arg1 = skelAnime->unk_14; + } + } + temp_f12 = (temp_f2 + temp_f0) - arg1; + if (0.0f <= (temp_f12 * temp_f0)) + { + if (((temp_f12 - temp_f0) * temp_f0) < 0.0f) + { + return 1; + } + } + return 0; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4478.s") +s32 func_800A4530(SkelAnime* skelAnime, f32 arg1) +{ + f32 updateRate = R_UPDATE_RATE * 0.5f; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4530.s") + return func_800A4478(skelAnime, arg1, updateRate); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_Init.s") +void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skelAnimeInitSeg, u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) +{ + SkelAnimeInit* skelAnimeInit; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A46F8.s") + skelAnimeInit = SEGMENTED_TO_VIRTUAL(skelAnimeInitSeg); + skelAnime->limbCount = skelAnimeInit->limbCount + 1; + skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(skelAnimeInit->limbIndexSeg); + if (actorDrawTable == NULL) + { + skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 2968); + skelAnime->unk_24 = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 2969); + } + else + { + if (limbCount != skelAnime->limbCount) + { + __assert("joint_buff_num == this->joint_num", "../z_skelanime.c", 2973); + } + skelAnime->actorDrawTbl = actorDrawTable; + skelAnime->unk_24 = arg5; + } + if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) + { + osSyncPrintf("\x1b[31m"); + osSyncPrintf("Skeleton_Info2_ct メモリアロケーションエラー\n"); // Skeleton_Info2_ct memory allocation error + osSyncPrintf("\x1b[m"); + } + + if (animation != 0) + { + func_800A52F8(skelAnime, animation); + } +} + +// another init +void func_800A46F8(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skelAnimeInitSeg, u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) +{ + SkelAnimeInit *skelAnimeInit; + + skelAnimeInit = SEGMENTED_TO_VIRTUAL(skelAnimeInitSeg); + skelAnime->limbCount = skelAnimeInit->limbCount + 1; + skelAnime->dListCount = skelAnimeInit->dListCount; + skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(skelAnimeInit->limbIndexSeg); + + if (actorDrawTable == NULL) + { + skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 3047); + skelAnime->unk_24 = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 3048); + } + else + { + if (limbCount != skelAnime->limbCount) + { + __assert("joint_buff_num == this->joint_num", "../z_skelanime.c", 0xBEC); + } + skelAnime->actorDrawTbl = actorDrawTable; + skelAnime->unk_24 = arg5; + } + if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) + { + osSyncPrintf("\x1b[31m"); + osSyncPrintf("Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); // Skeleton_Info_Rom_SV_ct Memory allocation error + osSyncPrintf("\x1b[m"); + } + + if (animation != 0) + { + func_800A52F8(skelAnime, animation); + } +} + +// some kind of init +void func_800A487C(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 skelAnimeInitSeg, u32 animation) +{ + SkelAnimeInit *skelAnimeInit; + + skelAnimeInit = SEGMENTED_TO_VIRTUAL(skelAnimeInitSeg); + skelAnime->limbCount = skelAnimeInit->limbCount + 1; + skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(skelAnimeInit->limbIndexSeg); + skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 3120); + skelAnime->unk_24 = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 3121); + if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) + { + osSyncPrintf("\x1b[31m"); + osSyncPrintf("Skeleton_Info2_skin2_ct メモリアロケーションエラー\n"); //Skeleton_Info2_skin2_ct Memory allocation error + osSyncPrintf("\x1b[m"); + } + + if (animation != 0) + { + func_800A52F8(skelAnime, animation); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A487C.s") +void func_800A49B0(SkelAnime* skelAnime) +{ + if (skelAnime->unk_01 < 2) + { + skelAnime->mtxUpdate = &func_800A4D9C; + return; + } + if (skelAnime->unk_01 < 4) + { + skelAnime->mtxUpdate = &func_800A4EE0; + return; + } + skelAnime->mtxUpdate = &func_800A4E38; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A49B0.s") s32 SkelAnime_FrameUpdateMatrix(SkelAnime* skelAnime){ return skelAnime->mtxUpdate(skelAnime); } +#ifdef NON_MATCHING +s32 func_800A4A20(SkelAnime* skelAnime) +{ + f32 sp2C; + f32 temp_f12; + f32 phi_f0; + + temp_f12 = skelAnime->unk_28; + skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.33333334f); + phi_f0 = skelAnime->unk_28; + if (skelAnime->unk_28 <= 0.0f) + { + sp2C = temp_f12; + func_800A49B0(skelAnime); + skelAnime->unk_28 = 0.0f; + phi_f0 = skelAnime->unk_28; + } + func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, skelAnime->unk_24, 1.0f - (phi_f0 / temp_f12)); + return 0; +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4A20.s") +#endif +#ifdef NON_MATCHING +s32 func_800A4AD8(SkelAnime* skelAnime) +{ + f32 sp28; + s16 temp_a1; + s16 temp_a2; + f32 phi_f2; + + temp_a2 = (s16)(skelAnime->unk_28 * 16384.0f); + skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.33333334f); + if (skelAnime->unk_28 <= 0.0f) + { + func_800A49B0(skelAnime); + skelAnime->unk_28 = 0.0f; + } + temp_a1 = (s16)(skelAnime->unk_28 * 16384.0f); + if (skelAnime->unk_03 < 0) + { + sp28 = 1.0f - Math_Coss(temp_a2); + phi_f2 = 1.0f - Math_Coss(temp_a1); + } + else + { + sp28 = Math_Sins(temp_a2); + phi_f2 = Math_Sins(temp_a1); + } + if (phi_f2 != 0.0f) + { + phi_f2 /= sp28; + } + else + { + phi_f2 = 0.0f; + } + func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, skelAnime->unk_24, 1.0f - phi_f2); + return 0; +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4AD8.s") +#endif +#ifdef NON_MATCHING +// close +void func_800A4C58(SkelAnime* skelAnime) +{ + Vec3s sp38[98]; + f32 temp_f0; + f32 temp_f2; + s32 temp_f10; + s32 temp_f8; + + func_800A1D8C(skelAnime->animCurrent, (s32) skelAnime->animPlaybackSpeed, skelAnime->limbCount, skelAnime->actorDrawTbl); + if ((skelAnime->unk_01 & 1) != 0) + { + temp_f8 = (s32) skelAnime->animCurrentFrame; + temp_f10 = temp_f8; + temp_f8 = temp_f8 + 1; + temp_f2 = skelAnime->animCurrentFrame - (f32) temp_f10; + if (temp_f8 >= (s32) skelAnime->unk_14) + { + temp_f8 = 0; + } + func_800A1D8C(skelAnime->animCurrent, temp_f8, skelAnime->limbCount, sp38); + func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, &sp38, temp_f2); + } + if (0.0f != skelAnime->unk_28) + { + skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.33333334f); + temp_f0 = skelAnime->unk_28; + if (temp_f0 <= 0.0f) + { + skelAnime->unk_28 = 0.0f; + return; + } + func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, skelAnime->unk_24, skelAnime->unk_28); + } +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4C58.s") +#endif +#undef NON_MATCHING +#ifdef NON_MATCHING +//reg alloc +s32 func_800A4D9C(SkelAnime* skelAnime) +{ + skelAnime->animCurrentFrame += (R_UPDATE_RATE * 0.33333334f) + skelAnime->animPlaybackSpeed; + if (skelAnime->animCurrentFrame < 0.0f) + { + skelAnime->animCurrentFrame += skelAnime->unk_14; + } + else if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) + { + skelAnime->animCurrentFrame -= skelAnime->unk_14; + } + func_800A4C58(skelAnime); + return 0; +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4D9C.s") +#endif +#undef NON_MATCHING +#ifdef NON_MATCHING +//reg alloc +s32 func_800A4E38(SkelAnime* skelAnime) +{ + skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * (R_UPDATE_RATE * 0.33333334f); + if (skelAnime->animCurrentFrame < skelAnime->unk_0C) + { + skelAnime->animCurrentFrame = (skelAnime->animCurrentFrame - skelAnime->unk_0C) + skelAnime->animFrameCount; + } + else + { + if (skelAnime->animFrameCount <= skelAnime->animCurrentFrame) + { + skelAnime->animCurrentFrame = (skelAnime->animCurrentFrame - skelAnime->animFrameCount) + skelAnime->unk_0C; + } + } + func_800A4C58(skelAnime); + return 0; +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4E38.s") +#endif +#undef NON_MATCHING -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4EE0.s") +s32 func_800A4EE0(SkelAnime *skelAnime) +{ + f32 temp_f14; + temp_f14 = (f32) R_UPDATE_RATE * 0.33333334f; + if (skelAnime->animCurrentFrame == skelAnime->animFrameCount) + { + + func_800A1D8C(skelAnime->animCurrent, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); + func_800A4C58(skelAnime); + return 1; + } + skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * temp_f14; + if (0.0f < ((skelAnime->animCurrentFrame - skelAnime->animFrameCount) * skelAnime->animPlaybackSpeed)) + { + skelAnime->animCurrentFrame = skelAnime->animFrameCount; + } + else + { + if (skelAnime->animCurrentFrame < 0.0f) + { + skelAnime->animCurrentFrame += skelAnime->unk_14; + } + else + { + if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) + { + skelAnime->animCurrentFrame -= skelAnime->unk_14; + } + } + } + func_800A4C58(skelAnime); + return 0; +} + +#ifdef NON_MATCHING +// close some regalloc, missing move zero fpr +s32 func_800A4AD8(SkelAnime* skelAnime); +s32 func_800A4A20(SkelAnime* skelAnime); +void func_800A1D8C(u32,s32,u8,Vec3s*); +void func_800A4FE4(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2) +{ + skelAnime->unk_01 = unk1; + if ((transitionRate != 0.0f) && + ((animation != skelAnime->animCurrent) || (unk0 != skelAnime->animCurrentFrame))) + { + if (transitionRate < 0.0f) + { + func_800A49B0(skelAnime); + func_800A5774(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); + transitionRate = -transitionRate; + } + else + { + if (unk2 != 0) + { + skelAnime->mtxUpdate = (void*)&func_800A4AD8; + skelAnime->unk_03 = unk2; + } + else + { + skelAnime->mtxUpdate = (void*)&func_800A4A20; + } + func_800A1D8C(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); + } + skelAnime->unk_28 = 1.0f; + skelAnime->unk_2C = 1.0f / transitionRate; + } + else + { + func_800A49B0(skelAnime); + func_800A1D8C(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); + skelAnime->unk_28 = 0.0f; + } + + skelAnime->animCurrent = animation; + skelAnime->unk_0C = unk0; + skelAnime->animFrameCount = frameCount; + skelAnime->unk_14 = (f32) func_800A1FC8(animation); + if (skelAnime->unk_01 >= 4) + { + skelAnime->animCurrentFrame = 0.0f; + } + else + { + skelAnime->animCurrentFrame = unk0; + if (skelAnime->unk_01 < 2) + { + skelAnime->animFrameCount = skelAnime->unk_14 - 1.0f; + } + } + skelAnime->animPlaybackSpeed = playbackSpeed; +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4FE4.s") +#endif +#undef NON_MATCHING void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, /* 0x10 */ f32 frameCount, /* 0x14 */ u8 unk1, /* 0x18 */ f32 transitionRate) { func_800A4FE4(skelAnime, animation, playbackSpeed, unk0, frameCount, unk1, transitionRate, 0); } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A51E8.s") +void func_800A51E8(SkelAnime* skelAnime, u32 animation) +{ + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 2, 0.0f); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5240.s") +void func_800A5240(SkelAnime* skelAnime, u32 animation, f32 transitionRate) +{ + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0, (f32) SkelAnime_GetFrameCount(animation), 2, transitionRate); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A529C.s") +void func_800A529C(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) +{ + SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 2, 0.0f); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A52F8.s") +// SkelAnime_ChangeAnimationDefault +void func_800A52F8(SkelAnime* skelAnime, u32 animation) +{ + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A534C.s") +// SkelAnime_ChangeAnimationTransitionRate +void func_800A534C(SkelAnime* skelAnime, u32 animation, f32 transitionRate) +{ + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, 0.0f, 0, transitionRate); +} + +//SkelAnime_ChangeAnimationPlaybackSpeed +void func_800A5384(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) +{ + SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5384.s") +void func_800A53DC(SkelAnime* skelAnime) +{ + skelAnime->unk_01 = 2; + skelAnime->animFrameCount = skelAnime->unk_14; + func_800A49B0(skelAnime); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A53DC.s") +#ifdef NON_MATCHING +// regalloc +void func_800A5408(SkelAnime* skelAnime) +{ + f32 animPlaybackSpeed = skelAnime->animPlaybackSpeed; + f32 unk_C = skelAnime->unk_0C; + f32 frameCount = skelAnime->animFrameCount; + skelAnime->animFrameCount = unk_C; + skelAnime->animPlaybackSpeed = -animPlaybackSpeed; + skelAnime->unk_0C = frameCount; +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5408.s") +#endif -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5428.s") +void func_800A5428(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* arg3) +{ + s32 i; + for(i = 0; i < skelAnime->limbCount; i++, dst++, src++) + { + if(*arg3++) + { + *dst = *src; + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5490.s") +void func_800A5490(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* arg3) +{ + s32 i; + for(i = 0;i < skelAnime->limbCount; i++, dst++, src++) + { + if(*arg3++ < 1U){ + *dst = *src; + } + } +} -#ifdef NON_MATCHING void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) { - f32 temp_f20; - f32 temp_f20_2; - f32 temp_f22; - f32 temp_f22_2; - f32 temp_f24; - f32 temp_f24_2; - f32 temp_ret; - f32 temp_ret_2; + f32 x; + f32 z; + f32 sin; + f32 cos; - if ((skelAnime->unk_35 & 0x10) != 0) + if((skelAnime->unk_35 & 0x10) != 0) { pos->z = 0.0f; pos->x = 0.0f; } else { - - temp_f20 = (f32) *(s16*)(skelAnime->actorDrawTbl); - temp_f22 = (f32) ((s16*)skelAnime->actorDrawTbl)[2]; - temp_f24 = Math_Sins(angle); - temp_ret = Math_Coss(angle); - pos->x = (f32) ((temp_f20 * temp_ret) + (temp_f22 * temp_f24)); - pos->z = (f32) ((temp_f22 * temp_ret) - (temp_f20 * temp_f24)); - temp_f20_2 = (f32) skelAnime->unk_38; - temp_f22_2 = (f32) skelAnime->unk_3C; - temp_f24_2 = Math_Sins(skelAnime->unk_36); - temp_ret_2 = Math_Coss(skelAnime->unk_36); - pos->x -= ((temp_f20_2 * temp_ret_2) + (temp_f22_2 * temp_f24_2)); - pos->z -= ((temp_f22_2 * temp_ret_2) - (temp_f20_2 * temp_f24_2)); - //arg1->unk0 = (f32) (arg1->unk0 - ((temp_f20_2 * temp_ret_2) + (temp_f22_2 * temp_f24_2))); - //arg1->unk8 = (f32) (arg1->unk8 - ((temp_f22_2 * temp_ret_2) - (temp_f20_2 * temp_f24_2))); + x = (f32)skelAnime->actorDrawTbl->x; + z = (f32)skelAnime->actorDrawTbl->z; + sin = Math_Sins(angle); + cos = Math_Coss(angle); + pos->x = x * cos + z * sin; + pos->z = z * cos - x * sin; + x = (f32)skelAnime->unk_38; + z = (f32)skelAnime->unk_3C; + sin = Math_Sins(skelAnime->unk_36); + cos = Math_Coss(skelAnime->unk_36); + pos->x -= x * cos + z * sin; + pos->z -= z * cos - x * sin; } + skelAnime->unk_36 = angle; - skelAnime->unk_38 = *(s16*)(skelAnime->actorDrawTbl); - *(s16*)(skelAnime->actorDrawTbl) = skelAnime->unk_3E; - skelAnime->unk_3C = ((s16*)skelAnime->actorDrawTbl)[2]; - ((s16*)skelAnime->actorDrawTbl)[2] = skelAnime->unk_42; - if ((skelAnime->unk_35 & 2) != 0) + skelAnime->unk_38 = skelAnime->actorDrawTbl->x; + skelAnime->actorDrawTbl->x = skelAnime->unk_3E; + skelAnime->unk_3C = skelAnime->actorDrawTbl->z; + skelAnime->actorDrawTbl->z = skelAnime->unk_42; + if((skelAnime->unk_35 & 2) != 0) { - if ((skelAnime->unk_35 & 0x10) != 0) + if((skelAnime->unk_35 & 0x10) != 0) { pos->y = 0.0f; } else { - pos->y = (f32) ((s16*)skelAnime->actorDrawTbl)[1]; + pos->y = (f32)(skelAnime->actorDrawTbl->y - skelAnime->unk_3A); } - skelAnime->unk_3A = ((s16*)skelAnime->actorDrawTbl)[1]; - ((s16*)skelAnime->actorDrawTbl)[1] = skelAnime->unk_40; + skelAnime->unk_3A = skelAnime->actorDrawTbl->y; + skelAnime->actorDrawTbl->y = skelAnime->unk_40; } else { pos->y = 0.0f; - skelAnime->unk_3A = ((s16*)skelAnime->actorDrawTbl)[1]; + skelAnime->unk_3A = skelAnime->actorDrawTbl->y; } skelAnime->unk_35 &= ~0x10; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A54FC.s") -#endif s32 func_800A56C8(SkelAnime *skelAnime, f32 arg1) { @@ -266,7 +1484,7 @@ s32 func_800A56C8(SkelAnime *skelAnime, f32 arg1) void func_800A56F0(SkelAnime *skelAnime, s32 arg1) { - if (skelAnime->actorDrawTbl != 0) + if (skelAnime->actorDrawTbl != NULL) { ZeldaArena_FreeDebug(skelAnime->actorDrawTbl, "../z_skelanime.c", 3729); } @@ -274,7 +1492,7 @@ void func_800A56F0(SkelAnime *skelAnime, s32 arg1) { osSyncPrintf("now_joint あきまへん!!\n"); // now_joint Akimane! ! } - if (skelAnime->unk_24 != 0) + if (skelAnime->unk_24 != NULL) { ZeldaArena_FreeDebug(skelAnime->unk_24, "../z_skelanime.c", 3731); return; -- cgit v1.2.3 From 96ba073f198482e37349b1e7a77935e7f26ae3a5 Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Fri, 20 Mar 2020 21:51:12 -0500 Subject: skelanime, wip --- src/code/z_skelanime.c | 218 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 203 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index cf13a38c1..ada66eed0 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -39,15 +39,15 @@ static testfunc D_8012A484[] = //.bss u32 D_801600B0; -#ifdef NON_MATCHING -void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 arg7) +// SkelAnime_LodDrawLimb +void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) { - GraphicsContext* gfxCtx; - Gfx* gfx[3]; SkelLimbEntry* limbEntry; - Vec3s rot; - Vec3f pos; Gfx* dList; + Vec3f pos; + Vec3s rot; + GraphicsContext* gfxCtx; + Gfx* gfx[4]; gfxCtx = globalCtx->state.gfxCtx; func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 773); @@ -60,14 +60,20 @@ void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec pos.y = limbEntry->pos.y; pos.z = limbEntry->pos.z; - dList = &limbEntry->dList[arg7]; + dList = limbEntry->displayLists[dListIndex]; if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { func_800D1340(&pos, &rot); if (dList != NULL) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_skelanime.c", 0x325), G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dList); + do + { + if(1) + { + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x325), G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList); + } + } while(0); } } @@ -78,27 +84,209 @@ void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec if (limbEntry->firstChildIndex != 0xFF) { - func_800A08A0(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, arg7); + func_800A08A0(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); } Matrix_Pull(); if (limbEntry->nextLimbIndex != 0xFF) { - func_800A08A0(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, arg7); + func_800A08A0(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); + } + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x335); +} + +// SkelAnime_LodDraw +void func_800A0B40(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) +{ + SkelLimbEntry* limbEntry; + char pad[4]; + Gfx* dList; + Vec3f pos; + Vec3s rot; + GraphicsContext* gfxCtx; + Gfx* gfx[4]; + + if (limbIndex == NULL) + { + osSyncPrintf("\x1b[31m"); + osSyncPrintf("Si2_Lod_draw():skelがNULLです。\n"); + osSyncPrintf("\x1b[m"); + return; + } + gfxCtx = globalCtx->state.gfxCtx; + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x351); + Matrix_Push(); + + limbEntry = SEGMENTED_TO_VIRTUAL(*limbIndex); + pos.x = (f32) actorDrawTable->x; + pos.y = (f32) actorDrawTable->y; + pos.z = (f32) actorDrawTable->z; + + rot = actorDrawTable[1]; + dList = limbEntry->displayLists[dListIndex]; + + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) + { + func_800D1340(&pos, &rot); + if (dList != NULL) + { + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x371), G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList); + } + } + if (appendDlistFunc != NULL) + { + appendDlistFunc(globalCtx, 1, &dList, &rot, actor); + } + if (limbEntry->firstChildIndex != 0xFF) + { + func_800A08A0(globalCtx, limbEntry->firstChildIndex, limbIndex, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); + } + Matrix_Pull(); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x37E); +} + +#ifdef NON_MATCHING +// SkelAnime_LodDrawLimbSV +void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + Actor* actor, s32 dListIndex, Mtx** mtx) +{ + Gfx* dList[2]; + GraphicsContext* gfxCtx; + SkelLimbEntry* limbEntry; + Vec3f pos; + Vec3s rot; + Gfx* gfx[3]; + + Matrix_Push(); + + limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbIndex++; + + rot = actorDrawTable[limbIndex]; + pos.x = limbEntry->pos.x; + pos.y = limbEntry->pos.y; + pos.z = limbEntry->pos.z; + dList[1] = dList[0] = limbEntry->displayLists[dListIndex]; + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList[1], &pos, &rot, actor) == 0)) + { + func_800D1340(&pos, &rot); + if (dList[1] != NULL) + { + Matrix_ToMtx(*mtx, "../z_skelanime.c", 945); gfxCtx = globalCtx->state.gfxCtx; + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 946); + gSPMatrix(gfxCtx->polyOpa.p++, *mtx, G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 949); + (*mtx)++; + } + else if (dList[0] != 0) + { + Matrix_ToMtx(*mtx, "../z_skelanime.c", 954); + (*mtx)++; + } + } + if (appendDlistFunc != NULL) + { + appendDlistFunc(globalCtx, limbIndex, &dList[1], &rot, actor); + } + if (limbEntry->firstChildIndex != 0xFF) + { + func_800A0D94(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, + updateMtxFunc, appendDlistFunc, actor, dListIndex, mtx); + } + + Matrix_Pull(); + + if (limbEntry->nextLimbIndex != 0xFF) + { + func_800A0D94(globalCtx, limbEntry->nextLimbIndex, limbTable, + actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, mtx); } - func_800C6B54(&gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x335); } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A08A0.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A0D94.s") #endif #undef NON_MATCHING -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A0B40.s") +#ifdef NON_MATCHING +// SkelAnime_LodDrawSV +void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 limbCount, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + Actor* actor, s32 dListIndex) +{ + SkelLimbEntry *limbEntry; + Gfx* dList[2]; + Vec3f pos; + Vec3s rot; + Mtx* mtx; + GraphicsContext* gfxCtx; + Gfx* gfx[4]; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A0D94.s") + do + { + if(1) + { + mtx = Graph_Alloc(globalCtx->state.gfxCtx, limbCount * 0x40); + } + } while(0); + + if (limbTable == NULL) + { + osSyncPrintf("\x1b[31m"); + osSyncPrintf("Si2_Lod_draw_SV():skelがNULLです。\n"); + osSyncPrintf("\x1b[m"); + return; + } + gfxCtx = globalCtx->state.gfxCtx; + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1000); + gSPSegment(gfxCtx->polyOpa.p++, 0xD, mtx); + Matrix_Push(); + + limbEntry = SEGMENTED_TO_VIRTUAL(*limbTable); + pos.x = actorDrawTable->x; + pos.y = actorDrawTable->y; + pos.z = actorDrawTable->z; + + rot = actorDrawTable[1]; + + dList[0] = dList[1] = limbEntry->displayLists[dListIndex]; + + if ((updateMtxFunc == 0) || (updateMtxFunc(globalCtx, 1, &dList[1], &pos, &rot, actor) == 0)) + { + func_800D1340(&pos, &rot); + if (dList[1] != NULL) + { + mtx = Matrix_ToMtx(mtx, "../z_skelanime.c", 1033); + gSPMatrix(gfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); + mtx++; + } + else if (dList[0] != NULL) + { + Matrix_ToMtx(mtx, "../z_skelanime.c", 1040); + mtx++; + } + } + + if (appendDlistFunc != 0) + { + appendDlistFunc(globalCtx, 1, &dList[0], &rot, actor); + } + if (limbEntry->firstChildIndex != 0xFF) + { + func_800A0D94(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, &mtx); + } + Matrix_Pull(); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1053); +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A106C.s") +#endif +#undef NON_MATCHING #ifdef NON_MATCHING // SkelAnime_DrawLimb -- cgit v1.2.3 From 2a158f79ce06adc9a961c6047acf8e3c0d870b39 Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Sun, 22 Mar 2020 20:24:00 -0500 Subject: skelanime WIP --- src/code/z_skelanime.c | 601 +++++++++++++--------- src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c | 2 +- 2 files changed, 345 insertions(+), 258 deletions(-) (limited to 'src') diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index ada66eed0..b258a412a 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -6,26 +6,22 @@ void func_800A52F8(SkelAnime* skelAnime, u32 animation); void func_800A54FC(SkelAnime*,Vec3f*,s16); s32 func_800A3D70(GlobalContext*,SkelAnime*); s32 func_800A3E0C(GlobalContext*,SkelAnime*); -void func_800A34DC(GlobalContext*,u8,Vec3s*,Vec3s*,f32); -void func_800A336C(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 limbCount, void* ram); +void func_800A34DC(GlobalContext*,s32,Vec3s*,Vec3s*,f32); +void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s32 limbCount, void* ram); s32 func_800A4D9C(SkelAnime* skelAnime); s32 func_800A4EE0(SkelAnime* skelAnime); s32 func_800A4E38(SkelAnime* skelAnime); -void func_800A1D8C(u32,s32,u8,Vec3s*); +void func_800A1D8C(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *arg3); void func_800A2E70(u8,Vec3s*,Vec3s*,Vec3s*,f32); void func_800A49B0(SkelAnime*); - -typedef struct -{ - u32 limbIndexSeg; - u8 limbCount; - char unk_05[3]; - u8 dListCount; -} SkelAnimeInit; +void func_800A3478(GlobalContext*,s32,Vec3s*,Vec3s*); +void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7); +void func_800A4FE4(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2); +Gfx* func_800A24A0(GlobalContext*, u8, u32*, Vec3s*, SkelAnime_LimbUpdateMatrix2, SkelAnime_LimbAppendDlist2, Actor*, Mtx**, Gfx*); //.data -static u32 D_8012A480 = 0; -typedef void (*testfunc)(GlobalContext*,char*); +u32 D_8012A480 = 0; +typedef void (*testfunc)(GlobalContext*, AnimationEntryType*); static testfunc D_8012A484[] = { (testfunc)0x800A3678, @@ -40,6 +36,7 @@ static testfunc D_8012A484[] = u32 D_801600B0; // SkelAnime_LodDrawLimb +// func_800A08A0 void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; @@ -56,9 +53,9 @@ void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec limbIndex++; rot = actorDrawTable[limbIndex]; - pos.x = limbEntry->pos.x; - pos.y = limbEntry->pos.y; - pos.z = limbEntry->pos.z; + pos.x = limbEntry->translation.x; + pos.y = limbEntry->translation.y; + pos.z = limbEntry->translation.z; dList = limbEntry->displayLists[dListIndex]; if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) @@ -82,14 +79,14 @@ void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor); } - if (limbEntry->firstChildIndex != 0xFF) + if (limbEntry->firstChildIndex != LIMB_DONE) { func_800A08A0(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); } Matrix_Pull(); - if (limbEntry->nextLimbIndex != 0xFF) + if (limbEntry->nextLimbIndex != LIMB_DONE) { func_800A08A0(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); } @@ -97,6 +94,7 @@ void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec } // SkelAnime_LodDraw +// func_800A0B40 void func_800A0B40(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; @@ -149,6 +147,7 @@ void func_800A0B40(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTab #ifdef NON_MATCHING // SkelAnime_LodDrawLimbSV +// func_800A0D94 void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex, Mtx** mtx) @@ -192,7 +191,7 @@ void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 { appendDlistFunc(globalCtx, limbIndex, &dList[1], &rot, actor); } - if (limbEntry->firstChildIndex != 0xFF) + if (limbEntry->firstChildIndex != LIMB_DONE) { func_800A0D94(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, mtx); @@ -200,7 +199,7 @@ void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 Matrix_Pull(); - if (limbEntry->nextLimbIndex != 0xFF) + if (limbEntry->nextLimbIndex != LIMB_DONE) { func_800A0D94(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, mtx); @@ -213,6 +212,7 @@ void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 #ifdef NON_MATCHING // SkelAnime_LodDrawSV +// func_800A106C void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 limbCount, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) @@ -276,7 +276,7 @@ void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab { appendDlistFunc(globalCtx, 1, &dList[0], &rot, actor); } - if (limbEntry->firstChildIndex != 0xFF) + if (limbEntry->firstChildIndex != LIMB_DONE) { func_800A0D94(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, &mtx); } @@ -290,6 +290,7 @@ void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab #ifdef NON_MATCHING // SkelAnime_DrawLimb +// func_800A1344 void func_800A1344(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) { GraphicsContext* gfxCtx; @@ -324,7 +325,7 @@ void func_800A1344(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor); } - if (limbEntry->firstChildIndex != 0xFF) + if (limbEntry->firstChildIndex != LIMB_DONE) { func_800A1344(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor); @@ -332,7 +333,7 @@ void func_800A1344(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 Matrix_Pull(); - if (limbEntry->nextLimbIndex != 0xFF) + if (limbEntry->nextLimbIndex != LIMB_DONE) { func_800A1344(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor); @@ -390,7 +391,7 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa appendDlistFunc(globalCtx, 1, &dList, &rot, actor); } - if (rootLimb->firstChildIndex != 0xFF) + if (rootLimb->firstChildIndex != LIMB_DONE) { func_800A1344(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor); @@ -452,14 +453,14 @@ void func_800A180C(GlobalContext *globalCtx, u32 limbIndex, u32* limbTable, Vec3 appendDlistFunc(globalCtx, limbIndex, &limbDlist[1], &limbRot, actor); } - if (limbEntry->firstChildIndex != 0xFF) + if (limbEntry->firstChildIndex != LIMB_DONE) { func_800A180C(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, limbMatricies); } Matrix_Pull(); - if (limbEntry->nextLimbIndex != 0xFF) + if (limbEntry->nextLimbIndex != LIMB_DONE) { func_800A180C(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, limbMatricies); @@ -534,7 +535,7 @@ void func_800A1AC8(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab appendDlistFunc(globalCtx, 1, &skelDlist[1], &rot, actor); } - if (rootLimb->firstChildIndex != 0xFF) + if (rootLimb->firstChildIndex != LIMB_DONE) { func_800A180C(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, &limbMatricies); @@ -548,110 +549,45 @@ void func_800A1AC8(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab #endif #undef NON_MATCHING -#ifdef NON_MATCHING -typedef struct -{ - s16 animFrameCount; - u32 rotationValuesSeg; - u32 actorDrawTableSeg; - s16 limit; -} AnimationHeader; - -typedef struct -{ - Vec3s pos; - Vec3s rotations[1]; -} RotationIndex; - -u16 func_800A1D8C(u32 animationSeg, s32 arg1, s32 arg2, Vec3s* arg3) -{ - s32 temp_s2; - s32 temp_s3; - s32 temp_s4; - u16 temp_v0_2; - u16 temp_v0_3; - u16 temp_v0_4; - void *temp_v0; - void *phi_s0; - void *phi_s1; - s32 phi_s4; - u16 phi_return; - AnimationHeader* animation; - Vec3s* rotationValues; - u32* limbTable; - u32 i; - - animation = SEGMENTED_TO_VIRTUAL(animationSeg); - rotationValues = SEGMENTED_TO_VIRTUAL(animation->rotationValuesSeg); - - phi_return = temp_v0; - for(i = 0;i < arg2; i++){ - - } - if (arg2 > 0) - { - temp_s3 = (arg1 * 2) + temp_s2; - phi_s0 = arg3; - phi_s1 = (*(&gSegments + (((u32) (temp_v0->unk8 * 0x10) >> 0x1C) * 4)) + (temp_v0->unk8 & 0xFFFFFF)) + 0x80000000; - phi_s4 = 0; -loop_2: - if ((((phi_s0 == 0) || (phi_s1 == 0)) || (temp_s3 == 0)) || (temp_s2 == 0)) - { - LogUtils_LogThreadId("../z_skelanime.c", 0x570); - osSyncPrintf("out = %08x\n", phi_s0); - LogUtils_LogThreadId("../z_skelanime.c", 0x571); - osSyncPrintf("ref_tbl = %08x\n", phi_s1); - LogUtils_LogThreadId("../z_skelanime.c", 0x572); - osSyncPrintf("frame_tbl = %08x\n", temp_s3); - LogUtils_LogThreadId("../z_skelanime.c", 0x573); - osSyncPrintf("tbl = %08x\n", temp_s2); - } - else - { +/* SkelAnime_AnimateFrame + * Copies the rotation values from the rotation value table, indexed by the rotation index table + * When a rotation index is >= the animation limit, the output rotation value is copied from the frame's + * rotation value list, otherwise it is copied from the initial rotation value list +*/ +void func_800A1D8C(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *dst) +{ + AnimationRotationIndex* index; + AnimationRotationValue* rotationValueTable; + AnimationRotationValue* frameRotationValueTable; + AnimationHeader *animationHeader; + + s32 i; + u16 limit; - } - temp_v0_2 = phi_s1->unk0; - temp_s4 = phi_s4 + 1; - if (temp_v0_2 >= temp_v0->unkC) - { - phi_s0->unk0 = (s16) *(temp_s3 + (temp_v0_2 * 2)); - } - else - { - phi_s0->unk0 = (s16) *(temp_s2 + (temp_v0_2 * 2)); - } - temp_v0_3 = phi_s1->unk2; - if (temp_v0_3 >= temp_v0->unkC) - { - phi_s0->unk2 = (s16) *(temp_s3 + (temp_v0_3 * 2)); - } - else - { - phi_s0->unk2 = (s16) *(temp_s2 + (temp_v0_3 * 2)); - } - temp_v0_4 = phi_s1->unk4; - if (temp_v0_4 >= temp_v0->unkC) - { - phi_s0->unk4 = (s16) *(temp_s3 + (temp_v0_4 * 2)); - } - else - { - phi_s0->unk4 = (s16) *(temp_s2 + (temp_v0_4 * 2)); - } - phi_s0 = phi_s0 + 6; - phi_s1 = phi_s1 + 6; - phi_s4 = temp_s4; - phi_return = temp_v0_4; - if (temp_s4 != arg2) + animationHeader = SEGMENTED_TO_VIRTUAL(animation); + index = SEGMENTED_TO_VIRTUAL(animationHeader->rotationIndexSeg); + rotationValueTable = SEGMENTED_TO_VIRTUAL(animationHeader->rotationValueSeg); + frameRotationValueTable = &rotationValueTable[currentFrame]; + limit = animationHeader->limit; + + for(i = 0; i < limbCount; i++, dst++, index++) + { + if ((dst == NULL) || (index == NULL) || + (frameRotationValueTable == NULL) || + (rotationValueTable == NULL)) { - goto loop_2; + if(1) { } // Necessary to match. + LOG("../z_skelanime.c", 0x570, "out = %08x\n", dst); + LOG("../z_skelanime.c", 0x571, "ref_tbl = %08x\n", index); + LOG("../z_skelanime.c", 0x572, "frame_tbl = %08x\n", frameRotationValueTable); + LOG("../z_skelanime.c", 0x573, "tbl = %08x\n", rotationValueTable); } + + dst->x = index->x >= limit ? frameRotationValueTable[index->x] : rotationValueTable[index->x]; + dst->y = index->y >= limit ? frameRotationValueTable[index->y] : rotationValueTable[index->y]; + dst->z = index->z >= limit ? frameRotationValueTable[index->z] : rotationValueTable[index->z]; } - return phi_return; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A1D8C.s") -#endif s32 func_800A1FC8(s32 arg0) { @@ -672,7 +608,67 @@ s32 SkelAnime_GetFrameCount(u32 animation) #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A24A0.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A273C.s") +// SkelAnime_DrawSV2 +Gfx* func_800A273C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 dListCount, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Gfx* gfx) +{ + SkelLimbEntry* limbEntry; + char pad[4]; + Gfx* dList1; + Gfx* dList2; + Vec3f pos; + Vec3s rot; + Mtx* mtx; + + mtx = Graph_Alloc(globalCtx->state.gfxCtx, dListCount * sizeof(*mtx)); + if (limbTable == NULL) + { + osSyncPrintf("\x1b[31m"); + osSyncPrintf("Si2_draw2_SV():skelがNULLです。NULLを返します。\n"); + osSyncPrintf("\x1b[m"); + return NULL; + } + gSPSegment(gfx++, 0xD, mtx); + Matrix_Push(); + limbEntry = SEGMENTED_TO_VIRTUAL(*limbTable); + + pos.x = actorDrawTable->x; + pos.y = actorDrawTable->y; + pos.z = actorDrawTable->z; + + rot = actorDrawTable[1]; + + dList1 = dList2 = limbEntry->displayLists[0]; + + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList1, &pos, &rot, actor, &gfx) == 0)) + { + func_800D1340(&pos, &rot); + if (dList1 != NULL) + { + Matrix_ToMtx(mtx, "../z_skelanime.c", 0x6AE); + gSPMatrix(gfx++, mtx, G_MTX_LOAD); + gSPDisplayList(gfx++, dList1); + mtx++; + } + else + { + if (dList2 != NULL) + { + Matrix_ToMtx(mtx, "../z_skelanime.c", 0x6B5); + mtx++; + } + } + } + if (appendDlistFunc != NULL) + { + appendDlistFunc(globalCtx, 1, &dList2, &rot, actor, &gfx); + } + if (limbEntry->firstChildIndex != LIMB_DONE) + { + gfx = func_800A24A0(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, &mtx, gfx); + } + Matrix_Pull(); + return gfx; +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A29BC.s") @@ -696,6 +692,7 @@ s32 func_800A2E2C(s32 arg0){ return (s16)(*virt - 1); } +// Big boi function #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2E70.s") void func_800A32EC(u16* arg0) @@ -715,7 +712,8 @@ void func_800A3310(void* arg0) *D_8012A480Ptr |= D_801600B0; } -AnimationEntry* func_800A3334(AnimationContext* animationCtx, s32 arg1) +// SkelAnime_NextEntry +AnimationEntry* func_800A3334(AnimationContext* animationCtx, AnimationType type) { AnimationEntry *entry; s16 index = animationCtx->animationCount; @@ -726,80 +724,187 @@ AnimationEntry* func_800A3334(AnimationContext* animationCtx, s32 arg1) } animationCtx->animationCount = index + 1; entry = &animationCtx->entries[index]; - entry->unk_00 = arg1; + entry->type = type; return entry; } -#ifdef NON_MATCHING -typedef struct -{ - u32 unk_00; - u32 rom; -} anim; +/* + * These next 6 functions seem to inialize an entry in the global context's + * animation context. +*/ -void func_800A336C(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 limbCount, void* ram) +// SkelAnime_AnimationEntryType0Init +void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s32 limbCount, void* ram) { - s32 sp3C; - anim *sp38; - s32 sp30; - OSMesgQueue temp_a0; - s32 temp_a3; - s32 temp_at; - AnimationEntry* temp_ret; - DmaRequest req; + AnimationEntry* entry; + LinkAnimetionEntry *linkAnimetionEntry; + char pad[4]; - temp_ret = func_800A3334(&globalCtx->animationCtx, 0); - if (temp_ret != NULL) + entry = func_800A3334(&globalCtx->animationCtx, 0); + if (entry != NULL) { - temp_a0 = temp_ret->msgQueue; - sp38 = SEGMENTED_TO_VIRTUAL(arg1); - sp3C = temp_ret; - osCreateMesgQueue(temp_ret, &temp_ret->msg, 1); - temp_a3 = sizeof(Vec3s) * limbCount; - DmaMgr_SendRequest2(&req, ram, ((sp38->rom + (u32)&_link_animetionSegmentRomStart) - 0x7000000) + (temp_a3 * arg2), temp_a3, 0, &temp_ret->msgQueue, NULL, "../z_skelanime.c" , 0x7D4); + linkAnimetionEntry = SEGMENTED_TO_VIRTUAL(linkAnimetionSeg); + osCreateMesgQueue(&entry->types.type0.msgQueue, &entry->types.type0.msg, 1); + DmaMgr_SendRequest2(&entry->types.type0.req, ram, LINK_ANIMETION_OFFSET(linkAnimetionEntry->animationSegAddress, ((sizeof(Vec3s) * limbCount + 2) * frame)), + sizeof(Vec3s) * limbCount + 2, 0, &entry->types.type0.msgQueue, NULL, + "../z_skelanime.c" , 0x7D4); + } +} +//SkelAnime_AnimationEntryType1Init +void func_800A3478(GlobalContext* globalCtx, s32 vecCount, + Vec3s* dst, Vec3s* src) +{ + AnimationEntry* entry = func_800A3334(&globalCtx->animationCtx, 1); + if (entry != NULL) + { + entry->types.type1.unk_00 = D_801600B0; + entry->types.type1.vecCount = vecCount; + entry->types.type1.dst = dst; + entry->types.type1.src = src; + } +} +//SkelAnime_AnimationEntryType2Init +void func_800A34DC(GlobalContext* globalCtx, s32 arg1, + Vec3s* arg2, Vec3s* arg3, f32 arg4) +{ + AnimationEntry* entry = func_800A3334(&globalCtx->animationCtx, 2); + if (entry != NULL) + { + entry->types.type2.unk_00 = D_801600B0; + entry->types.type2.unk_01 = arg1; + entry->types.type2.unk_04 = arg2; + entry->types.type2.unk_08 = arg3; + entry->types.type2.unk_0C = arg4; + } +} +//SkelAnime_AnimationEntryType3Init +void func_800A3548(GlobalContext* globalCtx, s32 vecCount, + s32 dst, s32 src, s32 index) +{ + AnimationEntry* entry = func_800A3334(&globalCtx->animationCtx, 3); + if (entry != NULL) + { + entry->types.type3.unk_00 = D_801600B0; + entry->types.type3.vecCount = vecCount; + entry->types.type3.dst = dst; + entry->types.type3.src = src; + entry->types.type3.index = index; + } +} +//SkelAnime_AnimationEntryType4Init +void func_800A35B4(GlobalContext* globalCtx, s32 vecCount, + Vec3s* dst, Vec3s* src, u8* index) +{ + AnimationEntry* entry = func_800A3334(&globalCtx->animationCtx, 4); + if (entry != NULL) + { + entry->types.type4.unk_00 = D_801600B0; + entry->types.type4.vecCount = vecCount; + entry->types.type4.dst = dst; + entry->types.type4.src = src; + entry->types.type4.index = index; + } +} +//SkelAnime_AnimationEntryType4Init +void func_800A3620(GlobalContext* globalCtx, Actor* actor, + SkelAnime* skelAnime, f32 arg3) +{ + AnimationEntry* entry = func_800A3334(&globalCtx->animationCtx, 5); + if (entry != NULL) + { + entry->types.type5.actor = actor; + entry->types.type5.skelAnime = skelAnime; + entry->types.type5.unk_08 = arg3; } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A336C.s") -#endif -#undef NON_MATCHING - -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3478.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A34DC.s") +/* The next functions are callbacks to loading animations */ -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3548.s") +void func_800A3678(GlobalContext* globalCtx, AnimationEntryType0* entry) +{ + osRecvMesg(&entry->msgQueue, NULL, OS_MESG_BLOCK); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A35B4.s") +void func_800A36A4(GlobalContext* globalCtx, AnimationEntryType1* entry) +{ + s32 i; + Vec3s* dst; + Vec3s* src; + AnimationEntryRaw* genericEntry = (AnimationEntryRaw*)entry; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3620.s") + if ((genericEntry->raw[0] & D_8012A480) != 0) + { + return; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3678.s") + for(dst = entry->dst, src = entry->src, i = 0; + i < genericEntry->raw[1]; + i++) + { + *dst++ = *src++; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A36A4.s") +void func_800A3714(GlobalContext* globalCtx, AnimationEntryType2* entry) +{ + if ((entry->unk_00 & D_8012A480) == 0) + { + func_800A2E70(entry->unk_01, entry->unk_04, entry->unk_04, entry->unk_08, entry->unk_0C); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3714.s") +void func_800A3770(GlobalContext* globalCtx, AnimationEntryType3* entry) +{ + s32 i; + Vec3s* dst; + Vec3s* src; + u8* index; + AnimationEntryRaw* rawEntry = (AnimationEntryRaw*)entry; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3770.s") + if ((rawEntry->raw[0] & D_8012A480) == 0) + { + for(dst = entry->dst, src = entry->src, index = entry->index, i = 0; + i < rawEntry->raw[1]; i++, dst++, src++) + { + if(*index++) + { + *dst = *src; + } + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A37F0.s") +void func_800A37F0(GlobalContext* globalCtx, AnimationEntryType4* entry) +{ + s32 i; + Vec3s* dst; + Vec3s* src; + u8* index; + AnimationEntryRaw* rawEntry = (AnimationEntryRaw*)entry; -typedef struct { - Actor* actor; - SkelAnime* skelAnime; - f32 unk_8; -} UNK_800A3874_A1; + if ((rawEntry->raw[0] & D_8012A480) == 0) + { + for(dst = entry->dst, src = entry->src, index = entry->index, i = 0; + i < rawEntry->raw[1]; i++, dst++, src++) + { + if(*index++ < 1U) + { + *dst = *src; + } + } + } +} -void func_800A3874(s32 arg0, UNK_800A3874_A1* arg1) +void func_800A3874(GlobalContext* globalCtx, AnimationEntryType5* entry) { char pad[4]; - Actor* temp_v0 = arg1->actor; + Actor* actor = entry->actor; Vec3f pos; - func_800A54FC(arg1->skelAnime, &pos, temp_v0->shape.rot.y); - temp_v0->posRot.pos.x += pos.x * temp_v0->scale.x; - temp_v0->posRot.pos.y += pos.y * temp_v0->scale.y * arg1->unk_8; - temp_v0->posRot.pos.z += pos.z * temp_v0->scale.z; + func_800A54FC(entry->skelAnime, &pos, actor->shape.rot.y); + actor->posRot.pos.x += pos.x * actor->scale.x; + actor->posRot.pos.y += pos.y * actor->scale.y * entry->unk_08; + actor->posRot.pos.z += pos.z * actor->scale.z; } void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) @@ -808,7 +913,7 @@ void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) for(entry = animationCtx->entries; animationCtx->animationCount != 0; entry++, animationCtx->animationCount--) { - D_8012A484[entry->unk_00](globalCtx, entry->unk_04); + D_8012A484[entry->type](globalCtx, &entry->types); } D_801600B0 = 1; @@ -817,19 +922,18 @@ void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) #ifdef NON_MATCHING // some kind of init -void func_800A3F08(GlobalContext*,SkelAnime*,s32,f32,f32,f32,s8,f32); -void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skelAnimeInitSeg, s32 arg3, s8 arg4, Vec3s* actorDrawTable, s32 arg6, s32 arg7) +void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, s32 arg3, s8 arg4, Vec3s* actorDrawTable, s32 arg6, s32 arg7) { - SkelAnimeInit* skelAnimeInit; + SkelAnimeLimbHeader* limbHeader; u8 flag; size_t size; - skelAnimeInit = SEGMENTED_TO_VIRTUAL(skelAnimeInitSeg); + limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); skelAnime->unk_34 = arg4; - flag = arg4 & 2 == 0 ? 1U : skelAnimeInit->limbCount; + flag = arg4 & 2 == 0 ? 1U : limbHeader->limbCount; if ((arg4 & 2) != 0) { - flag = skelAnimeInit->limbCount; + flag = limbHeader->limbCount; } else { @@ -838,17 +942,17 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skelAnime if((arg4 & 1) != 0) { - flag += skelAnimeInit->limbCount; + flag += limbHeader->limbCount; } if((arg4 & 4) != 0) { - flag += skelAnimeInit->limbCount; + flag += limbHeader->limbCount; } skelAnime->limbCount = flag; - skelAnime->dListCount = skelAnimeInit->dListCount; - skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(skelAnimeInit->limbIndexSeg); + skelAnime->dListCount = limbHeader->dListCount; + skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); size = sizeof(Vec3s); if ((arg4 & 8) != 0) { @@ -884,15 +988,16 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skelAnime #endif #undef NON_MATCHING +// SkelAnime_SetUpdateFunc void func_800A3B8C(SkelAnime* skelAnime) { if (skelAnime->unk_01 < 2) { - skelAnime->mtxUpdate = &func_800A3D70; + skelAnime->animUpdate = &func_800A3D70; } else { - skelAnime->mtxUpdate = &func_800A3E0C; + skelAnime->animUpdate = &func_800A3E0C; } skelAnime->unk_28 = 0.0f; } @@ -900,7 +1005,7 @@ void func_800A3B8C(SkelAnime* skelAnime) //SkelAnime_FrameUpdateMatrixGlobalCtx void func_800A3BC0(GlobalContext* globalCtx, SkelAnime* skelAnime) { - skelAnime->mtxUpdate(globalCtx, skelAnime); + skelAnime->animUpdate(globalCtx, skelAnime); } #ifdef NON_MATCHING @@ -984,7 +1089,7 @@ s32 func_800A3E0C(GlobalContext* globalCtx, SkelAnime* skelAnime) skelAnime->animCurrentFrame -= skelAnime->unk_14; } } - } + } func_800A3C9C(globalCtx, skelAnime); return 0; } @@ -996,8 +1101,6 @@ void func_800A3EE8(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) skelAnime->unk_2C = 1.0f / arg2; } -s32 func_800A3BE4(GlobalContext* globalCtx, SkelAnime* skelAnime); -void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7); #ifdef NON_MATCHING void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7) { @@ -1059,7 +1162,6 @@ void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); } -void func_800A3478(GlobalContext*,u8,Vec3s*,Vec3s*); void func_800A41FC(GlobalContext* globalCtx, SkelAnime* skelAnime) { func_800A3478(globalCtx, skelAnime->limbCount, skelAnime->unk_24, skelAnime->actorDrawTbl); @@ -1096,21 +1198,7 @@ void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, s32 arg2, f32 func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, alignedAddr, arg6); } -#ifdef NON_MATCHING -void func_800A43B8(s32 arg0, void *arg1, ? arg2, f32 arg3, s32 arg4, f32 arg5, f32 arg6, s32 arg7) -{ - s32 sp28; - s32 temp_v0; - - func_800A336C(arg3, arg2, (s32) arg3, arg1->unk0, (s32) arg1->unk24); - temp_v0 = (arg7 + 0xF) & -0x10; - sp28 = temp_v0; - func_800A336C(arg0, arg4, (s32) arg5, arg1->unk0, temp_v0); - func_800A34DC(arg0, arg1->unk0, arg1->unk24, sp28, arg6); -} -#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A43B8.s") -#endif void func_800A4454(SkelAnime* skelAnime) { @@ -1118,38 +1206,36 @@ void func_800A4454(SkelAnime* skelAnime) func_800A3B8C(skelAnime); } - s32 func_800A4478(SkelAnime* skelAnime, f32 arg1, f32 updateRate) { - f32 temp_f0; + f32 updateSpeed; f32 temp_f12; - f32 temp_f2; + f32 nextFrame; - temp_f0 = skelAnime->animPlaybackSpeed * updateRate; - temp_f2 = skelAnime->animCurrentFrame - temp_f0; - if (temp_f2 < 0.0f) + updateSpeed = skelAnime->animPlaybackSpeed * updateRate; + nextFrame = skelAnime->animCurrentFrame - updateSpeed; + if (nextFrame < 0.0f) { - temp_f2 += skelAnime->unk_14; + nextFrame += skelAnime->unk_14; } else { - temp_f2 = temp_f2; - if (skelAnime->unk_14 <= temp_f2) + if (skelAnime->unk_14 <= nextFrame) { - temp_f2 = temp_f2 - skelAnime->unk_14; + nextFrame -= skelAnime->unk_14; } } if (arg1 == 0.0f) { - if (0.0f < temp_f0) + if (0.0f < updateSpeed) { arg1 = skelAnime->unk_14; } } - temp_f12 = (temp_f2 + temp_f0) - arg1; - if (0.0f <= (temp_f12 * temp_f0)) + temp_f12 = (nextFrame + updateSpeed) - arg1; + if (0.0f <= (temp_f12 * updateSpeed)) { - if (((temp_f12 - temp_f0) * temp_f0) < 0.0f) + if (((temp_f12 - updateSpeed) * updateSpeed) < 0.0f) { return 1; } @@ -1164,13 +1250,13 @@ s32 func_800A4530(SkelAnime* skelAnime, f32 arg1) return func_800A4478(skelAnime, arg1, updateRate); } -void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skelAnimeInitSeg, u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) +void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) { - SkelAnimeInit* skelAnimeInit; + SkelAnimeLimbHeader* limbHeader; - skelAnimeInit = SEGMENTED_TO_VIRTUAL(skelAnimeInitSeg); - skelAnime->limbCount = skelAnimeInit->limbCount + 1; - skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(skelAnimeInit->limbIndexSeg); + limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); + skelAnime->limbCount = limbHeader->limbCount + 1; + skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); if (actorDrawTable == NULL) { skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 2968); @@ -1197,16 +1283,15 @@ void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skelAnim func_800A52F8(skelAnime, animation); } } - -// another init -void func_800A46F8(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skelAnimeInitSeg, u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) +// SkelAnime_InitSV +void func_800A46F8(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) { - SkelAnimeInit *skelAnimeInit; + SkelAnimeLimbHeader *limbHeader; - skelAnimeInit = SEGMENTED_TO_VIRTUAL(skelAnimeInitSeg); - skelAnime->limbCount = skelAnimeInit->limbCount + 1; - skelAnime->dListCount = skelAnimeInit->dListCount; - skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(skelAnimeInit->limbIndexSeg); + limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); + skelAnime->limbCount = limbHeader->limbCount + 1; + skelAnime->dListCount = limbHeader->dListCount; + skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); if (actorDrawTable == NULL) { @@ -1234,15 +1319,14 @@ void func_800A46F8(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 skelAnime func_800A52F8(skelAnime, animation); } } - -// some kind of init -void func_800A487C(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 skelAnimeInitSeg, u32 animation) +// SkelAnime_InitSkin +void func_800A487C(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeaderSeg, u32 animation) { - SkelAnimeInit *skelAnimeInit; + SkelAnimeLimbHeader *limbHeader; - skelAnimeInit = SEGMENTED_TO_VIRTUAL(skelAnimeInitSeg); - skelAnime->limbCount = skelAnimeInit->limbCount + 1; - skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(skelAnimeInit->limbIndexSeg); + limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); + skelAnime->limbCount = limbHeader->limbCount + 1; + skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 3120); skelAnime->unk_24 = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 3121); if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) @@ -1262,20 +1346,20 @@ void func_800A49B0(SkelAnime* skelAnime) { if (skelAnime->unk_01 < 2) { - skelAnime->mtxUpdate = &func_800A4D9C; + skelAnime->animUpdate = &func_800A4D9C; return; } if (skelAnime->unk_01 < 4) { - skelAnime->mtxUpdate = &func_800A4EE0; + skelAnime->animUpdate = &func_800A4EE0; return; } - skelAnime->mtxUpdate = &func_800A4E38; + skelAnime->animUpdate = &func_800A4E38; } s32 SkelAnime_FrameUpdateMatrix(SkelAnime* skelAnime){ - return skelAnime->mtxUpdate(skelAnime); + return skelAnime->animUpdate(skelAnime); } #ifdef NON_MATCHING @@ -1347,27 +1431,28 @@ s32 func_800A4AD8(SkelAnime* skelAnime) // close void func_800A4C58(SkelAnime* skelAnime) { - Vec3s sp38[98]; + char pad[6]; f32 temp_f0; - f32 temp_f2; - s32 temp_f10; + f32 temp_f10; + Vec3s sp38[97]; s32 temp_f8; + f32 temp_f2; - func_800A1D8C(skelAnime->animCurrent, (s32) skelAnime->animPlaybackSpeed, skelAnime->limbCount, skelAnime->actorDrawTbl); + func_800A1D8C(skelAnime->animCurrent, (s32) skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); if ((skelAnime->unk_01 & 1) != 0) { temp_f8 = (s32) skelAnime->animCurrentFrame; temp_f10 = temp_f8; - temp_f8 = temp_f8 + 1; - temp_f2 = skelAnime->animCurrentFrame - (f32) temp_f10; + temp_f8++; + temp_f2 = skelAnime->animCurrentFrame - temp_f10; if (temp_f8 >= (s32) skelAnime->unk_14) { temp_f8 = 0; } func_800A1D8C(skelAnime->animCurrent, temp_f8, skelAnime->limbCount, sp38); - func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, &sp38, temp_f2); + func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, sp38, temp_f2); } - if (0.0f != skelAnime->unk_28) + if (skelAnime->unk_28 != 0) { skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.33333334f); temp_f0 = skelAnime->unk_28; @@ -1670,6 +1755,7 @@ s32 func_800A56C8(SkelAnime *skelAnime, f32 arg1) return func_800A4478(skelAnime, arg1, 1.0f); } +// SkelAnime_Free void func_800A56F0(SkelAnime *skelAnime, s32 arg1) { if (skelAnime->actorDrawTbl != NULL) @@ -1688,7 +1774,8 @@ void func_800A56F0(SkelAnime *skelAnime, s32 arg1) osSyncPrintf("morf_joint あきまへん!!\n"); // "morf_joint Akimane !!" } -s32 func_800A5774(SkelAnime* skelAnime, Vec3s *dst, Vec3s *src) +// SkelAnime_CopyVec3s +void func_800A5774(SkelAnime* skelAnime, Vec3s *dst, Vec3s *src) { s32 i; for(i = 0; i < skelAnime->limbCount; i++) diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 7fb710eea..23f02703b 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -336,7 +336,7 @@ static void EnWallmas_StandStart(EnWallmas *this) static void EnWallmas_WalkStart(EnWallmas *this) { - func_800A529C(&this->skelAnime, &D_060041F4, 3.0f, &this->actor); + func_800A529C(&this->skelAnime, &D_060041F4, 3.0f); this->actionFunc = (ActorFunc)&EnWallmas_Walk; this->actor.speedXZ = 3.0f; } -- cgit v1.2.3 From 6072055c8561c2504eb874b5005e2ab9c56d216e Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Sun, 22 Mar 2020 20:57:25 -0500 Subject: fix merge conflics --- src/code/z_skelanime.c | 112 ++++++++++++++++++++-- src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c | 2 +- 2 files changed, 107 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index 9c376faa3..b258a412a 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -1671,15 +1671,115 @@ void func_800A5408(SkelAnime* skelAnime) } #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5408.s") +#endif + +void func_800A5428(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* arg3) +{ + s32 i; + for(i = 0; i < skelAnime->limbCount; i++, dst++, src++) + { + if(*arg3++) + { + *dst = *src; + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5428.s") +void func_800A5490(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* arg3) +{ + s32 i; + for(i = 0;i < skelAnime->limbCount; i++, dst++, src++) + { + if(*arg3++ < 1U){ + *dst = *src; + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5490.s") +void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) +{ + f32 x; + f32 z; + f32 sin; + f32 cos; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A54FC.s") + if((skelAnime->unk_35 & 0x10) != 0) + { + pos->z = 0.0f; + pos->x = 0.0f; + } + else + { + x = (f32)skelAnime->actorDrawTbl->x; + z = (f32)skelAnime->actorDrawTbl->z; + sin = Math_Sins(angle); + cos = Math_Coss(angle); + pos->x = x * cos + z * sin; + pos->z = z * cos - x * sin; + x = (f32)skelAnime->unk_38; + z = (f32)skelAnime->unk_3C; + sin = Math_Sins(skelAnime->unk_36); + cos = Math_Coss(skelAnime->unk_36); + pos->x -= x * cos + z * sin; + pos->z -= z * cos - x * sin; + } + + skelAnime->unk_36 = angle; + skelAnime->unk_38 = skelAnime->actorDrawTbl->x; + skelAnime->actorDrawTbl->x = skelAnime->unk_3E; + skelAnime->unk_3C = skelAnime->actorDrawTbl->z; + skelAnime->actorDrawTbl->z = skelAnime->unk_42; + if((skelAnime->unk_35 & 2) != 0) + { + if((skelAnime->unk_35 & 0x10) != 0) + { + pos->y = 0.0f; + } + else + { + pos->y = (f32)(skelAnime->actorDrawTbl->y - skelAnime->unk_3A); + } + skelAnime->unk_3A = skelAnime->actorDrawTbl->y; + skelAnime->actorDrawTbl->y = skelAnime->unk_40; + } + else + { + pos->y = 0.0f; + skelAnime->unk_3A = skelAnime->actorDrawTbl->y; + } + skelAnime->unk_35 &= ~0x10; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A56C8.s") +s32 func_800A56C8(SkelAnime *skelAnime, f32 arg1) +{ + return func_800A4478(skelAnime, arg1, 1.0f); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A56F0.s") +// SkelAnime_Free +void func_800A56F0(SkelAnime *skelAnime, s32 arg1) +{ + if (skelAnime->actorDrawTbl != NULL) + { + ZeldaArena_FreeDebug(skelAnime->actorDrawTbl, "../z_skelanime.c", 3729); + } + else + { + osSyncPrintf("now_joint あきまへん!!\n"); // now_joint Akimane! ! + } + if (skelAnime->unk_24 != NULL) + { + ZeldaArena_FreeDebug(skelAnime->unk_24, "../z_skelanime.c", 3731); + return; + } + osSyncPrintf("morf_joint あきまへん!!\n"); // "morf_joint Akimane !!" +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5774.s") +// SkelAnime_CopyVec3s +void func_800A5774(SkelAnime* skelAnime, Vec3s *dst, Vec3s *src) +{ + s32 i; + for(i = 0; i < skelAnime->limbCount; i++) + { + *dst++ = *src++; + } +} diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index ffcb83d1b..630a05473 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -169,7 +169,7 @@ static void EnWallmas_StandStart(EnWallmas* this) { } static void EnWallmas_WalkStart(EnWallmas* this) { - func_800A529C(&this->skelAnime, &D_060041F4, 3.0f, &this->actor); + func_800A529C(&this->skelAnime, &D_060041F4, 3.0f); this->actionFunc = (ActorFunc)&EnWallmas_Walk; this->actor.speedXZ = 3.0f; } -- cgit v1.2.3 From 4c3b7644617a389f0cb664b63c257f90eb88fdc4 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 23 Mar 2020 01:31:03 -0400 Subject: Almost done --- .../actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c | 102 +++++++++++++++++++-- .../actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.h | 7 +- 2 files changed, 98 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c index 2454dc22e..980d584f1 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c +++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c @@ -7,7 +7,11 @@ void BgHakaMegane_Init(BgHakaMegane* this, GlobalContext* globalCtx); void BgHakaMegane_Destroy(BgHakaMegane* this, GlobalContext* globalCtx); void BgHakaMegane_Update(BgHakaMegane* this, GlobalContext* globalCtx); -/* +void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx); +void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx); +void func_8087DC64(BgHakaMegane* this, GlobalContext* globalCtx); +void func_8087DC94(BgHakaMegane* this, GlobalContext* globalCtx); + const ActorInit Bg_Haka_Megane_InitVars = { ACTOR_BG_HAKA_MEGANE, @@ -21,17 +25,97 @@ const ActorInit Bg_Haka_Megane_InitVars = (ActorFunc)BgHakaMegane_Update, NULL, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Megane/BgHakaMegane_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Megane/BgHakaMegane_Destroy.s") +InitChainEntry initChain[] = { + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), +}; + +UNK_TYPE D_8087DD54[] = { + 0x06001830, 0x06001AB8, 0x00000000, 0x06004330, 0x060044D0, 0x00000000, 0x06004780, + 0x06004940, 0x00000000, 0x06004B00, 0x00000000, 0x06004CC0, 0x00000000, +}; + +UNK_TYPE D_8087DD88[] = { + 0x06001060, 0x06001920, 0x060003F0, 0x060040F0, 0x060043B0, 0x06001120, 0x060045A0, + 0x060047F0, 0x060018F0, 0x060049B0, 0x06003CF0, 0x06004B70, 0x06002ED0, 0x00000000, +}; + +extern UNK_TYPE D_06001250; + +void BgHakaMegane_Init(BgHakaMegane* this, GlobalContext* globalCtx) { + Actor* thisx = &this->dyna.actor; + + Actor_ProcessInitChain(thisx, initChain); + DynaPolyInfo_SetActorMove(thisx, 0); + + if (thisx->params < 3) { + this->objBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_HAKACH_OBJECTS); + } else { + this->objBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_HAKA_OBJECTS); + } + + if (this->objBankIndex < 0) { + Actor_Kill(thisx); + } else { + this->actionFunc = (ActorFunc)func_8087DB24; + } +} + +void BgHakaMegane_Destroy(BgHakaMegane* this, GlobalContext* globalCtx) { + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); +} + +void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx) { + Actor* thisx = &this->dyna.actor; + s32 local_c; + u32 collision; + + if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) { + thisx->draw = (ActorFunc)func_8087DC94; + thisx->objBankIndex = this->objBankIndex; + Actor_SetObjectDependency(globalCtx, thisx); + if (globalCtx->roomCtx.curRoom.showInvisActors) { + this->actionFunc = (ActorFunc)func_8087DBF0; + collision = D_8087DD54[thisx->params]; + if (collision != 0) { + DynaPolyInfo_Alloc(&collision, &local_c); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c); + } + } else { + this->actionFunc = (ActorFunc)func_8087DC64; + } + } +} + +void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) { + Actor* thisx = &this->dyna.actor; + if (globalCtx->actorCtx.unk_03 != 0) { + thisx->flags |= 0x80; + func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + } else { + thisx->flags &= -0x81; + func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + } +} + +void func_8087DC64(BgHakaMegane* this, GlobalContext* globalCtx) { -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Megane/func_8087DB24.s") +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Megane/func_8087DBF0.s") +void BgHakaMegane_Update(BgHakaMegane* this, GlobalContext* globalCtx) { + this->actionFunc(this, globalCtx); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Megane/func_8087DC64.s") +void func_8087DC94(BgHakaMegane* this, GlobalContext* globalCtx) { + Actor* thisx = &this->dyna.actor; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Megane/BgHakaMegane_Update.s") + if ((thisx->flags & 0x80) == 0x80) { + Draw_DListXlu(globalCtx, D_8087DD88[thisx->params]); + } else { + Draw_DListOpa(globalCtx, D_8087DD88[thisx->params]); + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Haka_Megane/func_8087DC94.s") + if (thisx->params == 0) { + Draw_DListXlu(globalCtx, &D_06001250); + } +} diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.h b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.h index 06fb457b6..18d029aeb 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.h +++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.h @@ -5,8 +5,11 @@ #include typedef struct { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x20]; + /* 0x0000 */ DynaPolyActor dyna; + /* 0x0164 */ ActorFunc actionFunc; + /* 0x0168 */ char unk_168[0x1]; + /* 0x0169 */ s8 objBankIndex; + /* 0x016A */ char unk_16A[0x2]; } BgHakaMegane; // size = 0x016C extern const ActorInit Bg_Haka_Megane_InitVars; -- cgit v1.2.3 From 8c99bdd00f2fd191d69e02f5091bc36d3eb2a45d Mon Sep 17 00:00:00 2001 From: Lucas Shaw Date: Sun, 22 Mar 2020 22:55:05 -0700 Subject: ovl_Bg_Zg OK --- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 153 ++++++++++++++++++++++++++++---- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h | 6 +- 2 files changed, 141 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index 5bc3369bb..3db69157c 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -3,12 +3,26 @@ #define ROOM 0x00 #define FLAGS 0x00000010 -void BgZg_Init(BgZg* this, GlobalContext* globalCtx); -void BgZg_Destroy(BgZg* this, GlobalContext* globalCtx); -void BgZg_Update(BgZg* this, GlobalContext* globalCtx); -void BgZg_Draw(BgZg* this, GlobalContext* globalCtx); +static void BgZg_Init(BgZg* this, GlobalContext* globalCtx); +static void BgZg_Destroy(BgZg* this, GlobalContext* globalCtx); +static void BgZg_Update(BgZg* this, GlobalContext* globalCtx); +static void BgZg_Draw(BgZg* this, GlobalContext* globalCtx); +static void func_808C0C50(BgZg* this); +static s32 func_808C0C98(BgZg* this, GlobalContext* globalCtx); +static s32 func_808C0CC8(BgZg* this); +static void func_808C0CD4(BgZg* this, GlobalContext* globalCtx); +static void func_808C0D08(BgZg* this, GlobalContext* globalCtx); +static void func_808C0EEC(BgZg* this, GlobalContext* globalCtx); + +static const ActorFunc funcTbl[] = { (ActorFunc)func_808C0CD4, (ActorFunc)func_808C0D08 }; + +static InitChainEntry initChain[] = +{ + ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP) +}; + +static const ActorFunc funcTbl2[] = { (ActorFunc) func_808C0EEC }; -/* const ActorInit Bg_Zg_InitVars = { ACTOR_BG_ZG, @@ -22,23 +36,130 @@ const ActorInit Bg_Zg_InitVars = (ActorFunc)BgZg_Update, (ActorFunc)BgZg_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Zg/BgZg_Destroy.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Zg/func_808C0C50.s") +extern u32 D_06001080; +extern u32 D_060011D4; + +static void BgZg_Destroy(BgZg* this, GlobalContext* globalCtx) +{ + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); +} + +static void func_808C0C50(BgZg* this) +{ + Audio_PlaySoundGeneral(NA_SE_EV_METALDOOR_OPEN, &this->dyna.actor.unk_E4, 4, + &D_801333E0, &D_801333E0, &D_801333E8); +} + +static s32 func_808C0C98(BgZg* this, GlobalContext* globalCtx) +{ + Actor* thisx = &this->dyna.actor; + s32 flag; + flag = (thisx->params >> 8) & 0xFF; + return Flags_GetSwitch(globalCtx, flag); +} + +static s32 func_808C0CC8(BgZg* this) +{ + s32 flag = this->dyna.actor.params & 0xFF; + return flag; +} + +static void func_808C0CD4(BgZg* this, GlobalContext* globalCtx) +{ + if (func_808C0C98(this, globalCtx) != 0) + { + this->funcIndex = 1; + func_808C0C50(this); + } +} + +static void func_808C0D08(BgZg* this, GlobalContext* globalCtx) +{ + Actor* thisx = &this->dyna.actor; + + thisx->posRot.pos.y += (kREG(16) + 20.0f) * 1.2f; + if ((((kREG(17) + 200.0f) * 1.2f) + thisx->initPosRot.pos.y) <= thisx->posRot.pos.y) + { + Actor_Kill(thisx); + } +} + +static void BgZg_Update(BgZg *this,GlobalContext *globalCtx) +{ + s32 funcIndex = this->funcIndex; + + if (((funcIndex < 0) || (1 < funcIndex)) || (funcTbl[funcIndex] == NULL)) + { + // Translates to: "Main Mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!" + osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); + } + else + { + funcTbl[funcIndex](&this->dyna.actor, globalCtx); + } + +} + +static void BgZg_Init(BgZg* this, GlobalContext* globalCtx) { + s32 sp20[2]; + Actor* thisx = &this->dyna.actor; + u32 local_c; + + Actor_ProcessInitChain(thisx, initChain); + DynaPolyInfo_SetActorMove(thisx, DPM_UNK); + local_c = 0; + DynaPolyInfo_Alloc(&D_060011D4, &local_c); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c); + if ((func_808C0CC8(this) == 8) || (func_808C0CC8(this) == 9)) + { + thisx->scale.x = thisx->scale.x * 1.3f; + thisx->scale.z = thisx->scale.z * 1.3f; + thisx->scale.y = thisx->scale.y * 1.2f; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Zg/func_808C0C98.s") + else + { -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Zg/func_808C0CC8.s") + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Zg/func_808C0CD4.s") + this->funcIndex = 0; + this->unk_168 = 0; + if (func_808C0C98(this, globalCtx) != 0) + { + Actor_Kill(thisx); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Zg/func_808C0D08.s") +static void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) +{ + + GraphicsContext* gfxCtx; + GraphicsContext* tempgfxCtx; // oddly needs this to match + Gfx* gfxArr[4]; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Zg/BgZg_Update.s") + tempgfxCtx = globalCtx->state.gfxCtx; + gfxCtx = tempgfxCtx; + func_800C6AC4(gfxArr, gfxCtx, "../z_bg_zg.c", 311); + + func_80093D18(gfxCtx); + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_bg_zg.c", 315), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Zg/BgZg_Init.s") + gSPDisplayList(gfxCtx->polyOpa.p++, &D_06001080); + func_800C6B54(gfxArr, gfxCtx, "../z_bg_zg.c", 320); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Zg/func_808C0EEC.s") +static void BgZg_Draw(BgZg* this, GlobalContext* globalCtx) +{ + s32 funcIndex = this->unk_168; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Zg/BgZg_Draw.s") + if (((funcIndex < 0) || (0 < funcIndex)) || funcTbl2[funcIndex] == 0) + { + // Translates to: "Drawing mode is wrong !!!!!!!!!!!!!!!!!!!!!!!!!" + osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); + } + else + { + funcTbl2[funcIndex](this, globalCtx); + } +} \ No newline at end of file diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h index 3a856be40..6d7d6f7dc 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h @@ -3,11 +3,13 @@ #include #include +#include typedef struct { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x20]; + /* 0x0000 */ DynaPolyActor dyna; + /* 0x0164 */ s32 funcIndex; + /* 0x0168 */ s32 unk_168; } BgZg; // size = 0x016C extern const ActorInit Bg_Zg_InitVars; -- cgit v1.2.3 From 62e7a8c0376666f7ab8ca49e44eb831d6232d61e Mon Sep 17 00:00:00 2001 From: Lucas Shaw Date: Sun, 22 Mar 2020 22:55:37 -0700 Subject: formatting fix --- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index 3db69157c..3573d46fc 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -101,7 +101,8 @@ static void BgZg_Update(BgZg *this,GlobalContext *globalCtx) } -static void BgZg_Init(BgZg* this, GlobalContext* globalCtx) { +static void BgZg_Init(BgZg* this, GlobalContext* globalCtx) +{ s32 sp20[2]; Actor* thisx = &this->dyna.actor; u32 local_c; -- cgit v1.2.3 From a3ba02618bee825dfa82c9c6a321b24534e5a3b5 Mon Sep 17 00:00:00 2001 From: Lucas Shaw Date: Sun, 22 Mar 2020 23:40:12 -0700 Subject: Added description --- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index eb70ada22..95aee2317 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -1,3 +1,9 @@ +/* + * File: z_bg_zg.c + * Overlay: ovl_Bg_Zg + * Description: Metal bars (Ganon's Castle) + */ + #include "z_bg_zg.h" #define ROOM 0x00 -- cgit v1.2.3 From 385f77fb480f7bdebbc72e0b24e528085e0dadf2 Mon Sep 17 00:00:00 2001 From: dark-samus Date: Mon, 23 Mar 2020 06:35:43 -0400 Subject: match the final non-matching in boot! --- src/boot/yaz0.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/boot/yaz0.c b/src/boot/yaz0.c index 5954e28aa..379d4ca46 100644 --- a/src/boot/yaz0.c +++ b/src/boot/yaz0.c @@ -51,10 +51,6 @@ void* Yaz0_NextDMA(void* curSrcPos) { return dst; } -#ifdef NON_MATCHING -// has an extra check at the start of the small compressed loop -// along with an extra move instruction -// maybe some regalloc differences besides these issues void Yaz0_DecompressImpl(Yaz0Header* hdr, u8* dst) { u32 bitIdx; u8* src; @@ -63,46 +59,45 @@ void Yaz0_DecompressImpl(Yaz0Header* hdr, u8* dst) { u32 nibble; u8* backPtr; s32 chunkSize; - u32 curDecBit; u32 off; bitIdx = 0; - src = hdr->data; + src = (u8*)hdr->data; dstEnd = dst + hdr->decSize; do { if (bitIdx == 0) { - if ((sYaz0MaxPtr < (u32)src) && (sYaz0CurSize != 0)) + if ((sYaz0MaxPtr < (u32)src) && (sYaz0CurSize != 0)) { src = Yaz0_NextDMA(src); + } chunkHeader = *src++; bitIdx = 8; } - curDecBit = chunkHeader & (1 << 7); - chunkHeader <<= 1; - - if (curDecBit) { // uncompressed - *dst++ = *src++; + if (chunkHeader & (1 << 7)) { // uncompressed + *dst = *src; + dst++; + src++; } else { // compressed + off = ((*src & 0xF) << 8 | *(src + 1)); nibble = *src >> 4; - backPtr = dst - (*(src + 1) | (*src & 0xF) << 8); + backPtr = dst - off; src += 2; chunkSize = (nibble == 0) // N = chunkSize; B = back offset ? *src++ + 0x12 // 3 bytes 0B BB NN : nibble + 2; // 2 bytes NB BB - for (off = chunkSize; off > 0; off--) + do { *dst++ = *(backPtr++ - 1); + chunkSize--; + } while (chunkSize != 0); } - + chunkHeader <<= 1; bitIdx--; } while (dst != dstEnd); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/boot/yaz0/Yaz0_DecompressImpl.s") -#endif void Yaz0_Decompress(u32 romStart, void* dst, u32 size) { sYaz0CurRomStart = romStart; -- cgit v1.2.3 From 3c53052726b72a63ebddb866524fe9cdc3832c5a Mon Sep 17 00:00:00 2001 From: shawlucas Date: Mon, 23 Mar 2020 12:10:06 -0700 Subject: updated ovl_bg_zg formatting --- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 99 ++++++++++++--------------------- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h | 3 +- 2 files changed, 37 insertions(+), 65 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index 95aee2317..d647ff1e6 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -22,15 +22,11 @@ static void func_808C0EEC(BgZg* this, GlobalContext* globalCtx); static const ActorFunc funcTbl[] = { (ActorFunc)func_808C0CD4, (ActorFunc)func_808C0D08 }; -static InitChainEntry initChain[] = -{ - ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP) -}; +static InitChainEntry initChain[] = { ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP) }; -static const ActorFunc funcTbl2[] = { (ActorFunc) func_808C0EEC }; +static const ActorFunc funcTbl2[] = { (ActorFunc)func_808C0EEC }; -const ActorInit Bg_Zg_InitVars = -{ +const ActorInit Bg_Zg_InitVars = { ACTOR_BG_ZG, ACTORTYPE_NPC, ROOM, @@ -46,100 +42,80 @@ const ActorInit Bg_Zg_InitVars = extern u32 D_06001080; extern u32 D_060011D4; -static void BgZg_Destroy(BgZg* this, GlobalContext* globalCtx) -{ +static void BgZg_Destroy(BgZg* this, GlobalContext* globalCtx) { DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); } -static void func_808C0C50(BgZg* this) -{ - Audio_PlaySoundGeneral(NA_SE_EV_METALDOOR_OPEN, &this->dyna.actor.unk_E4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); +static void func_808C0C50(BgZg* this) { + Audio_PlaySoundGeneral(NA_SE_EV_METALDOOR_OPEN, &this->dyna.actor.unk_E4, 4, &D_801333E0, &D_801333E0, &D_801333E8); } -static s32 func_808C0C98(BgZg* this, GlobalContext* globalCtx) -{ +static s32 func_808C0C98(BgZg* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; s32 flag; flag = (thisx->params >> 8) & 0xFF; return Flags_GetSwitch(globalCtx, flag); } -static s32 func_808C0CC8(BgZg* this) -{ +static s32 func_808C0CC8(BgZg* this) { s32 flag = this->dyna.actor.params & 0xFF; return flag; } -static void func_808C0CD4(BgZg* this, GlobalContext* globalCtx) -{ - if (func_808C0C98(this, globalCtx) != 0) - { +static void func_808C0CD4(BgZg* this, GlobalContext* globalCtx) { + if (func_808C0C98(this, globalCtx) != 0) { this->funcIndex = 1; func_808C0C50(this); } } -static void func_808C0D08(BgZg* this, GlobalContext* globalCtx) -{ +static void func_808C0D08(BgZg* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; - + thisx->posRot.pos.y += (kREG(16) + 20.0f) * 1.2f; - if ((((kREG(17) + 200.0f) * 1.2f) + thisx->initPosRot.pos.y) <= thisx->posRot.pos.y) - { + if ((((kREG(17) + 200.0f) * 1.2f) + thisx->initPosRot.pos.y) <= thisx->posRot.pos.y) { Actor_Kill(thisx); - } + } } -static void BgZg_Update(BgZg *this,GlobalContext *globalCtx) -{ - s32 funcIndex = this->funcIndex; - - if (((funcIndex < 0) || (1 < funcIndex)) || (funcTbl[funcIndex] == NULL)) - { - // Translates to: "Main Mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!" - osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); - } - else - { - funcTbl[funcIndex](&this->dyna.actor, globalCtx); - } +static void BgZg_Update(BgZg* this, GlobalContext* globalCtx) { + s32 funcIndex = this->funcIndex; + if (((funcIndex < 0) || (1 < funcIndex)) || (funcTbl[funcIndex] == NULL)) { + // Translates to: "Main Mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!" + osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); + } else { + funcTbl[funcIndex](&this->dyna.actor, globalCtx); + } } -static void BgZg_Init(BgZg* this, GlobalContext* globalCtx) -{ +static void BgZg_Init(BgZg* this, GlobalContext* globalCtx) { s32 sp20[2]; Actor* thisx = &this->dyna.actor; u32 local_c; - + Actor_ProcessInitChain(thisx, initChain); DynaPolyInfo_SetActorMove(thisx, DPM_UNK); local_c = 0; DynaPolyInfo_Alloc(&D_060011D4, &local_c); this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c); - if ((func_808C0CC8(this) == 8) || (func_808C0CC8(this) == 9)) - { + if ((func_808C0CC8(this) == 8) || (func_808C0CC8(this) == 9)) { thisx->scale.x = thisx->scale.x * 1.3f; thisx->scale.z = thisx->scale.z * 1.3f; thisx->scale.y = thisx->scale.y * 1.2f; - } - - else - { + } + else { } this->funcIndex = 0; this->unk_168 = 0; - if (func_808C0C98(this, globalCtx) != 0) - { + if (func_808C0C98(this, globalCtx) != 0) { Actor_Kill(thisx); } } -static void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) -{ +static void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) { GraphicsContext* gfxCtx; GraphicsContext* tempgfxCtx; // oddly needs this to match @@ -148,25 +124,22 @@ static void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) tempgfxCtx = globalCtx->state.gfxCtx; gfxCtx = tempgfxCtx; func_800C6AC4(gfxArr, gfxCtx, "../z_bg_zg.c", 311); - + func_80093D18(gfxCtx); - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_bg_zg.c", 315), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_bg_zg.c", 315), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfxCtx->polyOpa.p++, &D_06001080); func_800C6B54(gfxArr, gfxCtx, "../z_bg_zg.c", 320); } -static void BgZg_Draw(BgZg* this, GlobalContext* globalCtx) -{ +static void BgZg_Draw(BgZg* this, GlobalContext* globalCtx) { s32 funcIndex = this->unk_168; - if (((funcIndex < 0) || (0 < funcIndex)) || funcTbl2[funcIndex] == 0) - { + if (((funcIndex < 0) || (0 < funcIndex)) || funcTbl2[funcIndex] == 0) { // Translates to: "Drawing mode is wrong !!!!!!!!!!!!!!!!!!!!!!!!!" osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); - } - else - { + } else { funcTbl2[funcIndex](this, globalCtx); } -} \ No newline at end of file +} diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h index 6d7d6f7dc..28b0fc049 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h @@ -5,8 +5,7 @@ #include #include -typedef struct -{ +typedef struct { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ s32 funcIndex; /* 0x0168 */ s32 unk_168; -- cgit v1.2.3 From 1042a72fd2439e6c0f02bb37bb221572caa4d157 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 23 Mar 2020 15:23:50 -0400 Subject: Done --- .../actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c | 64 ++++++++++++---------- 1 file changed, 35 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c index 980d584f1..a3d30e082 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c +++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c @@ -1,16 +1,22 @@ +/* + * File: z_bg_haka_megane.c + * Overlay: ovl_Bg_Haka_Megane + * Description: + */ + #include "z_bg_haka_megane.h" #define ROOM 0x00 #define FLAGS 0x000000B0 -void BgHakaMegane_Init(BgHakaMegane* this, GlobalContext* globalCtx); -void BgHakaMegane_Destroy(BgHakaMegane* this, GlobalContext* globalCtx); -void BgHakaMegane_Update(BgHakaMegane* this, GlobalContext* globalCtx); +static void BgHakaMegane_Init(BgHakaMegane* this, GlobalContext* globalCtx); +static void BgHakaMegane_Destroy(BgHakaMegane* this, GlobalContext* globalCtx); +static void BgHakaMegane_Update(BgHakaMegane* this, GlobalContext* globalCtx); -void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx); -void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx); -void func_8087DC64(BgHakaMegane* this, GlobalContext* globalCtx); -void func_8087DC94(BgHakaMegane* this, GlobalContext* globalCtx); +static void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx); +static void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx); +static void func_8087DC64(BgHakaMegane* this, GlobalContext* globalCtx); +static void func_8087DC94(BgHakaMegane* this, GlobalContext* globalCtx); const ActorInit Bg_Haka_Megane_InitVars = { @@ -26,23 +32,23 @@ const ActorInit Bg_Haka_Megane_InitVars = NULL, }; -InitChainEntry initChain[] = { +static InitChainEntry initChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -UNK_TYPE D_8087DD54[] = { +static UNK_TYPE collisions[] = { 0x06001830, 0x06001AB8, 0x00000000, 0x06004330, 0x060044D0, 0x00000000, 0x06004780, 0x06004940, 0x00000000, 0x06004B00, 0x00000000, 0x06004CC0, 0x00000000, }; -UNK_TYPE D_8087DD88[] = { +static UNK_TYPE dlists[] = { 0x06001060, 0x06001920, 0x060003F0, 0x060040F0, 0x060043B0, 0x06001120, 0x060045A0, - 0x060047F0, 0x060018F0, 0x060049B0, 0x06003CF0, 0x06004B70, 0x06002ED0, 0x00000000, + 0x060047F0, 0x060018F0, 0x060049B0, 0x06003CF0, 0x06004B70, 0x06002ED0, }; extern UNK_TYPE D_06001250; -void BgHakaMegane_Init(BgHakaMegane* this, GlobalContext* globalCtx) { +static void BgHakaMegane_Init(BgHakaMegane* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; Actor_ProcessInitChain(thisx, initChain); @@ -61,25 +67,25 @@ void BgHakaMegane_Init(BgHakaMegane* this, GlobalContext* globalCtx) { } } -void BgHakaMegane_Destroy(BgHakaMegane* this, GlobalContext* globalCtx) { +static void BgHakaMegane_Destroy(BgHakaMegane* this, GlobalContext* globalCtx) { DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); } -void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx) { - Actor* thisx = &this->dyna.actor; - s32 local_c; - u32 collision; +static void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx) { + s32 localC; + UNK_TYPE collision; if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) { - thisx->draw = (ActorFunc)func_8087DC94; - thisx->objBankIndex = this->objBankIndex; - Actor_SetObjectDependency(globalCtx, thisx); + this->dyna.actor.objBankIndex = this->objBankIndex; + this->dyna.actor.draw = (ActorFunc)func_8087DC94; + Actor_SetObjectDependency(globalCtx, &this->dyna.actor); if (globalCtx->roomCtx.curRoom.showInvisActors) { this->actionFunc = (ActorFunc)func_8087DBF0; - collision = D_8087DD54[thisx->params]; + collision = collisions[this->dyna.actor.params]; if (collision != 0) { - DynaPolyInfo_Alloc(&collision, &local_c); - this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c); + DynaPolyInfo_Alloc(collision, &localC); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, + &this->dyna.actor, localC); } } else { this->actionFunc = (ActorFunc)func_8087DC64; @@ -87,7 +93,7 @@ void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx) { } } -void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) { +static void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; if (globalCtx->actorCtx.unk_03 != 0) { thisx->flags |= 0x80; @@ -98,21 +104,21 @@ void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) { } } -void func_8087DC64(BgHakaMegane* this, GlobalContext* globalCtx) { +static void func_8087DC64(BgHakaMegane* this, GlobalContext* globalCtx) { } -void BgHakaMegane_Update(BgHakaMegane* this, GlobalContext* globalCtx) { +static void BgHakaMegane_Update(BgHakaMegane* this, GlobalContext* globalCtx) { this->actionFunc(this, globalCtx); } -void func_8087DC94(BgHakaMegane* this, GlobalContext* globalCtx) { +static void func_8087DC94(BgHakaMegane* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; if ((thisx->flags & 0x80) == 0x80) { - Draw_DListXlu(globalCtx, D_8087DD88[thisx->params]); + Draw_DListXlu(globalCtx, dlists[thisx->params]); } else { - Draw_DListOpa(globalCtx, D_8087DD88[thisx->params]); + Draw_DListOpa(globalCtx, dlists[thisx->params]); } if (thisx->params == 0) { -- cgit v1.2.3 From ea3f70cd68885187b7b910b658240b7ad9c62a89 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 23 Mar 2020 15:25:23 -0400 Subject: Formatting --- src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c index a3d30e082..b0ac30bc0 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c +++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c @@ -18,8 +18,7 @@ static void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx); static void func_8087DC64(BgHakaMegane* this, GlobalContext* globalCtx); static void func_8087DC94(BgHakaMegane* this, GlobalContext* globalCtx); -const ActorInit Bg_Haka_Megane_InitVars = -{ +const ActorInit Bg_Haka_Megane_InitVars = { ACTOR_BG_HAKA_MEGANE, ACTORTYPE_PROP, ROOM, @@ -84,8 +83,8 @@ static void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx) { collision = collisions[this->dyna.actor.params]; if (collision != 0) { DynaPolyInfo_Alloc(collision, &localC); - this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, - &this->dyna.actor, localC); + this->dyna.dynaPolyId = + DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC); } } else { this->actionFunc = (ActorFunc)func_8087DC64; @@ -105,7 +104,6 @@ static void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) { } static void func_8087DC64(BgHakaMegane* this, GlobalContext* globalCtx) { - } static void BgHakaMegane_Update(BgHakaMegane* this, GlobalContext* globalCtx) { -- cgit v1.2.3 From 032a8de42fd86b27ad2d12ac9c37940e38bf3fd5 Mon Sep 17 00:00:00 2001 From: shawlucas Date: Mon, 23 Mar 2020 12:59:58 -0700 Subject: Made suggested changes --- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 30 +++++++++++++----------------- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h | 4 ++-- 2 files changed, 15 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index d647ff1e6..65a69c214 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -20,11 +20,11 @@ static void func_808C0CD4(BgZg* this, GlobalContext* globalCtx); static void func_808C0D08(BgZg* this, GlobalContext* globalCtx); static void func_808C0EEC(BgZg* this, GlobalContext* globalCtx); -static const ActorFunc funcTbl[] = { (ActorFunc)func_808C0CD4, (ActorFunc)func_808C0D08 }; +static const ActorFunc actionFuncs[] = { (ActorFunc)func_808C0CD4, (ActorFunc)func_808C0D08, }; -static InitChainEntry initChain[] = { ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP) }; +static InitChainEntry initChain[] = { ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP), }; -static const ActorFunc funcTbl2[] = { (ActorFunc)func_808C0EEC }; +static const ActorFunc drawFuncs[] = { (ActorFunc)func_808C0EEC, }; const ActorInit Bg_Zg_InitVars = { ACTOR_BG_ZG, @@ -52,8 +52,7 @@ static void func_808C0C50(BgZg* this) { static s32 func_808C0C98(BgZg* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; - s32 flag; - flag = (thisx->params >> 8) & 0xFF; + s32 flag = (thisx->params >> 8) & 0xFF; return Flags_GetSwitch(globalCtx, flag); } @@ -64,7 +63,7 @@ static s32 func_808C0CC8(BgZg* this) { static void func_808C0CD4(BgZg* this, GlobalContext* globalCtx) { if (func_808C0C98(this, globalCtx) != 0) { - this->funcIndex = 1; + this->action = 1; func_808C0C50(this); } } @@ -79,13 +78,13 @@ static void func_808C0D08(BgZg* this, GlobalContext* globalCtx) { } static void BgZg_Update(BgZg* this, GlobalContext* globalCtx) { - s32 funcIndex = this->funcIndex; + s32 action = this->action; - if (((funcIndex < 0) || (1 < funcIndex)) || (funcTbl[funcIndex] == NULL)) { + if (((action < 0) || (1 < action)) || (actionFuncs[action] == NULL)) { // Translates to: "Main Mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!" osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); } else { - funcTbl[funcIndex](&this->dyna.actor, globalCtx); + actionFuncs[action](&this->dyna.actor, globalCtx); } } @@ -105,11 +104,8 @@ static void BgZg_Init(BgZg* this, GlobalContext* globalCtx) { thisx->scale.y = thisx->scale.y * 1.2f; } - else { - } - - this->funcIndex = 0; - this->unk_168 = 0; + this->action = 0; + this->drawConfig = 0; if (func_808C0C98(this, globalCtx) != 0) { Actor_Kill(thisx); } @@ -134,12 +130,12 @@ static void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) { } static void BgZg_Draw(BgZg* this, GlobalContext* globalCtx) { - s32 funcIndex = this->unk_168; + s32 action = this->drawConfig; - if (((funcIndex < 0) || (0 < funcIndex)) || funcTbl2[funcIndex] == 0) { + if (((action < 0) || (action > 0)) || drawFuncs[action] == 0) { // Translates to: "Drawing mode is wrong !!!!!!!!!!!!!!!!!!!!!!!!!" osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); } else { - funcTbl2[funcIndex](this, globalCtx); + drawFuncs[action](this, globalCtx); } } diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h index 28b0fc049..ab959e101 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h @@ -7,8 +7,8 @@ typedef struct { /* 0x0000 */ DynaPolyActor dyna; - /* 0x0164 */ s32 funcIndex; - /* 0x0168 */ s32 unk_168; + /* 0x0164 */ s32 action; + /* 0x0168 */ s32 drawConfig; } BgZg; // size = 0x016C extern const ActorInit Bg_Zg_InitVars; -- cgit v1.2.3 From 7bc9d3863c9800a699a9ec84c21e33bd5d3936d3 Mon Sep 17 00:00:00 2001 From: shawlucas Date: Mon, 23 Mar 2020 13:00:47 -0700 Subject: Made more suggested changes --- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index 65a69c214..b1a828e3c 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -132,7 +132,7 @@ static void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) { static void BgZg_Draw(BgZg* this, GlobalContext* globalCtx) { s32 action = this->drawConfig; - if (((action < 0) || (action > 0)) || drawFuncs[action] == 0) { + if (((action < 0) || (action > 0)) || drawFuncs[action] == NULL) { // Translates to: "Drawing mode is wrong !!!!!!!!!!!!!!!!!!!!!!!!!" osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); } else { -- cgit v1.2.3 From d2729f9d88b8bdb63397338e4979d619304a2b1e Mon Sep 17 00:00:00 2001 From: Roman971 Date: Mon, 23 Mar 2020 21:18:53 +0100 Subject: Split z_path.c and Rename some small files and functions --- src/code/code_80026B00.c | 26 ------------ src/code/code_8006C360.c | 70 ------------------------------- src/code/z_effect.c | 26 ++++++++++++ src/code/z_face_reaction.c | 70 +++++++++++++++++++++++++++++++ src/code/z_path.c | 8 ++++ src/overlays/actors/ovl_En_Dog/z_en_dog.c | 4 +- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 6 +-- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 4 +- 8 files changed, 111 insertions(+), 103 deletions(-) delete mode 100644 src/code/code_80026B00.c delete mode 100644 src/code/code_8006C360.c create mode 100644 src/code/z_effect.c create mode 100644 src/code/z_face_reaction.c create mode 100644 src/code/z_path.c (limited to 'src') diff --git a/src/code/code_80026B00.c b/src/code/code_80026B00.c deleted file mode 100644 index beb5006ee..000000000 --- a/src/code/code_80026B00.c +++ /dev/null @@ -1,26 +0,0 @@ -#include -#include - -GlobalContext* func_80026B00(void) { - return D_80157DA0; -} - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80026B00/func_80026B0C.s") - -void func_80026C1C(u8* arg0) { - arg0[0] = 0; - arg0[1] = 0; - arg0[2] = 0; -} - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80026B00/func_80026C2C.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80026B00/Effect_Add.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80026B00/func_80026E74.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80026B00/func_80026F70.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80026B00/func_8002709C.s") - -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80026B00/func_800271A8.s") diff --git a/src/code/code_8006C360.c b/src/code/code_8006C360.c deleted file mode 100644 index 01cf89b4d..000000000 --- a/src/code/code_8006C360.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include - -u16 D_8011F3F0[60][9] = { - { 0x0000, 0x7124, 0x7127, 0x7126, 0x7125, 0x7127, 0x7124, 0x7125, 0x7127 }, - { 0x0000, 0x7128, 0x7129, 0x7128, 0x7128, 0x7128, 0x7128, 0x712A, 0x712B }, - { 0x0000, 0x7128, 0x712B, 0x7128, 0x7128, 0x7129, 0x7128, 0x712B, 0x7128 }, - { 0x0000, 0x7128, 0x7129, 0x7128, 0x7128, 0x7128, 0x7128, 0x712A, 0x712B }, - { 0x0000, 0x7128, 0x7129, 0x712B, 0x7128, 0x7128, 0x7128, 0x7129, 0x7128 }, - { 0x0000, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712F }, - { 0x0000, 0x712C, 0x712C, 0x712C, 0x712E, 0x712C, 0x712C, 0x712F, 0x712F }, - { 0x0000, 0x712C, 0x712C, 0x712C, 0x712F, 0x712C, 0x712C, 0x712F, 0x712F }, - { 0x0000, 0x7130, 0x7132, 0x7133, 0x7130, 0x7130, 0x7131, 0x7132, 0x7131 }, - { 0x0000, 0x7134, 0x7137, 0x7135, 0x7134, 0x7136, 0x7135, 0x7134, 0x7135 }, - { 0x0000, 0x7138, 0x713A, 0x7138, 0x7139, 0x713A, 0x7138, 0x7139, 0x713B }, - { 0x0000, 0x7144, 0x7146, 0x7144, 0x7146, 0x7147, 0x7145, 0x7145, 0x7147 }, - { 0x0000, 0x7148, 0x7149, 0x7149, 0x714A, 0x714A, 0x714B, 0x7149, 0x714B }, - { 0x0000, 0x714C, 0x714D, 0x714C, 0x714C, 0x714E, 0x714C, 0x714E, 0x714F }, - { 0x0000, 0x7150, 0x7153, 0x7152, 0x7150, 0x7151, 0x7153, 0x7153, 0x7151 }, - { 0x0000, 0x7155, 0x7156, 0x7157, 0x7154, 0x7156, 0x7156, 0x7156, 0x7156 }, - { 0x0000, 0x715A, 0x7159, 0x715B, 0x715A, 0x715A, 0x7158, 0x7158, 0x715B }, - { 0x0000, 0x715E, 0x715D, 0x715D, 0x715F, 0x715E, 0x715C, 0x715C, 0x715D }, - { 0x0000, 0x7163, 0x7162, 0x7160, 0x7163, 0x7160, 0x7161, 0x7161, 0x7160 }, - { 0x0000, 0x7164, 0x7166, 0x7164, 0x7167, 0x7164, 0x7164, 0x7164, 0x7167 }, - { 0x0000, 0x716B, 0x7169, 0x7168, 0x716B, 0x716A, 0x716B, 0x716B, 0x716A }, - { 0x0000, 0x716C, 0x716D, 0x716F, 0x716C, 0x716E, 0x716E, 0x716E, 0x716F }, - { 0x0000, 0x7171, 0x7173, 0x7170, 0x7172, 0x0000, 0x0000, 0x0000, 0x0000 }, - { 0x0000, 0x7176, 0x7177, 0x7174, 0x7174, 0x7175, 0x7174, 0x7174, 0x7177 }, - { 0x0000, 0x7178, 0x7179, 0x7179, 0x717B, 0x717A, 0x717B, 0x717A, 0x717B }, - { 0x0000, 0x717D, 0x717C, 0x717C, 0x717D, 0x717F, 0x717C, 0x717E, 0x717D }, - { 0x0000, 0x7183, 0x7181, 0x7180, 0x7183, 0x7182, 0x7183, 0x7181, 0x7183 }, - { 0x0000, 0x7184, 0x7186, 0x7185, 0x7186, 0x7184, 0x7187, 0x7186, 0x7184 }, - { 0x0000, 0x71A4, 0x71A6, 0x71A5, 0x0000, 0x71A6, 0x71A6, 0x71A6, 0x71A7 }, - { 0x0000, 0x7188, 0x7188, 0x7189, 0x7188, 0x7189, 0x718B, 0x718A, 0x7189 }, - { 0x0000, 0x718C, 0x718C, 0x718D, 0x718C, 0x718E, 0x718F, 0x718D, 0x718C }, - { 0x0000, 0x7190, 0x7190, 0x7191, 0x7192, 0x7191, 0x7193, 0x7190, 0x7191 }, - { 0x0000, 0x7196, 0x7194, 0x7195, 0x7196, 0x7197, 0x7194, 0x7196, 0x7195 }, - { 0x0000, 0x7199, 0x719A, 0x7198, 0x7198, 0x719A, 0x719A, 0x719B, 0x7198 }, - { 0x0000, 0x719D, 0x719C, 0x719E, 0x719D, 0x719D, 0x719C, 0x719F, 0x719E }, - { 0x0000, 0x71A1, 0x71A0, 0x71A1, 0x71A2, 0x71A1, 0x71A2, 0x71A3, 0x71A2 }, - { 0x0000, 0x711C, 0x711E, 0x711C, 0x711F, 0x711E, 0x711C, 0x711D, 0x711F }, - { 0x0000, 0x7104, 0x7105, 0x7107, 0x7107, 0x7105, 0x7106, 0x7107, 0x7107 }, - { 0x0000, 0x7107, 0x7105, 0x7107, 0x7107, 0x7106, 0x7107, 0x7107, 0x7105 }, - { 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 }, - { 0x0000, 0x7113, 0x7113, 0x7113, 0x7113, 0x7113, 0x7113, 0x7111, 0x7113 }, - { 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 }, - { 0x0000, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7113 }, - { 0x0000, 0x7101, 0x7100, 0x7102, 0x7103, 0x7101, 0x7100, 0x7102, 0x7103 }, - { 0x0000, 0x7100, 0x7102, 0x7100, 0x7100, 0x7100, 0x7100, 0x7100, 0x7102 }, - { 0x0000, 0x710A, 0x7109, 0x7109, 0x710A, 0x710B, 0x7108, 0x7109, 0x710B }, - { 0x0000, 0x7117, 0x7112, 0x7113, 0x7110, 0x710C, 0x7117, 0x710E, 0x7112 }, - { 0x0000, 0x710D, 0x710F, 0x710C, 0x7112, 0x710D, 0x710C, 0x710C, 0x710F }, - { 0x0000, 0x710A, 0x7109, 0x711A, 0x710A, 0x7109, 0x7108, 0x710B, 0x7109 }, - { 0x0000, 0x710C, 0x710F, 0x7113, 0x7110, 0x710D, 0x7112, 0x7116, 0x710D }, - { 0x0000, 0x7115, 0x7114, 0x7114, 0x7115, 0x7114, 0x7114, 0x7116, 0x7117 }, - { 0x0000, 0x7113, 0x710F, 0x7113, 0x7110, 0x710C, 0x711A, 0x710D, 0x7112 }, - { 0x0000, 0x7101, 0x7102, 0x7103, 0x7101, 0x7100, 0x7100, 0x7102, 0x7100 }, - { 0x0000, 0x7112, 0x710E, 0x7112, 0x710E, 0x710D, 0x7112, 0x710E, 0x710F }, - { 0x0000, 0x7142, 0x7141, 0x7142, 0x7143, 0x7140, 0x7140, 0x7141, 0x7143 }, - { 0x0000, 0x713C, 0x713D, 0x713D, 0x713E, 0x713E, 0x713F, 0x713D, 0x713F }, - { 0x0000, 0x7101, 0x7102, 0x7103, 0x7101, 0x7100, 0x7100, 0x7102, 0x7100 }, - { 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 }, - { 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x7105, 0x7105, 0x7107, 0x7107 }, - { 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x710C, 0x7105, 0x7107, 0x7107 }, -}; - -u16 func_8006C360(GlobalContext* globalCtx, u32 idx) { - u8 mask = func_8008F080(globalCtx); - return D_8011F3F0[idx][mask]; -} diff --git a/src/code/z_effect.c b/src/code/z_effect.c new file mode 100644 index 000000000..dfe367d13 --- /dev/null +++ b/src/code/z_effect.c @@ -0,0 +1,26 @@ +#include +#include + +GlobalContext* func_80026B00(void) { + return D_80157DA0; +} + +#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect/func_80026B0C.s") + +void func_80026C1C(u8* arg0) { + arg0[0] = 0; + arg0[1] = 0; + arg0[2] = 0; +} + +#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect/func_80026C2C.s") + +#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect/Effect_Add.s") + +#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect/func_80026E74.s") + +#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect/func_80026F70.s") + +#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect/func_8002709C.s") + +#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect/func_800271A8.s") diff --git a/src/code/z_face_reaction.c b/src/code/z_face_reaction.c new file mode 100644 index 000000000..1bfe18b7c --- /dev/null +++ b/src/code/z_face_reaction.c @@ -0,0 +1,70 @@ +#include +#include + +u16 sReactionTextIds[60][9] = { + { 0x0000, 0x7124, 0x7127, 0x7126, 0x7125, 0x7127, 0x7124, 0x7125, 0x7127 }, + { 0x0000, 0x7128, 0x7129, 0x7128, 0x7128, 0x7128, 0x7128, 0x712A, 0x712B }, + { 0x0000, 0x7128, 0x712B, 0x7128, 0x7128, 0x7129, 0x7128, 0x712B, 0x7128 }, + { 0x0000, 0x7128, 0x7129, 0x7128, 0x7128, 0x7128, 0x7128, 0x712A, 0x712B }, + { 0x0000, 0x7128, 0x7129, 0x712B, 0x7128, 0x7128, 0x7128, 0x7129, 0x7128 }, + { 0x0000, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712D, 0x712F }, + { 0x0000, 0x712C, 0x712C, 0x712C, 0x712E, 0x712C, 0x712C, 0x712F, 0x712F }, + { 0x0000, 0x712C, 0x712C, 0x712C, 0x712F, 0x712C, 0x712C, 0x712F, 0x712F }, + { 0x0000, 0x7130, 0x7132, 0x7133, 0x7130, 0x7130, 0x7131, 0x7132, 0x7131 }, + { 0x0000, 0x7134, 0x7137, 0x7135, 0x7134, 0x7136, 0x7135, 0x7134, 0x7135 }, + { 0x0000, 0x7138, 0x713A, 0x7138, 0x7139, 0x713A, 0x7138, 0x7139, 0x713B }, + { 0x0000, 0x7144, 0x7146, 0x7144, 0x7146, 0x7147, 0x7145, 0x7145, 0x7147 }, + { 0x0000, 0x7148, 0x7149, 0x7149, 0x714A, 0x714A, 0x714B, 0x7149, 0x714B }, + { 0x0000, 0x714C, 0x714D, 0x714C, 0x714C, 0x714E, 0x714C, 0x714E, 0x714F }, + { 0x0000, 0x7150, 0x7153, 0x7152, 0x7150, 0x7151, 0x7153, 0x7153, 0x7151 }, + { 0x0000, 0x7155, 0x7156, 0x7157, 0x7154, 0x7156, 0x7156, 0x7156, 0x7156 }, + { 0x0000, 0x715A, 0x7159, 0x715B, 0x715A, 0x715A, 0x7158, 0x7158, 0x715B }, + { 0x0000, 0x715E, 0x715D, 0x715D, 0x715F, 0x715E, 0x715C, 0x715C, 0x715D }, + { 0x0000, 0x7163, 0x7162, 0x7160, 0x7163, 0x7160, 0x7161, 0x7161, 0x7160 }, + { 0x0000, 0x7164, 0x7166, 0x7164, 0x7167, 0x7164, 0x7164, 0x7164, 0x7167 }, + { 0x0000, 0x716B, 0x7169, 0x7168, 0x716B, 0x716A, 0x716B, 0x716B, 0x716A }, + { 0x0000, 0x716C, 0x716D, 0x716F, 0x716C, 0x716E, 0x716E, 0x716E, 0x716F }, + { 0x0000, 0x7171, 0x7173, 0x7170, 0x7172, 0x0000, 0x0000, 0x0000, 0x0000 }, + { 0x0000, 0x7176, 0x7177, 0x7174, 0x7174, 0x7175, 0x7174, 0x7174, 0x7177 }, + { 0x0000, 0x7178, 0x7179, 0x7179, 0x717B, 0x717A, 0x717B, 0x717A, 0x717B }, + { 0x0000, 0x717D, 0x717C, 0x717C, 0x717D, 0x717F, 0x717C, 0x717E, 0x717D }, + { 0x0000, 0x7183, 0x7181, 0x7180, 0x7183, 0x7182, 0x7183, 0x7181, 0x7183 }, + { 0x0000, 0x7184, 0x7186, 0x7185, 0x7186, 0x7184, 0x7187, 0x7186, 0x7184 }, + { 0x0000, 0x71A4, 0x71A6, 0x71A5, 0x0000, 0x71A6, 0x71A6, 0x71A6, 0x71A7 }, + { 0x0000, 0x7188, 0x7188, 0x7189, 0x7188, 0x7189, 0x718B, 0x718A, 0x7189 }, + { 0x0000, 0x718C, 0x718C, 0x718D, 0x718C, 0x718E, 0x718F, 0x718D, 0x718C }, + { 0x0000, 0x7190, 0x7190, 0x7191, 0x7192, 0x7191, 0x7193, 0x7190, 0x7191 }, + { 0x0000, 0x7196, 0x7194, 0x7195, 0x7196, 0x7197, 0x7194, 0x7196, 0x7195 }, + { 0x0000, 0x7199, 0x719A, 0x7198, 0x7198, 0x719A, 0x719A, 0x719B, 0x7198 }, + { 0x0000, 0x719D, 0x719C, 0x719E, 0x719D, 0x719D, 0x719C, 0x719F, 0x719E }, + { 0x0000, 0x71A1, 0x71A0, 0x71A1, 0x71A2, 0x71A1, 0x71A2, 0x71A3, 0x71A2 }, + { 0x0000, 0x711C, 0x711E, 0x711C, 0x711F, 0x711E, 0x711C, 0x711D, 0x711F }, + { 0x0000, 0x7104, 0x7105, 0x7107, 0x7107, 0x7105, 0x7106, 0x7107, 0x7107 }, + { 0x0000, 0x7107, 0x7105, 0x7107, 0x7107, 0x7106, 0x7107, 0x7107, 0x7105 }, + { 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 }, + { 0x0000, 0x7113, 0x7113, 0x7113, 0x7113, 0x7113, 0x7113, 0x7111, 0x7113 }, + { 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 }, + { 0x0000, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7113 }, + { 0x0000, 0x7101, 0x7100, 0x7102, 0x7103, 0x7101, 0x7100, 0x7102, 0x7103 }, + { 0x0000, 0x7100, 0x7102, 0x7100, 0x7100, 0x7100, 0x7100, 0x7100, 0x7102 }, + { 0x0000, 0x710A, 0x7109, 0x7109, 0x710A, 0x710B, 0x7108, 0x7109, 0x710B }, + { 0x0000, 0x7117, 0x7112, 0x7113, 0x7110, 0x710C, 0x7117, 0x710E, 0x7112 }, + { 0x0000, 0x710D, 0x710F, 0x710C, 0x7112, 0x710D, 0x710C, 0x710C, 0x710F }, + { 0x0000, 0x710A, 0x7109, 0x711A, 0x710A, 0x7109, 0x7108, 0x710B, 0x7109 }, + { 0x0000, 0x710C, 0x710F, 0x7113, 0x7110, 0x710D, 0x7112, 0x7116, 0x710D }, + { 0x0000, 0x7115, 0x7114, 0x7114, 0x7115, 0x7114, 0x7114, 0x7116, 0x7117 }, + { 0x0000, 0x7113, 0x710F, 0x7113, 0x7110, 0x710C, 0x711A, 0x710D, 0x7112 }, + { 0x0000, 0x7101, 0x7102, 0x7103, 0x7101, 0x7100, 0x7100, 0x7102, 0x7100 }, + { 0x0000, 0x7112, 0x710E, 0x7112, 0x710E, 0x710D, 0x7112, 0x710E, 0x710F }, + { 0x0000, 0x7142, 0x7141, 0x7142, 0x7143, 0x7140, 0x7140, 0x7141, 0x7143 }, + { 0x0000, 0x713C, 0x713D, 0x713D, 0x713E, 0x713E, 0x713F, 0x713D, 0x713F }, + { 0x0000, 0x7101, 0x7102, 0x7103, 0x7101, 0x7100, 0x7100, 0x7102, 0x7100 }, + { 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 }, + { 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x7105, 0x7105, 0x7107, 0x7107 }, + { 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x710C, 0x7105, 0x7107, 0x7107 }, +}; + +u16 Text_GetFaceReaction(GlobalContext* globalCtx, u32 reactionSet) { + u8 currentMask = func_8008F080(globalCtx); + return sReactionTextIds[reactionSet][currentMask]; +} diff --git a/src/code/z_path.c b/src/code/z_path.c new file mode 100644 index 000000000..7b54d58c2 --- /dev/null +++ b/src/code/z_path.c @@ -0,0 +1,8 @@ +#include +#include + +#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_GetByIndex.s") + +#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_OrientAndGetDistSq.s") + +#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_CopyLastPoint.s") diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index c9e1d06c2..c1f3ac053 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -224,7 +224,7 @@ static s32 EnDog_Orient(EnDog* this, GlobalContext* globalCtx) { s16 targetYaw; f32 waypointDistSq; - waypointDistSq = func_8008E520(&this->actor, this->path, this->waypoint, &targetYaw); + waypointDistSq = Path_OrientAndGetDistSq(&this->actor, this->path, this->waypoint, &targetYaw); Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, targetYaw, 10, 1000, 1); if ((waypointDistSq > 0.0f) && (waypointDistSq < 1000.0f)) { @@ -261,7 +261,7 @@ static void EnDog_Init(EnDog* this, GlobalContext* globalCtx) { Actor_SetScale(&this->actor, 0.0075f); this->waypoint = 0; this->actor.gravity = -1.0f; - this->path = func_8008E4E0(globalCtx, (s16)((this->actor.params & 0x00F0) >> 4), 0xF); + this->path = Path_GetByIndex(globalCtx, (this->actor.params & 0x00F0) >> 4, 0xF); switch (globalCtx->sceneNum) { case SCENE_MARKET_NIGHT: diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index b8c98d055..fece576dd 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -67,13 +67,13 @@ extern D_060005EC; extern D_06003DC0; static void EnMs_SetOfferText(EnMs* this, GlobalContext* globalCtx) { - this->actor.textId = func_8006C360(globalCtx, 0x1B); + this->actor.textId = Text_GetFaceReaction(globalCtx, 0x1B); if (this->actor.textId == 0) { if (BEANS_BOUGHT >= 10) { this->actor.textId = 0x406B; - return; + } else { + this->actor.textId = offerTextIds[BEANS_BOUGHT]; } - this->actor.textId = offerTextIds[BEANS_BOUGHT]; } } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 954447e62..836c6a85d 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -335,7 +335,7 @@ s32 EnTk_Orient(EnTk* this, GlobalContext* globalCtx) { } path = &globalCtx->setupPathList[0]; - point = SEGMENTED_TO_VIRTUAL(path->path); + point = SEGMENTED_TO_VIRTUAL(path->points); point += this->currentWaypoint; dx = point->x - this->actor.posRot.pos.x; @@ -359,7 +359,7 @@ s32 EnTk_Orient(EnTk* this, GlobalContext* globalCtx) { u16 func_80B1C54C(GlobalContext* globalCtx, Actor* a1) { u16 ret; - ret = func_8006C360(globalCtx, 14); + ret = Text_GetFaceReaction(globalCtx, 14); if (ret != 0) { return ret; } -- cgit v1.2.3 From a9d4fec1134990b3df70fe82e68013af07927d84 Mon Sep 17 00:00:00 2001 From: Roman971 Date: Mon, 23 Mar 2020 21:19:24 +0100 Subject: Decompile Path_GetByIndex --- src/code/z_path.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/code/z_path.c b/src/code/z_path.c index 7b54d58c2..011421bd6 100644 --- a/src/code/z_path.c +++ b/src/code/z_path.c @@ -1,7 +1,17 @@ #include #include -#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_GetByIndex.s") +Path* Path_GetByIndex(GlobalContext* globalCtx, s16 index, s16 max) { + Path* path; + + if (index != max) { + path = &globalCtx->setupPathList[index]; + } else { + path = NULL; + } + + return path; +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_OrientAndGetDistSq.s") -- cgit v1.2.3 From e88ea64835d97a4ead14ec0b8028e1ecff211471 Mon Sep 17 00:00:00 2001 From: Roman971 Date: Mon, 23 Mar 2020 21:19:54 +0100 Subject: Decompile Path_OrientAndGetDistSq --- src/code/z_path.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/code/z_path.c b/src/code/z_path.c index 011421bd6..d1d81286d 100644 --- a/src/code/z_path.c +++ b/src/code/z_path.c @@ -13,6 +13,24 @@ Path* Path_GetByIndex(GlobalContext* globalCtx, s16 index, s16 max) { return path; } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_OrientAndGetDistSq.s") +f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw) { + f32 dx; + f32 dz; + Vec3s* pointPos; + + if (path == NULL) { + return -1.0; + } + + pointPos = SEGMENTED_TO_VIRTUAL(path->points); + pointPos = &pointPos[waypoint]; + + dx = pointPos->x - actor->posRot.pos.x; + dz = pointPos->z - actor->posRot.pos.z; + + *yaw = Math_atan2f(dx, dz) * (32768 / M_PI); + + return SQ(dx) + SQ(dz); +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_CopyLastPoint.s") -- cgit v1.2.3 From 7fcc79fc4d506693c0da71c4c8a4bbf00f8dfb33 Mon Sep 17 00:00:00 2001 From: Roman971 Date: Mon, 23 Mar 2020 21:20:30 +0100 Subject: Decompile Path_CopyLastPoint --- src/code/z_path.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/code/z_path.c b/src/code/z_path.c index d1d81286d..03dc6d6f6 100644 --- a/src/code/z_path.c +++ b/src/code/z_path.c @@ -33,4 +33,14 @@ f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw) { return SQ(dx) + SQ(dz); } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_CopyLastPoint.s") +void Path_CopyLastPoint(Path* path, Vec3f* dest) { + Vec3s* pointPos; + + if (path != NULL) { + pointPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[path->count - 1]; + + dest->x = pointPos->x; + dest->y = pointPos->y; + dest->z = pointPos->z; + } +} -- cgit v1.2.3 From 0d93e48035c5f0a7f729919d395c6a4f6eb12980 Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Mon, 23 Mar 2020 16:31:24 -0500 Subject: skelanime WIP, name Matrix_TranslateThanRotateZYX, match Matrix_Translate --- src/code/sys_matrix.c | 168 ++++++++---- src/code/z_debug_display.c | 2 +- src/code/z_skelanime.c | 410 +++++++++++++++++++--------- src/overlays/gamestates/ovl_title/z_title.c | 2 +- 4 files changed, 401 insertions(+), 181 deletions(-) (limited to 'src') diff --git a/src/code/sys_matrix.c b/src/code/sys_matrix.c index b300f189d..688b21500 100644 --- a/src/code/sys_matrix.c +++ b/src/code/sys_matrix.c @@ -2,13 +2,16 @@ #include // clang-format off -Mtx gMtxClear = { +Mtx gMtxClear = +{ 65536, 0, 1, 0, 0, 65536, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, }; -MtxF gMtxFClear = { + +MtxF gMtxFClear = +{ 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, @@ -19,67 +22,88 @@ MtxF gMtxFClear = { MtxF* sMatrixStack; // "Matrix_stack" MtxF* sCurrentMatrix; // "Matrix_now" -void Matrix_Init(GameState* gameState) { +void Matrix_Init(GameState* gameState) +{ sCurrentMatrix = Game_Alloc(gameState, 20 * sizeof(MtxF), "../sys_matrix.c", 153); sMatrixStack = sCurrentMatrix; } -void Matrix_Push(void) { +void Matrix_Push(void) +{ Matrix_MtxFCopy(sCurrentMatrix + 1, sCurrentMatrix); sCurrentMatrix++; } -void Matrix_Pull(void) { +void Matrix_Pull(void) +{ sCurrentMatrix--; - if (sCurrentMatrix < sMatrixStack) { + if (sCurrentMatrix < sMatrixStack) + { __assert("Matrix_now >= Matrix_stack", "../sys_matrix.c", 176); } } -void Matrix_Get(MtxF* dest) { +void Matrix_Get(MtxF* dest) +{ Matrix_MtxFCopy(dest, sCurrentMatrix); } -void Matrix_Put(MtxF* src) { +void Matrix_Put(MtxF* src) +{ Matrix_MtxFCopy(sCurrentMatrix, src); } -MtxF* Matrix_GetCurrent(void) { +MtxF* Matrix_GetCurrent(void) +{ return sCurrentMatrix; } -void Matrix_Mult(MtxF* mf, u8 mode) { +void Matrix_Mult(MtxF* mf, u8 mode) +{ MtxF* cmf = Matrix_GetCurrent(); - if (mode == MTXMODE_APPLY) { + if (mode == MTXMODE_APPLY) + { func_800A6FA0(cmf, mf, cmf); - } else { + } + else + { Matrix_MtxFCopy(sCurrentMatrix, mf); } } -#ifdef NON_MATCHING -// minor ordering and regalloc differences void Matrix_Translate(f32 x, f32 y, f32 z, u8 mode) { MtxF* cmf = sCurrentMatrix; - - if (mode == MTXMODE_APPLY) { - cmf->wx += cmf->xx * x + cmf->yx * y + cmf->zx * z; - cmf->wy += cmf->xy * x + cmf->yy * y + cmf->zy * z; - cmf->wz += cmf->xz * x + cmf->yz * y + cmf->zz * z; - cmf->ww += cmf->xw * x + cmf->yw * y + cmf->zw * z; - } else { + f32 tx; + f32 ty; + + if (mode == MTXMODE_APPLY) + { + tx = cmf->xx; + ty = cmf->yx; + cmf->wx += tx * x + ty * y + cmf->zx * z; + tx = cmf->xy; + ty = cmf->yy; + cmf->wy += tx * x + ty * y + cmf->zy * z; + tx = cmf->xz; + ty = cmf->yz; + cmf->wz += tx * x + ty * y + cmf->zz * z; + tx = cmf->xw; + ty = cmf->yw; + cmf->ww += tx * x + ty * y + cmf->zw * z; + } + else + { func_800A7A24(cmf, x, y, z); } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/sys_matrix/Matrix_Translate.s") -#endif -void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode) { +void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode) +{ MtxF* cmf = sCurrentMatrix; - if (mode == MTXMODE_APPLY) { + if (mode == MTXMODE_APPLY) + { cmf->xx *= x; cmf->xy *= x; cmf->xz *= x; @@ -92,20 +116,25 @@ void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode) { cmf->xw *= x; cmf->yw *= y; cmf->zw *= z; - } else { + } + else + { func_800A76A4(cmf, x, y, z); } } -void Matrix_RotateX(f32 x, u8 mode) { +void Matrix_RotateX(f32 x, u8 mode) +{ MtxF* cmf; f32 sin; f32 cos; f32 temp1; f32 temp2; - if (mode == MTXMODE_APPLY) { - if (x != 0) { + if (mode == MTXMODE_APPLY) + { + if (x != 0) + { cmf = sCurrentMatrix; sin = sinf(x); @@ -131,13 +160,18 @@ void Matrix_RotateX(f32 x, u8 mode) { cmf->yw = temp1 * cos + temp2 * sin; cmf->zw = temp2 * cos - temp1 * sin; } - } else { + } + else + { cmf = sCurrentMatrix; - if (x != 0) { + if (x != 0) + { sin = sinf(x); cos = cosf(x); - } else { + } + else + { sin = 0.0f; cos = 1.0f; } @@ -161,15 +195,18 @@ void Matrix_RotateX(f32 x, u8 mode) { } } -void Matrix_RotateY(f32 y, u8 mode) { +void Matrix_RotateY(f32 y, u8 mode) +{ MtxF* cmf; f32 sin; f32 cos; f32 temp1; f32 temp2; - if (mode == MTXMODE_APPLY) { - if (y != 0) { + if (mode == MTXMODE_APPLY) + { + if (y != 0) + { cmf = sCurrentMatrix; sin = sinf(y); @@ -195,13 +232,18 @@ void Matrix_RotateY(f32 y, u8 mode) { cmf->xw = temp1 * cos - temp2 * sin; cmf->zw = temp1 * sin + temp2 * cos; } - } else { + } + else + { cmf = sCurrentMatrix; - if (y != 0) { + if (y != 0) + { sin = sinf(y); cos = cosf(y); - } else { + } + else + { sin = 0.0f; cos = 1.0f; } @@ -225,15 +267,18 @@ void Matrix_RotateY(f32 y, u8 mode) { } } -void Matrix_RotateZ(f32 z, u8 mode) { +void Matrix_RotateZ(f32 z, u8 mode) +{ MtxF* cmf; f32 sin; f32 cos; f32 temp1; f32 temp2; - if (mode == MTXMODE_APPLY) { - if (z != 0) { + if (mode == MTXMODE_APPLY) + { + if (z != 0) + { cmf = sCurrentMatrix; sin = sinf(z); @@ -289,7 +334,13 @@ void Matrix_RotateZ(f32 z, u8 mode) { } } -void Matrix_RotateXYZ(s16 x, s16 y, s16 z, u8 mode) { +/* + * Rotates the top of the matrix stack by `z` degrees, then + * rotates that matrix by `y` degrees, then rotates that matrix + * by `x` degrees. + * Original Name: Matrix_RotateXYZ, changed to reflect rotation order. +*/ +void Matrix_RotateZYX(s16 x, s16 y, s16 z, u8 mode) { MtxF* cmf = sCurrentMatrix; f32 temp1; f32 temp2; @@ -374,43 +425,48 @@ void Matrix_RotateXYZ(s16 x, s16 y, s16 z, u8 mode) { } } -void func_800D1340(Vec3f* arg0, Vec3s* arg1) { +/* + * Translates the top of the matrix stack by `translation` units, + * then rotates that matrix by `rotation` in Z-Y-X order +*/ +void Matrix_TranslateThenRotateZYX(Vec3f* translation, Vec3s* rotation) +{ MtxF* cmf = sCurrentMatrix; f32 sin; f32 cos; f32 temp1; f32 temp2; - sin = Math_Sins(arg1->z); - cos = Math_Coss(arg1->z); + sin = Math_Sins(rotation->z); + cos = Math_Coss(rotation->z); temp1 = cmf->xx; temp2 = cmf->yx; - cmf->wx += temp1 * arg0->x + temp2 * arg0->y + cmf->zx * arg0->z; + cmf->wx += temp1 * translation->x + temp2 * translation->y + cmf->zx * translation->z; cmf->xx = temp1 * cos + temp2 * sin; cmf->yx = temp2 * cos - temp1 * sin; temp1 = cmf->xy; temp2 = cmf->yy; - cmf->wy += temp1 * arg0->x + temp2 * arg0->y + cmf->zy * arg0->z; + cmf->wy += temp1 * translation->x + temp2 * translation->y + cmf->zy * translation->z; cmf->xy = temp1 * cos + temp2 * sin; cmf->yy = temp2 * cos - temp1 * sin; temp1 = cmf->xz; temp2 = cmf->yz; - cmf->wz += temp1 * arg0->x + temp2 * arg0->y + cmf->zz * arg0->z; + cmf->wz += temp1 * translation->x + temp2 * translation->y + cmf->zz * translation->z; cmf->xz = temp1 * cos + temp2 * sin; cmf->yz = temp2 * cos - temp1 * sin; temp1 = cmf->xw; temp2 = cmf->yw; - cmf->ww += temp1 * arg0->x + temp2 * arg0->y + cmf->zw * arg0->z; + cmf->ww += temp1 * translation->x + temp2 * translation->y + cmf->zw * translation->z; cmf->xw = temp1 * cos + temp2 * sin; cmf->yw = temp2 * cos - temp1 * sin; - if (arg1->y != 0) { - sin = Math_Sins(arg1->y); - cos = Math_Coss(arg1->y); + if (rotation->y != 0) { + sin = Math_Sins(rotation->y); + cos = Math_Coss(rotation->y); temp1 = cmf->xx; temp2 = cmf->zx; @@ -433,9 +489,9 @@ void func_800D1340(Vec3f* arg0, Vec3s* arg1) { cmf->zw = temp1 * sin + temp2 * cos; } - if (arg1->x != 0) { - sin = Math_Sins(arg1->x); - cos = Math_Coss(arg1->x); + if (rotation->x != 0) { + sin = Math_Sins(rotation->x); + cos = Math_Coss(rotation->x); temp1 = cmf->yx; temp2 = cmf->zx; diff --git a/src/code/z_debug_display.c b/src/code/z_debug_display.c index e27afafeb..e96ccdc2f 100644 --- a/src/code/z_debug_display.c +++ b/src/code/z_debug_display.c @@ -83,7 +83,7 @@ static void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, u32 texture, Glo Matrix_Translate(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, MTXMODE_NEW); Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, MTXMODE_APPLY); Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY); - Matrix_RotateXYZ(dispObj->rot.x, dispObj->rot.y, dispObj->rot.z, MTXMODE_APPLY); + Matrix_RotateZYX(dispObj->rot.x, dispObj->rot.y, dispObj->rot.z, MTXMODE_APPLY); gDPLoadTextureBlock(gfxCtx->polyXlu.p++, texture, G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index b258a412a..97dd3fb9e 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -15,28 +15,25 @@ void func_800A1D8C(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *arg3); void func_800A2E70(u8,Vec3s*,Vec3s*,Vec3s*,f32); void func_800A49B0(SkelAnime*); void func_800A3478(GlobalContext*,s32,Vec3s*,Vec3s*); -void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7); +void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7); void func_800A4FE4(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2); -Gfx* func_800A24A0(GlobalContext*, u8, u32*, Vec3s*, SkelAnime_LimbUpdateMatrix2, SkelAnime_LimbAppendDlist2, Actor*, Mtx**, Gfx*); //.data u32 D_8012A480 = 0; -typedef void (*testfunc)(GlobalContext*, AnimationEntryType*); -static testfunc D_8012A484[] = -{ - (testfunc)0x800A3678, - (testfunc)0x800A36A4, - (testfunc)0x800A3714, - (testfunc)0x800A3770, - (testfunc)0x800A37F0, - (testfunc)0x800A3874, +static AnimationEntryCallback D_8012A484[] = +{ + (AnimationEntryCallback)0x800A3678, + (AnimationEntryCallback)0x800A36A4, + (AnimationEntryCallback)0x800A3714, + (AnimationEntryCallback)0x800A3770, + (AnimationEntryCallback)0x800A37F0, + (AnimationEntryCallback)0x800A3874, }; //.bss u32 D_801600B0; // SkelAnime_LodDrawLimb -// func_800A08A0 void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; @@ -60,7 +57,7 @@ void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec dList = limbEntry->displayLists[dListIndex]; if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { - func_800D1340(&pos, &rot); + Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { do @@ -94,7 +91,6 @@ void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec } // SkelAnime_LodDraw -// func_800A0B40 void func_800A0B40(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; @@ -115,18 +111,18 @@ void func_800A0B40(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTab gfxCtx = globalCtx->state.gfxCtx; func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x351); Matrix_Push(); - + limbEntry = SEGMENTED_TO_VIRTUAL(*limbIndex); pos.x = (f32) actorDrawTable->x; pos.y = (f32) actorDrawTable->y; pos.z = (f32) actorDrawTable->z; - rot = actorDrawTable[1]; + rot = actorDrawTable[1]; dList = limbEntry->displayLists[dListIndex]; if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { - func_800D1340(&pos, &rot); + Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x371), G_MTX_LOAD); @@ -147,16 +143,15 @@ void func_800A0B40(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTab #ifdef NON_MATCHING // SkelAnime_LodDrawLimbSV -// func_800A0D94 void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex, Mtx** mtx) { - Gfx* dList[2]; - GraphicsContext* gfxCtx; SkelLimbEntry* limbEntry; + Gfx* dList[2]; Vec3f pos; Vec3s rot; + GraphicsContext* gfxCtx; Gfx* gfx[3]; Matrix_Push(); @@ -165,16 +160,18 @@ void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 limbIndex++; rot = actorDrawTable[limbIndex]; - pos.x = limbEntry->pos.x; - pos.y = limbEntry->pos.y; - pos.z = limbEntry->pos.z; + + pos.x = limbEntry->translation.x; + pos.y = limbEntry->translation.y; + pos.z = limbEntry->translation.z; dList[1] = dList[0] = limbEntry->displayLists[dListIndex]; + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList[1], &pos, &rot, actor) == 0)) { - func_800D1340(&pos, &rot); + Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList[1] != NULL) { - Matrix_ToMtx(*mtx, "../z_skelanime.c", 945); gfxCtx = globalCtx->state.gfxCtx; + Matrix_ToMtx(*mtx, "../z_skelanime.c", 945); gfxCtx = globalCtx->state.gfxCtx; func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 946); gSPMatrix(gfxCtx->polyOpa.p++, *mtx, G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); @@ -189,7 +186,7 @@ void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 } if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, limbIndex, &dList[1], &rot, actor); + appendDlistFunc(globalCtx, limbIndex, &dList[0], &rot, actor); } if (limbEntry->firstChildIndex != LIMB_DONE) { @@ -198,7 +195,7 @@ void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 } Matrix_Pull(); - + if (limbEntry->nextLimbIndex != LIMB_DONE) { func_800A0D94(globalCtx, limbEntry->nextLimbIndex, limbTable, @@ -208,13 +205,12 @@ void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A0D94.s") #endif -#undef NON_MATCHING #ifdef NON_MATCHING // SkelAnime_LodDrawSV // func_800A106C void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 limbCount, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) { SkelLimbEntry *limbEntry; @@ -232,7 +228,7 @@ void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab mtx = Graph_Alloc(globalCtx->state.gfxCtx, limbCount * 0x40); } } while(0); - + if (limbTable == NULL) { osSyncPrintf("\x1b[31m"); @@ -252,27 +248,30 @@ void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab pos.z = actorDrawTable->z; rot = actorDrawTable[1]; - - dList[0] = dList[1] = limbEntry->displayLists[dListIndex]; - + + dList[1] = dList[0] = limbEntry->displayLists[dListIndex]; + if ((updateMtxFunc == 0) || (updateMtxFunc(globalCtx, 1, &dList[1], &pos, &rot, actor) == 0)) { - func_800D1340(&pos, &rot); + Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList[1] != NULL) { - mtx = Matrix_ToMtx(mtx, "../z_skelanime.c", 1033); + Matrix_ToMtx(mtx, "../z_skelanime.c", 1033); gSPMatrix(gfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); mtx++; } - else if (dList[0] != NULL) + else { - Matrix_ToMtx(mtx, "../z_skelanime.c", 1040); - mtx++; + if (dList[0] != NULL) + { + Matrix_ToMtx(mtx, "../z_skelanime.c", 1040); + mtx++; + } } } - if (appendDlistFunc != 0) + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, 1, &dList[0], &rot, actor); } @@ -280,43 +279,52 @@ void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab { func_800A0D94(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, &mtx); } + Matrix_Pull(); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1053); } #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A106C.s") #endif -#undef NON_MATCHING -#ifdef NON_MATCHING // SkelAnime_DrawLimb // func_800A1344 void func_800A1344(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) { - GraphicsContext* gfxCtx; - Gfx* gfx[4]; SkelLimbEntry* limbEntry; - Vec3s rot; - Vec3f pos; Gfx* dList; + Vec3f pos; + Vec3s rot; + GraphicsContext* gfxCtx; + Gfx* gfx[4]; gfxCtx = globalCtx->state.gfxCtx; + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x434); Matrix_Push(); + limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); limbIndex++; rot = actorDrawTable[limbIndex]; - pos.x = (f32) limbEntry->pos.x; - pos.y = (f32) limbEntry->pos.y; - pos.z = (f32) limbEntry->pos.z; - dList = limbEntry->dList; + pos.x = (f32) limbEntry->translation.x; + pos.y = (f32) limbEntry->translation.y; + pos.z = (f32) limbEntry->translation.z; + dList = limbEntry->displayLists[0]; + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { - func_800D1340(&pos, &rot); + Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_skelanime.c", 0x44F), G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, dList); + do + { + if(1) + { + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1103), G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList); + } + } while(0); } } @@ -339,21 +347,18 @@ void func_800A1344(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 actorDrawTable, updateMtxFunc, appendDlistFunc, actor); } - func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x461); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1121); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A1344.s") -#endif -#ifdef NON_MATCHING void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) { SkelLimbEntry* rootLimb; - Vec3s rot; - Vec3f pos; + char pad[4]; Gfx* dList; + Vec3f pos; + Vec3s rot; GraphicsContext* gfxCtx; - Gfx* gfx[5]; + Gfx* gfx[4]; if (limbTable == NULL) { @@ -374,11 +379,11 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa pos.z = (f32) actorDrawTable[0].z; rot = actorDrawTable[1]; - dList = rootLimb->dList; + dList = rootLimb->displayLists[0]; if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { - func_800D1340(&pos, &rot); + Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1176), G_MTX_LOAD); @@ -398,11 +403,9 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa } Matrix_Pull(); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1190); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_Draw.s") -#endif #ifdef NON_MATCHING // SkelAnime_Draw2Limb @@ -430,7 +433,7 @@ void func_800A180C(GlobalContext *globalCtx, u32 limbIndex, u32* limbTable, Vec3 if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &limbDlist[0], &limbPos, &limbRot, actor) == 0)) { - func_800D1340(&limbPos, &limbRot); + Matrix_TranslateThenRotateZYX(&limbPos, &limbRot); if (limbDlist[0] != NULL) { Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 0x4DA); @@ -512,7 +515,7 @@ void func_800A1AC8(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &skelDlist[0], &pos, &rot, actor) == 0)) { - func_800D1340(&pos, &rot); + Matrix_TranslateThenRotateZYX(&pos, &rot); if (skelDlist[0] != NULL) { Matrix_ToMtx(limbMatricies, "../z_skelanime.c", 1327); @@ -560,7 +563,7 @@ void func_800A1D8C(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *dst) AnimationRotationValue* rotationValueTable; AnimationRotationValue* frameRotationValueTable; AnimationHeader *animationHeader; - + s32 i; u16 limit; @@ -573,7 +576,7 @@ void func_800A1D8C(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *dst) for(i = 0; i < limbCount; i++, dst++, index++) { if ((dst == NULL) || (index == NULL) || - (frameRotationValueTable == NULL) || + (frameRotationValueTable == NULL) || (rotationValueTable == NULL)) { if(1) { } // Necessary to match. @@ -602,11 +605,172 @@ s32 SkelAnime_GetFrameCount(u32 animation) return (s16)(*virt - 1); } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2044.s") +// SkelAnime_DrawLimb2 +Gfx* func_800A2044(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Gfx* gfx) +{ + SkelLimbEntry* limbEntry; + Gfx* dList; + Vec3f pos; + Vec3s rot; + + Matrix_Push(); + + limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbIndex++; + + rot = actorDrawTable[limbIndex]; + + pos.x = limbEntry->translation.x; + pos.y = limbEntry->translation.y; + pos.z = limbEntry->translation.z; + + dList = limbEntry->displayLists[0]; + + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor, &gfx) == 0)) + { + Matrix_TranslateThenRotateZYX(&pos, &rot); + if (dList != NULL) + { + gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x5D1), G_MTX_LOAD); + gSPDisplayList(gfx++, dList); + } + } + + if (appendDlistFunc != NULL) + { + appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor, &gfx); + } + + if (limbEntry->firstChildIndex != LIMB_DONE) + { + gfx = func_800A2044(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, gfx); + } + + Matrix_Pull(); + + if (limbEntry->nextLimbIndex != LIMB_DONE) + { + gfx = func_800A2044(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, gfx); + } + + return gfx; +} + +#ifdef NON_MATCHING +// Some regalloc, and nonmatching stack usage +// SkelAnime_Draw2 +Gfx* func_800A2288(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Gfx* gfx) +{ + SkelLimbEntry* limbEntry; + Vec3f pos; + Vec3s rot; + Gfx* dList; + if (limbTable == NULL) + { + osSyncPrintf("\x1b[31m"); + osSyncPrintf("Si2_draw2():skelがNULLです。NULLを返します。\n"); + osSyncPrintf("\x1b[m"); + return NULL; + } + + Matrix_Push(); + + limbEntry = SEGMENTED_TO_VIRTUAL(*limbTable); + + pos.x = limbEntry->translation.x; + pos.y = limbEntry->translation.y; + pos.z = limbEntry->translation.z; + + rot = actorDrawTable[1]; + + dList = limbEntry->displayLists[0]; + + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor, &gfx) == 0)) + { + Matrix_TranslateThenRotateZYX(&pos, &rot); + if (dList != NULL) + { + gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x616), G_MTX_LOAD); + gSPDisplayList(gfx++, dList); + } + } + + if (appendDlistFunc != NULL) + { + appendDlistFunc(globalCtx, 1, &dList, &rot, actor, &gfx); + } + + if (limbEntry->firstChildIndex != LIMB_DONE) + { + gfx = func_800A2044(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, gfx); + } + + Matrix_Pull(); + + return gfx; +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2288.s") +#endif + +// SkelAnime_DrawLimbSV2 +Gfx* func_800A24A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Mtx** mtx, Gfx* gfx) +{ + SkelLimbEntry* limbEntry; + Gfx* dList1; + Gfx* dList2; + Vec3f pos; + Vec3s rot; + char pad[4]; + + Matrix_Push(); + + limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbIndex++; + rot = actorDrawTable[limbIndex]; + + pos.x = limbEntry->translation.x; + pos.y = limbEntry->translation.y; + pos.z = limbEntry->translation.z; + + dList1 = dList2 = limbEntry->displayLists[0]; + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList1, &pos, &rot, actor, &gfx) == 0)) + { + Matrix_TranslateThenRotateZYX(&pos, &rot); + if (dList1 != NULL) + { + Matrix_ToMtx(*mtx, "../z_skelanime.c", 0x657); + gSPMatrix(gfx++, *mtx, G_MTX_LOAD); + gSPDisplayList(gfx++, dList1); + (*mtx)++; + } + else + { + if (dList2 != NULL) + { + Matrix_ToMtx(*mtx, "../z_skelanime.c", 0x65E); + (*mtx)++; + } + } + } + if (appendDlistFunc != 0) + { + appendDlistFunc(globalCtx, limbIndex, &dList2, &rot, actor, &gfx); + } + if (limbEntry->firstChildIndex != LIMB_DONE) + { + gfx = func_800A24A0(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, mtx, gfx); + } + + Matrix_Pull(); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A24A0.s") + if (limbEntry->nextLimbIndex != LIMB_DONE) + { + gfx = func_800A24A0(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, mtx, gfx); + } + return gfx; +} // SkelAnime_DrawSV2 Gfx* func_800A273C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 dListCount, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Gfx* gfx) @@ -634,14 +798,14 @@ Gfx* func_800A273C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab pos.x = actorDrawTable->x; pos.y = actorDrawTable->y; pos.z = actorDrawTable->z; - + rot = actorDrawTable[1]; dList1 = dList2 = limbEntry->displayLists[0]; if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList1, &pos, &rot, actor, &gfx) == 0)) { - func_800D1340(&pos, &rot); + Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList1 != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 0x6AE); @@ -733,7 +897,7 @@ AnimationEntry* func_800A3334(AnimationContext* animationCtx, AnimationType type * animation context. */ -// SkelAnime_AnimationEntryType0Init +// SkelAnime_LinkAnimetionDma void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s32 limbCount, void* ram) { AnimationEntry* entry; @@ -746,7 +910,7 @@ void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s3 linkAnimetionEntry = SEGMENTED_TO_VIRTUAL(linkAnimetionSeg); osCreateMesgQueue(&entry->types.type0.msgQueue, &entry->types.type0.msg, 1); DmaMgr_SendRequest2(&entry->types.type0.req, ram, LINK_ANIMETION_OFFSET(linkAnimetionEntry->animationSegAddress, ((sizeof(Vec3s) * limbCount + 2) * frame)), - sizeof(Vec3s) * limbCount + 2, 0, &entry->types.type0.msgQueue, NULL, + sizeof(Vec3s) * limbCount + 2, 0, &entry->types.type0.msgQueue, NULL, "../z_skelanime.c" , 0x7D4); } } @@ -920,60 +1084,55 @@ void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) D_8012A480 = 0; } -#ifdef NON_MATCHING -// some kind of init -void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, s32 arg3, s8 arg4, Vec3s* actorDrawTable, s32 arg6, s32 arg7) +void func_800A39AC(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeaderSeg, u32* animation, s32 flags, Vec3s* actorDrawTbl, Vec3s* arg6, s32 limbBufCount) { - SkelAnimeLimbHeader* limbHeader; - u8 flag; - size_t size; + char pad[8]; + SkelAnimeLimbHeader *limbHeader; + size_t allocSize; + s32 limbCount; + s32 headerCount; limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); - skelAnime->unk_34 = arg4; - flag = arg4 & 2 == 0 ? 1U : limbHeader->limbCount; - if ((arg4 & 2) != 0) - { - flag = limbHeader->limbCount; - } - else - { - flag = 1; - } + headerCount = limbHeader->limbCount; + skelAnime->unk_34 = flags; + limbCount = (flags & 2) != 0 ? headerCount : 1; - if((arg4 & 1) != 0) + if ((flags & 1) != 0) { - flag += limbHeader->limbCount; + limbCount += headerCount; } - - if((arg4 & 4) != 0) + if ((flags & 4) != 0) { - flag += limbHeader->limbCount; + limbCount += headerCount; } - skelAnime->limbCount = flag; + skelAnime->limbCount = (u8)limbCount; skelAnime->dListCount = limbHeader->dListCount; + + allocSize = limbCount * sizeof(Vec3s); skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); - size = sizeof(Vec3s); - if ((arg4 & 8) != 0) + + if ((flags & 8) != 0) { - size += 2; + allocSize += 2; } - if (actorDrawTable == NULL) + if (actorDrawTbl == NULL) { - skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(size, "../z_skelanime.c", 2364); - skelAnime->unk_24 = ZeldaArena_MallocDebug(size, "../z_skelanime.c", 2365); + skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(allocSize, "../z_skelanime.c", 2364); + skelAnime->unk_24 = ZeldaArena_MallocDebug(allocSize, "../z_skelanime.c", 2365); } else { - if (arg7 != flag) + if (limbBufCount != limbCount) { __assert("joint_buff_num == joint_num", "../z_skelanime.c", 2369); } - skelAnime->actorDrawTbl = ALIGN16((u32)actorDrawTable); - skelAnime->unk_24 = ALIGN16(arg6); + skelAnime->actorDrawTbl = (Vec3s*)ALIGN16((u32)actorDrawTbl); + skelAnime->unk_24 = (Vec3s*)ALIGN16((u32)arg6); } + if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) { osSyncPrintf("\x1b[31m"); @@ -981,12 +1140,8 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeade osSyncPrintf("\x1b[m"); } - func_800A3F08(globalCtx, skelAnime, arg3, 1.0f, 0.0f, 0.0f, 0, 0.0f); + func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, 0.0f, 0, 0.0f); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A39AC.s") -#endif -#undef NON_MATCHING // SkelAnime_SetUpdateFunc void func_800A3B8C(SkelAnime* skelAnime) @@ -1008,21 +1163,21 @@ void func_800A3BC0(GlobalContext* globalCtx, SkelAnime* skelAnime) skelAnime->animUpdate(globalCtx, skelAnime); } -#ifdef NON_MATCHING s32 func_800A3BE4(GlobalContext* globalCtx, SkelAnime* skelAnime) { f32 prevUnk28 = skelAnime->unk_28; - skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.5f); + f32 updateRate = R_UPDATE_RATE * 0.5f; + + skelAnime->unk_28 -= skelAnime->unk_2C * updateRate; + if (skelAnime->unk_28 <= 0.0f) { func_800A3B8C(skelAnime); } + func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, 1.0f - (skelAnime->unk_28 / prevUnk28)); return 0; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3BE4.s") -#endif void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) { @@ -1089,7 +1244,7 @@ s32 func_800A3E0C(GlobalContext* globalCtx, SkelAnime* skelAnime) skelAnime->animCurrentFrame -= skelAnime->unk_14; } } - } + } func_800A3C9C(globalCtx, skelAnime); return 0; } @@ -1102,7 +1257,7 @@ void func_800A3EE8(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) } #ifdef NON_MATCHING -void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7) +void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7) { skelAnime->unk_01 = arg6; @@ -1117,7 +1272,7 @@ void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation } else { - skelAnime->mtxUpdate = &func_800A3BE4; + skelAnime->animUpdate = &func_800A3BE4; func_800A336C(globalCtx, animation, (s32) arg4, skelAnime->limbCount, skelAnime->unk_24); } skelAnime->unk_28 = 1.0f; @@ -1130,7 +1285,7 @@ void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation skelAnime->unk_28 = 0.0f; } - skelAnime->animCurrentFrame = animation; + skelAnime->animCurrentFrame = 0.0f; skelAnime->unk_0C = arg4; skelAnime->animCurrentFrame = arg4; skelAnime->animFrameCount = frameCount; @@ -1140,7 +1295,6 @@ void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3F08.s") #endif -#undef NON_MATCHING void func_800A407C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) { @@ -1198,7 +1352,17 @@ void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, s32 arg2, f32 func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, alignedAddr, arg6); } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A43B8.s") +void func_800A43B8(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 animation, f32 frame, s32 arg4, f32 arg5, f32 arg6, s32 arg7) +{ + s32 alignedAddr; + + func_800A336C(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); + + alignedAddr = ALIGN16(arg7); + + func_800A336C(globalCtx, arg4, (s32)arg5, skelAnime->limbCount, alignedAddr); + func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->unk_24, alignedAddr, arg6); +} void func_800A4454(SkelAnime* skelAnime) { @@ -1775,7 +1939,7 @@ void func_800A56F0(SkelAnime *skelAnime, s32 arg1) } // SkelAnime_CopyVec3s -void func_800A5774(SkelAnime* skelAnime, Vec3s *dst, Vec3s *src) +void func_800A5774(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src) { s32 i; for(i = 0; i < skelAnime->limbCount; i++) diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index 0ed42a392..e417cbbd2 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -95,7 +95,7 @@ void Title_Draw(TitleContext* this) { func_80093D18(this->state.gfxCtx); Matrix_Translate(-53.0, -5.0, 0, MTXMODE_NEW); Matrix_Scale(1.0, 1.0, 1.0, MTXMODE_APPLY); - Matrix_RotateXYZ(0, sTitleRotY, 0, MTXMODE_APPLY); + Matrix_RotateZYX(0, sTitleRotY, 0, MTXMODE_APPLY); gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(this->state.gfxCtx, "../z_title.c", 424), G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, &D_01002720); -- cgit v1.2.3 From 4ab558d628e0265ce8000ecfb5b0c7b537fd5bb3 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 23 Mar 2020 17:33:12 -0400 Subject: Almost done --- .../actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c | 164 +++++++++++++++++++-- .../actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h | 4 +- 2 files changed, 154 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index 7518d97c4..c121558bc 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -8,7 +8,10 @@ void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx); void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx); void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx); -/* +s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx); +s32 func_808B1BA0(BgSpot09Obj* this, GlobalContext* globalCtx); +s32 func_808B1BEC(BgSpot09Obj* this, GlobalContext* globalCtx); + const ActorInit Bg_Spot09_Obj_InitVars = { ACTOR_BG_SPOT09_OBJ, @@ -22,25 +25,162 @@ const ActorInit Bg_Spot09_Obj_InitVars = (ActorFunc)BgSpot09Obj_Update, (ActorFunc)BgSpot09Obj_Draw, }; -*/ + +u32 D_808B1F90[] = { + 0x00000000, 0x06005520, 0x0600283C, 0x06008458, 0x06007580 +}; + +typedef s32 (*ActorFuncRet)(struct Actor*, struct GlobalContext*); +ActorFuncRet D_808B1FA4[] = { + (ActorFuncRet)func_808B1BEC, (ActorFuncRet)func_808B1AE0, (ActorFuncRet)func_808B1BA0, +}; + +InitChainEntry initChain1[] = { + ICHAIN_F32(unk_F4, 7200, ICHAIN_CONTINUE), + ICHAIN_F32(unk_F8, 3000, ICHAIN_CONTINUE), + ICHAIN_F32(unk_FC, 7200, ICHAIN_STOP), +}; + +InitChainEntry initChain2[] = { + ICHAIN_F32(unk_F4, 7200, ICHAIN_CONTINUE), + ICHAIN_F32(unk_F8, 800, ICHAIN_CONTINUE), + ICHAIN_F32(unk_FC, 1500, ICHAIN_STOP), +}; + +u32 dists[] = { + 0x06000100, 0x06003970, 0x06001120, 0x06007D40, 0x06006210, +}; + +extern UNK_TYPE D_06008010; + #pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1AE0.s") +/*void func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) { + u16 temp_v1; + s32 phi_v0; + + if (gSaveContext->unk1360 >= 4) { + return (u32) arg0->unk1C < 1U; + } + temp_v1 = (u32) ((gSaveContext->unkEE6 & 0xF) ^ 0xF) < 1U; + if (gSaveContext->unk4 != 0) { + phi_v0 = 5; + } else { + phi_v0 = 0x11; + } + if (phi_v0 == 0x11) { + if (arg0->unk1C == 0) { + return (u16)0; + } + if (arg0->unk1C == 1) { + return temp_v1 < 1U; + } + if (arg0->unk1C == 3) { + return (u16)1; + } + if (arg0->unk1C == 4) { + return temp_v1; + } + return (u16)0; + } + return (u32) (arg0->unk1C ^ 2) < 1U; +}*/ + +s32 func_808B1BA0(BgSpot09Obj *this, GlobalContext *globalCtx) { + Actor* thisx = &this->dyna.actor; + if (thisx->params == 3) { + Actor_SetScale(thisx, 0.1f); + } else { + Actor_SetScale(thisx, 1.0f); + } + return 1; +} + +s32 func_808B1BEC(BgSpot09Obj *this, GlobalContext *globalCtx) { + Actor* thisx = &this->dyna.actor; + s32 localC = 0; + s32 pad[2]; + + if (D_808B1F90[thisx->params] != 0) { + DynaPolyInfo_SetActorMove(thisx, 0); + DynaPolyInfo_Alloc(D_808B1F90[thisx->params], &localC); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localC); + } + return 1; +} + +s32 func_808B1C70(BgSpot09Obj *this, GlobalContext *globalCtx) { + s32 i; + for (i = 0; i < ARRAY_COUNT(D_808B1FA4); i++) { + if (!D_808B1FA4[i](this, globalCtx)) { + return 0; + } + } + return 1; +} + +s32 func_808B1CEC(BgSpot09Obj* this, GlobalContext* globalCtx) { + Actor_ProcessInitChain(&this->dyna.actor, &initChain1); + return 1; +} + +s32 func_808B1D18(BgSpot09Obj* this, GlobalContext* globalCtx) { + Actor_ProcessInitChain(&this->dyna.actor, &initChain2); + return 1; +} + +s32 func_808B1D44(BgSpot09Obj* this, GlobalContext* globalCtx) { + if (this->dyna.actor.params == 3) { + return func_808B1D18(this, globalCtx); + } else { + return func_808B1CEC(this, globalCtx); + } +} + +void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx) { + Actor* thisx = &this->dyna.actor; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1BA0.s") + osSyncPrintf("Spot09 Object [arg_data : 0x%04x](大工救出フラグ 0x%x)\n", thisx->params, + gSaveContext.event_chk_inf[9] & 0xF); + thisx->params &= 0xFF; + if ((thisx->params < 0) || (thisx->params >= 5)) { + osSyncPrintf("Error : Spot 09 object の arg_data が判別出来ない(%s %d)(arg_data 0x%04x)\n", + "../z_bg_spot09_obj.c", 322, thisx->params); + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1BEC.s") + if (!func_808B1C70(this, globalCtx)) { + Actor_Kill(thisx); + } else if (!func_808B1D44(this, globalCtx)) { + Actor_Kill(thisx); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1C70.s") +void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx) { + DynaCollisionContext* dynaColCtx = &globalCtx->colCtx.dyna; + Actor* thisx = &this->dyna.actor; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1CEC.s") + if (thisx->params != 0) { + DynaPolyInfo_Free(globalCtx, dynaColCtx, this->dyna.dynaPolyId); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1D18.s") +void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx) { -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1D44.s") +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/BgSpot09Obj_Init.s") +void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx) { + GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; + Gfx* gfxArr[3]; + Actor* thisx = &this->dyna.actor; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/BgSpot09Obj_Destroy.s") + Draw_DListOpa(globalCtx, dists[thisx->params]); + if (thisx->params == 3) { + func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 388); + func_80093D84(globalCtx->state.gfxCtx); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/BgSpot09Obj_Update.s") + gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 391), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(gfxCtx->polyXlu.p++, &D_06008010); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/BgSpot09Obj_Draw.s") + func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 396); + } +} diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h index 55bbe8dce..553797219 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h @@ -5,8 +5,8 @@ #include typedef struct { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x1C]; + /* 0x0000 */ DynaPolyActor dyna; + /* 0x0164 */ char unk_164[0x04]; } BgSpot09Obj; // size = 0x0168 extern const ActorInit Bg_Spot09_Obj_InitVars; -- cgit v1.2.3 From 82b155529585a3abde70213c7d2bc9b82e3bfc08 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 23 Mar 2020 17:37:40 -0400 Subject: PR fix --- src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c index b0ac30bc0..5865fb196 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c +++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c @@ -14,7 +14,7 @@ static void BgHakaMegane_Destroy(BgHakaMegane* this, GlobalContext* globalCtx); static void BgHakaMegane_Update(BgHakaMegane* this, GlobalContext* globalCtx); static void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx); -static void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx); + void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx); static void func_8087DC64(BgHakaMegane* this, GlobalContext* globalCtx); static void func_8087DC94(BgHakaMegane* this, GlobalContext* globalCtx); @@ -92,13 +92,13 @@ static void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx) { } } -static void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) { +void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; if (globalCtx->actorCtx.unk_03 != 0) { thisx->flags |= 0x80; func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); } else { - thisx->flags &= -0x81; + thisx->flags &= ~0x80; func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); } } -- cgit v1.2.3 From 1abc15910fe86f90c1839d3587239fb3bd5156be Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 23 Mar 2020 17:38:22 -0400 Subject: oopz --- src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c index 5865fb196..3264890c5 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c +++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c @@ -14,7 +14,7 @@ static void BgHakaMegane_Destroy(BgHakaMegane* this, GlobalContext* globalCtx); static void BgHakaMegane_Update(BgHakaMegane* this, GlobalContext* globalCtx); static void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx); - void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx); +static void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx); static void func_8087DC64(BgHakaMegane* this, GlobalContext* globalCtx); static void func_8087DC94(BgHakaMegane* this, GlobalContext* globalCtx); @@ -92,7 +92,7 @@ static void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx) { } } -void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) { +static void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; if (globalCtx->actorCtx.unk_03 != 0) { thisx->flags |= 0x80; -- cgit v1.2.3 From da151300f74b13c8046e86cebf23112237627e1b Mon Sep 17 00:00:00 2001 From: Roman971 Date: Mon, 23 Mar 2020 23:15:45 +0100 Subject: Run gcc checks with NON_MATCHING defined --- src/code/gfxprint.c | 2 +- src/code/z_sample.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/code/gfxprint.c b/src/code/gfxprint.c index fbcca3cee..cc2f21e69 100644 --- a/src/code/gfxprint.c +++ b/src/code/gfxprint.c @@ -223,7 +223,7 @@ void GfxPrint_SetBasePosPx(GfxPrint* this, s32 x, s32 y) { #ifdef NON_MATCHING // regalloc and ordering differences -void GfxPrint_PrintCharImpl(GfxPrint* this, char c) { +void GfxPrint_PrintCharImpl(GfxPrint* this, u8 c) { if (this->flag & GFXPRINT_UPDATE_MODE) { this->flag &= ~GFXPRINT_UPDATE_MODE; diff --git a/src/code/z_sample.c b/src/code/z_sample.c index cbd934701..2f4f3fc6f 100644 --- a/src/code/z_sample.c +++ b/src/code/z_sample.c @@ -20,8 +20,8 @@ void Sample_Draw(SampleContext* this) { func_800C6AC4(gfxArr, gfxCtx, "../z_sample.c", 62); - gSPSegment(gfxCtx->polyOpa.p++, 0, NULL; - gSPSegment(gfxCtx->polyOpa.p++, 1, this->staticSegment); + gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL); + gSPSegment(gfxCtx->polyOpa.p++, 0x01, this->staticSegment); func_80095248(gfxCtx, 0, 0, 0); -- cgit v1.2.3 From 9a63f1d4d13c39b4f30819489932023e6104d8e4 Mon Sep 17 00:00:00 2001 From: Roman971 Date: Tue, 24 Mar 2020 00:11:21 +0100 Subject: Run formatter with changes --- src/code/fault.c | 76 +++-- src/code/fault_drawer.c | 5 +- src/code/gfxprint.c | 10 +- src/code/sys_matrix.c | 10 +- src/code/z_actor.c | 44 ++- src/code/z_camera.c | 13 +- src/code/z_construct.c | 47 +-- src/code/z_demo.c | 65 ++-- src/code/z_en_a_keep.c | 6 +- src/code/z_en_item00.c | 29 +- src/code/z_horse.c | 27 +- src/code/z_kaleido_scope_call.c | 3 +- src/code/z_parameter.c | 356 +++++++++++++-------- src/code/z_room.c | 37 ++- src/code/z_scene.c | 6 +- src/code/z_scene_table.c | 5 +- .../actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c | 6 +- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 13 +- .../actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c | 12 +- 19 files changed, 489 insertions(+), 281 deletions(-) (limited to 'src') diff --git a/src/code/fault.c b/src/code/fault.c index 7884c5057..05bee87d5 100644 --- a/src/code/fault.c +++ b/src/code/fault.c @@ -137,8 +137,9 @@ void Fault_AddClient(FaultClient* client, void* callback, void* param0, void* pa end: osSetIntMask(mask); - if (alreadyExists) + if (alreadyExists) { osSyncPrintf(VT_COL(RED, WHITE) "fault_AddClient: %08x は既にリスト中にある\n" VT_RST, client); + } } #else #pragma GLOBAL_ASM("asm/non_matchings/code/fault/Fault_AddClient.s") @@ -270,27 +271,34 @@ u32 Fault_WaitForInputImpl() { kDown = curInput->padPressed; - if (kDown == 0x20) + if (kDown == 0x20) { sFaultStructPtr->faultActive = !sFaultStructPtr->faultActive; + } - if (!sFaultStructPtr->faultActive) + if (!sFaultStructPtr->faultActive) { break; + } - if (count-- < 1) + if (count-- < 1) { return false; + } } - if (kDown == 0x8000 || kDown == 0x100) + if (kDown == 0x8000 || kDown == 0x100) { return false; + } - if (kDown == 0x200) + if (kDown == 0x200) { return true; + } - if (kDown == 0x800) + if (kDown == 0x800) { FaultDrawer_SetOsSyncPrintfEnabled(true); + } - if (kDown == 0x400) + if (kDown == 0x400) { FaultDrawer_SetOsSyncPrintfEnabled(false); + } } return false; @@ -555,24 +563,28 @@ void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) { s32 off; while (true) { - if (addr < 0x80000000) + if (addr < 0x80000000) { addr = 0x80000000; - if (addr > 0x807fff00) + } + if (addr > 0x807fff00) { addr = 0x807fff00; + } addr &= ~0xF; Fault_DrawMemDumpPage("Dump", (u32*)addr, 0); count = 600; while (sFaultStructPtr->faultActive) { - if (count == 0) + if (count == 0) { return; + } count--; Fault_Sleep(0x10); Fault_UpdatePadImpl(); - if (!~(curInput->padPressed | ~0x20)) + if (!~(curInput->padPressed | ~0x20)) { sFaultStructPtr->faultActive = false; + } } do { @@ -580,31 +592,42 @@ void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) { Fault_UpdatePadImpl(); } while (curInput->padPressed == 0); - if (!~(curInput->padPressed | ~0x1000)) + if (!~(curInput->padPressed | ~0x1000)) { return; + } - if (!~(curInput->raw.pad | ~0x8000)) + if (!~(curInput->raw.pad | ~0x8000)) { return; + } off = 0x10; - if (!~(curInput->raw.pad | ~0x2000)) + if (!~(curInput->raw.pad | ~0x2000)) { off = 0x100; - if (!~(curInput->raw.pad | ~0x4000)) + } + if (!~(curInput->raw.pad | ~0x4000)) { off <<= 8; - if (!~(curInput->raw.pad | ~0x800)) + } + if (!~(curInput->raw.pad | ~0x800)) { addr -= off; - if (!~(curInput->raw.pad | ~0x400)) + } + if (!~(curInput->raw.pad | ~0x400)) { addr += off; - if (!~(curInput->raw.pad | ~0x8)) + } + if (!~(curInput->raw.pad | ~0x8)) { addr = pc; - if (!~(curInput->raw.pad | ~0x4)) + } + if (!~(curInput->raw.pad | ~0x4)) { addr = sp; - if (!~(curInput->raw.pad | ~0x2)) + } + if (!~(curInput->raw.pad | ~0x2)) { addr = unk0; - if (!~(curInput->raw.pad | ~0x1)) + } + if (!~(curInput->raw.pad | ~0x1)) { addr = unk1; - if (!~(curInput->raw.pad | ~0x20)) + } + if (!~(curInput->raw.pad | ~0x20)) { break; + } } sFaultStructPtr->faultActive = true; @@ -715,15 +738,16 @@ void Fault_ThreadEntry(void* arg) { __osSetFpcCsr(__osGetFpcCsr() & -0xf81); sFaultStructPtr->faultedThread = faultedThread; - while (!sFaultStructPtr->faultHandlerEnabled) + while (!sFaultStructPtr->faultHandlerEnabled) { Fault_Sleep(1000); + } Fault_Sleep(500); Fault_CommitFB(); - if (sFaultStructPtr->faultActive) + if (sFaultStructPtr->faultActive) { Fault_Wait5Seconds(); - else { + } else { Fault_DrawCornerRec(0xF801); Fault_WaitForButtonCombo(); } diff --git a/src/code/fault_drawer.c b/src/code/fault_drawer.c index b17679d35..cc8fcd424 100644 --- a/src/code/fault_drawer.c +++ b/src/code/fault_drawer.c @@ -114,10 +114,11 @@ void FaultDrawer_DrawChar(char c) { u32 mask = 0x10000000 << (c % 4); u32 data = *dataPtr; for (x = 0; x < sFaultDrawerStruct.charW; x++) { - if (mask & data) + if (mask & data) { fb[x] = sFaultDrawerStruct.foreColor; - else if (sFaultDrawerStruct.backColor & 1) + } else if (sFaultDrawerStruct.backColor & 1) { fb[x] = sFaultDrawerStruct.backColor; + } mask >>= 4; } fb += sFaultDrawerStruct.w; diff --git a/src/code/gfxprint.c b/src/code/gfxprint.c index cc2f21e69..9b7c6fa0f 100644 --- a/src/code/gfxprint.c +++ b/src/code/gfxprint.c @@ -246,22 +246,24 @@ void GfxPrint_PrintCharImpl(GfxPrint* this, u8 c) { if (this->flag & GFXPRINT_FLAG4) { gDPSetPrimColorMod(this->dlist++, 0, 0, 0); - if (this->flag & GFXPRINT_FLAG64) + if (this->flag & GFXPRINT_FLAG64) { gSPTextureRectangle(this->dlist++, (this->posX + 4) << 1, (this->posY + 4) << 1, (this->posX + 4 + 32) << 1, (this->posY + 4 + 32) << 1, c * 2, (u16)(c & 4) * 64, (u16)(c >> 3) * 256, 512, 512); - else + } else { gSPTextureRectangle(this->dlist++, this->posX + 4, this->posY + 4, this->posX + 4 + 32, this->posY + 4 + 32, c * 2, (u16)(c & 4) * 64, (u16)(c >> 3) * 256, 1024, 1024); + } gDPSetPrimColorMod(this->dlist++, 0, 0, *(u32*)&this->color); } - if (this->flag & GFXPRINT_FLAG64) + if (this->flag & GFXPRINT_FLAG64) { gSPTextureRectangle(this->dlist++, (this->posX) << 1, (this->posY) << 1, (this->posX + 32) << 1, (this->posY + 32) << 1, c * 2, (u16)(c & 4) * 64, (u16)(c >> 3) * 256, 512, 512); - else + } else { gSPTextureRectangle(this->dlist++, this->posX, this->posY, this->posX + 32, this->posY + 32, c * 2, (u16)(c & 4) * 64, (u16)(c >> 3) * 256, 1024, 1024); + } this->posX += 32; } diff --git a/src/code/sys_matrix.c b/src/code/sys_matrix.c index b300f189d..b0735109a 100644 --- a/src/code/sys_matrix.c +++ b/src/code/sys_matrix.c @@ -738,12 +738,13 @@ void func_800D20CC(MtxF* mf, Vec3s* vec, s32 flag) { vec->y = Math_atan2f(mf->zx, mf->zz) * (32768 / M_PI); - if (!flag) + if (!flag) { vec->z = Math_atan2f(mf->xy, mf->yy) * (32768 / M_PI); - else + } else { vec->z = Math_atan2f(mf->xy / sqrtf(SQ(mf->xx) + SQ(mf->xz) + SQ(mf->xy)), mf->yy / sqrtf(SQ(mf->yx) + SQ(mf->yz) + SQ(mf->yy))) * (32768 / M_PI); + } } #else #pragma GLOBAL_ASM("asm/non_matchings/code/sys_matrix/func_800D20CC.s") @@ -762,12 +763,13 @@ void func_800D2264(MtxF* mf, Vec3s* vec, s32 flag) { vec->z = Math_atan2f(mf->xy, mf->xx) * (32768 / M_PI); - if (!flag) + if (!flag) { vec->x = Math_atan2f(mf->yz, mf->zz) * (32768 / M_PI); - else + } else { vec->x = Math_atan2f(mf->yz / sqrtf(SQ(mf->yx) + SQ(mf->yy) + SQ(mf->yz)), mf->zz / sqrtf(SQ(mf->zx) + SQ(mf->zy) + SQ(mf->zz))) * (32768 / M_PI); + } } #else #pragma GLOBAL_ASM("asm/non_matchings/code/sys_matrix/func_800D2264.s") diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 5fa59e19b..30645ee88 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -156,16 +156,19 @@ void ActorShadow_DrawFunc_Teardrop(Actor* actor, LightMapper* lightMapper, Globa if ((phi_f2 >= -1.0f) && (phi_f2 < 500.0f)) { phi_s0 = lightMapper->lights; - if (phi_f2 <= 0.0f) + if (phi_f2 <= 0.0f) { actor->shape.unk_15++; + } - if (30.0f < phi_f2) + if (30.0f < phi_f2) { phi_f2 = 30.0f; + } temp_f24 = actor->shape.unk_14 * (1.0f - (phi_f2 * (1.0f / 30))); - if (30.0f < phi_f2) + if (30.0f < phi_f2) { phi_f2 = 30.0f; + } temp_f20_2 = 1.0f - (phi_f2 * (1.0f / 70)); temp_f22_2 = (actor->shape.unk_10 * temp_f20_2) * actor->scale.x; @@ -187,8 +190,9 @@ void ActorShadow_DrawFunc_Teardrop(Actor* actor, LightMapper* lightMapper, Globa if (phi_s0->l.dir[1] > 0) { temp_a3 = (ABS(phi_s0->l.dir[1]) * ((phi_s0->l.col[0] + phi_s0->l.col[1]) + phi_s0->l.col[2])) - (phi_s2 * 8); - if (temp_a3 > 0) + if (temp_a3 > 0) { func_8002B66C(globalCtx, phi_s0, &spE8, temp_a3, temp_f24, temp_f22_2, temp_f20_2); + } } phi_s0++; } @@ -335,18 +339,20 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { spCE = 0xFF; var1 = 1.0f; - if (targetCtx->unk_4B != 0) + if (targetCtx->unk_4B != 0) { spB8 = 1; - else + } else { spB8 = 3; + } if (actor != NULL) { Math_Vec3f_Copy(&targetCtx->targetCenterPos, &actor->posRot2.pos); var1 = (500.0f - targetCtx->unk_44) / 420.0f; } else { targetCtx->unk_48 -= 120; - if (targetCtx->unk_48 < 0) + if (targetCtx->unk_48 < 0) { targetCtx->unk_48 = 0; + } spCE = targetCtx->unk_48; } @@ -361,8 +367,9 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { spBC.z = spBC.z * var1; targetCtx->unk_4C--; - if (targetCtx->unk_4C < 0) + if (targetCtx->unk_4C < 0) { targetCtx->unk_4C = 2; + } func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z); @@ -373,10 +380,11 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { entry = &targetCtx->arr_50[spAC]; if (entry->unk_0C < 500.0f) { - if (entry->unk_0C <= 120.0f) + if (entry->unk_0C <= 120.0f) { var2 = 0.15f; - else + } else { var2 = ((entry->unk_0C - 120.0f) * 0.001f) + 0.15f; + } Matrix_Translate(entry->pos.x, entry->pos.y, 0.0f, MTXMODE_NEW); Matrix_Scale(var2, 0.15f, 1.0f, MTXMODE_APPLY); @@ -398,8 +406,9 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { } spCE = spCE - (0xFF / 3); - if (spCE < 0) + if (spCE < 0) { spCE = 0; + } spAC = (spAC + 1) % 3; } } @@ -1437,14 +1446,16 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) { abs_var = ABS(var); if (player->unk_664 != NULL) { - if ((abs_var > 0x4000) || (actor->flags & 0x8000000)) + if ((abs_var > 0x4000) || (actor->flags & 0x8000000)) { return FLT_MAX; - else + } else { return actor->waterSurfaceDist - actor->waterSurfaceDist * 0.8f * ((0x4000 - abs_var) * 3.0517578125e-05f); + } } - if (abs_var > 0x2AAA) + if (abs_var > 0x2AAA) { return FLT_MAX; + } return actor->waterSurfaceDist; } @@ -1822,10 +1833,11 @@ void func_8002FBAC(GlobalContext* globalCtx) { func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_actor.c", 5308); if (gSaveContext.respawn[RESPAWN_MODE_TOP].data != 0) { - if (LINK_IS_ADULT) + if (LINK_IS_ADULT) { spD8 = 80.0f; - else + } else { spD8 = 60.0f; + } spD0 = 0xFF; spD4 = 1.0f; diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 9dd358ffc..b48b58321 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -224,8 +224,9 @@ s32 func_800443A0(Camera* camera, Vec3f* b, Vec3f* c) { sp34 = NULL; // this is moved to the top when it should be done in the middle of the function args being loaded if (func_8003DD6C(&camera->globalCtx->colCtx, b, c, &sp40, &sp34, 1, 1, 1, 0, &sp38) != 0) { - if (func_80038B7C(sp34, b) < 0.0f) + if (func_80038B7C(sp34, b) < 0.0f) { return 1; + } } return 0; } @@ -461,18 +462,20 @@ s32 func_800458D4(Camera* camera, struct_80045714* b, f32 c, f32* d, s16 e) { sp60.z = 0.0f; temp_s1 = &camera->unk_94; - if (e != 0) + if (e != 0) { sp60.y -= func_80045714(&camera->unk_108, temp_s1->rot.y, b->unk_06, OREG(9)); + } sp48 = temp_s1->pos.y - *d; temp_ret = Math_atan2f(sp48, func_8007C028(&camera->unk_50, &camera->unk_5C)); // f2 and f14 are swapped - if (OREG(32) * (M_PI / 180) < temp_ret) + if (OREG(32) * (M_PI / 180) < temp_ret) { phi_f2 = 1.0f - sinf(temp_ret - OREG(32) * (M_PI / 180)); - else if (OREG(33) * (M_PI / 180) > temp_ret) + } else if (OREG(33) * (M_PI / 180) > temp_ret) { phi_f2 = 1.0f - sinf(OREG(33) * (M_PI / 180) - temp_ret); - else + } else { phi_f2 = 1.0f; + } sp60.y -= sp48 * phi_f2; func_80043A3C(&sp60, &camera->unk_E4, OREG(29) * 0.01f, OREG(30) * 0.01f, 0.1f); diff --git a/src/code/z_construct.c b/src/code/z_construct.c index 59c6e11a4..d14e6ef8c 100644 --- a/src/code/z_construct.c +++ b/src/code/z_construct.c @@ -44,8 +44,9 @@ void func_801109B0(GlobalContext* globalCtx) { osSyncPrintf("parameter->parameterSegment=%x", interfaceCtx->parameterSegment); - if (interfaceCtx->parameterSegment == NULL) + if (interfaceCtx->parameterSegment == NULL) { __assert("parameter->parameterSegment != NULL", "../z_construct.c", 161); + } DmaMgr_SendRequest1(interfaceCtx->parameterSegment, parameterStart, parameterSize, "../z_construct.c", 162); @@ -55,27 +56,30 @@ void func_801109B0(GlobalContext* globalCtx) { osSyncPrintf("DOアクション テクスチャ初期=%x\n", 0x480); osSyncPrintf("parameter->do_actionSegment=%x", interfaceCtx->do_actionSegment); - if (interfaceCtx->do_actionSegment == NULL) + if (interfaceCtx->do_actionSegment == NULL) { __assert("parameter->do_actionSegment != NULL", "../z_construct.c", 169); + } do_actionStart = _do_action_staticSegmentRomStart; - if (gSaveContext.language == 0) + if (gSaveContext.language == 0) { do_actionOffset = 0; - else if (gSaveContext.language == 1) + } else if (gSaveContext.language == 1) { do_actionOffset = 0x2B80; - else + } else { do_actionOffset = 0x5700; + } DmaMgr_SendRequest1(interfaceCtx->do_actionSegment, do_actionStart + do_actionOffset, 0x300, "../z_construct.c", 174); - if (gSaveContext.language == 0) + if (gSaveContext.language == 0) { do_actionOffset = 0x480; - else if (gSaveContext.language == 1) + } else if (gSaveContext.language == 1) { do_actionOffset = 0x3000; - else + } else { do_actionOffset = 0x5B80; + } DmaMgr_SendRequest1((void*)((u32)interfaceCtx->do_actionSegment + 0x300), do_actionStart + do_actionOffset, 0x180, "../z_construct.c", 178); @@ -86,36 +90,41 @@ void func_801109B0(GlobalContext* globalCtx) { osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", 0x4000); osSyncPrintf("parameter->icon_itemSegment=%x\n", interfaceCtx->icon_itemSegment); - if (interfaceCtx->icon_itemSegment == NULL) + if (interfaceCtx->icon_itemSegment == NULL) { __assert("parameter->icon_itemSegment != NULL", "../z_construct.c", 193); + } osSyncPrintf("Register_Item[%x, %x, %x, %x]\n", gSaveContext.equips.button_items[0], gSaveContext.equips.button_items[1], gSaveContext.equips.button_items[2], gSaveContext.equips.button_items[3]); - if (gSaveContext.equips.button_items[0] < 0xF0) + if (gSaveContext.equips.button_items[0] < 0xF0) { DmaMgr_SendRequest1(interfaceCtx->icon_itemSegment, _icon_item_staticSegmentRomStart + gSaveContext.equips.button_items[0] * 0x80, 0x1000, "../z_construct.c", 198); - else if (gSaveContext.equips.button_items[0] != 0xFF) + } else if (gSaveContext.equips.button_items[0] != 0xFF) { DmaMgr_SendRequest1(interfaceCtx->icon_itemSegment, _icon_item_staticSegmentRomStart + gSaveContext.equips.button_items[0] * 0x80, 0x1000, "../z_construct.c", 203); + } - if (gSaveContext.equips.button_items[1] < 0xF0) + if (gSaveContext.equips.button_items[1] < 0xF0) { DmaMgr_SendRequest1((void*)((u32)interfaceCtx->icon_itemSegment + 0x1000), _icon_item_staticSegmentRomStart + gSaveContext.equips.button_items[1] * 0x80, 0x1000, "../z_construct.c", 209); + } - if (gSaveContext.equips.button_items[2] < 0xF0) + if (gSaveContext.equips.button_items[2] < 0xF0) { DmaMgr_SendRequest1((void*)((u32)interfaceCtx->icon_itemSegment + 0x2000), _icon_item_staticSegmentRomStart + gSaveContext.equips.button_items[2] * 0x80, 0x1000, "../z_construct.c", 214); + } - if (gSaveContext.equips.button_items[3] < 0xF0) + if (gSaveContext.equips.button_items[3] < 0xF0) { DmaMgr_SendRequest1((void*)((u32)interfaceCtx->icon_itemSegment + 0x3000), _icon_item_staticSegmentRomStart + gSaveContext.equips.button_items[3] * 0x80, 0x1000, "../z_construct.c", 219); + } osSyncPrintf("EVENT=%d\n", gSaveContext.timer_1_state); @@ -131,17 +140,19 @@ void func_801109B0(GlobalContext* globalCtx) { } } - if ((gSaveContext.timer_1_state == 4) || (gSaveContext.timer_1_state == 8)) + if ((gSaveContext.timer_1_state == 4) || (gSaveContext.timer_1_state == 8)) { temp = 0; - else + } else { temp = 1; + } gSaveContext.timer_x[temp] = 26; - if (gSaveContext.health_capacity > 0xA0) + if (gSaveContext.health_capacity > 0xA0) { gSaveContext.timer_y[temp] = 54; - else + } else { gSaveContext.timer_y[temp] = 46; + } } if ((gSaveContext.timer_1_state >= 11) && (gSaveContext.timer_1_state < 16)) { diff --git a/src/code/z_demo.c b/src/code/z_demo.c index bbc125e26..dd47227d4 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -114,8 +114,9 @@ void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx) { gSaveContext.cutscene_trigger = 1; } - if ((gSaveContext.cutscene_trigger != 0) && (globalCtx->sceneLoadFlag == 0x14)) + if ((gSaveContext.cutscene_trigger != 0) && (globalCtx->sceneLoadFlag == 0x14)) { gSaveContext.cutscene_trigger = 0; + } if ((gSaveContext.cutscene_trigger != 0) && (csCtx->state == CS_STATE_IDLE)) { // Translates to: "CUTSCENE START REQUEST ANNOUNCEMENT!" @@ -172,13 +173,15 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* sp3F = 0; - if ((csCtx->frames < cmd->startFrame) || (csCtx->frames >= cmd->endFrame) && (cmd->endFrame != cmd->startFrame)) + if ((csCtx->frames < cmd->startFrame) || (csCtx->frames >= cmd->endFrame) && (cmd->endFrame != cmd->startFrame)) { return; + } temp = func_8006F93C(cmd->endFrame - 1, cmd->startFrame, csCtx->frames); - if (csCtx->frames == cmd->startFrame) + if (csCtx->frames == cmd->startFrame) { sp3F = 1; + } switch (cmd->base) { case 1: @@ -198,13 +201,15 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* case 3: if (sp3F != 0) { func_8006C3D0(globalCtx, 0); - if (gSaveContext.entrance_index == 0x0053) + if (gSaveContext.entrance_index == 0x0053) { func_8006C3D0(globalCtx, 2); + } } break; case 6: - if (globalCtx->unk_10AC4 < 0x3200) + if (globalCtx->unk_10AC4 < 0x3200) { globalCtx->unk_10AC4 += 0x23; + } break; case 7: if (sp3F != 0) { @@ -219,8 +224,9 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* } break; case 8: - if (globalCtx->unk_11D30[0] < 0x80) + if (globalCtx->unk_11D30[0] < 0x80) { globalCtx->unk_11D30[0] += 4; + } break; case 9: globalCtx->unk_10B12[3] = 0x10; @@ -229,33 +235,40 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* func_8006C3D0(globalCtx, 1); break; case 11: - if (globalCtx->unk_11D30[0] < 0x672) + if (globalCtx->unk_11D30[0] < 0x672) { globalCtx->unk_11D30[0] += 0x14; - if (csCtx->frames == 0x30F) + } + if (csCtx->frames == 0x30F) { func_80078884(NA_SE_EV_DEKU_DEATH); - else if (csCtx->frames == 0x2CD) + } else if (csCtx->frames == 0x2CD) { globalCtx->unk_11D30[0] = 0; + } break; case 12: if (sp3F != 0) { - if (csCtx->state != CS_STATE_UNSKIPPABLE_EXEC) + if (csCtx->state != CS_STATE_UNSKIPPABLE_EXEC) { csCtx->state = CS_STATE_UNSKIPPABLE_INIT; + } } break; case 13: - if (globalCtx->unk_11D30[1] == 0) + if (globalCtx->unk_11D30[1] == 0) { func_80078884(NA_SE_EV_TRIFORCE_FLASH); - if (globalCtx->unk_11D30[1] < 0xFF) + } + if (globalCtx->unk_11D30[1] < 0xFF) { globalCtx->unk_11D30[1] += 5; + } break; case 14: - if (sp3F != 0) + if (sp3F != 0) { func_800BC490(globalCtx, 1); + } break; case 15: - if (sp3F != 0) + if (sp3F != 0) { TitleCard_InitPlaceName(globalCtx, &globalCtx->actorCtx.titleCtx, player->unk_1B0, 0xA0, 0x78, 0x90, 0x18, 0x14); + } break; case 16: if (sp3F != 0) { @@ -266,14 +279,16 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* } break; case 17: - if (sp3F != 0) + if (sp3F != 0) { func_80092FAC(D_8015FCCA); + } break; case 18: globalCtx->unk_10B12[0] = 0; globalCtx->gloomySkyEvent = 2; - if (gSaveContext.day_time < 0x4AAB) + if (gSaveContext.day_time < 0x4AAB) { gSaveContext.day_time += 30; + } if (globalCtx->unk_10B12[1] == 0) { D_8011FB30 = 0; func_800F6D58(14, 1, 0); @@ -305,17 +320,19 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* break; case 25: gSaveContext.day_time += 30; - if ((gSaveContext.day_time & 0xFFFF) > 0xCAAA) + if ((gSaveContext.day_time & 0xFFFF) > 0xCAAA) { gSaveContext.day_time = 0xCAAA; + } break; case 26: if ((gSaveContext.day_time < 0x3000) || (gSaveContext.day_time >= 0x4555)) { - if ((gSaveContext.day_time >= 0x4555) && (gSaveContext.day_time < 0xAAAB)) + if ((gSaveContext.day_time >= 0x4555) && (gSaveContext.day_time < 0xAAAB)) { globalCtx->unk_10AE3 = 1; - else if ((gSaveContext.day_time >= 0xAAAB) && (gSaveContext.day_time < 0xC556)) + } else if ((gSaveContext.day_time >= 0xAAAB) && (gSaveContext.day_time < 0xC556)) { globalCtx->unk_10AE3 = 2; - else + } else { globalCtx->unk_10AE3 = 3; + } } break; case 27: @@ -346,18 +363,20 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* func_8006C3D0(globalCtx, 4); break; case 32: - if (sp3F != 0) + if (sp3F != 0) { globalCtx->unk_10B0A = 1; + } func_800788CC(0x20C0); break; case 33: gSaveContext.unk_1422 = 1; break; case 34: - if (!gSaveContext.night_flag) + if (!gSaveContext.night_flag) { gSaveContext.day_time -= D_8011FB40; - else + } else { gSaveContext.day_time -= D_8011FB40 * 2; + } break; case 35: func_800EE824(csCtx); diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index ea67ceb05..85cc0e9c2 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -94,8 +94,9 @@ void En_A_Obj_Init(ActorEnAObj* this, GlobalContext* globalCtx) { break; } - if (this->actor.params >= 9) + if (this->actor.params >= 9) { sp28 = 12.0f; + } ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, sp28); @@ -154,8 +155,9 @@ void En_A_Obj_Init(ActorEnAObj* this, GlobalContext* globalCtx) { break; } - if (this->actor.params < 5) + if (this->actor.params < 5) { this->actor.sub_98.mass = 0xFF; + } if (this->dynaPolyId != -1) { DynaPolyInfo_Alloc(D_8011546C[this->dynaPolyId], &sp34); diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index 1945c75ff..348e983ba 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -289,8 +289,9 @@ void En_Item00_Init(ActorEnItem00* this, GlobalContext* globalCtx) { break; } - if ((sp2C != 0) && !func_8002F410(&this->actor, globalCtx)) + if ((sp2C != 0) && !func_8002F410(&this->actor, globalCtx)) { func_8002F554(&this->actor, globalCtx, sp2C); + } En_Item00_SetNewUpdate(this, (ActorFunc)func_8001E5C8); this->updateFunc(this, globalCtx); @@ -480,11 +481,13 @@ void En_Item00_Update(ActorEnItem00* this, GlobalContext* globalCtx) { sp3C = 0; sp3A = 0; - if (this->unk_15A > 0) + if (this->unk_15A > 0) { this->unk_15A--; + } - if ((this->unk_15A > 0) && (this->unk_15A < 41) && (this->unk_154 <= 0)) + if ((this->unk_15A > 0) && (this->unk_15A < 41) && (this->unk_154 <= 0)) { this->unk_156 = this->unk_15A; + } this->updateFunc(this, globalCtx); @@ -533,23 +536,28 @@ void En_Item00_Update(ActorEnItem00* this, GlobalContext* globalCtx) { (this->actor.params == DROP_TUNIC_ZORA) || (this->actor.params == DROP_TUNIC_GORON)) { f32 newUnkBC = Math_Coss(this->actor.shape.rot.x) * 37.0f; this->actor.shape.unk_08 = newUnkBC; - if (newUnkBC >= 0.0f) + if (newUnkBC >= 0.0f) { this->actor.shape.unk_08 = this->actor.shape.unk_08; - else + } else { this->actor.shape.unk_08 = -this->actor.shape.unk_08; + } } - if (this->unk_154 > 0) + if (this->unk_154 > 0) { return; + } // MISMATCH: The first function argument is loaded too early here if (!((this->actor.xzDistanceFromLink <= 30.0f) && (this->actor.yDistanceFromLink >= -50.0f) && - (this->actor.yDistanceFromLink <= 50.0f))) - if (!func_8002F410(&this->actor, globalCtx)) + (this->actor.yDistanceFromLink <= 50.0f))) { + if (!func_8002F410(&this->actor, globalCtx)) { return; + } + } - if (globalCtx->unk_10A20 != 0) + if (globalCtx->unk_10A20 != 0) { return; + } switch (this->actor.params) { case DROP_RUPEE_GREEN: @@ -630,8 +638,9 @@ void En_Item00_Update(ActorEnItem00* this, GlobalContext* globalCtx) { } // MISMATCH: The first function argument is also loaded too early here - if ((sp3C != 0) && !func_8002F410(&this->actor, globalCtx)) + if ((sp3C != 0) && !func_8002F410(&this->actor, globalCtx)) { func_8002F554(&this->actor, globalCtx, sp3C); + } switch (this->actor.params) { case DROP_HEART_PIECE: diff --git a/src/code/z_horse.c b/src/code/z_horse.c index 13f6382f5..44612269b 100644 --- a/src/code/z_horse.c +++ b/src/code/z_horse.c @@ -159,19 +159,21 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) { { 0xF6F7, 0x0139, 0x1766 }, }; - if (gSaveContext.entrance_index == 0x028A) + if (gSaveContext.entrance_index == 0x028A) { spawnPos = spawnPositions[0]; - else if (gSaveContext.entrance_index == 0x028E) + } else if (gSaveContext.entrance_index == 0x028E) { spawnPos = spawnPositions[1]; - else if (gSaveContext.entrance_index == 0x0292) + } else if (gSaveContext.entrance_index == 0x0292) { spawnPos = spawnPositions[2]; - else + } else { spawnPos = spawnPositions[3]; + } player->rideActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, spawnPos.x, spawnPos.y, spawnPos.z, 0, player->actor.posRot.rot.y, 0, 7); - if (player->rideActor == NULL) + if (player->rideActor == NULL) { __assert("player->ride.actor != NULL", "../z_horse.c", 561); + } func_8002DECC(globalCtx, player, player->rideActor); func_8002DE74(globalCtx, player); @@ -180,15 +182,17 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) { (Flags_GetEventChkInf(0x18) == 0) && (DREG(1) == 0)) { player->rideActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5); - if (player->rideActor == NULL) + if (player->rideActor == NULL) { __assert("player->ride.actor != NULL", "../z_horse.c", 582); + } func_8002DECC(globalCtx, player, player->rideActor); func_8002DE74(globalCtx, player); gSaveContext.horse_data.scene = globalCtx->sceneNum; - if (globalCtx->sceneNum == SCENE_SPOT12) + if (globalCtx->sceneNum == SCENE_SPOT12) { player->rideActor->room = -1; + } } else { static struct_8011F9B8 D_8011F9B8[] = { { 93, 0xFFF0, 0x0E10, 0x0585, 0x0168, 0x8001, 8 }, { 99, 0xFFF0, 0xFF06, 0x0001, 0xF9D4, 0x4000, 6 }, @@ -210,8 +214,9 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) { player->rideActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y, D_8011F9B8[i].pos.z, 0, player->actor.posRot.rot.y, 0, D_8011F9B8[i].type); - if (player->rideActor == NULL) + if (player->rideActor == NULL) { __assert("player->ride.actor != NULL", "../z_horse.c", 628); + } func_8002DECC(globalCtx, player, player->rideActor); func_8002DE74(globalCtx, player); @@ -221,14 +226,16 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) { s32 pad2; temp = 0; - if (((gSaveContext.event_inf[0] & 0x10) >> 4) && D_8011F9B8[i].type == 6) + if (((gSaveContext.event_inf[0] & 0x10) >> 4) && D_8011F9B8[i].type == 6) { temp = 0x8000; + } player->rideActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y, D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type | temp); - if (player->rideActor == NULL) + if (player->rideActor == NULL) { __assert("player->ride.actor != NULL", "../z_horse.c", 667); + } player->actor.posRot.pos.x = D_8011F9B8[i].pos.x; player->actor.posRot.pos.y = D_8011F9B8[i].pos.y; diff --git a/src/code/z_kaleido_scope_call.c b/src/code/z_kaleido_scope_call.c index a722beff9..3366c932d 100644 --- a/src/code/z_kaleido_scope_call.c +++ b/src/code/z_kaleido_scope_call.c @@ -75,8 +75,9 @@ void KaleidoScopeCall_Update(GlobalContext* globalCtx) { pauseCtx->state++; } else if (pauseCtx->state == 2 || pauseCtx->state == 9) { osSyncPrintf("R_PAUSE_MENU_MODE=%d\n", R_PAUSE_MENU_MODE); - if (R_PAUSE_MENU_MODE >= 3) + if (R_PAUSE_MENU_MODE >= 3) { pauseCtx->state++; + } } else if (pauseCtx->state != 0) { if (&gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE] != gKaleidoMgrCurOvl) { if (gKaleidoMgrCurOvl) { diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 91c70d609..51de6e08c 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -1141,13 +1141,15 @@ void Inventory_SwapAgeEquipment(void) { if (LINK_AGE_IN_YEARS == YEARS_CHILD) { for (i = 0; i < 4; i++) { - if (i != 0) + if (i != 0) { gSaveContext.child_equips.button_items[i] = gSaveContext.equips.button_items[i]; - else + } else { gSaveContext.child_equips.button_items[i] = ITEM_SWORD_KOKIRI; + } - if (i != 0) + if (i != 0) { gSaveContext.child_equips.c_button_slots[i - 1] = gSaveContext.equips.c_button_slots[i - 1]; + } } gSaveContext.child_equips.equipment = gSaveContext.equips.equipment; @@ -1172,8 +1174,9 @@ void Inventory_SwapAgeEquipment(void) { for (i = 0; i < 4; i++) { gSaveContext.equips.button_items[i] = gSaveContext.adult_equips.button_items[i]; - if (i != 0) + if (i != 0) { gSaveContext.equips.c_button_slots[i - 1] = gSaveContext.adult_equips.c_button_slots[i - 1]; + } if (((gSaveContext.equips.button_items[i] >= ITEM_BOTTLE) && (gSaveContext.equips.button_items[i] <= ITEM_POE)) || @@ -1190,8 +1193,9 @@ void Inventory_SwapAgeEquipment(void) { for (i = 0; i < 4; i++) { gSaveContext.adult_equips.button_items[i] = gSaveContext.equips.button_items[i]; - if (i != 0) + if (i != 0) { gSaveContext.adult_equips.c_button_slots[i - 1] = gSaveContext.equips.c_button_slots[i - 1]; + } } gSaveContext.adult_equips.equipment = gSaveContext.equips.equipment; @@ -1200,8 +1204,9 @@ void Inventory_SwapAgeEquipment(void) { for (i = 0; i < 4; i++) { gSaveContext.equips.button_items[i] = gSaveContext.child_equips.button_items[i]; - if (i != 0) + if (i != 0) { gSaveContext.equips.c_button_slots[i - 1] = gSaveContext.child_equips.c_button_slots[i - 1]; + } if (((gSaveContext.equips.button_items[i] >= ITEM_BOTTLE) && (gSaveContext.equips.button_items[i] <= ITEM_POE)) || @@ -1221,8 +1226,9 @@ void Inventory_SwapAgeEquipment(void) { temp = gEquipMasks[EQUIP_SHIELD] & gSaveContext.equips.equipment; if (temp != 0) { temp >>= gEquipShifts[EQUIP_SHIELD]; - if (!(gBitFlags[temp + 3] & gSaveContext.equipment)) + if (!(gBitFlags[temp + 3] & gSaveContext.equipment)) { gSaveContext.equips.equipment &= gEquipNegMasks[EQUIP_SHIELD]; + } } } #else @@ -1315,8 +1321,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { s8 bombCount; slot = SLOT(item); - if (item >= ITEM_STICKS_5) + if (item >= ITEM_STICKS_5) { slot = SLOT(sExtraItemBases[item - ITEM_STICKS_5]); + } osSyncPrintf(VT_FGCOL(YELLOW)); osSyncPrintf("item_get_setting=%d pt=%d z=%x\n", item, slot, gSaveContext.items[slot]); @@ -1330,8 +1337,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { osSyncPrintf("封印 = %x\n", gSaveContext.quest_items); osSyncPrintf(VT_RST); - if (item == ITEM_MEDALLION_WATER) + if (item == ITEM_MEDALLION_WATER) { func_8006D0AC(globalCtx); + } return ITEM_NONE; } else if ((item >= ITEM_SONG_MINUET) && (item <= ITEM_SONG_STORMS)) { @@ -1423,8 +1431,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { return ITEM_NONE; } else { AMMO(ITEM_BOW)++; - if (AMMO(ITEM_BOW) > CUR_CAPACITY(UPG_QUIVER)) + if (AMMO(ITEM_BOW) > CUR_CAPACITY(UPG_QUIVER)) { AMMO(ITEM_BOW) = CUR_CAPACITY(UPG_QUIVER); + } } } else if (item == ITEM_QUIVER_40) { Inventory_ChangeUpgrade(UPG_QUIVER, 2); @@ -1450,8 +1459,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { return ITEM_NONE; } else { AMMO(ITEM_BOMB)++; - if (AMMO(ITEM_BOMB) > CUR_CAPACITY(UPG_BOMB_BAG)) + if (AMMO(ITEM_BOMB) > CUR_CAPACITY(UPG_BOMB_BAG)) { AMMO(ITEM_BOMB) = CUR_CAPACITY(UPG_BOMB_BAG); + } } } else if (item == ITEM_BOMB_BAG_30) { Inventory_ChangeUpgrade(UPG_BOMB_BAG, 2); @@ -1483,26 +1493,30 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { Inventory_ChangeUpgrade(UPG_WALLET, 2); return ITEM_NONE; } else if (item == ITEM_STICK_UPGRADE_20) { - if (gSaveContext.items[slot] == ITEM_NONE) + if (gSaveContext.items[slot] == ITEM_NONE) { INV_CONTENT(ITEM_STICK) = ITEM_STICK; + } Inventory_ChangeUpgrade(UPG_STICKS, 2); AMMO(ITEM_STICK) = CAPACITY(UPG_STICKS, 2); return ITEM_NONE; } else if (item == ITEM_STICK_UPGRADE_30) { - if (gSaveContext.items[slot] == ITEM_NONE) + if (gSaveContext.items[slot] == ITEM_NONE) { INV_CONTENT(ITEM_STICK) = ITEM_STICK; + } Inventory_ChangeUpgrade(UPG_STICKS, 3); AMMO(ITEM_STICK) = CAPACITY(UPG_STICKS, 3); return ITEM_NONE; } else if (item == ITEM_NUT_UPGRADE_30) { - if (gSaveContext.items[slot] == ITEM_NONE) + if (gSaveContext.items[slot] == ITEM_NONE) { INV_CONTENT(ITEM_NUT) = ITEM_NUT; + } Inventory_ChangeUpgrade(UPG_NUTS, 2); AMMO(ITEM_NUT) = CAPACITY(UPG_NUTS, 2); return ITEM_NONE; } else if (item == ITEM_NUT_UPGRADE_40) { - if (gSaveContext.items[slot] == ITEM_NONE) + if (gSaveContext.items[slot] == ITEM_NONE) { INV_CONTENT(ITEM_NUT) = ITEM_NUT; + } Inventory_ChangeUpgrade(UPG_NUTS, 3); AMMO(ITEM_NUT) = CAPACITY(UPG_NUTS, 3); return ITEM_NONE; @@ -1521,8 +1535,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { AMMO(ITEM_STICK) = 1; } else { AMMO(ITEM_STICK)++; - if (AMMO(ITEM_STICK) > CUR_CAPACITY(UPG_STICKS)) + if (AMMO(ITEM_STICK) > CUR_CAPACITY(UPG_STICKS)) { AMMO(ITEM_STICK) = CUR_CAPACITY(UPG_STICKS); + } } } else if ((item == ITEM_STICKS_5) || (item == ITEM_STICKS_10)) { if (gSaveContext.items[slot] == ITEM_NONE) { @@ -1530,8 +1545,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { AMMO(ITEM_STICK) = sAmmoRefillCounts[item - ITEM_STICKS_5]; } else { AMMO(ITEM_STICK) += sAmmoRefillCounts[item - ITEM_STICKS_5]; - if (AMMO(ITEM_STICK) > CUR_CAPACITY(UPG_STICKS)) + if (AMMO(ITEM_STICK) > CUR_CAPACITY(UPG_STICKS)) { AMMO(ITEM_STICK) = CUR_CAPACITY(UPG_STICKS); + } } item = ITEM_STICK; } else if (item == ITEM_NUT) { @@ -1540,8 +1556,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { AMMO(ITEM_NUT) = ITEM_NUT; } else { AMMO(ITEM_NUT)++; - if (AMMO(ITEM_NUT) > CUR_CAPACITY(UPG_NUTS)) + if (AMMO(ITEM_NUT) > CUR_CAPACITY(UPG_NUTS)) { AMMO(ITEM_NUT) = CUR_CAPACITY(UPG_NUTS); + } } } else if ((item == ITEM_NUTS_5) || (item == ITEM_NUTS_10)) { if (gSaveContext.items[slot] == ITEM_NONE) { @@ -1552,8 +1569,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { sAmmoRefillCounts[item - ITEM_NUTS_5]); } else { AMMO(ITEM_NUT) += sAmmoRefillCounts[item - ITEM_NUTS_5]; - if (AMMO(ITEM_NUT) > CUR_CAPACITY(UPG_NUTS)) + if (AMMO(ITEM_NUT) > CUR_CAPACITY(UPG_NUTS)) { AMMO(ITEM_NUT) = CUR_CAPACITY(UPG_NUTS); + } } item = ITEM_NUT; } else if (item == ITEM_BOMB) { @@ -1561,14 +1579,16 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { osSyncPrintf(" 爆弾 爆弾 爆弾 爆弾 爆弾 爆弾 爆弾 \n"); bombCount = AMMO(ITEM_BOMB) + 1; AMMO(ITEM_BOMB) = bombCount; - if (bombCount > CUR_CAPACITY(UPG_BOMB_BAG)) + if (bombCount > CUR_CAPACITY(UPG_BOMB_BAG)) { AMMO(ITEM_BOMB) = CUR_CAPACITY(UPG_BOMB_BAG); + } return ITEM_NONE; } else if ((item >= ITEM_BOMBS_5) && (item <= ITEM_BOMBS_30)) { bombCount = AMMO(ITEM_BOMB) + sAmmoRefillCounts[item - ITEM_BOMBS_5]; AMMO(ITEM_BOMB) = bombCount; - if (bombCount > CUR_CAPACITY(UPG_BOMB_BAG)) + if (bombCount > CUR_CAPACITY(UPG_BOMB_BAG)) { AMMO(ITEM_BOMB) = CUR_CAPACITY(UPG_BOMB_BAG); + } return ITEM_NONE; } else if (item == ITEM_BOMBCHU) { if (gSaveContext.items[slot] == ITEM_NONE) { @@ -1577,8 +1597,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { return ITEM_NONE; } else { AMMO(ITEM_BOMBCHU) += 10; - if (AMMO(ITEM_BOMBCHU) > 50) + if (AMMO(ITEM_BOMBCHU) > 50) { AMMO(ITEM_BOMBCHU) = 50; + } return ITEM_NONE; } } else if ((item == ITEM_BOMBCHUS_5) || (item == ITEM_BOMBCHUS_20)) { @@ -1588,15 +1609,17 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { return ITEM_NONE; } else { AMMO(ITEM_BOMBCHU) += sAmmoRefillCounts[item - ITEM_BOMBCHUS_5 + 8]; - if (AMMO(ITEM_BOMBCHU) > 50) + if (AMMO(ITEM_BOMBCHU) > 50) { AMMO(ITEM_BOMBCHU) = 50; + } return ITEM_NONE; } } else if ((item >= ITEM_ARROWS_SMALL) && (item <= ITEM_ARROWS_LARGE)) { AMMO(ITEM_BOW) += sAmmoRefillCounts[item - ITEM_ARROWS_SMALL + 4]; - if ((AMMO(ITEM_BOW) >= CUR_CAPACITY(UPG_QUIVER)) || (AMMO(ITEM_BOW) < 0)) + if ((AMMO(ITEM_BOW) >= CUR_CAPACITY(UPG_QUIVER)) || (AMMO(ITEM_BOW) < 0)) { AMMO(ITEM_BOW) = CUR_CAPACITY(UPG_QUIVER); + } osSyncPrintf("%d本 Item_MaxGet=%d\n", AMMO(ITEM_BOW), CUR_CAPACITY(UPG_QUIVER)); @@ -1609,8 +1632,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { } else if (item == ITEM_SEEDS) { AMMO(ITEM_SLINGSHOT) += 5; - if (AMMO(ITEM_SLINGSHOT) >= CUR_CAPACITY(UPG_BULLET_BAG)) + if (AMMO(ITEM_SLINGSHOT) >= CUR_CAPACITY(UPG_BULLET_BAG)) { AMMO(ITEM_SLINGSHOT) = CUR_CAPACITY(UPG_BULLET_BAG); + } if (!(gSaveContext.item_get_inf[1] & 8)) { gSaveContext.item_get_inf[1] |= 8; @@ -1621,8 +1645,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { } else if (item == ITEM_SEEDS_30) { AMMO(ITEM_SLINGSHOT) += 30; - if (AMMO(ITEM_SLINGSHOT) >= CUR_CAPACITY(UPG_BULLET_BAG)) + if (AMMO(ITEM_SLINGSHOT) >= CUR_CAPACITY(UPG_BULLET_BAG)) { AMMO(ITEM_SLINGSHOT) = CUR_CAPACITY(UPG_BULLET_BAG); + } if (!(gSaveContext.item_get_inf[1] & 8)) { gSaveContext.item_get_inf[1] |= 8; @@ -1665,8 +1690,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { Health_ChangeBy(globalCtx, 0x10); return item; } else if (item == ITEM_MAGIC_SMALL) { - if (gSaveContext.unk_13F0 != 10) + if (gSaveContext.unk_13F0 != 10) { func_80087680(globalCtx); + } func_80087708(globalCtx, 12, 5); @@ -1677,8 +1703,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { return item; } else if (item == ITEM_MAGIC_LARGE) { - if (gSaveContext.unk_13F0 != 10) + if (gSaveContext.unk_13F0 != 10) { func_80087680(globalCtx); + } func_80087708(globalCtx, 24, 5); @@ -1741,8 +1768,9 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { } } } else if ((item >= ITEM_WEIRD_EGG) && (item <= ITEM_CLAIM_CHECK)) { - if (item == ITEM_SAW) + if (item == ITEM_SAW) { gSaveContext.item_get_inf[1] |= 0x8000; + } prevTradeItem = INV_CONTENT(item); INV_CONTENT(item) = item; @@ -1990,8 +2018,9 @@ void Inventory_UpdateBottleItem(GlobalContext* globalCtx, u8 item, u8 cButton) { // Special case to only empty half of a Lon Lon Milk Bottle if ((gSaveContext.items[gSaveContext.equips.c_button_slots[cButton - 1]] == ITEM_MILK_BOTTLE) && - (item == ITEM_BOTTLE)) + (item == ITEM_BOTTLE)) { item = ITEM_MILK_HALF; + } gSaveContext.items[gSaveContext.equips.c_button_slots[cButton - 1]] = item; gSaveContext.equips.button_items[cButton] = item; @@ -2052,14 +2081,17 @@ u32 sDoActionTextures[] = { 0x07000000, 0x07000180 }; #ifdef NON_MATCHING // 0x80000000 is reused in the 2 *_TO_VIRTUAL macros when it shouldn't void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 arg2) { - if (action >= 0x1D) + if (action >= 0x1D) { action = 0x0A; + } - if (gSaveContext.language != 0) + if (gSaveContext.language != 0) { action += 0x1D; + } - if (gSaveContext.language == 2) + if (gSaveContext.language == 2) { action += 0x1D; + } if ((action != 0x0A) && (action != 0x27) && (action != 0x44)) { osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, OS_MESG_BLOCK); @@ -2375,12 +2407,14 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { if (gSaveContext.unk_13F4 != maxMagic) { if (gSaveContext.unk_13F4 < maxMagic) { gSaveContext.unk_13F4 += 8; - if (gSaveContext.unk_13F4 > maxMagic) + if (gSaveContext.unk_13F4 > maxMagic) { gSaveContext.unk_13F4 = maxMagic; + } } else { gSaveContext.unk_13F4 -= 8; - if (gSaveContext.unk_13F4 <= maxMagic) + if (gSaveContext.unk_13F4 <= maxMagic) { gSaveContext.unk_13F4 = maxMagic; + } } } else { gSaveContext.unk_13F0 = 9; @@ -2389,8 +2423,9 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { case 9: gSaveContext.magic += 4; - if (gSaveContext.game_mode == 0 && gSaveContext.scene_setup_index < 4) + if (gSaveContext.game_mode == 0 && gSaveContext.scene_setup_index < 4) { Audio_PlaySoundGeneral(0x401F, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + } // Translates to: "Storage MAGIC_NOW=%d (%d)" osSyncPrintf("蓄電 MAGIC_NOW=%d (%d)\n", gSaveContext.magic, gSaveContext.unk_13F6); @@ -2423,20 +2458,23 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { case 6: color = sMagicBorderColors[sMagicBorderIndexes[sMagicBorderStep]]; - if (sMagicBorderR >= color[0]) + if (sMagicBorderR >= color[0]) { sMagicBorderR -= ABS(sMagicBorderR - color[0]) / sMagicBorderRatio; - else + } else { sMagicBorderR += ABS(sMagicBorderR - color[0]) / sMagicBorderRatio; + } - if (sMagicBorderG >= color[1]) + if (sMagicBorderG >= color[1]) { sMagicBorderG -= ABS(sMagicBorderG - color[1]) / sMagicBorderRatio; - else + } else { sMagicBorderG += ABS(sMagicBorderG - color[1]) / sMagicBorderRatio; + } - if (sMagicBorderB >= color[2]) + if (sMagicBorderB >= color[2]) { sMagicBorderB -= ABS(sMagicBorderB - color[2]) / sMagicBorderRatio; - else + } else { sMagicBorderB += ABS(sMagicBorderB - color[2]) / sMagicBorderRatio; + } sMagicBorderRatio--; if (sMagicBorderRatio == 0) { @@ -2445,8 +2483,9 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { sMagicBorderB = color[2]; sMagicBorderRatio = YREG(40 + sMagicBorderStep); sMagicBorderStep++; - if (sMagicBorderStep >= 4) + if (sMagicBorderStep >= 4) { sMagicBorderStep = 0; + } } break; case 5: @@ -2481,20 +2520,23 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { color = sMagicBorderColors[sMagicBorderIndexes[sMagicBorderStep]]; - if (sMagicBorderR >= color[0]) + if (sMagicBorderR >= color[0]) { sMagicBorderR -= ABS(sMagicBorderR - color[0]) / sMagicBorderRatio; - else + } else { sMagicBorderR += ABS(sMagicBorderR - color[0]) / sMagicBorderRatio; + } - if (sMagicBorderG >= color[1]) + if (sMagicBorderG >= color[1]) { sMagicBorderG -= ABS(sMagicBorderG - color[1]) / sMagicBorderRatio; - else + } else { sMagicBorderG += ABS(sMagicBorderG - color[1]) / sMagicBorderRatio; + } - if (sMagicBorderB >= color[2]) + if (sMagicBorderB >= color[2]) { sMagicBorderB -= ABS(sMagicBorderB - color[2]) / sMagicBorderRatio; - else + } else { sMagicBorderB += ABS(sMagicBorderB - color[2]) / sMagicBorderRatio; + } sMagicBorderRatio--; if (sMagicBorderRatio == 0) { @@ -2503,8 +2545,9 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { sMagicBorderB = color[2]; sMagicBorderRatio = YREG(40 + sMagicBorderStep); sMagicBorderStep++; - if (sMagicBorderStep >= 4) + if (sMagicBorderStep >= 4) { sMagicBorderStep = 0; + } } break; case 10: @@ -2772,13 +2815,14 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { // C-Up Button Texture, Color & Label (Navi Text) gDPPipeSync(gfxCtx->overlay.p++); - if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) + if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) { cUpAlpha = 0; - else if ((player->stateFlags2 & 0x00200000) || (func_8008F2F8(globalCtx) == 4) || - (player->stateFlags2 & 0x00040000)) + } else if ((player->stateFlags2 & 0x00200000) || (func_8008F2F8(globalCtx) == 4) || + (player->stateFlags2 & 0x00040000)) { cUpAlpha = 0x46; - else + } else { cUpAlpha = interfaceCtx->healthAlpha; + } gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), cUpAlpha); gDPSetCombineLERP(gfxCtx->overlay.p++, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, @@ -2820,15 +2864,16 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { // Empty C Button Arrows for (i = 1; i < 4; i++) { if (gSaveContext.equips.button_items[i] > 0xF0) { - if (i == 1) + if (i == 1) { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cLeftAlpha); - else if (i == 2) + } else if (i == 2) { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cDownAlpha); - else + } else { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2), interfaceCtx->cRightAlpha); + } gfxCtx->overlay.p = Draw_TextureIA8(gfxCtx->overlay.p, &D_02000A00[i + 1], 0x20, 0x20, R_ITEM_BTN_X(i), R_ITEM_BTN_Y(i), @@ -3188,12 +3233,13 @@ void Interface_Draw(GlobalContext* globalCtx) { // Rupee Counter gDPPipeSync(gfxCtx->overlay.p++); - if (gSaveContext.rupees == CUR_CAPACITY(UPG_WALLET)) + if (gSaveContext.rupees == CUR_CAPACITY(UPG_WALLET)) { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x78, 0xFF, 0x00, interfaceCtx->magicAlpha); - else if (gSaveContext.rupees != 0) + } else if (gSaveContext.rupees != 0) { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->magicAlpha); - else + } else { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x64, 0x64, 0x64, interfaceCtx->magicAlpha); + } gDPSetCombineLERP(gfxCtx->overlay.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); @@ -3201,8 +3247,9 @@ void Interface_Draw(GlobalContext* globalCtx) { interfaceCtx->counterDigits[0] = interfaceCtx->counterDigits[1] = 0; interfaceCtx->counterDigits[2] = gSaveContext.rupees; - if ((interfaceCtx->counterDigits[2] >= 10000) || (interfaceCtx->counterDigits[2] < 0)) + if ((interfaceCtx->counterDigits[2] >= 10000) || (interfaceCtx->counterDigits[2] < 0)) { interfaceCtx->counterDigits[2] &= 0xDDD; + } while (interfaceCtx->counterDigits[2] >= 100) { interfaceCtx->counterDigits[2] -= 100; @@ -3225,8 +3272,9 @@ void Interface_Draw(GlobalContext* globalCtx) { Interface_DrawMagicBar(globalCtx); Interface_DrawMinimap(globalCtx); - if ((R_PAUSE_MENU_MODE != 2) && (R_PAUSE_MENU_MODE != 3)) + if ((R_PAUSE_MENU_MODE != 2) && (R_PAUSE_MENU_MODE != 3)) { func_8002C124(&globalCtx->actorCtx.targetCtx, globalCtx); // Draw Z-Target + } func_80094520(globalCtx->state.gfxCtx); @@ -3343,10 +3391,11 @@ void Interface_Draw(GlobalContext* globalCtx) { G_MTX_MODELVIEW | G_MTX_LOAD); gSPVertex(gfxCtx->overlay.p++, &interfaceCtx->vtx_128[4], 4, 0); - if ((interfaceCtx->unk_1EC < 2) || (interfaceCtx->unk_1EC == 3)) + if ((interfaceCtx->unk_1EC < 2) || (interfaceCtx->unk_1EC == 3)) { Interface_DrawActionLabel(globalCtx->state.gfxCtx, (void*)(u32)interfaceCtx->do_actionSegment); - else + } else { Interface_DrawActionLabel(globalCtx->state.gfxCtx, (void*)((u32)interfaceCtx->do_actionSegment + 0x180)); + } gDPPipeSync(gfxCtx->overlay.p++); @@ -3441,10 +3490,11 @@ void Interface_Draw(GlobalContext* globalCtx) { phi_s1 = ZREG(14); for (phi_s3 = 1; phi_s3 < 7; phi_s3++) { // Carrot Color (based on availability) - if ((interfaceCtx->unk_23A == 0) || (interfaceCtx->unk_23A < phi_s3)) + if ((interfaceCtx->unk_23A == 0) || (interfaceCtx->unk_23A < phi_s3)) { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x00, 0x96, 0xFF, interfaceCtx->aAlpha); - else + } else { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->aAlpha); + } gSPTextureRectangle(gfxCtx->overlay.p++, phi_s1 << 2, ZREG(15) << 2, (phi_s1 + 16) << 2, (ZREG(15) + 16) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024); @@ -3507,10 +3557,11 @@ void Interface_Draw(GlobalContext* globalCtx) { (gSaveContext.equips.button_items[0] != ITEM_SWORD_MASTER) && (gSaveContext.equips.button_items[0] != ITEM_SWORD_BGS) && (gSaveContext.equips.button_items[0] != ITEM_SWORD_KNIFE)) { - if (gSaveContext.button_status[0] != BTN_ENABLED) + if (gSaveContext.button_status[0] != BTN_ENABLED) { gSaveContext.equips.button_items[0] = gSaveContext.button_status[0]; - else + } else { gSaveContext.equips.button_items[0] = ITEM_NONE; + } } // Revert any spoiling trade quest items @@ -3553,20 +3604,22 @@ void Interface_Draw(GlobalContext* globalCtx) { case 5: case 11: D_8015FFE0 = D_8015FFE2 = 20; - if (gSaveContext.timer_1_state == 5) + if (gSaveContext.timer_1_state == 5) { gSaveContext.timer_1_state = 6; - else + } else { gSaveContext.timer_1_state = 12; + } break; case 6: case 12: D_8015FFE2--; if (D_8015FFE2 == 0) { D_8015FFE2 = 20; - if (gSaveContext.timer_1_state == 6) + if (gSaveContext.timer_1_state == 6) { gSaveContext.timer_1_state = 7; - else + } else { gSaveContext.timer_1_state = 13; + } } break; case 3: @@ -3574,10 +3627,11 @@ void Interface_Draw(GlobalContext* globalCtx) { phi_s3 = (gSaveContext.timer_x[0] - 26) / D_8015FFE2; gSaveContext.timer_x[0] -= phi_s3; - if (gSaveContext.health_capacity > 0xA0) + if (gSaveContext.health_capacity > 0xA0) { phi_s3 = (gSaveContext.timer_y[0] - 54) / D_8015FFE2; - else + } else { phi_s3 = (gSaveContext.timer_y[0] - 46) / D_8015FFE2; + } gSaveContext.timer_y[0] -= phi_s3; D_8015FFE2--; @@ -3585,30 +3639,34 @@ void Interface_Draw(GlobalContext* globalCtx) { gSaveContext.timer_x[0] = 26; D_8015FFE2 = 20; - if (gSaveContext.health_capacity > 0xA0) + if (gSaveContext.health_capacity > 0xA0) { gSaveContext.timer_y[0] = 54; - else + } else { gSaveContext.timer_y[0] = 46; + } - if (gSaveContext.timer_1_state == 3) + if (gSaveContext.timer_1_state == 3) { gSaveContext.timer_1_state = 4; - else + } else { gSaveContext.timer_1_state = 8; + } } case 4: case 8: if ((gSaveContext.timer_1_state == 4) || (gSaveContext.timer_1_state == 8)) { - if (gSaveContext.health_capacity > 0xA0) + if (gSaveContext.health_capacity > 0xA0) { gSaveContext.timer_y[0] = 54; - else + } else { gSaveContext.timer_y[0] = 46; + } } if ((gSaveContext.timer_1_state >= 3) && (msgCtx->unk_E300 == 0)) { D_8015FFE0--; if (D_8015FFE0 == 0) { - if (gSaveContext.timer_1_value != 0) + if (gSaveContext.timer_1_value != 0) { gSaveContext.timer_1_value--; + } D_8015FFE0 = 20; @@ -3620,13 +3678,15 @@ void Interface_Draw(GlobalContext* globalCtx) { } D_80125A5C = 0; } else if (gSaveContext.timer_1_value > 60) { - if (sTimerDigits[4] == 1) + if (sTimerDigits[4] == 1) { Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + } } else if (gSaveContext.timer_1_value >= 11) { - if (sTimerDigits[4] & 1) + if (sTimerDigits[4] & 1) { Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + } } else { Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); @@ -3638,10 +3698,11 @@ void Interface_Draw(GlobalContext* globalCtx) { phi_s3 = (gSaveContext.timer_x[0] - 26) / D_8015FFE2; gSaveContext.timer_x[0] -= phi_s3; - if (gSaveContext.health_capacity > 0xA0) + if (gSaveContext.health_capacity > 0xA0) { phi_s3 = (gSaveContext.timer_y[0] - 54) / D_8015FFE2; - else + } else { phi_s3 = (gSaveContext.timer_y[0] - 46) / D_8015FFE2; + } gSaveContext.timer_y[0] -= phi_s3; D_8015FFE2--; @@ -3649,19 +3710,21 @@ void Interface_Draw(GlobalContext* globalCtx) { gSaveContext.timer_x[0] = 26; D_8015FFE2 = 20; - if (gSaveContext.health_capacity > 0xA0) + if (gSaveContext.health_capacity > 0xA0) { gSaveContext.timer_y[0] = 54; - else + } else { gSaveContext.timer_y[0] = 46; + } gSaveContext.timer_1_state = 14; } case 14: if (gSaveContext.timer_1_state == 14) { - if (gSaveContext.health_capacity > 0xA0) + if (gSaveContext.health_capacity > 0xA0) { gSaveContext.timer_y[0] = 54; - else + } else { gSaveContext.timer_y[0] = 46; + } } if (gSaveContext.timer_1_state >= 3) { @@ -3686,10 +3749,11 @@ void Interface_Draw(GlobalContext* globalCtx) { gSaveContext.timer_y[1] = 80; D_8015FFE4 = D_8015FFE6 = 20; - if (gSaveContext.timer_2_state < 7) + if (gSaveContext.timer_2_state < 7) { gSaveContext.timer_2_state = 2; - else + } else { gSaveContext.timer_2_state = 8; + } gSaveContext.timer_1_state = 0; } else { @@ -3706,20 +3770,22 @@ void Interface_Draw(GlobalContext* globalCtx) { gSaveContext.timer_x[1] = 140; gSaveContext.timer_y[1] = 80; D_8015FFE4 = D_8015FFE6 = 20; - if (gSaveContext.timer_2_state == 1) + if (gSaveContext.timer_2_state == 1) { gSaveContext.timer_2_state = 2; - else + } else { gSaveContext.timer_2_state = 8; + } break; case 2: case 8: D_8015FFE6--; if (D_8015FFE6 == 0) { D_8015FFE6 = 20; - if (gSaveContext.timer_2_state == 2) + if (gSaveContext.timer_2_state == 2) { gSaveContext.timer_2_state = 3; - else + } else { gSaveContext.timer_2_state = 9; + } } break; case 3: @@ -3730,10 +3796,11 @@ void Interface_Draw(GlobalContext* globalCtx) { phi_s3 = (gSaveContext.timer_x[1] - 26) / D_8015FFE2; gSaveContext.timer_x[1] -= phi_s3; - if (gSaveContext.health_capacity > 0xA0) + if (gSaveContext.health_capacity > 0xA0) { phi_s3 = (gSaveContext.timer_y[1] - 54) / D_8015FFE6; - else + } else { phi_s3 = (gSaveContext.timer_y[1] - 46) / D_8015FFE6; + } gSaveContext.timer_y[1] -= phi_s3; D_8015FFE6--; @@ -3741,23 +3808,26 @@ void Interface_Draw(GlobalContext* globalCtx) { gSaveContext.timer_x[1] = 26; D_8015FFE6 = 20; - if (gSaveContext.health_capacity > 0xA0) + if (gSaveContext.health_capacity > 0xA0) { gSaveContext.timer_y[1] = 54; - else + } else { gSaveContext.timer_y[1] = 46; + } - if (gSaveContext.timer_2_state == 3) + if (gSaveContext.timer_2_state == 3) { gSaveContext.timer_2_state = 4; - else + } else { gSaveContext.timer_2_state = 10; + } } case 4: case 10: if ((gSaveContext.timer_2_state == 4) || (gSaveContext.timer_2_state == 10)) { - if (gSaveContext.health_capacity > 0xA0) + if (gSaveContext.health_capacity > 0xA0) { gSaveContext.timer_y[1] = 54; - else + } else { gSaveContext.timer_y[1] = 46; + } } if (gSaveContext.timer_2_state >= 3) { @@ -3785,13 +3855,15 @@ void Interface_Draw(GlobalContext* globalCtx) { } } else { if (gSaveContext.timer_2_value > 60) { - if (sTimerDigits[4] == 1) + if (sTimerDigits[4] == 1) { Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + } } else if (gSaveContext.timer_2_value > 10) { - if (sTimerDigits[4] & 1) + if (sTimerDigits[4] & 1) { Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + } } else { Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); @@ -3817,8 +3889,9 @@ void Interface_Draw(GlobalContext* globalCtx) { break; case 6: D_8015FFE6--; - if (D_8015FFE6 == 0) + if (D_8015FFE6 == 0) { gSaveContext.timer_2_state = 0; + } break; } } @@ -3828,10 +3901,11 @@ void Interface_Draw(GlobalContext* globalCtx) { sTimerDigits[0] = sTimerDigits[1] = sTimerDigits[3] = 0; sTimerDigits[2] = 10; // digit 10 is used as ':' (colon) - if (gSaveContext.timer_1_state != 0) + if (gSaveContext.timer_1_state != 0) { sTimerDigits[4] = gSaveContext.timer_1_value; - else + } else { sTimerDigits[4] = gSaveContext.timer_2_value; + } while (sTimerDigits[4] >= 60) { sTimerDigits[1]++; @@ -3860,15 +3934,17 @@ void Interface_Draw(GlobalContext* globalCtx) { TEXEL0, 0, PRIMITIVE, 0); if (gSaveContext.timer_1_state != 0) { - if ((gSaveContext.timer_1_value < 10) && (gSaveContext.timer_1_state < 11)) + if ((gSaveContext.timer_1_value < 10) && (gSaveContext.timer_1_state < 11)) { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0x32, 0x00, 0xFF); - else + } else { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); + } } else { - if ((gSaveContext.timer_2_value < 10) && (gSaveContext.timer_2_state < 6)) + if ((gSaveContext.timer_2_value < 10) && (gSaveContext.timer_2_state < 6)) { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0x32, 0x00, 0xFF); - else + } else { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0x00, 0xFF); + } } for (phi_s3 = 0; phi_s3 < 5; phi_s3++) { @@ -3881,8 +3957,9 @@ void Interface_Draw(GlobalContext* globalCtx) { } } - if (pauseCtx->flag == 3) + if (pauseCtx->flag == 3) { func_8002AAB0(globalCtx); + } if (interfaceCtx->unk_244 != 0) { gDPPipeSync(gfxCtx->overlay.p++); @@ -3952,32 +4029,38 @@ void Interface_Update(GlobalContext* globalCtx) { case 12: case 13: alpha = 0xFF - (gSaveContext.unk_13EC << 5); - if (alpha < 0) + if (alpha < 0) { alpha = 0; + } func_80082850(globalCtx, alpha); gSaveContext.unk_13EC++; - if (alpha == 0) + if (alpha == 0) { gSaveContext.unk_13E8 = 0; + } break; case 50: alpha = 0xFF - (gSaveContext.unk_13EC << 5); - if (alpha < 0) + if (alpha < 0) { alpha = 0; + } alpha1 = 0xFF - alpha; - if (alpha1 >= 0xFF) + if (alpha1 >= 0xFF) { alpha1 = 0xFF; + } osSyncPrintf("case 50 : alpha=%d alpha1=%d\n", alpha, alpha1); func_80082644(globalCtx, alpha1); - if (interfaceCtx->healthAlpha != 0xFF) + if (interfaceCtx->healthAlpha != 0xFF) { interfaceCtx->healthAlpha = alpha1; + } - if (interfaceCtx->magicAlpha != 0xFF) + if (interfaceCtx->magicAlpha != 0xFF) { interfaceCtx->magicAlpha = alpha1; + } switch (globalCtx->sceneNum) { case SCENE_SPOT00: @@ -4000,20 +4083,23 @@ void Interface_Update(GlobalContext* globalCtx) { case SCENE_SPOT18: case SCENE_SPOT20: case SCENE_GANON_TOU: - if (interfaceCtx->minimapAlpha < 0xAA) + if (interfaceCtx->minimapAlpha < 0xAA) { interfaceCtx->minimapAlpha = alpha1; - else + } else { interfaceCtx->minimapAlpha = 0xAA; + } break; default: - if (interfaceCtx->minimapAlpha != 0xFF) + if (interfaceCtx->minimapAlpha != 0xFF) { interfaceCtx->minimapAlpha = alpha1; + } break; } gSaveContext.unk_13EC++; - if (alpha1 == 0xFF) + if (alpha1 == 0xFF) { gSaveContext.unk_13E8 = 0; + } break; case 52: @@ -4030,8 +4116,9 @@ void Interface_Update(GlobalContext* globalCtx) { gSaveContext.health_accumulator -= 4; gSaveContext.health += 4; - if ((gSaveContext.health & 0xF) < 4) + if ((gSaveContext.health & 0xF) < 4) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + } osSyncPrintf("now_life=%d max_life=%d\n", gSaveContext.health, gSaveContext.health_capacity); @@ -4079,8 +4166,9 @@ void Interface_Update(GlobalContext* globalCtx) { gSaveContext.rupee_accumulator += 10; gSaveContext.rupees -= 10; - if (gSaveContext.rupees < 0) + if (gSaveContext.rupees < 0) { gSaveContext.rupees = 0; + } Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); } else { @@ -4108,8 +4196,9 @@ void Interface_Update(GlobalContext* globalCtx) { interfaceCtx->unk_1EC = 0; interfaceCtx->unk_1EE = interfaceCtx->unk_1F0; action = interfaceCtx->unk_1EE; - if ((action == 0x1D) || (action == 0x1E)) + if ((action == 0x1D) || (action == 0x1E)) { action = 0xA; + } Interface_LoadActionLabel(interfaceCtx, action, 0); } break; @@ -4127,8 +4216,9 @@ void Interface_Update(GlobalContext* globalCtx) { interfaceCtx->unk_1EC = 0; interfaceCtx->unk_1EE = interfaceCtx->unk_1F0; action = interfaceCtx->unk_1EE; - if ((action == 0x1D) || (action == 0x1E)) + if ((action == 0x1D) || (action == 0x1E)) { action = 0xA; + } Interface_LoadActionLabel(interfaceCtx, action, 0); } break; @@ -4173,11 +4263,13 @@ void Interface_Update(GlobalContext* globalCtx) { interfaceCtx->unk_23C = 0; if (sHBAScoreTier == 0) { - if (gSaveContext.minigame_score >= 1000) + if (gSaveContext.minigame_score >= 1000) { sHBAScoreTier++; + } } else if (sHBAScoreTier == 1) { - if (gSaveContext.minigame_score >= 1500) + if (gSaveContext.minigame_score >= 1500) { sHBAScoreTier++; + } } sHBAScoreDigits[1] = 0; @@ -4202,14 +4294,16 @@ void Interface_Update(GlobalContext* globalCtx) { } if (gSaveContext.unk_1422 != 0) { - if ((msgCtx->unk_E3F0 != 0x31) && (gSaveContext.unk_1422 == 1)) + if ((msgCtx->unk_E3F0 != 0x31) && (gSaveContext.unk_1422 == 1)) { globalCtx->msgCtx.unk_E3EE = 4; + } if (globalCtx->unk_10A26 != 0) { if (gSaveContext.unk_1422 != 2) { D_80125B60 = 0; - if ((gSaveContext.day_time >= 0x4555) && (gSaveContext.day_time <= 0xC001)) + if ((gSaveContext.day_time >= 0x4555) && (gSaveContext.day_time <= 0xC001)) { D_80125B60 = 1; + } gSaveContext.unk_1422 = 2; D_80125B64 = D_8011FB40; diff --git a/src/code/z_room.c b/src/code/z_room.c index f225ef77f..f74888438 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -129,8 +129,9 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { spA4 = &spB8[0]; polygonDlist = SEGMENTED_TO_VIRTUAL(room->mesh->polygon2.start); polygon2 = &room->mesh->polygon2; - if (polygon2->num > SHAPE_SORT_MAX) + if (polygon2->num > SHAPE_SORT_MAX) { __assert("polygon2->num <= SHAPE_SORT_MAX", "../z_room.c", 317); + } sp78 = polygonDlist; for (sp9C = 0; sp9C < polygon2->num; sp9C++) { @@ -152,8 +153,9 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { spA4->unk_08 = NULL; } else { do { - if (spA4->unk_04 < phi_v0->unk_04) + if (spA4->unk_04 < phi_v0->unk_04) { break; + } phi_v0 = phi_v0->unk_0C; } while (phi_v0 != NULL); @@ -165,10 +167,11 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { } else { phi_a0 = phi_v0->unk_08; spA4->unk_08 = phi_a0; - if (phi_a0 == NULL) + if (phi_a0 == NULL) { spB4 = spA4; - else + } else { phi_a0->unk_0C = spA4; + } phi_v0->unk_08 = spA4; spA4->unk_0C = (void*)phi_v0; } @@ -187,25 +190,30 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { if (iREG(86) != 0) { phi_v1 = 0; while (phi_v1 < polygon2->num) { - if (phi_s0 == sp78) + if (phi_s0 == sp78) { break; + } phi_v1++; sp78++; } if (((iREG(86) == 1) && (iREG(89) > sp9C)) || ((iREG(86) == 2) && (iREG(89) == sp9C))) { - if ((flags & 1) && (phi_s0->opa != NULL)) + if ((flags & 1) && (phi_s0->opa != NULL)) { gSPDisplayList(gfxCtx->polyOpa.p++, phi_s0->opa); + } - if ((flags & 2) && (phi_s0->xlu != NULL)) + if ((flags & 2) && (phi_s0->xlu != NULL)) { gSPDisplayList(gfxCtx->polyXlu.p++, phi_s0->xlu); + } } } else { - if ((flags & 1) && (phi_s0->opa != NULL)) + if ((flags & 1) && (phi_s0->opa != NULL)) { gSPDisplayList(gfxCtx->polyOpa.p++, phi_s0->opa); + } - if ((flags & 2) && (phi_s0->xlu != NULL)) + if ((flags & 2) && (phi_s0->xlu != NULL)) { gSPDisplayList(gfxCtx->polyXlu.p++, phi_s0->xlu); + } } spB4 = spB4->unk_0C; @@ -541,8 +549,9 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) { for (i = 0; i < globalCtx->nbRooms; i++) { roomSize = roomList[i].vromEnd - roomList[i].vromStart; osSyncPrintf("ROOM%d size=%d\n", i, roomSize); - if (maxRoomSize < roomSize) + if (maxRoomSize < roomSize) { maxRoomSize = roomSize; + } } if (globalCtx->nbTransitionActors != 0) { @@ -559,8 +568,9 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) { cumulRoomSize = (frontRoom != backRoom) ? frontRoomSize + backRoomSize : frontRoomSize; osSyncPrintf("DOOR%d=<%d> ROOM1=<%d, %d> ROOM2=<%d, %d>\n", j, cumulRoomSize, frontRoom, frontRoomSize, backRoom, backRoomSize); - if (maxRoomSize < cumulRoomSize) + if (maxRoomSize < cumulRoomSize) { maxRoomSize = cumulRoomSize; + } transitionActor++; } } @@ -578,10 +588,11 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) { roomCtx->unk_30 = 0; roomCtx->status = 0; - if (gSaveContext.respawn_flag > 0) + if (gSaveContext.respawn_flag > 0) { nextRoomNum = gSaveContext.respawn[gSaveContext.respawn_flag - 1].room_index; - else + } else { nextRoomNum = globalCtx->setupEntranceList[globalCtx->curSpawn].room; + } func_8009728C(globalCtx, roomCtx, nextRoomNum); return maxRoomSize; diff --git a/src/code/z_scene.c b/src/code/z_scene.c index 949e1e41c..3a7121b04 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -312,13 +312,15 @@ void func_8009899C(GlobalContext* globalCtx, SceneCmd* cmd) { } } - if (cmd->objectList.num > OBJECT_EXCHANGE_BANK_MAX) + if (cmd->objectList.num > OBJECT_EXCHANGE_BANK_MAX) { __assert("scene_info->object_bank.num <= OBJECT_EXCHANGE_BANK_MAX", "../z_scene.c", 705); + } while (k < cmd->objectList.num) { nextPtr = func_800982FC(&globalCtx->objectCtx, i, *objectEntry); - if (i < OBJECT_EXCHANGE_BANK_MAX - 1) + if (i < OBJECT_EXCHANGE_BANK_MAX - 1) { globalCtx->objectCtx.status[i + 1].segment = nextPtr; + } k++; objectEntry++; status++; diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index 86d79168f..1bdfde9e3 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -2271,10 +2271,11 @@ void func_8009FE58(GlobalContext* globalCtx) { D_8012A398 += 0.15f + (globalCtx->unk_11D30[1] * 0.001f); } - if (globalCtx->roomCtx.curRoom.num == 2) + if (globalCtx->roomCtx.curRoom.num == 2) { Matrix_Scale(1, sinf(D_8012A398) * 0.8f, 1, MTXMODE_NEW); - else + } else { Matrix_Scale(1.005f, sinf(D_8012A398) * 0.8f, 1.005f, MTXMODE_NEW); + } gSPSegment(gfxCtx->polyOpa.p++, 0x0D, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_scene_table.c", 7809)); diff --git a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c index 4d0e42b6a..f3c3d9628 100644 --- a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c +++ b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c @@ -70,12 +70,10 @@ static void func_8087828C(BgGateShutter* this, GlobalContext* globalCtx) { if (this->unk_168 == 1 && !(gSaveContext.inf_table[7] & 0x40)) { this->unk_178 = 2; this->actionFunc = (ActorFunc)func_80878300; - } - else if (this->unk_168 == 2) { + } else if (this->unk_168 == 2) { this->unk_178 = 2; this->actionFunc = (ActorFunc)func_80878300; - } - else if (this->unk_168 < 0) { + } else if (this->unk_168 < 0) { this->unk_178 = 2; this->actionFunc = (ActorFunc)func_808783D4; } diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index b1a828e3c..7d9e0fbb9 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -20,11 +20,18 @@ static void func_808C0CD4(BgZg* this, GlobalContext* globalCtx); static void func_808C0D08(BgZg* this, GlobalContext* globalCtx); static void func_808C0EEC(BgZg* this, GlobalContext* globalCtx); -static const ActorFunc actionFuncs[] = { (ActorFunc)func_808C0CD4, (ActorFunc)func_808C0D08, }; +static const ActorFunc actionFuncs[] = { + (ActorFunc)func_808C0CD4, + (ActorFunc)func_808C0D08, +}; -static InitChainEntry initChain[] = { ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP), }; +static InitChainEntry initChain[] = { + ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP), +}; -static const ActorFunc drawFuncs[] = { (ActorFunc)func_808C0EEC, }; +static const ActorFunc drawFuncs[] = { + (ActorFunc)func_808C0EEC, +}; const ActorInit Bg_Zg_InitVars = { ACTOR_BG_ZG, diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c index 20fa54640..7a782fd49 100644 --- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c +++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c @@ -98,12 +98,13 @@ void EnTuboTrap_SpawnFragments(EnTuboTrap* this, GlobalContext* globalCtx) { spC8.z += actorPos->z; rand = Math_Rand_ZeroOne(); - if (rand < 0.2f) + if (rand < 0.2f) { temp = 96; - else if (rand < 0.6f) + } else if (rand < 0.6f) { temp = 64; - else + } else { temp = 32; + } Effect_SpawnFragment(globalCtx, &spC8, &spBC, actorPos, -240, temp, 10, 10, 0, (Math_Rand_ZeroOne() * 65.0f) + 15.0f, 0, 32, 60, -1, 3, addr); @@ -153,10 +154,11 @@ void EnTuboTrap_SpawnWaterFragments(EnTuboTrap* this, GlobalContext* globalCtx) spC8.z += actorPos->z; rand = Math_Rand_ZeroOne(); - if (rand < 0.2f) + if (rand < 0.2f) { temp = 64; - else + } else { temp = 32; + } Effect_SpawnFragment(globalCtx, &spC8, &spBC, actorPos, -180, temp, 30, 30, 0, (Math_Rand_ZeroOne() * 65.0f) + 15.0f, 0, 32, 70, -1, 3, addr); -- cgit v1.2.3 From 3acb30694bdd19ecc29aad35037506687cf2ccd8 Mon Sep 17 00:00:00 2001 From: Roman971 Date: Tue, 24 Mar 2020 00:21:05 +0100 Subject: Fix actor init vars brace style under bootstrap comments --- src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c | 3 +-- src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c | 3 +-- src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c | 3 +-- src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c | 3 +-- src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c | 3 +-- src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c | 3 +-- src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c | 3 +-- src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c | 3 +-- src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c | 3 +-- src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c | 3 +-- src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c | 3 +-- src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c | 3 +-- src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c | 3 +-- src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c | 3 +-- src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c | 3 +-- src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c | 3 +-- src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c | 3 +-- src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c | 3 +-- src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c | 3 +-- src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c | 3 +-- src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c | 3 +-- src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c | 3 +-- src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c | 3 +-- src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c | 3 +-- src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c | 3 +-- src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c | 3 +-- src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c | 3 +-- src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c | 3 +-- src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c | 3 +-- .../actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c | 3 +-- src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c | 3 +-- src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c | 3 +-- src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c | 3 +-- src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c | 3 +-- src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c | 3 +-- src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c | 3 +-- src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c | 3 +-- src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c | 3 +-- src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c | 3 +-- src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c | 3 +-- src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c | 3 +-- src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c | 3 +-- src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c | 3 +-- src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c | 3 +-- src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c | 3 +-- src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c | 3 +-- src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c | 3 +-- src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c | 3 +-- src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c | 3 +-- src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c | 3 +-- src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c | 3 +-- src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c | 3 +-- src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c | 3 +-- src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c | 3 +-- src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c | 3 +-- src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c | 3 +-- src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c | 3 +-- src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c | 3 +-- src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c | 3 +-- src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c | 3 +-- src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c | 3 +-- src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c | 3 +-- .../actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c | 3 +-- src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c | 3 +-- src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c | 3 +-- .../actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c | 3 +-- src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c | 3 +-- src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c | 3 +-- src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c | 3 +-- src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c | 3 +-- src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c | 3 +-- src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c | 3 +-- .../actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c | 3 +-- src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c | 3 +-- src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c | 3 +-- src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c | 3 +-- src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c | 3 +-- src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c | 3 +-- src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c | 3 +-- src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c | 3 +-- src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c | 3 +-- src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c | 3 +-- src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c | 3 +-- src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c | 3 +-- src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 3 +-- src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 3 +-- src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 3 +-- src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c | 3 +-- src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 3 +-- src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c | 3 +-- src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c | 3 +-- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 3 +-- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 3 +-- src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 3 +-- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 3 +-- src/overlays/actors/ovl_Demo_6K/z_demo_6k.c | 3 +-- src/overlays/actors/ovl_Demo_Du/z_demo_du.c | 3 +-- src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c | 3 +-- src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c | 3 +-- src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c | 3 +-- src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c | 3 +-- src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c | 3 +-- src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c | 3 +-- src/overlays/actors/ovl_Demo_Im/z_demo_im.c | 3 +-- src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c | 3 +-- src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c | 3 +-- src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c | 3 +-- src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c | 3 +-- src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c | 3 +-- src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c | 3 +-- src/overlays/actors/ovl_Door_Killer/z_door_killer.c | 3 +-- src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c | 3 +-- src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c | 3 +-- src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c | 3 +-- src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c | 3 +-- src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c | 3 +-- src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c | 3 +-- src/overlays/actors/ovl_En_Am/z_en_am.c | 3 +-- src/overlays/actors/ovl_En_Ani/z_en_ani.c | 3 +-- src/overlays/actors/ovl_En_Anubice/z_en_anubice.c | 3 +-- src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c | 3 +-- src/overlays/actors/ovl_En_Arrow/z_en_arrow.c | 3 +-- src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c | 3 +-- src/overlays/actors/ovl_En_Ba/z_en_ba.c | 3 +-- src/overlays/actors/ovl_En_Bb/z_en_bb.c | 3 +-- src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c | 3 +-- src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c | 3 +-- src/overlays/actors/ovl_En_Bili/z_en_bili.c | 3 +-- src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c | 3 +-- src/overlays/actors/ovl_En_Bom/z_en_bom.c | 3 +-- src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c | 3 +-- src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c | 3 +-- src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c | 3 +-- src/overlays/actors/ovl_En_Bombf/z_en_bombf.c | 3 +-- src/overlays/actors/ovl_En_Box/z_en_box.c | 3 +-- src/overlays/actors/ovl_En_Brob/z_en_brob.c | 3 +-- src/overlays/actors/ovl_En_Bubble/z_en_bubble.c | 3 +-- src/overlays/actors/ovl_En_Butte/z_en_butte.c | 3 +-- src/overlays/actors/ovl_En_Bw/z_en_bw.c | 3 +-- src/overlays/actors/ovl_En_Bx/z_en_bx.c | 3 +-- src/overlays/actors/ovl_En_Changer/z_en_changer.c | 3 +-- src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c | 3 +-- src/overlays/actors/ovl_En_Cow/z_en_cow.c | 3 +-- src/overlays/actors/ovl_En_Crow/z_en_crow.c | 3 +-- src/overlays/actors/ovl_En_Cs/z_en_cs.c | 3 +-- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 3 +-- src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c | 3 +-- src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c | 3 +-- src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c | 3 +-- src/overlays/actors/ovl_En_Dh/z_en_dh.c | 3 +-- src/overlays/actors/ovl_En_Dha/z_en_dha.c | 3 +-- src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c | 3 +-- src/overlays/actors/ovl_En_Dns/z_en_dns.c | 3 +-- src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c | 3 +-- src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c | 3 +-- src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c | 3 +-- src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c | 3 +-- src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c | 3 +-- src/overlays/actors/ovl_En_Door/z_en_door.c | 3 +-- src/overlays/actors/ovl_En_Ds/z_en_ds.c | 3 +-- src/overlays/actors/ovl_En_Du/z_en_du.c | 3 +-- src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c | 3 +-- src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c | 3 +-- src/overlays/actors/ovl_En_Elf/z_en_elf.c | 3 +-- src/overlays/actors/ovl_En_Encount1/z_en_encount1.c | 3 +-- src/overlays/actors/ovl_En_Encount2/z_en_encount2.c | 3 +-- src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c | 3 +-- src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c | 3 +-- src/overlays/actors/ovl_En_Fd/z_en_fd.c | 3 +-- src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c | 3 +-- src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c | 3 +-- src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c | 3 +-- src/overlays/actors/ovl_En_Firefly/z_en_firefly.c | 3 +-- src/overlays/actors/ovl_En_Fish/z_en_fish.c | 3 +-- src/overlays/actors/ovl_En_Floormas/z_en_floormas.c | 3 +-- src/overlays/actors/ovl_En_Fr/z_en_fr.c | 3 +-- src/overlays/actors/ovl_En_Fu/z_en_fu.c | 3 +-- src/overlays/actors/ovl_En_Fw/z_en_fw.c | 3 +-- src/overlays/actors/ovl_En_Fz/z_en_fz.c | 3 +-- src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c | 3 +-- src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c | 3 +-- src/overlays/actors/ovl_En_Gb/z_en_gb.c | 3 +-- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 3 +-- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 3 +-- src/overlays/actors/ovl_En_Ge3/z_en_ge3.c | 3 +-- src/overlays/actors/ovl_En_GeldB/z_en_geldb.c | 3 +-- src/overlays/actors/ovl_En_GirlA/z_en_girla.c | 3 +-- src/overlays/actors/ovl_En_Gm/z_en_gm.c | 3 +-- src/overlays/actors/ovl_En_Go/z_en_go.c | 3 +-- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 3 +-- src/overlays/actors/ovl_En_Goma/z_en_goma.c | 3 +-- src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c | 3 +-- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 3 +-- src/overlays/actors/ovl_En_Guest/z_en_guest.c | 3 +-- src/overlays/actors/ovl_En_Hata/z_en_hata.c | 3 +-- src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c | 3 +-- src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c | 3 +-- src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c | 3 +-- src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c | 3 +-- src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c | 3 +-- src/overlays/actors/ovl_En_Holl/z_en_holl.c | 3 +-- src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c | 3 +-- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 3 +-- src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c | 3 +-- src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c | 3 +-- src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c | 3 +-- src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c | 3 +-- src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c | 3 +-- src/overlays/actors/ovl_En_Hs/z_en_hs.c | 3 +-- src/overlays/actors/ovl_En_Hs2/z_en_hs2.c | 3 +-- src/overlays/actors/ovl_En_Hy/z_en_hy.c | 3 +-- src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c | 3 +-- src/overlays/actors/ovl_En_Ik/z_en_ik.c | 3 +-- src/overlays/actors/ovl_En_In/z_en_in.c | 3 +-- src/overlays/actors/ovl_En_Insect/z_en_insect.c | 3 +-- src/overlays/actors/ovl_En_Ishi/z_en_ishi.c | 3 +-- src/overlays/actors/ovl_En_Jj/z_en_jj.c | 3 +-- src/overlays/actors/ovl_En_Js/z_en_js.c | 3 +-- src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c | 3 +-- src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c | 3 +-- src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c | 3 +-- src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c | 3 +-- src/overlays/actors/ovl_En_Kanban/z_en_kanban.c | 3 +-- src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c | 3 +-- src/overlays/actors/ovl_En_Ko/z_en_ko.c | 3 +-- src/overlays/actors/ovl_En_Kusa/z_en_kusa.c | 3 +-- src/overlays/actors/ovl_En_Kz/z_en_kz.c | 3 +-- src/overlays/actors/ovl_En_Light/z_en_light.c | 3 +-- src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c | 3 +-- src/overlays/actors/ovl_En_Ma1/z_en_ma1.c | 3 +-- src/overlays/actors/ovl_En_Ma2/z_en_ma2.c | 3 +-- src/overlays/actors/ovl_En_Ma3/z_en_ma3.c | 3 +-- src/overlays/actors/ovl_En_Mag/z_en_mag.c | 3 +-- src/overlays/actors/ovl_En_Mb/z_en_mb.c | 3 +-- src/overlays/actors/ovl_En_Md/z_en_md.c | 3 +-- src/overlays/actors/ovl_En_Mk/z_en_mk.c | 3 +-- src/overlays/actors/ovl_En_Mm/z_en_mm.c | 3 +-- src/overlays/actors/ovl_En_Mm2/z_en_mm2.c | 3 +-- src/overlays/actors/ovl_En_Mu/z_en_mu.c | 3 +-- src/overlays/actors/ovl_En_Nb/z_en_nb.c | 3 +-- src/overlays/actors/ovl_En_Niw/z_en_niw.c | 3 +-- src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c | 3 +-- src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c | 3 +-- src/overlays/actors/ovl_En_Nwc/z_en_nwc.c | 3 +-- src/overlays/actors/ovl_En_Ny/z_en_ny.c | 3 +-- src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c | 3 +-- src/overlays/actors/ovl_En_Okuta/z_en_okuta.c | 3 +-- src/overlays/actors/ovl_En_Ossan/z_en_ossan.c | 3 +-- src/overlays/actors/ovl_En_Owl/z_en_owl.c | 3 +-- src/overlays/actors/ovl_En_Part/z_en_part.c | 3 +-- src/overlays/actors/ovl_En_Peehat/z_en_peehat.c | 3 +-- src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c | 3 +-- src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c | 3 +-- src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c | 3 +-- src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c | 3 +-- src/overlays/actors/ovl_En_Poh/z_en_poh.c | 3 +-- src/overlays/actors/ovl_En_Rd/z_en_rd.c | 3 +-- src/overlays/actors/ovl_En_Reeba/z_en_reeba.c | 3 +-- src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c | 3 +-- src/overlays/actors/ovl_En_Rl/z_en_rl.c | 3 +-- src/overlays/actors/ovl_En_Rr/z_en_rr.c | 3 +-- src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 3 +-- src/overlays/actors/ovl_En_Ru2/z_en_ru2.c | 3 +-- src/overlays/actors/ovl_En_Sa/z_en_sa.c | 3 +-- src/overlays/actors/ovl_En_Sb/z_en_sb.c | 3 +-- src/overlays/actors/ovl_En_Sda/z_en_sda.c | 3 +-- src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c | 3 +-- src/overlays/actors/ovl_En_Si/z_en_si.c | 3 +-- src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c | 3 +-- src/overlays/actors/ovl_En_Skb/z_en_skb.c | 3 +-- src/overlays/actors/ovl_En_Skj/z_en_skj.c | 3 +-- src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c | 3 +-- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 3 +-- src/overlays/actors/ovl_En_St/z_en_st.c | 3 +-- src/overlays/actors/ovl_En_Sth/z_en_sth.c | 3 +-- src/overlays/actors/ovl_En_Stream/z_en_stream.c | 3 +-- src/overlays/actors/ovl_En_Sw/z_en_sw.c | 3 +-- src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c | 3 +-- src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c | 3 +-- src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c | 3 +-- src/overlays/actors/ovl_En_Ta/z_en_ta.c | 3 +-- src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c | 3 +-- src/overlays/actors/ovl_En_Tana/z_en_tana.c | 3 +-- src/overlays/actors/ovl_En_Test/z_en_test.c | 3 +-- src/overlays/actors/ovl_En_Tg/z_en_tg.c | 3 +-- src/overlays/actors/ovl_En_Tite/z_en_tite.c | 3 +-- src/overlays/actors/ovl_En_Torch2/z_en_torch2.c | 3 +-- src/overlays/actors/ovl_En_Toryo/z_en_toryo.c | 3 +-- src/overlays/actors/ovl_En_Tp/z_en_tp.c | 3 +-- src/overlays/actors/ovl_En_Tr/z_en_tr.c | 3 +-- src/overlays/actors/ovl_En_Trap/z_en_trap.c | 3 +-- src/overlays/actors/ovl_En_Vali/z_en_vali.c | 3 +-- src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c | 3 +-- src/overlays/actors/ovl_En_Viewer/z_en_viewer.c | 3 +-- src/overlays/actors/ovl_En_Vm/z_en_vm.c | 3 +-- src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c | 3 +-- src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c | 3 +-- src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c | 3 +-- src/overlays/actors/ovl_En_Wf/z_en_wf.c | 3 +-- src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c | 3 +-- src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c | 3 +-- src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c | 3 +-- src/overlays/actors/ovl_En_Wood02/z_en_wood02.c | 3 +-- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 3 +-- src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c | 3 +-- src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c | 3 +-- src/overlays/actors/ovl_En_Zf/z_en_zf.c | 3 +-- src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 3 +-- src/overlays/actors/ovl_En_Zl2/z_en_zl2.c | 3 +-- src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 3 +-- src/overlays/actors/ovl_En_Zl4/z_en_zl4.c | 3 +-- src/overlays/actors/ovl_En_Zo/z_en_zo.c | 3 +-- src/overlays/actors/ovl_En_fHG/z_en_fhg.c | 3 +-- src/overlays/actors/ovl_End_Title/z_end_title.c | 3 +-- src/overlays/actors/ovl_Fishing/z_fishing.c | 3 +-- src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c | 3 +-- src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c | 3 +-- src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c | 3 +-- src/overlays/actors/ovl_Item_Shield/z_item_shield.c | 3 +-- src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c | 3 +-- src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c | 3 +-- src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c | 3 +-- src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c | 3 +-- src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c | 3 +-- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c | 3 +-- src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c | 3 +-- src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c | 3 +-- src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c | 3 +-- src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c | 3 +-- src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c | 3 +-- src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c | 3 +-- src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c | 3 +-- src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c | 3 +-- src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c | 3 +-- src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c | 3 +-- src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c | 3 +-- src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c | 3 +-- src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c | 3 +-- src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c | 3 +-- src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c | 3 +-- src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c | 3 +-- src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c | 3 +-- src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c | 3 +-- src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c | 3 +-- src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c | 3 +-- src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c | 3 +-- src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c | 3 +-- src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c | 3 +-- src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c | 3 +-- src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c | 3 +-- src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c | 3 +-- src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c | 3 +-- 373 files changed, 373 insertions(+), 746 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index bf24cb970..2c4c6d6d4 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -9,8 +9,7 @@ void ArmsHook_Update(ArmsHook* this, GlobalContext* globalCtx); void ArmsHook_Draw(ArmsHook* this, GlobalContext* globalCtx); /* -const ActorInit Arms_Hook_InitVars = -{ +const ActorInit Arms_Hook_InitVars = { ACTOR_ARMS_HOOK, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 436e0fd78..391c1798e 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -9,8 +9,7 @@ void ArrowFire_Update(ArrowFire* this, GlobalContext* globalCtx); void ArrowFire_Draw(ArrowFire* this, GlobalContext* globalCtx); /* -const ActorInit Arrow_Fire_InitVars = -{ +const ActorInit Arrow_Fire_InitVars = { ACTOR_ARROW_FIRE, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index dcd9b8aca..c13d3f928 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -9,8 +9,7 @@ void ArrowIce_Update(ArrowIce* this, GlobalContext* globalCtx); void ArrowIce_Draw(ArrowIce* this, GlobalContext* globalCtx); /* -const ActorInit Arrow_Ice_InitVars = -{ +const ActorInit Arrow_Ice_InitVars = { ACTOR_ARROW_ICE, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 255088a17..508ac2925 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -9,8 +9,7 @@ void ArrowLight_Update(ArrowLight* this, GlobalContext* globalCtx); void ArrowLight_Draw(ArrowLight* this, GlobalContext* globalCtx); /* -const ActorInit Arrow_Light_InitVars = -{ +const ActorInit Arrow_Light_InitVars = { ACTOR_ARROW_LIGHT, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c index f288e6ae7..e5d5c0aae 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c @@ -9,8 +9,7 @@ void BgBdanObjects_Update(BgBdanObjects* this, GlobalContext* globalCtx); void BgBdanObjects_Draw(BgBdanObjects* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Bdan_Objects_InitVars = -{ +const ActorInit Bg_Bdan_Objects_InitVars = { ACTOR_BG_BDAN_OBJECTS, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c index a9bad9857..f6b861eb0 100644 --- a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c @@ -9,8 +9,7 @@ void BgBombwall_Update(BgBombwall* this, GlobalContext* globalCtx); void BgBombwall_Draw(BgBombwall* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Bombwall_InitVars = -{ +const ActorInit Bg_Bombwall_InitVars = { ACTOR_BG_BOMBWALL, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c index 9a6e73a48..94caa74c1 100644 --- a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c +++ b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c @@ -9,8 +9,7 @@ void BgBowlWall_Update(BgBowlWall* this, GlobalContext* globalCtx); void BgBowlWall_Draw(BgBowlWall* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Bowl_Wall_InitVars = -{ +const ActorInit Bg_Bowl_Wall_InitVars = { ACTOR_BG_BOWL_WALL, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index dedd2a7af..9458d03a6 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -8,8 +8,7 @@ void BgBreakwall_Destroy(BgBreakwall* this, GlobalContext* globalCtx); void BgBreakwall_Update(BgBreakwall* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Breakwall_InitVars = -{ +const ActorInit Bg_Breakwall_InitVars = { ACTOR_BG_BREAKWALL, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c index b3ac8a472..fe107255e 100644 --- a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c +++ b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c @@ -9,8 +9,7 @@ void BgDdanJd_Update(BgDdanJd* this, GlobalContext* globalCtx); void BgDdanJd_Draw(BgDdanJd* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ddan_Jd_InitVars = -{ +const ActorInit Bg_Ddan_Jd_InitVars = { ACTOR_BG_DDAN_JD, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c index 1f88d2783..8d397e640 100644 --- a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c +++ b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c @@ -9,8 +9,7 @@ void BgDdanKd_Update(BgDdanKd* this, GlobalContext* globalCtx); void BgDdanKd_Draw(BgDdanKd* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ddan_Kd_InitVars = -{ +const ActorInit Bg_Ddan_Kd_InitVars = { ACTOR_BG_DDAN_KD, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c index 967be1388..e5b649f7b 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -9,8 +9,7 @@ void BgDodoago_Update(BgDodoago* this, GlobalContext* globalCtx); void BgDodoago_Draw(BgDodoago* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Dodoago_InitVars = -{ +const ActorInit Bg_Dodoago_InitVars = { ACTOR_BG_DODOAGO, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index 2df2523ee..e1021f9a5 100644 --- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -8,8 +8,7 @@ void BgDyYoseizo_Destroy(BgDyYoseizo* this, GlobalContext* globalCtx); void BgDyYoseizo_Update(BgDyYoseizo* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Dy_Yoseizo_InitVars = -{ +const ActorInit Bg_Dy_Yoseizo_InitVars = { ACTOR_BG_DY_YOSEIZO, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c index e9a53f1d7..6b65fa52c 100644 --- a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c +++ b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c @@ -9,8 +9,7 @@ void BgGanonOtyuka_Update(BgGanonOtyuka* this, GlobalContext* globalCtx); void BgGanonOtyuka_Draw(BgGanonOtyuka* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ganon_Otyuka_InitVars = -{ +const ActorInit Bg_Ganon_Otyuka_InitVars = { ACTOR_BG_GANON_OTYUKA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c index 79ee9d72f..c9e781a47 100644 --- a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c +++ b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c @@ -9,8 +9,7 @@ void BgGjyoBridge_Update(BgGjyoBridge* this, GlobalContext* globalCtx); void BgGjyoBridge_Draw(BgGjyoBridge* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Gjyo_Bridge_InitVars = -{ +const ActorInit Bg_Gjyo_Bridge_InitVars = { ACTOR_BG_GJYO_BRIDGE, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c index 82514de7e..e4f20e07e 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c @@ -8,8 +8,7 @@ void BgGndDarkmeiro_Destroy(BgGndDarkmeiro* this, GlobalContext* globalCtx); void BgGndDarkmeiro_Update(BgGndDarkmeiro* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Gnd_Darkmeiro_InitVars = -{ +const ActorInit Bg_Gnd_Darkmeiro_InitVars = { ACTOR_BG_GND_DARKMEIRO, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c index 8db58c43d..80cb6139f 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c @@ -9,8 +9,7 @@ void BgGndFiremeiro_Update(BgGndFiremeiro* this, GlobalContext* globalCtx); void BgGndFiremeiro_Draw(BgGndFiremeiro* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Gnd_Firemeiro_InitVars = -{ +const ActorInit Bg_Gnd_Firemeiro_InitVars = { ACTOR_BG_GND_FIREMEIRO, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c index 2075d3960..f3411be9c 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c @@ -9,8 +9,7 @@ void BgGndIceblock_Update(BgGndIceblock* this, GlobalContext* globalCtx); void BgGndIceblock_Draw(BgGndIceblock* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Gnd_Iceblock_InitVars = -{ +const ActorInit Bg_Gnd_Iceblock_InitVars = { ACTOR_BG_GND_ICEBLOCK, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c index 40238ba7d..c4e647712 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c @@ -9,8 +9,7 @@ void BgGndSoulmeiro_Update(BgGndSoulmeiro* this, GlobalContext* globalCtx); void BgGndSoulmeiro_Draw(BgGndSoulmeiro* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Gnd_Soulmeiro_InitVars = -{ +const ActorInit Bg_Gnd_Soulmeiro_InitVars = { ACTOR_BG_GND_SOULMEIRO, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c index 6941e4288..056676cb6 100644 --- a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c +++ b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c @@ -9,8 +9,7 @@ void BgHaka_Update(BgHaka* this, GlobalContext* globalCtx); void BgHaka_Draw(BgHaka* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Haka_InitVars = -{ +const ActorInit Bg_Haka_InitVars = { ACTOR_BG_HAKA, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index 02264be14..f5f8b7cb7 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -9,8 +9,7 @@ void BgHakaGate_Update(BgHakaGate* this, GlobalContext* globalCtx); void BgHakaGate_Draw(BgHakaGate* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Haka_Gate_InitVars = -{ +const ActorInit Bg_Haka_Gate_InitVars = { ACTOR_BG_HAKA_GATE, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c b/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c index 1dc6221a2..803382600 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c +++ b/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c @@ -9,8 +9,7 @@ void BgHakaHuta_Update(BgHakaHuta* this, GlobalContext* globalCtx); void BgHakaHuta_Draw(BgHakaHuta* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Haka_Huta_InitVars = -{ +const ActorInit Bg_Haka_Huta_InitVars = { ACTOR_BG_HAKA_HUTA, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c index 53cd70fa9..a60362a98 100644 --- a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c +++ b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c @@ -9,8 +9,7 @@ void BgHakaMeganeBG_Update(BgHakaMeganeBG* this, GlobalContext* globalCtx); void BgHakaMeganeBG_Draw(BgHakaMeganeBG* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Haka_MeganeBG_InitVars = -{ +const ActorInit Bg_Haka_MeganeBG_InitVars = { ACTOR_BG_HAKA_MEGANEBG, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c index 7fd5c9492..d85c5dbf8 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c +++ b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c @@ -8,8 +8,7 @@ void BgHakaSgami_Destroy(BgHakaSgami* this, GlobalContext* globalCtx); void BgHakaSgami_Update(BgHakaSgami* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Haka_Sgami_InitVars = -{ +const ActorInit Bg_Haka_Sgami_InitVars = { ACTOR_BG_HAKA_SGAMI, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c index 2201dcb92..db2dd668c 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c +++ b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c @@ -9,8 +9,7 @@ void BgHakaShip_Update(BgHakaShip* this, GlobalContext* globalCtx); void BgHakaShip_Draw(BgHakaShip* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Haka_Ship_InitVars = -{ +const ActorInit Bg_Haka_Ship_InitVars = { ACTOR_BG_HAKA_SHIP, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c index 94684d9f8..4961c344b 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c +++ b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c @@ -9,8 +9,7 @@ void BgHakaTrap_Update(BgHakaTrap* this, GlobalContext* globalCtx); void BgHakaTrap_Draw(BgHakaTrap* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Haka_Trap_InitVars = -{ +const ActorInit Bg_Haka_Trap_InitVars = { ACTOR_BG_HAKA_TRAP, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index c6e50f9ce..7d644832a 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -9,8 +9,7 @@ void BgHakaTubo_Update(BgHakaTubo* this, GlobalContext* globalCtx); void BgHakaTubo_Draw(BgHakaTubo* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Haka_Tubo_InitVars = -{ +const ActorInit Bg_Haka_Tubo_InitVars = { ACTOR_BG_HAKA_TUBO, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c index e059e992e..348a26231 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c +++ b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c @@ -9,8 +9,7 @@ void BgHakaWater_Update(BgHakaWater* this, GlobalContext* globalCtx); void BgHakaWater_Draw(BgHakaWater* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Haka_Water_InitVars = -{ +const ActorInit Bg_Haka_Water_InitVars = { ACTOR_BG_HAKA_WATER, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c b/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c index 0b426a1c0..e43e56bc4 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c +++ b/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c @@ -8,8 +8,7 @@ void BgHakaZou_Destroy(BgHakaZou* this, GlobalContext* globalCtx); void BgHakaZou_Update(BgHakaZou* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Haka_Zou_InitVars = -{ +const ActorInit Bg_Haka_Zou_InitVars = { ACTOR_BG_HAKA_ZOU, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index 7d17f584b..10b8ffff0 100644 --- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -9,8 +9,7 @@ void BgHeavyBlock_Update(BgHeavyBlock* this, GlobalContext* globalCtx); void BgHeavyBlock_Draw(BgHeavyBlock* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Heavy_Block_InitVars = -{ +const ActorInit Bg_Heavy_Block_InitVars = { ACTOR_BG_HEAVY_BLOCK, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c index 351fe7ebf..a23d1c899 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c @@ -9,8 +9,7 @@ void BgHidanCurtain_Update(BgHidanCurtain* this, GlobalContext* globalCtx); void BgHidanCurtain_Draw(BgHidanCurtain* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Curtain_InitVars = -{ +const ActorInit Bg_Hidan_Curtain_InitVars = { ACTOR_BG_HIDAN_CURTAIN, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c index 3dc9b1725..95dc82183 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c @@ -9,8 +9,7 @@ void BgHidanDalm_Update(BgHidanDalm* this, GlobalContext* globalCtx); void BgHidanDalm_Draw(BgHidanDalm* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Dalm_InitVars = -{ +const ActorInit Bg_Hidan_Dalm_InitVars = { ACTOR_BG_HIDAN_DALM, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c index 0b17a2d99..e6a9c201d 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c @@ -8,8 +8,7 @@ void BgHidanFirewall_Destroy(BgHidanFirewall* this, GlobalContext* globalCtx); void BgHidanFirewall_Update(BgHidanFirewall* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Firewall_InitVars = -{ +const ActorInit Bg_Hidan_Firewall_InitVars = { ACTOR_BG_HIDAN_FIREWALL, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c index 9cd91b63d..81767dc57 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c @@ -9,8 +9,7 @@ void BgHidanFwbig_Update(BgHidanFwbig* this, GlobalContext* globalCtx); void BgHidanFwbig_Draw(BgHidanFwbig* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Fwbig_InitVars = -{ +const ActorInit Bg_Hidan_Fwbig_InitVars = { ACTOR_BG_HIDAN_FWBIG, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c index 97aba0e1e..b64ae73c9 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c @@ -9,8 +9,7 @@ void BgHidanHamstep_Update(BgHidanHamstep* this, GlobalContext* globalCtx); void BgHidanHamstep_Draw(BgHidanHamstep* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Hamstep_InitVars = -{ +const ActorInit Bg_Hidan_Hamstep_InitVars = { ACTOR_BG_HIDAN_HAMSTEP, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c index cb4d60140..b455d36ca 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c @@ -9,8 +9,7 @@ void BgHidanHrock_Update(BgHidanHrock* this, GlobalContext* globalCtx); void BgHidanHrock_Draw(BgHidanHrock* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Hrock_InitVars = -{ +const ActorInit Bg_Hidan_Hrock_InitVars = { ACTOR_BG_HIDAN_HROCK, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c index 48e065a68..582c3eca4 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c @@ -9,8 +9,7 @@ void BgHidanKousi_Update(BgHidanKousi* this, GlobalContext* globalCtx); void BgHidanKousi_Draw(BgHidanKousi* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Kousi_InitVars = -{ +const ActorInit Bg_Hidan_Kousi_InitVars = { ACTOR_BG_HIDAN_KOUSI, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c index 64980bbda..0182fe234 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c @@ -9,8 +9,7 @@ void BgHidanKowarerukabe_Update(BgHidanKowarerukabe* this, GlobalContext* global void BgHidanKowarerukabe_Draw(BgHidanKowarerukabe* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Kowarerukabe_InitVars = -{ +const ActorInit Bg_Hidan_Kowarerukabe_InitVars = { ACTOR_BG_HIDAN_KOWARERUKABE, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c index 06ad32f3c..5a04973c1 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c @@ -9,8 +9,7 @@ void BgHidanRock_Update(BgHidanRock* this, GlobalContext* globalCtx); void BgHidanRock_Draw(BgHidanRock* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Rock_InitVars = -{ +const ActorInit Bg_Hidan_Rock_InitVars = { ACTOR_BG_HIDAN_ROCK, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c index 792245642..322b09641 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c @@ -9,8 +9,7 @@ void BgHidanRsekizou_Update(BgHidanRsekizou* this, GlobalContext* globalCtx); void BgHidanRsekizou_Draw(BgHidanRsekizou* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Rsekizou_InitVars = -{ +const ActorInit Bg_Hidan_Rsekizou_InitVars = { ACTOR_BG_HIDAN_RSEKIZOU, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c index c2ec2c2cb..e2db894cd 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c @@ -9,8 +9,7 @@ void BgHidanSekizou_Update(BgHidanSekizou* this, GlobalContext* globalCtx); void BgHidanSekizou_Draw(BgHidanSekizou* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Sekizou_InitVars = -{ +const ActorInit Bg_Hidan_Sekizou_InitVars = { ACTOR_BG_HIDAN_SEKIZOU, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c index e81f25b7f..6e94db470 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c @@ -9,8 +9,7 @@ void BgHidanSima_Update(BgHidanSima* this, GlobalContext* globalCtx); void BgHidanSima_Draw(BgHidanSima* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Hidan_Sima_InitVars = -{ +const ActorInit Bg_Hidan_Sima_InitVars = { ACTOR_BG_HIDAN_SIMA, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c index 6be01a595..f41597a14 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c +++ b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c @@ -9,8 +9,7 @@ void BgIceObjects_Update(BgIceObjects* this, GlobalContext* globalCtx); void BgIceObjects_Draw(BgIceObjects* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ice_Objects_InitVars = -{ +const ActorInit Bg_Ice_Objects_InitVars = { ACTOR_BG_ICE_OBJECTS, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c index 811445fa3..436f9eafd 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c +++ b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c @@ -9,8 +9,7 @@ void BgIceShelter_Update(BgIceShelter* this, GlobalContext* globalCtx); void BgIceShelter_Draw(BgIceShelter* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ice_Shelter_InitVars = -{ +const ActorInit Bg_Ice_Shelter_InitVars = { ACTOR_BG_ICE_SHELTER, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c b/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c index cd411fac6..1e295d584 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c +++ b/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c @@ -9,8 +9,7 @@ void BgIceShutter_Update(BgIceShutter* this, GlobalContext* globalCtx); void BgIceShutter_Draw(BgIceShutter* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ice_Shutter_InitVars = -{ +const ActorInit Bg_Ice_Shutter_InitVars = { ACTOR_BG_ICE_SHUTTER, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c index 14e159c07..1b269d0fc 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c +++ b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c @@ -9,8 +9,7 @@ void BgIceTurara_Update(BgIceTurara* this, GlobalContext* globalCtx); void BgIceTurara_Draw(BgIceTurara* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ice_Turara_InitVars = -{ +const ActorInit Bg_Ice_Turara_InitVars = { ACTOR_BG_ICE_TURARA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c index d7302e07b..1e0d352ef 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -9,8 +9,7 @@ void BgIngate_Update(BgIngate* this, GlobalContext* globalCtx); void BgIngate_Draw(BgIngate* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ingate_InitVars = -{ +const ActorInit Bg_Ingate_InitVars = { ACTOR_BG_INGATE, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index ad957055a..cc58fdae7 100644 --- a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -9,8 +9,7 @@ void BgJya1flift_Update(BgJya1flift* this, GlobalContext* globalCtx); void BgJya1flift_Draw(BgJya1flift* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_1flift_InitVars = -{ +const ActorInit Bg_Jya_1flift_InitVars = { ACTOR_BG_JYA_1FLIFT, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c index bef3b84a7..dfd6a817b 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c @@ -9,8 +9,7 @@ void BgJyaBigmirror_Update(BgJyaBigmirror* this, GlobalContext* globalCtx); void BgJyaBigmirror_Draw(BgJyaBigmirror* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Bigmirror_InitVars = -{ +const ActorInit Bg_Jya_Bigmirror_InitVars = { ACTOR_BG_JYA_BIGMIRROR, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c index 6fa60832b..f149e3e01 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c +++ b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c @@ -9,8 +9,7 @@ void BgJyaBlock_Update(BgJyaBlock* this, GlobalContext* globalCtx); void BgJyaBlock_Draw(BgJyaBlock* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Block_InitVars = -{ +const ActorInit Bg_Jya_Block_InitVars = { ACTOR_BG_JYA_BLOCK, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c index 6e6f9c829..c9b3362d8 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c @@ -9,8 +9,7 @@ void BgJyaBombchuiwa_Update(BgJyaBombchuiwa* this, GlobalContext* globalCtx); void BgJyaBombchuiwa_Draw(BgJyaBombchuiwa* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Bombchuiwa_InitVars = -{ +const ActorInit Bg_Jya_Bombchuiwa_InitVars = { ACTOR_BG_JYA_BOMBCHUIWA, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c index d9b23ebbe..1b13877d1 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c @@ -9,8 +9,7 @@ void BgJyaBombiwa_Update(BgJyaBombiwa* this, GlobalContext* globalCtx); void BgJyaBombiwa_Draw(BgJyaBombiwa* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Bombiwa_InitVars = -{ +const ActorInit Bg_Jya_Bombiwa_InitVars = { ACTOR_BG_JYA_BOMBIWA, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c index 66e5b1278..15c138c38 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c +++ b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c @@ -9,8 +9,7 @@ void BgJyaCobra_Update(BgJyaCobra* this, GlobalContext* globalCtx); void BgJyaCobra_Draw(BgJyaCobra* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Cobra_InitVars = -{ +const ActorInit Bg_Jya_Cobra_InitVars = { ACTOR_BG_JYA_COBRA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c index c8ac65e23..708400e17 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c @@ -9,8 +9,7 @@ void BgJyaGoroiwa_Update(BgJyaGoroiwa* this, GlobalContext* globalCtx); void BgJyaGoroiwa_Draw(BgJyaGoroiwa* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Goroiwa_InitVars = -{ +const ActorInit Bg_Jya_Goroiwa_InitVars = { ACTOR_BG_JYA_GOROIWA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c index 49b78c969..49c5e5a9f 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c +++ b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c @@ -9,8 +9,7 @@ void BgJyaHaheniron_Update(BgJyaHaheniron* this, GlobalContext* globalCtx); void BgJyaHaheniron_Draw(BgJyaHaheniron* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Haheniron_InitVars = -{ +const ActorInit Bg_Jya_Haheniron_InitVars = { ACTOR_BG_JYA_HAHENIRON, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c index 0fb2cebc0..ad9934743 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c +++ b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c @@ -9,8 +9,7 @@ void BgJyaIronobj_Update(BgJyaIronobj* this, GlobalContext* globalCtx); void BgJyaIronobj_Draw(BgJyaIronobj* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Ironobj_InitVars = -{ +const ActorInit Bg_Jya_Ironobj_InitVars = { ACTOR_BG_JYA_IRONOBJ, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c index 2bfb33a52..b2fdf1bfa 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c +++ b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c @@ -9,8 +9,7 @@ void BgJyaLift_Update(BgJyaLift* this, GlobalContext* globalCtx); void BgJyaLift_Draw(BgJyaLift* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Lift_InitVars = -{ +const ActorInit Bg_Jya_Lift_InitVars = { ACTOR_BG_JYA_LIFT, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c index e2285e2e8..027aca3bf 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c @@ -9,8 +9,7 @@ void BgJyaMegami_Update(BgJyaMegami* this, GlobalContext* globalCtx); void BgJyaMegami_Draw(BgJyaMegami* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Megami_InitVars = -{ +const ActorInit Bg_Jya_Megami_InitVars = { ACTOR_BG_JYA_MEGAMI, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c index 7f4777624..9ff3088d1 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c +++ b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c @@ -9,8 +9,7 @@ void BgJyaZurerukabe_Update(BgJyaZurerukabe* this, GlobalContext* globalCtx); void BgJyaZurerukabe_Draw(BgJyaZurerukabe* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Jya_Zurerukabe_InitVars = -{ +const ActorInit Bg_Jya_Zurerukabe_InitVars = { ACTOR_BG_JYA_ZURERUKABE, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c index b8a09316d..f3dd3407e 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c @@ -9,8 +9,7 @@ void BgMenkuriEye_Update(BgMenkuriEye* this, GlobalContext* globalCtx); void BgMenkuriEye_Draw(BgMenkuriEye* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Menkuri_Eye_InitVars = -{ +const ActorInit Bg_Menkuri_Eye_InitVars = { ACTOR_BG_MENKURI_EYE, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c index 93ec2b84f..924cc04af 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c @@ -9,8 +9,7 @@ void BgMizuBwall_Update(BgMizuBwall* this, GlobalContext* globalCtx); void BgMizuBwall_Draw(BgMizuBwall* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mizu_Bwall_InitVars = -{ +const ActorInit Bg_Mizu_Bwall_InitVars = { ACTOR_BG_MIZU_BWALL, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c index de1a472a0..6b0911c0c 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c @@ -9,8 +9,7 @@ void BgMizuMovebg_Update(BgMizuMovebg* this, GlobalContext* globalCtx); void BgMizuMovebg_Draw(BgMizuMovebg* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mizu_Movebg_InitVars = -{ +const ActorInit Bg_Mizu_Movebg_InitVars = { ACTOR_BG_MIZU_MOVEBG, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c index 0b9bfbef4..e2db36f0d 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c @@ -9,8 +9,7 @@ void BgMizuShutter_Update(BgMizuShutter* this, GlobalContext* globalCtx); void BgMizuShutter_Draw(BgMizuShutter* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mizu_Shutter_InitVars = -{ +const ActorInit Bg_Mizu_Shutter_InitVars = { ACTOR_BG_MIZU_SHUTTER, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c index d5a2ff8b9..542b4fe81 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c @@ -9,8 +9,7 @@ void BgMizuWater_Update(BgMizuWater* this, GlobalContext* globalCtx); void BgMizuWater_Draw(BgMizuWater* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mizu_Water_InitVars = -{ +const ActorInit Bg_Mizu_Water_InitVars = { ACTOR_BG_MIZU_WATER, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index 52afee4d6..d6e0e2401 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -8,8 +8,7 @@ void BgMoriBigst_Destroy(BgMoriBigst* this, GlobalContext* globalCtx); void BgMoriBigst_Update(BgMoriBigst* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mori_Bigst_InitVars = -{ +const ActorInit Bg_Mori_Bigst_InitVars = { ACTOR_BG_MORI_BIGST, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c index 0bd8b6831..583d621a1 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c +++ b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c @@ -8,8 +8,7 @@ void BgMoriElevator_Destroy(BgMoriElevator* this, GlobalContext* globalCtx); void BgMoriElevator_Update(BgMoriElevator* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mori_Elevator_InitVars = -{ +const ActorInit Bg_Mori_Elevator_InitVars = { ACTOR_BG_MORI_ELEVATOR, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c index 4798138b3..5bab5345f 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c @@ -8,8 +8,7 @@ void BgMoriHashigo_Destroy(BgMoriHashigo* this, GlobalContext* globalCtx); void BgMoriHashigo_Update(BgMoriHashigo* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mori_Hashigo_InitVars = -{ +const ActorInit Bg_Mori_Hashigo_InitVars = { ACTOR_BG_MORI_HASHIGO, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c index d96560db6..3c6f144ee 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c @@ -8,8 +8,7 @@ void BgMoriHashira4_Destroy(BgMoriHashira4* this, GlobalContext* globalCtx); void BgMoriHashira4_Update(BgMoriHashira4* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mori_Hashira4_InitVars = -{ +const ActorInit Bg_Mori_Hashira4_InitVars = { ACTOR_BG_MORI_HASHIRA4, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c index 660c0b92a..e2e73a086 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c @@ -8,8 +8,7 @@ void BgMoriHineri_Destroy(BgMoriHineri* this, GlobalContext* globalCtx); void BgMoriHineri_Update(BgMoriHineri* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mori_Hineri_InitVars = -{ +const ActorInit Bg_Mori_Hineri_InitVars = { ACTOR_BG_MORI_HINERI, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c index c5fb920e5..483653219 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c @@ -8,8 +8,7 @@ void BgMoriIdomizu_Destroy(BgMoriIdomizu* this, GlobalContext* globalCtx); void BgMoriIdomizu_Update(BgMoriIdomizu* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mori_Idomizu_InitVars = -{ +const ActorInit Bg_Mori_Idomizu_InitVars = { ACTOR_BG_MORI_IDOMIZU, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c index 785455ce9..a8afb4148 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c +++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c @@ -8,8 +8,7 @@ void BgMoriKaitenkabe_Destroy(BgMoriKaitenkabe* this, GlobalContext* globalCtx); void BgMoriKaitenkabe_Update(BgMoriKaitenkabe* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mori_Kaitenkabe_InitVars = -{ +const ActorInit Bg_Mori_Kaitenkabe_InitVars = { ACTOR_BG_MORI_KAITENKABE, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c index 7be6743c6..02b931495 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c @@ -8,8 +8,7 @@ void BgMoriRakkatenjo_Destroy(BgMoriRakkatenjo* this, GlobalContext* globalCtx); void BgMoriRakkatenjo_Update(BgMoriRakkatenjo* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Mori_Rakkatenjo_InitVars = -{ +const ActorInit Bg_Mori_Rakkatenjo_InitVars = { ACTOR_BG_MORI_RAKKATENJO, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index 729034661..7ac4e8e4a 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -9,8 +9,7 @@ void BgPoEvent_Update(BgPoEvent* this, GlobalContext* globalCtx); void BgPoEvent_Draw(BgPoEvent* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Po_Event_InitVars = -{ +const ActorInit Bg_Po_Event_InitVars = { ACTOR_BG_PO_EVENT, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index f9fe4197a..2fd1e75f1 100644 --- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c @@ -9,8 +9,7 @@ void BgPoSyokudai_Update(BgPoSyokudai* this, GlobalContext* globalCtx); void BgPoSyokudai_Draw(BgPoSyokudai* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Po_Syokudai_InitVars = -{ +const ActorInit Bg_Po_Syokudai_InitVars = { ACTOR_BG_PO_SYOKUDAI, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c index 5a362160f..19a950888 100644 --- a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c +++ b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c @@ -9,8 +9,7 @@ void BgRelayObjects_Update(BgRelayObjects* this, GlobalContext* globalCtx); void BgRelayObjects_Draw(BgRelayObjects* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Relay_Objects_InitVars = -{ +const ActorInit Bg_Relay_Objects_InitVars = { ACTOR_BG_RELAY_OBJECTS, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index 1d32da9c5..69f4180bb 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -9,8 +9,7 @@ void BgSpot00Hanebasi_Update(BgSpot00Hanebasi* this, GlobalContext* globalCtx); void BgSpot00Hanebasi_Draw(BgSpot00Hanebasi* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot00_Hanebasi_InitVars = -{ +const ActorInit Bg_Spot00_Hanebasi_InitVars = { ACTOR_BG_SPOT00_HANEBASI, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c index 016173178..d1db93f4a 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c @@ -9,8 +9,7 @@ void BgSpot01Idohashira_Update(BgSpot01Idohashira* this, GlobalContext* globalCt void BgSpot01Idohashira_Draw(BgSpot01Idohashira* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot01_Idohashira_InitVars = -{ +const ActorInit Bg_Spot01_Idohashira_InitVars = { ACTOR_BG_SPOT01_IDOHASHIRA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c index ff77d423a..4c20b3122 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c @@ -9,8 +9,7 @@ void BgSpot01Idomizu_Update(BgSpot01Idomizu* this, GlobalContext* globalCtx); void BgSpot01Idomizu_Draw(BgSpot01Idomizu* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot01_Idomizu_InitVars = -{ +const ActorInit Bg_Spot01_Idomizu_InitVars = { ACTOR_BG_SPOT01_IDOMIZU, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c index e59a1179e..7ca2db2ab 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c @@ -8,8 +8,7 @@ void BgSpot01Objects2_Destroy(BgSpot01Objects2* this, GlobalContext* globalCtx); void BgSpot01Objects2_Update(BgSpot01Objects2* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot01_Objects2_InitVars = -{ +const ActorInit Bg_Spot01_Objects2_InitVars = { ACTOR_BG_SPOT01_OBJECTS2, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index c39d81d06..adaf6c8a9 100644 --- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -9,8 +9,7 @@ void BgSpot02Objects_Update(BgSpot02Objects* this, GlobalContext* globalCtx); void BgSpot02Objects_Draw(BgSpot02Objects* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot02_Objects_InitVars = -{ +const ActorInit Bg_Spot02_Objects_InitVars = { ACTOR_BG_SPOT02_OBJECTS, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c index 5504379eb..141ee2299 100644 --- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c @@ -9,8 +9,7 @@ void BgSpot03Taki_Update(BgSpot03Taki* this, GlobalContext* globalCtx); void BgSpot03Taki_Draw(BgSpot03Taki* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot03_Taki_InitVars = -{ +const ActorInit Bg_Spot03_Taki_InitVars = { ACTOR_BG_SPOT03_TAKI, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c index 62e45d39e..615532637 100644 --- a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c +++ b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c @@ -9,8 +9,7 @@ void BgSpot05Soko_Update(BgSpot05Soko* this, GlobalContext* globalCtx); void BgSpot05Soko_Draw(BgSpot05Soko* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot05_Soko_InitVars = -{ +const ActorInit Bg_Spot05_Soko_InitVars = { ACTOR_BG_SPOT05_SOKO, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index a57f4b8d2..afad380c5 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -9,8 +9,7 @@ void BgSpot06Objects_Update(BgSpot06Objects* this, GlobalContext* globalCtx); void BgSpot06Objects_Draw(BgSpot06Objects* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot06_Objects_InitVars = -{ +const ActorInit Bg_Spot06_Objects_InitVars = { ACTOR_BG_SPOT06_OBJECTS, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c index 9ac3a245b..8e1fdfd64 100644 --- a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c @@ -9,8 +9,7 @@ void BgSpot07Taki_Update(BgSpot07Taki* this, GlobalContext* globalCtx); void BgSpot07Taki_Draw(BgSpot07Taki* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot07_Taki_InitVars = -{ +const ActorInit Bg_Spot07_Taki_InitVars = { ACTOR_BG_SPOT07_TAKI, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c index 915a39ba6..c816388be 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c @@ -9,8 +9,7 @@ void BgSpot08Bakudankabe_Update(BgSpot08Bakudankabe* this, GlobalContext* global void BgSpot08Bakudankabe_Draw(BgSpot08Bakudankabe* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot08_Bakudankabe_InitVars = -{ +const ActorInit Bg_Spot08_Bakudankabe_InitVars = { ACTOR_BG_SPOT08_BAKUDANKABE, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c index 5f1848ddf..6bcf1f8de 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c @@ -9,8 +9,7 @@ void BgSpot08Iceblock_Update(BgSpot08Iceblock* this, GlobalContext* globalCtx); void BgSpot08Iceblock_Draw(BgSpot08Iceblock* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot08_Iceblock_InitVars = -{ +const ActorInit Bg_Spot08_Iceblock_InitVars = { ACTOR_BG_SPOT08_ICEBLOCK, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index 7518d97c4..342fd326a 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -9,8 +9,7 @@ void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx); void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot09_Obj_InitVars = -{ +const ActorInit Bg_Spot09_Obj_InitVars = { ACTOR_BG_SPOT09_OBJ, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c index e15d4658f..484621a61 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c @@ -9,8 +9,7 @@ void BgSpot11Bakudankabe_Update(BgSpot11Bakudankabe* this, GlobalContext* global void BgSpot11Bakudankabe_Draw(BgSpot11Bakudankabe* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot11_Bakudankabe_InitVars = -{ +const ActorInit Bg_Spot11_Bakudankabe_InitVars = { ACTOR_BG_SPOT11_BAKUDANKABE, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c index 4848c8118..8c56db0ce 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c @@ -7,8 +7,7 @@ void BgSpot11Oasis_Init(BgSpot11Oasis* this, GlobalContext* globalCtx); void BgSpot11Oasis_Update(BgSpot11Oasis* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot11_Oasis_InitVars = -{ +const ActorInit Bg_Spot11_Oasis_InitVars = { ACTOR_BG_SPOT11_OASIS, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c index 87aac0132..65f8e8ef0 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c @@ -9,8 +9,7 @@ void BgSpot12Gate_Update(BgSpot12Gate* this, GlobalContext* globalCtx); void BgSpot12Gate_Draw(BgSpot12Gate* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot12_Gate_InitVars = -{ +const ActorInit Bg_Spot12_Gate_InitVars = { ACTOR_BG_SPOT12_GATE, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c index df1dfd43d..4ce75c6d2 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c @@ -9,8 +9,7 @@ void BgSpot12Saku_Update(BgSpot12Saku* this, GlobalContext* globalCtx); void BgSpot12Saku_Draw(BgSpot12Saku* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot12_Saku_InitVars = -{ +const ActorInit Bg_Spot12_Saku_InitVars = { ACTOR_BG_SPOT12_SAKU, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c index 5ef865590..8ee4e80ac 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c @@ -9,8 +9,7 @@ void BgSpot15Rrbox_Update(BgSpot15Rrbox* this, GlobalContext* globalCtx); void BgSpot15Rrbox_Draw(BgSpot15Rrbox* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot15_Rrbox_InitVars = -{ +const ActorInit Bg_Spot15_Rrbox_InitVars = { ACTOR_BG_SPOT15_RRBOX, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c index fbf7847aa..9c6b04d41 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c @@ -9,8 +9,7 @@ void BgSpot16Bombstone_Update(BgSpot16Bombstone* this, GlobalContext* globalCtx) void BgSpot16Bombstone_Draw(BgSpot16Bombstone* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot16_Bombstone_InitVars = -{ +const ActorInit Bg_Spot16_Bombstone_InitVars = { ACTOR_BG_SPOT16_BOMBSTONE, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index 5ec81828d..cd9616168 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -9,8 +9,7 @@ void BgSpot16Doughnut_Update(BgSpot16Doughnut* this, GlobalContext* globalCtx); void BgSpot16Doughnut_Draw(BgSpot16Doughnut* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot16_Doughnut_InitVars = -{ +const ActorInit Bg_Spot16_Doughnut_InitVars = { ACTOR_BG_SPOT16_DOUGHNUT, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c index 5ec76c924..900c932df 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c @@ -9,8 +9,7 @@ void BgSpot17Bakudankabe_Update(BgSpot17Bakudankabe* this, GlobalContext* global void BgSpot17Bakudankabe_Draw(BgSpot17Bakudankabe* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot17_Bakudankabe_InitVars = -{ +const ActorInit Bg_Spot17_Bakudankabe_InitVars = { ACTOR_BG_SPOT17_BAKUDANKABE, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index bc70d2436..5e992d216 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c @@ -8,8 +8,7 @@ void BgSpot17Funen_Destroy(BgSpot17Funen* this, GlobalContext* globalCtx); void BgSpot17Funen_Update(BgSpot17Funen* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot17_Funen_InitVars = -{ +const ActorInit Bg_Spot17_Funen_InitVars = { ACTOR_BG_SPOT17_FUNEN, ACTORTYPE_SWITCH, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c index 774c115b1..bb918f85f 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c @@ -9,8 +9,7 @@ void BgSpot18Basket_Update(BgSpot18Basket* this, GlobalContext* globalCtx); void BgSpot18Basket_Draw(BgSpot18Basket* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot18_Basket_InitVars = -{ +const ActorInit Bg_Spot18_Basket_InitVars = { ACTOR_BG_SPOT18_BASKET, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c index 4f65b2e91..0b3e5d9c0 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c @@ -9,8 +9,7 @@ void BgSpot18Obj_Update(BgSpot18Obj* this, GlobalContext* globalCtx); void BgSpot18Obj_Draw(BgSpot18Obj* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot18_Obj_InitVars = -{ +const ActorInit Bg_Spot18_Obj_InitVars = { ACTOR_BG_SPOT18_OBJ, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c index 58d9ab279..1868bbf98 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c @@ -9,8 +9,7 @@ void BgSpot18Shutter_Update(BgSpot18Shutter* this, GlobalContext* globalCtx); void BgSpot18Shutter_Draw(BgSpot18Shutter* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Spot18_Shutter_InitVars = -{ +const ActorInit Bg_Spot18_Shutter_InitVars = { ACTOR_BG_SPOT18_SHUTTER, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c index 0283b0a00..e69d3b406 100644 --- a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c +++ b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c @@ -9,8 +9,7 @@ void BgSstFloor_Update(BgSstFloor* this, GlobalContext* globalCtx); void BgSstFloor_Draw(BgSstFloor* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Sst_Floor_InitVars = -{ +const ActorInit Bg_Sst_Floor_InitVars = { ACTOR_BG_SST_FLOOR, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c index e00e52642..626c95ed1 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c +++ b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c @@ -9,8 +9,7 @@ void BgTokiHikari_Update(BgTokiHikari* this, GlobalContext* globalCtx); void BgTokiHikari_Draw(BgTokiHikari* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Toki_Hikari_InitVars = -{ +const ActorInit Bg_Toki_Hikari_InitVars = { ACTOR_BG_TOKI_HIKARI, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c index 29a536898..3ba91b205 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -9,8 +9,7 @@ void BgTreemouth_Update(BgTreemouth* this, GlobalContext* globalCtx); void BgTreemouth_Draw(BgTreemouth* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Treemouth_InitVars = -{ +const ActorInit Bg_Treemouth_InitVars = { ACTOR_BG_TREEMOUTH, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c index 83882c24f..88fae7052 100644 --- a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c +++ b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c @@ -9,8 +9,7 @@ void BgVbSima_Update(BgVbSima* this, GlobalContext* globalCtx); void BgVbSima_Draw(BgVbSima* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Vb_Sima_InitVars = -{ +const ActorInit Bg_Vb_Sima_InitVars = { ACTOR_BG_VB_SIMA, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index 940a4f77d..57e671fbd 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -9,8 +9,7 @@ void BgYdanHasi_Update(BgYdanHasi* this, GlobalContext* globalCtx); void BgYdanHasi_Draw(BgYdanHasi* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ydan_Hasi_InitVars = -{ +const ActorInit Bg_Ydan_Hasi_InitVars = { ACTOR_BG_YDAN_HASI, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c index ead7bdff7..653e10c88 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c @@ -9,8 +9,7 @@ void BgYdanMaruta_Update(BgYdanMaruta* this, GlobalContext* globalCtx); void BgYdanMaruta_Draw(BgYdanMaruta* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ydan_Maruta_InitVars = -{ +const ActorInit Bg_Ydan_Maruta_InitVars = { ACTOR_BG_YDAN_MARUTA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c index 82beaa928..5db87323b 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c @@ -9,8 +9,7 @@ void BgYdanSp_Update(BgYdanSp* this, GlobalContext* globalCtx); void BgYdanSp_Draw(BgYdanSp* this, GlobalContext* globalCtx); /* -const ActorInit Bg_Ydan_Sp_InitVars = -{ +const ActorInit Bg_Ydan_Sp_InitVars = { ACTOR_BG_YDAN_SP, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index 842acad26..02583c9a6 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -9,8 +9,7 @@ void BossDodongo_Update(BossDodongo* this, GlobalContext* globalCtx); void BossDodongo_Draw(BossDodongo* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Dodongo_InitVars = -{ +const ActorInit Boss_Dodongo_InitVars = { ACTOR_EN_DODONGO, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index 0aeb95858..ac7f21165 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -9,8 +9,7 @@ void BossFd_Update(BossFd* this, GlobalContext* globalCtx); void BossFd_Draw(BossFd* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Fd_InitVars = -{ +const ActorInit Boss_Fd_InitVars = { ACTOR_BOSS_FD, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 8bee518ab..9fb62f18d 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -9,8 +9,7 @@ void BossFd2_Update(BossFd2* this, GlobalContext* globalCtx); void BossFd2_Draw(BossFd2* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Fd2_InitVars = -{ +const ActorInit Boss_Fd2_InitVars = { ACTOR_BOSS_FD2, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index ca942353d..a9947929c 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -9,8 +9,7 @@ void BossGanon_Update(BossGanon* this, GlobalContext* globalCtx); void BossGanon_Draw(BossGanon* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Ganon_InitVars = -{ +const ActorInit Boss_Ganon_InitVars = { ACTOR_BOSS_GANON, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 049d4d5b4..2b0158398 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -9,8 +9,7 @@ void BossGanon2_Update(BossGanon2* this, GlobalContext* globalCtx); void BossGanon2_Draw(BossGanon2* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Ganon2_InitVars = -{ +const ActorInit Boss_Ganon2_InitVars = { ACTOR_BOSS_GANON2, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 606e3c571..9be8ee8a5 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -9,8 +9,7 @@ void BossGanondrof_Update(BossGanondrof* this, GlobalContext* globalCtx); void BossGanondrof_Draw(BossGanondrof* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Ganondrof_InitVars = -{ +const ActorInit Boss_Ganondrof_InitVars = { ACTOR_BOSS_GANONDROF, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index dcdadea6b..5292e63a7 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -9,8 +9,7 @@ void BossGoma_Update(BossGoma* this, GlobalContext* globalCtx); void BossGoma_Draw(BossGoma* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Goma_InitVars = -{ +const ActorInit Boss_Goma_InitVars = { ACTOR_BOSS_GOMA, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index be09d229a..96262d320 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -9,8 +9,7 @@ void BossMo_Update(BossMo* this, GlobalContext* globalCtx); void BossMo_Draw(BossMo* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Mo_InitVars = -{ +const ActorInit Boss_Mo_InitVars = { ACTOR_BOSS_MO, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 8ee2afd5a..de391f92f 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -9,8 +9,7 @@ void BossSst_Update(BossSst* this, GlobalContext* globalCtx); void BossSst_Draw(BossSst* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Sst_InitVars = -{ +const ActorInit Boss_Sst_InitVars = { ACTOR_BOSS_SST, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index bf07fc075..2c69d0438 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -9,8 +9,7 @@ void BossTw_Update(BossTw* this, GlobalContext* globalCtx); void BossTw_Draw(BossTw* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Tw_InitVars = -{ +const ActorInit Boss_Tw_InitVars = { ACTOR_BOSS_TW, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 5f5505cea..e96a00d6c 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -9,8 +9,7 @@ void BossVa_Update(BossVa* this, GlobalContext* globalCtx); void BossVa_Draw(BossVa* this, GlobalContext* globalCtx); /* -const ActorInit Boss_Va_InitVars = -{ +const ActorInit Boss_Va_InitVars = { ACTOR_BOSS_VA, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index 50e875ccf..3ff8fe0b6 100644 --- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -8,8 +8,7 @@ void Demo6K_Destroy(Demo6K* this, GlobalContext* globalCtx); void Demo6K_Update(Demo6K* this, GlobalContext* globalCtx); /* -const ActorInit Demo_6K_InitVars = -{ +const ActorInit Demo_6K_InitVars = { ACTOR_DEMO_6K, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c index 447963c88..7de6e24a5 100644 --- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c +++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c @@ -9,8 +9,7 @@ void DemoDu_Update(DemoDu* this, GlobalContext* globalCtx); void DemoDu_Draw(DemoDu* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Du_InitVars = -{ +const ActorInit Demo_Du_InitVars = { ACTOR_DEMO_DU, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c index 905ce14db..a52882a0e 100644 --- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c +++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c @@ -9,8 +9,7 @@ void DemoEc_Update(DemoEc* this, GlobalContext* globalCtx); void DemoEc_Draw(DemoEc* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Ec_InitVars = -{ +const ActorInit Demo_Ec_InitVars = { ACTOR_DEMO_EC, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index 31285eab9..4c8e87eb4 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -8,8 +8,7 @@ void DemoEffect_Destroy(DemoEffect* this, GlobalContext* globalCtx); void DemoEffect_Update(DemoEffect* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Effect_InitVars = -{ +const ActorInit Demo_Effect_InitVars = { ACTOR_DEMO_EFFECT, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c index 0faec9fb8..5d19fffd4 100644 --- a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c +++ b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c @@ -9,8 +9,7 @@ void DemoExt_Update(DemoExt* this, GlobalContext* globalCtx); void DemoExt_Draw(DemoExt* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Ext_InitVars = -{ +const ActorInit Demo_Ext_InitVars = { ACTOR_DEMO_EXT, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c index 7b9dff5d6..63b636bd5 100644 --- a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c +++ b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c @@ -9,8 +9,7 @@ void DemoGj_Update(DemoGj* this, GlobalContext* globalCtx); void DemoGj_Draw(DemoGj* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Gj_InitVars = -{ +const ActorInit Demo_Gj_InitVars = { ACTOR_DEMO_GJ, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c index 5dd655772..b09a261ff 100644 --- a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c +++ b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c @@ -9,8 +9,7 @@ void DemoGt_Update(DemoGt* this, GlobalContext* globalCtx); void DemoGt_Draw(DemoGt* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Gt_InitVars = -{ +const ActorInit Demo_Gt_InitVars = { ACTOR_DEMO_GT, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c index 568707a99..31c99ae64 100644 --- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c +++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c @@ -9,8 +9,7 @@ void DemoIk_Update(DemoIk* this, GlobalContext* globalCtx); void DemoIk_Draw(DemoIk* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Ik_InitVars = -{ +const ActorInit Demo_Ik_InitVars = { ACTOR_DEMO_IK, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index bd79b5722..ea42fdb52 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -9,8 +9,7 @@ void DemoIm_Update(DemoIm* this, GlobalContext* globalCtx); void DemoIm_Draw(DemoIm* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Im_InitVars = -{ +const ActorInit Demo_Im_InitVars = { ACTOR_DEMO_IM, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index ae22ebdc0..35f85bd40 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -9,8 +9,7 @@ void DemoKankyo_Update(DemoKankyo* this, GlobalContext* globalCtx); void DemoKankyo_Draw(DemoKankyo* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Kankyo_InitVars = -{ +const ActorInit Demo_Kankyo_InitVars = { ACTOR_DEMO_KANKYO, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c index 2f4b63914..4df16f7cd 100644 --- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c +++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c @@ -9,8 +9,7 @@ void DemoKekkai_Update(DemoKekkai* this, GlobalContext* globalCtx); void DemoKekkai_Draw(DemoKekkai* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Kekkai_InitVars = -{ +const ActorInit Demo_Kekkai_InitVars = { ACTOR_DEMO_KEKKAI, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index 4217d217f..179dee1e8 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -9,8 +9,7 @@ void DemoSa_Update(DemoSa* this, GlobalContext* globalCtx); void DemoSa_Draw(DemoSa* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Sa_InitVars = -{ +const ActorInit Demo_Sa_InitVars = { ACTOR_DEMO_SA, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c index ceccbb5be..8c3faa1f5 100644 --- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -9,8 +9,7 @@ void DemoShd_Update(DemoShd* this, GlobalContext* globalCtx); void DemoShd_Draw(DemoShd* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Shd_InitVars = -{ +const ActorInit Demo_Shd_InitVars = { ACTOR_DEMO_SHD, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index f0718f318..2f8466814 100644 --- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -9,8 +9,7 @@ void DemoTreLgt_Update(DemoTreLgt* this, GlobalContext* globalCtx); void DemoTreLgt_Draw(DemoTreLgt* this, GlobalContext* globalCtx); /* -const ActorInit Demo_Tre_Lgt_InitVars = -{ +const ActorInit Demo_Tre_Lgt_InitVars = { ACTOR_DEMO_TRE_LGT, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c index 4cd20660d..81bfd1e10 100644 --- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c +++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c @@ -9,8 +9,7 @@ void DoorGerudo_Update(DoorGerudo* this, GlobalContext* globalCtx); void DoorGerudo_Draw(DoorGerudo* this, GlobalContext* globalCtx); /* -const ActorInit Door_Gerudo_InitVars = -{ +const ActorInit Door_Gerudo_InitVars = { ACTOR_DOOR_GERUDO, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c index 4c2e90d9f..65ee03982 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -8,8 +8,7 @@ void DoorKiller_Destroy(DoorKiller* this, GlobalContext* globalCtx); void DoorKiller_Update(DoorKiller* this, GlobalContext* globalCtx); /* -const ActorInit Door_Killer_InitVars = -{ +const ActorInit Door_Killer_InitVars = { ACTOR_DOOR_KILLER, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index ee6a9e120..7301db73e 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -9,8 +9,7 @@ void DoorShutter_Update(DoorShutter* this, GlobalContext* globalCtx); void DoorShutter_Draw(DoorShutter* this, GlobalContext* globalCtx); /* -const ActorInit Door_Shutter_InitVars = -{ +const ActorInit Door_Shutter_InitVars = { ACTOR_DOOR_SHUTTER, ACTORTYPE_DOOR, ROOM, diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index c7e7db92b..3f8030c73 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -9,8 +9,7 @@ void DoorWarp1_Update(DoorWarp1* this, GlobalContext* globalCtx); void DoorWarp1_Draw(DoorWarp1* this, GlobalContext* globalCtx); /* -const ActorInit Door_Warp1_InitVars = -{ +const ActorInit Door_Warp1_InitVars = { ACTOR_DOOR_WARP1, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c index 6df8f4173..e7caf7707 100644 --- a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c +++ b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c @@ -9,8 +9,7 @@ void EfcErupc_Update(EfcErupc* this, GlobalContext* globalCtx); void EfcErupc_Draw(EfcErupc* this, GlobalContext* globalCtx); /* -const ActorInit Efc_Erupc_InitVars = -{ +const ActorInit Efc_Erupc_InitVars = { ACTOR_EFC_ERUPC, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c index 6e2ebddd0..18f1856e7 100644 --- a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c +++ b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c @@ -9,8 +9,7 @@ void EffDust_Update(EffDust* this, GlobalContext* globalCtx); void EffDust_Draw(EffDust* this, GlobalContext* globalCtx); /* -const ActorInit Eff_Dust_InitVars = -{ +const ActorInit Eff_Dust_InitVars = { ACTOR_EFF_DUST, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index b16bafbb4..9fa507fef 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -9,8 +9,7 @@ void ElfMsg_Update(ElfMsg* this, GlobalContext* globalCtx); void ElfMsg_Draw(ElfMsg* this, GlobalContext* globalCtx); /* -const ActorInit Elf_Msg_InitVars = -{ +const ActorInit Elf_Msg_InitVars = { ACTOR_ELF_MSG, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index 3ba001027..3ed1c377e 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -9,8 +9,7 @@ void ElfMsg2_Update(ElfMsg2* this, GlobalContext* globalCtx); void ElfMsg2_Draw(ElfMsg2* this, GlobalContext* globalCtx); /* -const ActorInit Elf_Msg2_InitVars = -{ +const ActorInit Elf_Msg2_InitVars = { ACTOR_ELF_MSG2, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.c b/src/overlays/actors/ovl_En_Am/z_en_am.c index ab5d63eb3..0939cffe2 100644 --- a/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -9,8 +9,7 @@ void EnAm_Update(EnAm* this, GlobalContext* globalCtx); void EnAm_Draw(EnAm* this, GlobalContext* globalCtx); /* -const ActorInit En_Am_InitVars = -{ +const ActorInit En_Am_InitVars = { ACTOR_EN_AM, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index 6d9d1bbfb..a71924b89 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -9,8 +9,7 @@ void EnAni_Update(EnAni* this, GlobalContext* globalCtx); void EnAni_Draw(EnAni* this, GlobalContext* globalCtx); /* -const ActorInit En_Ani_InitVars = -{ +const ActorInit En_Ani_InitVars = { ACTOR_EN_ANI, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c index d55d4d36e..b089c5f80 100644 --- a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c +++ b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c @@ -9,8 +9,7 @@ void EnAnubice_Update(EnAnubice* this, GlobalContext* globalCtx); void EnAnubice_Draw(EnAnubice* this, GlobalContext* globalCtx); /* -const ActorInit En_Anubice_InitVars = -{ +const ActorInit En_Anubice_InitVars = { ACTOR_EN_ANUBICE, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c index 98aeae20e..897bf9d42 100644 --- a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c +++ b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c @@ -9,8 +9,7 @@ void EnAnubiceFire_Update(EnAnubiceFire* this, GlobalContext* globalCtx); void EnAnubiceFire_Draw(EnAnubiceFire* this, GlobalContext* globalCtx); /* -const ActorInit En_Anubice_Fire_InitVars = -{ +const ActorInit En_Anubice_Fire_InitVars = { ACTOR_EN_ANUBICE_FIRE, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index 858c204ba..a4f9ce389 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -9,8 +9,7 @@ void EnArrow_Update(EnArrow* this, GlobalContext* globalCtx); void EnArrow_Draw(EnArrow* this, GlobalContext* globalCtx); /* -const ActorInit En_Arrow_InitVars = -{ +const ActorInit En_Arrow_InitVars = { ACTOR_EN_ARROW, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index a09614155..f7841a75c 100644 --- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -9,8 +9,7 @@ void EnAttackNiw_Update(EnAttackNiw* this, GlobalContext* globalCtx); void EnAttackNiw_Draw(EnAttackNiw* this, GlobalContext* globalCtx); /* -const ActorInit En_Attack_Niw_InitVars = -{ +const ActorInit En_Attack_Niw_InitVars = { ACTOR_EN_ATTACK_NIW, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/src/overlays/actors/ovl_En_Ba/z_en_ba.c index 2b0d599c7..1d1df7898 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -9,8 +9,7 @@ void EnBa_Update(EnBa* this, GlobalContext* globalCtx); void EnBa_Draw(EnBa* this, GlobalContext* globalCtx); /* -const ActorInit En_Ba_InitVars = -{ +const ActorInit En_Ba_InitVars = { ACTOR_EN_BA, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c index c00f0c431..365363811 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -9,8 +9,7 @@ void EnBb_Update(EnBb* this, GlobalContext* globalCtx); void EnBb_Draw(EnBb* this, GlobalContext* globalCtx); /* -const ActorInit En_Bb_InitVars = -{ +const ActorInit En_Bb_InitVars = { ACTOR_EN_BB, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c index b201d8b10..9df5b6ef1 100644 --- a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c +++ b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c @@ -9,8 +9,7 @@ void EnBdfire_Update(EnBdfire* this, GlobalContext* globalCtx); void EnBdfire_Draw(EnBdfire* this, GlobalContext* globalCtx); /* -const ActorInit En_Bdfire_InitVars = -{ +const ActorInit En_Bdfire_InitVars = { ACTOR_PLAYER, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index d7fe07fc9..35797342d 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -9,8 +9,7 @@ void EnBigokuta_Update(EnBigokuta* this, GlobalContext* globalCtx); void EnBigokuta_Draw(EnBigokuta* this, GlobalContext* globalCtx); /* -const ActorInit En_Bigokuta_InitVars = -{ +const ActorInit En_Bigokuta_InitVars = { ACTOR_EN_BIGOKUTA, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Bili/z_en_bili.c b/src/overlays/actors/ovl_En_Bili/z_en_bili.c index d279338ef..1da26efb7 100644 --- a/src/overlays/actors/ovl_En_Bili/z_en_bili.c +++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.c @@ -9,8 +9,7 @@ void EnBili_Update(EnBili* this, GlobalContext* globalCtx); void EnBili_Draw(EnBili* this, GlobalContext* globalCtx); /* -const ActorInit En_Bili_InitVars = -{ +const ActorInit En_Bili_InitVars = { ACTOR_EN_BILI, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index 3d49c0686..99af0e260 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -9,8 +9,7 @@ void EnBlkobj_Update(EnBlkobj* this, GlobalContext* globalCtx); void EnBlkobj_Draw(EnBlkobj* this, GlobalContext* globalCtx); /* -const ActorInit En_Blkobj_InitVars = -{ +const ActorInit En_Blkobj_InitVars = { ACTOR_EN_BLKOBJ, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 9e5e8f147..b51142f9c 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -9,8 +9,7 @@ void EnBom_Update(EnBom* this, GlobalContext* globalCtx); void EnBom_Draw(EnBom* this, GlobalContext* globalCtx); /* -const ActorInit En_Bom_InitVars = -{ +const ActorInit En_Bom_InitVars = { ACTOR_EN_BOM, ACTORTYPE_EXPLOSIVES, ROOM, diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index a1c172338..9387f303d 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -9,8 +9,7 @@ void EnBomBowlMan_Update(EnBomBowlMan* this, GlobalContext* globalCtx); void EnBomBowlMan_Draw(EnBomBowlMan* this, GlobalContext* globalCtx); /* -const ActorInit En_Bom_Bowl_Man_InitVars = -{ +const ActorInit En_Bom_Bowl_Man_InitVars = { ACTOR_EN_BOM_BOWL_MAN, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index c10655c12..d2ed6e934 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -8,8 +8,7 @@ void EnBomBowlPit_Destroy(EnBomBowlPit* this, GlobalContext* globalCtx); void EnBomBowlPit_Update(EnBomBowlPit* this, GlobalContext* globalCtx); /* -const ActorInit En_Bom_Bowl_Pit_InitVars = -{ +const ActorInit En_Bom_Bowl_Pit_InitVars = { ACTOR_EN_BOM_BOWL_PIT, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index 7b59910d7..9347f0686 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -9,8 +9,7 @@ void EnBomChu_Update(EnBomChu* this, GlobalContext* globalCtx); void EnBomChu_Draw(EnBomChu* this, GlobalContext* globalCtx); /* -const ActorInit En_Bom_Chu_InitVars = -{ +const ActorInit En_Bom_Chu_InitVars = { ACTOR_EN_BOM_CHU, ACTORTYPE_EXPLOSIVES, ROOM, diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 7171ed868..9e3e41b1f 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -9,8 +9,7 @@ void EnBombf_Update(EnBombf* this, GlobalContext* globalCtx); void EnBombf_Draw(EnBombf* this, GlobalContext* globalCtx); /* -const ActorInit En_Bombf_InitVars = -{ +const ActorInit En_Bombf_InitVars = { ACTOR_EN_BOMBF, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index a841cf8bd..f1343a303 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -9,8 +9,7 @@ void EnBox_Update(EnBox* this, GlobalContext* globalCtx); void EnBox_Draw(EnBox* this, GlobalContext* globalCtx); /* -const ActorInit En_Box_InitVars = -{ +const ActorInit En_Box_InitVars = { Chest, ACTORTYPE_CHEST, ROOM, diff --git a/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/src/overlays/actors/ovl_En_Brob/z_en_brob.c index 42afcfa75..4ac1f7190 100644 --- a/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -9,8 +9,7 @@ void EnBrob_Update(EnBrob* this, GlobalContext* globalCtx); void EnBrob_Draw(EnBrob* this, GlobalContext* globalCtx); /* -const ActorInit En_Brob_InitVars = -{ +const ActorInit En_Brob_InitVars = { ACTOR_EN_BROB, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c index a925f6a46..8297e4680 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -9,8 +9,7 @@ void EnBubble_Update(EnBubble* this, GlobalContext* globalCtx); void EnBubble_Draw(EnBubble* this, GlobalContext* globalCtx); /* -const ActorInit En_Bubble_InitVars = -{ +const ActorInit En_Bubble_InitVars = { ACTOR_EN_BUBBLE, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/src/overlays/actors/ovl_En_Butte/z_en_butte.c index c34f06f0f..4d5098aa8 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -9,8 +9,7 @@ void EnButte_Update(EnButte* this, GlobalContext* globalCtx); void EnButte_Draw(EnButte* this, GlobalContext* globalCtx); /* -const ActorInit En_Butte_InitVars = -{ +const ActorInit En_Butte_InitVars = { ACTOR_EN_BUTTE, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/src/overlays/actors/ovl_En_Bw/z_en_bw.c index 1a700781a..11403fabc 100644 --- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -9,8 +9,7 @@ void EnBw_Update(EnBw* this, GlobalContext* globalCtx); void EnBw_Draw(EnBw* this, GlobalContext* globalCtx); /* -const ActorInit En_Bw_InitVars = -{ +const ActorInit En_Bw_InitVars = { ACTOR_EN_BW, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/src/overlays/actors/ovl_En_Bx/z_en_bx.c index a65c91b2a..c459e9934 100644 --- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -9,8 +9,7 @@ void EnBx_Update(EnBx* this, GlobalContext* globalCtx); void EnBx_Draw(EnBx* this, GlobalContext* globalCtx); /* -const ActorInit En_Bx_InitVars = -{ +const ActorInit En_Bx_InitVars = { ACTOR_EN_BX, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Changer/z_en_changer.c b/src/overlays/actors/ovl_En_Changer/z_en_changer.c index 65e73fd51..50ff45aea 100644 --- a/src/overlays/actors/ovl_En_Changer/z_en_changer.c +++ b/src/overlays/actors/ovl_En_Changer/z_en_changer.c @@ -8,8 +8,7 @@ void EnChanger_Destroy(EnChanger* this, GlobalContext* globalCtx); void EnChanger_Update(EnChanger* this, GlobalContext* globalCtx); /* -const ActorInit En_Changer_InitVars = -{ +const ActorInit En_Changer_InitVars = { ACTOR_EN_CHANGER, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index cf78c10fe..65764bcdb 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -9,8 +9,7 @@ void EnClearTag_Update(EnClearTag* this, GlobalContext* globalCtx); void EnClearTag_Draw(EnClearTag* this, GlobalContext* globalCtx); /* -const ActorInit En_Clear_Tag_InitVars = -{ +const ActorInit En_Clear_Tag_InitVars = { ACTOR_EN_CLEAR_TAG, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index c9a55ffeb..da5c0d47a 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -9,8 +9,7 @@ void EnCow_Update(EnCow* this, GlobalContext* globalCtx); void EnCow_Draw(EnCow* this, GlobalContext* globalCtx); /* -const ActorInit En_Cow_InitVars = -{ +const ActorInit En_Cow_InitVars = { ACTOR_EN_COW, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/src/overlays/actors/ovl_En_Crow/z_en_crow.c index 195c6a88a..c32ad4be8 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -9,8 +9,7 @@ void EnCrow_Update(EnCrow* this, GlobalContext* globalCtx); void EnCrow_Draw(EnCrow* this, GlobalContext* globalCtx); /* -const ActorInit En_Crow_InitVars = -{ +const ActorInit En_Crow_InitVars = { ACTOR_EN_CROW, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Cs/z_en_cs.c b/src/overlays/actors/ovl_En_Cs/z_en_cs.c index 0adb43c97..6aeabe7b0 100644 --- a/src/overlays/actors/ovl_En_Cs/z_en_cs.c +++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.c @@ -9,8 +9,7 @@ void EnCs_Update(EnCs* this, GlobalContext* globalCtx); void EnCs_Draw(EnCs* this, GlobalContext* globalCtx); /* -const ActorInit En_Cs_InitVars = -{ +const ActorInit En_Cs_InitVars = { ACTOR_EN_CS, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index ef886765c..2f6bee036 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -9,8 +9,7 @@ void EnDaiku_Update(EnDaiku* this, GlobalContext* globalCtx); void EnDaiku_Draw(EnDaiku* this, GlobalContext* globalCtx); /* -const ActorInit En_Daiku_InitVars = -{ +const ActorInit En_Daiku_InitVars = { ACTOR_EN_DAIKU, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c index a5d5cde51..63c836c31 100644 --- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c +++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c @@ -9,8 +9,7 @@ void EnDaikuKakariko_Update(EnDaikuKakariko* this, GlobalContext* globalCtx); void EnDaikuKakariko_Draw(EnDaikuKakariko* this, GlobalContext* globalCtx); /* -const ActorInit En_Daiku_Kakariko_InitVars = -{ +const ActorInit En_Daiku_Kakariko_InitVars = { ACTOR_EN_DAIKU_KAKARIKO, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index 2e46a02fe..cf130f8ac 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -9,8 +9,7 @@ void EnDekubaba_Update(EnDekubaba* this, GlobalContext* globalCtx); void EnDekubaba_Draw(EnDekubaba* this, GlobalContext* globalCtx); /* -const ActorInit En_Dekubaba_InitVars = -{ +const ActorInit En_Dekubaba_InitVars = { ACTOR_EN_DEKUBABA, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index d547fc737..58e258432 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -9,8 +9,7 @@ void EnDekunuts_Update(EnDekunuts* this, GlobalContext* globalCtx); void EnDekunuts_Draw(EnDekunuts* this, GlobalContext* globalCtx); /* -const ActorInit En_Dekunuts_InitVars = -{ +const ActorInit En_Dekunuts_InitVars = { ACTOR_EN_DEKUNUTS, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index 173f96e41..7a78e56c2 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -9,8 +9,7 @@ void EnDh_Update(EnDh* this, GlobalContext* globalCtx); void EnDh_Draw(EnDh* this, GlobalContext* globalCtx); /* -const ActorInit En_Dh_InitVars = -{ +const ActorInit En_Dh_InitVars = { ACTOR_EN_DH, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/src/overlays/actors/ovl_En_Dha/z_en_dha.c index e3e36c0e3..4a8e64091 100644 --- a/src/overlays/actors/ovl_En_Dha/z_en_dha.c +++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.c @@ -9,8 +9,7 @@ void EnDha_Update(EnDha* this, GlobalContext* globalCtx); void EnDha_Draw(EnDha* this, GlobalContext* globalCtx); /* -const ActorInit En_Dha_InitVars = -{ +const ActorInit En_Dha_InitVars = { ACTOR_EN_DHA, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index cb1c8d77a..5e3dab74c 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -9,8 +9,7 @@ void EnDivingGame_Update(EnDivingGame* this, GlobalContext* globalCtx); void EnDivingGame_Draw(EnDivingGame* this, GlobalContext* globalCtx); /* -const ActorInit En_Diving_Game_InitVars = -{ +const ActorInit En_Diving_Game_InitVars = { ACTOR_EN_DIVING_GAME, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c index 4a6b6e71e..a9b31e2c8 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -9,8 +9,7 @@ void EnDns_Update(EnDns* this, GlobalContext* globalCtx); void EnDns_Draw(EnDns* this, GlobalContext* globalCtx); /* -const ActorInit En_Dns_InitVars = -{ +const ActorInit En_Dns_InitVars = { ACTOR_EN_DNS, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c b/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c index b8f150034..1863ff2b2 100644 --- a/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c +++ b/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c @@ -8,8 +8,7 @@ void EnDntDemo_Destroy(EnDntDemo* this, GlobalContext* globalCtx); void EnDntDemo_Update(EnDntDemo* this, GlobalContext* globalCtx); /* -const ActorInit En_Dnt_Demo_InitVars = -{ +const ActorInit En_Dnt_Demo_InitVars = { ACTOR_EN_DNT_DEMO, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c index 659df06f6..1dd9a0a29 100644 --- a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c +++ b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c @@ -9,8 +9,7 @@ void EnDntJiji_Update(EnDntJiji* this, GlobalContext* globalCtx); void EnDntJiji_Draw(EnDntJiji* this, GlobalContext* globalCtx); /* -const ActorInit En_Dnt_Jiji_InitVars = -{ +const ActorInit En_Dnt_Jiji_InitVars = { ACTOR_EN_DNT_JIJI, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index c784d2b49..9dc2ff08c 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -8,8 +8,7 @@ void EnDntNomal_Destroy(EnDntNomal* this, GlobalContext* globalCtx); void EnDntNomal_Update(EnDntNomal* this, GlobalContext* globalCtx); /* -const ActorInit En_Dnt_Nomal_InitVars = -{ +const ActorInit En_Dnt_Nomal_InitVars = { ACTOR_EN_DNT_NOMAL, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c index 96f2578d5..762217367 100644 --- a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c +++ b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c @@ -9,8 +9,7 @@ void EnDodojr_Update(EnDodojr* this, GlobalContext* globalCtx); void EnDodojr_Draw(EnDodojr* this, GlobalContext* globalCtx); /* -const ActorInit En_Dodojr_InitVars = -{ +const ActorInit En_Dodojr_InitVars = { ACTOR_EN_DODOJR, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index 1bf9689dc..745c49096 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -9,8 +9,7 @@ void EnDodongo_Update(EnDodongo* this, GlobalContext* globalCtx); void EnDodongo_Draw(EnDodongo* this, GlobalContext* globalCtx); /* -const ActorInit En_Dodongo_InitVars = -{ +const ActorInit En_Dodongo_InitVars = { ACTOR_EN_DODONGO, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c index 1dcf92592..e561236de 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -9,8 +9,7 @@ void EnDoor_Update(EnDoor* this, GlobalContext* globalCtx); void EnDoor_Draw(EnDoor* this, GlobalContext* globalCtx); /* -const ActorInit En_Door_InitVars = -{ +const ActorInit En_Door_InitVars = { ACTOR_EN_DOOR, ACTORTYPE_DOOR, ROOM, diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/src/overlays/actors/ovl_En_Ds/z_en_ds.c index 514170241..f2656d950 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.c +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.c @@ -9,8 +9,7 @@ void EnDs_Update(EnDs* this, GlobalContext* globalCtx); void EnDs_Draw(EnDs* this, GlobalContext* globalCtx); /* -const ActorInit En_Ds_InitVars = -{ +const ActorInit En_Ds_InitVars = { ACTOR_EN_DS, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index dfe8c4fe0..e2f28f55b 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -9,8 +9,7 @@ void EnDu_Update(EnDu* this, GlobalContext* globalCtx); void EnDu_Draw(EnDu* this, GlobalContext* globalCtx); /* -const ActorInit En_Du_InitVars = -{ +const ActorInit En_Du_InitVars = { ACTOR_EN_DU, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index 3319b32e4..33ff934ec 100644 --- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -9,8 +9,7 @@ void EnDyExtra_Update(EnDyExtra* this, GlobalContext* globalCtx); void EnDyExtra_Draw(EnDyExtra* this, GlobalContext* globalCtx); /* -const ActorInit En_Dy_Extra_InitVars = -{ +const ActorInit En_Dy_Extra_InitVars = { ACTOR_EN_DY_EXTRA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c index f6a52d1ad..8c305bed0 100644 --- a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c +++ b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c @@ -9,8 +9,7 @@ void EnEiyer_Update(EnEiyer* this, GlobalContext* globalCtx); void EnEiyer_Draw(EnEiyer* this, GlobalContext* globalCtx); /* -const ActorInit En_Eiyer_InitVars = -{ +const ActorInit En_Eiyer_InitVars = { ACTOR_EN_EIYER, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index e4fa180b6..30784c6b8 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -9,8 +9,7 @@ void EnElf_Update(EnElf* this, GlobalContext* globalCtx); void EnElf_Draw(EnElf* this, GlobalContext* globalCtx); /* -const ActorInit En_Elf_InitVars = -{ +const ActorInit En_Elf_InitVars = { ACTOR_EN_ELF, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index c0532da41..4a5b99da6 100644 --- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -7,8 +7,7 @@ void EnEncount1_Init(EnEncount1* this, GlobalContext* globalCtx); void EnEncount1_Update(EnEncount1* this, GlobalContext* globalCtx); /* -const ActorInit En_Encount1_InitVars = -{ +const ActorInit En_Encount1_InitVars = { ACTOR_EN_ENCOUNT1, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c index 47a101ec5..606d0814d 100644 --- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c +++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c @@ -8,8 +8,7 @@ void EnEncount2_Update(EnEncount2* this, GlobalContext* globalCtx); void EnEncount2_Draw(EnEncount2* this, GlobalContext* globalCtx); /* -const ActorInit En_Encount2_InitVars = -{ +const ActorInit En_Encount2_InitVars = { ACTOR_EN_ENCOUNT2, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index 00bce1411..e070af772 100644 --- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -9,8 +9,7 @@ void EnExItem_Update(EnExItem* this, GlobalContext* globalCtx); void EnExItem_Draw(EnExItem* this, GlobalContext* globalCtx); /* -const ActorInit En_Ex_Item_InitVars = -{ +const ActorInit En_Ex_Item_InitVars = { ACTOR_EN_EX_ITEM, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c index 87c1502e5..a361adf2a 100644 --- a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c +++ b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c @@ -9,8 +9,7 @@ void EnExRuppy_Update(EnExRuppy* this, GlobalContext* globalCtx); void EnExRuppy_Draw(EnExRuppy* this, GlobalContext* globalCtx); /* -const ActorInit En_Ex_Ruppy_InitVars = -{ +const ActorInit En_Ex_Ruppy_InitVars = { ACTOR_EN_EX_RUPPY, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 294191595..4466d986f 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -9,8 +9,7 @@ void EnFd_Update(EnFd* this, GlobalContext* globalCtx); void EnFd_Draw(EnFd* this, GlobalContext* globalCtx); /* -const ActorInit En_Fd_InitVars = -{ +const ActorInit En_Fd_InitVars = { ACTOR_EN_FD, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c index 5c022a685..38e5aedc6 100644 --- a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c +++ b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c @@ -9,8 +9,7 @@ void EnFdFire_Update(EnFdFire* this, GlobalContext* globalCtx); void EnFdFire_Draw(EnFdFire* this, GlobalContext* globalCtx); /* -const ActorInit En_Fd_Fire_InitVars = -{ +const ActorInit En_Fd_Fire_InitVars = { ACTOR_EN_FD_FIRE, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index 550c91a21..fd5656ea6 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -9,8 +9,7 @@ void EnFhgFire_Update(EnFhgFire* this, GlobalContext* globalCtx); void EnFhgFire_Draw(EnFhgFire* this, GlobalContext* globalCtx); /* -const ActorInit En_Fhg_Fire_InitVars = -{ +const ActorInit En_Fhg_Fire_InitVars = { ACTOR_PLAYER, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c index 8e7b5e145..65f088718 100644 --- a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c +++ b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c @@ -9,8 +9,7 @@ void EnFireRock_Update(EnFireRock* this, GlobalContext* globalCtx); void EnFireRock_Draw(EnFireRock* this, GlobalContext* globalCtx); /* -const ActorInit En_Fire_Rock_InitVars = -{ +const ActorInit En_Fire_Rock_InitVars = { ACTOR_EN_FIRE_ROCK, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index f5b4f92d5..b1244235d 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -9,8 +9,7 @@ void EnFirefly_Update(EnFirefly* this, GlobalContext* globalCtx); void EnFirefly_Draw(EnFirefly* this, GlobalContext* globalCtx); /* -const ActorInit En_Firefly_InitVars = -{ +const ActorInit En_Firefly_InitVars = { ACTOR_EN_FIREFLY, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 481805a07..7308fa8ab 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -9,8 +9,7 @@ void EnFish_Update(EnFish* this, GlobalContext* globalCtx); void EnFish_Draw(EnFish* this, GlobalContext* globalCtx); /* -const ActorInit En_Fish_InitVars = -{ +const ActorInit En_Fish_InitVars = { ACTOR_EN_FISH, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index ab119b44a..adc48b934 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -9,8 +9,7 @@ void EnFloormas_Update(EnFloormas* this, GlobalContext* globalCtx); void EnFloormas_Draw(EnFloormas* this, GlobalContext* globalCtx); /* -const ActorInit En_Floormas_InitVars = -{ +const ActorInit En_Floormas_InitVars = { ACTOR_EN_FLOORMAS, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/src/overlays/actors/ovl_En_Fr/z_en_fr.c index 17049a7d4..ff905fec1 100644 --- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -8,8 +8,7 @@ void EnFr_Destroy(EnFr* this, GlobalContext* globalCtx); void EnFr_Update(EnFr* this, GlobalContext* globalCtx); /* -const ActorInit En_Fr_InitVars = -{ +const ActorInit En_Fr_InitVars = { ACTOR_EN_FR, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index 32bc8091c..afcdcb3a5 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -9,8 +9,7 @@ void EnFu_Update(EnFu* this, GlobalContext* globalCtx); void EnFu_Draw(EnFu* this, GlobalContext* globalCtx); /* -const ActorInit En_Fu_InitVars = -{ +const ActorInit En_Fu_InitVars = { ACTOR_EN_FU, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/src/overlays/actors/ovl_En_Fw/z_en_fw.c index 2049ba88c..be1295087 100644 --- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c +++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c @@ -9,8 +9,7 @@ void EnFw_Update(EnFw* this, GlobalContext* globalCtx); void EnFw_Draw(EnFw* this, GlobalContext* globalCtx); /* -const ActorInit En_Fw_InitVars = -{ +const ActorInit En_Fw_InitVars = { ACTOR_EN_FW, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 6f04d0c95..9978639d7 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -9,8 +9,7 @@ void EnFz_Update(EnFz* this, GlobalContext* globalCtx); void EnFz_Draw(EnFz* this, GlobalContext* globalCtx); /* -const ActorInit En_Fz_InitVars = -{ +const ActorInit En_Fz_InitVars = { ACTOR_EN_FZ, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c index 275c5d16c..f871217f7 100644 --- a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c +++ b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c @@ -8,8 +8,7 @@ void EnGSwitch_Destroy(EnGSwitch* this, GlobalContext* globalCtx); void EnGSwitch_Update(EnGSwitch* this, GlobalContext* globalCtx); /* -const ActorInit En_G_Switch_InitVars = -{ +const ActorInit En_G_Switch_InitVars = { ACTOR_EN_G_SWITCH, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c index 043109e43..171cd3908 100644 --- a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c +++ b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c @@ -9,8 +9,7 @@ void EnGanonMant_Update(EnGanonMant* this, GlobalContext* globalCtx); void EnGanonMant_Draw(EnGanonMant* this, GlobalContext* globalCtx); /* -const ActorInit En_Ganon_Mant_InitVars = -{ +const ActorInit En_Ganon_Mant_InitVars = { ACTOR_EN_GANON_MANT, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/src/overlays/actors/ovl_En_Gb/z_en_gb.c index 49acb4af0..69ef58ef7 100644 --- a/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -9,8 +9,7 @@ void EnGb_Update(EnGb* this, GlobalContext* globalCtx); void EnGb_Draw(EnGb* this, GlobalContext* globalCtx); /* -const ActorInit En_Gb_InitVars = -{ +const ActorInit En_Gb_InitVars = { ACTOR_EN_GB, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index be1515501..9eb5b9390 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -9,8 +9,7 @@ void EnGe1_Update(EnGe1* this, GlobalContext* globalCtx); void EnGe1_Draw(EnGe1* this, GlobalContext* globalCtx); /* -const ActorInit En_Ge1_InitVars = -{ +const ActorInit En_Ge1_InitVars = { ACTOR_EN_GE1, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index ff14a9143..4a9c2e08c 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -9,8 +9,7 @@ void EnGe2_Update(EnGe2* this, GlobalContext* globalCtx); void EnGe2_Draw(EnGe2* this, GlobalContext* globalCtx); /* -const ActorInit En_Ge2_InitVars = -{ +const ActorInit En_Ge2_InitVars = { ACTOR_EN_GE2, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index 40b8f59ba..739372634 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -9,8 +9,7 @@ void EnGe3_Update(EnGe3* this, GlobalContext* globalCtx); void EnGe3_Draw(EnGe3* this, GlobalContext* globalCtx); /* -const ActorInit En_Ge3_InitVars = -{ +const ActorInit En_Ge3_InitVars = { ACTOR_EN_GE3, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index b2defe4f6..adcd4d177 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -9,8 +9,7 @@ void EnGeldB_Update(EnGeldB* this, GlobalContext* globalCtx); void EnGeldB_Draw(EnGeldB* this, GlobalContext* globalCtx); /* -const ActorInit En_GeldB_InitVars = -{ +const ActorInit En_GeldB_InitVars = { ACTOR_EN_GELDB, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c index 9f7cdc9c3..6ada4bc89 100644 --- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -8,8 +8,7 @@ void EnGirlA_Destroy(EnGirlA* this, GlobalContext* globalCtx); void EnGirlA_Update(EnGirlA* this, GlobalContext* globalCtx); /* -const ActorInit En_GirlA_InitVars = -{ +const ActorInit En_GirlA_InitVars = { ACTOR_EN_GIRLA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index dd3350d39..c6bc1c6a9 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -8,8 +8,7 @@ void EnGm_Destroy(EnGm* this, GlobalContext* globalCtx); void EnGm_Update(EnGm* this, GlobalContext* globalCtx); /* -const ActorInit En_Gm_InitVars = -{ +const ActorInit En_Gm_InitVars = { ACTOR_EN_GM, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index 5f95e7406..da3f03123 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -9,8 +9,7 @@ void EnGo_Update(EnGo* this, GlobalContext* globalCtx); void EnGo_Draw(EnGo* this, GlobalContext* globalCtx); /* -const ActorInit En_Go_InitVars = -{ +const ActorInit En_Go_InitVars = { ACTOR_EN_GO, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index 1e7806536..3023d3564 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -9,8 +9,7 @@ void EnGo2_Update(EnGo2* this, GlobalContext* globalCtx); void EnGo2_Draw(EnGo2* this, GlobalContext* globalCtx); /* -const ActorInit En_Go2_InitVars = -{ +const ActorInit En_Go2_InitVars = { ACTOR_EN_GO2, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/src/overlays/actors/ovl_En_Goma/z_en_goma.c index 9da1accf4..e9352ab07 100644 --- a/src/overlays/actors/ovl_En_Goma/z_en_goma.c +++ b/src/overlays/actors/ovl_En_Goma/z_en_goma.c @@ -9,8 +9,7 @@ void EnGoma_Update(EnGoma* this, GlobalContext* globalCtx); void EnGoma_Draw(EnGoma* this, GlobalContext* globalCtx); /* -const ActorInit En_Goma_InitVars = -{ +const ActorInit En_Goma_InitVars = { ACTOR_BOSS_GOMA, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index acf9dfaa9..cad9e75fb 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -9,8 +9,7 @@ void EnGoroiwa_Update(EnGoroiwa* this, GlobalContext* globalCtx); void EnGoroiwa_Draw(EnGoroiwa* this, GlobalContext* globalCtx); /* -const ActorInit En_Goroiwa_InitVars = -{ +const ActorInit En_Goroiwa_InitVars = { ACTOR_EN_GOROIWA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index fd8eb03de..a77a3fef7 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -9,8 +9,7 @@ void EnGs_Update(EnGs* this, GlobalContext* globalCtx); void EnGs_Draw(EnGs* this, GlobalContext* globalCtx); /* -const ActorInit En_Gs_InitVars = -{ +const ActorInit En_Gs_InitVars = { ACTOR_EN_GS, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c index 8319cc856..071a83801 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -8,8 +8,7 @@ void EnGuest_Destroy(EnGuest* this, GlobalContext* globalCtx); void EnGuest_Update(EnGuest* this, GlobalContext* globalCtx); /* -const ActorInit En_Guest_InitVars = -{ +const ActorInit En_Guest_InitVars = { ACTOR_EN_GUEST, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Hata/z_en_hata.c b/src/overlays/actors/ovl_En_Hata/z_en_hata.c index 28db90caf..ec66c0888 100644 --- a/src/overlays/actors/ovl_En_Hata/z_en_hata.c +++ b/src/overlays/actors/ovl_En_Hata/z_en_hata.c @@ -9,8 +9,7 @@ void EnHata_Update(EnHata* this, GlobalContext* globalCtx); void EnHata_Draw(EnHata* this, GlobalContext* globalCtx); /* -const ActorInit En_Hata_InitVars = -{ +const ActorInit En_Hata_InitVars = { ACTOR_EN_HATA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index c91f89d34..b7d547d37 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -9,8 +9,7 @@ void EnHeishi1_Update(EnHeishi1* this, GlobalContext* globalCtx); void EnHeishi1_Draw(EnHeishi1* this, GlobalContext* globalCtx); /* -const ActorInit En_Heishi1_InitVars = -{ +const ActorInit En_Heishi1_InitVars = { ACTOR_PLAYER, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index 27320ec95..d62494a2b 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -9,8 +9,7 @@ void EnHeishi2_Update(EnHeishi2* this, GlobalContext* globalCtx); void EnHeishi2_Draw(EnHeishi2* this, GlobalContext* globalCtx); /* -const ActorInit En_Heishi2_InitVars = -{ +const ActorInit En_Heishi2_InitVars = { ACTOR_EN_HEISHI2, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c index d421db8d4..c47b28b4e 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -9,8 +9,7 @@ void EnHeishi3_Update(EnHeishi3* this, GlobalContext* globalCtx); void EnHeishi3_Draw(EnHeishi3* this, GlobalContext* globalCtx); /* -const ActorInit En_Heishi3_InitVars = -{ +const ActorInit En_Heishi3_InitVars = { ACTOR_EN_HEISHI3, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index 732c90cee..63ef25296 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -9,8 +9,7 @@ void EnHeishi4_Update(EnHeishi4* this, GlobalContext* globalCtx); void EnHeishi4_Draw(EnHeishi4* this, GlobalContext* globalCtx); /* -const ActorInit En_Heishi4_InitVars = -{ +const ActorInit En_Heishi4_InitVars = { ACTOR_EN_HEISHI4, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index c168d295e..a06cc5273 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -9,8 +9,7 @@ void EnHintnuts_Update(EnHintnuts* this, GlobalContext* globalCtx); void EnHintnuts_Draw(EnHintnuts* this, GlobalContext* globalCtx); /* -const ActorInit En_Hintnuts_InitVars = -{ +const ActorInit En_Hintnuts_InitVars = { ACTOR_EN_HINTNUTS, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index f1082366c..3d24d7812 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -9,8 +9,7 @@ void EnHoll_Update(EnHoll* this, GlobalContext* globalCtx); void EnHoll_Draw(EnHoll* this, GlobalContext* globalCtx); /* -const ActorInit En_Holl_InitVars = -{ +const ActorInit En_Holl_InitVars = { ACTOR_EN_HOLL, ACTORTYPE_DOOR, ROOM, diff --git a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c index 718c55f4a..eb9bd021e 100644 --- a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c +++ b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c @@ -9,8 +9,7 @@ void EnHonotrap_Update(EnHonotrap* this, GlobalContext* globalCtx); void EnHonotrap_Draw(EnHonotrap* this, GlobalContext* globalCtx); /* -const ActorInit En_Honotrap_InitVars = -{ +const ActorInit En_Honotrap_InitVars = { ACTOR_EN_HONOTRAP, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index de015bcf2..6ec7c4c50 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -9,8 +9,7 @@ void EnHorse_Update(EnHorse* this, GlobalContext* globalCtx); void EnHorse_Draw(EnHorse* this, GlobalContext* globalCtx); /* -const ActorInit En_Horse_InitVars = -{ +const ActorInit En_Horse_InitVars = { ACTOR_EN_HORSE, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index 6426ac04a..a90d34cd5 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -9,8 +9,7 @@ void EnHorseGameCheck_Update(EnHorseGameCheck* this, GlobalContext* globalCtx); void EnHorseGameCheck_Draw(EnHorseGameCheck* this, GlobalContext* globalCtx); /* -const ActorInit En_Horse_Game_Check_InitVars = -{ +const ActorInit En_Horse_Game_Check_InitVars = { ACTOR_EN_HORSE_GAME_CHECK, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c index e4b7f9425..5a4f8266f 100644 --- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c +++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c @@ -9,8 +9,7 @@ void EnHorseGanon_Update(EnHorseGanon* this, GlobalContext* globalCtx); void EnHorseGanon_Draw(EnHorseGanon* this, GlobalContext* globalCtx); /* -const ActorInit En_Horse_Ganon_InitVars = -{ +const ActorInit En_Horse_Ganon_InitVars = { ACTOR_EN_HORSE_GANON, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index 21ee37502..8e8624209 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -9,8 +9,7 @@ void EnHorseLinkChild_Update(EnHorseLinkChild* this, GlobalContext* globalCtx); void EnHorseLinkChild_Draw(EnHorseLinkChild* this, GlobalContext* globalCtx); /* -const ActorInit En_Horse_Link_Child_InitVars = -{ +const ActorInit En_Horse_Link_Child_InitVars = { ACTOR_EN_HORSE_LINK_CHILD, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c index f329bb0f5..69ced1610 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c @@ -9,8 +9,7 @@ void EnHorseNormal_Update(EnHorseNormal* this, GlobalContext* globalCtx); void EnHorseNormal_Draw(EnHorseNormal* this, GlobalContext* globalCtx); /* -const ActorInit En_Horse_Normal_InitVars = -{ +const ActorInit En_Horse_Normal_InitVars = { ACTOR_EN_HORSE_NORMAL, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c index 8c077de88..7cc04e543 100644 --- a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c +++ b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c @@ -9,8 +9,7 @@ void EnHorseZelda_Update(EnHorseZelda* this, GlobalContext* globalCtx); void EnHorseZelda_Draw(EnHorseZelda* this, GlobalContext* globalCtx); /* -const ActorInit En_Horse_Zelda_InitVars = -{ +const ActorInit En_Horse_Zelda_InitVars = { ACTOR_EN_HORSE_ZELDA, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/src/overlays/actors/ovl_En_Hs/z_en_hs.c index 87f337d38..a81eee8b8 100644 --- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -9,8 +9,7 @@ void EnHs_Update(EnHs* this, GlobalContext* globalCtx); void EnHs_Draw(EnHs* this, GlobalContext* globalCtx); /* -const ActorInit En_Hs_InitVars = -{ +const ActorInit En_Hs_InitVars = { ACTOR_EN_HS, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c index 199528d6a..97fb28ea1 100644 --- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c +++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c @@ -9,8 +9,7 @@ void EnHs2_Update(EnHs2* this, GlobalContext* globalCtx); void EnHs2_Draw(EnHs2* this, GlobalContext* globalCtx); /* -const ActorInit En_Hs2_InitVars = -{ +const ActorInit En_Hs2_InitVars = { ACTOR_EN_HS2, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/src/overlays/actors/ovl_En_Hy/z_en_hy.c index 4ea800138..75a6185d8 100644 --- a/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -9,8 +9,7 @@ void EnHy_Update(EnHy* this, GlobalContext* globalCtx); void EnHy_Draw(EnHy* this, GlobalContext* globalCtx); /* -const ActorInit En_Hy_InitVars = -{ +const ActorInit En_Hy_InitVars = { ACTOR_EN_HY, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index adc0fc065..2e62e5bc4 100644 --- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c @@ -9,8 +9,7 @@ void EnIceHono_Update(EnIceHono* this, GlobalContext* globalCtx); void EnIceHono_Draw(EnIceHono* this, GlobalContext* globalCtx); /* -const ActorInit En_Ice_Hono_InitVars = -{ +const ActorInit En_Ice_Hono_InitVars = { ACTOR_EN_ICE_HONO, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index b1096c3b6..8233f73d9 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -9,8 +9,7 @@ void EnIk_Update(EnIk* this, GlobalContext* globalCtx); void EnIk_Draw(EnIk* this, GlobalContext* globalCtx); /* -const ActorInit En_Ik_InitVars = -{ +const ActorInit En_Ik_InitVars = { ACTOR_EN_IK, ACTORTYPE_BOSS, ROOM, 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 f4b2c102b..2617d2aa8 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -9,8 +9,7 @@ void EnIn_Update(EnIn* this, GlobalContext* globalCtx); void EnIn_Draw(EnIn* this, GlobalContext* globalCtx); /* -const ActorInit En_In_InitVars = -{ +const ActorInit En_In_InitVars = { ACTOR_EN_IN, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 4b2d4252f..fe931c277 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -9,8 +9,7 @@ void EnInsect_Update(EnInsect* this, GlobalContext* globalCtx); void EnInsect_Draw(EnInsect* this, GlobalContext* globalCtx); /* -const ActorInit En_Insect_InitVars = -{ +const ActorInit En_Insect_InitVars = { ACTOR_EN_INSECT, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index a32239046..4b04945ae 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -9,8 +9,7 @@ void EnIshi_Update(EnIshi* this, GlobalContext* globalCtx); void EnIshi_Draw(EnIshi* this, GlobalContext* globalCtx); /* -const ActorInit En_Ishi_InitVars = -{ +const ActorInit En_Ishi_InitVars = { ACTOR_EN_ISHI, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Jj/z_en_jj.c b/src/overlays/actors/ovl_En_Jj/z_en_jj.c index 24ee963f2..0e5ea7223 100644 --- a/src/overlays/actors/ovl_En_Jj/z_en_jj.c +++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.c @@ -9,8 +9,7 @@ void EnJj_Update(EnJj* this, GlobalContext* globalCtx); void EnJj_Draw(EnJj* this, GlobalContext* globalCtx); /* -const ActorInit En_Jj_InitVars = -{ +const ActorInit En_Jj_InitVars = { ACTOR_EN_JJ, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index 469d56004..1e6b1681a 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -9,8 +9,7 @@ void EnJs_Update(EnJs* this, GlobalContext* globalCtx); void EnJs_Draw(EnJs* this, GlobalContext* globalCtx); /* -const ActorInit En_Js_InitVars = -{ +const ActorInit En_Js_InitVars = { ACTOR_EN_JS, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c index 6c2e9abf2..b9c546d2b 100644 --- a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c +++ b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c @@ -9,8 +9,7 @@ void EnJsjutan_Update(EnJsjutan* this, GlobalContext* globalCtx); void EnJsjutan_Draw(EnJsjutan* this, GlobalContext* globalCtx); /* -const ActorInit En_Jsjutan_InitVars = -{ +const ActorInit En_Jsjutan_InitVars = { ACTOR_EN_JSJUTAN, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index 99d3201ba..40f2f10dc 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -9,8 +9,7 @@ void EnKakasi_Update(EnKakasi* this, GlobalContext* globalCtx); void EnKakasi_Draw(EnKakasi* this, GlobalContext* globalCtx); /* -const ActorInit En_Kakasi_InitVars = -{ +const ActorInit En_Kakasi_InitVars = { ACTOR_EN_KAKASI, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c index 9096748d7..63ca13aa1 100644 --- a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c +++ b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c @@ -8,8 +8,7 @@ void EnKakasi2_Destroy(EnKakasi2* this, GlobalContext* globalCtx); void EnKakasi2_Update(EnKakasi2* this, GlobalContext* globalCtx); /* -const ActorInit En_Kakasi2_InitVars = -{ +const ActorInit En_Kakasi2_InitVars = { ACTOR_EN_KAKASI2, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index 6c73d2aa8..f20570467 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -9,8 +9,7 @@ void EnKakasi3_Update(EnKakasi3* this, GlobalContext* globalCtx); void EnKakasi3_Draw(EnKakasi3* this, GlobalContext* globalCtx); /* -const ActorInit En_Kakasi3_InitVars = -{ +const ActorInit En_Kakasi3_InitVars = { ACTOR_EN_KAKASI3, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index 1a7e805b5..080967817 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -9,8 +9,7 @@ void EnKanban_Update(EnKanban* this, GlobalContext* globalCtx); void EnKanban_Draw(EnKanban* this, GlobalContext* globalCtx); /* -const ActorInit En_Kanban_InitVars = -{ +const ActorInit En_Kanban_InitVars = { ACTOR_EN_KANBAN, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index 5b6e5ebb2..807cd3c23 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -9,8 +9,7 @@ void EnKarebaba_Update(EnKarebaba* this, GlobalContext* globalCtx); void EnKarebaba_Draw(EnKarebaba* this, GlobalContext* globalCtx); /* -const ActorInit En_Karebaba_InitVars = -{ +const ActorInit En_Karebaba_InitVars = { ACTOR_EN_KAREBABA, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/src/overlays/actors/ovl_En_Ko/z_en_ko.c index 9c4c32421..cb84c7599 100644 --- a/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -9,8 +9,7 @@ void EnKo_Update(EnKo* this, GlobalContext* globalCtx); void EnKo_Draw(EnKo* this, GlobalContext* globalCtx); /* -const ActorInit En_Ko_InitVars = -{ +const ActorInit En_Ko_InitVars = { ACTOR_EN_KO, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index 0c142c954..698334132 100644 --- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -8,8 +8,7 @@ void EnKusa_Destroy(EnKusa* this, GlobalContext* globalCtx); void EnKusa_Update(EnKusa* this, GlobalContext* globalCtx); /* -const ActorInit En_Kusa_InitVars = -{ +const ActorInit En_Kusa_InitVars = { ACTOR_EN_KUSA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 1050aa7c3..fedd9bfc8 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -9,8 +9,7 @@ void EnKz_Update(EnKz* this, GlobalContext* globalCtx); void EnKz_Draw(EnKz* this, GlobalContext* globalCtx); /* -const ActorInit En_Kz_InitVars = -{ +const ActorInit En_Kz_InitVars = { ACTOR_EN_KZ, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c index ac102d44a..cc38ff519 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -9,8 +9,7 @@ void EnLight_Update(EnLight* this, GlobalContext* globalCtx); void EnLight_Draw(EnLight* this, GlobalContext* globalCtx); /* -const ActorInit En_Light_InitVars = -{ +const ActorInit En_Light_InitVars = { ACTOR_EN_LIGHT, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index 6041bb2ba..b5b66a347 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -9,8 +9,7 @@ void EnMThunder_Update(EnMThunder* this, GlobalContext* globalCtx); void EnMThunder_Draw(EnMThunder* this, GlobalContext* globalCtx); /* -const ActorInit En_M_Thunder_InitVars = -{ +const ActorInit En_M_Thunder_InitVars = { ACTOR_EN_M_THUNDER, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index 783150f3b..56fe51267 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -9,8 +9,7 @@ void EnMa1_Update(EnMa1* this, GlobalContext* globalCtx); void EnMa1_Draw(EnMa1* this, GlobalContext* globalCtx); /* -const ActorInit En_Ma1_InitVars = -{ +const ActorInit En_Ma1_InitVars = { ACTOR_EN_MA1, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c index bb821761a..6728ff6d3 100644 --- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -9,8 +9,7 @@ void EnMa2_Update(EnMa2* this, GlobalContext* globalCtx); void EnMa2_Draw(EnMa2* this, GlobalContext* globalCtx); /* -const ActorInit En_Ma2_InitVars = -{ +const ActorInit En_Ma2_InitVars = { ACTOR_EN_MA2, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c index 362e11453..87c01eff4 100644 --- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c +++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c @@ -9,8 +9,7 @@ void EnMa3_Update(EnMa3* this, GlobalContext* globalCtx); void EnMa3_Draw(EnMa3* this, GlobalContext* globalCtx); /* -const ActorInit En_Ma3_InitVars = -{ +const ActorInit En_Ma3_InitVars = { ACTOR_EN_MA3, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index 8398388e0..a763911bf 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -9,8 +9,7 @@ void EnMag_Update(EnMag* this, GlobalContext* globalCtx); void EnMag_Draw(EnMag* this, GlobalContext* globalCtx); /* -const ActorInit En_Mag_InitVars = -{ +const ActorInit En_Mag_InitVars = { ACTOR_EN_MAG, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Mb/z_en_mb.c b/src/overlays/actors/ovl_En_Mb/z_en_mb.c index b368d395a..94451d199 100644 --- a/src/overlays/actors/ovl_En_Mb/z_en_mb.c +++ b/src/overlays/actors/ovl_En_Mb/z_en_mb.c @@ -9,8 +9,7 @@ void EnMb_Update(EnMb* this, GlobalContext* globalCtx); void EnMb_Draw(EnMb* this, GlobalContext* globalCtx); /* -const ActorInit En_Mb_InitVars = -{ +const ActorInit En_Mb_InitVars = { ACTOR_EN_MB, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index 8ed5e9804..1dd9c3cfe 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -9,8 +9,7 @@ void EnMd_Update(EnMd* this, GlobalContext* globalCtx); void EnMd_Draw(EnMd* this, GlobalContext* globalCtx); /* -const ActorInit En_Md_InitVars = -{ +const ActorInit En_Md_InitVars = { ACTOR_EN_MD, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/src/overlays/actors/ovl_En_Mk/z_en_mk.c index 94225f36b..795f8d1ea 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -9,8 +9,7 @@ void EnMk_Update(EnMk* this, GlobalContext* globalCtx); void EnMk_Draw(EnMk* this, GlobalContext* globalCtx); /* -const ActorInit En_Mk_InitVars = -{ +const ActorInit En_Mk_InitVars = { ACTOR_EN_MK, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c index 1491d4d2f..7e70419f4 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -9,8 +9,7 @@ void EnMm_Update(EnMm* this, GlobalContext* globalCtx); void EnMm_Draw(EnMm* this, GlobalContext* globalCtx); /* -const ActorInit En_Mm_InitVars = -{ +const ActorInit En_Mm_InitVars = { ACTOR_EN_MM, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c index 9404ef93c..9f6773a8f 100644 --- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c +++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c @@ -9,8 +9,7 @@ void EnMm2_Update(EnMm2* this, GlobalContext* globalCtx); void EnMm2_Draw(EnMm2* this, GlobalContext* globalCtx); /* -const ActorInit En_Mm2_InitVars = -{ +const ActorInit En_Mm2_InitVars = { ACTOR_EN_MM2, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Mu/z_en_mu.c b/src/overlays/actors/ovl_En_Mu/z_en_mu.c index 570f85511..cf0a64bc0 100644 --- a/src/overlays/actors/ovl_En_Mu/z_en_mu.c +++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.c @@ -9,8 +9,7 @@ void EnMu_Update(EnMu* this, GlobalContext* globalCtx); void EnMu_Draw(EnMu* this, GlobalContext* globalCtx); /* -const ActorInit En_Mu_InitVars = -{ +const ActorInit En_Mu_InitVars = { ACTOR_EN_MU, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index 49b85a5c6..f864f9f25 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -9,8 +9,7 @@ void EnNb_Update(EnNb* this, GlobalContext* globalCtx); void EnNb_Draw(EnNb* this, GlobalContext* globalCtx); /* -const ActorInit En_Nb_InitVars = -{ +const ActorInit En_Nb_InitVars = { ACTOR_EN_NB, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/src/overlays/actors/ovl_En_Niw/z_en_niw.c index 5b3ef46bb..ceea1510f 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -9,8 +9,7 @@ void EnNiw_Update(EnNiw* this, GlobalContext* globalCtx); void EnNiw_Draw(EnNiw* this, GlobalContext* globalCtx); /* -const ActorInit En_Niw_InitVars = -{ +const ActorInit En_Niw_InitVars = { ACTOR_EN_NIW, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c index 5ba7d1f2a..a9cfad506 100644 --- a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c +++ b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c @@ -9,8 +9,7 @@ void EnNiwGirl_Update(EnNiwGirl* this, GlobalContext* globalCtx); void EnNiwGirl_Draw(EnNiwGirl* this, GlobalContext* globalCtx); /* -const ActorInit En_Niw_Girl_InitVars = -{ +const ActorInit En_Niw_Girl_InitVars = { ACTOR_EN_NIW_GIRL, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index 2a240d5f0..c56b05150 100644 --- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -8,8 +8,7 @@ void EnNiwLady_Destroy(EnNiwLady* this, GlobalContext* globalCtx); void EnNiwLady_Update(EnNiwLady* this, GlobalContext* globalCtx); /* -const ActorInit En_Niw_Lady_InitVars = -{ +const ActorInit En_Niw_Lady_InitVars = { ACTOR_EN_NIW_LADY, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c index e2a0b80da..16954fbb8 100644 --- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c +++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c @@ -9,8 +9,7 @@ void EnNwc_Update(EnNwc* this, GlobalContext* globalCtx); void EnNwc_Draw(EnNwc* this, GlobalContext* globalCtx); /* -const ActorInit En_Nwc_InitVars = -{ +const ActorInit En_Nwc_InitVars = { ACTOR_EN_NWC, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.c b/src/overlays/actors/ovl_En_Ny/z_en_ny.c index a605022c3..811da6c57 100644 --- a/src/overlays/actors/ovl_En_Ny/z_en_ny.c +++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.c @@ -9,8 +9,7 @@ void EnNy_Update(EnNy* this, GlobalContext* globalCtx); void EnNy_Draw(EnNy* this, GlobalContext* globalCtx); /* -const ActorInit En_Ny_InitVars = -{ +const ActorInit En_Ny_InitVars = { ACTOR_EN_NY, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c index 74cafda79..0c18b62d4 100644 --- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c +++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c @@ -8,8 +8,7 @@ void EnOkarinaTag_Destroy(EnOkarinaTag* this, GlobalContext* globalCtx); void EnOkarinaTag_Update(EnOkarinaTag* this, GlobalContext* globalCtx); /* -const ActorInit En_Okarina_Tag_InitVars = -{ +const ActorInit En_Okarina_Tag_InitVars = { ACTOR_EN_OKARINA_TAG, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c index b7387e7b0..468ec54c3 100644 --- a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c +++ b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c @@ -9,8 +9,7 @@ void EnOkuta_Update(EnOkuta* this, GlobalContext* globalCtx); void EnOkuta_Draw(EnOkuta* this, GlobalContext* globalCtx); /* -const ActorInit En_Okuta_InitVars = -{ +const ActorInit En_Okuta_InitVars = { ACTOR_EN_OKUTA, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index ed35c629d..8e98fcdc4 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -8,8 +8,7 @@ void EnOssan_Destroy(EnOssan* this, GlobalContext* globalCtx); void EnOssan_Update(EnOssan* this, GlobalContext* globalCtx); /* -const ActorInit En_Ossan_InitVars = -{ +const ActorInit En_Ossan_InitVars = { ACTOR_EN_OSSAN, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index 50813c1b5..8c59bdecc 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -9,8 +9,7 @@ void EnOwl_Update(EnOwl* this, GlobalContext* globalCtx); void EnOwl_Draw(EnOwl* this, GlobalContext* globalCtx); /* -const ActorInit En_Owl_InitVars = -{ +const ActorInit En_Owl_InitVars = { ACTOR_EN_OWL, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Part/z_en_part.c b/src/overlays/actors/ovl_En_Part/z_en_part.c index 36d9a0d4f..e177e3915 100644 --- a/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -9,8 +9,7 @@ void EnPart_Update(EnPart* this, GlobalContext* globalCtx); void EnPart_Draw(EnPart* this, GlobalContext* globalCtx); /* -const ActorInit En_Part_InitVars = -{ +const ActorInit En_Part_InitVars = { ACTOR_EN_PART, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index ee711ad05..50e2893d8 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -9,8 +9,7 @@ void EnPeehat_Update(EnPeehat* this, GlobalContext* globalCtx); void EnPeehat_Draw(EnPeehat* this, GlobalContext* globalCtx); /* -const ActorInit En_Peehat_InitVars = -{ +const ActorInit En_Peehat_InitVars = { ACTOR_EN_PEEHAT, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c index 697e20b59..a1d68a6f2 100644 --- a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c +++ b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c @@ -9,8 +9,7 @@ void EnPoDesert_Update(EnPoDesert* this, GlobalContext* globalCtx); void EnPoDesert_Draw(EnPoDesert* this, GlobalContext* globalCtx); /* -const ActorInit En_Po_Desert_InitVars = -{ +const ActorInit En_Po_Desert_InitVars = { ACTOR_EN_PO_DESERT, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 33e33057b..f3024f254 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -9,8 +9,7 @@ void EnPoField_Update(EnPoField* this, GlobalContext* globalCtx); void EnPoField_Draw(EnPoField* this, GlobalContext* globalCtx); /* -const ActorInit En_Po_Field_InitVars = -{ +const ActorInit En_Po_Field_InitVars = { ACTOR_EN_PO_FIELD, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c index 828fbf17b..ec50de4b6 100644 --- a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c +++ b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c @@ -9,8 +9,7 @@ void EnPoRelay_Update(EnPoRelay* this, GlobalContext* globalCtx); void EnPoRelay_Draw(EnPoRelay* this, GlobalContext* globalCtx); /* -const ActorInit En_Po_Relay_InitVars = -{ +const ActorInit En_Po_Relay_InitVars = { ACTOR_EN_PO_RELAY, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 9298414a7..5e5c6c7ce 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -9,8 +9,7 @@ void EnPoSisters_Update(EnPoSisters* this, GlobalContext* globalCtx); void EnPoSisters_Draw(EnPoSisters* this, GlobalContext* globalCtx); /* -const ActorInit En_Po_Sisters_InitVars = -{ +const ActorInit En_Po_Sisters_InitVars = { ACTOR_EN_PO_SISTERS, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index f6e3162c0..a05d23ce2 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -8,8 +8,7 @@ void EnPoh_Destroy(EnPoh* this, GlobalContext* globalCtx); void EnPoh_Update(EnPoh* this, GlobalContext* globalCtx); /* -const ActorInit En_Poh_InitVars = -{ +const ActorInit En_Poh_InitVars = { ACTOR_EN_POH, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index beb9c70c6..393552557 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -9,8 +9,7 @@ void EnRd_Update(EnRd* this, GlobalContext* globalCtx); void EnRd_Draw(EnRd* this, GlobalContext* globalCtx); /* -const ActorInit En_Rd_InitVars = -{ +const ActorInit En_Rd_InitVars = { ACTOR_EN_RD, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c index 34183f315..afbc515ca 100644 --- a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c +++ b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c @@ -9,8 +9,7 @@ void EnReeba_Update(EnReeba* this, GlobalContext* globalCtx); void EnReeba_Draw(EnReeba* this, GlobalContext* globalCtx); /* -const ActorInit En_Reeba_InitVars = -{ +const ActorInit En_Reeba_InitVars = { ACTOR_EN_REEBA, ACTORTYPE_MISC, ROOM, diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c index 29d79a0eb..46eddbd72 100644 --- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c +++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c @@ -9,8 +9,7 @@ void EnRiverSound_Update(EnRiverSound* this, GlobalContext* globalCtx); void EnRiverSound_Draw(EnRiverSound* this, GlobalContext* globalCtx); /* -const ActorInit En_River_Sound_InitVars = -{ +const ActorInit En_River_Sound_InitVars = { ACTOR_EN_RIVER_SOUND, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c index 9e1e1d21d..ee90fefb6 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -9,8 +9,7 @@ void EnRl_Update(EnRl* this, GlobalContext* globalCtx); void EnRl_Draw(EnRl* this, GlobalContext* globalCtx); /* -const ActorInit En_Rl_InitVars = -{ +const ActorInit En_Rl_InitVars = { ACTOR_EN_RL, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index 41d7d555f..78350277b 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -9,8 +9,7 @@ void EnRr_Update(EnRr* this, GlobalContext* globalCtx); void EnRr_Draw(EnRr* this, GlobalContext* globalCtx); /* -const ActorInit En_Rr_InitVars = -{ +const ActorInit En_Rr_InitVars = { ACTOR_EN_RR, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index c38711e08..52b7571cb 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -9,8 +9,7 @@ void EnRu1_Update(EnRu1* this, GlobalContext* globalCtx); void EnRu1_Draw(EnRu1* this, GlobalContext* globalCtx); /* -const ActorInit En_Ru1_InitVars = -{ +const ActorInit En_Ru1_InitVars = { ACTOR_EN_RU1, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index 968fd653b..074787c20 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -9,8 +9,7 @@ void EnRu2_Update(EnRu2* this, GlobalContext* globalCtx); void EnRu2_Draw(EnRu2* this, GlobalContext* globalCtx); /* -const ActorInit En_Ru2_InitVars = -{ +const ActorInit En_Ru2_InitVars = { ACTOR_EN_RU2, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/src/overlays/actors/ovl_En_Sa/z_en_sa.c index deb14890a..1e8c95a2d 100644 --- a/src/overlays/actors/ovl_En_Sa/z_en_sa.c +++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.c @@ -9,8 +9,7 @@ void EnSa_Update(EnSa* this, GlobalContext* globalCtx); void EnSa_Draw(EnSa* this, GlobalContext* globalCtx); /* -const ActorInit En_Sa_InitVars = -{ +const ActorInit En_Sa_InitVars = { ACTOR_EN_SA, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c index a6ee3760f..a396c9d0c 100644 --- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c +++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c @@ -9,8 +9,7 @@ void EnSb_Update(EnSb* this, GlobalContext* globalCtx); void EnSb_Draw(EnSb* this, GlobalContext* globalCtx); /* -const ActorInit En_Sb_InitVars = -{ +const ActorInit En_Sb_InitVars = { ACTOR_EN_SB, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Sda/z_en_sda.c b/src/overlays/actors/ovl_En_Sda/z_en_sda.c index a9ed3ec50..b388a0766 100644 --- a/src/overlays/actors/ovl_En_Sda/z_en_sda.c +++ b/src/overlays/actors/ovl_En_Sda/z_en_sda.c @@ -9,8 +9,7 @@ void EnSda_Update(EnSda* this, GlobalContext* globalCtx); void EnSda_Draw(EnSda* this, GlobalContext* globalCtx); /* -const ActorInit En_Sda_InitVars = -{ +const ActorInit En_Sda_InitVars = { ACTOR_EN_SDA, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c index 8e6aaedb8..de318c524 100644 --- a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c +++ b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c @@ -9,8 +9,7 @@ void EnShopnuts_Update(EnShopnuts* this, GlobalContext* globalCtx); void EnShopnuts_Draw(EnShopnuts* this, GlobalContext* globalCtx); /* -const ActorInit En_Shopnuts_InitVars = -{ +const ActorInit En_Shopnuts_InitVars = { ACTOR_EN_SHOPNUTS, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Si/z_en_si.c b/src/overlays/actors/ovl_En_Si/z_en_si.c index 5b146510e..54fb3a7b8 100644 --- a/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -9,8 +9,7 @@ void EnSi_Update(EnSi* this, GlobalContext* globalCtx); void EnSi_Draw(EnSi* this, GlobalContext* globalCtx); /* -const ActorInit En_Si_InitVars = -{ +const ActorInit En_Si_InitVars = { ACTOR_EN_SI, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index 83a2a7d02..72ba9806c 100644 --- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -9,8 +9,7 @@ void EnSiofuki_Update(EnSiofuki* this, GlobalContext* globalCtx); void EnSiofuki_Draw(EnSiofuki* this, GlobalContext* globalCtx); /* -const ActorInit En_Siofuki_InitVars = -{ +const ActorInit En_Siofuki_InitVars = { ACTOR_EN_SIOFUKI, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c index b35a77012..e9faac31e 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -9,8 +9,7 @@ void EnSkb_Update(EnSkb* this, GlobalContext* globalCtx); void EnSkb_Draw(EnSkb* this, GlobalContext* globalCtx); /* -const ActorInit En_Skb_InitVars = -{ +const ActorInit En_Skb_InitVars = { ACTOR_EN_SKB, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 793440116..930a99cfe 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -9,8 +9,7 @@ void EnSkj_Update(EnSkj* this, GlobalContext* globalCtx); void EnSkj_Draw(EnSkj* this, GlobalContext* globalCtx); /* -const ActorInit En_Skj_InitVars = -{ +const ActorInit En_Skj_InitVars = { ACTOR_EN_SKJ, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c index 78ebde157..43e50e244 100644 --- a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c +++ b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c @@ -9,8 +9,7 @@ void EnSkjneedle_Update(EnSkjneedle* this, GlobalContext* globalCtx); void EnSkjneedle_Draw(EnSkjneedle* this, GlobalContext* globalCtx); /* -const ActorInit En_Skjneedle_InitVars = -{ +const ActorInit En_Skjneedle_InitVars = { ACTOR_EN_SKJNEEDLE, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 789d6d9cd..150aeb363 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -9,8 +9,7 @@ void EnSsh_Update(EnSsh* this, GlobalContext* globalCtx); void EnSsh_Draw(EnSsh* this, GlobalContext* globalCtx); /* -const ActorInit En_Ssh_InitVars = -{ +const ActorInit En_Ssh_InitVars = { ACTOR_EN_SSH, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index 56bfe637d..5d6d999b2 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -9,8 +9,7 @@ void EnSt_Update(EnSt* this, GlobalContext* globalCtx); void EnSt_Draw(EnSt* this, GlobalContext* globalCtx); /* -const ActorInit En_St_InitVars = -{ +const ActorInit En_St_InitVars = { ACTOR_EN_ST, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c index 334d9231f..9aef65cc1 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -8,8 +8,7 @@ void EnSth_Destroy(EnSth* this, GlobalContext* globalCtx); void EnSth_Update(EnSth* this, GlobalContext* globalCtx); /* -const ActorInit En_Sth_InitVars = -{ +const ActorInit En_Sth_InitVars = { ACTOR_EN_STH, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/src/overlays/actors/ovl_En_Stream/z_en_stream.c index 8e1f9b353..99f419894 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -9,8 +9,7 @@ void EnStream_Update(EnStream* this, GlobalContext* globalCtx); void EnStream_Draw(EnStream* this, GlobalContext* globalCtx); /* -const ActorInit En_Stream_InitVars = -{ +const ActorInit En_Stream_InitVars = { ACTOR_EN_STREAM, ACTORTYPE_BG, ROOM, 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 9f4096f1b..826a2b50c 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -9,8 +9,7 @@ void EnSw_Update(EnSw* this, GlobalContext* globalCtx); void EnSw_Draw(EnSw* this, GlobalContext* globalCtx); /* -const ActorInit En_Sw_InitVars = -{ +const ActorInit En_Sw_InitVars = { ACTOR_EN_SW, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c b/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c index 339586fe4..64c884475 100644 --- a/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c +++ b/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c @@ -8,8 +8,7 @@ void EnSyatekiItm_Destroy(EnSyatekiItm* this, GlobalContext* globalCtx); void EnSyatekiItm_Update(EnSyatekiItm* this, GlobalContext* globalCtx); /* -const ActorInit En_Syateki_Itm_InitVars = -{ +const ActorInit En_Syateki_Itm_InitVars = { ACTOR_EN_SYATEKI_ITM, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index 49ad897d8..6721a5666 100644 --- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -9,8 +9,7 @@ void EnSyatekiMan_Update(EnSyatekiMan* this, GlobalContext* globalCtx); void EnSyatekiMan_Draw(EnSyatekiMan* this, GlobalContext* globalCtx); /* -const ActorInit En_Syateki_Man_InitVars = -{ +const ActorInit En_Syateki_Man_InitVars = { ACTOR_EN_SYATEKI_MAN, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c index 345068e9b..f27fcd902 100644 --- a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c +++ b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c @@ -9,8 +9,7 @@ void EnSyatekiNiw_Update(EnSyatekiNiw* this, GlobalContext* globalCtx); void EnSyatekiNiw_Draw(EnSyatekiNiw* this, GlobalContext* globalCtx); /* -const ActorInit En_Syateki_Niw_InitVars = -{ +const ActorInit En_Syateki_Niw_InitVars = { ACTOR_EN_SYATEKI_NIW, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index 1875628d1..e57e4acd0 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -9,8 +9,7 @@ void EnTa_Update(EnTa* this, GlobalContext* globalCtx); void EnTa_Draw(EnTa* this, GlobalContext* globalCtx); /* -const ActorInit En_Ta_InitVars = -{ +const ActorInit En_Ta_InitVars = { ACTOR_EN_TA, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c index 51273cde1..ed828866c 100644 --- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c +++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c @@ -9,8 +9,7 @@ void EnTakaraMan_Update(EnTakaraMan* this, GlobalContext* globalCtx); void EnTakaraMan_Draw(EnTakaraMan* this, GlobalContext* globalCtx); /* -const ActorInit En_Takara_Man_InitVars = -{ +const ActorInit En_Takara_Man_InitVars = { ACTOR_EN_TAKARA_MAN, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Tana/z_en_tana.c b/src/overlays/actors/ovl_En_Tana/z_en_tana.c index a03465c1b..1b5e59514 100644 --- a/src/overlays/actors/ovl_En_Tana/z_en_tana.c +++ b/src/overlays/actors/ovl_En_Tana/z_en_tana.c @@ -8,8 +8,7 @@ void EnTana_Destroy(EnTana* this, GlobalContext* globalCtx); void EnTana_Update(EnTana* this, GlobalContext* globalCtx); /* -const ActorInit En_Tana_InitVars = -{ +const ActorInit En_Tana_InitVars = { ACTOR_EN_TANA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.c b/src/overlays/actors/ovl_En_Test/z_en_test.c index bc7d141e0..ea5442374 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -9,8 +9,7 @@ void EnTest_Update(EnTest* this, GlobalContext* globalCtx); void EnTest_Draw(EnTest* this, GlobalContext* globalCtx); /* -const ActorInit En_Test_InitVars = -{ +const ActorInit En_Test_InitVars = { ACTOR_EN_TEST, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/src/overlays/actors/ovl_En_Tg/z_en_tg.c index dce566fa8..12b02484b 100644 --- a/src/overlays/actors/ovl_En_Tg/z_en_tg.c +++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.c @@ -9,8 +9,7 @@ void EnTg_Update(EnTg* this, GlobalContext* globalCtx); void EnTg_Draw(EnTg* this, GlobalContext* globalCtx); /* -const ActorInit En_Tg_InitVars = -{ +const ActorInit En_Tg_InitVars = { ACTOR_EN_TG, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c index ba6f565b6..ec3c9b19e 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -9,8 +9,7 @@ void EnTite_Update(EnTite* this, GlobalContext* globalCtx); void EnTite_Draw(EnTite* this, GlobalContext* globalCtx); /* -const ActorInit En_Tite_InitVars = -{ +const ActorInit En_Tite_InitVars = { ACTOR_EN_TITE, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index e5a3efb08..45d4c1899 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -9,8 +9,7 @@ void EnTorch2_Update(EnTorch2* this, GlobalContext* globalCtx); void EnTorch2_Draw(EnTorch2* this, GlobalContext* globalCtx); /* -const ActorInit En_Torch2_InitVars = -{ +const ActorInit En_Torch2_InitVars = { ACTOR_EN_TORCH2, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c index 73be3384a..ec322d13c 100644 --- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -9,8 +9,7 @@ void EnToryo_Update(EnToryo* this, GlobalContext* globalCtx); void EnToryo_Draw(EnToryo* this, GlobalContext* globalCtx); /* -const ActorInit En_Toryo_InitVars = -{ +const ActorInit En_Toryo_InitVars = { ACTOR_EN_TORYO, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Tp/z_en_tp.c b/src/overlays/actors/ovl_En_Tp/z_en_tp.c index ff00b3342..500aa4573 100644 --- a/src/overlays/actors/ovl_En_Tp/z_en_tp.c +++ b/src/overlays/actors/ovl_En_Tp/z_en_tp.c @@ -9,8 +9,7 @@ void EnTp_Update(EnTp* this, GlobalContext* globalCtx); void EnTp_Draw(EnTp* this, GlobalContext* globalCtx); /* -const ActorInit En_Tp_InitVars = -{ +const ActorInit En_Tp_InitVars = { ACTOR_EN_TP, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Tr/z_en_tr.c b/src/overlays/actors/ovl_En_Tr/z_en_tr.c index 4ebf99e33..ae1160abe 100644 --- a/src/overlays/actors/ovl_En_Tr/z_en_tr.c +++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.c @@ -9,8 +9,7 @@ void EnTr_Update(EnTr* this, GlobalContext* globalCtx); void EnTr_Draw(EnTr* this, GlobalContext* globalCtx); /* -const ActorInit En_Tr_InitVars = -{ +const ActorInit En_Tr_InitVars = { ACTOR_EN_TR, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Trap/z_en_trap.c b/src/overlays/actors/ovl_En_Trap/z_en_trap.c index 648e2e186..b4dcc2f2f 100644 --- a/src/overlays/actors/ovl_En_Trap/z_en_trap.c +++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.c @@ -9,8 +9,7 @@ void EnTrap_Update(EnTrap* this, GlobalContext* globalCtx); void EnTrap_Draw(EnTrap* this, GlobalContext* globalCtx); /* -const ActorInit En_Trap_InitVars = -{ +const ActorInit En_Trap_InitVars = { ACTOR_EN_TRAP, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_En_Vali/z_en_vali.c b/src/overlays/actors/ovl_En_Vali/z_en_vali.c index aabb4d512..29cae7a22 100644 --- a/src/overlays/actors/ovl_En_Vali/z_en_vali.c +++ b/src/overlays/actors/ovl_En_Vali/z_en_vali.c @@ -9,8 +9,7 @@ void EnVali_Update(EnVali* this, GlobalContext* globalCtx); void EnVali_Draw(EnVali* this, GlobalContext* globalCtx); /* -const ActorInit En_Vali_InitVars = -{ +const ActorInit En_Vali_InitVars = { ACTOR_EN_VALI, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c index 3dc05ae31..36de850e5 100644 --- a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c +++ b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c @@ -9,8 +9,7 @@ void EnVbBall_Update(EnVbBall* this, GlobalContext* globalCtx); void EnVbBall_Draw(EnVbBall* this, GlobalContext* globalCtx); /* -const ActorInit En_Vb_Ball_InitVars = -{ +const ActorInit En_Vb_Ball_InitVars = { ACTOR_PLAYER, ACTORTYPE_BOSS, ROOM, diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c index 7f5a95a22..cf6fdda26 100644 --- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -9,8 +9,7 @@ void EnViewer_Update(EnViewer* this, GlobalContext* globalCtx); void EnViewer_Draw(EnViewer* this, GlobalContext* globalCtx); /* -const ActorInit En_Viewer_InitVars = -{ +const ActorInit En_Viewer_InitVars = { ACTOR_EN_VIEWER, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/src/overlays/actors/ovl_En_Vm/z_en_vm.c index 158afe4cb..188b524f7 100644 --- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -9,8 +9,7 @@ void EnVm_Update(EnVm* this, GlobalContext* globalCtx); void EnVm_Draw(EnVm* this, GlobalContext* globalCtx); /* -const ActorInit En_Vm_InitVars = -{ +const ActorInit En_Vm_InitVars = { ACTOR_EN_VM, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c index c77b52a7b..07df431ae 100644 --- a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c +++ b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c @@ -8,8 +8,7 @@ void EnWallTubo_Destroy(EnWallTubo* this, GlobalContext* globalCtx); void EnWallTubo_Update(EnWallTubo* this, GlobalContext* globalCtx); /* -const ActorInit En_Wall_Tubo_InitVars = -{ +const ActorInit En_Wall_Tubo_InitVars = { ACTOR_EN_WALL_TUBO, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c index 36a6f836e..7c1d9bf7b 100644 --- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c +++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c @@ -8,8 +8,7 @@ void EnWeatherTag_Destroy(EnWeatherTag* this, GlobalContext* globalCtx); void EnWeatherTag_Update(EnWeatherTag* this, GlobalContext* globalCtx); /* -const ActorInit En_Weather_Tag_InitVars = -{ +const ActorInit En_Weather_Tag_InitVars = { ACTOR_EN_WEATHER_TAG, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c index 41b2fa062..846409a0b 100644 --- a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c +++ b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c @@ -9,8 +9,7 @@ void EnWeiyer_Update(EnWeiyer* this, GlobalContext* globalCtx); void EnWeiyer_Draw(EnWeiyer* this, GlobalContext* globalCtx); /* -const ActorInit En_Weiyer_InitVars = -{ +const ActorInit En_Weiyer_InitVars = { ACTOR_EN_WEIYER, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index 935ba04d2..6bbd5ed31 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -9,8 +9,7 @@ void EnWf_Update(EnWf* this, GlobalContext* globalCtx); void EnWf_Draw(EnWf* this, GlobalContext* globalCtx); /* -const ActorInit En_Wf_InitVars = -{ +const ActorInit En_Wf_InitVars = { ACTOR_EN_WF, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c b/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c index 207907bc0..e8383a72e 100644 --- a/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c +++ b/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c @@ -8,8 +8,7 @@ void EnWonderItem_Destroy(EnWonderItem* this, GlobalContext* globalCtx); void EnWonderItem_Update(EnWonderItem* this, GlobalContext* globalCtx); /* -const ActorInit En_Wonder_Item_InitVars = -{ +const ActorInit En_Wonder_Item_InitVars = { ACTOR_EN_WONDER_ITEM, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c index ccb0fed44..8d353b14f 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c @@ -8,8 +8,7 @@ void EnWonderTalk_Destroy(EnWonderTalk* this, GlobalContext* globalCtx); void EnWonderTalk_Update(EnWonderTalk* this, GlobalContext* globalCtx); /* -const ActorInit En_Wonder_Talk_InitVars = -{ +const ActorInit En_Wonder_Talk_InitVars = { ACTOR_EN_WONDER_TALK, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index c3799d112..ebcb7b662 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -8,8 +8,7 @@ void EnWonderTalk2_Destroy(EnWonderTalk2* this, GlobalContext* globalCtx); void EnWonderTalk2_Update(EnWonderTalk2* this, GlobalContext* globalCtx); /* -const ActorInit En_Wonder_Talk2_InitVars = -{ +const ActorInit En_Wonder_Talk2_InitVars = { ACTOR_EN_WONDER_TALK2, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c index 1a49a412a..802c153f1 100644 --- a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -9,8 +9,7 @@ void EnWood02_Update(EnWood02* this, GlobalContext* globalCtx); void EnWood02_Draw(EnWood02* this, GlobalContext* globalCtx); /* -const ActorInit En_Wood02_InitVars = -{ +const ActorInit En_Wood02_InitVars = { ACTOR_EN_WOOD02, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index a6a3f4468..2692a409d 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -9,8 +9,7 @@ void EnXc_Update(EnXc* this, GlobalContext* globalCtx); void EnXc_Draw(EnXc* this, GlobalContext* globalCtx); /* -const ActorInit En_Xc_InitVars = -{ +const ActorInit En_Xc_InitVars = { ACTOR_EN_XC, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c b/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c index de8b1b2dd..f053a21c2 100644 --- a/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c +++ b/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c @@ -8,8 +8,7 @@ void EnYabusameMark_Destroy(EnYabusameMark* this, GlobalContext* globalCtx); void EnYabusameMark_Update(EnYabusameMark* this, GlobalContext* globalCtx); /* -const ActorInit En_Yabusame_Mark_InitVars = -{ +const ActorInit En_Yabusame_Mark_InitVars = { ACTOR_EN_YABUSAME_MARK, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c index b00c46313..693d1801c 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -9,8 +9,7 @@ void EnYukabyun_Update(EnYukabyun* this, GlobalContext* globalCtx); void EnYukabyun_Draw(EnYukabyun* this, GlobalContext* globalCtx); /* -const ActorInit En_Yukabyun_InitVars = -{ +const ActorInit En_Yukabyun_InitVars = { ACTOR_EN_YUKABYUN, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Zf/z_en_zf.c b/src/overlays/actors/ovl_En_Zf/z_en_zf.c index d98312c4a..6b5c2a645 100644 --- a/src/overlays/actors/ovl_En_Zf/z_en_zf.c +++ b/src/overlays/actors/ovl_En_Zf/z_en_zf.c @@ -9,8 +9,7 @@ void EnZf_Update(EnZf* this, GlobalContext* globalCtx); void EnZf_Draw(EnZf* this, GlobalContext* globalCtx); /* -const ActorInit En_Zf_InitVars = -{ +const ActorInit En_Zf_InitVars = { ACTOR_EN_ZF, ACTORTYPE_ENEMY, ROOM, diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index db7f3eebf..2cc382efb 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -9,8 +9,7 @@ void EnZl1_Update(EnZl1* this, GlobalContext* globalCtx); void EnZl1_Draw(EnZl1* this, GlobalContext* globalCtx); /* -const ActorInit En_Zl1_InitVars = -{ +const ActorInit En_Zl1_InitVars = { ACTOR_EN_ZL1, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index ab7dfb142..eb67587b4 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -9,8 +9,7 @@ void EnZl2_Update(EnZl2* this, GlobalContext* globalCtx); void EnZl2_Draw(EnZl2* this, GlobalContext* globalCtx); /* -const ActorInit En_Zl2_InitVars = -{ +const ActorInit En_Zl2_InitVars = { ACTOR_EN_ZL2, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index 348060010..8bc7fd6ff 100644 --- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -9,8 +9,7 @@ void EnZl3_Update(EnZl3* this, GlobalContext* globalCtx); void EnZl3_Draw(EnZl3* this, GlobalContext* globalCtx); /* -const ActorInit En_Zl3_InitVars = -{ +const ActorInit En_Zl3_InitVars = { ACTOR_EN_ZL3, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 82dc4db2d..38a9bef69 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -9,8 +9,7 @@ void EnZl4_Update(EnZl4* this, GlobalContext* globalCtx); void EnZl4_Draw(EnZl4* this, GlobalContext* globalCtx); /* -const ActorInit En_Zl4_InitVars = -{ +const ActorInit En_Zl4_InitVars = { ACTOR_EN_ZL4, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/src/overlays/actors/ovl_En_Zo/z_en_zo.c index bee111197..4c806476e 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -9,8 +9,7 @@ void EnZo_Update(EnZo* this, GlobalContext* globalCtx); void EnZo_Draw(EnZo* this, GlobalContext* globalCtx); /* -const ActorInit En_Zo_InitVars = -{ +const ActorInit En_Zo_InitVars = { ACTOR_EN_ZO, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index 4bb1134fb..1f6fbfbbe 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -9,8 +9,7 @@ void EnfHG_Update(EnfHG* this, GlobalContext* globalCtx); void EnfHG_Draw(EnfHG* this, GlobalContext* globalCtx); /* -const ActorInit En_fHG_InitVars = -{ +const ActorInit En_fHG_InitVars = { ACTOR_EN_FHG, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.c b/src/overlays/actors/ovl_End_Title/z_end_title.c index f07687b61..8a605455a 100644 --- a/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -9,8 +9,7 @@ void EndTitle_Update(EndTitle* this, GlobalContext* globalCtx); void EndTitle_Draw(EndTitle* this, GlobalContext* globalCtx); /* -const ActorInit End_Title_InitVars = -{ +const ActorInit End_Title_InitVars = { ACTOR_END_TITLE, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index 8835dc919..baa2d3093 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -9,8 +9,7 @@ void Fishing_Update(Fishing* this, GlobalContext* globalCtx); void Fishing_Draw(Fishing* this, GlobalContext* globalCtx); /* -const ActorInit Fishing_InitVars = -{ +const ActorInit Fishing_InitVars = { ACTOR_FISHING, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c index 57c59ddd2..d1e9fed3c 100644 --- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c +++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c @@ -9,8 +9,7 @@ void ItemBHeart_Update(ItemBHeart* this, GlobalContext* globalCtx); void ItemBHeart_Draw(ItemBHeart* this, GlobalContext* globalCtx); /* -const ActorInit Item_B_Heart_InitVars = -{ +const ActorInit Item_B_Heart_InitVars = { ACTOR_ITEM_B_HEART, ACTORTYPE_MISC, ROOM, diff --git a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c index 36a89bb9c..ee8297b04 100644 --- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c +++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c @@ -8,8 +8,7 @@ void ItemEtcetera_Destroy(ItemEtcetera* this, GlobalContext* globalCtx); void ItemEtcetera_Update(ItemEtcetera* this, GlobalContext* globalCtx); /* -const ActorInit Item_Etcetera_InitVars = -{ +const ActorInit Item_Etcetera_InitVars = { ACTOR_ITEM_ETCETERA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c index f93f75956..4c62ecb28 100644 --- a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c +++ b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c @@ -9,8 +9,7 @@ void ItemOcarina_Update(ItemOcarina* this, GlobalContext* globalCtx); void ItemOcarina_Draw(ItemOcarina* this, GlobalContext* globalCtx); /* -const ActorInit Item_Ocarina_InitVars = -{ +const ActorInit Item_Ocarina_InitVars = { ACTOR_ITEM_OCARINA, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c index dd340a666..f4936f70f 100644 --- a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c +++ b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c @@ -9,8 +9,7 @@ void ItemShield_Update(ItemShield* this, GlobalContext* globalCtx); void ItemShield_Draw(ItemShield* this, GlobalContext* globalCtx); /* -const ActorInit Item_Shield_InitVars = -{ +const ActorInit Item_Shield_InitVars = { ACTOR_ITEM_SHIELD, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c index f373cc3ce..1f57a7bbd 100644 --- a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c +++ b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c @@ -9,8 +9,7 @@ void MagicDark_Update(MagicDark* this, GlobalContext* globalCtx); void MagicDark_Draw(MagicDark* this, GlobalContext* globalCtx); /* -const ActorInit Magic_Dark_InitVars = -{ +const ActorInit Magic_Dark_InitVars = { ACTOR_MAGIC_DARK, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c index 3b8f49505..0f0ad4ea4 100644 --- a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c +++ b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c @@ -9,8 +9,7 @@ void MagicFire_Update(MagicFire* this, GlobalContext* globalCtx); void MagicFire_Draw(MagicFire* this, GlobalContext* globalCtx); /* -const ActorInit Magic_Fire_InitVars = -{ +const ActorInit Magic_Fire_InitVars = { ACTOR_MAGIC_FIRE, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index e674a0e83..34b89509d 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -9,8 +9,7 @@ void MagicWind_Update(MagicWind* this, GlobalContext* globalCtx); void MagicWind_Draw(MagicWind* this, GlobalContext* globalCtx); /* -const ActorInit Magic_Wind_InitVars = -{ +const ActorInit Magic_Wind_InitVars = { ACTOR_MAGIC_WIND, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c index d93987258..4a5c247c5 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -9,8 +9,7 @@ void MirRay_Update(MirRay* this, GlobalContext* globalCtx); void MirRay_Draw(MirRay* this, GlobalContext* globalCtx); /* -const ActorInit Mir_Ray_InitVars = -{ +const ActorInit Mir_Ray_InitVars = { ACTOR_MIR_RAY, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 191105028..ae03298aa 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -9,8 +9,7 @@ void ObjBean_Update(ObjBean* this, GlobalContext* globalCtx); void ObjBean_Draw(ObjBean* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Bean_InitVars = -{ +const ActorInit Obj_Bean_InitVars = { ACTOR_OBJ_BEAN, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 17d126060..38099bca4 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -9,8 +9,7 @@ void ObjComb_Update(ObjComb* this, GlobalContext* globalCtx); void ObjComb_Draw(ObjComb* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Comb_InitVars = -{ +const ActorInit Obj_Comb_InitVars = { ACTOR_OBJ_COMB, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c index fdd4a085d..0369f30f7 100644 --- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c +++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c @@ -9,8 +9,7 @@ void ObjDekujr_Update(ObjDekujr* this, GlobalContext* globalCtx); void ObjDekujr_Draw(ObjDekujr* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Dekujr_InitVars = -{ +const ActorInit Obj_Dekujr_InitVars = { ACTOR_OBJ_DEKUJR, ACTORTYPE_NPC, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c index 4f33e20f8..2b8997990 100644 --- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c +++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c @@ -9,8 +9,7 @@ void ObjHamishi_Update(ObjHamishi* this, GlobalContext* globalCtx); void ObjHamishi_Draw(ObjHamishi* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Hamishi_InitVars = -{ +const ActorInit Obj_Hamishi_InitVars = { ACTOR_OBJ_HAMISHI, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c index e163ac265..dd397901d 100644 --- a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c +++ b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c @@ -9,8 +9,7 @@ void ObjHana_Update(ObjHana* this, GlobalContext* globalCtx); void ObjHana_Draw(ObjHana* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Hana_InitVars = -{ +const ActorInit Obj_Hana_InitVars = { ACTOR_OBJ_HANA, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index 5d16e21e4..75422d0b7 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -9,8 +9,7 @@ void ObjHsblock_Update(ObjHsblock* this, GlobalContext* globalCtx); void ObjHsblock_Draw(ObjHsblock* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Hsblock_InitVars = -{ +const ActorInit Obj_Hsblock_InitVars = { ACTOR_OBJ_HSBLOCK, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index 5292dd1f4..14cbd08e1 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -9,8 +9,7 @@ void ObjIcePoly_Update(ObjIcePoly* this, GlobalContext* globalCtx); void ObjIcePoly_Draw(ObjIcePoly* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Ice_Poly_InitVars = -{ +const ActorInit Obj_Ice_Poly_InitVars = { ACTOR_OBJ_ICE_POLY, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c index 70b364a9b..8adc1d88e 100644 --- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c +++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c @@ -9,8 +9,7 @@ void ObjKibako_Update(ObjKibako* this, GlobalContext* globalCtx); void ObjKibako_Draw(ObjKibako* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Kibako_InitVars = -{ +const ActorInit Obj_Kibako_InitVars = { ACTOR_OBJ_KIBAKO, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index af59ebcbe..e9cfeab89 100644 --- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -9,8 +9,7 @@ void ObjKibako2_Update(ObjKibako2* this, GlobalContext* globalCtx); void ObjKibako2_Draw(ObjKibako2* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Kibako2_InitVars = -{ +const ActorInit Obj_Kibako2_InitVars = { ACTOR_OBJ_KIBAKO2, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index 8e59d162e..788056652 100644 --- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -9,8 +9,7 @@ void ObjLift_Update(ObjLift* this, GlobalContext* globalCtx); void ObjLift_Draw(ObjLift* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Lift_InitVars = -{ +const ActorInit Obj_Lift_InitVars = { ACTOR_OBJ_LIFT, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index 0f9b525dc..83d2361d4 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -9,8 +9,7 @@ void ObjLightswitch_Update(ObjLightswitch* this, GlobalContext* globalCtx); void ObjLightswitch_Draw(ObjLightswitch* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Lightswitch_InitVars = -{ +const ActorInit Obj_Lightswitch_InitVars = { ACTOR_OBJ_LIGHTSWITCH, ACTORTYPE_SWITCH, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c index 52e7e6845..1900eb462 100644 --- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c +++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c @@ -7,8 +7,7 @@ void ObjMakeoshihiki_Init(ObjMakeoshihiki* this, GlobalContext* globalCtx); void ObjMakeoshihiki_Draw(ObjMakeoshihiki* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Makeoshihiki_InitVars = -{ +const ActorInit Obj_Makeoshihiki_InitVars = { ACTOR_OBJ_MAKEOSHIHIKI, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c index 23541cf9d..67dc8c0b3 100644 --- a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c +++ b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c @@ -8,8 +8,7 @@ void ObjMure_Destroy(ObjMure* this, GlobalContext* globalCtx); void ObjMure_Update(ObjMure* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Mure_InitVars = -{ +const ActorInit Obj_Mure_InitVars = { ACTOR_OBJ_MURE, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c index 94e3d7ffd..e8654d841 100644 --- a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c +++ b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c @@ -7,8 +7,7 @@ void ObjMure2_Init(ObjMure2* this, GlobalContext* globalCtx); void ObjMure2_Update(ObjMure2* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Mure2_InitVars = -{ +const ActorInit Obj_Mure2_InitVars = { ACTOR_OBJ_MURE2, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c index a3587c165..ff6168d25 100644 --- a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c +++ b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c @@ -8,8 +8,7 @@ void ObjMure3_Destroy(ObjMure3* this, GlobalContext* globalCtx); void ObjMure3_Update(ObjMure3* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Mure3_InitVars = -{ +const ActorInit Obj_Mure3_InitVars = { ACTOR_OBJ_MURE3, ACTORTYPE_BG, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 2563eb4a5..3f95cbb2c 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -9,8 +9,7 @@ void ObjOshihiki_Update(ObjOshihiki* this, GlobalContext* globalCtx); void ObjOshihiki_Draw(ObjOshihiki* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Oshihiki_InitVars = -{ +const ActorInit Obj_Oshihiki_InitVars = { ACTOR_OBJ_OSHIHIKI, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index 43a73f406..bca0894b9 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -9,8 +9,7 @@ void ObjSwitch_Update(ObjSwitch* this, GlobalContext* globalCtx); void ObjSwitch_Draw(ObjSwitch* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Switch_InitVars = -{ +const ActorInit Obj_Switch_InitVars = { ACTOR_OBJ_SWITCH, ACTORTYPE_SWITCH, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index a3255aa52..83fbf3eb7 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -9,8 +9,7 @@ void ObjSyokudai_Update(ObjSyokudai* this, GlobalContext* globalCtx); void ObjSyokudai_Draw(ObjSyokudai* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Syokudai_InitVars = -{ +const ActorInit Obj_Syokudai_InitVars = { ACTOR_OBJ_SYOKUDAI, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c index 30800d54d..4edecb082 100644 --- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c +++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c @@ -9,8 +9,7 @@ void ObjTimeblock_Update(ObjTimeblock* this, GlobalContext* globalCtx); void ObjTimeblock_Draw(ObjTimeblock* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Timeblock_InitVars = -{ +const ActorInit Obj_Timeblock_InitVars = { ACTOR_OBJ_TIMEBLOCK, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index ae6919493..6eb47ed98 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -8,8 +8,7 @@ void ObjTsubo_Destroy(ObjTsubo* this, GlobalContext* globalCtx); void ObjTsubo_Update(ObjTsubo* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Tsubo_InitVars = -{ +const ActorInit Obj_Tsubo_InitVars = { ACTOR_OBJ_TSUBO, ACTORTYPE_PROP, ROOM, diff --git a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c index e19145bff..fb3a372c2 100644 --- a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c +++ b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c @@ -9,8 +9,7 @@ void ObjWarp2block_Update(ObjWarp2block* this, GlobalContext* globalCtx); void ObjWarp2block_Draw(ObjWarp2block* this, GlobalContext* globalCtx); /* -const ActorInit Obj_Warp2block_InitVars = -{ +const ActorInit Obj_Warp2block_InitVars = { ACTOR_OBJ_WARP2BLOCK, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 96eebcf90..4da1a9575 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -9,8 +9,7 @@ void ObjectKankyo_Update(ObjectKankyo* this, GlobalContext* globalCtx); void ObjectKankyo_Draw(ObjectKankyo* this, GlobalContext* globalCtx); /* -const ActorInit Object_Kankyo_InitVars = -{ +const ActorInit Object_Kankyo_InitVars = { ACTOR_OBJECT_KANKYO, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index 6699af88f..f8c5b83e2 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -9,8 +9,7 @@ void OceffSpot_Update(OceffSpot* this, GlobalContext* globalCtx); void OceffSpot_Draw(OceffSpot* this, GlobalContext* globalCtx); /* -const ActorInit Oceff_Spot_InitVars = -{ +const ActorInit Oceff_Spot_InitVars = { ACTOR_OCEFF_SPOT, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index 25609fa4d..eb81f0a02 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -9,8 +9,7 @@ void OceffStorm_Update(OceffStorm* this, GlobalContext* globalCtx); void OceffStorm_Draw(OceffStorm* this, GlobalContext* globalCtx); /* -const ActorInit Oceff_Storm_InitVars = -{ +const ActorInit Oceff_Storm_InitVars = { ACTOR_OCEFF_STORM, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index ceec18a46..cad1ecdbf 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -9,8 +9,7 @@ void OceffWipe_Update(OceffWipe* this, GlobalContext* globalCtx); void OceffWipe_Draw(OceffWipe* this, GlobalContext* globalCtx); /* -const ActorInit Oceff_Wipe_InitVars = -{ +const ActorInit Oceff_Wipe_InitVars = { ACTOR_OCEFF_WIPE, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index 0f5ad2638..f15afc1c5 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -9,8 +9,7 @@ void OceffWipe2_Update(OceffWipe2* this, GlobalContext* globalCtx); void OceffWipe2_Draw(OceffWipe2* this, GlobalContext* globalCtx); /* -const ActorInit Oceff_Wipe2_InitVars = -{ +const ActorInit Oceff_Wipe2_InitVars = { ACTOR_OCEFF_WIPE2, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index ed27e7d8d..138bd0486 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -9,8 +9,7 @@ void OceffWipe3_Update(OceffWipe3* this, GlobalContext* globalCtx); void OceffWipe3_Draw(OceffWipe3* this, GlobalContext* globalCtx); /* -const ActorInit Oceff_Wipe3_InitVars = -{ +const ActorInit Oceff_Wipe3_InitVars = { ACTOR_OCEFF_WIPE3, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index 734b53cbb..df85e2b07 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -9,8 +9,7 @@ void OceffWipe4_Update(OceffWipe4* this, GlobalContext* globalCtx); void OceffWipe4_Draw(OceffWipe4* this, GlobalContext* globalCtx); /* -const ActorInit Oceff_Wipe4_InitVars = -{ +const ActorInit Oceff_Wipe4_InitVars = { ACTOR_OCEFF_WIPE4, ACTORTYPE_ITEMACTION, ROOM, diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index b51bc1ccf..e07455820 100644 --- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -8,8 +8,7 @@ void ShotSun_Destroy(ShotSun* this, GlobalContext* globalCtx); void ShotSun_Update(ShotSun* this, GlobalContext* globalCtx); /* -const ActorInit Shot_Sun_InitVars = -{ +const ActorInit Shot_Sun_InitVars = { ACTOR_SHOT_SUN, ACTORTYPE_PROP, ROOM, -- cgit v1.2.3 From 94e4c2b91faa0583fdc8c0ac55e301c6c599068c Mon Sep 17 00:00:00 2001 From: dark-samus Date: Mon, 23 Mar 2020 19:44:03 -0400 Subject: fix final non-matching in fault_drawer.c --- src/code/fault_drawer.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/code/fault_drawer.c b/src/code/fault_drawer.c index b17679d35..cc2195172 100644 --- a/src/code/fault_drawer.c +++ b/src/code/fault_drawer.c @@ -94,30 +94,33 @@ void FaultDrawer_DrawRecImpl(s32 xStart, s32 yStart, s32 xEnd, s32 yEnd, u16 col } } -#ifdef NON_MATCHING -// regalloc and minor ordering differences void FaultDrawer_DrawChar(char c) { u16* fb; s32 x, y; + s32 test; u32* dataPtr; + u32 data; s32 cursorX = sFaultDrawerStruct.cursorX; s32 cursorY = sFaultDrawerStruct.cursorY; + u32** temp = &sFaultDrawerStruct.fontData; - dataPtr = &sFaultDrawerStruct.fontData[((c & 4) >> 2) + ((c / 8) * 16)]; - fb = sFaultDrawerStruct.fb + sFaultDrawerStruct.w * cursorY + cursorX; + test = c % 4; + dataPtr = &temp[0][(((c / 8) * 16) + ((c & 4) >> 2))]; + fb = sFaultDrawerStruct.fb + (sFaultDrawerStruct.w * cursorY) + cursorX; if ((sFaultDrawerStruct.xStart <= cursorX) && ((sFaultDrawerStruct.charW + cursorX - 1) <= sFaultDrawerStruct.xEnd) && (sFaultDrawerStruct.yStart <= cursorY) && ((sFaultDrawerStruct.charH + cursorY - 1) <= sFaultDrawerStruct.yEnd)) { for (y = 0; y < sFaultDrawerStruct.charH; y++) { - u32 mask = 0x10000000 << (c % 4); - u32 data = *dataPtr; + u32 mask = 0x10000000 << test; + data = *dataPtr; for (x = 0; x < sFaultDrawerStruct.charW; x++) { - if (mask & data) + if (mask & data) { fb[x] = sFaultDrawerStruct.foreColor; - else if (sFaultDrawerStruct.backColor & 1) + } else if (sFaultDrawerStruct.backColor & 1) { fb[x] = sFaultDrawerStruct.backColor; + } mask >>= 4; } fb += sFaultDrawerStruct.w; @@ -125,9 +128,6 @@ void FaultDrawer_DrawChar(char c) { } } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/fault_drawer/FaultDrawer_DrawChar.s") -#endif s32 FaultDrawer_ColorToPrintColor(u16 color) { s32 i; -- cgit v1.2.3 From 4bbbdc39fd5e5a44511d8c21012013692f805ec4 Mon Sep 17 00:00:00 2001 From: dark-samus Date: Mon, 23 Mar 2020 20:01:52 -0400 Subject: use a better variable name --- src/code/fault_drawer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/code/fault_drawer.c b/src/code/fault_drawer.c index cc2195172..ef7a784ae 100644 --- a/src/code/fault_drawer.c +++ b/src/code/fault_drawer.c @@ -97,15 +97,14 @@ void FaultDrawer_DrawRecImpl(s32 xStart, s32 yStart, s32 xEnd, s32 yEnd, u16 col void FaultDrawer_DrawChar(char c) { u16* fb; s32 x, y; - s32 test; u32* dataPtr; u32 data; s32 cursorX = sFaultDrawerStruct.cursorX; s32 cursorY = sFaultDrawerStruct.cursorY; - u32** temp = &sFaultDrawerStruct.fontData; + u32** fontData = &sFaultDrawerStruct.fontData; + s32 shift = c % 4; - test = c % 4; - dataPtr = &temp[0][(((c / 8) * 16) + ((c & 4) >> 2))]; + dataPtr = &fontData[0][(((c / 8) * 16) + ((c & 4) >> 2))]; fb = sFaultDrawerStruct.fb + (sFaultDrawerStruct.w * cursorY) + cursorX; if ((sFaultDrawerStruct.xStart <= cursorX) && @@ -113,7 +112,7 @@ void FaultDrawer_DrawChar(char c) { (sFaultDrawerStruct.yStart <= cursorY) && ((sFaultDrawerStruct.charH + cursorY - 1) <= sFaultDrawerStruct.yEnd)) { for (y = 0; y < sFaultDrawerStruct.charH; y++) { - u32 mask = 0x10000000 << test; + u32 mask = 0x10000000 << shift; data = *dataPtr; for (x = 0; x < sFaultDrawerStruct.charW; x++) { if (mask & data) { -- cgit v1.2.3 From c4bb9bed4cf97603a4cc8112e46538b9ca291bed Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 24 Mar 2020 00:16:01 -0400 Subject: Done --- .../actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c | 101 +++++++++++---------- 1 file changed, 51 insertions(+), 50 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index c121558bc..a1e7d546b 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -3,14 +3,14 @@ #define ROOM 0x00 #define FLAGS 0x00000000 -void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx); -void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx); -void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx); -void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx); +static void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx); +static void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx); +static void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx); +static void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx); -s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx); -s32 func_808B1BA0(BgSpot09Obj* this, GlobalContext* globalCtx); -s32 func_808B1BEC(BgSpot09Obj* this, GlobalContext* globalCtx); +static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx); +static s32 func_808B1BA0(BgSpot09Obj* this, GlobalContext* globalCtx); +static s32 func_808B1BEC(BgSpot09Obj* this, GlobalContext* globalCtx); const ActorInit Bg_Spot09_Obj_InitVars = { @@ -26,66 +26,66 @@ const ActorInit Bg_Spot09_Obj_InitVars = (ActorFunc)BgSpot09Obj_Draw, }; -u32 D_808B1F90[] = { +static u32 D_808B1F90[] = { 0x00000000, 0x06005520, 0x0600283C, 0x06008458, 0x06007580 }; typedef s32 (*ActorFuncRet)(struct Actor*, struct GlobalContext*); -ActorFuncRet D_808B1FA4[] = { +static ActorFuncRet D_808B1FA4[] = { (ActorFuncRet)func_808B1BEC, (ActorFuncRet)func_808B1AE0, (ActorFuncRet)func_808B1BA0, }; -InitChainEntry initChain1[] = { +static InitChainEntry initChain1[] = { ICHAIN_F32(unk_F4, 7200, ICHAIN_CONTINUE), ICHAIN_F32(unk_F8, 3000, ICHAIN_CONTINUE), ICHAIN_F32(unk_FC, 7200, ICHAIN_STOP), }; -InitChainEntry initChain2[] = { +static InitChainEntry initChain2[] = { ICHAIN_F32(unk_F4, 7200, ICHAIN_CONTINUE), ICHAIN_F32(unk_F8, 800, ICHAIN_CONTINUE), ICHAIN_F32(unk_FC, 1500, ICHAIN_STOP), }; -u32 dists[] = { +static u32 dlists[] = { 0x06000100, 0x06003970, 0x06001120, 0x06007D40, 0x06006210, }; extern UNK_TYPE D_06008010; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1AE0.s") -/*void func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) { - u16 temp_v1; - s32 phi_v0; +static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) { + s32 temp_v1; + s32 linkAge; + Actor* thisx = &this->dyna.actor; - if (gSaveContext->unk1360 >= 4) { - return (u32) arg0->unk1C < 1U; + if (gSaveContext.scene_setup_index >= 4) { + return thisx->params == 0; } - temp_v1 = (u32) ((gSaveContext->unkEE6 & 0xF) ^ 0xF) < 1U; - if (gSaveContext->unk4 != 0) { - phi_v0 = 5; + temp_v1 = (gSaveContext.event_chk_inf[9] & 0xF) == 0xF; + if (LINK_IS_CHILD) { + linkAge = YEARS_CHILD; } else { - phi_v0 = 0x11; + linkAge = YEARS_ADULT; } - if (phi_v0 == 0x11) { - if (arg0->unk1C == 0) { - return (u16)0; - } - if (arg0->unk1C == 1) { - return temp_v1 < 1U; - } - if (arg0->unk1C == 3) { - return (u16)1; - } - if (arg0->unk1C == 4) { - return temp_v1; + + if (linkAge == YEARS_ADULT) { + switch (thisx->params) { + case 0: + return 0; + case 1: + return !temp_v1; + case 4: + return temp_v1; + case 3: + return 1; } - return (u16)0; + } else { + return thisx->params == 2; } - return (u32) (arg0->unk1C ^ 2) < 1U; -}*/ + return 0; +} -s32 func_808B1BA0(BgSpot09Obj *this, GlobalContext *globalCtx) { +static s32 func_808B1BA0(BgSpot09Obj *this, GlobalContext *globalCtx) { Actor* thisx = &this->dyna.actor; if (thisx->params == 3) { Actor_SetScale(thisx, 0.1f); @@ -95,7 +95,7 @@ s32 func_808B1BA0(BgSpot09Obj *this, GlobalContext *globalCtx) { return 1; } -s32 func_808B1BEC(BgSpot09Obj *this, GlobalContext *globalCtx) { +static s32 func_808B1BEC(BgSpot09Obj *this, GlobalContext *globalCtx) { Actor* thisx = &this->dyna.actor; s32 localC = 0; s32 pad[2]; @@ -108,7 +108,7 @@ s32 func_808B1BEC(BgSpot09Obj *this, GlobalContext *globalCtx) { return 1; } -s32 func_808B1C70(BgSpot09Obj *this, GlobalContext *globalCtx) { +static s32 func_808B1C70(BgSpot09Obj *this, GlobalContext *globalCtx) { s32 i; for (i = 0; i < ARRAY_COUNT(D_808B1FA4); i++) { if (!D_808B1FA4[i](this, globalCtx)) { @@ -118,17 +118,17 @@ s32 func_808B1C70(BgSpot09Obj *this, GlobalContext *globalCtx) { return 1; } -s32 func_808B1CEC(BgSpot09Obj* this, GlobalContext* globalCtx) { +static s32 func_808B1CEC(BgSpot09Obj* this, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->dyna.actor, &initChain1); return 1; } -s32 func_808B1D18(BgSpot09Obj* this, GlobalContext* globalCtx) { +static s32 func_808B1D18(BgSpot09Obj* this, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->dyna.actor, &initChain2); return 1; } -s32 func_808B1D44(BgSpot09Obj* this, GlobalContext* globalCtx) { +static s32 func_808B1D44(BgSpot09Obj* this, GlobalContext* globalCtx) { if (this->dyna.actor.params == 3) { return func_808B1D18(this, globalCtx); } else { @@ -136,7 +136,7 @@ s32 func_808B1D44(BgSpot09Obj* this, GlobalContext* globalCtx) { } } -void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx) { +static void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; osSyncPrintf("Spot09 Object [arg_data : 0x%04x](大工救出フラグ 0x%x)\n", thisx->params, @@ -154,7 +154,7 @@ void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx) { } } -void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx) { +static void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx) { DynaCollisionContext* dynaColCtx = &globalCtx->colCtx.dyna; Actor* thisx = &this->dyna.actor; @@ -163,17 +163,18 @@ void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx) { } } -void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx) { +static void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx) { } -void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx) { - GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - Gfx* gfxArr[3]; +static void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; + GraphicsContext* gfxCtx; + Gfx* gfxArr[3]; - Draw_DListOpa(globalCtx, dists[thisx->params]); + Draw_DListOpa(globalCtx, dlists[thisx->params]); if (thisx->params == 3) { + gfxCtx = globalCtx->state.gfxCtx; func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 388); func_80093D84(globalCtx->state.gfxCtx); -- cgit v1.2.3 From a8b19baf6ed34dc375bb104cffc38d878959a079 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 24 Mar 2020 00:16:35 -0400 Subject: Format --- .../actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index a1e7d546b..81079813c 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -12,8 +12,7 @@ static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx); static s32 func_808B1BA0(BgSpot09Obj* this, GlobalContext* globalCtx); static s32 func_808B1BEC(BgSpot09Obj* this, GlobalContext* globalCtx); -const ActorInit Bg_Spot09_Obj_InitVars = -{ +const ActorInit Bg_Spot09_Obj_InitVars = { ACTOR_BG_SPOT09_OBJ, ACTORTYPE_BG, ROOM, @@ -26,13 +25,13 @@ const ActorInit Bg_Spot09_Obj_InitVars = (ActorFunc)BgSpot09Obj_Draw, }; -static u32 D_808B1F90[] = { - 0x00000000, 0x06005520, 0x0600283C, 0x06008458, 0x06007580 -}; +static u32 D_808B1F90[] = { 0x00000000, 0x06005520, 0x0600283C, 0x06008458, 0x06007580 }; typedef s32 (*ActorFuncRet)(struct Actor*, struct GlobalContext*); static ActorFuncRet D_808B1FA4[] = { - (ActorFuncRet)func_808B1BEC, (ActorFuncRet)func_808B1AE0, (ActorFuncRet)func_808B1BA0, + (ActorFuncRet)func_808B1BEC, + (ActorFuncRet)func_808B1AE0, + (ActorFuncRet)func_808B1BA0, }; static InitChainEntry initChain1[] = { @@ -85,7 +84,7 @@ static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) { return 0; } -static s32 func_808B1BA0(BgSpot09Obj *this, GlobalContext *globalCtx) { +static s32 func_808B1BA0(BgSpot09Obj* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; if (thisx->params == 3) { Actor_SetScale(thisx, 0.1f); @@ -95,7 +94,7 @@ static s32 func_808B1BA0(BgSpot09Obj *this, GlobalContext *globalCtx) { return 1; } -static s32 func_808B1BEC(BgSpot09Obj *this, GlobalContext *globalCtx) { +static s32 func_808B1BEC(BgSpot09Obj* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; s32 localC = 0; s32 pad[2]; @@ -108,7 +107,7 @@ static s32 func_808B1BEC(BgSpot09Obj *this, GlobalContext *globalCtx) { return 1; } -static s32 func_808B1C70(BgSpot09Obj *this, GlobalContext *globalCtx) { +static s32 func_808B1C70(BgSpot09Obj* this, GlobalContext* globalCtx) { s32 i; for (i = 0; i < ARRAY_COUNT(D_808B1FA4); i++) { if (!D_808B1FA4[i](this, globalCtx)) { @@ -164,7 +163,6 @@ static void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx) { } static void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx) { - } static void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx) { -- cgit v1.2.3 From ba31478e23536d46ae35b54f9ebcb28875845802 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 24 Mar 2020 00:18:33 -0400 Subject: Spacing --- src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index 81079813c..b364db545 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -60,7 +60,9 @@ static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) { if (gSaveContext.scene_setup_index >= 4) { return thisx->params == 0; } + temp_v1 = (gSaveContext.event_chk_inf[9] & 0xF) == 0xF; + if (LINK_IS_CHILD) { linkAge = YEARS_CHILD; } else { @@ -81,6 +83,7 @@ static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) { } else { return thisx->params == 2; } + return 0; } -- cgit v1.2.3 From ac4a51bf8fdc93221d4ba674351b683d0eedfd9b Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Tue, 24 Mar 2020 11:52:12 -0500 Subject: Rename SkelAnime functions, which in turn modified a bunch of actor functions. Move necessary skelanime function calls to functions.h, remove unnecessary skelanime functions from functions.h, other skelanime cleanup --- src/code/z_actor.c | 6 +- src/code/z_skelanime.c | 354 ++++++++++++---------- src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 6 +- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 4 +- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 4 +- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 4 +- src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c | 4 +- 7 files changed, 202 insertions(+), 180 deletions(-) (limited to 'src') diff --git a/src/code/z_actor.c b/src/code/z_actor.c index be598da4a..01ff7ed32 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -910,7 +910,7 @@ void func_8002D9A4(Actor* actor, f32 arg1) { void func_8002D9F8(Actor* actor, UNK_PTR arg1) { Vec3f sp1C; - func_800A54FC(arg1, &sp1C, actor->shape.rot.y, actor); + func_800A54FC(arg1, &sp1C, actor->shape.rot.y); actor->posRot.pos.x += sp1C.x * actor->scale.x; actor->posRot.pos.y += sp1C.y * actor->scale.y; actor->posRot.pos.z += sp1C.z * actor->scale.z; @@ -3887,7 +3887,7 @@ void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc gDPPipeSync(gfxCtx->polyOpa.p++); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, func_80034B28(globalCtx->state.gfxCtx)); - gfxCtx->polyOpa.p = func_800A273C(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, + gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, unkFunc1, unkFunc2, actor, gfxCtx->polyOpa.p); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_actor.c", 8860); @@ -3906,7 +3906,7 @@ void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, alpha); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, func_80034B54(globalCtx->state.gfxCtx)); - gfxCtx->polyXlu.p = func_800A273C(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, + gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, unkFunc1, unkFunc2, actor, gfxCtx->polyXlu.p); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_actor.c", 8904); diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index 97dd3fb9e..9066a226c 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -1,40 +1,37 @@ #include #include -s32 func_800A4478(SkelAnime*,f32,f32); -void func_800A52F8(SkelAnime* skelAnime, u32 animation); -void func_800A54FC(SkelAnime*,Vec3f*,s16); s32 func_800A3D70(GlobalContext*,SkelAnime*); s32 func_800A3E0C(GlobalContext*,SkelAnime*); -void func_800A34DC(GlobalContext*,s32,Vec3s*,Vec3s*,f32); -void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s32 limbCount, void* ram); s32 func_800A4D9C(SkelAnime* skelAnime); s32 func_800A4EE0(SkelAnime* skelAnime); s32 func_800A4E38(SkelAnime* skelAnime); -void func_800A1D8C(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *arg3); -void func_800A2E70(u8,Vec3s*,Vec3s*,Vec3s*,f32); -void func_800A49B0(SkelAnime*); -void func_800A3478(GlobalContext*,s32,Vec3s*,Vec3s*); -void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7); -void func_800A4FE4(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2); +void SkelAnime_CopyVec3s(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src); +void func_800A3678(GlobalContext* globalCtx, AnimationEntryType0* entry); +void func_800A36A4(GlobalContext* globalCtx, AnimationEntryType1* entry); +void func_800A3714(GlobalContext* globalCtx, AnimationEntryType2* entry); +void func_800A3770(GlobalContext* globalCtx, AnimationEntryType3* entry); +void func_800A37F0(GlobalContext* globalCtx, AnimationEntryType4* entry); +void func_800A3874(GlobalContext* globalCtx, AnimationEntryType5* entry); //.data u32 D_8012A480 = 0; static AnimationEntryCallback D_8012A484[] = { - (AnimationEntryCallback)0x800A3678, - (AnimationEntryCallback)0x800A36A4, - (AnimationEntryCallback)0x800A3714, - (AnimationEntryCallback)0x800A3770, - (AnimationEntryCallback)0x800A37F0, - (AnimationEntryCallback)0x800A3874, + (AnimationEntryCallback)&func_800A3678, + (AnimationEntryCallback)&func_800A36A4, + (AnimationEntryCallback)&func_800A3714, + (AnimationEntryCallback)&func_800A3770, + (AnimationEntryCallback)&func_800A37F0, + (AnimationEntryCallback)&func_800A3874, }; //.bss u32 D_801600B0; -// SkelAnime_LodDrawLimb -void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) +void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec3s* actorDrawTable, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; Gfx* dList; @@ -64,7 +61,10 @@ void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec { if(1) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x325), G_MTX_LOAD); + gSPMatrix(gfxCtx->polyOpa.p++, + Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x325), + G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList); } } while(0); @@ -78,20 +78,24 @@ void func_800A08A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec if (limbEntry->firstChildIndex != LIMB_DONE) { - func_800A08A0(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); + SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, + updateMtxFunc, appendDlistFunc, actor, dListIndex); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - func_800A08A0(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); + SkelAnime_LodDrawLimb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, + updateMtxFunc, appendDlistFunc, actor, dListIndex); } + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x335); } -// SkelAnime_LodDraw -void func_800A0B40(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) +void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTable, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; char pad[4]; @@ -125,7 +129,10 @@ void func_800A0B40(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTab Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x371), G_MTX_LOAD); + gSPMatrix(gfxCtx->polyOpa.p++, + Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x371), + G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList); } } @@ -133,19 +140,20 @@ void func_800A0B40(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTab { appendDlistFunc(globalCtx, 1, &dList, &rot, actor); } + if (limbEntry->firstChildIndex != 0xFF) { - func_800A08A0(globalCtx, limbEntry->firstChildIndex, limbIndex, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); + SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, limbIndex, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); } + Matrix_Pull(); func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x37E); } #ifdef NON_MATCHING -// SkelAnime_LodDrawLimbSV -void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex, Mtx** mtx) +void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + Actor* actor, s32 dListIndex, Mtx** mtx) { SkelLimbEntry* limbEntry; Gfx* dList[2]; @@ -190,7 +198,7 @@ void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 } if (limbEntry->firstChildIndex != LIMB_DONE) { - func_800A0D94(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, mtx); } @@ -198,20 +206,18 @@ void func_800A0D94(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 if (limbEntry->nextLimbIndex != LIMB_DONE) { - func_800A0D94(globalCtx, limbEntry->nextLimbIndex, limbTable, + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, mtx); } } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A0D94.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_LodDrawLimbSV.s") #endif #ifdef NON_MATCHING -// SkelAnime_LodDrawSV -// func_800A106C -void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 limbCount, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex) +void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 limbCount, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + Actor* actor, s32 dListIndex) { SkelLimbEntry *limbEntry; Gfx* dList[2]; @@ -277,7 +283,7 @@ void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab } if (limbEntry->firstChildIndex != LIMB_DONE) { - func_800A0D94(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, &mtx); + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, &mtx); } Matrix_Pull(); @@ -285,12 +291,12 @@ void func_800A106C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1053); } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A106C.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_LodDrawSV.s") #endif -// SkelAnime_DrawLimb -// func_800A1344 -void func_800A1344(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) +void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + Actor* actor) { SkelLimbEntry* limbEntry; Gfx* dList; @@ -335,7 +341,7 @@ void func_800A1344(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 if (limbEntry->firstChildIndex != LIMB_DONE) { - func_800A1344(globalCtx, limbEntry->firstChildIndex, limbTable, + SkelAnime_DrawLimb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor); } @@ -343,14 +349,16 @@ void func_800A1344(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 if (limbEntry->nextLimbIndex != LIMB_DONE) { - func_800A1344(globalCtx, limbEntry->nextLimbIndex, limbTable, + SkelAnime_DrawLimb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor); } func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1121); } -void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) +void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + Actor* actor) { SkelLimbEntry* rootLimb; char pad[4]; @@ -398,7 +406,7 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa if (rootLimb->firstChildIndex != LIMB_DONE) { - func_800A1344(globalCtx, rootLimb->firstChildIndex, limbTable, + SkelAnime_DrawLimb(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor); } @@ -408,8 +416,9 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa } #ifdef NON_MATCHING -// SkelAnime_Draw2Limb -void func_800A180C(GlobalContext *globalCtx, u32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, Mtx** limbMatricies) +void SkelAnime_DrawLimbSV(GlobalContext *globalCtx, u32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + Actor* actor, Mtx** limbMatricies) { Gfx* limbDlist[2]; Vec3f limbPos; @@ -458,26 +467,27 @@ void func_800A180C(GlobalContext *globalCtx, u32 limbIndex, u32* limbTable, Vec3 if (limbEntry->firstChildIndex != LIMB_DONE) { - func_800A180C(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, limbMatricies); + SkelAnime_DrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, limbMatricies); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - func_800A180C(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, + SkelAnime_DrawLimbSV(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, limbMatricies); } func_800C6B54(sp34, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x4F1); } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A180C.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_DrawLimbSV.s") #endif #ifdef NON_MATCHING -// SkelAnime_Draw2 -void func_800A1AC8(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, u32 dListCount, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) +void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, u32 dListCount, + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, + Actor* actor) { SkelLimbEntry *rootLimb; Gfx* skelDlist[2]; @@ -540,7 +550,7 @@ void func_800A1AC8(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab if (rootLimb->firstChildIndex != LIMB_DONE) { - func_800A180C(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, + SkelAnime_DrawLimbSV(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, &limbMatricies); } @@ -548,16 +558,16 @@ void func_800A1AC8(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1347); } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A1AC8.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_DrawSV.s") #endif #undef NON_MATCHING -/* SkelAnime_AnimateFrame +/* * Copies the rotation values from the rotation value table, indexed by the rotation index table * When a rotation index is >= the animation limit, the output rotation value is copied from the frame's * rotation value list, otherwise it is copied from the initial rotation value list */ -void func_800A1D8C(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *dst) +void SkelAnime_AnimateFrame(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *dst) { AnimationRotationIndex* index; AnimationRotationValue* rotationValueTable; @@ -580,10 +590,10 @@ void func_800A1D8C(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *dst) (rotationValueTable == NULL)) { if(1) { } // Necessary to match. - LOG("../z_skelanime.c", 0x570, "out = %08x\n", dst); - LOG("../z_skelanime.c", 0x571, "ref_tbl = %08x\n", index); - LOG("../z_skelanime.c", 0x572, "frame_tbl = %08x\n", frameRotationValueTable); - LOG("../z_skelanime.c", 0x573, "tbl = %08x\n", rotationValueTable); + LogUtils_LogThreadId("../z_skelanime.c", 1392); osSyncPrintf("out = %08x\n", dst); + LogUtils_LogThreadId("../z_skelanime.c", 1393); osSyncPrintf("ref_tbl = %08x\n", index); + LogUtils_LogThreadId("../z_skelanime.c", 1394); osSyncPrintf("frame_tbl = %08x\n", frameRotationValueTable); + LogUtils_LogThreadId("../z_skelanime.c", 1395); osSyncPrintf("tbl = %08x\n", rotationValueTable); } dst->x = index->x >= limit ? frameRotationValueTable[index->x] : rotationValueTable[index->x]; @@ -592,21 +602,22 @@ void func_800A1D8C(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *dst) } } -s32 func_800A1FC8(s32 arg0) +s16 func_800A1FC8(u32 animationSeg) { - u16* virt = (u16*)SEGMENTED_TO_VIRTUAL(arg0); - return (s16)(*virt); + AnimationHeader* animation = (u16*)SEGMENTED_TO_VIRTUAL(animationSeg); + return animation->frameCount; } -s32 SkelAnime_GetFrameCount(u32 animation) +s32 SkelAnime_GetFrameCount(u32 animationSeg) { - u16* virt = (u16*)SEGMENTED_TO_VIRTUAL(animation); + AnimationHeader* animation = (u16*)SEGMENTED_TO_VIRTUAL(animationSeg); - return (s16)(*virt - 1); + return (s16)((u16)animation->frameCount - 1); } -// SkelAnime_DrawLimb2 -Gfx* func_800A2044(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Gfx* gfx) +Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, + SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, + Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; Gfx* dList; @@ -643,14 +654,16 @@ Gfx* func_800A2044(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = func_800A2044(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, gfx); + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, + updateMtxFunc, appendDlistFunc, actor, gfx); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - gfx = func_800A2044(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, gfx); + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, + updateMtxFunc, appendDlistFunc, actor, gfx); } return gfx; @@ -658,8 +671,9 @@ Gfx* func_800A2044(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 #ifdef NON_MATCHING // Some regalloc, and nonmatching stack usage -// SkelAnime_Draw2 -Gfx* func_800A2288(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Gfx* gfx) +Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, + SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, + Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; Vec3f pos; @@ -703,7 +717,8 @@ Gfx* func_800A2288(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = func_800A2044(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, gfx); + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, + updateMtxFunc, appendDlistFunc, actor, gfx); } Matrix_Pull(); @@ -711,11 +726,12 @@ Gfx* func_800A2288(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab return gfx; } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2288.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_Draw2.s") #endif -// SkelAnime_DrawLimbSV2 -Gfx* func_800A24A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Mtx** mtx, Gfx* gfx) +Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, + SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, + Actor* actor, Mtx** mtx, Gfx* gfx) { SkelLimbEntry* limbEntry; Gfx* dList1; @@ -760,20 +776,22 @@ Gfx* func_800A24A0(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3 } if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = func_800A24A0(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, mtx, gfx); + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, mtx, gfx); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - gfx = func_800A24A0(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, mtx, gfx); + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, mtx, gfx); } + return gfx; } -// SkelAnime_DrawSV2 -Gfx* func_800A273C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 dListCount, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Gfx* gfx) +Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 dListCount, + SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, + Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; char pad[4]; @@ -791,6 +809,7 @@ Gfx* func_800A273C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab osSyncPrintf("\x1b[m"); return NULL; } + gSPSegment(gfx++, 0xD, mtx); Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(*limbTable); @@ -828,35 +847,40 @@ Gfx* func_800A273C(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTab } if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = func_800A24A0(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, &mtx, gfx); + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, &mtx, gfx); } + Matrix_Pull(); + return gfx; } +// Seems to be some kind of rotations update, somewhat large. #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A29BC.s") -s16 func_800A2DBC(s32 arg0) +s16 func_800A2DBC(u32 animationSeg) { - u16* virt = SEGMENTED_TO_VIRTUAL(arg0); + AnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); - return virt[1]; + return animation->unk_02; } -s16 func_800A2DF4(s32 arg0) +s16 func_800A2DF4(u32 animationSeg) { - u16* virt = SEGMENTED_TO_VIRTUAL(arg0); + AnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); - return *virt; + return animation->frameCount; } -s32 func_800A2E2C(s32 arg0){ - s16* virt = SEGMENTED_TO_VIRTUAL(arg0); +s16 func_800A2E2C(u32 animationSeg) +{ + AnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); - return (s16)(*virt - 1); + return (s16)(animation->frameCount - 1); } -// Big boi function +// Very large update function #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2E70.s") void func_800A32EC(u16* arg0) @@ -876,8 +900,8 @@ void func_800A3310(void* arg0) *D_8012A480Ptr |= D_801600B0; } -// SkelAnime_NextEntry -AnimationEntry* func_800A3334(AnimationContext* animationCtx, AnimationType type) + +AnimationEntry* SkelAnime_NextEntry(AnimationContext* animationCtx, AnimationType type) { AnimationEntry *entry; s16 index = animationCtx->animationCount; @@ -893,18 +917,17 @@ AnimationEntry* func_800A3334(AnimationContext* animationCtx, AnimationType type } /* - * These next 6 functions seem to inialize an entry in the global context's - * animation context. + * The next 6 functions are coordinate with the AnimationType enum */ -// SkelAnime_LinkAnimetionDma void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s32 limbCount, void* ram) { AnimationEntry* entry; LinkAnimetionEntry *linkAnimetionEntry; char pad[4]; - entry = func_800A3334(&globalCtx->animationCtx, 0); + entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE0); + if (entry != NULL) { linkAnimetionEntry = SEGMENTED_TO_VIRTUAL(linkAnimetionSeg); @@ -914,11 +937,11 @@ void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s3 "../z_skelanime.c" , 0x7D4); } } -//SkelAnime_AnimationEntryType1Init + void func_800A3478(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src) { - AnimationEntry* entry = func_800A3334(&globalCtx->animationCtx, 1); + AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE1); if (entry != NULL) { entry->types.type1.unk_00 = D_801600B0; @@ -927,11 +950,11 @@ void func_800A3478(GlobalContext* globalCtx, s32 vecCount, entry->types.type1.src = src; } } -//SkelAnime_AnimationEntryType2Init + void func_800A34DC(GlobalContext* globalCtx, s32 arg1, Vec3s* arg2, Vec3s* arg3, f32 arg4) { - AnimationEntry* entry = func_800A3334(&globalCtx->animationCtx, 2); + AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE2); if (entry != NULL) { entry->types.type2.unk_00 = D_801600B0; @@ -941,11 +964,11 @@ void func_800A34DC(GlobalContext* globalCtx, s32 arg1, entry->types.type2.unk_0C = arg4; } } -//SkelAnime_AnimationEntryType3Init + void func_800A3548(GlobalContext* globalCtx, s32 vecCount, s32 dst, s32 src, s32 index) { - AnimationEntry* entry = func_800A3334(&globalCtx->animationCtx, 3); + AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE3); if (entry != NULL) { entry->types.type3.unk_00 = D_801600B0; @@ -955,11 +978,11 @@ void func_800A3548(GlobalContext* globalCtx, s32 vecCount, entry->types.type3.index = index; } } -//SkelAnime_AnimationEntryType4Init + void func_800A35B4(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index) { - AnimationEntry* entry = func_800A3334(&globalCtx->animationCtx, 4); + AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE4); if (entry != NULL) { entry->types.type4.unk_00 = D_801600B0; @@ -969,11 +992,11 @@ void func_800A35B4(GlobalContext* globalCtx, s32 vecCount, entry->types.type4.index = index; } } -//SkelAnime_AnimationEntryType4Init + void func_800A3620(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3) { - AnimationEntry* entry = func_800A3334(&globalCtx->animationCtx, 5); + AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE5); if (entry != NULL) { entry->types.type5.actor = actor; @@ -1084,7 +1107,8 @@ void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) D_8012A480 = 0; } -void func_800A39AC(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeaderSeg, u32* animation, s32 flags, Vec3s* actorDrawTbl, Vec3s* arg6, s32 limbBufCount) +void func_800A39AC(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeaderSeg, u32* animation, + s32 flags, Vec3s* actorDrawTbl, Vec3s* arg6, s32 limbBufCount) { char pad[8]; SkelAnimeLimbHeader *limbHeader; @@ -1143,7 +1167,6 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeade func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, 0.0f, 0, 0.0f); } -// SkelAnime_SetUpdateFunc void func_800A3B8C(SkelAnime* skelAnime) { if (skelAnime->unk_01 < 2) @@ -1157,7 +1180,6 @@ void func_800A3B8C(SkelAnime* skelAnime) skelAnime->unk_28 = 0.0f; } -//SkelAnime_FrameUpdateMatrixGlobalCtx void func_800A3BC0(GlobalContext* globalCtx, SkelAnime* skelAnime) { skelAnime->animUpdate(globalCtx, skelAnime); @@ -1216,7 +1238,6 @@ s32 func_800A3D70(GlobalContext* globalCtx, SkelAnime* skelAnime) return 0; } -// returns 1 if animation is done? s32 func_800A3E0C(GlobalContext* globalCtx, SkelAnime* skelAnime) { f32 updateRate = R_UPDATE_RATE * 0.5f; @@ -1257,7 +1278,8 @@ void func_800A3EE8(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) } #ifdef NON_MATCHING -void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animation, f32 playbackSpeed, f32 arg4, f32 frameCount, u8 arg6, f32 arg7) +void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animation, f32 playbackSpeed, + f32 arg4, f32 frameCount, u8 arg6, f32 arg7) { skelAnime->unk_01 = arg6; @@ -1267,7 +1289,7 @@ void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animatio if(arg7 < 0.0f) { func_800A3B8C(skelAnime); - func_800A5774(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); + SkelAnime_CopyVec3s(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); arg7 = -arg7; } else @@ -1313,7 +1335,7 @@ void func_800A4140(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { - func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); + func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 0, 0.0f); } void func_800A41FC(GlobalContext* globalCtx, SkelAnime* skelAnime) @@ -1326,14 +1348,14 @@ void func_800A422C(GlobalContext* globalCtx, SkelAnime* skelAnime) func_800A3478(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24); } -void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, s32 arg2, f32 arg3) +void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 frame) { - func_800A336C(globalCtx, arg2, (s32) arg3, skelAnime->limbCount, skelAnime->unk_24); + func_800A336C(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); } -void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, s32 arg2, f32 arg3) +void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 frame) { - func_800A336C(globalCtx, arg2, (s32) arg3, skelAnime->limbCount, skelAnime->actorDrawTbl); + func_800A336C(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); } void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) @@ -1341,18 +1363,20 @@ void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, arg2); } -void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, s32 arg2, f32 arg3, s32 arg4, f32 arg5, f32 arg6, s32 arg7) +void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animationSeg, + f32 frame, s32 arg4, f32 arg5, f32 arg6, s32 arg7) { s32 alignedAddr; - func_800A336C(globalCtx, arg2, (s32) arg3, skelAnime->limbCount, skelAnime->actorDrawTbl); + func_800A336C(globalCtx, animationSeg, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); alignedAddr = ALIGN16(arg7); - func_800A336C(globalCtx, arg4, (s32) arg5, skelAnime->limbCount, alignedAddr); + func_800A336C(globalCtx, arg4, (s32)arg5, skelAnime->limbCount, alignedAddr); func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, alignedAddr, arg6); } -void func_800A43B8(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 animation, f32 frame, s32 arg4, f32 arg5, f32 arg6, s32 arg7) +void func_800A43B8(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 animation, + f32 frame, s32 arg4, f32 arg5, f32 arg6, s32 arg7) { s32 alignedAddr; @@ -1414,7 +1438,8 @@ s32 func_800A4530(SkelAnime* skelAnime, f32 arg1) return func_800A4478(skelAnime, arg1, updateRate); } -void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) +void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, + u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) { SkelAnimeLimbHeader* limbHeader; @@ -1444,11 +1469,12 @@ void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHead if (animation != 0) { - func_800A52F8(skelAnime, animation); + SkelAnime_ChangeAnimationDefault(skelAnime, animation); } } -// SkelAnime_InitSV -void func_800A46F8(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) + +void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, + u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) { SkelAnimeLimbHeader *limbHeader; @@ -1459,8 +1485,11 @@ void func_800A46F8(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeade if (actorDrawTable == NULL) { - skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 3047); - skelAnime->unk_24 = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 3048); + skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), + "../z_skelanime.c", 3047); + + skelAnime->unk_24 = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), + "../z_skelanime.c", 3048); } else { @@ -1480,11 +1509,12 @@ void func_800A46F8(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeade if (animation != 0) { - func_800A52F8(skelAnime, animation); + SkelAnime_ChangeAnimationDefault(skelAnime, animation); } } -// SkelAnime_InitSkin -void func_800A487C(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeaderSeg, u32 animation) + +void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime *skelAnime, + u32 limbHeaderSeg, u32 animation) { SkelAnimeLimbHeader *limbHeader; @@ -1502,7 +1532,7 @@ void func_800A487C(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeade if (animation != 0) { - func_800A52F8(skelAnime, animation); + SkelAnime_ChangeAnimationDefault(skelAnime, animation); } } @@ -1592,7 +1622,6 @@ s32 func_800A4AD8(SkelAnime* skelAnime) #endif #ifdef NON_MATCHING -// close void func_800A4C58(SkelAnime* skelAnime) { char pad[6]; @@ -1602,7 +1631,7 @@ void func_800A4C58(SkelAnime* skelAnime) s32 temp_f8; f32 temp_f2; - func_800A1D8C(skelAnime->animCurrent, (s32) skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_AnimateFrame(skelAnime->animCurrent, (s32) skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); if ((skelAnime->unk_01 & 1) != 0) { temp_f8 = (s32) skelAnime->animCurrentFrame; @@ -1613,7 +1642,7 @@ void func_800A4C58(SkelAnime* skelAnime) { temp_f8 = 0; } - func_800A1D8C(skelAnime->animCurrent, temp_f8, skelAnime->limbCount, sp38); + SkelAnime_AnimateFrame(skelAnime->animCurrent, temp_f8, skelAnime->limbCount, sp38); func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, sp38, temp_f2); } if (skelAnime->unk_28 != 0) @@ -1634,7 +1663,6 @@ void func_800A4C58(SkelAnime* skelAnime) #undef NON_MATCHING #ifdef NON_MATCHING -//reg alloc s32 func_800A4D9C(SkelAnime* skelAnime) { skelAnime->animCurrentFrame += (R_UPDATE_RATE * 0.33333334f) + skelAnime->animPlaybackSpeed; @@ -1655,7 +1683,6 @@ s32 func_800A4D9C(SkelAnime* skelAnime) #undef NON_MATCHING #ifdef NON_MATCHING -//reg alloc s32 func_800A4E38(SkelAnime* skelAnime) { skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * (R_UPDATE_RATE * 0.33333334f); @@ -1686,7 +1713,7 @@ s32 func_800A4EE0(SkelAnime *skelAnime) if (skelAnime->animCurrentFrame == skelAnime->animFrameCount) { - func_800A1D8C(skelAnime->animCurrent, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_AnimateFrame(skelAnime->animCurrent, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); func_800A4C58(skelAnime); return 1; } @@ -1714,11 +1741,8 @@ s32 func_800A4EE0(SkelAnime *skelAnime) } #ifdef NON_MATCHING -// close some regalloc, missing move zero fpr -s32 func_800A4AD8(SkelAnime* skelAnime); -s32 func_800A4A20(SkelAnime* skelAnime); -void func_800A1D8C(u32,s32,u8,Vec3s*); -void func_800A4FE4(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2) +void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, + f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2) { skelAnime->unk_01 = unk1; if ((transitionRate != 0.0f) && @@ -1727,7 +1751,7 @@ void func_800A4FE4(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 u if (transitionRate < 0.0f) { func_800A49B0(skelAnime); - func_800A5774(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); + SkelAnime_CopyVec3s(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); transitionRate = -transitionRate; } else @@ -1741,7 +1765,7 @@ void func_800A4FE4(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 u { skelAnime->mtxUpdate = (void*)&func_800A4A20; } - func_800A1D8C(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_AnimateFrame(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); } skelAnime->unk_28 = 1.0f; skelAnime->unk_2C = 1.0f / transitionRate; @@ -1749,7 +1773,7 @@ void func_800A4FE4(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 u else { func_800A49B0(skelAnime); - func_800A1D8C(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_AnimateFrame(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); skelAnime->unk_28 = 0.0f; } @@ -1772,44 +1796,44 @@ void func_800A4FE4(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 u skelAnime->animPlaybackSpeed = playbackSpeed; } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4FE4.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_ChangeAnimationImpl.s") #endif #undef NON_MATCHING -void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, /* 0x10 */ f32 frameCount, /* 0x14 */ u8 unk1, /* 0x18 */ f32 transitionRate) +void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, + f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate) { - func_800A4FE4(skelAnime, animation, playbackSpeed, unk0, frameCount, unk1, transitionRate, 0); + SkelAnime_ChangeAnimationImpl(skelAnime, animation, playbackSpeed, unk0, frameCount, unk1, transitionRate, 0); } void func_800A51E8(SkelAnime* skelAnime, u32 animation) { - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 2, 0.0f); + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 2, 0.0f); } void func_800A5240(SkelAnime* skelAnime, u32 animation, f32 transitionRate) { - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0, (f32) SkelAnime_GetFrameCount(animation), 2, transitionRate); + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0, + (f32)SkelAnime_GetFrameCount(animation), 2, transitionRate); } void func_800A529C(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { - SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 2, 0.0f); + SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, + (f32)SkelAnime_GetFrameCount(animation), 2, 0.0f); } -// SkelAnime_ChangeAnimationDefault -void func_800A52F8(SkelAnime* skelAnime, u32 animation) +void SkelAnime_ChangeAnimationDefault(SkelAnime* skelAnime, u32 animation) { SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); } -// SkelAnime_ChangeAnimationTransitionRate -void func_800A534C(SkelAnime* skelAnime, u32 animation, f32 transitionRate) +void SkelAnime_ChangeAnimationTransitionRate(SkelAnime* skelAnime, u32 animation, f32 transitionRate) { SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, 0.0f, 0, transitionRate); } -//SkelAnime_ChangeAnimationPlaybackSpeed -void func_800A5384(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) +void SkelAnime_ChangeAnimationPlaybackSpeed(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); } @@ -1837,12 +1861,12 @@ void func_800A5408(SkelAnime* skelAnime) #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5408.s") #endif -void func_800A5428(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* arg3) +void func_800A5428(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* index) { s32 i; for(i = 0; i < skelAnime->limbCount; i++, dst++, src++) { - if(*arg3++) + if(*index++) { *dst = *src; } @@ -1919,8 +1943,7 @@ s32 func_800A56C8(SkelAnime *skelAnime, f32 arg1) return func_800A4478(skelAnime, arg1, 1.0f); } -// SkelAnime_Free -void func_800A56F0(SkelAnime *skelAnime, s32 arg1) +void SkelAnime_Free(SkelAnime *skelAnime, GlobalContext* globalCtx) { if (skelAnime->actorDrawTbl != NULL) { @@ -1938,8 +1961,7 @@ void func_800A56F0(SkelAnime *skelAnime, s32 arg1) osSyncPrintf("morf_joint あきまへん!!\n"); // "morf_joint Akimane !!" } -// SkelAnime_CopyVec3s -void func_800A5774(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src) +void SkelAnime_CopyVec3s(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src) { s32 i; for(i = 0; i < skelAnime->limbCount; i++) diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 8ff5464e9..f4cd5301e 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -87,7 +87,7 @@ void func_8097C8A8(DemoGo* this, GlobalContext* globalCtx) { } void DemoGo_Destroy(DemoGo* this, GlobalContext* globalCtx) { - func_800A56F0(&this->skelAnime, globalCtx); + SkelAnime_Free(&this->skelAnime, globalCtx); } void func_8097C930(DemoGo* this) { @@ -320,7 +320,7 @@ void DemoGo_Init(DemoGo* this, GlobalContext* globalCtx) { s16 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f); - func_800A46F8(globalCtx, &this->skelAnime, &D_0600FEF0, 0, 0, 0, 0); + SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600FEF0, 0, 0, 0, 0); SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f); this->action = 0; } @@ -343,7 +343,7 @@ void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8)); gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9)); - func_800A1AC8(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL, + SkelAnime_DrawSV(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL, &this->actor); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_go.c", 746); diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index c9e1d06c2..f97e5f8d7 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -242,7 +242,7 @@ static void EnDog_Init(EnDog* this, GlobalContext* globalCtx) { collider = &this->collider; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 24.0f); skelAnime = &this->skelAnime; - func_800A46F8(globalCtx, skelAnime, &D_06007290, 0, &this->unk_1F4, &this->unk_242, 13); + SkelAnime_InitSV(globalCtx, skelAnime, &D_06007290, 0, &this->unk_1F4, &this->unk_242, 13); func_80034EC0(skelAnime, animations, 0); if ((this->actor.params & 0x8000) == 0) { @@ -479,7 +479,7 @@ static void EnDog_Draw(EnDog* this, GlobalContext* globalCtx) { gDPSetEnvColor(gfxCtx->polyOpa.p++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g, colors[this->actor.params & 0xF].b, colors[this->actor.params & 0xF].a); - func_800A1AC8(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, + SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, EnDog_Callback1, EnDog_Callback2, &this->actor); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_en_dog.c", 994); } diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index b8c98d055..32de3bd7a 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -86,7 +86,7 @@ static void EnMs_Init(EnMs* this, GlobalContext* globalCtx) { return; } Actor_ProcessInitChain(&this->actor, initChain); - func_800A46F8(globalCtx, &this->skelAnime, &D_06003DC0, &D_060005EC, &this->unkSkelAnimeStruct, &this->unk_1C6, + SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06003DC0, &D_060005EC, &this->unkSkelAnimeStruct, &this->unk_1C6, 9); // skelanime_mtx_init ActorCollider_AllocCylinder(globalCtx, &this->collider); func_8005C450(globalCtx, &this->collider, this, &unk_col_80AB0320); @@ -191,6 +191,6 @@ static void EnMs_Update(EnMs* this, GlobalContext* globalCtx) { void EnMs_Draw(EnMs* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - func_800A1AC8(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0, 0, + SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0, 0, &this->actor); } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 954447e62..7c9c40e4f 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -508,7 +508,7 @@ void EnTk_Init(EnTk* this, GlobalContext* globalCtx) { ActorShape_Init(&thisAgain->actor.shape, 0, ActorShadow_DrawFunc_Circle, 24.f); - func_800A46F8(globalCtx, &thisAgain->skelAnim, (u32)&D_0600BE40, 0, thisAgain->hz_22A, thisAgain->hz_296, 18); + SkelAnime_InitSV(globalCtx, &thisAgain->skelAnim, (u32)&D_0600BE40, 0, thisAgain->hz_22A, thisAgain->hz_296, 18); SkelAnime_ChangeAnimation(&thisAgain->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06002F84), 0, 0.f); @@ -769,7 +769,7 @@ void EnTk_Draw(EnTk* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(eyeImages[thisAgain->eyeImageIdx])); - func_800A1AC8(globalCtx, thisAgain->skelAnim.limbIndex, thisAgain->skelAnim.actorDrawTbl, + SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.limbIndex, thisAgain->skelAnim.actorDrawTbl, thisAgain->skelAnim.dListCount, func_80B1D278, func_80B1D2E4, &thisAgain->actor); func_800C6B54(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1312); diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 630a05473..c90558f89 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -94,7 +94,7 @@ static void EnWallmas_Init(EnWallmas* this, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->actor, initChain); ActorShape_Init(&this->actor.shape, 0, NULL, 0.5f); - func_800A46F8(globalCtx, &this->skelAnime, &D_06008FB0, &D_06009DB0, &this->unkSkelAnimeStruct, &this->unk_22e, + SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06008FB0, &D_06009DB0, &this->unkSkelAnimeStruct, &this->unk_22e, 0x19); ActorCollider_AllocCylinder(globalCtx, &this->colCylinder); @@ -630,7 +630,7 @@ static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 static void EnWallmas_Draw(EnWallmas* this, GlobalContext* globalCtx) { if (this->actionFunc != (ActorFunc)&EnWallmas_WaitToDrop) { func_80093D18(globalCtx->state.gfxCtx); - func_800A1AC8(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, + SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, &EnWallMas_UpdatePos, &EnWallmas_DrawOpa, &this->actor); } -- cgit v1.2.3 From db3cfe1b61397a6656f4d92dd0835a589cf72c68 Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Tue, 24 Mar 2020 12:16:13 -0500 Subject: use clang, modify z64animation.h and z64dma.h to use open braces on newline --- src/code/sys_matrix.c | 104 +- src/code/z_actor.c | 8 +- src/code/z_sample.c | 5 +- src/code/z_skelanime.c | 1143 ++++++++------------- src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 2 +- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 2 +- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 6 +- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 2 +- src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c | 4 +- 9 files changed, 474 insertions(+), 802 deletions(-) (limited to 'src') diff --git a/src/code/sys_matrix.c b/src/code/sys_matrix.c index 0d1ed55e7..fd474f1fc 100644 --- a/src/code/sys_matrix.c +++ b/src/code/sys_matrix.c @@ -22,52 +22,41 @@ MtxF gMtxFClear = MtxF* sMatrixStack; // "Matrix_stack" MtxF* sCurrentMatrix; // "Matrix_now" -void Matrix_Init(GameState* gameState) -{ +void Matrix_Init(GameState* gameState) { sCurrentMatrix = Game_Alloc(gameState, 20 * sizeof(MtxF), "../sys_matrix.c", 153); sMatrixStack = sCurrentMatrix; } -void Matrix_Push(void) -{ +void Matrix_Push(void) { Matrix_MtxFCopy(sCurrentMatrix + 1, sCurrentMatrix); sCurrentMatrix++; } -void Matrix_Pull(void) -{ +void Matrix_Pull(void) { sCurrentMatrix--; - if (sCurrentMatrix < sMatrixStack) - { + if (sCurrentMatrix < sMatrixStack) { __assert("Matrix_now >= Matrix_stack", "../sys_matrix.c", 176); } } -void Matrix_Get(MtxF* dest) -{ +void Matrix_Get(MtxF* dest) { Matrix_MtxFCopy(dest, sCurrentMatrix); } -void Matrix_Put(MtxF* src) -{ +void Matrix_Put(MtxF* src) { Matrix_MtxFCopy(sCurrentMatrix, src); } -MtxF* Matrix_GetCurrent(void) -{ +MtxF* Matrix_GetCurrent(void) { return sCurrentMatrix; } -void Matrix_Mult(MtxF* mf, u8 mode) -{ +void Matrix_Mult(MtxF* mf, u8 mode) { MtxF* cmf = Matrix_GetCurrent(); - if (mode == MTXMODE_APPLY) - { + if (mode == MTXMODE_APPLY) { func_800A6FA0(cmf, mf, cmf); - } - else - { + } else { Matrix_MtxFCopy(sCurrentMatrix, mf); } } @@ -77,8 +66,7 @@ void Matrix_Translate(f32 x, f32 y, f32 z, u8 mode) { f32 tx; f32 ty; - if (mode == MTXMODE_APPLY) - { + if (mode == MTXMODE_APPLY) { tx = cmf->xx; ty = cmf->yx; cmf->wx += tx * x + ty * y + cmf->zx * z; @@ -91,19 +79,15 @@ void Matrix_Translate(f32 x, f32 y, f32 z, u8 mode) { tx = cmf->xw; ty = cmf->yw; cmf->ww += tx * x + ty * y + cmf->zw * z; - } - else - { + } else { func_800A7A24(cmf, x, y, z); } } -void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode) -{ +void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode) { MtxF* cmf = sCurrentMatrix; - if (mode == MTXMODE_APPLY) - { + if (mode == MTXMODE_APPLY) { cmf->xx *= x; cmf->xy *= x; cmf->xz *= x; @@ -116,25 +100,20 @@ void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode) cmf->xw *= x; cmf->yw *= y; cmf->zw *= z; - } - else - { + } else { func_800A76A4(cmf, x, y, z); } } -void Matrix_RotateX(f32 x, u8 mode) -{ +void Matrix_RotateX(f32 x, u8 mode) { MtxF* cmf; f32 sin; f32 cos; f32 temp1; f32 temp2; - if (mode == MTXMODE_APPLY) - { - if (x != 0) - { + if (mode == MTXMODE_APPLY) { + if (x != 0) { cmf = sCurrentMatrix; sin = sinf(x); @@ -160,18 +139,13 @@ void Matrix_RotateX(f32 x, u8 mode) cmf->yw = temp1 * cos + temp2 * sin; cmf->zw = temp2 * cos - temp1 * sin; } - } - else - { + } else { cmf = sCurrentMatrix; - if (x != 0) - { + if (x != 0) { sin = sinf(x); cos = cosf(x); - } - else - { + } else { sin = 0.0f; cos = 1.0f; } @@ -195,18 +169,15 @@ void Matrix_RotateX(f32 x, u8 mode) } } -void Matrix_RotateY(f32 y, u8 mode) -{ +void Matrix_RotateY(f32 y, u8 mode) { MtxF* cmf; f32 sin; f32 cos; f32 temp1; f32 temp2; - if (mode == MTXMODE_APPLY) - { - if (y != 0) - { + if (mode == MTXMODE_APPLY) { + if (y != 0) { cmf = sCurrentMatrix; sin = sinf(y); @@ -232,18 +203,13 @@ void Matrix_RotateY(f32 y, u8 mode) cmf->xw = temp1 * cos - temp2 * sin; cmf->zw = temp1 * sin + temp2 * cos; } - } - else - { + } else { cmf = sCurrentMatrix; - if (y != 0) - { + if (y != 0) { sin = sinf(y); cos = cosf(y); - } - else - { + } else { sin = 0.0f; cos = 1.0f; } @@ -267,18 +233,15 @@ void Matrix_RotateY(f32 y, u8 mode) } } -void Matrix_RotateZ(f32 z, u8 mode) -{ +void Matrix_RotateZ(f32 z, u8 mode) { MtxF* cmf; f32 sin; f32 cos; f32 temp1; f32 temp2; - if (mode == MTXMODE_APPLY) - { - if (z != 0) - { + if (mode == MTXMODE_APPLY) { + if (z != 0) { cmf = sCurrentMatrix; sin = sinf(z); @@ -339,7 +302,7 @@ void Matrix_RotateZ(f32 z, u8 mode) * rotates that matrix by `y` degrees, then rotates that matrix * by `x` degrees. * Original Name: Matrix_RotateXYZ, changed to reflect rotation order. -*/ + */ void Matrix_RotateZYX(s16 x, s16 y, s16 z, u8 mode) { MtxF* cmf = sCurrentMatrix; f32 temp1; @@ -428,9 +391,8 @@ void Matrix_RotateZYX(s16 x, s16 y, s16 z, u8 mode) { /* * Translates the top of the matrix stack by `translation` units, * then rotates that matrix by `rotation` in Z-Y-X order -*/ -void Matrix_TranslateThenRotateZYX(Vec3f* translation, Vec3s* rotation) -{ + */ +void Matrix_TranslateThenRotateZYX(Vec3f* translation, Vec3s* rotation) { MtxF* cmf = sCurrentMatrix; f32 sin; f32 cos; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 91bf21c5e..eec16df03 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -3898,8 +3898,8 @@ void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc gDPPipeSync(gfxCtx->polyOpa.p++); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, func_80034B28(globalCtx->state.gfxCtx)); - gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, - unkFunc1, unkFunc2, actor, gfxCtx->polyOpa.p); + gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, + skelAnime->dListCount, unkFunc1, unkFunc2, actor, gfxCtx->polyOpa.p); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_actor.c", 8860); } @@ -3917,8 +3917,8 @@ void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, alpha); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, func_80034B54(globalCtx->state.gfxCtx)); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, - unkFunc1, unkFunc2, actor, gfxCtx->polyXlu.p); + gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, + skelAnime->dListCount, unkFunc1, unkFunc2, actor, gfxCtx->polyXlu.p); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_actor.c", 8904); } diff --git a/src/code/z_sample.c b/src/code/z_sample.c index 2f4f3fc6f..9b9fa9559 100644 --- a/src/code/z_sample.c +++ b/src/code/z_sample.c @@ -34,10 +34,11 @@ void Sample_Draw(SampleContext* this) { gfxCtx->polyOpa.p = func_80093708(gfxCtx->polyOpa.p, 0xFF, 0xFF, 0xFF, 0, 0, 0); func_80093D18(gfxCtx); - + gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_1CYCLE); gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - gDPSetCombineLERP(gfxCtx->polyOpa.p++, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE); + gDPSetCombineLERP(gfxCtx->polyOpa.p++, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, + PRIMITIVE); gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 0xFF, 0xFF, 0x00, 0x00); func_800C6B54(gfxArr, gfxCtx, "../z_sample.c", 111); diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index 9066a226c..7001c8fca 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -1,8 +1,8 @@ #include #include -s32 func_800A3D70(GlobalContext*,SkelAnime*); -s32 func_800A3E0C(GlobalContext*,SkelAnime*); +s32 func_800A3D70(GlobalContext*, SkelAnime*); +s32 func_800A3E0C(GlobalContext*, SkelAnime*); s32 func_800A4D9C(SkelAnime* skelAnime); s32 func_800A4EE0(SkelAnime* skelAnime); s32 func_800A4E38(SkelAnime* skelAnime); @@ -16,23 +16,18 @@ void func_800A3874(GlobalContext* globalCtx, AnimationEntryType5* entry); //.data u32 D_8012A480 = 0; -static AnimationEntryCallback D_8012A484[] = -{ - (AnimationEntryCallback)&func_800A3678, - (AnimationEntryCallback)&func_800A36A4, - (AnimationEntryCallback)&func_800A3714, - (AnimationEntryCallback)&func_800A3770, - (AnimationEntryCallback)&func_800A37F0, - (AnimationEntryCallback)&func_800A3874, +static AnimationEntryCallback D_8012A484[] = { + (AnimationEntryCallback)&func_800A3678, (AnimationEntryCallback)&func_800A36A4, + (AnimationEntryCallback)&func_800A3714, (AnimationEntryCallback)&func_800A3770, + (AnimationEntryCallback)&func_800A37F0, (AnimationEntryCallback)&func_800A3874, }; //.bss u32 D_801600B0; -void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable , Vec3s* actorDrawTable, +void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex) -{ + Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; Gfx* dList; Vec3f pos; @@ -52,42 +47,34 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab pos.z = limbEntry->translation.z; dList = limbEntry->displayLists[dListIndex]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) - { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (dList != NULL) - { - do - { - if(1) - { - gSPMatrix(gfxCtx->polyOpa.p++, - Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x325), + if (dList != NULL) { + do { + if (1) { + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x325), G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList); } - } while(0); + } while (0); } } - if (appendDlistFunc != NULL) - { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor); } - if (limbEntry->firstChildIndex != LIMB_DONE) - { - SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, - updateMtxFunc, appendDlistFunc, actor, dListIndex); + if (limbEntry->firstChildIndex != LIMB_DONE) { + SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, dListIndex); } Matrix_Pull(); - if (limbEntry->nextLimbIndex != LIMB_DONE) - { - SkelAnime_LodDrawLimb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, - updateMtxFunc, appendDlistFunc, actor, dListIndex); + if (limbEntry->nextLimbIndex != LIMB_DONE) { + SkelAnime_LodDrawLimb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, dListIndex); } func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x335); @@ -95,8 +82,7 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex) -{ + Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; char pad[4]; Gfx* dList; @@ -105,8 +91,7 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra GraphicsContext* gfxCtx; Gfx* gfx[4]; - if (limbIndex == NULL) - { + if (limbIndex == NULL) { osSyncPrintf("\x1b[31m"); osSyncPrintf("Si2_Lod_draw():skelがNULLです。\n"); osSyncPrintf("\x1b[m"); @@ -117,33 +102,29 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(*limbIndex); - pos.x = (f32) actorDrawTable->x; - pos.y = (f32) actorDrawTable->y; - pos.z = (f32) actorDrawTable->z; + pos.x = (f32)actorDrawTable->x; + pos.y = (f32)actorDrawTable->y; + pos.z = (f32)actorDrawTable->z; rot = actorDrawTable[1]; dList = limbEntry->displayLists[dListIndex]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) - { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (dList != NULL) - { - gSPMatrix(gfxCtx->polyOpa.p++, - Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x371), + if (dList != NULL) { + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x371), G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList); } } - if (appendDlistFunc != NULL) - { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, 1, &dList, &rot, actor); } - if (limbEntry->firstChildIndex != 0xFF) - { - SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, limbIndex, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); + if (limbEntry->firstChildIndex != 0xFF) { + SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, limbIndex, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, dListIndex); } Matrix_Pull(); @@ -153,8 +134,7 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra #ifdef NON_MATCHING void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex, Mtx** mtx) -{ + Actor* actor, s32 dListIndex, Mtx** mtx) { SkelLimbEntry* limbEntry; Gfx* dList[2]; Vec3f pos; @@ -174,40 +154,34 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbT pos.z = limbEntry->translation.z; dList[1] = dList[0] = limbEntry->displayLists[dListIndex]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList[1], &pos, &rot, actor) == 0)) - { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList[1], &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (dList[1] != NULL) - { - Matrix_ToMtx(*mtx, "../z_skelanime.c", 945); gfxCtx = globalCtx->state.gfxCtx; + if (dList[1] != NULL) { + Matrix_ToMtx(*mtx, "../z_skelanime.c", 945); + gfxCtx = globalCtx->state.gfxCtx; func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 946); gSPMatrix(gfxCtx->polyOpa.p++, *mtx, G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 949); (*mtx)++; - } - else if (dList[0] != 0) - { + } else if (dList[0] != 0) { Matrix_ToMtx(*mtx, "../z_skelanime.c", 954); (*mtx)++; } } - if (appendDlistFunc != NULL) - { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, limbIndex, &dList[0], &rot, actor); } - if (limbEntry->firstChildIndex != LIMB_DONE) - { - SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, - updateMtxFunc, appendDlistFunc, actor, dListIndex, mtx); + if (limbEntry->firstChildIndex != LIMB_DONE) { + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, dListIndex, mtx); } Matrix_Pull(); - if (limbEntry->nextLimbIndex != LIMB_DONE) - { - SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->nextLimbIndex, limbTable, - actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, mtx); + if (limbEntry->nextLimbIndex != LIMB_DONE) { + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, dListIndex, mtx); } } #else @@ -217,9 +191,8 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbT #ifdef NON_MATCHING void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 limbCount, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex) -{ - SkelLimbEntry *limbEntry; + Actor* actor, s32 dListIndex) { + SkelLimbEntry* limbEntry; Gfx* dList[2]; Vec3f pos; Vec3s rot; @@ -227,16 +200,13 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorD GraphicsContext* gfxCtx; Gfx* gfx[4]; - do - { - if(1) - { + do { + if (1) { mtx = Graph_Alloc(globalCtx->state.gfxCtx, limbCount * 0x40); } - } while(0); + } while (0); - if (limbTable == NULL) - { + if (limbTable == NULL) { osSyncPrintf("\x1b[31m"); osSyncPrintf("Si2_Lod_draw_SV():skelがNULLです。\n"); osSyncPrintf("\x1b[m"); @@ -255,35 +225,29 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorD rot = actorDrawTable[1]; - dList[1] = dList[0] = limbEntry->displayLists[dListIndex]; + dList[1] = dList[0] = limbEntry->displayLists[dListIndex]; - if ((updateMtxFunc == 0) || (updateMtxFunc(globalCtx, 1, &dList[1], &pos, &rot, actor) == 0)) - { + if ((updateMtxFunc == 0) || (updateMtxFunc(globalCtx, 1, &dList[1], &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (dList[1] != NULL) - { + if (dList[1] != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1033); gSPMatrix(gfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); mtx++; - } - else - { - if (dList[0] != NULL) - { + } else { + if (dList[0] != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1040); mtx++; } } } - if (appendDlistFunc != NULL) - { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, 1, &dList[0], &rot, actor); } - if (limbEntry->firstChildIndex != LIMB_DONE) - { - SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, &mtx); + if (limbEntry->firstChildIndex != LIMB_DONE) { + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, dListIndex, &mtx); } Matrix_Pull(); @@ -296,8 +260,7 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorD void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor) -{ + Actor* actor) { SkelLimbEntry* limbEntry; Gfx* dList; Vec3f pos; @@ -313,53 +276,45 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); limbIndex++; rot = actorDrawTable[limbIndex]; - pos.x = (f32) limbEntry->translation.x; - pos.y = (f32) limbEntry->translation.y; - pos.z = (f32) limbEntry->translation.z; + pos.x = (f32)limbEntry->translation.x; + pos.y = (f32)limbEntry->translation.y; + pos.z = (f32)limbEntry->translation.z; dList = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) - { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (dList != NULL) - { - do - { - if(1) - { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1103), G_MTX_LOAD); + if (dList != NULL) { + do { + if (1) { + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1103), + G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList); } - } while(0); + } while (0); } } - if (appendDlistFunc != NULL) - { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor); } - if (limbEntry->firstChildIndex != LIMB_DONE) - { - SkelAnime_DrawLimb(globalCtx, limbEntry->firstChildIndex, limbTable, - actorDrawTable, updateMtxFunc, appendDlistFunc, actor); + if (limbEntry->firstChildIndex != LIMB_DONE) { + SkelAnime_DrawLimb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor); } Matrix_Pull(); - if (limbEntry->nextLimbIndex != LIMB_DONE) - { - SkelAnime_DrawLimb(globalCtx, limbEntry->nextLimbIndex, limbTable, - actorDrawTable, updateMtxFunc, appendDlistFunc, actor); + if (limbEntry->nextLimbIndex != LIMB_DONE) { + SkelAnime_DrawLimb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor); } func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1121); } void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor) -{ + SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) { SkelLimbEntry* rootLimb; char pad[4]; Gfx* dList; @@ -368,8 +323,7 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa GraphicsContext* gfxCtx; Gfx* gfx[4]; - if (limbTable == NULL) - { + if (limbTable == NULL) { osSyncPrintf("\x1b[31m"); osSyncPrintf("Si2_draw():skelがNULLです。\n"); // Si2_draw (): skel is NULL. osSyncPrintf("\x1b[m"); @@ -382,32 +336,29 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa Matrix_Push(); rootLimb = SEGMENTED_TO_VIRTUAL(*limbTable); - pos.x = (f32) actorDrawTable[0].x; - pos.y = (f32) actorDrawTable[0].y; - pos.z = (f32) actorDrawTable[0].z; + pos.x = (f32)actorDrawTable[0].x; + pos.y = (f32)actorDrawTable[0].y; + pos.z = (f32)actorDrawTable[0].z; rot = actorDrawTable[1]; dList = rootLimb->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) - { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (dList != NULL) - { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1176), G_MTX_LOAD); + if (dList != NULL) { + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1176), + G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList); } } - if (appendDlistFunc != NULL) - { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, 1, &dList, &rot, actor); } - if (rootLimb->firstChildIndex != LIMB_DONE) - { - SkelAnime_DrawLimb(globalCtx, rootLimb->firstChildIndex, limbTable, - actorDrawTable, updateMtxFunc, appendDlistFunc, actor); + if (rootLimb->firstChildIndex != LIMB_DONE) { + SkelAnime_DrawLimb(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor); } Matrix_Pull(); @@ -416,14 +367,13 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa } #ifdef NON_MATCHING -void SkelAnime_DrawLimbSV(GlobalContext *globalCtx, u32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, +void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, u32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, Mtx** limbMatricies) -{ + Actor* actor, Mtx** limbMatricies) { Gfx* limbDlist[2]; Vec3f limbPos; Vec3s limbRot; - GraphicsContext *gfxCtx; + GraphicsContext* gfxCtx; Gfx* sp34[3]; SkelLimbEntry* limbEntry; @@ -433,49 +383,43 @@ void SkelAnime_DrawLimbSV(GlobalContext *globalCtx, u32 limbIndex, u32* limbTabl limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); limbRot = actorDrawTable[++limbIndex]; - limbPos.x = (f32) limbEntry->pos.x; - limbPos.y = (f32) limbEntry->pos.y; - limbPos.z = (f32) limbEntry->pos.z; + limbPos.x = (f32)limbEntry->pos.x; + limbPos.y = (f32)limbEntry->pos.y; + limbPos.z = (f32)limbEntry->pos.z; limbDlist[0] = limbEntry->dList; limbDlist[1] = limbEntry->dList; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &limbDlist[0], &limbPos, &limbRot, actor) == 0)) - { + if ((updateMtxFunc == NULL) || + (updateMtxFunc(globalCtx, limbIndex, &limbDlist[0], &limbPos, &limbRot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&limbPos, &limbRot); - if (limbDlist[0] != NULL) - { + if (limbDlist[0] != NULL) { Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 0x4DA); gSPMatrix(gfxCtx->polyOpa.p++, *limbMatricies, G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, &limbDlist[0]); (*limbMatricies)++; - } - else - { - if (&limbDlist[1] != 0) - { + } else { + if (&limbDlist[1] != 0) { Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 0x4E1); (*limbMatricies)++; } } } - if (appendDlistFunc != NULL) - { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, limbIndex, &limbDlist[1], &limbRot, actor); } - if (limbEntry->firstChildIndex != LIMB_DONE) - { - SkelAnime_DrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, limbMatricies); + if (limbEntry->firstChildIndex != LIMB_DONE) { + SkelAnime_DrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, limbMatricies); } Matrix_Pull(); - if (limbEntry->nextLimbIndex != LIMB_DONE) - { - SkelAnime_DrawLimbSV(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, - updateMtxFunc, appendDlistFunc, actor, limbMatricies); + if (limbEntry->nextLimbIndex != LIMB_DONE) { + SkelAnime_DrawLimbSV(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, limbMatricies); } func_800C6B54(sp34, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x4F1); @@ -487,22 +431,20 @@ void SkelAnime_DrawLimbSV(GlobalContext *globalCtx, u32 limbIndex, u32* limbTabl #ifdef NON_MATCHING void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, u32 dListCount, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor) -{ - SkelLimbEntry *rootLimb; + Actor* actor) { + SkelLimbEntry* rootLimb; Gfx* skelDlist[2]; Vec3f pos; Vec3s rot; GraphicsContext* gfxCtx; Mtx* limbMatricies; - Gfx *gfx[5]; + Gfx* gfx[5]; limbMatricies = Graph_Alloc(globalCtx->state.gfxCtx, dListCount << 6); - if (limbTable == NULL) - { + if (limbTable == NULL) { osSyncPrintf("\x1b[31m"); - osSyncPrintf("Si2_draw_SV():skelがNULLです。\n"); //Si2_draw_SV (): skel is NULL. + osSyncPrintf("Si2_draw_SV():skelがNULLです。\n"); // Si2_draw_SV (): skel is NULL. osSyncPrintf("\x1b[m"); return; } @@ -515,43 +457,36 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDraw Matrix_Push(); rootLimb = SEGMENTED_TO_VIRTUAL(*limbTable); - pos.x = (f32) actorDrawTable[0].x; - pos.y = (f32) actorDrawTable[0].y; - pos.z = (f32) actorDrawTable[0].z; + pos.x = (f32)actorDrawTable[0].x; + pos.y = (f32)actorDrawTable[0].y; + pos.z = (f32)actorDrawTable[0].z; rot = actorDrawTable[1]; skelDlist[0] = skelDlist[1] = rootLimb->dList; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &skelDlist[0], &pos, &rot, actor) == 0)) - { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &skelDlist[0], &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (skelDlist[0] != NULL) - { + if (skelDlist[0] != NULL) { Matrix_ToMtx(limbMatricies, "../z_skelanime.c", 1327); gSPMatrix(gfxCtx->polyOpa.p++, limbMatricies, G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, skelDlist[0]); limbMatricies++; - } - else - { - if (skelDlist[1] != 0) - { + } else { + if (skelDlist[1] != 0) { Matrix_ToMtx(limbMatricies, "../z_skelanime.c", 1334); limbMatricies++; } } } - if (appendDlistFunc != 0) - { + if (appendDlistFunc != 0) { appendDlistFunc(globalCtx, 1, &skelDlist[1], &rot, actor); } - if (rootLimb->firstChildIndex != LIMB_DONE) - { - SkelAnime_DrawLimbSV(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, - updateMtxFunc, appendDlistFunc, actor, &limbMatricies); + if (rootLimb->firstChildIndex != LIMB_DONE) { + SkelAnime_DrawLimbSV(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, &limbMatricies); } Matrix_Pull(); @@ -566,13 +501,12 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDraw * Copies the rotation values from the rotation value table, indexed by the rotation index table * When a rotation index is >= the animation limit, the output rotation value is copied from the frame's * rotation value list, otherwise it is copied from the initial rotation value list -*/ -void SkelAnime_AnimateFrame(u32 animation, s32 currentFrame, s32 limbCount, Vec3s *dst) -{ + */ +void SkelAnime_AnimateFrame(u32 animation, s32 currentFrame, s32 limbCount, Vec3s* dst) { AnimationRotationIndex* index; AnimationRotationValue* rotationValueTable; AnimationRotationValue* frameRotationValueTable; - AnimationHeader *animationHeader; + AnimationHeader* animationHeader; s32 i; u16 limit; @@ -583,17 +517,17 @@ void SkelAnime_AnimateFrame(u32 animation, s32 currentFrame, s32 limbCount, Vec3 frameRotationValueTable = &rotationValueTable[currentFrame]; limit = animationHeader->limit; - for(i = 0; i < limbCount; i++, dst++, index++) - { - if ((dst == NULL) || (index == NULL) || - (frameRotationValueTable == NULL) || - (rotationValueTable == NULL)) - { - if(1) { } // Necessary to match. - LogUtils_LogThreadId("../z_skelanime.c", 1392); osSyncPrintf("out = %08x\n", dst); - LogUtils_LogThreadId("../z_skelanime.c", 1393); osSyncPrintf("ref_tbl = %08x\n", index); - LogUtils_LogThreadId("../z_skelanime.c", 1394); osSyncPrintf("frame_tbl = %08x\n", frameRotationValueTable); - LogUtils_LogThreadId("../z_skelanime.c", 1395); osSyncPrintf("tbl = %08x\n", rotationValueTable); + for (i = 0; i < limbCount; i++, dst++, index++) { + if ((dst == NULL) || (index == NULL) || (frameRotationValueTable == NULL) || (rotationValueTable == NULL)) { + if (1) {} // Necessary to match. + LogUtils_LogThreadId("../z_skelanime.c", 1392); + osSyncPrintf("out = %08x\n", dst); + LogUtils_LogThreadId("../z_skelanime.c", 1393); + osSyncPrintf("ref_tbl = %08x\n", index); + LogUtils_LogThreadId("../z_skelanime.c", 1394); + osSyncPrintf("frame_tbl = %08x\n", frameRotationValueTable); + LogUtils_LogThreadId("../z_skelanime.c", 1395); + osSyncPrintf("tbl = %08x\n", rotationValueTable); } dst->x = index->x >= limit ? frameRotationValueTable[index->x] : rotationValueTable[index->x]; @@ -602,14 +536,12 @@ void SkelAnime_AnimateFrame(u32 animation, s32 currentFrame, s32 limbCount, Vec3 } } -s16 func_800A1FC8(u32 animationSeg) -{ +s16 func_800A1FC8(u32 animationSeg) { AnimationHeader* animation = (u16*)SEGMENTED_TO_VIRTUAL(animationSeg); return animation->frameCount; } -s32 SkelAnime_GetFrameCount(u32 animationSeg) -{ +s32 SkelAnime_GetFrameCount(u32 animationSeg) { AnimationHeader* animation = (u16*)SEGMENTED_TO_VIRTUAL(animationSeg); return (s16)((u16)animation->frameCount - 1); @@ -617,8 +549,7 @@ s32 SkelAnime_GetFrameCount(u32 animationSeg) Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, - Actor* actor, Gfx* gfx) -{ + Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; Gfx* dList; Vec3f pos; @@ -637,33 +568,28 @@ Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable dList = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor, &gfx) == 0)) - { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (dList != NULL) - { + if (dList != NULL) { gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x5D1), G_MTX_LOAD); gSPDisplayList(gfx++, dList); } } - if (appendDlistFunc != NULL) - { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor, &gfx); } - if (limbEntry->firstChildIndex != LIMB_DONE) - { - gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, - updateMtxFunc, appendDlistFunc, actor, gfx); + if (limbEntry->firstChildIndex != LIMB_DONE) { + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, gfx); } Matrix_Pull(); - if (limbEntry->nextLimbIndex != LIMB_DONE) - { - gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, - updateMtxFunc, appendDlistFunc, actor, gfx); + if (limbEntry->nextLimbIndex != LIMB_DONE) { + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, gfx); } return gfx; @@ -673,15 +599,13 @@ Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable // Some regalloc, and nonmatching stack usage Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, - Actor* actor, Gfx* gfx) -{ + Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; Vec3f pos; Vec3s rot; Gfx* dList; - if (limbTable == NULL) - { + if (limbTable == NULL) { osSyncPrintf("\x1b[31m"); osSyncPrintf("Si2_draw2():skelがNULLです。NULLを返します。\n"); osSyncPrintf("\x1b[m"); @@ -700,25 +624,21 @@ Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawT dList = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor, &gfx) == 0)) - { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (dList != NULL) - { + if (dList != NULL) { gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x616), G_MTX_LOAD); gSPDisplayList(gfx++, dList); } } - if (appendDlistFunc != NULL) - { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, 1, &dList, &rot, actor, &gfx); } - if (limbEntry->firstChildIndex != LIMB_DONE) - { - gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, - updateMtxFunc, appendDlistFunc, actor, gfx); + if (limbEntry->firstChildIndex != LIMB_DONE) { + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, gfx); } Matrix_Pull(); @@ -731,8 +651,7 @@ Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawT Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, - Actor* actor, Mtx** mtx, Gfx* gfx) -{ + Actor* actor, Mtx** mtx, Gfx* gfx) { SkelLimbEntry* limbEntry; Gfx* dList1; Gfx* dList2; @@ -751,39 +670,33 @@ Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab pos.z = limbEntry->translation.z; dList1 = dList2 = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList1, &pos, &rot, actor, &gfx) == 0)) - { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList1, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (dList1 != NULL) - { + if (dList1 != NULL) { Matrix_ToMtx(*mtx, "../z_skelanime.c", 0x657); gSPMatrix(gfx++, *mtx, G_MTX_LOAD); gSPDisplayList(gfx++, dList1); (*mtx)++; - } - else - { - if (dList2 != NULL) - { + } else { + if (dList2 != NULL) { Matrix_ToMtx(*mtx, "../z_skelanime.c", 0x65E); (*mtx)++; } } } - if (appendDlistFunc != 0) - { + if (appendDlistFunc != 0) { appendDlistFunc(globalCtx, limbIndex, &dList2, &rot, actor, &gfx); } - if (limbEntry->firstChildIndex != LIMB_DONE) - { - gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, mtx, gfx); + if (limbEntry->firstChildIndex != LIMB_DONE) { + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, mtx, gfx); } Matrix_Pull(); - if (limbEntry->nextLimbIndex != LIMB_DONE) - { - gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, mtx, gfx); + if (limbEntry->nextLimbIndex != LIMB_DONE) { + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, mtx, gfx); } return gfx; @@ -791,8 +704,7 @@ Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 dListCount, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, - Actor* actor, Gfx* gfx) -{ + Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; char pad[4]; Gfx* dList1; @@ -802,8 +714,7 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDra Mtx* mtx; mtx = Graph_Alloc(globalCtx->state.gfxCtx, dListCount * sizeof(*mtx)); - if (limbTable == NULL) - { + if (limbTable == NULL) { osSyncPrintf("\x1b[31m"); osSyncPrintf("Si2_draw2_SV():skelがNULLです。NULLを返します。\n"); osSyncPrintf("\x1b[m"); @@ -822,31 +733,24 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDra dList1 = dList2 = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList1, &pos, &rot, actor, &gfx) == 0)) - { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList1, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (dList1 != NULL) - { + if (dList1 != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 0x6AE); gSPMatrix(gfx++, mtx, G_MTX_LOAD); gSPDisplayList(gfx++, dList1); mtx++; - } - else - { - if (dList2 != NULL) - { + } else { + if (dList2 != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 0x6B5); mtx++; } } } - if (appendDlistFunc != NULL) - { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, 1, &dList2, &rot, actor, &gfx); } - if (limbEntry->firstChildIndex != LIMB_DONE) - { + if (limbEntry->firstChildIndex != LIMB_DONE) { gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, &mtx, gfx); } @@ -859,22 +763,19 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDra // Seems to be some kind of rotations update, somewhat large. #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A29BC.s") -s16 func_800A2DBC(u32 animationSeg) -{ +s16 func_800A2DBC(u32 animationSeg) { AnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); return animation->unk_02; } -s16 func_800A2DF4(u32 animationSeg) -{ +s16 func_800A2DF4(u32 animationSeg) { AnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); return animation->frameCount; } -s16 func_800A2E2C(u32 animationSeg) -{ +s16 func_800A2E2C(u32 animationSeg) { AnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); return (s16)(animation->frameCount - 1); @@ -883,31 +784,25 @@ s16 func_800A2E2C(u32 animationSeg) // Very large update function #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2E70.s") -void func_800A32EC(u16* arg0) -{ +void func_800A32EC(u16* arg0) { *arg0 = 0; } -void func_800A32F4(s32 arg0) -{ +void func_800A32F4(s32 arg0) { D_801600B0 *= 2; } -void func_800A3310(void* arg0) -{ +void func_800A3310(void* arg0) { u32* D_8012A480Ptr = &D_8012A480; *D_8012A480Ptr |= D_801600B0; } - -AnimationEntry* SkelAnime_NextEntry(AnimationContext* animationCtx, AnimationType type) -{ - AnimationEntry *entry; +AnimationEntry* SkelAnime_NextEntry(AnimationContext* animationCtx, AnimationType type) { + AnimationEntry* entry; s16 index = animationCtx->animationCount; - if (index >= 0x32) - { + if (index >= 0x32) { return NULL; } animationCtx->animationCount = index + 1; @@ -918,32 +813,28 @@ AnimationEntry* SkelAnime_NextEntry(AnimationContext* animationCtx, AnimationTyp /* * The next 6 functions are coordinate with the AnimationType enum -*/ + */ -void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s32 limbCount, void* ram) -{ +void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s32 limbCount, void* ram) { AnimationEntry* entry; - LinkAnimetionEntry *linkAnimetionEntry; + LinkAnimetionEntry* linkAnimetionEntry; char pad[4]; entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE0); - if (entry != NULL) - { + if (entry != NULL) { linkAnimetionEntry = SEGMENTED_TO_VIRTUAL(linkAnimetionSeg); osCreateMesgQueue(&entry->types.type0.msgQueue, &entry->types.type0.msg, 1); - DmaMgr_SendRequest2(&entry->types.type0.req, ram, LINK_ANIMETION_OFFSET(linkAnimetionEntry->animationSegAddress, ((sizeof(Vec3s) * limbCount + 2) * frame)), - sizeof(Vec3s) * limbCount + 2, 0, &entry->types.type0.msgQueue, NULL, - "../z_skelanime.c" , 0x7D4); + DmaMgr_SendRequest2( + &entry->types.type0.req, ram, + LINK_ANIMETION_OFFSET(linkAnimetionEntry->animationSegAddress, ((sizeof(Vec3s) * limbCount + 2) * frame)), + sizeof(Vec3s) * limbCount + 2, 0, &entry->types.type0.msgQueue, NULL, "../z_skelanime.c", 0x7D4); } } -void func_800A3478(GlobalContext* globalCtx, s32 vecCount, - Vec3s* dst, Vec3s* src) -{ +void func_800A3478(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src) { AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE1); - if (entry != NULL) - { + if (entry != NULL) { entry->types.type1.unk_00 = D_801600B0; entry->types.type1.vecCount = vecCount; entry->types.type1.dst = dst; @@ -951,12 +842,9 @@ void func_800A3478(GlobalContext* globalCtx, s32 vecCount, } } -void func_800A34DC(GlobalContext* globalCtx, s32 arg1, - Vec3s* arg2, Vec3s* arg3, f32 arg4) -{ +void func_800A34DC(GlobalContext* globalCtx, s32 arg1, Vec3s* arg2, Vec3s* arg3, f32 arg4) { AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE2); - if (entry != NULL) - { + if (entry != NULL) { entry->types.type2.unk_00 = D_801600B0; entry->types.type2.unk_01 = arg1; entry->types.type2.unk_04 = arg2; @@ -965,12 +853,9 @@ void func_800A34DC(GlobalContext* globalCtx, s32 arg1, } } -void func_800A3548(GlobalContext* globalCtx, s32 vecCount, - s32 dst, s32 src, s32 index) -{ +void func_800A3548(GlobalContext* globalCtx, s32 vecCount, s32 dst, s32 src, s32 index) { AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE3); - if (entry != NULL) - { + if (entry != NULL) { entry->types.type3.unk_00 = D_801600B0; entry->types.type3.vecCount = vecCount; entry->types.type3.dst = dst; @@ -979,12 +864,9 @@ void func_800A3548(GlobalContext* globalCtx, s32 vecCount, } } -void func_800A35B4(GlobalContext* globalCtx, s32 vecCount, - Vec3s* dst, Vec3s* src, u8* index) -{ +void func_800A35B4(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index) { AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE4); - if (entry != NULL) - { + if (entry != NULL) { entry->types.type4.unk_00 = D_801600B0; entry->types.type4.vecCount = vecCount; entry->types.type4.dst = dst; @@ -993,12 +875,9 @@ void func_800A35B4(GlobalContext* globalCtx, s32 vecCount, } } -void func_800A3620(GlobalContext* globalCtx, Actor* actor, - SkelAnime* skelAnime, f32 arg3) -{ - AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE5); - if (entry != NULL) - { +void func_800A3620(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3) { + AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE5); + if (entry != NULL) { entry->types.type5.actor = actor; entry->types.type5.skelAnime = skelAnime; entry->types.type5.unk_08 = arg3; @@ -1007,83 +886,64 @@ void func_800A3620(GlobalContext* globalCtx, Actor* actor, /* The next functions are callbacks to loading animations */ -void func_800A3678(GlobalContext* globalCtx, AnimationEntryType0* entry) -{ +void func_800A3678(GlobalContext* globalCtx, AnimationEntryType0* entry) { osRecvMesg(&entry->msgQueue, NULL, OS_MESG_BLOCK); } -void func_800A36A4(GlobalContext* globalCtx, AnimationEntryType1* entry) -{ +void func_800A36A4(GlobalContext* globalCtx, AnimationEntryType1* entry) { s32 i; Vec3s* dst; Vec3s* src; AnimationEntryRaw* genericEntry = (AnimationEntryRaw*)entry; - if ((genericEntry->raw[0] & D_8012A480) != 0) - { + if ((genericEntry->raw[0] & D_8012A480) != 0) { return; } - for(dst = entry->dst, src = entry->src, i = 0; - i < genericEntry->raw[1]; - i++) - { + for (dst = entry->dst, src = entry->src, i = 0; i < genericEntry->raw[1]; i++) { *dst++ = *src++; } } -void func_800A3714(GlobalContext* globalCtx, AnimationEntryType2* entry) -{ - if ((entry->unk_00 & D_8012A480) == 0) - { +void func_800A3714(GlobalContext* globalCtx, AnimationEntryType2* entry) { + if ((entry->unk_00 & D_8012A480) == 0) { func_800A2E70(entry->unk_01, entry->unk_04, entry->unk_04, entry->unk_08, entry->unk_0C); } } -void func_800A3770(GlobalContext* globalCtx, AnimationEntryType3* entry) -{ +void func_800A3770(GlobalContext* globalCtx, AnimationEntryType3* entry) { s32 i; Vec3s* dst; Vec3s* src; u8* index; AnimationEntryRaw* rawEntry = (AnimationEntryRaw*)entry; - if ((rawEntry->raw[0] & D_8012A480) == 0) - { - for(dst = entry->dst, src = entry->src, index = entry->index, i = 0; - i < rawEntry->raw[1]; i++, dst++, src++) - { - if(*index++) - { + if ((rawEntry->raw[0] & D_8012A480) == 0) { + for (dst = entry->dst, src = entry->src, index = entry->index, i = 0; i < rawEntry->raw[1]; i++, dst++, src++) { + if (*index++) { *dst = *src; } } } } -void func_800A37F0(GlobalContext* globalCtx, AnimationEntryType4* entry) -{ +void func_800A37F0(GlobalContext* globalCtx, AnimationEntryType4* entry) { s32 i; Vec3s* dst; Vec3s* src; u8* index; AnimationEntryRaw* rawEntry = (AnimationEntryRaw*)entry; - if ((rawEntry->raw[0] & D_8012A480) == 0) - { - for(dst = entry->dst, src = entry->src, index = entry->index, i = 0; - i < rawEntry->raw[1]; i++, dst++, src++) - { - if(*index++ < 1U) - { + if ((rawEntry->raw[0] & D_8012A480) == 0) { + for (dst = entry->dst, src = entry->src, index = entry->index, i = 0; i < rawEntry->raw[1]; i++, dst++, src++) { + if (*index++ < 1U) { *dst = *src; } } } } -void func_800A3874(GlobalContext* globalCtx, AnimationEntryType5* entry) -{ +void func_800A3874(GlobalContext* globalCtx, AnimationEntryType5* entry) { char pad[4]; Actor* actor = entry->actor; Vec3f pos; @@ -1094,12 +954,10 @@ void func_800A3874(GlobalContext* globalCtx, AnimationEntryType5* entry) actor->posRot.pos.z += pos.z * actor->scale.z; } -void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) -{ +void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) { AnimationEntry* entry; - for(entry = animationCtx->entries; animationCtx->animationCount != 0; entry++, animationCtx->animationCount--) - { + for (entry = animationCtx->entries; animationCtx->animationCount != 0; entry++, animationCtx->animationCount--) { D_8012A484[entry->type](globalCtx, &entry->types); } @@ -1107,11 +965,10 @@ void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) D_8012A480 = 0; } -void func_800A39AC(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeaderSeg, u32* animation, - s32 flags, Vec3s* actorDrawTbl, Vec3s* arg6, s32 limbBufCount) -{ +void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32* animation, s32 flags, + Vec3s* actorDrawTbl, Vec3s* arg6, s32 limbBufCount) { char pad[8]; - SkelAnimeLimbHeader *limbHeader; + SkelAnimeLimbHeader* limbHeader; size_t allocSize; s32 limbCount; s32 headerCount; @@ -1121,12 +978,10 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeade skelAnime->unk_34 = flags; limbCount = (flags & 2) != 0 ? headerCount : 1; - if ((flags & 1) != 0) - { + if ((flags & 1) != 0) { limbCount += headerCount; } - if ((flags & 4) != 0) - { + if ((flags & 4) != 0) { limbCount += headerCount; } @@ -1136,20 +991,15 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeade allocSize = limbCount * sizeof(Vec3s); skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); - if ((flags & 8) != 0) - { + if ((flags & 8) != 0) { allocSize += 2; } - if (actorDrawTbl == NULL) - { + if (actorDrawTbl == NULL) { skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(allocSize, "../z_skelanime.c", 2364); skelAnime->unk_24 = ZeldaArena_MallocDebug(allocSize, "../z_skelanime.c", 2365); - } - else - { - if (limbBufCount != limbCount) - { + } else { + if (limbBufCount != limbCount) { __assert("joint_buff_num == joint_num", "../z_skelanime.c", 2369); } @@ -1157,61 +1007,53 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 limbHeade skelAnime->unk_24 = (Vec3s*)ALIGN16((u32)arg6); } - if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) - { + if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) { osSyncPrintf("\x1b[31m"); - osSyncPrintf("Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); //Skeleton_Info_Rom_SV_ct Memory allocation error + osSyncPrintf( + "Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); // Skeleton_Info_Rom_SV_ct Memory allocation error osSyncPrintf("\x1b[m"); } func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, 0.0f, 0, 0.0f); } -void func_800A3B8C(SkelAnime* skelAnime) -{ - if (skelAnime->unk_01 < 2) - { +void func_800A3B8C(SkelAnime* skelAnime) { + if (skelAnime->unk_01 < 2) { skelAnime->animUpdate = &func_800A3D70; - } - else - { + } else { skelAnime->animUpdate = &func_800A3E0C; } skelAnime->unk_28 = 0.0f; } -void func_800A3BC0(GlobalContext* globalCtx, SkelAnime* skelAnime) -{ +void func_800A3BC0(GlobalContext* globalCtx, SkelAnime* skelAnime) { skelAnime->animUpdate(globalCtx, skelAnime); } -s32 func_800A3BE4(GlobalContext* globalCtx, SkelAnime* skelAnime) -{ +s32 func_800A3BE4(GlobalContext* globalCtx, SkelAnime* skelAnime) { f32 prevUnk28 = skelAnime->unk_28; f32 updateRate = R_UPDATE_RATE * 0.5f; skelAnime->unk_28 -= skelAnime->unk_2C * updateRate; - if (skelAnime->unk_28 <= 0.0f) - { + if (skelAnime->unk_28 <= 0.0f) { func_800A3B8C(skelAnime); } - func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, 1.0f - (skelAnime->unk_28 / prevUnk28)); + func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, + 1.0f - (skelAnime->unk_28 / prevUnk28)); return 0; } -void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) -{ +void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) { f32 updateRate; - func_800A336C(globalCtx, skelAnime->animCurrent, skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); - if (skelAnime->unk_28 != 0) - { + func_800A336C(globalCtx, skelAnime->animCurrent, skelAnime->animCurrentFrame, skelAnime->limbCount, + skelAnime->actorDrawTbl); + if (skelAnime->unk_28 != 0) { updateRate = R_UPDATE_RATE * 0.5f; skelAnime->unk_28 -= skelAnime->unk_2C * updateRate; - if (skelAnime->unk_28 <= 0.0f) - { + if (skelAnime->unk_28 <= 0.0f) { skelAnime->unk_28 = 0.0f; return; } @@ -1219,18 +1061,14 @@ void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) } } -s32 func_800A3D70(GlobalContext* globalCtx, SkelAnime* skelAnime) -{ +s32 func_800A3D70(GlobalContext* globalCtx, SkelAnime* skelAnime) { f32 updateRate = R_UPDATE_RATE * 0.5f; skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * updateRate; - if (skelAnime->animCurrentFrame < 0.0f) - { + if (skelAnime->animCurrentFrame < 0.0f) { skelAnime->animCurrentFrame += skelAnime->unk_14; - } - else - { - if (skelAnime->unk_14 <= skelAnime->animCurrentFrame){ + } else { + if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) { skelAnime->animCurrentFrame -= skelAnime->unk_14; } } @@ -1238,30 +1076,21 @@ s32 func_800A3D70(GlobalContext* globalCtx, SkelAnime* skelAnime) return 0; } -s32 func_800A3E0C(GlobalContext* globalCtx, SkelAnime* skelAnime) -{ +s32 func_800A3E0C(GlobalContext* globalCtx, SkelAnime* skelAnime) { f32 updateRate = R_UPDATE_RATE * 0.5f; - if (skelAnime->animCurrentFrame == skelAnime->animFrameCount) - { + if (skelAnime->animCurrentFrame == skelAnime->animFrameCount) { func_800A3C9C(globalCtx, skelAnime); return 1; } skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * updateRate; - if (0.0f < ((skelAnime->animCurrentFrame - skelAnime->animFrameCount) * skelAnime->animPlaybackSpeed)) - { + if (0.0f < ((skelAnime->animCurrentFrame - skelAnime->animFrameCount) * skelAnime->animPlaybackSpeed)) { skelAnime->animCurrentFrame = skelAnime->animFrameCount; - } - else - { - if (skelAnime->animCurrentFrame < 0.0f) - { + } else { + if (skelAnime->animCurrentFrame < 0.0f) { skelAnime->animCurrentFrame += skelAnime->unk_14; - } - else - { - if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) - { + } else { + if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) { skelAnime->animCurrentFrame -= skelAnime->unk_14; } } @@ -1270,40 +1099,30 @@ s32 func_800A3E0C(GlobalContext* globalCtx, SkelAnime* skelAnime) return 0; } - -void func_800A3EE8(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) -{ +void func_800A3EE8(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) { skelAnime->unk_28 = 1.0f; skelAnime->unk_2C = 1.0f / arg2; } #ifdef NON_MATCHING -void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animation, f32 playbackSpeed, - f32 arg4, f32 frameCount, u8 arg6, f32 arg7) -{ +void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animation, f32 playbackSpeed, f32 arg4, + f32 frameCount, u8 arg6, f32 arg7) { skelAnime->unk_01 = arg6; - if ((arg7 != 0.0f) && - ((animation == skelAnime->animCurrent) || (arg4 != skelAnime->animCurrentFrame))) - { - if(arg7 < 0.0f) - { + if ((arg7 != 0.0f) && ((animation == skelAnime->animCurrent) || (arg4 != skelAnime->animCurrentFrame))) { + if (arg7 < 0.0f) { func_800A3B8C(skelAnime); SkelAnime_CopyVec3s(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); arg7 = -arg7; - } - else - { + } else { skelAnime->animUpdate = &func_800A3BE4; - func_800A336C(globalCtx, animation, (s32) arg4, skelAnime->limbCount, skelAnime->unk_24); + func_800A336C(globalCtx, animation, (s32)arg4, skelAnime->limbCount, skelAnime->unk_24); } skelAnime->unk_28 = 1.0f; skelAnime->unk_2C = 1.0f / arg7; - } - else - { + } else { func_800A3B8C(skelAnime); - func_800A336C(globalCtx, animation, (s32) arg4, skelAnime->limbCount, skelAnime->actorDrawTbl); + func_800A336C(globalCtx, animation, (s32)arg4, skelAnime->limbCount, skelAnime->actorDrawTbl); skelAnime->unk_28 = 0.0f; } @@ -1318,54 +1137,46 @@ void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animatio #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3F08.s") #endif -void func_800A407C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) -{ - func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 2, 0.0f); +void func_800A407C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) { + func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 2, 0.0f); } -void func_800A40DC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) -{ - func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 2, 0.0f); +void func_800A40DC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { + func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 2, + 0.0f); } -void func_800A4140(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) -{ - func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); +void func_800A4140(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) { + func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 0, 0.0f); } -void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) -{ - func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 0, 0.0f); +void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { + func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 0, + 0.0f); } -void func_800A41FC(GlobalContext* globalCtx, SkelAnime* skelAnime) -{ +void func_800A41FC(GlobalContext* globalCtx, SkelAnime* skelAnime) { func_800A3478(globalCtx, skelAnime->limbCount, skelAnime->unk_24, skelAnime->actorDrawTbl); } -void func_800A422C(GlobalContext* globalCtx, SkelAnime* skelAnime) -{ +void func_800A422C(GlobalContext* globalCtx, SkelAnime* skelAnime) { func_800A3478(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24); } -void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 frame) -{ +void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 frame) { func_800A336C(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); } -void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 frame) -{ +void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 frame) { func_800A336C(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); } -void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) -{ +void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) { func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, arg2); } -void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animationSeg, - f32 frame, s32 arg4, f32 arg5, f32 arg6, s32 arg7) -{ +void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animationSeg, f32 frame, s32 arg4, f32 arg5, + f32 arg6, s32 arg7) { s32 alignedAddr; func_800A336C(globalCtx, animationSeg, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); @@ -1375,9 +1186,8 @@ void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, alignedAddr, arg6); } -void func_800A43B8(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 animation, - f32 frame, s32 arg4, f32 arg5, f32 arg6, s32 arg7) -{ +void func_800A43B8(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 frame, s32 arg4, f32 arg5, + f32 arg6, s32 arg7) { s32 alignedAddr; func_800A336C(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); @@ -1388,177 +1198,149 @@ void func_800A43B8(GlobalContext* globalCtx, SkelAnime *skelAnime, u32 animation func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->unk_24, alignedAddr, arg6); } -void func_800A4454(SkelAnime* skelAnime) -{ +void func_800A4454(SkelAnime* skelAnime) { skelAnime->unk_01 = 2; func_800A3B8C(skelAnime); } -s32 func_800A4478(SkelAnime* skelAnime, f32 arg1, f32 updateRate) -{ +s32 func_800A4478(SkelAnime* skelAnime, f32 arg1, f32 updateRate) { f32 updateSpeed; f32 temp_f12; f32 nextFrame; updateSpeed = skelAnime->animPlaybackSpeed * updateRate; nextFrame = skelAnime->animCurrentFrame - updateSpeed; - if (nextFrame < 0.0f) - { + if (nextFrame < 0.0f) { nextFrame += skelAnime->unk_14; - } - else - { - if (skelAnime->unk_14 <= nextFrame) - { + } else { + if (skelAnime->unk_14 <= nextFrame) { nextFrame -= skelAnime->unk_14; } } - if (arg1 == 0.0f) - { - if (0.0f < updateSpeed) - { + if (arg1 == 0.0f) { + if (0.0f < updateSpeed) { arg1 = skelAnime->unk_14; } } temp_f12 = (nextFrame + updateSpeed) - arg1; - if (0.0f <= (temp_f12 * updateSpeed)) - { - if (((temp_f12 - updateSpeed) * updateSpeed) < 0.0f) - { + if (0.0f <= (temp_f12 * updateSpeed)) { + if (((temp_f12 - updateSpeed) * updateSpeed) < 0.0f) { return 1; } } return 0; } -s32 func_800A4530(SkelAnime* skelAnime, f32 arg1) -{ +s32 func_800A4530(SkelAnime* skelAnime, f32 arg1) { f32 updateRate = R_UPDATE_RATE * 0.5f; return func_800A4478(skelAnime, arg1, updateRate); } -void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, - u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) -{ +void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32 animation, + Vec3s* actorDrawTable, s32 arg5, s32 limbCount) { SkelAnimeLimbHeader* limbHeader; limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); skelAnime->limbCount = limbHeader->limbCount + 1; skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); - if (actorDrawTable == NULL) - { - skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 2968); - skelAnime->unk_24 = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 2969); - } - else - { - if (limbCount != skelAnime->limbCount) - { + if (actorDrawTable == NULL) { + skelAnime->actorDrawTbl = + ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 2968); + skelAnime->unk_24 = + ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 2969); + } else { + if (limbCount != skelAnime->limbCount) { __assert("joint_buff_num == this->joint_num", "../z_skelanime.c", 2973); } skelAnime->actorDrawTbl = actorDrawTable; skelAnime->unk_24 = arg5; } - if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) - { + if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) { osSyncPrintf("\x1b[31m"); osSyncPrintf("Skeleton_Info2_ct メモリアロケーションエラー\n"); // Skeleton_Info2_ct memory allocation error osSyncPrintf("\x1b[m"); } - if (animation != 0) - { + if (animation != 0) { SkelAnime_ChangeAnimationDefault(skelAnime, animation); } } -void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, - u32 animation, Vec3s* actorDrawTable, s32 arg5, s32 limbCount) -{ - SkelAnimeLimbHeader *limbHeader; +void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32 animation, + Vec3s* actorDrawTable, s32 arg5, s32 limbCount) { + SkelAnimeLimbHeader* limbHeader; limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); skelAnime->limbCount = limbHeader->limbCount + 1; skelAnime->dListCount = limbHeader->dListCount; skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); - if (actorDrawTable == NULL) - { - skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), - "../z_skelanime.c", 3047); + if (actorDrawTable == NULL) { + skelAnime->actorDrawTbl = + ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 3047); - skelAnime->unk_24 = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), - "../z_skelanime.c", 3048); - } - else - { - if (limbCount != skelAnime->limbCount) - { + skelAnime->unk_24 = + ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 3048); + } else { + if (limbCount != skelAnime->limbCount) { __assert("joint_buff_num == this->joint_num", "../z_skelanime.c", 0xBEC); } skelAnime->actorDrawTbl = actorDrawTable; skelAnime->unk_24 = arg5; } - if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) - { + if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) { osSyncPrintf("\x1b[31m"); - osSyncPrintf("Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); // Skeleton_Info_Rom_SV_ct Memory allocation error + osSyncPrintf( + "Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); // Skeleton_Info_Rom_SV_ct Memory allocation error osSyncPrintf("\x1b[m"); } - if (animation != 0) - { + if (animation != 0) { SkelAnime_ChangeAnimationDefault(skelAnime, animation); } } -void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime *skelAnime, - u32 limbHeaderSeg, u32 animation) -{ - SkelAnimeLimbHeader *limbHeader; +void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32 animation) { + SkelAnimeLimbHeader* limbHeader; limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); skelAnime->limbCount = limbHeader->limbCount + 1; skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); - skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 3120); - skelAnime->unk_24 = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 3121); - if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) - { + skelAnime->actorDrawTbl = + ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 3120); + skelAnime->unk_24 = + ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 3121); + if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) { osSyncPrintf("\x1b[31m"); - osSyncPrintf("Skeleton_Info2_skin2_ct メモリアロケーションエラー\n"); //Skeleton_Info2_skin2_ct Memory allocation error + osSyncPrintf( + "Skeleton_Info2_skin2_ct メモリアロケーションエラー\n"); // Skeleton_Info2_skin2_ct Memory allocation error osSyncPrintf("\x1b[m"); } - if (animation != 0) - { + if (animation != 0) { SkelAnime_ChangeAnimationDefault(skelAnime, animation); } } -void func_800A49B0(SkelAnime* skelAnime) -{ - if (skelAnime->unk_01 < 2) - { +void func_800A49B0(SkelAnime* skelAnime) { + if (skelAnime->unk_01 < 2) { skelAnime->animUpdate = &func_800A4D9C; return; } - if (skelAnime->unk_01 < 4) - { + if (skelAnime->unk_01 < 4) { skelAnime->animUpdate = &func_800A4EE0; return; } skelAnime->animUpdate = &func_800A4E38; } - -s32 SkelAnime_FrameUpdateMatrix(SkelAnime* skelAnime){ +s32 SkelAnime_FrameUpdateMatrix(SkelAnime* skelAnime) { return skelAnime->animUpdate(skelAnime); } #ifdef NON_MATCHING -s32 func_800A4A20(SkelAnime* skelAnime) -{ +s32 func_800A4A20(SkelAnime* skelAnime) { f32 sp2C; f32 temp_f12; f32 phi_f0; @@ -1566,14 +1348,14 @@ s32 func_800A4A20(SkelAnime* skelAnime) temp_f12 = skelAnime->unk_28; skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.33333334f); phi_f0 = skelAnime->unk_28; - if (skelAnime->unk_28 <= 0.0f) - { + if (skelAnime->unk_28 <= 0.0f) { sp2C = temp_f12; func_800A49B0(skelAnime); skelAnime->unk_28 = 0.0f; phi_f0 = skelAnime->unk_28; } - func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, skelAnime->unk_24, 1.0f - (phi_f0 / temp_f12)); + func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, skelAnime->unk_24, + 1.0f - (phi_f0 / temp_f12)); return 0; } #else @@ -1581,8 +1363,7 @@ s32 func_800A4A20(SkelAnime* skelAnime) #endif #ifdef NON_MATCHING -s32 func_800A4AD8(SkelAnime* skelAnime) -{ +s32 func_800A4AD8(SkelAnime* skelAnime) { f32 sp28; s16 temp_a1; s16 temp_a2; @@ -1590,31 +1371,25 @@ s32 func_800A4AD8(SkelAnime* skelAnime) temp_a2 = (s16)(skelAnime->unk_28 * 16384.0f); skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.33333334f); - if (skelAnime->unk_28 <= 0.0f) - { + if (skelAnime->unk_28 <= 0.0f) { func_800A49B0(skelAnime); skelAnime->unk_28 = 0.0f; } temp_a1 = (s16)(skelAnime->unk_28 * 16384.0f); - if (skelAnime->unk_03 < 0) - { + if (skelAnime->unk_03 < 0) { sp28 = 1.0f - Math_Coss(temp_a2); phi_f2 = 1.0f - Math_Coss(temp_a1); - } - else - { + } else { sp28 = Math_Sins(temp_a2); phi_f2 = Math_Sins(temp_a1); } - if (phi_f2 != 0.0f) - { + if (phi_f2 != 0.0f) { phi_f2 /= sp28; - } - else - { + } else { phi_f2 = 0.0f; } - func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, skelAnime->unk_24, 1.0f - phi_f2); + func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, skelAnime->unk_24, + 1.0f - phi_f2); return 0; } #else @@ -1622,8 +1397,7 @@ s32 func_800A4AD8(SkelAnime* skelAnime) #endif #ifdef NON_MATCHING -void func_800A4C58(SkelAnime* skelAnime) -{ +void func_800A4C58(SkelAnime* skelAnime) { char pad[6]; f32 temp_f0; f32 temp_f10; @@ -1631,30 +1405,28 @@ void func_800A4C58(SkelAnime* skelAnime) s32 temp_f8; f32 temp_f2; - SkelAnime_AnimateFrame(skelAnime->animCurrent, (s32) skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); - if ((skelAnime->unk_01 & 1) != 0) - { - temp_f8 = (s32) skelAnime->animCurrentFrame; + SkelAnime_AnimateFrame(skelAnime->animCurrent, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, + skelAnime->actorDrawTbl); + if ((skelAnime->unk_01 & 1) != 0) { + temp_f8 = (s32)skelAnime->animCurrentFrame; temp_f10 = temp_f8; temp_f8++; temp_f2 = skelAnime->animCurrentFrame - temp_f10; - if (temp_f8 >= (s32) skelAnime->unk_14) - { + if (temp_f8 >= (s32)skelAnime->unk_14) { temp_f8 = 0; } SkelAnime_AnimateFrame(skelAnime->animCurrent, temp_f8, skelAnime->limbCount, sp38); func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, sp38, temp_f2); } - if (skelAnime->unk_28 != 0) - { + if (skelAnime->unk_28 != 0) { skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.33333334f); temp_f0 = skelAnime->unk_28; - if (temp_f0 <= 0.0f) - { + if (temp_f0 <= 0.0f) { skelAnime->unk_28 = 0.0f; return; } - func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, skelAnime->unk_24, skelAnime->unk_28); + func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, skelAnime->unk_24, + skelAnime->unk_28); } } #else @@ -1663,15 +1435,11 @@ void func_800A4C58(SkelAnime* skelAnime) #undef NON_MATCHING #ifdef NON_MATCHING -s32 func_800A4D9C(SkelAnime* skelAnime) -{ +s32 func_800A4D9C(SkelAnime* skelAnime) { skelAnime->animCurrentFrame += (R_UPDATE_RATE * 0.33333334f) + skelAnime->animPlaybackSpeed; - if (skelAnime->animCurrentFrame < 0.0f) - { + if (skelAnime->animCurrentFrame < 0.0f) { skelAnime->animCurrentFrame += skelAnime->unk_14; - } - else if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) - { + } else if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) { skelAnime->animCurrentFrame -= skelAnime->unk_14; } func_800A4C58(skelAnime); @@ -1683,17 +1451,12 @@ s32 func_800A4D9C(SkelAnime* skelAnime) #undef NON_MATCHING #ifdef NON_MATCHING -s32 func_800A4E38(SkelAnime* skelAnime) -{ +s32 func_800A4E38(SkelAnime* skelAnime) { skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * (R_UPDATE_RATE * 0.33333334f); - if (skelAnime->animCurrentFrame < skelAnime->unk_0C) - { + if (skelAnime->animCurrentFrame < skelAnime->unk_0C) { skelAnime->animCurrentFrame = (skelAnime->animCurrentFrame - skelAnime->unk_0C) + skelAnime->animFrameCount; - } - else - { - if (skelAnime->animFrameCount <= skelAnime->animCurrentFrame) - { + } else { + if (skelAnime->animFrameCount <= skelAnime->animCurrentFrame) { skelAnime->animCurrentFrame = (skelAnime->animCurrentFrame - skelAnime->animFrameCount) + skelAnime->unk_0C; } } @@ -1705,33 +1468,25 @@ s32 func_800A4E38(SkelAnime* skelAnime) #endif #undef NON_MATCHING -s32 func_800A4EE0(SkelAnime *skelAnime) -{ +s32 func_800A4EE0(SkelAnime* skelAnime) { f32 temp_f14; - temp_f14 = (f32) R_UPDATE_RATE * 0.33333334f; - if (skelAnime->animCurrentFrame == skelAnime->animFrameCount) - { + temp_f14 = (f32)R_UPDATE_RATE * 0.33333334f; + if (skelAnime->animCurrentFrame == skelAnime->animFrameCount) { - SkelAnime_AnimateFrame(skelAnime->animCurrent, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_AnimateFrame(skelAnime->animCurrent, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, + skelAnime->actorDrawTbl); func_800A4C58(skelAnime); return 1; } skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * temp_f14; - if (0.0f < ((skelAnime->animCurrentFrame - skelAnime->animFrameCount) * skelAnime->animPlaybackSpeed)) - { + if (0.0f < ((skelAnime->animCurrentFrame - skelAnime->animFrameCount) * skelAnime->animPlaybackSpeed)) { skelAnime->animCurrentFrame = skelAnime->animFrameCount; - } - else - { - if (skelAnime->animCurrentFrame < 0.0f) - { + } else { + if (skelAnime->animCurrentFrame < 0.0f) { skelAnime->animCurrentFrame += skelAnime->unk_14; - } - else - { - if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) - { + } else { + if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) { skelAnime->animCurrentFrame -= skelAnime->unk_14; } } @@ -1741,37 +1496,26 @@ s32 func_800A4EE0(SkelAnime *skelAnime) } #ifdef NON_MATCHING -void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, - f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2) -{ +void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount, + u8 unk1, f32 transitionRate, s8 unk2) { skelAnime->unk_01 = unk1; - if ((transitionRate != 0.0f) && - ((animation != skelAnime->animCurrent) || (unk0 != skelAnime->animCurrentFrame))) - { - if (transitionRate < 0.0f) - { + if ((transitionRate != 0.0f) && ((animation != skelAnime->animCurrent) || (unk0 != skelAnime->animCurrentFrame))) { + if (transitionRate < 0.0f) { func_800A49B0(skelAnime); SkelAnime_CopyVec3s(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); transitionRate = -transitionRate; - } - else - { - if (unk2 != 0) - { + } else { + if (unk2 != 0) { skelAnime->mtxUpdate = (void*)&func_800A4AD8; skelAnime->unk_03 = unk2; - } - else - { + } else { skelAnime->mtxUpdate = (void*)&func_800A4A20; } SkelAnime_AnimateFrame(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); } skelAnime->unk_28 = 1.0f; skelAnime->unk_2C = 1.0f / transitionRate; - } - else - { + } else { func_800A49B0(skelAnime); SkelAnime_AnimateFrame(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); skelAnime->unk_28 = 0.0f; @@ -1780,16 +1524,12 @@ void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32 animation, f32 play skelAnime->animCurrent = animation; skelAnime->unk_0C = unk0; skelAnime->animFrameCount = frameCount; - skelAnime->unk_14 = (f32) func_800A1FC8(animation); - if (skelAnime->unk_01 >= 4) - { + skelAnime->unk_14 = (f32)func_800A1FC8(animation); + if (skelAnime->unk_01 >= 4) { skelAnime->animCurrentFrame = 0.0f; - } - else - { + } else { skelAnime->animCurrentFrame = unk0; - if (skelAnime->unk_01 < 2) - { + if (skelAnime->unk_01 < 2) { skelAnime->animFrameCount = skelAnime->unk_14 - 1.0f; } } @@ -1800,46 +1540,39 @@ void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32 animation, f32 play #endif #undef NON_MATCHING -void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, - f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate) -{ +void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount, + u8 unk1, f32 transitionRate) { SkelAnime_ChangeAnimationImpl(skelAnime, animation, playbackSpeed, unk0, frameCount, unk1, transitionRate, 0); } -void func_800A51E8(SkelAnime* skelAnime, u32 animation) -{ +void func_800A51E8(SkelAnime* skelAnime, u32 animation) { SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 2, 0.0f); } -void func_800A5240(SkelAnime* skelAnime, u32 animation, f32 transitionRate) -{ - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0, - (f32)SkelAnime_GetFrameCount(animation), 2, transitionRate); +void func_800A5240(SkelAnime* skelAnime, u32 animation, f32 transitionRate) { + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0, (f32)SkelAnime_GetFrameCount(animation), 2, + transitionRate); } -void func_800A529C(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) -{ - SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, - (f32)SkelAnime_GetFrameCount(animation), 2, 0.0f); +void func_800A529C(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { + SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 2, + 0.0f); } -void SkelAnime_ChangeAnimationDefault(SkelAnime* skelAnime, u32 animation) -{ - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); +void SkelAnime_ChangeAnimationDefault(SkelAnime* skelAnime, u32 animation) { + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 0, 0.0f); } -void SkelAnime_ChangeAnimationTransitionRate(SkelAnime* skelAnime, u32 animation, f32 transitionRate) -{ +void SkelAnime_ChangeAnimationTransitionRate(SkelAnime* skelAnime, u32 animation, f32 transitionRate) { SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, 0.0f, 0, transitionRate); } -void SkelAnime_ChangeAnimationPlaybackSpeed(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) -{ - SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, (f32) SkelAnime_GetFrameCount(animation), 0, 0.0f); +void SkelAnime_ChangeAnimationPlaybackSpeed(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { + SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 0, + 0.0f); } -void func_800A53DC(SkelAnime* skelAnime) -{ +void func_800A53DC(SkelAnime* skelAnime) { skelAnime->unk_01 = 2; skelAnime->animFrameCount = skelAnime->unk_14; func_800A49B0(skelAnime); @@ -1847,8 +1580,7 @@ void func_800A53DC(SkelAnime* skelAnime) #ifdef NON_MATCHING // regalloc -void func_800A5408(SkelAnime* skelAnime) -{ +void func_800A5408(SkelAnime* skelAnime) { f32 animPlaybackSpeed = skelAnime->animPlaybackSpeed; f32 unk_C = skelAnime->unk_0C; f32 frameCount = skelAnime->animFrameCount; @@ -1861,43 +1593,34 @@ void func_800A5408(SkelAnime* skelAnime) #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A5408.s") #endif -void func_800A5428(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* index) -{ +void func_800A5428(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* index) { s32 i; - for(i = 0; i < skelAnime->limbCount; i++, dst++, src++) - { - if(*index++) - { + for (i = 0; i < skelAnime->limbCount; i++, dst++, src++) { + if (*index++) { *dst = *src; } } } -void func_800A5490(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* arg3) -{ +void func_800A5490(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* arg3) { s32 i; - for(i = 0;i < skelAnime->limbCount; i++, dst++, src++) - { - if(*arg3++ < 1U){ + for (i = 0; i < skelAnime->limbCount; i++, dst++, src++) { + if (*arg3++ < 1U) { *dst = *src; } } } -void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) -{ +void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) { f32 x; f32 z; f32 sin; f32 cos; - if((skelAnime->unk_35 & 0x10) != 0) - { + if ((skelAnime->unk_35 & 0x10) != 0) { pos->z = 0.0f; pos->x = 0.0f; - } - else - { + } else { x = (f32)skelAnime->actorDrawTbl->x; z = (f32)skelAnime->actorDrawTbl->z; sin = Math_Sins(angle); @@ -1917,55 +1640,41 @@ void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) skelAnime->actorDrawTbl->x = skelAnime->unk_3E; skelAnime->unk_3C = skelAnime->actorDrawTbl->z; skelAnime->actorDrawTbl->z = skelAnime->unk_42; - if((skelAnime->unk_35 & 2) != 0) - { - if((skelAnime->unk_35 & 0x10) != 0) - { + if ((skelAnime->unk_35 & 2) != 0) { + if ((skelAnime->unk_35 & 0x10) != 0) { pos->y = 0.0f; - } - else - { + } else { pos->y = (f32)(skelAnime->actorDrawTbl->y - skelAnime->unk_3A); } skelAnime->unk_3A = skelAnime->actorDrawTbl->y; skelAnime->actorDrawTbl->y = skelAnime->unk_40; - } - else - { + } else { pos->y = 0.0f; skelAnime->unk_3A = skelAnime->actorDrawTbl->y; } skelAnime->unk_35 &= ~0x10; } -s32 func_800A56C8(SkelAnime *skelAnime, f32 arg1) -{ +s32 func_800A56C8(SkelAnime* skelAnime, f32 arg1) { return func_800A4478(skelAnime, arg1, 1.0f); } -void SkelAnime_Free(SkelAnime *skelAnime, GlobalContext* globalCtx) -{ - if (skelAnime->actorDrawTbl != NULL) - { +void SkelAnime_Free(SkelAnime* skelAnime, GlobalContext* globalCtx) { + if (skelAnime->actorDrawTbl != NULL) { ZeldaArena_FreeDebug(skelAnime->actorDrawTbl, "../z_skelanime.c", 3729); - } - else - { + } else { osSyncPrintf("now_joint あきまへん!!\n"); // now_joint Akimane! ! } - if (skelAnime->unk_24 != NULL) - { + if (skelAnime->unk_24 != NULL) { ZeldaArena_FreeDebug(skelAnime->unk_24, "../z_skelanime.c", 3731); return; } osSyncPrintf("morf_joint あきまへん!!\n"); // "morf_joint Akimane !!" } -void SkelAnime_CopyVec3s(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src) -{ +void SkelAnime_CopyVec3s(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src) { s32 i; - for(i = 0; i < skelAnime->limbCount; i++) - { + for (i = 0; i < skelAnime->limbCount; i++) { *dst++ = *src++; } } diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index f4cd5301e..318d74e3c 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -344,7 +344,7 @@ void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9)); SkelAnime_DrawSV(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL, - &this->actor); + &this->actor); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_go.c", 746); } diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index 8c818f41c..d3839913f 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -480,6 +480,6 @@ static void EnDog_Draw(EnDog* this, GlobalContext* globalCtx) { colors[this->actor.params & 0xF].b, colors[this->actor.params & 0xF].a); SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, - EnDog_Callback1, EnDog_Callback2, &this->actor); + EnDog_Callback1, EnDog_Callback2, &this->actor); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_en_dog.c", 994); } diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index af7284e09..ea57b9ecf 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -87,7 +87,7 @@ static void EnMs_Init(EnMs* this, GlobalContext* globalCtx) { } Actor_ProcessInitChain(&this->actor, initChain); SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06003DC0, &D_060005EC, &this->unkSkelAnimeStruct, &this->unk_1C6, - 9); // skelanime_mtx_init + 9); // skelanime_mtx_init ActorCollider_AllocCylinder(globalCtx, &this->collider); func_8005C450(globalCtx, &this->collider, this, &unk_col_80AB0320); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 35.0f); @@ -191,6 +191,6 @@ static void EnMs_Update(EnMs* this, GlobalContext* globalCtx) { void EnMs_Draw(EnMs* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0, 0, - &this->actor); + SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0, + 0, &this->actor); } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 44369bbe6..7dd4f8da3 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -770,7 +770,7 @@ void EnTk_Draw(EnTk* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(eyeImages[thisAgain->eyeImageIdx])); SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.limbIndex, thisAgain->skelAnim.actorDrawTbl, - thisAgain->skelAnim.dListCount, func_80B1D278, func_80B1D2E4, &thisAgain->actor); + thisAgain->skelAnim.dListCount, func_80B1D278, func_80B1D2E4, &thisAgain->actor); func_800C6B54(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1312); } diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index c90558f89..521d74241 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -95,7 +95,7 @@ static void EnWallmas_Init(EnWallmas* this, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->actor, initChain); ActorShape_Init(&this->actor.shape, 0, NULL, 0.5f); SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06008FB0, &D_06009DB0, &this->unkSkelAnimeStruct, &this->unk_22e, - 0x19); + 0x19); ActorCollider_AllocCylinder(globalCtx, &this->colCylinder); ActorCollider_InitCylinder(globalCtx, &this->colCylinder, &this->actor, &colCylinderInit); @@ -631,7 +631,7 @@ static void EnWallmas_Draw(EnWallmas* this, GlobalContext* globalCtx) { if (this->actionFunc != (ActorFunc)&EnWallmas_WaitToDrop) { func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, - &EnWallMas_UpdatePos, &EnWallmas_DrawOpa, &this->actor); + &EnWallMas_UpdatePos, &EnWallmas_DrawOpa, &this->actor); } EnWallmas_DrawXlu(this, globalCtx); -- cgit v1.2.3 From f2c65d615b287aca85a4225edc4103aefc675d36 Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Tue, 24 Mar 2020 13:06:15 -0500 Subject: fix jenkins build errors, small prototype update --- src/code/z_skelanime.c | 97 ++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 51 deletions(-) (limited to 'src') diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index 7001c8fca..5a3b261f0 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -1,5 +1,6 @@ #include #include +#include s32 func_800A3D70(GlobalContext*, SkelAnime*); s32 func_800A3E0C(GlobalContext*, SkelAnime*); @@ -52,7 +53,7 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab if (dList != NULL) { do { if (1) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x325), + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 805), G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList); @@ -77,7 +78,7 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab appendDlistFunc, actor, dListIndex); } - func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x335); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 821); } void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTable, @@ -92,13 +93,13 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra Gfx* gfx[4]; if (limbIndex == NULL) { - osSyncPrintf("\x1b[31m"); + osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_Lod_draw():skelがNULLです。\n"); - osSyncPrintf("\x1b[m"); + osSyncPrintf(VT_RST); return; } gfxCtx = globalCtx->state.gfxCtx; - func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x351); + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 849); Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(*limbIndex); @@ -112,7 +113,7 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x371), + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 881), G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList); @@ -128,7 +129,7 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra } Matrix_Pull(); - func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x37E); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 894); } #ifdef NON_MATCHING @@ -207,9 +208,9 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorD } while (0); if (limbTable == NULL) { - osSyncPrintf("\x1b[31m"); + osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_Lod_draw_SV():skelがNULLです。\n"); - osSyncPrintf("\x1b[m"); + osSyncPrintf(VT_RST); return; } gfxCtx = globalCtx->state.gfxCtx; @@ -270,7 +271,7 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, gfxCtx = globalCtx->state.gfxCtx; - func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x434); + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1076); Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); @@ -324,9 +325,9 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa Gfx* gfx[4]; if (limbTable == NULL) { - osSyncPrintf("\x1b[31m"); + osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_draw():skelがNULLです。\n"); // Si2_draw (): skel is NULL. - osSyncPrintf("\x1b[m"); + osSyncPrintf(VT_RST); return; } @@ -378,29 +379,28 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, u32 limbIndex, u32* limbTabl SkelLimbEntry* limbEntry; gfxCtx = globalCtx->state.gfxCtx; - func_800C6AC4(sp34, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x4BE); + func_800C6AC4(sp34, globalCtx->state.gfxCtx, "../z_skelanime.c", 1214); Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); limbRot = actorDrawTable[++limbIndex]; - limbPos.x = (f32)limbEntry->pos.x; - limbPos.y = (f32)limbEntry->pos.y; - limbPos.z = (f32)limbEntry->pos.z; + limbPos.x = (f32)limbEntry->translation.x; + limbPos.y = (f32)limbEntry->translation.y; + limbPos.z = (f32)limbEntry->translation.z; - limbDlist[0] = limbEntry->dList; - limbDlist[1] = limbEntry->dList; + limbDlist[0] = limbDlist[1] = limbEntry->displayLists[0]; if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &limbDlist[0], &limbPos, &limbRot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&limbPos, &limbRot); if (limbDlist[0] != NULL) { - Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 0x4DA); + Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1242); gSPMatrix(gfxCtx->polyOpa.p++, *limbMatricies, G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, &limbDlist[0]); (*limbMatricies)++; } else { if (&limbDlist[1] != 0) { - Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 0x4E1); + Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1249); (*limbMatricies)++; } } @@ -422,7 +422,7 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, u32 limbIndex, u32* limbTabl appendDlistFunc, actor, limbMatricies); } - func_800C6B54(sp34, globalCtx->state.gfxCtx, "../z_skelanime.c", 0x4F1); + func_800C6B54(sp34, globalCtx->state.gfxCtx, "../z_skelanime.c", 1265); } #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_DrawLimbSV.s") @@ -443,9 +443,9 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDraw limbMatricies = Graph_Alloc(globalCtx->state.gfxCtx, dListCount << 6); if (limbTable == NULL) { - osSyncPrintf("\x1b[31m"); + osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_draw_SV():skelがNULLです。\n"); // Si2_draw_SV (): skel is NULL. - osSyncPrintf("\x1b[m"); + osSyncPrintf(VT_RST); return; } @@ -463,7 +463,7 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDraw rot = actorDrawTable[1]; - skelDlist[0] = skelDlist[1] = rootLimb->dList; + skelDlist[0] = skelDlist[1] = rootLimb->displayLists[0]; if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &skelDlist[0], &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); @@ -495,7 +495,6 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDraw #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_DrawSV.s") #endif -#undef NON_MATCHING /* * Copies the rotation values from the rotation value table, indexed by the rotation index table @@ -571,7 +570,7 @@ Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { - gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x5D1), G_MTX_LOAD); + gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1489), G_MTX_LOAD); gSPDisplayList(gfx++, dList); } } @@ -606,9 +605,9 @@ Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawT Gfx* dList; if (limbTable == NULL) { - osSyncPrintf("\x1b[31m"); + osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_draw2():skelがNULLです。NULLを返します。\n"); - osSyncPrintf("\x1b[m"); + osSyncPrintf(VT_RST); return NULL; } @@ -627,7 +626,7 @@ Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawT if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { - gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 0x616), G_MTX_LOAD); + gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1558), G_MTX_LOAD); gSPDisplayList(gfx++, dList); } } @@ -673,13 +672,13 @@ Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList1, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList1 != NULL) { - Matrix_ToMtx(*mtx, "../z_skelanime.c", 0x657); + Matrix_ToMtx(*mtx, "../z_skelanime.c", 1623); gSPMatrix(gfx++, *mtx, G_MTX_LOAD); gSPDisplayList(gfx++, dList1); (*mtx)++; } else { if (dList2 != NULL) { - Matrix_ToMtx(*mtx, "../z_skelanime.c", 0x65E); + Matrix_ToMtx(*mtx, "../z_skelanime.c", 1630); (*mtx)++; } } @@ -715,9 +714,9 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDra mtx = Graph_Alloc(globalCtx->state.gfxCtx, dListCount * sizeof(*mtx)); if (limbTable == NULL) { - osSyncPrintf("\x1b[31m"); + osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_draw2_SV():skelがNULLです。NULLを返します。\n"); - osSyncPrintf("\x1b[m"); + osSyncPrintf(VT_RST); return NULL; } @@ -736,13 +735,13 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDra if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList1, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList1 != NULL) { - Matrix_ToMtx(mtx, "../z_skelanime.c", 0x6AE); + Matrix_ToMtx(mtx, "../z_skelanime.c", 1710); gSPMatrix(gfx++, mtx, G_MTX_LOAD); gSPDisplayList(gfx++, dList1); mtx++; } else { if (dList2 != NULL) { - Matrix_ToMtx(mtx, "../z_skelanime.c", 0x6B5); + Matrix_ToMtx(mtx, "../z_skelanime.c", 1717); mtx++; } } @@ -828,7 +827,7 @@ void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s3 DmaMgr_SendRequest2( &entry->types.type0.req, ram, LINK_ANIMETION_OFFSET(linkAnimetionEntry->animationSegAddress, ((sizeof(Vec3s) * limbCount + 2) * frame)), - sizeof(Vec3s) * limbCount + 2, 0, &entry->types.type0.msgQueue, NULL, "../z_skelanime.c", 0x7D4); + sizeof(Vec3s) * limbCount + 2, 0, &entry->types.type0.msgQueue, NULL, "../z_skelanime.c", 2004); } } @@ -1008,10 +1007,10 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeade } if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) { - osSyncPrintf("\x1b[31m"); + osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf( "Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); // Skeleton_Info_Rom_SV_ct Memory allocation error - osSyncPrintf("\x1b[m"); + osSyncPrintf(VT_RST); } func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, 0.0f, 0, 0.0f); @@ -1257,9 +1256,9 @@ void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHead skelAnime->unk_24 = arg5; } if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) { - osSyncPrintf("\x1b[31m"); + osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Skeleton_Info2_ct メモリアロケーションエラー\n"); // Skeleton_Info2_ct memory allocation error - osSyncPrintf("\x1b[m"); + osSyncPrintf(VT_RST); } if (animation != 0) { @@ -1284,16 +1283,16 @@ void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHe ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 3048); } else { if (limbCount != skelAnime->limbCount) { - __assert("joint_buff_num == this->joint_num", "../z_skelanime.c", 0xBEC); + __assert("joint_buff_num == this->joint_num", "../z_skelanime.c", 3052); } skelAnime->actorDrawTbl = actorDrawTable; skelAnime->unk_24 = arg5; } if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) { - osSyncPrintf("\x1b[31m"); + osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf( "Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); // Skeleton_Info_Rom_SV_ct Memory allocation error - osSyncPrintf("\x1b[m"); + osSyncPrintf(VT_RST); } if (animation != 0) { @@ -1312,10 +1311,10 @@ void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limb skelAnime->unk_24 = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->unk_24), "../z_skelanime.c", 3121); if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->unk_24 == NULL)) { - osSyncPrintf("\x1b[31m"); + osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf( "Skeleton_Info2_skin2_ct メモリアロケーションエラー\n"); // Skeleton_Info2_skin2_ct Memory allocation error - osSyncPrintf("\x1b[m"); + osSyncPrintf(VT_RST); } if (animation != 0) { @@ -1432,7 +1431,6 @@ void func_800A4C58(SkelAnime* skelAnime) { #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4C58.s") #endif -#undef NON_MATCHING #ifdef NON_MATCHING s32 func_800A4D9C(SkelAnime* skelAnime) { @@ -1448,7 +1446,6 @@ s32 func_800A4D9C(SkelAnime* skelAnime) { #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4D9C.s") #endif -#undef NON_MATCHING #ifdef NON_MATCHING s32 func_800A4E38(SkelAnime* skelAnime) { @@ -1466,7 +1463,6 @@ s32 func_800A4E38(SkelAnime* skelAnime) { #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4E38.s") #endif -#undef NON_MATCHING s32 func_800A4EE0(SkelAnime* skelAnime) { f32 temp_f14; @@ -1506,10 +1502,10 @@ void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32 animation, f32 play transitionRate = -transitionRate; } else { if (unk2 != 0) { - skelAnime->mtxUpdate = (void*)&func_800A4AD8; + skelAnime->animUpdate = (void*)&func_800A4AD8; skelAnime->unk_03 = unk2; } else { - skelAnime->mtxUpdate = (void*)&func_800A4A20; + skelAnime->animUpdate = (void*)&func_800A4A20; } SkelAnime_AnimateFrame(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); } @@ -1538,7 +1534,6 @@ void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32 animation, f32 play #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_ChangeAnimationImpl.s") #endif -#undef NON_MATCHING void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate) { -- cgit v1.2.3 From a99840162b2ab08125bc09fa5ec7aa47a8466e21 Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Tue, 24 Mar 2020 14:01:00 -0500 Subject: minor formatting updates, match func_800A4A20 --- src/code/sys_matrix.c | 6 +- src/code/z_skelanime.c | 135 +++++++++++++++----------------- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 2 +- 3 files changed, 68 insertions(+), 75 deletions(-) (limited to 'src') diff --git a/src/code/sys_matrix.c b/src/code/sys_matrix.c index fd474f1fc..24c5768d0 100644 --- a/src/code/sys_matrix.c +++ b/src/code/sys_matrix.c @@ -2,16 +2,14 @@ #include // clang-format off -Mtx gMtxClear = -{ +Mtx gMtxClear = { 65536, 0, 1, 0, 0, 65536, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, }; -MtxF gMtxFClear = -{ +MtxF gMtxFClear = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index 5a3b261f0..a919d43f5 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -103,9 +103,9 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(*limbIndex); - pos.x = (f32)actorDrawTable->x; - pos.y = (f32)actorDrawTable->y; - pos.z = (f32)actorDrawTable->z; + pos.x = actorDrawTable->x; + pos.y = actorDrawTable->y; + pos.z = actorDrawTable->z; rot = actorDrawTable[1]; dList = limbEntry->displayLists[dListIndex]; @@ -133,6 +133,7 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra } #ifdef NON_MATCHING +//regalloc void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex, Mtx** mtx) { @@ -190,6 +191,7 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbT #endif #ifdef NON_MATCHING +//regalloc void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 limbCount, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) { @@ -203,7 +205,7 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorD do { if (1) { - mtx = Graph_Alloc(globalCtx->state.gfxCtx, limbCount * 0x40); + mtx = Graph_Alloc(globalCtx->state.gfxCtx, limbCount * sizeof(Mtx)); } } while (0); @@ -277,9 +279,9 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); limbIndex++; rot = actorDrawTable[limbIndex]; - pos.x = (f32)limbEntry->translation.x; - pos.y = (f32)limbEntry->translation.y; - pos.z = (f32)limbEntry->translation.z; + pos.x = limbEntry->translation.x; + pos.y = limbEntry->translation.y; + pos.z = limbEntry->translation.z; dList = limbEntry->displayLists[0]; if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { @@ -337,9 +339,9 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa Matrix_Push(); rootLimb = SEGMENTED_TO_VIRTUAL(*limbTable); - pos.x = (f32)actorDrawTable[0].x; - pos.y = (f32)actorDrawTable[0].y; - pos.z = (f32)actorDrawTable[0].z; + pos.x = actorDrawTable[0].x; + pos.y = actorDrawTable[0].y; + pos.z = actorDrawTable[0].z; rot = actorDrawTable[1]; dList = rootLimb->displayLists[0]; @@ -368,6 +370,7 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa } #ifdef NON_MATCHING +// close, needs a bit bmore work. Mainly seems centered around SEGMENTED_TO_VIRTUAL void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, u32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, Mtx** limbMatricies) { @@ -384,9 +387,9 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, u32 limbIndex, u32* limbTabl limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); limbRot = actorDrawTable[++limbIndex]; - limbPos.x = (f32)limbEntry->translation.x; - limbPos.y = (f32)limbEntry->translation.y; - limbPos.z = (f32)limbEntry->translation.z; + limbPos.x = limbEntry->translation.x; + limbPos.y = limbEntry->translation.y; + limbPos.z = limbEntry->translation.z; limbDlist[0] = limbDlist[1] = limbEntry->displayLists[0]; @@ -429,6 +432,7 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, u32 limbIndex, u32* limbTabl #endif #ifdef NON_MATCHING +// Regalloc, pretty much same as SkelAnime_LodDrawSV void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, u32 dListCount, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) { @@ -457,9 +461,9 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDraw Matrix_Push(); rootLimb = SEGMENTED_TO_VIRTUAL(*limbTable); - pos.x = (f32)actorDrawTable[0].x; - pos.y = (f32)actorDrawTable[0].y; - pos.z = (f32)actorDrawTable[0].z; + pos.x = actorDrawTable[0].x; + pos.y = actorDrawTable[0].y; + pos.z = actorDrawTable[0].z; rot = actorDrawTable[1]; @@ -473,7 +477,7 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDraw gSPDisplayList(gfxCtx->polyOpa.p++, skelDlist[0]); limbMatricies++; } else { - if (skelDlist[1] != 0) { + if (skelDlist[1] != NULL) { Matrix_ToMtx(limbMatricies, "../z_skelanime.c", 1334); limbMatricies++; } @@ -975,12 +979,12 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeade limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); headerCount = limbHeader->limbCount; skelAnime->unk_34 = flags; - limbCount = (flags & 2) != 0 ? headerCount : 1; + limbCount = (flags & 2) ? headerCount : 1; - if ((flags & 1) != 0) { + if (flags & 1) { limbCount += headerCount; } - if ((flags & 4) != 0) { + if (flags & 4) { limbCount += headerCount; } @@ -990,7 +994,7 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeade allocSize = limbCount * sizeof(Vec3s); skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); - if ((flags & 8) != 0) { + if (flags & 8) { allocSize += 2; } @@ -1066,10 +1070,8 @@ s32 func_800A3D70(GlobalContext* globalCtx, SkelAnime* skelAnime) { skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * updateRate; if (skelAnime->animCurrentFrame < 0.0f) { skelAnime->animCurrentFrame += skelAnime->unk_14; - } else { - if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) { - skelAnime->animCurrentFrame -= skelAnime->unk_14; - } + } else if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) { + skelAnime->animCurrentFrame -= skelAnime->unk_14; } func_800A3C9C(globalCtx, skelAnime); return 0; @@ -1088,10 +1090,8 @@ s32 func_800A3E0C(GlobalContext* globalCtx, SkelAnime* skelAnime) { } else { if (skelAnime->animCurrentFrame < 0.0f) { skelAnime->animCurrentFrame += skelAnime->unk_14; - } else { - if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) { - skelAnime->animCurrentFrame -= skelAnime->unk_14; - } + } else if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) { + skelAnime->animCurrentFrame -= skelAnime->unk_14; } } func_800A3C9C(globalCtx, skelAnime); @@ -1137,20 +1137,20 @@ void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animatio #endif void func_800A407C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) { - func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 2, 0.0f); + func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f); } void func_800A40DC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { - func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 2, + func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f); } void func_800A4140(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) { - func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 0, 0.0f); + func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 0, 0.0f); } void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { - func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 0, + func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(animation), 0, 0.0f); } @@ -1325,51 +1325,45 @@ void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limb void func_800A49B0(SkelAnime* skelAnime) { if (skelAnime->unk_01 < 2) { skelAnime->animUpdate = &func_800A4D9C; - return; - } - if (skelAnime->unk_01 < 4) { + } else if (skelAnime->unk_01 < 4) { skelAnime->animUpdate = &func_800A4EE0; - return; + } else { + skelAnime->animUpdate = &func_800A4E38; } - skelAnime->animUpdate = &func_800A4E38; } s32 SkelAnime_FrameUpdateMatrix(SkelAnime* skelAnime) { return skelAnime->animUpdate(skelAnime); } -#ifdef NON_MATCHING s32 func_800A4A20(SkelAnime* skelAnime) { - f32 sp2C; - f32 temp_f12; - f32 phi_f0; + f32 prevUnk28; + f32 updateRate; - temp_f12 = skelAnime->unk_28; - skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.33333334f); - phi_f0 = skelAnime->unk_28; + prevUnk28 = skelAnime->unk_28; + updateRate = R_UPDATE_RATE * 0.33333334f; + skelAnime->unk_28 -= skelAnime->unk_2C * updateRate; if (skelAnime->unk_28 <= 0.0f) { - sp2C = temp_f12; func_800A49B0(skelAnime); skelAnime->unk_28 = 0.0f; - phi_f0 = skelAnime->unk_28; } func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, skelAnime->unk_24, - 1.0f - (phi_f0 / temp_f12)); + 1.0f - (skelAnime->unk_28 / prevUnk28)); return 0; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4A20.s") -#endif #ifdef NON_MATCHING +// small stack alloc s32 func_800A4AD8(SkelAnime* skelAnime) { - f32 sp28; s16 temp_a1; s16 temp_a2; + f32 sp28; f32 phi_f2; + f32 updateRate; temp_a2 = (s16)(skelAnime->unk_28 * 16384.0f); - skelAnime->unk_28 -= skelAnime->unk_2C * (R_UPDATE_RATE * 0.33333334f); + updateRate = R_UPDATE_RATE * 0.33333334f; + skelAnime->unk_28 -= skelAnime->unk_2C * updateRate; if (skelAnime->unk_28 <= 0.0f) { func_800A49B0(skelAnime); skelAnime->unk_28 = 0.0f; @@ -1467,7 +1461,7 @@ s32 func_800A4E38(SkelAnime* skelAnime) { s32 func_800A4EE0(SkelAnime* skelAnime) { f32 temp_f14; - temp_f14 = (f32)R_UPDATE_RATE * 0.33333334f; + temp_f14 = R_UPDATE_RATE * 0.33333334f; if (skelAnime->animCurrentFrame == skelAnime->animFrameCount) { SkelAnime_AnimateFrame(skelAnime->animCurrent, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, @@ -1492,7 +1486,7 @@ s32 func_800A4EE0(SkelAnime* skelAnime) { } #ifdef NON_MATCHING -void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount, +void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32* animation, f32 playbackSpeed, f32 unk0, f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2) { skelAnime->unk_01 = unk1; if ((transitionRate != 0.0f) && ((animation != skelAnime->animCurrent) || (unk0 != skelAnime->animCurrentFrame))) { @@ -1520,7 +1514,7 @@ void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32 animation, f32 play skelAnime->animCurrent = animation; skelAnime->unk_0C = unk0; skelAnime->animFrameCount = frameCount; - skelAnime->unk_14 = (f32)func_800A1FC8(animation); + skelAnime->unk_14 = func_800A1FC8(animation); if (skelAnime->unk_01 >= 4) { skelAnime->animCurrentFrame = 0.0f; } else { @@ -1541,21 +1535,21 @@ void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, u32 animation, f32 playback } void func_800A51E8(SkelAnime* skelAnime, u32 animation) { - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 2, 0.0f); + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f); } void func_800A5240(SkelAnime* skelAnime, u32 animation, f32 transitionRate) { - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0, (f32)SkelAnime_GetFrameCount(animation), 2, + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0, SkelAnime_GetFrameCount(animation), 2, transitionRate); } void func_800A529C(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { - SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 2, + SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f); } void SkelAnime_ChangeAnimationDefault(SkelAnime* skelAnime, u32 animation) { - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 0, 0.0f); + SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 0, 0.0f); } void SkelAnime_ChangeAnimationTransitionRate(SkelAnime* skelAnime, u32 animation, f32 transitionRate) { @@ -1563,7 +1557,7 @@ void SkelAnime_ChangeAnimationTransitionRate(SkelAnime* skelAnime, u32 animation } void SkelAnime_ChangeAnimationPlaybackSpeed(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { - SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, (f32)SkelAnime_GetFrameCount(animation), 0, + SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(animation), 0, 0.0f); } @@ -1612,18 +1606,18 @@ void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) { f32 sin; f32 cos; - if ((skelAnime->unk_35 & 0x10) != 0) { + if (skelAnime->unk_35 & 0x10) { pos->z = 0.0f; pos->x = 0.0f; } else { - x = (f32)skelAnime->actorDrawTbl->x; - z = (f32)skelAnime->actorDrawTbl->z; + x = skelAnime->actorDrawTbl->x; + z = skelAnime->actorDrawTbl->z; sin = Math_Sins(angle); cos = Math_Coss(angle); pos->x = x * cos + z * sin; pos->z = z * cos - x * sin; - x = (f32)skelAnime->unk_38; - z = (f32)skelAnime->unk_3C; + x = skelAnime->unk_38; + z = skelAnime->unk_3C; sin = Math_Sins(skelAnime->unk_36); cos = Math_Coss(skelAnime->unk_36); pos->x -= x * cos + z * sin; @@ -1635,11 +1629,11 @@ void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) { skelAnime->actorDrawTbl->x = skelAnime->unk_3E; skelAnime->unk_3C = skelAnime->actorDrawTbl->z; skelAnime->actorDrawTbl->z = skelAnime->unk_42; - if ((skelAnime->unk_35 & 2) != 0) { + if (skelAnime->unk_35 & 2) { if ((skelAnime->unk_35 & 0x10) != 0) { pos->y = 0.0f; } else { - pos->y = (f32)(skelAnime->actorDrawTbl->y - skelAnime->unk_3A); + pos->y = skelAnime->actorDrawTbl->y - skelAnime->unk_3A; } skelAnime->unk_3A = skelAnime->actorDrawTbl->y; skelAnime->actorDrawTbl->y = skelAnime->unk_40; @@ -1660,11 +1654,12 @@ void SkelAnime_Free(SkelAnime* skelAnime, GlobalContext* globalCtx) { } else { osSyncPrintf("now_joint あきまへん!!\n"); // now_joint Akimane! ! } + if (skelAnime->unk_24 != NULL) { ZeldaArena_FreeDebug(skelAnime->unk_24, "../z_skelanime.c", 3731); - return; + } else { + osSyncPrintf("morf_joint あきまへん!!\n"); // "morf_joint Akimane !!" } - osSyncPrintf("morf_joint あきまへん!!\n"); // "morf_joint Akimane !!" } void SkelAnime_CopyVec3s(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src) { diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index ea57b9ecf..db449cdb6 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -87,7 +87,7 @@ static void EnMs_Init(EnMs* this, GlobalContext* globalCtx) { } Actor_ProcessInitChain(&this->actor, initChain); SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06003DC0, &D_060005EC, &this->unkSkelAnimeStruct, &this->unk_1C6, - 9); // skelanime_mtx_init + 9); ActorCollider_AllocCylinder(globalCtx, &this->collider); func_8005C450(globalCtx, &this->collider, this, &unk_col_80AB0320); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 35.0f); -- cgit v1.2.3 From 4b7f998b20cdc606fdedea04934257671453896c Mon Sep 17 00:00:00 2001 From: dark-samus Date: Tue, 24 Mar 2020 16:53:09 -0400 Subject: match final non-matching in sys_cfb.c --- src/code/sys_cfb.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/code/sys_cfb.c b/src/code/sys_cfb.c index 454b63a58..421037c38 100644 --- a/src/code/sys_cfb.c +++ b/src/code/sys_cfb.c @@ -1,14 +1,15 @@ #include -volatile u32 sSysCfbFbPtr[2]; // may not be volatile but it currently gets SysCfb_Init closer from matching +u32 sSysCfbFbPtr[2]; u32 sSysCfbEnd; -// small reaordering -#ifdef NON_MATCHING void SysCfb_Init(s32 n64dd) { + u32 screenSize; + u32 tmpFbEnd; if (osMemSize >= 0x800000U) { // 8MB or more memory is installed osSyncPrintf("8Mバイト以上のメモリが搭載されています\n"); + tmpFbEnd = 0x8044BE80; if (n64dd == 1) { // RAM 8M mode (N64DD compatible) osSyncPrintf("RAM 8M mode (N64DD対応)\n"); @@ -16,26 +17,24 @@ void SysCfb_Init(s32 n64dd) { } else { // The margin for this version is% dK bytes osSyncPrintf("このバージョンのマージンは %dK バイトです\n", (0x4BC00 / 1024)); - sSysCfbEnd = 0x8044BE80; + sSysCfbEnd = tmpFbEnd; } } else if (osMemSize >= 0x400000U) { - sSysCfbEnd = 0x80400000; osSyncPrintf("RAM4M mode\n"); + sSysCfbEnd = 0x80400000; } else { LogUtils_HungupThread("../sys_cfb.c", 0x162); } + screenSize = SCREEN_WIDTH * SCREEN_HEIGHT; sSysCfbEnd &= ~0x3f; // The final address used by the system is% 08x osSyncPrintf("システムが使用する最終アドレスは %08x です\n", sSysCfbEnd); - sSysCfbFbPtr[0] = sSysCfbEnd - (SCREEN_WIDTH * SCREEN_HEIGHT * 4); - sSysCfbFbPtr[1] = sSysCfbEnd - (SCREEN_WIDTH * SCREEN_HEIGHT * 2); + sSysCfbFbPtr[0] = sSysCfbEnd - (screenSize * 4); + sSysCfbFbPtr[1] = sSysCfbEnd - (screenSize * 2); // Frame buffer addresses are% 08x and% 08x osSyncPrintf("フレームバッファのアドレスは %08x と %08x です\n", sSysCfbFbPtr[0], sSysCfbFbPtr[1]); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/sys_cfb/SysCfb_Init.s") -#endif void SysCfb_Reset() { sSysCfbFbPtr[0] = 0; -- cgit v1.2.3 From 05122ec2f8c08990d12cb916be88626229e6ac8a Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 24 Mar 2020 17:07:52 -0400 Subject: PR suggestions --- .../actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c | 36 ++++++++++------------ 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index b364db545..9ac414e84 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -1,3 +1,9 @@ +/* + * File: z_bg_spot09_obj.c + * Overlay: ovl_Bg_Spot09_Obj + * Description: + */ + #include "z_bg_spot09_obj.h" #define ROOM 0x00 @@ -27,11 +33,10 @@ const ActorInit Bg_Spot09_Obj_InitVars = { static u32 D_808B1F90[] = { 0x00000000, 0x06005520, 0x0600283C, 0x06008458, 0x06007580 }; -typedef s32 (*ActorFuncRet)(struct Actor*, struct GlobalContext*); -static ActorFuncRet D_808B1FA4[] = { - (ActorFuncRet)func_808B1BEC, - (ActorFuncRet)func_808B1AE0, - (ActorFuncRet)func_808B1BA0, +static s32 (*D_808B1FA4[])(BgSpot09Obj* this, GlobalContext* globalCtx) = { + func_808B1BEC, + func_808B1AE0, + func_808B1BA0, }; static InitChainEntry initChain1[] = { @@ -46,37 +51,28 @@ static InitChainEntry initChain2[] = { ICHAIN_F32(unk_FC, 1500, ICHAIN_STOP), }; -static u32 dlists[] = { - 0x06000100, 0x06003970, 0x06001120, 0x06007D40, 0x06006210, -}; +static u32 dlists[] = { 0x06000100, 0x06003970, 0x06001120, 0x06007D40, 0x06006210 }; extern UNK_TYPE D_06008010; static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) { - s32 temp_v1; - s32 linkAge; + s32 carpentersRescued; Actor* thisx = &this->dyna.actor; if (gSaveContext.scene_setup_index >= 4) { return thisx->params == 0; } - temp_v1 = (gSaveContext.event_chk_inf[9] & 0xF) == 0xF; - - if (LINK_IS_CHILD) { - linkAge = YEARS_CHILD; - } else { - linkAge = YEARS_ADULT; - } + carpentersRescued = (gSaveContext.event_chk_inf[9] & 0xF) == 0xF; - if (linkAge == YEARS_ADULT) { + if (LINK_AGE_IN_YEARS == YEARS_ADULT) { switch (thisx->params) { case 0: return 0; case 1: - return !temp_v1; + return !carpentersRescued; case 4: - return temp_v1; + return carpentersRescued; case 3: return 1; } -- cgit v1.2.3 From f0c033ce701a5064a9b943a163be4462724bf70d Mon Sep 17 00:00:00 2001 From: JoshDuMan Date: Tue, 24 Mar 2020 19:52:07 -0400 Subject: Match func_809C1CAC --- src/code/z_sample.c | 5 +++-- src/overlays/actors/ovl_En_Bird/z_en_bird.c | 10 +++------- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/code/z_sample.c b/src/code/z_sample.c index 2f4f3fc6f..9b9fa9559 100644 --- a/src/code/z_sample.c +++ b/src/code/z_sample.c @@ -34,10 +34,11 @@ void Sample_Draw(SampleContext* this) { gfxCtx->polyOpa.p = func_80093708(gfxCtx->polyOpa.p, 0xFF, 0xFF, 0xFF, 0, 0, 0); func_80093D18(gfxCtx); - + gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_1CYCLE); gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - gDPSetCombineLERP(gfxCtx->polyOpa.p++, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE); + gDPSetCombineLERP(gfxCtx->polyOpa.p++, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, + PRIMITIVE); gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 0xFF, 0xFF, 0x00, 0x00); func_800C6B54(gfxArr, gfxCtx, "../z_sample.c", 111); diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/src/overlays/actors/ovl_En_Bird/z_en_bird.c index 93c064596..c7d839ff3 100644 --- a/src/overlays/actors/ovl_En_Bird/z_en_bird.c +++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.c @@ -86,19 +86,15 @@ void EnBird_Init(EnBird* this, GlobalContext* globalCtx) { void EnBird_Destroy(EnBird* this, GlobalContext* globalCtx) { } -#ifdef NON_MATCHING -// D_0600006C address is reused when it shouldn't be -// also minor ordering differences void func_809C1CAC(EnBird* this, s16 params) { f32 frameCount = SkelAnime_GetFrameCount(&D_0600006C); f32 playbackSpeed = this->unk_19C ? 0.0f : 1.0f; + u32* anim = &D_0600006C; + this->unk_198 = Math_Rand_S16Offset(5, 0x23); - SkelAnime_ChangeAnimation(&this->skelAnime, &D_0600006C, playbackSpeed, 0.0f, frameCount, 0, 0.0f); + SkelAnime_ChangeAnimation(&this->skelAnime, anim, playbackSpeed, 0.0f, frameCount, 0, 0.0f); EnBird_SetNewUpdate(this, func_809C1D60); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bird/func_809C1CAC.s") -#endif void func_809C1D60(EnBird* this, GlobalContext* globalCtx) { f32 fVar2 = sinf(this->unk_1B4); -- cgit v1.2.3 From 7376fe5cad441ab6635d05dd017a7f3ce79e3916 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 24 Mar 2020 21:42:07 -0400 Subject: Decompiled ovl_Bg_Spot12_Gate --- .../actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c | 136 ++++++++++++++++++--- .../actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h | 5 +- 2 files changed, 120 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c index 65f8e8ef0..f8a190be0 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c @@ -1,14 +1,28 @@ +/* + * File: z_bg_spot12_gate.c + * Overlay: Bg_Spot12_Gate + * Description: + */ + #include "z_bg_spot12_gate.h" #define ROOM 0x00 #define FLAGS 0x00000000 -void BgSpot12Gate_Init(BgSpot12Gate* this, GlobalContext* globalCtx); -void BgSpot12Gate_Destroy(BgSpot12Gate* this, GlobalContext* globalCtx); -void BgSpot12Gate_Update(BgSpot12Gate* this, GlobalContext* globalCtx); -void BgSpot12Gate_Draw(BgSpot12Gate* this, GlobalContext* globalCtx); +static void BgSpot12Gate_Init(BgSpot12Gate* this, GlobalContext* globalCtx); +static void BgSpot12Gate_Destroy(BgSpot12Gate* this, GlobalContext* globalCtx); +static void BgSpot12Gate_Update(BgSpot12Gate* this, GlobalContext* globalCtx); +static void BgSpot12Gate_Draw(BgSpot12Gate* this, GlobalContext* globalCtx); + +static void func_808B30C0(BgSpot12Gate* this); +static void func_808B30D8(BgSpot12Gate* this, GlobalContext* globalCtx); +static void func_808B3134(BgSpot12Gate* this); +static void func_808B314C(BgSpot12Gate* this, GlobalContext* globalCtx); +static void func_808B317C(BgSpot12Gate* this); +static void func_808B318C(BgSpot12Gate* this, GlobalContext* globalCtx); +static void func_808B3274(BgSpot12Gate* this); +static void func_808B3298(BgSpot12Gate* this, GlobalContext* globalCtx); -/* const ActorInit Bg_Spot12_Gate_InitVars = { ACTOR_BG_SPOT12_GATE, ACTORTYPE_BG, @@ -21,29 +35,113 @@ const ActorInit Bg_Spot12_Gate_InitVars = { (ActorFunc)BgSpot12Gate_Update, (ActorFunc)BgSpot12Gate_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B2F90.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/BgSpot12Gate_Init.s") +static InitChainEntry initChain[] = { + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), + ICHAIN_F32(unk_F4, 2500, ICHAIN_CONTINUE), + ICHAIN_F32(unk_F8, 500, ICHAIN_CONTINUE), + ICHAIN_F32(unk_FC, 1200, ICHAIN_STOP), +}; + +extern UNK_TYPE D_06001080; +extern UNK_TYPE D_060011EC; + +static void func_808B2F90(BgSpot12Gate* this, GlobalContext* globalCtx, UNK_TYPE collision, DynaPolyMoveFlag flags) { + Actor* thisx = &this->dyna.actor; + s32 localC = 0; + s32 pad[2]; + + DynaPolyInfo_SetActorMove(thisx, flags); + DynaPolyInfo_Alloc(collision, &localC); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localC); + if (this->dyna.dynaPolyId == 0x32) { + osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot12_gate.c", 145, + thisx->id, thisx->params); + } +} + +static void BgSpot12Gate_Init(BgSpot12Gate* this, GlobalContext* globalCtx) { + Actor* thisx = &this->dyna.actor; + + func_808B2F90(this, globalCtx, &D_060011EC, 0); + Actor_ProcessInitChain(thisx, initChain); + + if (Flags_GetSwitch(globalCtx, thisx->params & 0x3F)) { + func_808B3274(this); + } else { + func_808B30C0(this); + } +} + +static void BgSpot12Gate_Destroy(BgSpot12Gate* this, GlobalContext* globalCtx) { + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); +} + +static void func_808B30C0(BgSpot12Gate* this) { + Actor* thisx = &this->dyna.actor; + + this->actionFunc = (ActorFunc)func_808B30D8; + thisx->posRot.pos.y = thisx->initPosRot.pos.y; +} + +static void func_808B30D8(BgSpot12Gate* this, GlobalContext* globalCtx) { + Actor* thisx = &this->dyna.actor; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/BgSpot12Gate_Destroy.s") + if (Flags_GetSwitch(globalCtx, thisx->params & 0x3F)) { + func_808B3134(this); + func_800800F8(globalCtx, 0x1040, -0x63, thisx, 0); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B30C0.s") +static void func_808B3134(BgSpot12Gate* this) { + this->actionFunc = (ActorFunc)func_808B314C; + this->unk_168 = 0x28; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B30D8.s") +static void func_808B314C(BgSpot12Gate* this, GlobalContext* globalCtx) { + if (this->unk_168 <= 0) { + func_808B317C(this); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B3134.s") +static void func_808B317C(BgSpot12Gate* this) { + this->actionFunc = (ActorFunc)func_808B318C; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B314C.s") +static void func_808B318C(BgSpot12Gate* this, GlobalContext* globalCtx) { + Actor* thisx = &this->dyna.actor; + s32 var; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B317C.s") + Math_ApproxF(&thisx->velocity.y, 1.6f, 0.03f); + if (Math_ApproxF(&thisx->posRot.pos.y, thisx->initPosRot.pos.y + 200.0f, thisx->velocity.y)) { + func_808B3274(this); + var = func_80092F88(globalCtx->cameraCtx.activeCameraPtrs[globalCtx->cameraCtx.unk_5C0], 3); + func_80092DAC(var, -0x3CB0); + func_80092E70(var, 3, 0, 0, 0); + func_80092DF0(var, 0xC); + Audio_PlayActorSound2(thisx, NA_SE_EV_BRIDGE_OPEN_STOP); + } else { + func_8002F974(thisx, 0x2067); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B318C.s") +static void func_808B3274(BgSpot12Gate* this) { + Actor* thisx = &this->dyna.actor; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B3274.s") + this->actionFunc = (ActorFunc)func_808B3298; + thisx->posRot.pos.y = thisx->initPosRot.pos.y + 200.0f; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B3298.s") +static void func_808B3298(BgSpot12Gate* this, GlobalContext* globalCtx) { +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/BgSpot12Gate_Update.s") +static void BgSpot12Gate_Update(BgSpot12Gate* this, GlobalContext* globalCtx) { + if (this->unk_168 > 0) { + this->unk_168 -= 1; + } + this->actionFunc(this, globalCtx); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/BgSpot12Gate_Draw.s") +static void BgSpot12Gate_Draw(BgSpot12Gate* this, GlobalContext* globalCtx) { + Draw_DListOpa(globalCtx, &D_06001080); +} diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h index 3a6d11ba2..9ba6dc086 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h +++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h @@ -5,8 +5,9 @@ #include typedef struct { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x20]; + /* 0x0000 */ DynaPolyActor dyna; + /* 0x0164 */ ActorFunc actionFunc; + /* 0x0168 */ s16 unk_168; } BgSpot12Gate; // size = 0x016C extern const ActorInit Bg_Spot12_Gate_InitVars; -- cgit v1.2.3 From 8970968cfcfcfb86b70eec9b26528d7d9d2c160e Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Wed, 25 Mar 2020 10:51:25 -0500 Subject: name SkelAnime_InitLinkAnimetion, name load animation types and callbacks, rename several segement addresses in decompiled actors --- src/code/z_actor.c | 8 +- src/code/z_skelanime.c | 560 +++++++++++----------- src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 16 +- src/overlays/actors/ovl_En_Bird/z_en_bird.c | 2 +- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 20 +- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 2 +- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 42 +- src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c | 37 +- 8 files changed, 335 insertions(+), 352 deletions(-) (limited to 'src') diff --git a/src/code/z_actor.c b/src/code/z_actor.c index eec16df03..9928be4d9 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -9,7 +9,7 @@ void ActorShape_Init(ActorShape* shape, f32 arg1, void* shadowDrawFunc, f32 arg3 shape->unk_14 = -1; } -void func_8002B200(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx, u32 dlist, Color_RGBA8* color) { +void func_8002B200(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx, Gfx* dlist, Color_RGBA8* color) { f32 temp1; f32 temp2; MtxF sp60; @@ -41,7 +41,7 @@ void func_8002B200(Actor* actor, LightMapper* lightMapper, GlobalContext* global func_80038A28(actor->floorPoly, actor->posRot.pos.x, actor->unk_80, actor->posRot.pos.z, &sp60); Matrix_Put(&sp60); - if (dlist != (u32)&D_04049210) { + if (dlist != D_04049210) { Matrix_RotateY(actor->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY); } @@ -3898,7 +3898,7 @@ void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc gDPPipeSync(gfxCtx->polyOpa.p++); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, func_80034B28(globalCtx->state.gfxCtx)); - gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, + gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, unkFunc1, unkFunc2, actor, gfxCtx->polyOpa.p); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_actor.c", 8860); @@ -3917,7 +3917,7 @@ void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, alpha); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, func_80034B54(globalCtx->state.gfxCtx)); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, + gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, unkFunc1, unkFunc2, actor, gfxCtx->polyXlu.p); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_actor.c", 8904); diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index a919d43f5..e625a3784 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -7,26 +7,27 @@ s32 func_800A3E0C(GlobalContext*, SkelAnime*); s32 func_800A4D9C(SkelAnime* skelAnime); s32 func_800A4EE0(SkelAnime* skelAnime); s32 func_800A4E38(SkelAnime* skelAnime); +s32 func_800A4AD8(SkelAnime* skelAnime); void SkelAnime_CopyVec3s(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src); -void func_800A3678(GlobalContext* globalCtx, AnimationEntryType0* entry); -void func_800A36A4(GlobalContext* globalCtx, AnimationEntryType1* entry); -void func_800A3714(GlobalContext* globalCtx, AnimationEntryType2* entry); -void func_800A3770(GlobalContext* globalCtx, AnimationEntryType3* entry); -void func_800A37F0(GlobalContext* globalCtx, AnimationEntryType4* entry); -void func_800A3874(GlobalContext* globalCtx, AnimationEntryType5* entry); +void SkelAnime_LinkAnimetionLoaded(GlobalContext* globalCtx, AnimationEntryType0* entry); +void SkelAnime_AnimationType1Loaded(GlobalContext* globalCtx, AnimationEntryType1* entry); +void SkelAnime_AnimationType2Loaded(GlobalContext* globalCtx, AnimationEntryType2* entry); +void SkelAnime_AnimationType3Loaded(GlobalContext* globalCtx, AnimationEntryType3* entry); +void SkelAnime_AnimationType4Loaded(GlobalContext* globalCtx, AnimationEntryType4* entry); +void SkelAnime_AnimationType5Loaded(GlobalContext* globalCtx, AnimationEntryType5* entry); //.data u32 D_8012A480 = 0; static AnimationEntryCallback D_8012A484[] = { - (AnimationEntryCallback)&func_800A3678, (AnimationEntryCallback)&func_800A36A4, - (AnimationEntryCallback)&func_800A3714, (AnimationEntryCallback)&func_800A3770, - (AnimationEntryCallback)&func_800A37F0, (AnimationEntryCallback)&func_800A3874, + &SkelAnime_LinkAnimetionLoaded, &SkelAnime_AnimationType1Loaded, + &SkelAnime_AnimationType2Loaded, &SkelAnime_AnimationType3Loaded, + &SkelAnime_AnimationType4Loaded, &SkelAnime_AnimationType5Loaded, }; //.bss u32 D_801600B0; -void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, +void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; @@ -39,7 +40,7 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab gfxCtx = globalCtx->state.gfxCtx; func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 773); Matrix_Push(); - limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; rot = actorDrawTable[limbIndex]; @@ -67,21 +68,21 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - SkelAnime_LodDrawLimb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + SkelAnime_LodDrawLimb(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); } func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 821); } -void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDrawTable, +void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; @@ -92,7 +93,7 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra GraphicsContext* gfxCtx; Gfx* gfx[4]; - if (limbIndex == NULL) { + if (skeleton == NULL) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_Lod_draw():skelがNULLです。\n"); osSyncPrintf(VT_RST); @@ -102,7 +103,7 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 849); Matrix_Push(); - limbEntry = SEGMENTED_TO_VIRTUAL(*limbIndex); + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); pos.x = actorDrawTable->x; pos.y = actorDrawTable->y; pos.z = actorDrawTable->z; @@ -113,8 +114,7 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { - gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 881), - G_MTX_LOAD); + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 881), G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList); } @@ -124,7 +124,7 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra } if (limbEntry->firstChildIndex != 0xFF) { - SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, limbIndex, actorDrawTable, updateMtxFunc, + SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex); } @@ -132,9 +132,10 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, u32* limbIndex, Vec3s* actorDra func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 894); } +//#define NON_MATCHING #ifdef NON_MATCHING -//regalloc -void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, +// regalloc +void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex, Mtx** mtx) { SkelLimbEntry* limbEntry; @@ -146,7 +147,7 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbT Matrix_Push(); - limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; rot = actorDrawTable[limbIndex]; @@ -166,7 +167,7 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbT gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 949); (*mtx)++; - } else if (dList[0] != 0) { + } else if (dList[0] != NULL) { Matrix_ToMtx(*mtx, "../z_skelanime.c", 954); (*mtx)++; } @@ -175,14 +176,14 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbT appendDlistFunc(globalCtx, limbIndex, &dList[0], &rot, actor); } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, mtx); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, mtx); } } @@ -191,8 +192,8 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, u32* limbT #endif #ifdef NON_MATCHING -//regalloc -void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 limbCount, +// regalloc +void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 limbCount, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; @@ -203,13 +204,9 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorD GraphicsContext* gfxCtx; Gfx* gfx[4]; - do { - if (1) { - mtx = Graph_Alloc(globalCtx->state.gfxCtx, limbCount * sizeof(Mtx)); - } - } while (0); + mtx = Graph_Alloc(globalCtx->state.gfxCtx, limbCount * sizeof(Mtx)); - if (limbTable == NULL) { + if (skeleton == NULL) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_Lod_draw_SV():skelがNULLです。\n"); osSyncPrintf(VT_RST); @@ -220,15 +217,15 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorD gSPSegment(gfxCtx->polyOpa.p++, 0xD, mtx); Matrix_Push(); - limbEntry = SEGMENTED_TO_VIRTUAL(*limbTable); - + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); + if (limbEntry) {} pos.x = actorDrawTable->x; pos.y = actorDrawTable->y; pos.z = actorDrawTable->z; rot = actorDrawTable[1]; - dList[1] = dList[0] = limbEntry->displayLists[dListIndex]; + dList[0] = dList[1] = limbEntry->displayLists[dListIndex]; if ((updateMtxFunc == 0) || (updateMtxFunc(globalCtx, 1, &dList[1], &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); @@ -237,11 +234,9 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorD gSPMatrix(gfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); mtx++; - } else { - if (dList[0] != NULL) { - Matrix_ToMtx(mtx, "../z_skelanime.c", 1040); - mtx++; - } + } else if (dList[0] != NULL) { + Matrix_ToMtx(mtx, "../z_skelanime.c", 1040); + mtx++; } } @@ -249,7 +244,7 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorD appendDlistFunc(globalCtx, 1, &dList[0], &rot, actor); } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, dListIndex, &mtx); } @@ -261,7 +256,7 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorD #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_LodDrawSV.s") #endif -void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, +void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) { SkelLimbEntry* limbEntry; @@ -276,7 +271,7 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1076); Matrix_Push(); - limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; rot = actorDrawTable[limbIndex]; pos.x = limbEntry->translation.x; @@ -302,21 +297,21 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_DrawLimb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + SkelAnime_DrawLimb(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - SkelAnime_DrawLimb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + SkelAnime_DrawLimb(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor); } func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1121); } -void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, +void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) { SkelLimbEntry* rootLimb; char pad[4]; @@ -326,7 +321,7 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa GraphicsContext* gfxCtx; Gfx* gfx[4]; - if (limbTable == NULL) { + if (skeleton == NULL) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_draw():skelがNULLです。\n"); // Si2_draw (): skel is NULL. osSyncPrintf(VT_RST); @@ -337,7 +332,7 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1148); Matrix_Push(); - rootLimb = SEGMENTED_TO_VIRTUAL(*limbTable); + rootLimb = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); pos.x = actorDrawTable[0].x; pos.y = actorDrawTable[0].y; @@ -360,7 +355,7 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa } if (rootLimb->firstChildIndex != LIMB_DONE) { - SkelAnime_DrawLimb(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + SkelAnime_DrawLimb(globalCtx, rootLimb->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor); } @@ -371,61 +366,60 @@ void SkelAnime_Draw(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTa #ifdef NON_MATCHING // close, needs a bit bmore work. Mainly seems centered around SEGMENTED_TO_VIRTUAL -void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, u32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, +void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor, Mtx** limbMatricies) { - Gfx* limbDlist[2]; - Vec3f limbPos; - Vec3s limbRot; - GraphicsContext* gfxCtx; - Gfx* sp34[3]; SkelLimbEntry* limbEntry; + Gfx* dList[2]; + Vec3f pos; + Vec3s rot; + GraphicsContext* gfxCtx; + Gfx* gfx[3]; gfxCtx = globalCtx->state.gfxCtx; - func_800C6AC4(sp34, globalCtx->state.gfxCtx, "../z_skelanime.c", 1214); + func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1214); Matrix_Push(); - limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); - limbRot = actorDrawTable[++limbIndex]; - limbPos.x = limbEntry->translation.x; - limbPos.y = limbEntry->translation.y; - limbPos.z = limbEntry->translation.z; + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); + limbIndex++; + rot = actorDrawTable[limbIndex]; + + pos.x = limbEntry->translation.x; + pos.y = limbEntry->translation.y; + pos.z = limbEntry->translation.z; - limbDlist[0] = limbDlist[1] = limbEntry->displayLists[0]; + dList[0] = dList[1] = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || - (updateMtxFunc(globalCtx, limbIndex, &limbDlist[0], &limbPos, &limbRot, actor) == 0)) { - Matrix_TranslateThenRotateZYX(&limbPos, &limbRot); - if (limbDlist[0] != NULL) { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList[1], &pos, &rot, actor) == 0)) { + Matrix_TranslateThenRotateZYX(&pos, &rot); + if (dList[1] != NULL) { Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1242); gSPMatrix(gfxCtx->polyOpa.p++, *limbMatricies, G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, &limbDlist[0]); + gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); + (*limbMatricies)++; + } else if (dList[0] != NULL) { + Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1249); (*limbMatricies)++; - } else { - if (&limbDlist[1] != 0) { - Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1249); - (*limbMatricies)++; - } } } if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, limbIndex, &limbDlist[1], &limbRot, actor); + appendDlistFunc(globalCtx, limbIndex, &dList[0], &rot, actor); } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_DrawLimbSV(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + SkelAnime_DrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, limbMatricies); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - SkelAnime_DrawLimbSV(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + SkelAnime_DrawLimbSV(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, limbMatricies); } - func_800C6B54(sp34, globalCtx->state.gfxCtx, "../z_skelanime.c", 1265); + func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1265); } #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_DrawLimbSV.s") @@ -433,20 +427,21 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, u32 limbIndex, u32* limbTabl #ifdef NON_MATCHING // Regalloc, pretty much same as SkelAnime_LodDrawSV -void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, u32 dListCount, +void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 limbCount, SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) { - SkelLimbEntry* rootLimb; - Gfx* skelDlist[2]; + SkelLimbEntry* limbEntry; + char pad[4]; + Gfx* dList[2]; Vec3f pos; Vec3s rot; + Mtx* mtx; GraphicsContext* gfxCtx; - Mtx* limbMatricies; - Gfx* gfx[5]; + Gfx* gfx[4]; - limbMatricies = Graph_Alloc(globalCtx->state.gfxCtx, dListCount << 6); + mtx = Graph_Alloc(globalCtx->state.gfxCtx, limbCount * sizeof(Mtx)); - if (limbTable == NULL) { + if (skeleton == NULL) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_draw_SV():skelがNULLです。\n"); // Si2_draw_SV (): skel is NULL. osSyncPrintf(VT_RST); @@ -457,40 +452,42 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDraw func_800C6AC4(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 1294); - gSPSegment(gfxCtx->polyOpa.p++, 0xD, limbMatricies); + gSPSegment(gfxCtx->polyOpa.p++, 0xD, mtx); + Matrix_Push(); - rootLimb = SEGMENTED_TO_VIRTUAL(*limbTable); - pos.x = actorDrawTable[0].x; - pos.y = actorDrawTable[0].y; - pos.z = actorDrawTable[0].z; + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); + + pos.x = actorDrawTable->x; + pos.y = actorDrawTable->x; + pos.z = actorDrawTable->z; rot = actorDrawTable[1]; - skelDlist[0] = skelDlist[1] = rootLimb->displayLists[0]; + dList[0] = dList[1] = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &skelDlist[0], &pos, &rot, actor) == 0)) { + if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList[1], &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); - if (skelDlist[0] != NULL) { - Matrix_ToMtx(limbMatricies, "../z_skelanime.c", 1327); - gSPMatrix(gfxCtx->polyOpa.p++, limbMatricies, G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, skelDlist[0]); - limbMatricies++; + if (dList[1] != NULL) { + Matrix_ToMtx(mtx, "../z_skelanime.c", 1327); + gSPMatrix(gfxCtx->polyOpa.p++, mtx, G_MTX_LOAD); + gSPDisplayList(gfxCtx->polyOpa.p++, dList[1]); + mtx++; } else { - if (skelDlist[1] != NULL) { - Matrix_ToMtx(limbMatricies, "../z_skelanime.c", 1334); - limbMatricies++; + if (dList[0] != NULL) { + Matrix_ToMtx(mtx, "../z_skelanime.c", 1334); + mtx++; } } } - if (appendDlistFunc != 0) { - appendDlistFunc(globalCtx, 1, &skelDlist[1], &rot, actor); + if (appendDlistFunc != NULL) { + appendDlistFunc(globalCtx, 1, &dList[0], &rot, actor); } - if (rootLimb->firstChildIndex != LIMB_DONE) { - SkelAnime_DrawLimbSV(globalCtx, rootLimb->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, &limbMatricies); + if (limbEntry->firstChildIndex != LIMB_DONE) { + SkelAnime_DrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, + appendDlistFunc, actor, &mtx); } Matrix_Pull(); @@ -505,7 +502,7 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDraw * When a rotation index is >= the animation limit, the output rotation value is copied from the frame's * rotation value list, otherwise it is copied from the initial rotation value list */ -void SkelAnime_AnimateFrame(u32 animation, s32 currentFrame, s32 limbCount, Vec3s* dst) { +void SkelAnime_AnimateFrame(AnimationHeader* animationSeg, s32 currentFrame, s32 limbCount, Vec3s* dst) { AnimationRotationIndex* index; AnimationRotationValue* rotationValueTable; AnimationRotationValue* frameRotationValueTable; @@ -514,7 +511,7 @@ void SkelAnime_AnimateFrame(u32 animation, s32 currentFrame, s32 limbCount, Vec3 s32 i; u16 limit; - animationHeader = SEGMENTED_TO_VIRTUAL(animation); + animationHeader = SEGMENTED_TO_VIRTUAL(animationSeg); index = SEGMENTED_TO_VIRTUAL(animationHeader->rotationIndexSeg); rotationValueTable = SEGMENTED_TO_VIRTUAL(animationHeader->rotationValueSeg); frameRotationValueTable = &rotationValueTable[currentFrame]; @@ -539,18 +536,18 @@ void SkelAnime_AnimateFrame(u32 animation, s32 currentFrame, s32 limbCount, Vec3 } } -s16 func_800A1FC8(u32 animationSeg) { - AnimationHeader* animation = (u16*)SEGMENTED_TO_VIRTUAL(animationSeg); +s16 func_800A1FC8(GenericAnimationHeader* animationSeg) { + GenericAnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); return animation->frameCount; } -s32 SkelAnime_GetFrameCount(u32 animationSeg) { - AnimationHeader* animation = (u16*)SEGMENTED_TO_VIRTUAL(animationSeg); +s16 SkelAnime_GetFrameCount(GenericAnimationHeader* animationSeg) { + GenericAnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); - return (s16)((u16)animation->frameCount - 1); + return (u16)animation->frameCount - 1; } -Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, +Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; @@ -560,7 +557,7 @@ Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable Matrix_Push(); - limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; rot = actorDrawTable[limbIndex]; @@ -584,31 +581,30 @@ Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable } if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, gfx); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, gfx); } return gfx; } -#ifdef NON_MATCHING -// Some regalloc, and nonmatching stack usage -Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, +Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; + char pad[4]; + Gfx* dList; Vec3f pos; Vec3s rot; - Gfx* dList; - if (limbTable == NULL) { + if (skeleton == NULL) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_draw2():skelがNULLです。NULLを返します。\n"); osSyncPrintf(VT_RST); @@ -617,11 +613,11 @@ Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawT Matrix_Push(); - limbEntry = SEGMENTED_TO_VIRTUAL(*limbTable); + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); - pos.x = limbEntry->translation.x; - pos.y = limbEntry->translation.y; - pos.z = limbEntry->translation.z; + pos.x = actorDrawTable->x; + pos.y = actorDrawTable->y; + pos.z = actorDrawTable->z; rot = actorDrawTable[1]; @@ -640,7 +636,7 @@ Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawT } if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, gfx); } @@ -648,11 +644,8 @@ Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawT return gfx; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_Draw2.s") -#endif -Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, u32* limbTable, Vec3s* actorDrawTable, +Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Mtx** mtx, Gfx* gfx) { SkelLimbEntry* limbEntry; @@ -664,7 +657,7 @@ Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab Matrix_Push(); - limbEntry = SEGMENTED_TO_VIRTUAL(limbTable[limbIndex]); + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; rot = actorDrawTable[limbIndex]; @@ -687,25 +680,25 @@ Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, u32* limbTab } } } - if (appendDlistFunc != 0) { + if (appendDlistFunc != NULL) { appendDlistFunc(globalCtx, limbIndex, &dList2, &rot, actor, &gfx); } if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, mtx, gfx); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->nextLimbIndex, limbTable, actorDrawTable, updateMtxFunc, + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, mtx, gfx); } return gfx; } -Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDrawTable, s32 dListCount, +Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 dListCount, SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; @@ -717,7 +710,7 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDra Mtx* mtx; mtx = Graph_Alloc(globalCtx->state.gfxCtx, dListCount * sizeof(*mtx)); - if (limbTable == NULL) { + if (skeleton == NULL) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Si2_draw2_SV():skelがNULLです。NULLを返します。\n"); osSyncPrintf(VT_RST); @@ -726,7 +719,7 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDra gSPSegment(gfx++, 0xD, mtx); Matrix_Push(); - limbEntry = SEGMENTED_TO_VIRTUAL(*limbTable); + limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); pos.x = actorDrawTable->x; pos.y = actorDrawTable->y; @@ -754,7 +747,7 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDra appendDlistFunc(globalCtx, 1, &dList2, &rot, actor, &gfx); } if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, limbTable, actorDrawTable, updateMtxFunc, + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, appendDlistFunc, actor, &mtx, gfx); } @@ -766,22 +759,22 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, u32* limbTable, Vec3s* actorDra // Seems to be some kind of rotations update, somewhat large. #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A29BC.s") -s16 func_800A2DBC(u32 animationSeg) { - AnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); +s16 func_800A2DBC(GenericAnimationHeader* animationSeg) { + GenericAnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); return animation->unk_02; } -s16 func_800A2DF4(u32 animationSeg) { - AnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); +s16 func_800A2DF4(GenericAnimationHeader* animationSeg) { + GenericAnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); return animation->frameCount; } -s16 func_800A2E2C(u32 animationSeg) { - AnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); +s16 func_800A2E2C(GenericAnimationHeader* animationSeg) { + GenericAnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); - return (s16)(animation->frameCount - 1); + return animation->frameCount - 1; } // Very large update function @@ -805,7 +798,7 @@ AnimationEntry* SkelAnime_NextEntry(AnimationContext* animationCtx, AnimationTyp AnimationEntry* entry; s16 index = animationCtx->animationCount; - if (index >= 0x32) { + if (index >= ANIMATION_ENTRY_MAX) { return NULL; } animationCtx->animationCount = index + 1; @@ -818,12 +811,13 @@ AnimationEntry* SkelAnime_NextEntry(AnimationContext* animationCtx, AnimationTyp * The next 6 functions are coordinate with the AnimationType enum */ -void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s32 limbCount, void* ram) { +void SkelAnime_LoadLinkAnimetion(GlobalContext* globalCtx, LinkAnimetionEntry* linkAnimetionSeg, s32 frame, s32 limbCount, + void* ram) { AnimationEntry* entry; LinkAnimetionEntry* linkAnimetionEntry; char pad[4]; - entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE0); + entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_LINKANIMETION); if (entry != NULL) { linkAnimetionEntry = SEGMENTED_TO_VIRTUAL(linkAnimetionSeg); @@ -835,7 +829,7 @@ void func_800A336C(GlobalContext* globalCtx, u32 linkAnimetionSeg, s32 frame, s3 } } -void func_800A3478(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src) { +void SkelAnime_LoadAnimationType1(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src) { AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE1); if (entry != NULL) { entry->types.type1.unk_00 = D_801600B0; @@ -845,18 +839,18 @@ void func_800A3478(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* sr } } -void func_800A34DC(GlobalContext* globalCtx, s32 arg1, Vec3s* arg2, Vec3s* arg3, f32 arg4) { +void SkelAnime_LoadAnimationType2(GlobalContext* globalCtx, s32 limbCount, Vec3s* arg2, Vec3s* arg3, f32 arg4) { AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE2); if (entry != NULL) { entry->types.type2.unk_00 = D_801600B0; - entry->types.type2.unk_01 = arg1; + entry->types.type2.limbCount = limbCount; entry->types.type2.unk_04 = arg2; entry->types.type2.unk_08 = arg3; entry->types.type2.unk_0C = arg4; } } -void func_800A3548(GlobalContext* globalCtx, s32 vecCount, s32 dst, s32 src, s32 index) { +void SkelAnime_LoadAnimationType3(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index) { AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE3); if (entry != NULL) { entry->types.type3.unk_00 = D_801600B0; @@ -867,7 +861,7 @@ void func_800A3548(GlobalContext* globalCtx, s32 vecCount, s32 dst, s32 src, s32 } } -void func_800A35B4(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index) { +void SkelAnime_LoadAnimationType4(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index) { AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE4); if (entry != NULL) { entry->types.type4.unk_00 = D_801600B0; @@ -878,7 +872,7 @@ void func_800A35B4(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* sr } } -void func_800A3620(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3) { +void SkelAnime_LoadAnimationType5(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3) { AnimationEntry* entry = SkelAnime_NextEntry(&globalCtx->animationCtx, ANIMATION_TYPE5); if (entry != NULL) { entry->types.type5.actor = actor; @@ -889,11 +883,11 @@ void func_800A3620(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, /* The next functions are callbacks to loading animations */ -void func_800A3678(GlobalContext* globalCtx, AnimationEntryType0* entry) { +void SkelAnime_LinkAnimetionLoaded(GlobalContext* globalCtx, AnimationEntryType0* entry) { osRecvMesg(&entry->msgQueue, NULL, OS_MESG_BLOCK); } -void func_800A36A4(GlobalContext* globalCtx, AnimationEntryType1* entry) { +void SkelAnime_AnimationType1Loaded(GlobalContext* globalCtx, AnimationEntryType1* entry) { s32 i; Vec3s* dst; Vec3s* src; @@ -908,13 +902,13 @@ void func_800A36A4(GlobalContext* globalCtx, AnimationEntryType1* entry) { } } -void func_800A3714(GlobalContext* globalCtx, AnimationEntryType2* entry) { +void SkelAnime_AnimationType2Loaded(GlobalContext* globalCtx, AnimationEntryType2* entry) { if ((entry->unk_00 & D_8012A480) == 0) { - func_800A2E70(entry->unk_01, entry->unk_04, entry->unk_04, entry->unk_08, entry->unk_0C); + func_800A2E70(entry->limbCount, entry->unk_04, entry->unk_04, entry->unk_08, entry->unk_0C); } } -void func_800A3770(GlobalContext* globalCtx, AnimationEntryType3* entry) { +void SkelAnime_AnimationType3Loaded(GlobalContext* globalCtx, AnimationEntryType3* entry) { s32 i; Vec3s* dst; Vec3s* src; @@ -930,7 +924,7 @@ void func_800A3770(GlobalContext* globalCtx, AnimationEntryType3* entry) { } } -void func_800A37F0(GlobalContext* globalCtx, AnimationEntryType4* entry) { +void SkelAnime_AnimationType4Loaded(GlobalContext* globalCtx, AnimationEntryType4* entry) { s32 i; Vec3s* dst; Vec3s* src; @@ -946,7 +940,7 @@ void func_800A37F0(GlobalContext* globalCtx, AnimationEntryType4* entry) { } } -void func_800A3874(GlobalContext* globalCtx, AnimationEntryType5* entry) { +void SkelAnime_AnimationType5Loaded(GlobalContext* globalCtx, AnimationEntryType5* entry) { char pad[4]; Actor* actor = entry->actor; Vec3f pos; @@ -968,16 +962,16 @@ void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) { D_8012A480 = 0; } -void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32* animation, s32 flags, - Vec3s* actorDrawTbl, Vec3s* arg6, s32 limbBufCount) { +void SkelAnime_InitLinkAnimetion(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, + LinkAnimetionEntry* linkAnimetionEntrySeg, s32 flags, Vec3s* actorDrawTbl, Vec3s* arg6, s32 limbBufCount) { char pad[8]; - SkelAnimeLimbHeader* limbHeader; + SkeletonHeader* skeletonHeader; size_t allocSize; s32 limbCount; s32 headerCount; - limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); - headerCount = limbHeader->limbCount; + skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg); + headerCount = skeletonHeader->limbCount; skelAnime->unk_34 = flags; limbCount = (flags & 2) ? headerCount : 1; @@ -988,11 +982,11 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeade limbCount += headerCount; } - skelAnime->limbCount = (u8)limbCount; - skelAnime->dListCount = limbHeader->dListCount; + skelAnime->limbCount = limbCount; + skelAnime->dListCount = skeletonHeader->dListCount; allocSize = limbCount * sizeof(Vec3s); - skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); + skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->skeletonSeg); if (flags & 8) { allocSize += 2; @@ -1017,7 +1011,7 @@ void func_800A39AC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeade osSyncPrintf(VT_RST); } - func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, 0.0f, 0, 0.0f); + SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, 1.0f, 0.0f, 0.0f, 0, 0.0f); } void func_800A3B8C(SkelAnime* skelAnime) { @@ -1043,7 +1037,7 @@ s32 func_800A3BE4(GlobalContext* globalCtx, SkelAnime* skelAnime) { func_800A3B8C(skelAnime); } - func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, 1.0f - (skelAnime->unk_28 / prevUnk28)); return 0; } @@ -1051,7 +1045,7 @@ s32 func_800A3BE4(GlobalContext* globalCtx, SkelAnime* skelAnime) { void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) { f32 updateRate; - func_800A336C(globalCtx, skelAnime->animCurrent, skelAnime->animCurrentFrame, skelAnime->limbCount, + SkelAnime_LoadLinkAnimetion(globalCtx, skelAnime->linkAnimetionSeg, skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); if (skelAnime->unk_28 != 0) { updateRate = R_UPDATE_RATE * 0.5f; @@ -1060,7 +1054,7 @@ void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) { skelAnime->unk_28 = 0.0f; return; } - func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, skelAnime->unk_28); + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, skelAnime->unk_28); } } @@ -1104,97 +1098,97 @@ void func_800A3EE8(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) { } #ifdef NON_MATCHING -void func_800A3F08(GlobalContext* globalCtx, SkelAnime* skelAnime, u32* animation, f32 playbackSpeed, f32 arg4, - f32 frameCount, u8 arg6, f32 arg7) { +void SkelAnime_LinkChangeAnimation(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed, + f32 frame, f32 frameCount, u8 arg6, f32 arg7) { skelAnime->unk_01 = arg6; - if ((arg7 != 0.0f) && ((animation == skelAnime->animCurrent) || (arg4 != skelAnime->animCurrentFrame))) { + if ((arg7 != 0.0f) && ((linkAnimetionEntrySeg == skelAnime->linkAnimetionSeg) || (frame != skelAnime->animCurrentFrame))) { if (arg7 < 0.0f) { func_800A3B8C(skelAnime); SkelAnime_CopyVec3s(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); arg7 = -arg7; } else { skelAnime->animUpdate = &func_800A3BE4; - func_800A336C(globalCtx, animation, (s32)arg4, skelAnime->limbCount, skelAnime->unk_24); + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); } skelAnime->unk_28 = 1.0f; skelAnime->unk_2C = 1.0f / arg7; } else { func_800A3B8C(skelAnime); - func_800A336C(globalCtx, animation, (s32)arg4, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); skelAnime->unk_28 = 0.0f; } skelAnime->animCurrentFrame = 0.0f; - skelAnime->unk_0C = arg4; - skelAnime->animCurrentFrame = arg4; + skelAnime->unk_0C = frame; + skelAnime->animCurrentFrame = frame; skelAnime->animFrameCount = frameCount; - skelAnime->unk_14 = func_800A1FC8(animation); + skelAnime->unk_14 = func_800A1FC8(&linkAnimetionEntrySeg->genericHeader); skelAnime->animPlaybackSpeed = playbackSpeed; } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A3F08.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_LinkChangeAnimation.s") #endif -void func_800A407C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) { - func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f); +void func_800A407C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg) { + SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, 1.0f, 0.0f, SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 2, 0.0f); } -void func_800A40DC(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { - func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(animation), 2, +void func_800A40DC(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed) { + SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 2, 0.0f); } -void func_800A4140(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation) { - func_800A3F08(globalCtx, skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 0, 0.0f); +void func_800A4140(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg) { + SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, 1.0f, 0.0f, SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 0, 0.0f); } -void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { - func_800A3F08(globalCtx, skelAnime, animation, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(animation), 0, +void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed) { + SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 0, 0.0f); } void func_800A41FC(GlobalContext* globalCtx, SkelAnime* skelAnime) { - func_800A3478(globalCtx, skelAnime->limbCount, skelAnime->unk_24, skelAnime->actorDrawTbl); + SkelAnime_LoadAnimationType1(globalCtx, skelAnime->limbCount, skelAnime->unk_24, skelAnime->actorDrawTbl); } void func_800A422C(GlobalContext* globalCtx, SkelAnime* skelAnime) { - func_800A3478(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24); + SkelAnime_LoadAnimationType1(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24); } -void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 frame) { - func_800A336C(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); +void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame) { + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); } -void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 frame) { - func_800A336C(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); +void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame) { + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); } void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) { - func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, arg2); + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, arg2); } -void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animationSeg, f32 frame, s32 arg4, f32 arg5, - f32 arg6, s32 arg7) { - s32 alignedAddr; - func_800A336C(globalCtx, animationSeg, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); +void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame, LinkAnimetionEntry* linkAnimetionEntrySeg2, + f32 arg5, f32 arg6, Vec3s* arg7) { + Vec3s* alignedArg7; + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); - alignedAddr = ALIGN16(arg7); + alignedArg7 = (Vec3s*)ALIGN16((u32)arg7); - func_800A336C(globalCtx, arg4, (s32)arg5, skelAnime->limbCount, alignedAddr); - func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, alignedAddr, arg6); + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg2, (s32)arg5, skelAnime->limbCount, alignedArg7); + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, alignedArg7, arg6); } -void func_800A43B8(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 animation, f32 frame, s32 arg4, f32 arg5, - f32 arg6, s32 arg7) { - s32 alignedAddr; +void func_800A43B8(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame, LinkAnimetionEntry* linkAnimetionEntrySeg2, + f32 arg5, f32 arg6, Vec3s* arg7) { + Vec3s* alignedArg7; - func_800A336C(globalCtx, animation, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); - alignedAddr = ALIGN16(arg7); + alignedArg7 = (Vec3s*)ALIGN16((u32)arg7); - func_800A336C(globalCtx, arg4, (s32)arg5, skelAnime->limbCount, alignedAddr); - func_800A34DC(globalCtx, skelAnime->limbCount, skelAnime->unk_24, alignedAddr, arg6); + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg2, (s32)arg5, skelAnime->limbCount, alignedArg7); + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->unk_24, alignedArg7, arg6); } void func_800A4454(SkelAnime* skelAnime) { @@ -1236,13 +1230,13 @@ s32 func_800A4530(SkelAnime* skelAnime, f32 arg1) { return func_800A4478(skelAnime, arg1, updateRate); } -void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32 animation, - Vec3s* actorDrawTable, s32 arg5, s32 limbCount) { - SkelAnimeLimbHeader* limbHeader; +void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, + AnimationHeader* animationSeg, Vec3s* actorDrawTable, Vec3s* arg5, s32 limbCount) { + SkeletonHeader* skeletonHeader; - limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); - skelAnime->limbCount = limbHeader->limbCount + 1; - skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); + skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg); + skelAnime->limbCount = skeletonHeader->limbCount + 1; + skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->skeletonSeg); if (actorDrawTable == NULL) { skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 2968); @@ -1261,19 +1255,19 @@ void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHead osSyncPrintf(VT_RST); } - if (animation != 0) { - SkelAnime_ChangeAnimationDefault(skelAnime, animation); + if (animationSeg != NULL) { + SkelAnime_ChangeAnimationDefault(skelAnime, animationSeg); } } -void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32 animation, - Vec3s* actorDrawTable, s32 arg5, s32 limbCount) { - SkelAnimeLimbHeader* limbHeader; +void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, + AnimationHeader* animationSeg, Vec3s* actorDrawTable, Vec3s* arg5, s32 limbCount) { + SkeletonHeader* skeletonHeader; - limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); - skelAnime->limbCount = limbHeader->limbCount + 1; - skelAnime->dListCount = limbHeader->dListCount; - skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); + skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg); + skelAnime->limbCount = skeletonHeader->limbCount + 1; + skelAnime->dListCount = skeletonHeader->dListCount; + skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->skeletonSeg); if (actorDrawTable == NULL) { skelAnime->actorDrawTbl = @@ -1295,17 +1289,18 @@ void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHe osSyncPrintf(VT_RST); } - if (animation != 0) { - SkelAnime_ChangeAnimationDefault(skelAnime, animation); + if (animationSeg != NULL) { + SkelAnime_ChangeAnimationDefault(skelAnime, animationSeg); } } -void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limbHeaderSeg, u32 animation) { - SkelAnimeLimbHeader* limbHeader; +void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, + AnimationHeader* animationSeg) { + SkeletonHeader* skeletonHeader; - limbHeader = SEGMENTED_TO_VIRTUAL(limbHeaderSeg); - skelAnime->limbCount = limbHeader->limbCount + 1; - skelAnime->limbIndex = SEGMENTED_TO_VIRTUAL(limbHeader->limbIndexSeg); + skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg); + skelAnime->limbCount = skeletonHeader->limbCount + 1; + skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->skeletonSeg); skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 3120); skelAnime->unk_24 = @@ -1317,8 +1312,8 @@ void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, u32 limb osSyncPrintf(VT_RST); } - if (animation != 0) { - SkelAnime_ChangeAnimationDefault(skelAnime, animation); + if (animationSeg != NULL) { + SkelAnime_ChangeAnimationDefault(skelAnime, animationSeg); } } @@ -1390,6 +1385,7 @@ s32 func_800A4AD8(SkelAnime* skelAnime) { #endif #ifdef NON_MATCHING +// regalloc void func_800A4C58(SkelAnime* skelAnime) { char pad[6]; f32 temp_f0; @@ -1398,9 +1394,9 @@ void func_800A4C58(SkelAnime* skelAnime) { s32 temp_f8; f32 temp_f2; - SkelAnime_AnimateFrame(skelAnime->animCurrent, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, + SkelAnime_AnimateFrame(skelAnime->animCurrentSeg, skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); - if ((skelAnime->unk_01 & 1) != 0) { + if (skelAnime->unk_01) { temp_f8 = (s32)skelAnime->animCurrentFrame; temp_f10 = temp_f8; temp_f8++; @@ -1408,7 +1404,7 @@ void func_800A4C58(SkelAnime* skelAnime) { if (temp_f8 >= (s32)skelAnime->unk_14) { temp_f8 = 0; } - SkelAnime_AnimateFrame(skelAnime->animCurrent, temp_f8, skelAnime->limbCount, sp38); + SkelAnime_AnimateFrame(skelAnime->animCurrentSeg, temp_f8, skelAnime->limbCount, sp38); func_800A2E70(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, sp38, temp_f2); } if (skelAnime->unk_28 != 0) { @@ -1426,9 +1422,9 @@ void func_800A4C58(SkelAnime* skelAnime) { #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4C58.s") #endif -#ifdef NON_MATCHING s32 func_800A4D9C(SkelAnime* skelAnime) { - skelAnime->animCurrentFrame += (R_UPDATE_RATE * 0.33333334f) + skelAnime->animPlaybackSpeed; + f32 updateRate = R_UPDATE_RATE * 0.33333334f; + skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * updateRate; if (skelAnime->animCurrentFrame < 0.0f) { skelAnime->animCurrentFrame += skelAnime->unk_14; } else if (skelAnime->unk_14 <= skelAnime->animCurrentFrame) { @@ -1437,26 +1433,19 @@ s32 func_800A4D9C(SkelAnime* skelAnime) { func_800A4C58(skelAnime); return 0; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4D9C.s") -#endif -#ifdef NON_MATCHING s32 func_800A4E38(SkelAnime* skelAnime) { - skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * (R_UPDATE_RATE * 0.33333334f); + f32 updateRate = R_UPDATE_RATE * 0.33333334f; + skelAnime->animCurrentFrame += skelAnime->animPlaybackSpeed * updateRate; if (skelAnime->animCurrentFrame < skelAnime->unk_0C) { skelAnime->animCurrentFrame = (skelAnime->animCurrentFrame - skelAnime->unk_0C) + skelAnime->animFrameCount; - } else { - if (skelAnime->animFrameCount <= skelAnime->animCurrentFrame) { - skelAnime->animCurrentFrame = (skelAnime->animCurrentFrame - skelAnime->animFrameCount) + skelAnime->unk_0C; - } + } else if (skelAnime->animFrameCount <= skelAnime->animCurrentFrame) { + skelAnime->animCurrentFrame = (skelAnime->animCurrentFrame - skelAnime->animFrameCount) + skelAnime->unk_0C; } + func_800A4C58(skelAnime); return 0; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A4E38.s") -#endif s32 func_800A4EE0(SkelAnime* skelAnime) { f32 temp_f14; @@ -1464,7 +1453,7 @@ s32 func_800A4EE0(SkelAnime* skelAnime) { temp_f14 = R_UPDATE_RATE * 0.33333334f; if (skelAnime->animCurrentFrame == skelAnime->animFrameCount) { - SkelAnime_AnimateFrame(skelAnime->animCurrent, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, + SkelAnime_AnimateFrame(skelAnime->animCurrentSeg, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, skelAnime->actorDrawTbl); func_800A4C58(skelAnime); return 1; @@ -1485,79 +1474,76 @@ s32 func_800A4EE0(SkelAnime* skelAnime) { return 0; } -#ifdef NON_MATCHING -void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, u32* animation, f32 playbackSpeed, f32 unk0, f32 frameCount, - u8 unk1, f32 transitionRate, s8 unk2) { +void SkelAnime_ChangeAnimationImpl(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 playbackSpeed, f32 frame, + f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2) { skelAnime->unk_01 = unk1; - if ((transitionRate != 0.0f) && ((animation != skelAnime->animCurrent) || (unk0 != skelAnime->animCurrentFrame))) { - if (transitionRate < 0.0f) { + if ((transitionRate != 0.0f) && + ((animationSeg != skelAnime->animCurrentSeg) || (frame != skelAnime->animCurrentFrame))) { + if (transitionRate < 0) { func_800A49B0(skelAnime); SkelAnime_CopyVec3s(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); transitionRate = -transitionRate; } else { if (unk2 != 0) { - skelAnime->animUpdate = (void*)&func_800A4AD8; + skelAnime->animUpdate = &func_800A4AD8; skelAnime->unk_03 = unk2; } else { - skelAnime->animUpdate = (void*)&func_800A4A20; + skelAnime->animUpdate = &func_800A4A20; } - SkelAnime_AnimateFrame(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_AnimateFrame(animationSeg, frame, skelAnime->limbCount, skelAnime->unk_24); } skelAnime->unk_28 = 1.0f; skelAnime->unk_2C = 1.0f / transitionRate; } else { func_800A49B0(skelAnime); - SkelAnime_AnimateFrame(animation, (s32)unk0, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_AnimateFrame(animationSeg, frame, skelAnime->limbCount, skelAnime->actorDrawTbl); skelAnime->unk_28 = 0.0f; } - skelAnime->animCurrent = animation; - skelAnime->unk_0C = unk0; + skelAnime->animCurrentSeg = animationSeg; + skelAnime->unk_0C = frame; skelAnime->animFrameCount = frameCount; - skelAnime->unk_14 = func_800A1FC8(animation); + skelAnime->unk_14 = func_800A1FC8(&animationSeg->genericHeader); if (skelAnime->unk_01 >= 4) { skelAnime->animCurrentFrame = 0.0f; } else { - skelAnime->animCurrentFrame = unk0; + skelAnime->animCurrentFrame = frame; if (skelAnime->unk_01 < 2) { skelAnime->animFrameCount = skelAnime->unk_14 - 1.0f; } } skelAnime->animPlaybackSpeed = playbackSpeed; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/SkelAnime_ChangeAnimationImpl.s") -#endif -void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed, f32 unk0, f32 frameCount, - u8 unk1, f32 transitionRate) { - SkelAnime_ChangeAnimationImpl(skelAnime, animation, playbackSpeed, unk0, frameCount, unk1, transitionRate, 0); +void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 playbackSpeed, f32 frame, + f32 frameCount, u8 unk1, f32 transitionRate) { + SkelAnime_ChangeAnimationImpl(skelAnime, animationSeg, playbackSpeed, frame, frameCount, unk1, transitionRate, 0); } -void func_800A51E8(SkelAnime* skelAnime, u32 animation) { - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f); +void func_800A51E8(SkelAnime* skelAnime, AnimationHeader* animationSeg) { + SkelAnime_ChangeAnimation(skelAnime, animationSeg, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animationSeg->genericHeader), 2, 0.0f); } -void func_800A5240(SkelAnime* skelAnime, u32 animation, f32 transitionRate) { - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0, SkelAnime_GetFrameCount(animation), 2, +void func_800A5240(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 transitionRate) { + SkelAnime_ChangeAnimation(skelAnime, animationSeg, 1.0f, 0, SkelAnime_GetFrameCount(&animationSeg->genericHeader), 2, transitionRate); } -void func_800A529C(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { - SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(animation), 2, +void func_800A529C(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 playbackSpeed) { + SkelAnime_ChangeAnimation(skelAnime, animationSeg, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(&animationSeg->genericHeader), 2, 0.0f); } -void SkelAnime_ChangeAnimationDefault(SkelAnime* skelAnime, u32 animation) { - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 0, 0.0f); +void SkelAnime_ChangeAnimationDefault(SkelAnime* skelAnime, AnimationHeader* animationSeg) { + SkelAnime_ChangeAnimation(skelAnime, animationSeg, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animationSeg->genericHeader), 0, 0.0f); } -void SkelAnime_ChangeAnimationTransitionRate(SkelAnime* skelAnime, u32 animation, f32 transitionRate) { - SkelAnime_ChangeAnimation(skelAnime, animation, 1.0f, 0.0f, 0.0f, 0, transitionRate); +void SkelAnime_ChangeAnimationTransitionRate(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 transitionRate) { + SkelAnime_ChangeAnimation(skelAnime, animationSeg, 1.0f, 0.0f, 0.0f, 0, transitionRate); } -void SkelAnime_ChangeAnimationPlaybackSpeed(SkelAnime* skelAnime, u32 animation, f32 playbackSpeed) { - SkelAnime_ChangeAnimation(skelAnime, animation, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(animation), 0, +void SkelAnime_ChangeAnimationPlaybackSpeed(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 playbackSpeed) { + SkelAnime_ChangeAnimation(skelAnime, animationSeg, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(&animationSeg->genericHeader), 0, 0.0f); } @@ -1570,12 +1556,10 @@ void func_800A53DC(SkelAnime* skelAnime) { #ifdef NON_MATCHING // regalloc void func_800A5408(SkelAnime* skelAnime) { - f32 animPlaybackSpeed = skelAnime->animPlaybackSpeed; - f32 unk_C = skelAnime->unk_0C; f32 frameCount = skelAnime->animFrameCount; - skelAnime->animFrameCount = unk_C; - skelAnime->animPlaybackSpeed = -animPlaybackSpeed; + skelAnime->animFrameCount = skelAnime->unk_0C; + skelAnime->animPlaybackSpeed = -skelAnime->animPlaybackSpeed; skelAnime->unk_0C = frameCount; } #else @@ -1630,7 +1614,7 @@ void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) { skelAnime->unk_3C = skelAnime->actorDrawTbl->z; skelAnime->actorDrawTbl->z = skelAnime->unk_42; if (skelAnime->unk_35 & 2) { - if ((skelAnime->unk_35 & 0x10) != 0) { + if (skelAnime->unk_35 & 0x10) { pos->y = 0.0f; } else { pos->y = skelAnime->actorDrawTbl->y - skelAnime->unk_3A; diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 318d74e3c..d0b335ed3 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -51,10 +51,10 @@ const ActorInit Demo_Go_InitVars = { (ActorFunc)DemoGo_Draw, }; -extern UNK_TYPE D_060029A8; -extern UNK_TYPE D_06004930; +extern AnimationHeader D_060029A8; +extern AnimationHeader D_06004930; extern UNK_TYPE D_0600E680; -extern UNK_TYPE D_0600FEF0; +extern SkeletonHeader D_0600FEF0; UNK_TYPE func_8097C870(DemoGo* this) { s32 ret; @@ -246,9 +246,9 @@ void func_8097CEEC(DemoGo* this, GlobalContext* globalCtx) { } void func_8097CF20(DemoGo* this, GlobalContext* globalCtx, UNK_TYPE arg2) { - UNK_PTR animation = &D_060029A8; + AnimationHeader* animation = &D_060029A8; if (arg2 != 0) { - SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 0, + SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animation->genericHeader), 0, -8.0f); this->action = 5; this->unk_19C = 0.0f; @@ -316,12 +316,12 @@ void DemoGo_Update(DemoGo* this, GlobalContext* globalCtx) { } void DemoGo_Init(DemoGo* this, GlobalContext* globalCtx) { - UNK_PTR animation = &D_06004930; s16 pad; + AnimationHeader* animation = &D_06004930; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f); SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600FEF0, 0, 0, 0, 0); - SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f); + SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animation->genericHeader), 2, 0.0f); this->action = 0; } @@ -343,7 +343,7 @@ void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8)); gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9)); - SkelAnime_DrawSV(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL, + SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL, &this->actor); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_go.c", 746); diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/src/overlays/actors/ovl_En_Bird/z_en_bird.c index 93c064596..7869933fb 100644 --- a/src/overlays/actors/ovl_En_Bird/z_en_bird.c +++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.c @@ -150,5 +150,5 @@ void EnBird_Update(EnBird* this, GlobalContext* globalCtx) { } void EnBird_Draw(EnBird* this, GlobalContext* globalCtx) { - SkelAnime_Draw(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, 0, NULL, NULL); + SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, 0, NULL, NULL); } diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index d3839913f..782b572a6 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -80,13 +80,13 @@ typedef enum { } DogBehavior; extern UNK_PTR D_06007290; -extern UNK_PTR D_06001368; -extern UNK_PTR D_06000D78; -extern UNK_PTR D_06000278; +extern AnimationHeader D_06001368; +extern AnimationHeader D_06000D78; +extern AnimationHeader D_06000278; static void EnDog_PlayWalkSFX(EnDog* this) { - u32* walk = &D_06001368; - if (this->skelAnime.animCurrent == walk) { + AnimationHeader* walk = &D_06001368; + if (this->skelAnime.animCurrentSeg == walk) { if ((this->skelAnime.animCurrentFrame == 1.0f) || (this->skelAnime.animCurrentFrame == 7.0f)) { Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHIBI_WALK); } @@ -94,8 +94,8 @@ static void EnDog_PlayWalkSFX(EnDog* this) { } static void EnDog_PlayRunSFX(EnDog* this) { - u32* run = &D_06000D78; - if (this->skelAnime.animCurrent == run) { + AnimationHeader* run = &D_06000D78; + if (this->skelAnime.animCurrentSeg == run) { if ((this->skelAnime.animCurrentFrame == 2.0f) || (this->skelAnime.animCurrentFrame == 4.0f)) { Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHIBI_WALK); } @@ -103,8 +103,8 @@ static void EnDog_PlayRunSFX(EnDog* this) { } static void EnDog_PlayBarkSFX(EnDog* this) { - u32* bark = &D_06000278; - if (this->skelAnime.animCurrent == bark) { + AnimationHeader* bark = &D_06000278; + if (this->skelAnime.animCurrentSeg == bark) { if ((this->skelAnime.animCurrentFrame == 13.0f) || (this->skelAnime.animCurrentFrame == 19.0f)) { Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_BARK); } @@ -479,7 +479,7 @@ static void EnDog_Draw(EnDog* this, GlobalContext* globalCtx) { gDPSetEnvColor(gfxCtx->polyOpa.p++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g, colors[this->actor.params & 0xF].b, colors[this->actor.params & 0xF].a); - SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, EnDog_Callback1, EnDog_Callback2, &this->actor); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_en_dog.c", 994); } diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index db449cdb6..30a64142a 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -191,6 +191,6 @@ static void EnMs_Update(EnMs* this, GlobalContext* globalCtx) { void EnMs_Draw(EnMs* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0, + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0, 0, &this->actor); } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 7dd4f8da3..d16780c51 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -31,16 +31,16 @@ extern UNK_TYPE D_04052DB0; extern UNK_TYPE D_040531B0; extern UNK_TYPE D_040535B0; extern UNK_TYPE D_040539B0; -extern UNK_TYPE D_06001144; -extern UNK_TYPE D_06001FA8; -extern UNK_TYPE D_06002F84; +extern AnimationHeader D_06001144; +extern AnimationHeader D_06001FA8; +extern AnimationHeader D_06002F84; extern UNK_TYPE D_06003B40; extern UNK_TYPE D_06004340; extern UNK_TYPE D_06004B40; -extern UNK_TYPE D_0600ACE0; -extern UNK_TYPE D_0600BC90; -extern UNK_TYPE D_0600BCA0; -extern UNK_TYPE D_0600BE40; +extern Gfx D_0600ACE0[]; +extern Gfx D_0600BC90[]; +extern Gfx D_0600BCA0[]; +extern SkeletonHeader D_0600BE40; const ActorInit En_Tk_InitVars = { ACTOR_EN_TK, @@ -136,7 +136,7 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) { if (eff->active != 0) { if (gfxSetup == 0) { gfxCtx->polyXlu.p = func_80093774(gfxCtx->polyXlu.p, 0); - gSPDisplayList(gfxCtx->polyXlu.p++, &D_0600BC90); + gSPDisplayList(gfxCtx->polyXlu.p++, D_0600BC90); gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x64, 0x3C, 0x14, 0x00); gfxSetup = 1; } @@ -154,7 +154,7 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) { imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(images) / eff->timeTotal); gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(images[imageIdx])); - gSPDisplayList(gfxCtx->polyXlu.p++, &D_0600BCA0); + gSPDisplayList(gfxCtx->polyXlu.p++, D_0600BCA0); } eff++; } @@ -186,9 +186,9 @@ static EnTk_SubActorStruct98Init D_80B1D534 = { }; void EnTk_RestAnim(EnTk* this, GlobalContext* globalCtx) { - UNK_PTR anim = &D_06002F84; + AnimationHeader* anim = &D_06002F84; - SkelAnime_ChangeAnimation(&this->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06002F84), 0, + SkelAnime_ChangeAnimation(&this->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), 0, -10.f); this->actionCountdown = Math_Rand_S16Offset(60, 60); @@ -196,18 +196,18 @@ void EnTk_RestAnim(EnTk* this, GlobalContext* globalCtx) { } void EnTk_WalkAnim(EnTk* this, GlobalContext* globalCtx) { - UNK_PTR anim = &D_06001FA8; + AnimationHeader* anim = &D_06001FA8; - SkelAnime_ChangeAnimation(&this->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06002F84), 0, + SkelAnime_ChangeAnimation(&this->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), 0, -10.f); this->actionCountdown = Math_Rand_S16Offset(240, 240); } void EnTk_DigAnim(EnTk* this, GlobalContext* globalCtx) { - UNK_PTR anim = &D_06001144; + AnimationHeader* anim = &D_06001144; - SkelAnime_ChangeAnimation(&this->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06001144), 0, + SkelAnime_ChangeAnimation(&this->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06001144.genericHeader), 0, -10.f); if (EnTk_CheckNextSpot(this, globalCtx) >= 0) { @@ -306,7 +306,7 @@ f32 EnTk_Step(EnTk* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_WALK); } - if (this->skelAnim.animCurrent != (u32*)&D_06001FA8) { + if (this->skelAnim.animCurrentSeg != &D_06001FA8) { return 0.f; } @@ -504,12 +504,12 @@ void EnTk_DigEff(EnTk* this) { void EnTk_Init(EnTk* this, GlobalContext* globalCtx) { EnTk* thisAgain = this; - UNK_PTR anim = &D_06002F84; + AnimationHeader* anim = &D_06002F84; ActorShape_Init(&thisAgain->actor.shape, 0, ActorShadow_DrawFunc_Circle, 24.f); - SkelAnime_InitSV(globalCtx, &thisAgain->skelAnim, (u32)&D_0600BE40, 0, thisAgain->hz_22A, thisAgain->hz_296, 18); - SkelAnime_ChangeAnimation(&thisAgain->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06002F84), 0, + SkelAnime_InitSV(globalCtx, &thisAgain->skelAnim, &D_0600BE40, 0, thisAgain->hz_22A, thisAgain->hz_296, 18); + SkelAnime_ChangeAnimation(&thisAgain->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), 0, 0.f); ActorCollider_AllocCylinder(globalCtx, &thisAgain->collider); @@ -707,7 +707,7 @@ void func_80B1D200(GlobalContext* globalCtx) { gfxCtx = globalCtx->state.gfxCtx; func_800C6AC4(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1188); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_0600ACE0); + gSPDisplayList(gfxCtx->polyOpa.p++, D_0600ACE0); func_800C6B54(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1190); } @@ -769,7 +769,7 @@ void EnTk_Draw(EnTk* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(eyeImages[thisAgain->eyeImageIdx])); - SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.limbIndex, thisAgain->skelAnim.actorDrawTbl, + SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.skeleton, thisAgain->skelAnim.actorDrawTbl, thisAgain->skelAnim.dListCount, func_80B1D278, func_80B1D2E4, &thisAgain->actor); func_800C6B54(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1312); diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 521d74241..e4ac503ae 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -76,18 +76,17 @@ static InitChainEntry initChain[3] = { static Vec3f D_80B30D70 = { 0.0f, 0.0f, 0.0f }; -extern u32 D_06000EA4; -extern u32 D_06000590; -extern u32 D_0600299C; -extern u32 D_06008FB0; -extern u32 D_06009DB0; -extern u32 D_060019CC; -extern u32 D_06009520; -extern u32 D_06009244; -extern u32 D_060041F4; -extern u32 D_0600A054; -extern u32 D_06008688; -extern u32 D_04049210; +extern AnimationHeader D_06000EA4; +extern AnimationHeader D_06000590; +extern AnimationHeader D_0600299C; +extern SkeletonHeader D_06008FB0; +extern AnimationHeader D_06009DB0; +extern AnimationHeader D_060019CC; +extern AnimationHeader D_06009520; +extern AnimationHeader D_06009244; +extern AnimationHeader D_060041F4; +extern AnimationHeader D_0600A054; +extern Gfx D_06008688[]; static void EnWallmas_Init(EnWallmas* this, GlobalContext* globalCtx) { EnWallmas* this2 = this; @@ -137,7 +136,7 @@ static void EnWallmas_TimerInit(EnWallmas* this, GlobalContext* globalCtx) { static void EnWallmas_DropStart(EnWallmas* this, GlobalContext* globalCtx) { Player* player = PLAYER; - u32* objSegChangeAnime = &D_0600299C; + AnimationHeader* objSegChangeAnime = &D_0600299C; SkelAnime_ChangeAnimation(&this->skelAnime, objSegChangeAnime, 0.0f, 20.0f, (f32)SkelAnime_GetFrameCount(&D_0600299C), 2, 0.0f); @@ -152,8 +151,8 @@ static void EnWallmas_DropStart(EnWallmas* this, GlobalContext* globalCtx) { } static void EnWallmas_LandStart(EnWallmas* this, GlobalContext* globalCtx) { - u32* objSegFrameCount = &D_060019CC; - u32* objSegChangeAnime = &D_060019CC; + AnimationHeader* objSegFrameCount = &D_060019CC; + AnimationHeader* objSegChangeAnime = &D_060019CC; SkelAnime_ChangeAnimation(&this->skelAnime, objSegChangeAnime, 1.0f, 41.0f, SkelAnime_GetFrameCount(objSegFrameCount), 2, -3.0f); @@ -180,8 +179,8 @@ static void EnWallmas_JumpToCeilingStart(EnWallmas* this) { this->actor.speedXZ = 0.0f; } static void EnWallmas_ReturnToCeilingStart(EnWallmas* this) { - u32* objSegFrameCount = &D_060019CC; - u32* objSegChangeAnime = &D_060019CC; + AnimationHeader* objSegFrameCount = &D_060019CC; + AnimationHeader* objSegChangeAnime = &D_060019CC; this->timer = 0; this->actor.speedXZ = 0.0f; @@ -620,7 +619,7 @@ static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY); gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1489), G_MTX_LOAD); - gSPDisplayList(gfxCtx->polyOpa.p++, &D_06008688); + gSPDisplayList(gfxCtx->polyOpa.p++, D_06008688); Matrix_Pull(); func_800C6B54(&gfx, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1495); @@ -630,7 +629,7 @@ static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 static void EnWallmas_Draw(EnWallmas* this, GlobalContext* globalCtx) { if (this->actionFunc != (ActorFunc)&EnWallmas_WaitToDrop) { func_80093D18(globalCtx->state.gfxCtx); - SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, &EnWallMas_UpdatePos, &EnWallmas_DrawOpa, &this->actor); } -- cgit v1.2.3 From 18676c531d2a6ce1655529c15209aff24698693b Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Wed, 25 Mar 2020 10:59:49 -0500 Subject: set types for more segment addresses --- src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 2 +- src/overlays/actors/ovl_En_Bird/z_en_bird.c | 4 ++-- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 4 ++-- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 4 ++-- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index d0b335ed3..0ece8aada 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -320,7 +320,7 @@ void DemoGo_Init(DemoGo* this, GlobalContext* globalCtx) { AnimationHeader* animation = &D_06004930; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f); - SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600FEF0, 0, 0, 0, 0); + SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, NULL, NULL, 0); SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animation->genericHeader), 2, 0.0f); this->action = 0; } diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/src/overlays/actors/ovl_En_Bird/z_en_bird.c index bacd4051f..c3e30bb5c 100644 --- a/src/overlays/actors/ovl_En_Bird/z_en_bird.c +++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.c @@ -57,8 +57,8 @@ static InitChainEntry initChain[] = { ICHAIN_F32(unk_4C, 5600, ICHAIN_STOP), }; -extern u32 D_0600006C; -extern u32 D_06002190; +extern AnimationHeader D_0600006C; +extern SkeletonHeader D_06002190; void EnBird_SetNewUpdate(EnBird* this, ActorFunc newUpdateFunc) { this->updateFunc = newUpdateFunc; diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index 782b572a6..396a07b31 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -79,7 +79,7 @@ typedef enum { /* 0x06 */ DOG_BOW_2, } DogBehavior; -extern UNK_PTR D_06007290; +extern SkeletonHeader D_06007290; extern AnimationHeader D_06001368; extern AnimationHeader D_06000D78; extern AnimationHeader D_06000278; @@ -242,7 +242,7 @@ static void EnDog_Init(EnDog* this, GlobalContext* globalCtx) { collider = &this->collider; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 24.0f); skelAnime = &this->skelAnime; - SkelAnime_InitSV(globalCtx, skelAnime, &D_06007290, 0, &this->unk_1F4, &this->unk_242, 13); + SkelAnime_InitSV(globalCtx, skelAnime, &D_06007290, NULL, &this->unk_1F4, &this->unk_242, 13); func_80034EC0(skelAnime, animations, 0); if ((this->actor.params & 0x8000) == 0) { diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 30a64142a..6e08c53b7 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -63,8 +63,8 @@ static InitChainEntry initChain[] = { ICHAIN_F32(unk_4C, 500, ICHAIN_STOP), }; -extern D_060005EC; -extern D_06003DC0; +extern AnimationHeader D_060005EC; +extern SkeletonHeader D_06003DC0; static void EnMs_SetOfferText(EnMs* this, GlobalContext* globalCtx) { this->actor.textId = Text_GetFaceReaction(globalCtx, 0x1B); diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index d16780c51..6f69317a0 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -508,7 +508,7 @@ void EnTk_Init(EnTk* this, GlobalContext* globalCtx) { ActorShape_Init(&thisAgain->actor.shape, 0, ActorShadow_DrawFunc_Circle, 24.f); - SkelAnime_InitSV(globalCtx, &thisAgain->skelAnim, &D_0600BE40, 0, thisAgain->hz_22A, thisAgain->hz_296, 18); + SkelAnime_InitSV(globalCtx, &thisAgain->skelAnim, &D_0600BE40, NULL, thisAgain->hz_22A, thisAgain->hz_296, 18); SkelAnime_ChangeAnimation(&thisAgain->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), 0, 0.f); -- cgit v1.2.3 From 095924d05ab7f791227603e1137f6d8d19078bed Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Wed, 25 Mar 2020 11:07:09 -0500 Subject: clang formatting --- src/code/z_skelanime.c | 93 +++++++++++++++++------------ src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 7 ++- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 4 +- 3 files changed, 60 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index e625a3784..bf0a19567 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -19,9 +19,8 @@ void SkelAnime_AnimationType5Loaded(GlobalContext* globalCtx, AnimationEntryType //.data u32 D_8012A480 = 0; static AnimationEntryCallback D_8012A484[] = { - &SkelAnime_LinkAnimetionLoaded, &SkelAnime_AnimationType1Loaded, - &SkelAnime_AnimationType2Loaded, &SkelAnime_AnimationType3Loaded, - &SkelAnime_AnimationType4Loaded, &SkelAnime_AnimationType5Loaded, + &SkelAnime_LinkAnimetionLoaded, &SkelAnime_AnimationType1Loaded, &SkelAnime_AnimationType2Loaded, + &SkelAnime_AnimationType3Loaded, &SkelAnime_AnimationType4Loaded, &SkelAnime_AnimationType5Loaded, }; //.bss @@ -811,8 +810,8 @@ AnimationEntry* SkelAnime_NextEntry(AnimationContext* animationCtx, AnimationTyp * The next 6 functions are coordinate with the AnimationType enum */ -void SkelAnime_LoadLinkAnimetion(GlobalContext* globalCtx, LinkAnimetionEntry* linkAnimetionSeg, s32 frame, s32 limbCount, - void* ram) { +void SkelAnime_LoadLinkAnimetion(GlobalContext* globalCtx, LinkAnimetionEntry* linkAnimetionSeg, s32 frame, + s32 limbCount, void* ram) { AnimationEntry* entry; LinkAnimetionEntry* linkAnimetionEntry; char pad[4]; @@ -963,7 +962,8 @@ void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) { } void SkelAnime_InitLinkAnimetion(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, - LinkAnimetionEntry* linkAnimetionEntrySeg, s32 flags, Vec3s* actorDrawTbl, Vec3s* arg6, s32 limbBufCount) { + LinkAnimetionEntry* linkAnimetionEntrySeg, s32 flags, Vec3s* actorDrawTbl, Vec3s* arg6, + s32 limbBufCount) { char pad[8]; SkeletonHeader* skeletonHeader; size_t allocSize; @@ -1038,15 +1038,15 @@ s32 func_800A3BE4(GlobalContext* globalCtx, SkelAnime* skelAnime) { } SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, - 1.0f - (skelAnime->unk_28 / prevUnk28)); + 1.0f - (skelAnime->unk_28 / prevUnk28)); return 0; } void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) { f32 updateRate; - SkelAnime_LoadLinkAnimetion(globalCtx, skelAnime->linkAnimetionSeg, skelAnime->animCurrentFrame, skelAnime->limbCount, - skelAnime->actorDrawTbl); + SkelAnime_LoadLinkAnimetion(globalCtx, skelAnime->linkAnimetionSeg, skelAnime->animCurrentFrame, + skelAnime->limbCount, skelAnime->actorDrawTbl); if (skelAnime->unk_28 != 0) { updateRate = R_UPDATE_RATE * 0.5f; skelAnime->unk_28 -= skelAnime->unk_2C * updateRate; @@ -1054,7 +1054,8 @@ void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) { skelAnime->unk_28 = 0.0f; return; } - SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, skelAnime->unk_28); + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, + skelAnime->unk_28); } } @@ -1098,24 +1099,28 @@ void func_800A3EE8(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) { } #ifdef NON_MATCHING -void SkelAnime_LinkChangeAnimation(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed, - f32 frame, f32 frameCount, u8 arg6, f32 arg7) { +void SkelAnime_LinkChangeAnimation(GlobalContext* globalCtx, SkelAnime* skelAnime, + LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed, f32 frame, + f32 frameCount, u8 arg6, f32 arg7) { skelAnime->unk_01 = arg6; - if ((arg7 != 0.0f) && ((linkAnimetionEntrySeg == skelAnime->linkAnimetionSeg) || (frame != skelAnime->animCurrentFrame))) { + if ((arg7 != 0.0f) && + ((linkAnimetionEntrySeg == skelAnime->linkAnimetionSeg) || (frame != skelAnime->animCurrentFrame))) { if (arg7 < 0.0f) { func_800A3B8C(skelAnime); SkelAnime_CopyVec3s(skelAnime, skelAnime->unk_24, skelAnime->actorDrawTbl); arg7 = -arg7; } else { skelAnime->animUpdate = &func_800A3BE4; - SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, + skelAnime->unk_24); } skelAnime->unk_28 = 1.0f; skelAnime->unk_2C = 1.0f / arg7; } else { func_800A3B8C(skelAnime); - SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, + skelAnime->actorDrawTbl); skelAnime->unk_28 = 0.0f; } @@ -1131,21 +1136,25 @@ void SkelAnime_LinkChangeAnimation(GlobalContext* globalCtx, SkelAnime* skelAnim #endif void func_800A407C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg) { - SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, 1.0f, 0.0f, SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 2, 0.0f); + SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, 1.0f, 0.0f, + SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 2, 0.0f); } -void func_800A40DC(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed) { - SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 2, - 0.0f); +void func_800A40DC(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, + f32 playbackSpeed) { + SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, playbackSpeed, 0.0f, + SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 2, 0.0f); } void func_800A4140(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg) { - SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, 1.0f, 0.0f, SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 0, 0.0f); + SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, 1.0f, 0.0f, + SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 0, 0.0f); } -void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed) { - SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 0, - 0.0f); +void func_800A419C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, + f32 playbackSpeed) { + SkelAnime_LinkChangeAnimation(globalCtx, skelAnime, linkAnimetionEntrySeg, playbackSpeed, 0.0f, + SkelAnime_GetFrameCount(&linkAnimetionEntrySeg->genericHeader), 0, 0.0f); } void func_800A41FC(GlobalContext* globalCtx, SkelAnime* skelAnime) { @@ -1156,22 +1165,26 @@ void func_800A422C(GlobalContext* globalCtx, SkelAnime* skelAnime) { SkelAnime_LoadAnimationType1(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24); } -void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame) { +void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, + f32 frame) { SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); } -void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame) { - SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); +void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, + f32 frame) { + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, + skelAnime->actorDrawTbl); } void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 arg2) { SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->unk_24, arg2); } -void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame, LinkAnimetionEntry* linkAnimetionEntrySeg2, - f32 arg5, f32 arg6, Vec3s* arg7) { +void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame, + LinkAnimetionEntry* linkAnimetionEntrySeg2, f32 arg5, f32 arg6, Vec3s* arg7) { Vec3s* alignedArg7; - SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, + skelAnime->actorDrawTbl); alignedArg7 = (Vec3s*)ALIGN16((u32)arg7); @@ -1179,8 +1192,8 @@ void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetion SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, alignedArg7, arg6); } -void func_800A43B8(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame, LinkAnimetionEntry* linkAnimetionEntrySeg2, - f32 arg5, f32 arg6, Vec3s* arg7) { +void func_800A43B8(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame, + LinkAnimetionEntry* linkAnimetionEntrySeg2, f32 arg5, f32 arg6, Vec3s* arg7) { Vec3s* alignedArg7; SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, skelAnime->unk_24); @@ -1521,21 +1534,23 @@ void SkelAnime_ChangeAnimation(SkelAnime* skelAnime, AnimationHeader* animationS } void func_800A51E8(SkelAnime* skelAnime, AnimationHeader* animationSeg) { - SkelAnime_ChangeAnimation(skelAnime, animationSeg, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animationSeg->genericHeader), 2, 0.0f); + SkelAnime_ChangeAnimation(skelAnime, animationSeg, 1.0f, 0.0f, + SkelAnime_GetFrameCount(&animationSeg->genericHeader), 2, 0.0f); } void func_800A5240(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 transitionRate) { - SkelAnime_ChangeAnimation(skelAnime, animationSeg, 1.0f, 0, SkelAnime_GetFrameCount(&animationSeg->genericHeader), 2, - transitionRate); + SkelAnime_ChangeAnimation(skelAnime, animationSeg, 1.0f, 0, SkelAnime_GetFrameCount(&animationSeg->genericHeader), + 2, transitionRate); } void func_800A529C(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 playbackSpeed) { - SkelAnime_ChangeAnimation(skelAnime, animationSeg, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(&animationSeg->genericHeader), 2, - 0.0f); + SkelAnime_ChangeAnimation(skelAnime, animationSeg, playbackSpeed, 0.0f, + SkelAnime_GetFrameCount(&animationSeg->genericHeader), 2, 0.0f); } void SkelAnime_ChangeAnimationDefault(SkelAnime* skelAnime, AnimationHeader* animationSeg) { - SkelAnime_ChangeAnimation(skelAnime, animationSeg, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animationSeg->genericHeader), 0, 0.0f); + SkelAnime_ChangeAnimation(skelAnime, animationSeg, 1.0f, 0.0f, + SkelAnime_GetFrameCount(&animationSeg->genericHeader), 0, 0.0f); } void SkelAnime_ChangeAnimationTransitionRate(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 transitionRate) { @@ -1543,8 +1558,8 @@ void SkelAnime_ChangeAnimationTransitionRate(SkelAnime* skelAnime, AnimationHead } void SkelAnime_ChangeAnimationPlaybackSpeed(SkelAnime* skelAnime, AnimationHeader* animationSeg, f32 playbackSpeed) { - SkelAnime_ChangeAnimation(skelAnime, animationSeg, playbackSpeed, 0.0f, SkelAnime_GetFrameCount(&animationSeg->genericHeader), 0, - 0.0f); + SkelAnime_ChangeAnimation(skelAnime, animationSeg, playbackSpeed, 0.0f, + SkelAnime_GetFrameCount(&animationSeg->genericHeader), 0, 0.0f); } void func_800A53DC(SkelAnime* skelAnime) { diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 0ece8aada..6d4055165 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -248,8 +248,8 @@ void func_8097CEEC(DemoGo* this, GlobalContext* globalCtx) { void func_8097CF20(DemoGo* this, GlobalContext* globalCtx, UNK_TYPE arg2) { AnimationHeader* animation = &D_060029A8; if (arg2 != 0) { - SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animation->genericHeader), 0, - -8.0f); + SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, + SkelAnime_GetFrameCount(&animation->genericHeader), 0, -8.0f); this->action = 5; this->unk_19C = 0.0f; } @@ -321,7 +321,8 @@ void DemoGo_Init(DemoGo* this, GlobalContext* globalCtx) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f); SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, NULL, NULL, 0); - SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animation->genericHeader), 2, 0.0f); + SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, + SkelAnime_GetFrameCount(&animation->genericHeader), 2, 0.0f); this->action = 0; } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 6f69317a0..09993f354 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -509,8 +509,8 @@ void EnTk_Init(EnTk* this, GlobalContext* globalCtx) { ActorShape_Init(&thisAgain->actor.shape, 0, ActorShadow_DrawFunc_Circle, 24.f); SkelAnime_InitSV(globalCtx, &thisAgain->skelAnim, &D_0600BE40, NULL, thisAgain->hz_22A, thisAgain->hz_296, 18); - SkelAnime_ChangeAnimation(&thisAgain->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), 0, - 0.f); + SkelAnime_ChangeAnimation(&thisAgain->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), + 0, 0.f); ActorCollider_AllocCylinder(globalCtx, &thisAgain->collider); ActorCollider_InitCylinder(globalCtx, &thisAgain->collider, &thisAgain->actor, &D_80B1D508); -- cgit v1.2.3 From 582b32d39c16fa565fd1cda320da2632abba4296 Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Wed, 25 Mar 2020 11:43:11 -0500 Subject: Fix Draw Callbacks, fix segmented address in z_en_bird --- src/code/z_actor.c | 8 ++++---- src/overlays/actors/ovl_En_Bird/z_en_bird.c | 2 +- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 5 +++-- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 4 ++-- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 16 ++++++++-------- src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c | 21 ++++++++++----------- 6 files changed, 28 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 9928be4d9..49086f289 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -3884,8 +3884,8 @@ Gfx* func_80034B54(GraphicsContext* gfxCtx) { #pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_80034B54.s") #endif -void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc1, void* unkFunc2, Actor* actor, - s16 alpha) { +void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1, + SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; Gfx* gfxArr[4]; @@ -3904,8 +3904,8 @@ void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_actor.c", 8860); } -void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc1, void* unkFunc2, Actor* actor, - s16 alpha) { +void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1, + SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; Gfx* gfxArr[4]; diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/src/overlays/actors/ovl_En_Bird/z_en_bird.c index c3e30bb5c..ea4c3a680 100644 --- a/src/overlays/actors/ovl_En_Bird/z_en_bird.c +++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.c @@ -89,7 +89,7 @@ void EnBird_Destroy(EnBird* this, GlobalContext* globalCtx) { void func_809C1CAC(EnBird* this, s16 params) { f32 frameCount = SkelAnime_GetFrameCount(&D_0600006C); f32 playbackSpeed = this->unk_19C ? 0.0f : 1.0f; - u32* anim = &D_0600006C; + AnimationHeader* anim = &D_0600006C; this->unk_198 = Math_Rand_S16Offset(5, 0x23); SkelAnime_ChangeAnimation(&this->skelAnime, anim, playbackSpeed, 0.0f, frameCount, 0, 0.0f); diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index 396a07b31..0fc7a2047 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -457,11 +457,12 @@ static void EnDog_Update(EnDog* this, GlobalContext* globalCtx) { Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, &this->collider); } -static UNK_TYPE EnDog_Callback1(UNK_TYPE unused1, UNK_TYPE unused2, UNK_TYPE unused3, UNK_TYPE unused4) { +static UNK_TYPE EnDog_Callback1(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, + Actor* actor) { return 0; } -static void EnDog_Callback2(UNK_TYPE unused1, UNK_TYPE unused2, UNK_TYPE unused3, UNK_TYPE unused4) { +static void EnDog_Callback2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor) { } static void EnDog_Draw(EnDog* this, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 6e08c53b7..44ae6dae2 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -191,6 +191,6 @@ static void EnMs_Update(EnMs* this, GlobalContext* globalCtx) { void EnMs_Draw(EnMs* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0, - 0, &this->actor); + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, + NULL, NULL, &this->actor); } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 09993f354..818b25434 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -712,36 +712,36 @@ void func_80B1D200(GlobalContext* globalCtx) { func_800C6B54(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1190); } -s32 func_80B1D278(s16 a0, UNK_TYPE a1, UNK_TYPE a2, UNK_TYPE a3, Vec3s* sp10, Actor* actor) { +s32 func_80B1D278(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor) { EnTk* tk = (EnTk*)actor; - switch (a1) { + switch (limbIndex) { /* Limb 15 - Head */ case 15: - tk->h_21E = sp10->y; + tk->h_21E = rot->y; break; /* Limb 16 - Jaw */ case 16: - tk->h_21E += sp10->y; - sp10->y += tk->headRot; + tk->h_21E += rot->y; + rot->y += tk->headRot; break; } return 0; } -void func_80B1D2E4(GlobalContext* globalCtx, UNK_TYPE a1, UNK_TYPE a2, UNK_TYPE a3, Actor* actor) { +void func_80B1D2E4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor) { EnTk* this = (EnTk*)actor; Vec3f sp28 = { 0.f, 0.f, 4600.f }; Vec3f sp1C = { 0.f, 0.f, 0.f }; /* Limb 16 - Jaw */ - if (a1 == 16) { + if (limbIndex == 16) { Matrix_MultVec3f(&sp1C, &this->actor.posRot2.pos); } /* Limb 14 - Neck */ - if (a1 == 14) { + if (limbIndex == 14) { Matrix_MultVec3f(&sp28, &this->v3f_304); func_80B1D200(globalCtx); } diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index e4ac503ae..48f1cae77 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -36,8 +36,6 @@ static void EnWallmas_WaitForSwitchFlag(EnWallmas* this, GlobalContext* globalCt static void EnWallmas_Stun(EnWallmas* this, GlobalContext* globalCtx); static void EnWallmas_Update(EnWallmas* this, GlobalContext* globalCtx); static void EnWallmas_Walk(EnWallmas* this, GlobalContext* globalCtx); -static s32 EnWallMas_UpdatePos(GlobalContext* globalCtx, s32 arg1, s32 arg2, Actor* arg3, void* arg4, EnWallmas* arg5); -static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 arg3); static void EnWallmas_Draw(EnWallmas* this, GlobalContext* globalCtx); const ActorInit En_Wallmas_InitVars = { @@ -591,24 +589,25 @@ static void EnWallmas_DrawXlu(EnWallmas* this, GlobalContext* globalCtx) { func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1426); } -static s32 EnWallMas_UpdatePos(GlobalContext* globalCtx, s32 arg1, s32 arg2, Actor* arg3, void* arg4, EnWallmas* arg5) { - if (arg1 == 1) { - if (arg5->actionFunc != (ActorFunc)EnWallmas_TakePlayer) { - arg3->initPosRot.pos.x = arg3->initPosRot.pos.x - 1600.0f; +static s32 EnWallMas_UpdatePos(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, + Actor* actor) { + EnWallmas* this = (EnWallmas*)actor; + if (limbIndex == 1) { + if (this->actionFunc != (ActorFunc)EnWallmas_TakePlayer) { + pos->z -= 1600.0f; } else { - arg3->initPosRot.pos.x = arg3->initPosRot.pos.x - - ((1600.0f * (arg5->skelAnime.animFrameCount - arg5->skelAnime.animCurrentFrame)) / - arg5->skelAnime.animFrameCount); + pos->z -= ((1600.0f * (this->skelAnime.animFrameCount - this->skelAnime.animCurrentFrame)) / + this->skelAnime.animFrameCount); } } return 0; } -static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 arg3) { +static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor) { GraphicsContext* gfxCtx; Gfx* gfx[4]; - if (arg1 == 2) { + if (limbIndex == 2) { gfxCtx = globalCtx->state.gfxCtx; func_800C6AC4(&gfx, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1478); -- cgit v1.2.3 From 864cb28e272d68deaf1805dc62286531854edb48 Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Wed, 25 Mar 2020 14:38:16 -0500 Subject: remove skelanime data files, few extra namings, add non_matching for func_800A2E70 --- src/code/z_skelanime.c | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index bf0a19567..f7eae881a 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -18,7 +18,7 @@ void SkelAnime_AnimationType5Loaded(GlobalContext* globalCtx, AnimationEntryType //.data u32 D_8012A480 = 0; -static AnimationEntryCallback D_8012A484[] = { +static AnimationEntryCallback AnimationLoadDone[] = { &SkelAnime_LinkAnimetionLoaded, &SkelAnime_AnimationType1Loaded, &SkelAnime_AnimationType2Loaded, &SkelAnime_AnimationType3Loaded, &SkelAnime_AnimationType4Loaded, &SkelAnime_AnimationType5Loaded, }; @@ -131,7 +131,6 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* acto func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_skelanime.c", 894); } -//#define NON_MATCHING #ifdef NON_MATCHING // regalloc void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, @@ -776,18 +775,44 @@ s16 func_800A2E2C(GenericAnimationHeader* animationSeg) { return animation->frameCount - 1; } -// Very large update function +#ifdef NON_MATCHING +// Functionally equal, but loop unrolling is way off. +void func_800A2E70(s32 limbCount, Vec3s* vec1, Vec3s* vec2, Vec3s* vec3, f32 unkf) { + Vec3s* pvec1; + Vec3s* pvec2; + Vec3s* pvec3; + s32 iVar3; + + if (unkf < 1.0f) { + for (iVar3 = 0, pvec1 = vec1, pvec2 = vec2, pvec3 = vec3; iVar3 < limbCount; + iVar3++, pvec1++, pvec2++, pvec3++) { + pvec1->x = pvec2->x + ((s16)(pvec3->x - pvec2->x) * unkf); + pvec1->y = pvec2->y + ((s16)(pvec3->y - pvec2->y) * unkf); + pvec1->z = pvec2->z + ((s16)(pvec3->z - pvec2->z) * unkf); + } + } else { + for (iVar3 = 0; iVar3 < limbCount; iVar3++) { + pvec1 = &vec1[iVar3]; + pvec3 = &vec3[iVar3]; + pvec1->x = pvec3->x; + pvec1->y = pvec3->y; + pvec1->z = pvec3->z; + } + } +} +#else #pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A2E70.s") +#endif -void func_800A32EC(u16* arg0) { - *arg0 = 0; +void SkelAnime_AnimationCtxReset(AnimationContext* animationCtx) { + animationCtx->animationCount = 0; } -void func_800A32F4(s32 arg0) { - D_801600B0 *= 2; +void func_800A32F4(GlobalContext* globalCtx) { + D_801600B0 <<= 1; } -void func_800A3310(void* arg0) { +void func_800A3310(GlobalContext* globalCtx) { u32* D_8012A480Ptr = &D_8012A480; *D_8012A480Ptr |= D_801600B0; @@ -954,7 +979,7 @@ void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) { AnimationEntry* entry; for (entry = animationCtx->entries; animationCtx->animationCount != 0; entry++, animationCtx->animationCount--) { - D_8012A484[entry->type](globalCtx, &entry->types); + AnimationLoadDone[entry->type](globalCtx, &entry->types); } D_801600B0 = 1; -- cgit v1.2.3 From dc35cba293616678b234c6a8c132f960c02a4644 Mon Sep 17 00:00:00 2001 From: KrimtonZ Date: Wed, 25 Mar 2020 14:44:42 -0500 Subject: naming update --- src/code/z_skelanime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index f7eae881a..501797081 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -18,7 +18,7 @@ void SkelAnime_AnimationType5Loaded(GlobalContext* globalCtx, AnimationEntryType //.data u32 D_8012A480 = 0; -static AnimationEntryCallback AnimationLoadDone[] = { +static AnimationEntryCallback sAnimationLoadDone[] = { &SkelAnime_LinkAnimetionLoaded, &SkelAnime_AnimationType1Loaded, &SkelAnime_AnimationType2Loaded, &SkelAnime_AnimationType3Loaded, &SkelAnime_AnimationType4Loaded, &SkelAnime_AnimationType5Loaded, }; @@ -979,7 +979,7 @@ void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) { AnimationEntry* entry; for (entry = animationCtx->entries; animationCtx->animationCount != 0; entry++, animationCtx->animationCount--) { - AnimationLoadDone[entry->type](globalCtx, &entry->types); + sAnimationLoadDone[entry->type](globalCtx, &entry->types); } D_801600B0 = 1; -- cgit v1.2.3