From 877889c5105e59ee3aa4e57e53d3b0c5ffcfca77 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Tue, 23 Dec 2025 18:53:10 -0500 Subject: 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 --- src/d/d_attention.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/d/d_attention.cpp') diff --git a/src/d/d_attention.cpp b/src/d/d_attention.cpp index d41cef2b19..96f5d0ad69 100644 --- a/src/d/d_attention.cpp +++ b/src/d/d_attention.cpp @@ -1761,17 +1761,9 @@ void dAttCatch_c::proc() { mCatchItemNo = fpcNm_ITEM_WATER_BOTTLE; } -// FAKEMATCH: this fixes regalloc in `dAttCatch_c::request` but breaks most other calls -// some more accurate fix should be found eventually -inline fopAc_ac_c* dComIfGp_getPlayer_fakematch(int idx) { - daAlink_c* const link = (daAlink_c* const)g_dComIfG_gameInfo.play.getPlayer(idx); - fopAc_ac_c* player = (fopAc_ac_c*)link; - return player; -} - int dAttCatch_c::request(fopAc_ac_c* i_reqActor, u8 i_itemNo, f32 i_horizontalDist, f32 i_upDist, f32 i_downDist, s16 i_angle, int param_7) { - fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer_fakematch(0); + fopAc_ac_c* player = dComIfGp_getPlayer(0); if (param_7 > field_0x4) { return 0; } -- cgit v1.2.3