summaryrefslogtreecommitdiff
path: root/src/d/d_attention.cpp
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-12-23 18:53:10 -0500
committerGitHub <noreply@github.com>2025-12-23 15:53:10 -0800
commit877889c5105e59ee3aa4e57e53d3b0c5ffcfca77 (patch)
tree154eddaea39971210e088cb828f80d38b998f998 /src/d/d_attention.cpp
parent6ef13c620a46aed5fea525699a4832a1ad6e4d1f (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/d/d_attention.cpp')
-rw-r--r--src/d/d_attention.cpp10
1 files changed, 1 insertions, 9 deletions
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;
}