summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-08-09 18:04:48 +0200
committerrobojumper <robojumper@gmail.com>2025-09-13 10:13:39 +0200
commite08d120f0bd0e5df3d3c173130d485dcdddb22d4 (patch)
treec956a039e225fc89d07468dcd1699e7c2e66a99d /src
parent0847c40aa0ba0482e25e1e10a4718cf062432e63 (diff)
small cleanup
Diffstat (limited to 'src')
-rw-r--r--src/d/lyt/d_lyt_pause_disp_00.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/d/lyt/d_lyt_pause_disp_00.cpp b/src/d/lyt/d_lyt_pause_disp_00.cpp
index c2ab10bf..153cb74b 100644
--- a/src/d/lyt/d_lyt_pause_disp_00.cpp
+++ b/src/d/lyt/d_lyt_pause_disp_00.cpp
@@ -329,6 +329,9 @@ static const d2d::LytBrlanMapping brlanMap[] = {
#define PAUSE_DISP_00_NUM_SUBPANES 24
+#define navTargetToBounding(n) (s32)(n - 1)
+#define boundingToNavTarget(n) (s32)(n + 1)
+
// clang-format off
static const u8 iconVariants[] = {
// Wheel
@@ -1621,8 +1624,7 @@ s32 dLytPauseDisp00_c::updateSelection() {
}
if (mCurrentNavTarget != 0) {
- s32 paneIdx = navTargetToBounding(mCurrentNavTarget);
- dCsBase_c::GetInstance()->setCursorStickTargetPane(mpBoundings[paneIdx]);
+ dCsBase_c::GetInstance()->setCursorStickTargetPane(mpBoundings[navTargetToBounding(mCurrentNavTarget)]);
}
target = mCurrentNavTarget;
@@ -1666,8 +1668,7 @@ s32 dLytPauseDisp00_c::updateSelection() {
}
anyTab: {
pause->setCurrentSelectionTab(tab);
- s32 bounding = navTargetToBounding(target);
- if (mpBoundings[bounding]->IsVisible()) {
+ if (mpBoundings[navTargetToBounding(target)]->IsVisible()) {
pause->setSelection(dLytPauseMgr_c::SELECT_CATEGORY, tab, false);
} else {
pause->setSelection(dLytPauseMgr_c::SELECT_NONE, 0, false);
@@ -1739,8 +1740,7 @@ s32 dLytPauseDisp00_c::updateSelection() {
}
}
if (!dPadNav::isPrevPointerVisible()) {
- s32 bounding = navTargetToBounding(target);
- if (!mpBoundings[bounding]->IsVisible()) {
+ if (!mpBoundings[navTargetToBounding(target)]->IsVisible()) {
selectionType = dLytPauseMgr_c::SELECT_NONE;
id = 0;
}
@@ -1750,6 +1750,10 @@ s32 dLytPauseDisp00_c::updateSelection() {
}
}
+ // TODO: this part needs to be fixed before we can deal with the regswaps.
+ // Part of the `mpBoundings[navTargetToBounding(target)]->IsVisible()` here is kept around
+ // until the end of the function where the same call appears.
+
pAnm = &mAnm[PAUSE_DISP_00_ANIM_ONOFF_TABLET];
for (int i = PAUSE_DISP_00_BOUNDING_TABLETS; i < PAUSE_DISP_00_BOUNDING_HARP; i++) {
s32 anim = PAUSE_DISP_00_ANIM_ONOFF_TABLET + i;