mirror of
https://github.com/zeldaret/tp
synced 2026-06-03 02:29:59 -04:00
Clean up code, remove fakematches, add UNUSED, enable warnings (#2992)
* Remove NDEBUG_DEFINED fakematch, clean up getName temps * Fix ifdef * Fix bad JSystem pch ifdef breaking decomp.me * Remove Acch Chk fakematches * Private Acch fields * Fix some clangd errors in headers * Add UNUSED macro for matching debug parameters * Enable clangd unused-parameter warning * Remove extern from initializers Probably added by dol2asm? * Fix process profile definitions * Remove leftover dol2asm address comments * Remove some unnecessary double casts * Enable some more clangd warnings * Fix missing usages of fopAcM_ct * Fix wrong enum usage * Fix more fakematches
This commit is contained in:
@@ -335,9 +335,6 @@ static u8 GX2HWFiltConv[6] = {
|
||||
0x00, 0x04, 0x01, 0x05, 0x02, 0x06,
|
||||
};
|
||||
|
||||
/* 8030E438-8030E5D4 308D78 019C+00 0/0 1/1 0/0 .text
|
||||
* J3DGDSetTexLookupMode__F11_GXTexMapID14_GXTexWrapMode14_GXTexWrapMode12_GXTexFilter12_GXTexFilterfffUcUc13_GXAnisotropy
|
||||
*/
|
||||
void J3DGDSetTexLookupMode(GXTexMapID id, GXTexWrapMode wrap_s,
|
||||
GXTexWrapMode wrap_t, GXTexFilter min_filt,
|
||||
GXTexFilter mag_filt, f32 min_lod, f32 max_lod,
|
||||
@@ -435,9 +432,6 @@ void J3DGDSetIndTexMtx(GXIndTexMtxID mtx_id, f32 offset[2][3], s8 scale_exp) {
|
||||
));
|
||||
}
|
||||
|
||||
/* 8030EE10-8030EF08 309750 00F8+00 0/0 2/2 0/0 .text
|
||||
* J3DGDSetIndTexCoordScale__F16_GXIndTexStageID14_GXIndTexScale14_GXIndTexScale14_GXIndTexScale14_GXIndTexScale
|
||||
*/
|
||||
void J3DGDSetIndTexCoordScale(GXIndTexStageID indStageEven, GXIndTexScale scaleS0,
|
||||
GXIndTexScale scaleT0, GXIndTexScale scaleS1,
|
||||
GXIndTexScale scaleT1) {
|
||||
@@ -451,9 +445,6 @@ void J3DGDSetIndTexCoordScale(GXIndTexStageID indStageEven, GXIndTexScale scaleS
|
||||
));
|
||||
}
|
||||
|
||||
/* 8030EF08-8030F108 309848 0200+00 0/0 2/2 0/0 .text
|
||||
* J3DGDSetIndTexOrder__FUl13_GXTexCoordID11_GXTexMapID13_GXTexCoordID11_GXTexMapID13_GXTexCoordID11_GXTexMapID13_GXTexCoordID11_GXTexMapID
|
||||
*/
|
||||
void J3DGDSetIndTexOrder(u32 count, GXTexCoordID texCoord0, GXTexMapID texMap0,
|
||||
GXTexCoordID texCoord1, GXTexMapID texMap1,
|
||||
GXTexCoordID texCoord2, GXTexMapID texMap2,
|
||||
@@ -492,9 +483,6 @@ void J3DGDSetIndTexOrder(u32 count, GXTexCoordID texCoord0, GXTexMapID texMap0,
|
||||
J3DGDWriteBPCmd(BP_IND_MASK(mask, 0xF));
|
||||
}
|
||||
|
||||
/* 8030F108-8030F294 309A48 018C+00 0/0 9/9 0/0 .text
|
||||
* J3DGDSetTevOrder__F13_GXTevStageID13_GXTexCoordID11_GXTexMapID12_GXChannelID13_GXTexCoordID11_GXTexMapID12_GXChannelID
|
||||
*/
|
||||
void J3DGDSetTevOrder(GXTevStageID evenStage, GXTexCoordID coord0, GXTexMapID map0,
|
||||
GXChannelID color0, GXTexCoordID coord1, GXTexMapID map1,
|
||||
GXChannelID color1) {
|
||||
|
||||
@@ -67,11 +67,8 @@ u32 J3DShapeMtx::sCurrentPipeline;
|
||||
|
||||
u8* J3DShapeMtx::sCurrentScaleFlag;
|
||||
|
||||
// This below is technically part of J3DScaleFlag.
|
||||
/* 804515B0 0001+00 data_804515B0 None */
|
||||
bool J3DShapeMtx::sNBTFlag;
|
||||
|
||||
/* 804515B1 0003+00 data_804515B1 None */
|
||||
bool J3DShapeMtx::sLODFlag;
|
||||
|
||||
u32 J3DShapeMtx::sTexMtxLoadType;
|
||||
|
||||
@@ -315,7 +315,7 @@ void loadNBTScale(J3DNBTScale& NBTScale) {
|
||||
}
|
||||
}
|
||||
|
||||
extern const J3DLightInfo j3dDefaultLightInfo = {
|
||||
const J3DLightInfo j3dDefaultLightInfo = {
|
||||
0.0f, 0.0f, 0.0f,
|
||||
0.0f, -1.0f, 0.0f,
|
||||
0xff, 0xff, 0xff, 0xff,
|
||||
@@ -323,14 +323,14 @@ extern const J3DLightInfo j3dDefaultLightInfo = {
|
||||
1.0f, 0.0f, 0.0f,
|
||||
};
|
||||
|
||||
extern J3DTexCoordInfo const j3dDefaultTexCoordInfo[8] = {
|
||||
J3DTexCoordInfo const j3dDefaultTexCoordInfo[8] = {
|
||||
{GX_MTX2x4, GX_TG_TEX0, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX1, GX_IDENTITY, 0},
|
||||
{GX_MTX2x4, GX_TG_TEX2, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX3, GX_IDENTITY, 0},
|
||||
{GX_MTX2x4, GX_TG_TEX4, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX5, GX_IDENTITY, 0},
|
||||
{GX_MTX2x4, GX_TG_TEX6, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX7, GX_IDENTITY, 0},
|
||||
};
|
||||
|
||||
extern J3DTexMtxInfo const j3dDefaultTexMtxInfo = {
|
||||
J3DTexMtxInfo const j3dDefaultTexMtxInfo = {
|
||||
0x01,
|
||||
0x00,
|
||||
0xFF,
|
||||
@@ -341,27 +341,27 @@ extern J3DTexMtxInfo const j3dDefaultTexMtxInfo = {
|
||||
1.0f},
|
||||
};
|
||||
|
||||
extern J3DIndTexMtxInfo const j3dDefaultIndTexMtxInfo = {
|
||||
J3DIndTexMtxInfo const j3dDefaultIndTexMtxInfo = {
|
||||
0.5f, 0.0f, 0.0f,
|
||||
0.0f, 0.5f, 0.0f,
|
||||
1
|
||||
};
|
||||
|
||||
extern J3DTevStageInfo const j3dDefaultTevStageInfo = {
|
||||
J3DTevStageInfo const j3dDefaultTevStageInfo = {
|
||||
0x04, 0x0A, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||
0x05, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
|
||||
};
|
||||
|
||||
extern J3DIndTevStageInfo const j3dDefaultIndTevStageInfo = {
|
||||
J3DIndTevStageInfo const j3dDefaultIndTevStageInfo = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
extern J3DFogInfo const j3dDefaultFogInfo = {
|
||||
J3DFogInfo const j3dDefaultFogInfo = {
|
||||
0x00, 0x00, 0x0140, 0.0f, 0.0f, 0.1f, 10000.0f, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
};
|
||||
|
||||
extern J3DNBTScaleInfo const j3dDefaultNBTScaleInfo = {
|
||||
J3DNBTScaleInfo const j3dDefaultNBTScaleInfo = {
|
||||
0x00, 1.0f, 1.0f, 1.0f,
|
||||
};
|
||||
|
||||
@@ -413,7 +413,6 @@ void makeAlphaCmpTable() {
|
||||
}
|
||||
}
|
||||
|
||||
extern u8 j3dZModeTable[96];
|
||||
u8 j3dZModeTable[96];
|
||||
|
||||
void makeZModeTable() {
|
||||
@@ -492,43 +491,43 @@ static void J3DGDLoadPostTexMtxImm(f32 (*param_1)[4], u32 param_2) {
|
||||
J3DGDWrite_f32(param_1[2][3]);
|
||||
}
|
||||
|
||||
extern const GXColor j3dDefaultColInfo = {0xFF, 0xFF, 0xFF, 0xFF};
|
||||
const GXColor j3dDefaultColInfo = {0xFF, 0xFF, 0xFF, 0xFF};
|
||||
|
||||
extern const GXColor j3dDefaultAmbInfo = {0x32, 0x32, 0x32, 0x32};
|
||||
const GXColor j3dDefaultAmbInfo = {0x32, 0x32, 0x32, 0x32};
|
||||
|
||||
extern const u8 j3dDefaultNumChans = 1;
|
||||
const u8 j3dDefaultNumChans = 1;
|
||||
|
||||
extern const J3DTevOrderInfo j3dDefaultTevOrderInfoNull = {0xFF, 0xFF, 0xFF, 0x00};
|
||||
const J3DTevOrderInfo j3dDefaultTevOrderInfoNull = {0xFF, 0xFF, 0xFF, 0x00};
|
||||
|
||||
extern const J3DIndTexOrderInfo j3dDefaultIndTexOrderNull = {0xFF, 0xFF, 0x00, 0x00};
|
||||
const J3DIndTexOrderInfo j3dDefaultIndTexOrderNull = {0xFF, 0xFF, 0x00, 0x00};
|
||||
|
||||
extern const GXColorS10 j3dDefaultTevColor = {0xFF, 0xFF, 0xFF, 0xFF};
|
||||
const GXColorS10 j3dDefaultTevColor = {0xFF, 0xFF, 0xFF, 0xFF};
|
||||
|
||||
extern const J3DIndTexCoordScaleInfo j3dDefaultIndTexCoordScaleInfo = {
|
||||
const J3DIndTexCoordScaleInfo j3dDefaultIndTexCoordScaleInfo = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
|
||||
extern const GXColor j3dDefaultTevKColor = {0xFF, 0xFF, 0xFF, 0xFF};
|
||||
const GXColor j3dDefaultTevKColor = {0xFF, 0xFF, 0xFF, 0xFF};
|
||||
|
||||
extern J3DTevSwapModeInfo const j3dDefaultTevSwapMode = {
|
||||
J3DTevSwapModeInfo const j3dDefaultTevSwapMode = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
|
||||
extern const J3DTevSwapModeTableInfo j3dDefaultTevSwapModeTable = {0x00, 0x01, 0x02, 0x03};
|
||||
const J3DTevSwapModeTableInfo j3dDefaultTevSwapModeTable = {0x00, 0x01, 0x02, 0x03};
|
||||
|
||||
extern const J3DBlendInfo j3dDefaultBlendInfo = {GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP};
|
||||
const J3DBlendInfo j3dDefaultBlendInfo = {GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP};
|
||||
|
||||
extern const J3DColorChanInfo j3dDefaultColorChanInfo = {
|
||||
const J3DColorChanInfo j3dDefaultColorChanInfo = {
|
||||
0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0xFF, 0xFF,
|
||||
};
|
||||
|
||||
extern const u8 j3dDefaultTevSwapTableID = 0x1B;
|
||||
const u8 j3dDefaultTevSwapTableID = 0x1B;
|
||||
|
||||
const u16 j3dDefaultAlphaCmpID = 0x00E7;
|
||||
|
||||
|
||||
@@ -70,12 +70,12 @@ void J3DCalcBBoardMtx(__REGISTER Mtx mtx) {
|
||||
mtx[2][2] = z;
|
||||
}
|
||||
|
||||
extern J3DTransformInfo const j3dDefaultTransformInfo = {
|
||||
J3DTransformInfo const j3dDefaultTransformInfo = {
|
||||
{1.0f, 1.0f, 1.0f}, {0, 0, 0}, {0.0f, 0.0f, 0.0f}};
|
||||
|
||||
extern Vec const j3dDefaultScale = {1.0f, 1.0f, 1.0f};
|
||||
Vec const j3dDefaultScale = {1.0f, 1.0f, 1.0f};
|
||||
|
||||
extern Mtx const j3dDefaultMtx = {
|
||||
Mtx const j3dDefaultMtx = {
|
||||
{1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 1.0f, 0.0f}};
|
||||
|
||||
void J3DCalcYBBoardMtx(Mtx mtx) {
|
||||
@@ -541,7 +541,7 @@ loop:
|
||||
}
|
||||
#endif // clang-format on
|
||||
|
||||
extern f32 const PSMulUnit01[] = {
|
||||
f32 const PSMulUnit01[] = {
|
||||
0.0f,
|
||||
-1.0f,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user