diff options
Diffstat (limited to 'src')
52 files changed, 209 insertions, 254 deletions
diff --git a/src/code/z_eff_blure.c b/src/code/z_eff_blure.c index c75eed4f5..d376bbf98 100644 --- a/src/code/z_eff_blure.c +++ b/src/code/z_eff_blure.c @@ -308,6 +308,7 @@ void EffectBlure_UpdateFlags(EffectBlureElement* elem) { void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3s* vec1, Vec3s* vec2, Color_RGBA8* color1, Color_RGBA8* color2) { Vec3s sp30; + s32 pad; EffectBlureElement* elem; f32 mode4Param; @@ -333,14 +334,14 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3 break; case 3: - ratio = ratio * 0.5f; + ratio /= 2.0f; vec1->x = func_80027E34(elem->p1.x, elem->p2.x, ratio); vec1->y = func_80027E34(elem->p1.y, elem->p2.y, ratio); vec1->z = func_80027E34(elem->p1.z, elem->p2.z, ratio); vec2->x = func_80027E34(elem->p2.x, elem->p1.x, ratio); vec2->y = func_80027E34(elem->p2.y, elem->p1.y, ratio); vec2->z = func_80027E34(elem->p2.z, elem->p1.z, ratio); - ratio = ratio + ratio; + ratio *= 2.0f; break; case 4: @@ -352,9 +353,9 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3 vec1->x = (sp30.x * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p1.x; vec1->y = (sp30.y * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p1.y; vec1->z = (sp30.z * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p1.z; - vec2->x = -(sp30.x * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p2.x; - vec2->y = -(sp30.y * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p2.y; - vec2->z = -(sp30.z * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p2.z; + vec2->x = elem->p2.x - (sp30.x * 0.5f * (mode4Param - 1.0f) * ratio); + vec2->y = elem->p2.y - (sp30.y * 0.5f * (mode4Param - 1.0f) * ratio); + vec2->z = elem->p2.z - (sp30.z * 0.5f * (mode4Param - 1.0f) * ratio); break; case 0: @@ -367,18 +368,10 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3 vec2->z = elem->p2.z; break; } - sp30 = sp30; // Optimized out but seems necessary to match stack usage if (this->flags & 0x10) { - color1->a = 255; - color1->b = 255; - color1->g = 255; - color1->r = 255; - color2->r = 255; - color2->g = 255; - color2->b = 255; - color2->a = 255; + color1->r = color1->g = color1->b = color1->a = color2->r = color2->g = color2->b = color2->a = 255; } else { color1->r = func_80027E84(this->p1StartColor.r, this->p1EndColor.r, ratio); color1->g = func_80027E84(this->p1StartColor.g, this->p1EndColor.g, ratio); diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index a8eda088d..19aac4ae8 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -730,8 +730,6 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limb return gfx; } -#ifdef NON_MATCHING -// Function is unused. This is functionally equivilent, misplace andi which caused regalloc s32 func_800A29BC(s32 arg0, s32 arg1, Vec3s* arg2) { s16* temp_t1; s16* temp_a3; @@ -752,6 +750,8 @@ s32 func_800A29BC(s32 arg0, s32 arg1, Vec3s* arg2) { arg2++; temp_a3 += 6; + if (t & 1) {} + if (t > 0) { if (t & 1) { phi_v0++; @@ -781,9 +781,6 @@ s32 func_800A29BC(s32 arg0, s32 arg1, Vec3s* arg2) { ret: return t; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skelanime/func_800A29BC.s") -#endif s16 func_800A2DBC(GenericAnimationHeader* animationSeg) { GenericAnimationHeader* animation = SEGMENTED_TO_VIRTUAL(animationSeg); diff --git a/src/code/z_skin_matrix.c b/src/code/z_skin_matrix.c index 62513bc0e..f299f76c9 100644 --- a/src/code/z_skin_matrix.c +++ b/src/code/z_skin_matrix.c @@ -238,75 +238,62 @@ void SkinMatrix_MtxFCopy(MtxF* src, MtxF* dest) { * returns 0 if successfully inverted * returns 2 if matrix non-invertible (0 determinant) */ -#ifdef NON_MATCHING -// Saved register usage differences and probably regalloc s32 SkinMatrix_Invert(MtxF* src, MtxF* dest) { MtxF mfCopy; s32 i; - s32 k; - f32 temp1; + s32 pad; f32 temp2; - f32 diagElement; + f32 temp1; s32 thisRow; s32 thisCol; - u32 pad; SkinMatrix_MtxFCopy(src, &mfCopy); SkinMatrix_Clear(dest); - for (thisRow = 0; thisRow != 4; thisRow++) { - for (thisCol = thisRow; (thisCol < 4) && (fabsf(mfCopy.mf[thisRow][thisCol]) < 0.0005f); thisCol++) {} + for (thisRow = 0; thisRow < 4; thisRow++) { + thisCol = thisRow; + while ((thisCol < 4) && (fabsf(mfCopy.mf[thisRow][thisCol]) < 0.0005f)) { + thisCol++; + } if (thisCol == 4) { // reaching col = 4 means the row is either all 0 or a duplicate row. // therefore singular matrix (0 determinant). + osSyncPrintf(VT_COL(YELLOW, BLACK)); osSyncPrintf("Skin_Matrix_InverseMatrix():逆行列つくれません\n"); osSyncPrintf(VT_RST); return 2; } - if (thisCol != thisRow) { // responsible for swapping columns if zero on diagonal - for (i = 0; i != 4; i++) { + for (i = 0; i < 4; i++) { temp1 = mfCopy.mf[i][thisCol]; mfCopy.mf[i][thisCol] = mfCopy.mf[i][thisRow]; mfCopy.mf[i][thisRow] = temp1; - temp1 = dest->mf[i][thisCol]; + temp2 = dest->mf[i][thisCol]; dest->mf[i][thisCol] = dest->mf[i][thisRow]; - dest->mf[i][thisRow] = temp1; + dest->mf[i][thisRow] = temp2; } } - diagElement = mfCopy.mf[thisRow][thisRow]; // Scale this whole column s.t. the diag element = 1 - mfCopy.mf[0][thisRow] = mfCopy.mf[0][thisRow] / diagElement; - dest->mf[0][thisRow] = dest->mf[0][thisRow] / diagElement; - mfCopy.mf[1][thisRow] = mfCopy.mf[1][thisRow] / diagElement; - dest->mf[1][thisRow] = dest->mf[1][thisRow] / diagElement; - mfCopy.mf[2][thisRow] = mfCopy.mf[2][thisRow] / diagElement; - dest->mf[2][thisRow] = dest->mf[2][thisRow] / diagElement; - mfCopy.mf[3][thisRow] = mfCopy.mf[3][thisRow] / diagElement; - dest->mf[3][thisRow] = dest->mf[3][thisRow] / diagElement; - - // col i = col i - a * col j - for (k = 0; k != 4; k++) { - if (k != thisRow) { - temp2 = mfCopy.mf[thisRow][k]; - mfCopy.mf[0][k] = mfCopy.mf[0][k] - (mfCopy.mf[0][thisRow] * temp2); - dest->mf[0][k] = dest->mf[0][k] - (dest->mf[0][thisRow] * temp2); - mfCopy.mf[1][k] = mfCopy.mf[1][k] - (mfCopy.mf[1][thisRow] * temp2); - dest->mf[1][k] = dest->mf[1][k] - (dest->mf[1][thisRow] * temp2); - mfCopy.mf[2][k] = mfCopy.mf[2][k] - (mfCopy.mf[2][thisRow] * temp2); - dest->mf[2][k] = dest->mf[2][k] - (dest->mf[2][thisRow] * temp2); - mfCopy.mf[3][k] = mfCopy.mf[3][k] - (mfCopy.mf[3][thisRow] * temp2); - dest->mf[3][k] = dest->mf[3][k] - (dest->mf[3][thisRow] * temp2); + temp1 = mfCopy.mf[thisRow][thisRow]; + for (i = 0; i < 4; i++) { + mfCopy.mf[i][thisRow] /= temp1; + dest->mf[i][thisRow] /= temp1; + } + + for (thisCol = 0; thisCol < 4; thisCol++) { + if (thisCol != thisRow) { + temp1 = mfCopy.mf[thisRow][thisCol]; + for (i = 0; i < 4; i++) { + mfCopy.mf[i][thisCol] -= mfCopy.mf[i][thisRow] * temp1; + dest->mf[i][thisCol] -= dest->mf[i][thisRow] * temp1; + } } } } return 0; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skin_matrix/SkinMatrix_Invert.s") -#endif /** * Produces a matrix which scales x,y,z components of vectors or x,y,z rows of matrices (when applied on LHS) @@ -620,63 +607,47 @@ Mtx* SkinMatrix_MtxFToNewMtx(GraphicsContext* gfxCtx, MtxF* src) { } /** - * Produces a matrix which rotates vectors by angle a around the vector with components (x,y,z) + * Produces a matrix which rotates vectors by angle a around a unit vector with components (x,y,z) */ -#ifdef NON_EQUIVALENT -// I think this is functionally correct but I cannot be 100% sure of equivalence because diff output is not very close void func_800A7EC0(MtxF* mf, s16 a, f32 x, f32 y, f32 z) { - f32 sin; - f32 cos; - f32 ct; + f32 sinA; + f32 cosA; f32 xx; f32 yy; f32 zz; f32 xy; - f32 xz; f32 yz; - f32 sx; - f32 sy; - f32 sz; - - sin = Math_Sins(a); - cos = Math_Coss(a); + f32 xz; + f32 pad; - ct = 1.0f - cos; - sx = sin * x; - sy = sin * y; - sz = sin * z; + sinA = Math_Sins(a); + cosA = Math_Coss(a); xx = x * x; - xy = x * y; - xz = x * z; yy = y * y; - yz = y * z; zz = z * z; + xy = x * y; + yz = y * z; + xz = x * z; - mf->xx = (f32)ct * xx + cos; - mf->xy = (f32)((ct * xy) + sz); - mf->xz = (f32)((ct * xz) - sy); + mf->xx = (1.0f - xx) * cosA + xx; + mf->xy = (1.0f - cosA) * xy + z * sinA; + mf->xz = (1.0f - cosA) * xz - y * sinA; mf->xw = 0.0f; - mf->yx = (f32)((ct * (xy)) - sz); - mf->yy = (f32)ct * yy + cos; - mf->yz = (f32)((ct * (yz)) + sx); + mf->yx = (1.0f - cosA) * xy - z * sinA; + mf->yy = (1.0f - yy) * cosA + yy; + mf->yz = (1.0f - cosA) * yz + x * sinA; mf->yw = 0.0f; - mf->zx = (f32)((ct * (xz)) + sy); - mf->zy = (f32)((ct * (yz)) - sx); - mf->zz = (f32)ct * zz + cos; - + mf->zx = (1.0f - cosA) * xz + y * sinA; + mf->zy = (1.0f - cosA) * yz - x * sinA; + mf->zz = (1.0f - zz) * cosA + zz; mf->zw = 0.0f; - mf->wx = 0.0f; - mf->wy = 0.0f; - mf->wz = 0.0f; + mf->wx = mf->wy = mf->wz = 0.0f; mf->ww = 1.0f; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_skin_matrix/func_800A7EC0.s") -#endif void func_800A8030(MtxF* mf, f32* arg1) { f32 n; 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 775fe35ca..78f922eaf 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -30,20 +30,20 @@ ColliderQuadInit sQuadInit = { { 0 }, }; -Vec3f sUnusedVec1 = { 0.0f, 0.5f, 0.0f }; -Vec3f sUnusedVec2 = { 0.0f, 0.5f, 0.0f }; +static Vec3f sUnusedVec1 = { 0.0f, 0.5f, 0.0f }; +static Vec3f sUnusedVec2 = { 0.0f, 0.5f, 0.0f }; -Color_RGB8 sUnusedColors[] = { +static Color_RGB8 sUnusedColors[] = { { 255, 255, 100 }, { 255, 255, 50 }, }; -Vec3f D_80865B70 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_80865B7C = { 0.0f, 0.0f, 900.0f }; -Vec3f D_80865B88 = { 0.0f, 500.0f, -3000.0f }; -Vec3f D_80865B94 = { 0.0f, -500.0f, -3000.0f }; -Vec3f D_80865BA0 = { 0.0f, 500.0f, 1200.0f }; -Vec3f D_80865BAC = { 0.0f, -500.0f, 1200.0f }; +static Vec3f D_80865B70 = { 0.0f, 0.0f, 0.0f }; +static Vec3f D_80865B7C = { 0.0f, 0.0f, 900.0f }; +static Vec3f D_80865B88 = { 0.0f, 500.0f, -3000.0f }; +static Vec3f D_80865B94 = { 0.0f, -500.0f, -3000.0f }; +static Vec3f D_80865BA0 = { 0.0f, 500.0f, 1200.0f }; +static Vec3f D_80865BAC = { 0.0f, -500.0f, 1200.0f }; extern Gfx D_0602B288[]; extern Gfx D_0602AFF0[]; 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 c4685dd57..6f7c1c343 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -45,7 +45,7 @@ static ColliderCylinderInit sColCylinderInit1 = { { 50, 60, 280, { 0, 0, 0 } }, }; -s16 sHasParent = false; +static s16 sHasParent = false; extern Gfx D_60013500[]; extern UNK_TYPE D_06001DDC; @@ -70,23 +70,23 @@ void BgDodoago_SpawnSparkles(Vec3f* vec, GlobalContext* globalCtx) { } } -static InitChainEntry D_808725BC[] = { +static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneForward, 5000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP), }; -u8 D_808727C0[100]; +static u8 D_808727C0[100]; -s32 D_80872824; +static s32 D_80872824; void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) { BgDodoago* this = THIS; s32 pad; s32 localC = 0; - Actor_ProcessInitChain(&this->dyna.actor, D_808725BC); + Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyInfo_SetActorMove(&this->dyna, 0); DynaPolyInfo_Alloc(&D_06001DDC, &localC); this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, localC); 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 4c476b789..94608120d 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 @@ -47,7 +47,7 @@ static InitChainEntry sInitChain[] = { static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; -Gfx* D_8087B578[] = { 0x06007C00, 0x06002320, 0x060035A0 }; +static Gfx* D_8087B578[] = { 0x06007C00, 0x06002320, 0x060035A0 }; void BgGndSoulmeiro_Init(Actor* thisx, GlobalContext* globalCtx) { BgGndSoulmeiro* this = THIS; 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 a9768a0f8..c95d51bd3 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 @@ -49,13 +49,13 @@ static ColliderTrisItemInit sTrisItemInit[4] = { }, }; -ColliderTrisInit D_80886590 = { +static ColliderTrisInit sTrisInit = { { COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_TRIS }, 4, sTrisItemInit, }; -InitChainEntry D_808865A0[] = { +static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(gravity, 65336, ICHAIN_STOP), }; @@ -70,12 +70,12 @@ void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx) { u32 dynaUnk; dynaUnk = 0; - Actor_ProcessInitChain(thisx, D_808865A0); + Actor_ProcessInitChain(thisx, sInitChain); DynaPolyInfo_SetActorMove(&this->dyna, DPM_UNK); DynaPolyInfo_Alloc(&D_0600DA10, &dynaUnk); this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, dynaUnk); Collider_InitTris(globalCtx, &this->collider); - Collider_SetTris(globalCtx, &this->collider, thisx, &D_80886590, this->colliderItems); + Collider_SetTris(globalCtx, &this->collider, thisx, &sTrisInit, this->colliderItems); this->switchFlag = (thisx->params >> 8) & 0xFF; thisx->params &= 0xFF; 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 1925ef855..eafb40608 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 @@ -49,7 +49,7 @@ static CollisionCheckInfoInit sColChkInfoInit = { 0xFF, }; -UNK_PTR D_80886D04[] = { +static UNK_PTR D_80886D04[] = { 0x06015D20, 0x06016120, 0x06016520, 0x06016920, 0x06016D20, 0x06017120, 0x06017520, 0x06017920, }; 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 2147886e1..bc93c3a05 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 @@ -22,7 +22,7 @@ void func_80889C18(BgHidanKousi* this, GlobalContext* globalCtx); void func_80889C90(BgHidanKousi* this, GlobalContext* globalCtx); void func_80889D28(BgHidanKousi* this, GlobalContext* globalCtx); -f32 D_80889E40[] = { 120.0f, 150.0f, 150.0f }; +static f32 D_80889E40[] = { 120.0f, 150.0f, 150.0f }; const ActorInit Bg_Hidan_Kousi_InitVars = { ACTOR_BG_HIDAN_KOUSI, @@ -40,20 +40,20 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -UNK_PTR D_80889E70[] = { +static UNK_PTR D_80889E70[] = { 0x0600E2CC, 0x0600E380, 0x0600E430, }; -s16 D_80889E7C[] = { +static s16 D_80889E7C[] = { 0x4000, 0xC000, 0xC000, 0x0000, }; -Gfx* D_80889E84[] = { +static Gfx* D_80889E84[] = { 0x0600C798, 0x0600BFA8, 0x0600BB58, 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 b9542da5a..d29a32531 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 @@ -24,7 +24,7 @@ void func_80892E0C(BgJya1flift* this); void BgJya1flift_ResetMoveDelay(BgJya1flift* this); void BgJya1flift_DelayMove(BgJya1flift* this, GlobalContext* globalCtx); -u8 sHasSpawned = false; +static u8 sHasSpawned = false; const ActorInit Bg_Jya_1flift_InitVars = { ACTOR_BG_JYA_1FLIFT, @@ -44,7 +44,7 @@ static ColliderCylinderInit sCylinderInit = { { 70, 80, -82, { 0, 0, 0 } }, }; -f32 finalPositions[] = { 443.0f, -50.0f }; +static f32 sFinalPositions[] = { 443.0f, -50.0f }; static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), @@ -116,7 +116,7 @@ void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx) { void func_80892DB0(BgJya1flift* this) { this->actionFunc = func_80892DCC; - this->dyna.actor.posRot.pos.y = finalPositions[0]; + this->dyna.actor.posRot.pos.y = sFinalPositions[0]; } void func_80892DCC(BgJya1flift* this, GlobalContext* globalCtx) { @@ -127,7 +127,7 @@ void func_80892DCC(BgJya1flift* this, GlobalContext* globalCtx) { void func_80892E0C(BgJya1flift* this) { this->actionFunc = BgJya1flift_DoNothing; - this->dyna.actor.posRot.pos.y = finalPositions[0]; + this->dyna.actor.posRot.pos.y = sFinalPositions[0]; } void BgJya1flift_DoNothing(BgJya1flift* this, GlobalContext* globalCtx) { @@ -148,9 +148,9 @@ void BgJya1flift_Move(BgJya1flift* this, GlobalContext* globalCtx) { } else { tempVelocity = this->dyna.actor.velocity.y; } - if (fabsf(Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.y, (finalPositions[this->isMovingDown]), 0.5f, + if (fabsf(Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.y, (sFinalPositions[this->isMovingDown]), 0.5f, tempVelocity, 1.0f)) < 0.001f) { - this->dyna.actor.posRot.pos.y = finalPositions[this->isMovingDown]; + this->dyna.actor.posRot.pos.y = sFinalPositions[this->isMovingDown]; BgJya1flift_ResetMoveDelay(this); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); } else { 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 1a2bd0b21..c48fb8a35 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 @@ -22,7 +22,7 @@ void BgJyaLift_DelayMove(BgJyaLift* this, GlobalContext* globalCtx); void BgJyaLift_SetupMove(BgJyaLift* this); void BgJyaLift_Move(BgJyaLift* this, GlobalContext* globalCtx); -s16 D_8089A020 = 0; +static s16 D_8089A020 = 0; const ActorInit Bg_Jya_Lift_InitVars = { ACTOR_BG_JYA_LIFT, 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 35a5d5e3e..b1d175767 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 @@ -68,19 +68,19 @@ static BgJyaMegamiPieceInit sPiecesInit[] = { { { 14.759999f, -125.8f, -44.16f }, 0.2f, 0x0320, 0x0258, 20 }, }; -s16 D_8089B14C[] = { +static s16 D_8089B14C[] = { 0x0005, 0x0008, 0x000B, 0x000E, 0x0011, 0x0014, 0x0017, 0x001A, }; -s16 D_8089B15C[] = { +static s16 D_8089B15C[] = { 0x0012, 0x001A, 0x0022, 0x002A, 0x0032, 0x003C, 0x0046, 0x0050, }; -s16 D_8089B16C[] = { +static s16 D_8089B16C[] = { 0x0030, 0x002A, 0x0024, 0x0020, 0x001C, 0x0018, 0x0014, 0x0010, }; -s16 D_8089B17C[] = { +static s16 D_8089B17C[] = { 0x0001, 0x0003, 0x0007, 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 fa149001a..7b7574c58 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 @@ -28,7 +28,7 @@ const ActorInit Bg_Menkuri_Eye_InitVars = { }; extern Gfx D_06002D20[]; -s32 D_8089C1A0; +static s32 D_8089C1A0; static ColliderJntSphItemInit sJntSphItemsInit[1] = { { 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 b1b45c2e1..a941eba8b 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 @@ -37,7 +37,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -Gfx* D_808AC510[] = { 0x06001EB0, 0x06002780, 0x06003078, 0x06001228, 0x06001528 }; +static Gfx* D_808AC510[] = { 0x06001EB0, 0x06002780, 0x06003078, 0x06001228, 0x06001528 }; extern UNK_TYPE D_06001A38; extern UNK_TYPE D_06001C58; 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 c7d65c123..1c624ff25 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 @@ -56,7 +56,7 @@ static ColliderJntSphInit sJntSphInit = { sJntSphItemsInit, }; -Vec3f D_808B08AC[] = { +static Vec3f D_808B08AC[] = { { 0.0f, 116.65f, 50.0f }, { 115.0f, 95.0f, 10.0f }, { -115.0f, 95.0f, 10.0f }, 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 dacf0d9ca..6505ece45 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 @@ -34,8 +34,8 @@ static ColliderCylinderInit sCylinderInit = { { 40, 80, 0, { 2259, 108, -1580 } }, }; -Vec3f D_808B272C = { 2259.0f, 108.0f, -1550.0f }; -Vec3f D_808B2738 = { 2259.0f, 108.0f, -1550.0f }; +static Vec3f D_808B272C = { 2259.0f, 108.0f, -1550.0f }; +static Vec3f D_808B2738 = { 2259.0f, 108.0f, -1550.0f }; extern UNK_TYPE D_06001A58; extern Gfx D_06001980[]; 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 00f15da90..fd9c5ff68 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 @@ -27,7 +27,7 @@ const ActorInit Bg_Spot11_Oasis_InitVars = { NULL, }; -s16 D_808B2E10[][2] = { +static s16 D_808B2E10[][2] = { { 1260, 2040 }, { 1259, 1947 }, { 1135, 1860 }, { 1087, 1912 }, { 1173, 2044 }, }; @@ -38,7 +38,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP), }; -Vec3f D_808B2E34[] = { +static Vec3f D_808B2E34[] = { { 0.0f, -100.0f, 0.0f }, { 100.0f, -80.0f, -50.0f }, { -50.0f, -80.0f, -100.0f }, { -75.0f, -90.0f, 90.0f }, { 30.0f, -100.0f, 40.0f }, }; 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 b869a1b3a..d58e48b75 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 @@ -18,7 +18,7 @@ void func_808B44B8(BgSpot15Rrbox* this, GlobalContext* globalCtx); void func_808B4178(BgSpot15Rrbox* this, GlobalContext* globalCtx); void func_808B44CC(BgSpot15Rrbox* this, GlobalContext* globalCtx); -s16 D_808B4590 = 0; +static s16 D_808B4590 = 0; extern UNK_TYPE D_06000348; extern Gfx D_06000180[]; @@ -42,12 +42,12 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP), }; -Vec3f D_808B45C4[] = { +static Vec3f D_808B45C4[] = { { 770.0f, 1490.0f, -299.0f }, { 770.0f, 1550.0f, -299.0f }, }; -Vec3f D_808B45DC[] = { +static Vec3f D_808B45DC[] = { { 29.99f, 0.01f, -29.99f }, { -29.99f, 0.01f, -29.99f }, { -29.99f, 0.01f, 29.99f }, { 29.99f, 0.01f, 29.99f }, { 0.0f, 0.01f, 0.0f }, }; 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 3c73b7a09..25d539b4a 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 @@ -27,7 +27,7 @@ static EnBombf* sPlayerBomb = NULL; static s16 sTimer = 0; -s16 D_808B5DD8[][10] = { +static s16 D_808B5DD8[][10] = { { 0x0008, 0x0004, 0x0046, 0x07D0, 0xFCE0, 0x0000, 0x0064, 0x0000, 0x0000, 0x0000 }, { 0x0006, 0x0003, 0x0032, 0x00C8, 0x0A28, 0xC350, 0x005A, 0x0000, 0x0000, 0x0000 }, { 0x0005, 0x0003, 0x0028, 0xF63C, 0x0190, 0x30B0, 0x0032, 0x0000, 0x0000, 0x0000 }, 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 b917ef4c9..f35f77ba3 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 @@ -42,24 +42,24 @@ const ActorInit Bg_Spot18_Obj_InitVars = { (ActorFunc)BgSpot18Obj_Draw, }; -u8 D_808B90F0[2][2] = { { 0x01, 0x01 }, { 0x01, 0x00 } }; +static u8 D_808B90F0[2][2] = { { 0x01, 0x01 }, { 0x01, 0x00 } }; -f32 D_808B90F4[] = { +static f32 D_808B90F4[] = { 0.1f, 0.1f, }; -UNK_TYPE D_808B90FC[] = { +static UNK_TYPE D_808B90FC[] = { 0x06002FE4, 0x0600261C, }; -u32 D_808B9104[] = { +static u32 D_808B9104[] = { 0, 0, }; -BgSpot18ObjInitFunc D_808B910C[] = { +static BgSpot18ObjInitFunc D_808B910C[] = { func_808B8A98, func_808B8910, func_808B8A5C, @@ -78,7 +78,7 @@ static InitChainEntry sInitChain2[] = { ICHAIN_F32(uncullZoneDownward, 700, ICHAIN_STOP), }; -BgSpot18ObjInitFunc D_808B913C[] = { +static BgSpot18ObjInitFunc D_808B913C[] = { func_808B8BB4, func_808B8C90, }; 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 5768be9f9..daec71509 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -48,7 +48,7 @@ static InitChainEntry sInitChain[] = { }; // unused -f32 D_808BD9C4[] = { +static f32 D_808BD9C4[] = { -2746.0f, 545.0f, 4694.0f, -2654.0f, 146.0f, 4534.0f, }; 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 938ce8457..1f5c1c9cd 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 @@ -37,7 +37,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; -Gfx* D_808BEC24[] = { 0x06007508, 0x06005DE0, 0x06005018 }; +static Gfx* D_808BEC24[] = { 0x06007508, 0x06005DE0, 0x06005018 }; extern UNK_TYPE D_06005780; extern UNK_TYPE D_06007798; 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 1e47b1a7a..d7d55f88f 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 @@ -33,7 +33,7 @@ const ActorInit Bg_Ydan_Maruta_InitVars = { (ActorFunc)BgYdanMaruta_Draw, }; -ColliderTrisItemInit D_808BF300[2] = { +static ColliderTrisItemInit sTrisItemInit[2] = { { { 0x00, { 0x20000000, 0x00, 0x04 }, { 0x00000004, 0x00, 0x00 }, 0x11, 0x01, 0x00 }, { { { 220.0f, -10.0f, 0.0f }, { 220.0f, 10.0f, 0.0f }, { -220.0f, 10.0f, 0.0f } } }, @@ -44,13 +44,13 @@ ColliderTrisItemInit D_808BF300[2] = { }, }; -ColliderTrisInit D_808BF378 = { +static ColliderTrisInit sTrisInit = { { COLTYPE_UNK10, 0x11, 0x09, 0x00, 0x20, COLSHAPE_TRIS }, 2, - D_808BF300, + sTrisItemInit, }; -InitChainEntry D_808BF388[] = { +static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), }; @@ -68,18 +68,18 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) { s32 localConst = 0; ColliderTrisItemInit* items; - Actor_ProcessInitChain(thisx, D_808BF388); + Actor_ProcessInitChain(thisx, sInitChain); Collider_InitTris(globalCtx, &this->collider); - Collider_SetTris(globalCtx, &this->collider, thisx, &D_808BF378, &this->colliderItems); + Collider_SetTris(globalCtx, &this->collider, thisx, &sTrisInit, &this->colliderItems); this->unk_168 = thisx->params & 0xFFFF; thisx->params = (thisx->params >> 8) & 0xFF; if (thisx->params == 0) { - items = &D_808BF300[0]; + items = &sTrisItemInit[0]; this->actionFunc = func_808BEFF4; } else { - items = &D_808BF300[1]; + items = &sTrisItemInit[1]; DynaPolyInfo_SetActorMove(&this->dyna, 0); DynaPolyInfo_Alloc(&D_060066A8, &localConst); this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localConst); 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 4a39e3313..2c94cb348 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -27,13 +27,13 @@ void func_8097D130(DemoGo* this, GlobalContext* globalCtx); void func_8097D290(DemoGo* this, GlobalContext* globalCtx); void func_8097D29C(DemoGo* this, GlobalContext* globalCtx); -UNK_PTR D_8097D440[] = { 0x0600CE80, 0x0600D280, 0x0600D680 }; +static UNK_PTR D_8097D440[] = { 0x0600CE80, 0x0600D280, 0x0600D680 }; -DemoGoActionFunc D_8097D44C[] = { +static DemoGoActionFunc D_8097D44C[] = { func_8097CFDC, func_8097CFFC, func_8097D01C, func_8097D058, func_8097D088, func_8097D0D0, func_8097D130, }; -DemoGoDrawFunc D_8097D468[] = { +static DemoGoDrawFunc D_8097D468[] = { func_8097D290, func_8097D29C, }; 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 cd4e42792..8a28b70d1 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -51,13 +51,13 @@ void func_80987330(DemoIm* this, GlobalContext* globalCtx); void func_8098764C(DemoIm* this, GlobalContext* globalCtx); void func_80987658(DemoIm* this, GlobalContext* globalCtx); -UNK_PTR D_80987830[] = { +static UNK_PTR D_80987830[] = { 0x06007210, 0x06007D50, 0x06008150, }; -u32 D_8098783C = 0; +static u32 D_8098783C = 0; static ColliderCylinderInit_Set3 sCylinderInit = { { COLTYPE_UNK0, 0x00, 0x00, 0x09, COLSHAPE_CYLINDER }, @@ -75,7 +75,7 @@ static DemoImActionFunc sActionFuncs[] = { func_809872A8, func_809872F0, func_80987330, }; -Vec3f D_809887D8 = { 0.0f, 10.0f, 0.0f }; +static Vec3f D_809887D8 = { 0.0f, 10.0f, 0.0f }; static DemoImDrawFunc sDrawFuncs[] = { func_8098764C, 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 bd499a30e..05ee0ba33 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -44,15 +44,15 @@ void func_8098FEA8(DemoSa* this, GlobalContext* globalCtx); void func_8098FEB4(DemoSa* this, GlobalContext* globalCtx); void func_8098F1C0(DemoSa* this, GlobalContext* globalCtx); -UNK_PTR D_809900E0[] = { +static UNK_PTR D_809900E0[] = { 0x06002F48, 0x06003C48, 0x06003848, 0x06004848, 0x06004E48, }; -UNK_PTR D_809900F4[] = { +static UNK_PTR D_809900F4[] = { 0x06003588, 0x06004C48, 0x06003348, 0x06004448, 0x06004648, }; -u32 D_80990108 = 0; +static u32 D_80990108 = 0; #include "z_demo_sa_cutscene_data.c" EARLY 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 fd5e8ec43..497849a7f 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -38,7 +38,7 @@ static InitChainEntry sInitChain[] = { }; // Draw properties -Gfx D_809AD278[] = { +static Gfx D_809AD278[] = { gsDPPipeSync(), gsDPSetTextureLUT(G_TT_NONE), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), @@ -61,7 +61,7 @@ static Vtx sCylinderVertices[] = { }; // Polygons for cylinder -Gfx D_809AD3B8[] = { +static Gfx D_809AD3B8[] = { gsSPVertex(sCylinderVertices, 16, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(0, 3, 4, 0, 0, 4, 5, 0), gsSP2Triangles(0, 5, 6, 0, 0, 6, 7, 0), gsSP2Triangles(8, 9, 10, 0, 8, 10, 11, 0), gsSP2Triangles(8, 11, 12, 0, 8, 12, 13, 0), @@ -80,7 +80,7 @@ static Vtx sCuboidVertices[] = { }; // Polygons for cuboid -Gfx D_809AD4B8[] = { +static Gfx D_809AD4B8[] = { gsSPVertex(sCuboidVertices, 8, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0), gsSP2Triangles(0, 1, 4, 0, 1, 4, 5, 0), gsSP2Triangles(1, 2, 5, 0, 2, 5, 6, 0), gsSP2Triangles(2, 3, 6, 0, 3, 6, 7, 0), 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 bceb2ff91..27b386514 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -38,7 +38,7 @@ static InitChainEntry sInitChain[] = { }; // Draw properties -Gfx D_809ADC38[] = { +static Gfx D_809ADC38[] = { gsDPPipeSync(), gsDPSetTextureLUT(G_TT_NONE), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), @@ -57,7 +57,7 @@ static Vtx sCuboidVertices[] = { }; // Cuboid polygons -Gfx D_809ADCF8[] = { +static Gfx D_809ADCF8[] = { gsSPVertex(sCuboidVertices, 8, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0), gsSP2Triangles(0, 1, 4, 0, 1, 4, 5, 0), gsSP2Triangles(1, 2, 5, 0, 2, 5, 6, 0), gsSP2Triangles(2, 3, 6, 0, 3, 6, 7, 0), 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 fc4da1ebb..803b33899 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -57,7 +57,7 @@ static InitChainEntry sInitChain[] = { static Vec3f sMultVec = { 800.0f, 500.0f, 0.0f }; -UNK_PTR D_809B0F80[] = { +static UNK_PTR D_809B0F80[] = { 0x06000408, 0x06001518, 0x06001D18, 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 c54d82f26..1f7a5e5bd 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 @@ -37,7 +37,7 @@ const ActorInit En_Attack_Niw_InitVars = { static InitChainEntry sInitChain[] = { ICHAIN_U8(unk_1F, 1, ICHAIN_CONTINUE), - ICHAIN_F32_DIV1000(gravity, 63536, ICHAIN_CONTINUE), + ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_CONTINUE), ICHAIN_F32(unk_4C, 0, ICHAIN_STOP), }; @@ -182,8 +182,6 @@ s32 func_809B55EC(EnAttackNiw* this, GlobalContext* globalCtx) { } } -#ifdef NON_MATCHING -// &this->actor.posRot.pos stored at wrong place void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) { s16 sp4E; s16 sp4C; @@ -202,7 +200,6 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) { sp34.y = globalCtx->view.lookAt.y + tmpf2; sp34.z = globalCtx->view.lookAt.z + tmpf3; - if (1) {} this->unk_2D4 = Math_Vec3f_Yaw(&this->actor.posRot.pos, &sp34); this->unk_2D0 = Math_Vec3f_Pitch(&this->actor.posRot.pos, &sp34) * -1.0f; @@ -216,7 +213,9 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) { if (this->actor.bgCheckFlags & 8) { this->unk_2D4 = this->actor.yawTowardsLink; this->unk_2D0 = this->actor.posRot.rot.x - 3000.0f; - this->unk_2DC = this->unk_284 = this->unk_27C = 0.0f; + this->unk_2DC = 0.0f; + this->unk_284 = 0.0f; + this->unk_27C = 0.0f; this->unk_254 = this->unk_256 = this->unk_258 = this->unk_25A = 0; this->unk_25C = 0x64; this->actor.gravity = -0.2f; @@ -230,7 +229,9 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) { this->unk_2D4 = this->actor.yawTowardsLink; this->unk_2D0 = this->actor.posRot.rot.x - 2000.0f; - this->unk_284 = this->unk_27C = this->unk_2DC = 0.0f; + this->unk_2DC = 0.0f; + this->unk_27C = 0.0f; + this->unk_284 = 0.0f; this->unk_254 = this->unk_256 = this->unk_258 = this->unk_25A = 0; this->actor.gravity = -0.2f; this->unk_2E0 = 5.0f; @@ -243,9 +244,6 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) { func_809B5268(this, globalCtx, 2); } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Attack_Niw/func_809B5670.s") -#endif void func_809B59B0(EnAttackNiw* this, GlobalContext* globalCtx) { if (!func_809B55EC(this, globalCtx)) { 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 9c6e0b945..840af5d73 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -39,12 +39,12 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_STOP), }; -Gfx D_809C2590[] = { +static Gfx D_809C2590[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2), gsSPEndDisplayList(), }; -Gfx D_809C25A0[] = { +static Gfx D_809C25A0[] = { gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_SURF2), gsSPEndDisplayList(), }; 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 b51e19a50..e1d73cb01 100644 --- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -12,8 +12,8 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, GlobalContext* globalCtx); void EnEncount1_SpawnTektites(EnEncount1* this, GlobalContext* globalCtx); void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, GlobalContext* globalCtx); -s16 sLeeverAngles[] = { 0x0000, 0x2710, 0x7148, 0x8EB8, 0xD8F0 }; -f32 sLeeverDists[] = { 200.0f, 170.0f, 120.0f, 120.0f, 170.0f }; +static s16 sLeeverAngles[] = { 0x0000, 0x2710, 0x7148, 0x8EB8, 0xD8F0 }; +static f32 sLeeverDists[] = { 200.0f, 170.0f, 120.0f, 120.0f, 170.0f }; const ActorInit En_Encount1_InitVars = { ACTOR_EN_ENCOUNT1, @@ -141,7 +141,8 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, GlobalContext* globalCtx) { leever = (EnReeba*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_REEBA, spawnPos.x, spawnPos.y, spawnPos.z, 0, 0, 0, spawnParams); - if (1) {} if (1) {} + if (1) {} + if (1) {} if (leever != NULL) { this->curNumSpawn++; leever->unk_280 = this->leeverIndex++; 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 d8b52903a..804140518 100644 --- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -81,7 +81,7 @@ const ActorInit En_GirlA_InitVars = { NULL, }; -char* D_80A3C590[] = { +static char* D_80A3C590[] = { "デクの実×5 ", "矢×30 ", "矢×50 ", "爆弾×5 ", "デクの実×10 ", "デクの棒 ", "爆弾×10 ", "さかな ", "赤クスリ ", "緑クスリ ", "青クスリ ", "巨人のナイフ ", "ハイリアの盾 ", "デクの盾 ", "ゴロンの服 ", "ゾ─ラの服 ", "回復のハート ", "ロンロン牛乳 ", @@ -93,10 +93,10 @@ char* D_80A3C590[] = { "赤クスリ ", "赤クスリ ", }; -s16 D_80A3C658[8] = { ITEM_MASK_KEATON, ITEM_MASK_SPOOKY, ITEM_MASK_SKULL, ITEM_MASK_BUNNY, - ITEM_MASK_TRUTH, ITEM_MASK_ZORA, ITEM_MASK_GORON, ITEM_MASK_GERUDO }; +static s16 D_80A3C658[8] = { ITEM_MASK_KEATON, ITEM_MASK_SPOOKY, ITEM_MASK_SKULL, ITEM_MASK_BUNNY, + ITEM_MASK_TRUTH, ITEM_MASK_ZORA, ITEM_MASK_GORON, ITEM_MASK_GERUDO }; -u16 D_80A3C668[5] = { 0x70B6, 0x70B5, 0x70B4, 0x70B7, 0x70BB }; +static u16 D_80A3C668[5] = { 0x70B6, 0x70B5, 0x70B4, 0x70B7, 0x70BB }; typedef struct { /* 0x00 */ s16 objID; @@ -112,7 +112,7 @@ typedef struct { /* 0x1C */ void (*unk_1C)(GlobalContext*, EnGirlA*); } ShopItemEntry; // size = 0x20 -ShopItemEntry D_80A3C674[] = { +static ShopItemEntry D_80A3C674[] = { { 0x00BB, 0x0011, func_8002ED80, 0x000F, 0x0005, 0x00B2, 0x007F, GI_NUTS_5_2, func_80A3ABF8, func_80A3B714, func_80A3BB6C }, { 0x00D8, 0x0025, func_8002EBCC, 0x003C, 0x001E, 0x00C1, 0x009B, GI_ARROWS_MEDIUM, func_80A3AAA8, func_80A3B634, @@ -210,7 +210,7 @@ ShopItemEntry D_80A3C674[] = { func_80A3BB6C }, }; -s16 D_80A3CCB4[8] = { 0x0005, 0x000A, 0x000F, 0x0014, 0x0019, 0x001E, 0x0023, 0x0028 }; +static s16 D_80A3CCB4[8] = { 0x0005, 0x000A, 0x000F, 0x0014, 0x0019, 0x001E, 0x0023, 0x0028 }; void func_80A3A750(EnGirlA* this, EnGirlAActionFunc func) { this->actionFunc = func; 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 d1b9c005e..a3d6232a1 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -44,11 +44,11 @@ static ColliderCylinderInit D_80A4FDA0 = { { 21, 48, 0, { 0, 0, 0 } }, }; -CollisionCheckInfoInit2 D_80A4FDCC = { 0x00, 0x0000, 0x0000, 0x0000, 0xFF }; +static CollisionCheckInfoInit2 D_80A4FDCC = { 0, 0, 0, 0, 0xFF }; -DamageTable D_80A4FDD8 = { 0x00, 0x00, 0xE0, 0xC0, 0xE0, 0xE0, 0xD0, 0xE0, 0xF0, 0xF0, 0xF0, - 0xB0, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0xB0, 0xB0, 0xB0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static DamageTable D_80A4FDD8 = { 0x00, 0x00, 0xE0, 0xC0, 0xE0, 0xE0, 0xD0, 0xE0, 0xF0, 0xF0, 0xF0, + 0xB0, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0xB0, 0xB0, 0xB0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), 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 2250486be..3e5fcdb35 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -43,7 +43,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(unk_4C, 500, ICHAIN_STOP), }; -UNK_PTR D_80A50BA4[] = { +static UNK_PTR D_80A50BA4[] = { 0x060005FC, 0x060006FC, 0x060007FC, 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 9962446b9..960d1adc9 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -30,7 +30,7 @@ void EnHeishi1_TurnTowardLink(EnHeishi1* this, GlobalContext* globalCtx); void EnHeishi1_Kick(EnHeishi1* this, GlobalContext* globalCtx); void EnHeishi1_WaitNight(EnHeishi1* this, GlobalContext* globalCtx); -s32 sPlayerIsCaught = false; +static s32 sPlayerIsCaught = false; const ActorInit En_Heishi1_InitVars = { 0, @@ -44,25 +44,25 @@ const ActorInit En_Heishi1_InitVars = { (ActorFunc)EnHeishi1_Draw, }; -f32 sAnimParamsInit[][8] = { +static f32 sAnimParamsInit[][8] = { { 1.0f, -10.0f, 3.0f, 0.5f, 1000.0f, 200.0f, 0.3f, 1000.0f }, { 3.0f, -3.0f, 6.0f, 0.8f, 2000.0f, 400.0f, 0.5f, 2000.0f }, { 1.0f, -10.0f, 3.0f, 0.5f, 1000.0f, 200.0f, 0.3f, 1000.0f }, { 3.0f, -3.0f, 6.0f, 0.8f, 2000.0f, 400.0f, 0.5f, 2000.0f }, }; -s16 sBaseHeadTimers[] = { 20, 10, 20, 10, 13, 0 }; +static s16 sBaseHeadTimers[] = { 20, 10, 20, 10, 13, 0 }; -Vec3f sRupeePositions[] = { +static Vec3f sRupeePositions[] = { { 0.0f, 0.0f, 90.0f }, { -55.0f, 0.0f, 90.0f }, { -55.0f, 0.0f, 30.0f }, { -55.0f, 0.0f, -30.0f }, { 0.0f, 0.0f, -30.0f }, { 55.0f, 0.0f, -30.0f }, { 55.0f, 0.0f, 30.0f }, { 55.0f, 0.0f, 90.0f }, }; -s32 sCamDataIdxs[] = { +static s32 sCamDataIdxs[] = { 7, 7, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 4, 4, 5, 6, }; -s16 sWaypoints[] = { 0, 4, 1, 5, 2, 6, 3, 7 }; +static s16 sWaypoints[] = { 0, 4, 1, 5, 2, 6, 3, 7 }; extern AnimationHeader D_06005880; extern AnimationHeader D_06005C30; 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 72e6b35fd..f27433483 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 @@ -274,7 +274,7 @@ void EnHorseGanon_Update(Actor* thisx, GlobalContext* globalCtx) { CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliderCylinder.base); } -void func_80A68FA8(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* colliderSphereItem) { +void func_80A68FA8(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { Vec3f sp4C; Vec3f sp40; EnHorseGanon* this = THIS; @@ -285,7 +285,7 @@ void func_80A68FA8(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* c sp4C.y = this->colliderSphere.list[index].dim.modelSphere.center.y; sp4C.z = this->colliderSphere.list[index].dim.modelSphere.center.z; - func_800A6408(colliderSphereItem, this->colliderSphere.list[index].dim.joint, &sp4C, &sp40); + func_800A6408(skin, this->colliderSphere.list[index].dim.joint, &sp4C, &sp40); this->colliderSphere.list[index].dim.worldSphere.center.x = sp40.x; this->colliderSphere.list[index].dim.worldSphere.center.y = sp40.y; 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 fdd4cbc09..85cecbd03 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 @@ -545,7 +545,7 @@ void EnHorseLinkChild_Update(Actor* thisx, GlobalContext* globalCtx) { func_80A6948C(this); } -void func_80A6ABF8(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* collider) { +void func_80A6ABF8(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { Vec3f center; Vec3f newCenter; EnHorseLinkChild* this = THIS; @@ -555,7 +555,7 @@ void func_80A6ABF8(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* c center.x = this->headCollider.list[i].dim.modelSphere.center.x; center.y = this->headCollider.list[i].dim.modelSphere.center.y; center.z = this->headCollider.list[i].dim.modelSphere.center.z; - func_800A6408(collider, this->headCollider.list[i].dim.joint, ¢er, &newCenter); + func_800A6408(skin, this->headCollider.list[i].dim.joint, ¢er, &newCenter); this->headCollider.list[i].dim.worldSphere.center.x = newCenter.x; this->headCollider.list[i].dim.worldSphere.center.y = newCenter.y; this->headCollider.list[i].dim.worldSphere.center.z = newCenter.z; 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 fda3836a5..880debd21 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 @@ -556,7 +556,7 @@ void EnHorseNormal_Update(Actor* thisx, GlobalContext* globalCtx) { } } -void func_80A6CAFC(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* collider) { +void func_80A6CAFC(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { Vec3f sp4C; Vec3f sp40; EnHorseNormal* this = THIS; @@ -566,7 +566,7 @@ void func_80A6CAFC(Actor* thisx, GlobalContext* globalCtx, ColliderJntSphItem* c sp4C.x = this->headCollider.list[i].dim.modelSphere.center.x; sp4C.y = this->headCollider.list[i].dim.modelSphere.center.y; sp4C.z = this->headCollider.list[i].dim.modelSphere.center.z; - func_800A6408(collider, this->headCollider.list[i].dim.joint, &sp4C, &sp40); + func_800A6408(skin, this->headCollider.list[i].dim.joint, &sp4C, &sp40); this->headCollider.list[i].dim.worldSphere.center.x = sp40.x; this->headCollider.list[i].dim.worldSphere.center.y = sp40.y; this->headCollider.list[i].dim.worldSphere.center.z = sp40.z; 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 302eadb17..f821d1bd1 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -29,9 +29,9 @@ void func_80A7D460(EnInsect* this, GlobalContext* globalCtx); extern SkeletonHeader D_04035590; extern AnimationHeader D_040341FC; -f32 D_80A7DEB0 = 0.0f; -s16 D_80A7DEB4 = 0; -s16 D_80A7DEB8 = 0; +static f32 D_80A7DEB0 = 0.0f; +static s16 D_80A7DEB4 = 0; +static s16 D_80A7DEB8 = 0; const ActorInit En_Insect_InitVars = { ACTOR_EN_INSECT, @@ -58,7 +58,7 @@ static ColliderJntSphInit sColliderInit = { sColliderItemInit, }; -u16 D_80A7DF10[] = { 0, 5, 7, 7 }; +static u16 D_80A7DF10[] = { 0, 5, 7, 7 }; static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_CONTINUE), @@ -304,11 +304,10 @@ void func_80A7C818(EnInsect* this) { this->unk_314 |= 0x100; } -#ifdef NON_MATCHING -// regalloc, minor reordering void func_80A7C86C(EnInsect* this, GlobalContext* globalCtx) { - s32 pad[2]; - s16 pad2; + s32 pad1; + s32 pad2; + s16 pad3; s16 frames; s16 yaw; s16 sp38 = this->actor.xzDistFromLink < 40.0f; @@ -332,10 +331,9 @@ void func_80A7C86C(EnInsect* this, GlobalContext* globalCtx) { yaw -= 0x2000; } } - + if (globalCtx) {} Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y, yaw, 2000); } - this->actor.shape.rot.y = this->actor.posRot.rot.y; this->skelAnime.animPlaybackSpeed = CLAMP(this->actor.speedXZ * 1.6f, 0.8f, 1.9f); SkelAnime_FrameUpdateMatrix(&this->skelAnime); @@ -346,9 +344,6 @@ void func_80A7C86C(EnInsect* this, GlobalContext* globalCtx) { func_80A7CE60(this); } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Insect/func_80A7C86C.s") -#endif void func_80A7CA64(EnInsect* this) { this->unk_31A = 200; 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 a9ea7f52a..73a7e9979 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -34,7 +34,7 @@ typedef struct { /* 0x07 */ u8 scale; } FlameParams; -FlameParams D_80A9E840[] = { +static FlameParams D_80A9E840[] = { { { 255, 200, 0, 255 }, { 255, 0, 0 }, 75 }, { { 255, 200, 0, 255 }, { 255, 0, 0 }, 75 }, { { 0, 170, 255, 255 }, { 0, 0, 255 }, 75 }, { { 170, 255, 0, 255 }, { 0, 150, 0 }, 75 }, { { 255, 200, 0, 255 }, { 255, 0, 0 }, 40 }, { { 255, 200, 0, 255 }, { 255, 0, 0 }, 75 }, 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 fbe62c2d7..b241324c8 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -45,26 +45,26 @@ static ColliderCylinderInit sCylinderInit = { { 18, 46, 0, { 0, 0, 0 } }, }; -CollisionCheckInfoInit2 sColChkInfoInit = { +static CollisionCheckInfoInit2 sColChkInfoInit = { 0x00, 0x0000, 0x0000, 0x0000, 0xFF, }; -struct_D_80AA1678 D_80AA1678[] = { +static struct_D_80AA1678 D_80AA1678[] = { { 0x06000820, 1.0f, 0x00, 0.0f }, { 0x06000820, 1.0f, 0x00, -10.0f }, { 0x06008D64, 1.0f, 0x00, 0.0f }, { 0x06008D64, 1.0f, 0x00, -10.0f }, }; -Vec3f D_80AA16B8 = { 800.0f, 0.0f, 0.0f }; +static Vec3f D_80AA16B8 = { 800.0f, 0.0f, 0.0f }; -UNK_PTR D_80AA16C4[] = { +static UNK_PTR D_80AA16C4[] = { 0x06001F18, 0x06002B18, 0x06002F18, }; -UNK_PTR D_80AA16D0[] = { +static UNK_PTR D_80AA16D0[] = { 0x06001B18, 0x06002318, 0x06002718, 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 f3f9eb853..6d19f3d02 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 @@ -40,7 +40,7 @@ static ColliderCylinderInit sCylinderInit = { static Vec3f sConstVec3f = { 0.2f, 0.2f, 0.2f }; -Gfx* D_80AB99D8[] = { 0x06004178, 0x06004978, 0x06005178 }; +static Gfx* D_80AB99D8[] = { 0x06004178, 0x06004978, 0x06005178 }; extern SkeletonHeader D_06009948; extern AnimationHeader D_06000378; 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 c112a2bb6..deb18ac65 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -28,7 +28,7 @@ void func_80AE7FD0(EnRl* this, GlobalContext* globalCtx); void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx); void func_80AE7D94(EnRl* this, GlobalContext* globalCtx); -UNK_PTR D_80AE81A0[] = { 0x06003620, 0x06003960, 0x06003B60 }; +static UNK_PTR D_80AE81A0[] = { 0x06003620, 0x06003960, 0x06003B60 }; extern SkeletonHeader D_06007B38; extern AnimationHeader D_06000A3C; @@ -322,7 +322,7 @@ void func_80AE7D94(EnRl* this, GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_rl_inKenjyanomaDemo02.c", 331); } -EnRlActionFunc sActionFuncs[] = { +static EnRlActionFunc sActionFuncs[] = { func_80AE7798, func_80AE77B8, func_80AE77F8, func_80AE7838, func_80AE7C64, func_80AE7C94, func_80AE7CE8, func_80AE7D40, }; @@ -370,7 +370,7 @@ void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx) { CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_rl.c", 437); } -EnRlDrawFunc sDrawFuncs[] = { +static EnRlDrawFunc sDrawFuncs[] = { func_80AE7FD0, func_80AE7FDC, func_80AE7D94, 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 a74f7cc85..f9f58931f 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 @@ -33,7 +33,7 @@ const ActorInit En_Wonder_Talk2_InitVars = { NULL, }; -s16 D_80B3A8E0[] = { 6, 0, 1, 2, 3, 4, 5 }; +static s16 D_80B3A8E0[] = { 6, 0, 1, 2, 3, 4, 5 }; void EnWonderTalk2_Destroy(Actor* thisx, GlobalContext* globalCtx) { } 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 2cb37c5e4..6f764872b 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -42,7 +42,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(unk_4C, 16, ICHAIN_STOP), }; -UNK_PTR D_80B43F64[] = { 0x06000AF0, 0x06000000 }; +static UNK_PTR D_80B43F64[] = { 0x06000AF0, 0x06000000 }; extern UNK_TYPE D_06000A60; extern Gfx D_06000970[]; 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 3f1a74974..e85cebf30 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -44,8 +44,8 @@ static ColliderCylinderInit sCylinderInit = { { 20, 46, 0, { 0, 0, 0 } }, }; -UNK_PTR D_80B4E61C[] = { 0x06007208, 0x06009848, 0x06009C48, 0x06009848 }; -UNK_PTR D_80B4E62C[] = { 0x06007608 }; +static UNK_PTR D_80B4E61C[] = { 0x06007208, 0x06009848, 0x06009C48, 0x06009848 }; +static UNK_PTR D_80B4E62C[] = { 0x06007608 }; extern AnimationHeader D_06000438; extern UNK_TYPE D_06008848; 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 5c77041ae..099ea8a23 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -61,11 +61,11 @@ void func_80B523BC(EnZl2* this, GlobalContext* globalCtx); void func_80B523C8(EnZl2* this, GlobalContext* globalCtx); void func_80B525D4(EnZl2* this, GlobalContext* globalCtx); -UNK_TYPE D_80B52810[] = { +static UNK_TYPE D_80B52810[] = { 0x060030C8, 0x06003C48, 0x06004048, 0x06004548, 0x06004948, 0x06004D48, 0x06005148, 0x06005D48, 0x06006148, }; -UNK_TYPE D_80B52834[] = { +static UNK_TYPE D_80B52834[] = { 0x06003508, 0x06005548, 0x06005948, 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 c2c4fc3cd..ffcab2ef5 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -35,17 +35,17 @@ const ActorInit Magic_Wind_InitVars = { #include "z_magic_wind_gfx.c" -u8 sTransformRefIdx[] = { +static u8 sTransformRefIdx[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -s16 sCopyValues[] = { +static s16 sCopyValues[] = { 0x0400, 0x0400, 0x0400, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0200, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x02CD, 0x02CD, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, }; -TransformData sTransformData[] = { +static TransformData sTransformData[] = { { 0x000C, 0x0001, @@ -76,11 +76,11 @@ TransformData sTransformData[] = { }, }; -TransformUpdateIndex sTransformUpdIdx = { +static TransformUpdateIndex sTransformUpdIdx = { sTransformRefIdx, sTransformData, sCopyValues, 0x0001, 0x0003C, }; -SkelCurveLimb sRootLimb = { +static SkelCurveLimb sRootLimb = { 0x01, 0xFF, { @@ -89,7 +89,7 @@ SkelCurveLimb sRootLimb = { }, }; -SkelCurveLimb sInnerCylinder = { +static SkelCurveLimb sInnerCylinder = { 0xFF, 0x02, { @@ -98,7 +98,7 @@ SkelCurveLimb sInnerCylinder = { }, }; -SkelCurveLimb sOuterCylinder = { +static SkelCurveLimb sOuterCylinder = { 0xFF, 0xFF, { @@ -107,18 +107,18 @@ SkelCurveLimb sOuterCylinder = { }, }; -SkelCurveLimb* sLimbs[] = { +static SkelCurveLimb* sLimbs[] = { &sRootLimb, &sInnerCylinder, &sOuterCylinder, }; -SkelCurveLimbList sLimbList = { +static SkelCurveLimbList sLimbList = { sLimbs, 0x03, }; -u8 sAlphaUpdVals[] = { +static u8 sAlphaUpdVals[] = { 0x00, 0x03, 0x04, 0x07, 0x09, 0x0A, 0x0D, 0x0F, 0x11, 0x12, 0x15, 0x16, 0x19, 0x1B, 0x1C, 0x1F, 0x21, 0x23, }; 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 4a4a758bb..5ec20878e 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -33,14 +33,14 @@ const ActorInit Obj_Comb_InitVars = { (ActorFunc)ObjComb_Draw, }; -ColliderJntSphItemInit sJntSphItemsInit[1] = { +static ColliderJntSphItemInit sJntSphItemsInit[1] = { { { 0x00, { 0x00000000, 0x00, 0x00 }, { 0x4001FFFE, 0x00, 0x00 }, 0x00, 0x01, 0x01 }, { 0x00, { { 0, 0, 0 }, 15 }, 100 }, }, }; -ColliderJntSphInit sJntSphInit = { +static ColliderJntSphInit sJntSphInit = { { COLTYPE_UNK10, 0x00, 0x09, 0x09, 0x20, COLSHAPE_JNTSPH }, 1, &sJntSphItemsInit, 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 b92ae1d21..96fca2a35 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -34,7 +34,7 @@ const ActorInit Obj_Hsblock_InitVars = { (ActorFunc)ObjHsblock_Draw, }; -f32 D_80B940C0[] = { 85.0f, 85.0f, 0.0f }; +static f32 D_80B940C0[] = { 85.0f, 85.0f, 0.0f }; static InitChainEntry sInitChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), 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 6d75456ed..fda4403b7 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -43,11 +43,11 @@ const ActorInit Obj_Oshihiki_InitVars = { (ActorFunc)ObjOshihiki_Draw, }; -f32 sScales[] = { +static f32 sScales[] = { (1 / 10.0f), (1 / 6.0f), (1 / 5.0f), (1 / 3.0f), (1 / 10.0f), (1 / 6.0f), (1 / 5.0f), (1 / 3.0f), }; -Color_RGB8 sColors[][4] = { +static Color_RGB8 sColors[][4] = { { { 110, 86, 40 }, { 110, 86, 40 }, { 110, 86, 40 }, { 110, 86, 40 } }, // deku tree { { 106, 120, 110 }, { 104, 80, 20 }, { 0, 0, 0 }, { 0, 0, 0 } }, // dodongos cavern { { 142, 99, 86 }, { 72, 118, 96 }, { 0, 0, 0 }, { 0, 0, 0 } }, // forest temple @@ -59,7 +59,7 @@ Color_RGB8 sColors[][4] = { { { 232, 210, 176 }, { 232, 210, 176 }, { 232, 210, 176 }, { 232, 210, 176 } }, // gerudo training grounds }; -s16 sScenes[] = { +static s16 sScenes[] = { SCENE_YDAN, SCENE_DDAN, SCENE_BMORI1, SCENE_HIDAN, SCENE_MIZUSIN, SCENE_JYASINZOU, SCENE_HAKADAN, SCENE_GANON, SCENE_MEN, }; @@ -71,19 +71,19 @@ static InitChainEntry sInitChain[] = { }; // The vertices and center of the bottom face -Vec3f sColCheckPoints[5] = { +static Vec3f sColCheckPoints[5] = { { 29.99f, 1.01f, -29.99f }, { -29.99f, 1.01f, -29.99f }, { -29.99f, 1.01f, 29.99f }, { 29.99f, 1.01f, 29.99f }, { 0.0f, 1.01f, 0.0f }, }; -Vec2f sFaceVtx[] = { +static Vec2f sFaceVtx[] = { { -30.0f, 0.0f }, { 30.0f, 0.0f }, { -30.0f, 60.0f }, { 30.0f, 60.0f }, }; -Vec2f sFaceDirection[] = { +static Vec2f sFaceDirection[] = { { 1.0f, 1.0f }, { -1.0f, 1.0f }, { 1.0f, -1.0f }, |
