diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-12-23 18:53:10 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-23 15:53:10 -0800 |
| commit | 877889c5105e59ee3aa4e57e53d3b0c5ffcfca77 (patch) | |
| tree | 154eddaea39971210e088cb828f80d38b998f998 /src/JSystem/J2DGraph | |
| parent | 6ef13c620a46aed5fea525699a4832a1ad6e4d1f (diff) | |
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
Diffstat (limited to 'src/JSystem/J2DGraph')
| -rw-r--r-- | src/JSystem/J2DGraph/J2DGrafContext.cpp | 3 | ||||
| -rw-r--r-- | src/JSystem/J2DGraph/J2DMaterialFactory.cpp | 3 | ||||
| -rw-r--r-- | src/JSystem/J2DGraph/J2DPrint.cpp | 8 | ||||
| -rw-r--r-- | src/JSystem/J2DGraph/J2DTevs.cpp | 30 | ||||
| -rw-r--r-- | src/JSystem/J2DGraph/J2DTextBox.cpp | 3 | ||||
| -rw-r--r-- | src/JSystem/J2DGraph/J2DWindow.cpp | 3 |
6 files changed, 16 insertions, 34 deletions
diff --git a/src/JSystem/J2DGraph/J2DGrafContext.cpp b/src/JSystem/J2DGraph/J2DGrafContext.cpp index 05a1d89cf5..3f920bc407 100644 --- a/src/JSystem/J2DGraph/J2DGrafContext.cpp +++ b/src/JSystem/J2DGraph/J2DGrafContext.cpp @@ -93,9 +93,6 @@ void J2DGrafContext::place(JGeometry::TBox2<f32> const& bounds) { mScissorBounds = bounds; } -/* 802E9118-802E9234 2E3A58 011C+00 1/1 4/4 0/0 .text - * setColor__14J2DGrafContextFQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColor - */ void J2DGrafContext::setColor(JUtility::TColor colorTL, JUtility::TColor colorTR, JUtility::TColor colorBR, JUtility::TColor colorBL) { mColorTL = colorTL; diff --git a/src/JSystem/J2DGraph/J2DMaterialFactory.cpp b/src/JSystem/J2DGraph/J2DMaterialFactory.cpp index 024adef56f..a0229abb69 100644 --- a/src/JSystem/J2DGraph/J2DMaterialFactory.cpp +++ b/src/JSystem/J2DGraph/J2DMaterialFactory.cpp @@ -60,9 +60,6 @@ u32 J2DMaterialFactory::countStages(int param_0) const { return uVar3; } -/* 802F2D1C-802F362C 2ED65C 0910+00 0/0 1/1 0/0 .text - * create__18J2DMaterialFactoryCFP11J2DMaterialiUlP15J2DResReferenceP15J2DResReferenceP10JKRArchive - */ J2DMaterial* J2DMaterialFactory::create(J2DMaterial* param_0, int index, u32 param_2, J2DResReference* param_3, J2DResReference* param_4, JKRArchive* param_5) const { diff --git a/src/JSystem/J2DGraph/J2DPrint.cpp b/src/JSystem/J2DGraph/J2DPrint.cpp index 93d2db9c11..9dfb3954d2 100644 --- a/src/JSystem/J2DGraph/J2DPrint.cpp +++ b/src/JSystem/J2DGraph/J2DPrint.cpp @@ -34,9 +34,6 @@ J2DPrint::J2DPrint(JUTFont* pFont, JUtility::TColor charColor, JUtility::TColor private_initiate(pFont, 0.0f, 0.0f, charColor, gradColor, 0, 0xFFFFFFFF, true); } -/* 802F4394-802F4420 2EECD4 008C+00 0/0 6/6 0/0 .text - * __ct__8J2DPrintFP7JUTFontffQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColor - */ J2DPrint::J2DPrint(JUTFont* pFont, f32 charSpacing, f32 lineSpacing, JUtility::TColor charColor, JUtility::TColor gradColor, JUtility::TColor blackColor, JUtility::TColor whiteColor) { private_initiate(pFont, charSpacing, lineSpacing, charColor, gradColor, blackColor, whiteColor, false); @@ -50,9 +47,6 @@ void J2DPrint::initiate() { } } -/* 802F4468-802F4658 2EEDA8 01F0+00 1/1 0/0 0/0 .text - * private_initiate__8J2DPrintFP7JUTFontffQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColorb - */ void J2DPrint::private_initiate(JUTFont* pFont, f32 charSpacing, f32 lineSpacing, JUtility::TColor charColor, JUtility::TColor gradColor, JUtility::TColor blackColor, JUtility::TColor whiteColor, bool param_7) { @@ -317,7 +311,7 @@ f32 J2DPrint::parse(const u8* pString, int length, int param_2, u16* param_3, } else { if (param_6) { if (param_3 != NULL) { - mFont->drawChar_scale(mCursorH + (f32)(s16)param_3[someIndex], mCursorV, (s32)mScaleX, (s32)mScaleY, iCharacter, true); + mFont->drawChar_scale(mCursorH + (s16)param_3[someIndex], mCursorV, (s32)mScaleX, (s32)mScaleY, iCharacter, true); } else { mFont->drawChar_scale(mCursorH, mCursorV, (s32)mScaleX, (s32)mScaleY, iCharacter, true); } diff --git a/src/JSystem/J2DGraph/J2DTevs.cpp b/src/JSystem/J2DGraph/J2DTevs.cpp index 69234af65f..cfd68821e5 100644 --- a/src/JSystem/J2DGraph/J2DTevs.cpp +++ b/src/JSystem/J2DGraph/J2DTevs.cpp @@ -108,48 +108,48 @@ J2DTexMtxInfo const j2dDefaultTexMtxInfo = {1, 1, 255, 255, 0.5f, 0.5f, J2DIndTexMtxInfo const j2dDefaultIndTexMtxInfo = {{0.5f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f}, 1}; -extern J2DTevStageInfo const j2dDefaultTevStageInfo = { +J2DTevStageInfo const j2dDefaultTevStageInfo = { 4, GX_CC_RASC, GX_CC_ZERO, GX_CC_ZERO, GX_CC_CPREV, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV, GX_CA_RASA, GX_CA_ZERO, GX_CA_ZERO, GX_CA_APREV, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV}; -extern const J2DIndTevStageInfo j2dDefaultIndTevStageInfo = { +const J2DIndTevStageInfo j2dDefaultIndTevStageInfo = { GX_INDTEXSTAGE0, GX_ITB_NONE, GX_ITB_NONE, GX_ITM_OFF, GX_ITW_OFF, GX_ITW_OFF, 0, 0, GX_ITBA_OFF, }; -extern const GXColor j2dDefaultColInfo = {255, 255, 255, 255}; +const GXColor j2dDefaultColInfo = {255, 255, 255, 255}; -extern const J2DTevOrderInfo j2dDefaultTevOrderInfoNull = { +const J2DTevOrderInfo j2dDefaultTevOrderInfoNull = { GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL, 0}; -extern const J2DIndTexOrderInfo j2dDefaultIndTexOrderNull = { +const J2DIndTexOrderInfo j2dDefaultIndTexOrderNull = { GX_TEXCOORD_NULL, GX_TEXMAP_NULL, }; -extern const GXColorS10 j2dDefaultTevColor = {255, 255, 255, 255}; +const GXColorS10 j2dDefaultTevColor = {255, 255, 255, 255}; -extern const J2DIndTexCoordScaleInfo j2dDefaultIndTexCoordScaleInfo = { +const J2DIndTexCoordScaleInfo j2dDefaultIndTexCoordScaleInfo = { GX_ITS_1, GX_ITS_1, }; -extern const GXColor j2dDefaultTevKColor = {255, 255, 255, 255}; +const GXColor j2dDefaultTevKColor = {255, 255, 255, 255}; -extern const J2DTevSwapModeInfo j2dDefaultTevSwapMode = {GX_TEV_SWAP0, GX_TEV_SWAP0, 0, 0}; +const J2DTevSwapModeInfo j2dDefaultTevSwapMode = {GX_TEV_SWAP0, GX_TEV_SWAP0, 0, 0}; -extern const J2DTevSwapModeTableInfo j2dDefaultTevSwapModeTable = { +const J2DTevSwapModeTableInfo j2dDefaultTevSwapModeTable = { GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA}; -extern const J2DBlendInfo j2dDefaultBlendInfo = {GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, +const J2DBlendInfo j2dDefaultBlendInfo = {GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP}; -extern const u8 j2dDefaultPEBlockDither = 0; +const u8 j2dDefaultPEBlockDither = 0; -extern const J2DColorChanInfo j2dDefaultColorChanInfo = {0, 3, 0, 0}; +const J2DColorChanInfo j2dDefaultColorChanInfo = {0, 3, 0, 0}; -extern const u8 j2dDefaultTevSwapTableID = 0x1B; +const u8 j2dDefaultTevSwapTableID = 0x1B; -extern const u16 j2dDefaultAlphaCmp = 0x00E7; +const u16 j2dDefaultAlphaCmp = 0x00E7; diff --git a/src/JSystem/J2DGraph/J2DTextBox.cpp b/src/JSystem/J2DGraph/J2DTextBox.cpp index 2370cbf41a..d82fd37586 100644 --- a/src/JSystem/J2DGraph/J2DTextBox.cpp +++ b/src/JSystem/J2DGraph/J2DTextBox.cpp @@ -109,9 +109,6 @@ J2DTextBox::J2DTextBox(J2DPane* p_pane, JSURandomInputStream* p_stream, u32 para mTextFontOwned = true; } -/* 802FFBC4-802FFC58 2FA504 0094+00 0/0 1/1 0/0 .text - * __ct__10J2DTextBoxFUxRCQ29JGeometry8TBox2<f>PC7ResFONTPCcs18J2DTextBoxHBinding18J2DTextBoxVBinding - */ J2DTextBox::J2DTextBox(u64 tag, JGeometry::TBox2<f32> const& bounds, ResFONT const* p_font, char const* string, s16 strLength, J2DTextBoxHBinding hBind, J2DTextBoxVBinding vBind) diff --git a/src/JSystem/J2DGraph/J2DWindow.cpp b/src/JSystem/J2DGraph/J2DWindow.cpp index 4ea29be479..8e02439053 100644 --- a/src/JSystem/J2DGraph/J2DWindow.cpp +++ b/src/JSystem/J2DGraph/J2DWindow.cpp @@ -423,9 +423,6 @@ void J2DWindow::resize(f32 param_0, f32 param_1) { } } -/* 802FB12C-802FB1D8 2F5A6C 00AC+00 1/1 0/0 0/0 .text - * setContentsColor__9J2DWindowFQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColor - */ void J2DWindow::setContentsColor(JUtility::TColor param_0, JUtility::TColor param_1, JUtility::TColor param_2, JUtility::TColor param_3) { field_0x128.set(param_0); |
