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/d/d_camera.cpp | |
| 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/d/d_camera.cpp')
| -rw-r--r-- | src/d/d_camera.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index b6ca10750e..9425cfdde4 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -720,8 +720,7 @@ void dCamera_c::initPad() { mHoldY = mDoCPd_c::getHoldY(mPadID) ? true : false; mTrigY = mDoCPd_c::getTrigY(mPadID) ? true : false; - // fakematch (doesn't match in debug) - mHoldZ = (u8)mDoCPd_c::getHoldZ(mPadID) ? true : false; + mHoldZ = mDoCPd_c::getHoldZ(mPadID) ? true : false; mTrigZ = mDoCPd_c::getTrigZ(mPadID) ? true : false; field_0x21f = 0; @@ -4223,15 +4222,13 @@ bool dCamera_c::lockonCamera(s32 param_0) { target_attention_pos.z = positionOf(mpLockonTarget).z; } - // this should probably be an ifdef, but we force it to be compiled - // to make the function large enough to stop doing inlining - if (!NDEBUG_DEFINED) { - if (mCamSetup.CheckFlag(0x8000)) { - //char name[28]; - fopAcM_getNameString(mpPlayerActor, NULL); - dDbVw_Report(0x1e0, 0x109, "%s", NULL); - } +#if DEBUG + if (mCamSetup.CheckFlag(0x8000)) { + char name[dStage_NAME_LENGTH]; + fopAcM_getNameString(mpPlayerActor, name); + dDbVw_Report(0x1e0, 0x109, "%s", name); } +#endif if (check_owner_action(mPadID, 0x2000008)) { cXyz vec(0.0f, 0.0f, -90.0f); @@ -8924,7 +8921,7 @@ bool dCamera_c::oneSideCamera(s32 param_1) { bool dCamera_c::eventCamera(s32 param_0) { char sp90[12]; - (void)param_0; + UNUSED(param_0); int var_r29 = -1; typedef bool (dCamera_c::*func)(); @@ -10072,7 +10069,7 @@ static leafdraw_method_class method = { (process_method_func)camera_draw, }; -extern camera_process_profile_definition g_profile_CAMERA = { +camera_process_profile_definition g_profile_CAMERA = { fpcLy_CURRENT_e, 11, fpcPi_CURRENT_e, @@ -10093,7 +10090,7 @@ extern camera_process_profile_definition g_profile_CAMERA = { 0, }; -extern camera_process_profile_definition g_profile_CAMERA2 = { +camera_process_profile_definition g_profile_CAMERA2 = { fpcLy_CURRENT_e, 11, fpcPi_CURRENT_e, |
