summaryrefslogtreecommitdiff
path: root/src/d/d_menu_fmap.cpp
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2026-04-11 02:43:37 -0400
committerGitHub <noreply@github.com>2026-04-10 23:43:37 -0700
commitd7c34741e23297863254089125ed9ab56617dc5b (patch)
tree6165df2b21a161a4349dd9c62440283a1909a9c1 /src/d/d_menu_fmap.cpp
parentdabd6961a674f23ec0df8f2b4d16ba12e1e090e5 (diff)
Replace magic constants derived from framebuffer size (#3144)
Diffstat (limited to 'src/d/d_menu_fmap.cpp')
-rw-r--r--src/d/d_menu_fmap.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/d/d_menu_fmap.cpp b/src/d/d_menu_fmap.cpp
index 2cb5987613..db722089d7 100644
--- a/src/d/d_menu_fmap.cpp
+++ b/src/d/d_menu_fmap.cpp
@@ -227,17 +227,17 @@ dMenu_Fmap_c::dMenu_Fmap_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
}
if (i_panDirection == 1) {
- mTransX = -608.0f;
+ mTransX = -FB_WIDTH_BASE;
mTransY = 0.0f;
} else if (i_panDirection == 3) {
- mTransX = 608.0f;
+ mTransX = FB_WIDTH_BASE;
mTransY = 0.0f;
} else if (i_panDirection == 2) {
mTransX = 0.0f;
- mTransY = -448.0f;
+ mTransY = -FB_HEIGHT_BASE;
} else if (i_panDirection == 0) {
mTransX = 0.0f;
- mTransY = 448.0f;
+ mTransY = FB_HEIGHT_BASE;
} else {
mTransX = 0.0f;
mTransY = 0.0f;
@@ -1703,17 +1703,17 @@ bool dMenu_Fmap_c::isOpen() {
f32 ratio = (f32)mDisplayFrame / (f32)display_frame_num;
if (mPanDirection == 1) {
- mTransX = (1.0f - ratio) * -608.0f;
+ mTransX = (1.0f - ratio) * -FB_WIDTH_BASE;
mTransY = 0.0f;
} else if (mPanDirection == 3) {
- mTransX = (1.0f - ratio) * 608.0f;
+ mTransX = (1.0f - ratio) * FB_WIDTH_BASE;
mTransY = 0.0f;
} else if (mPanDirection == 2) {
mTransX = 0.0f;
- mTransY = (1.0f - ratio) * -448.0f;
+ mTransY = (1.0f - ratio) * -FB_HEIGHT_BASE;
} else if (mPanDirection == 0) {
mTransX = 0.0f;
- mTransY = (1.0f - ratio) * 448.0f;
+ mTransY = (1.0f - ratio) * FB_HEIGHT_BASE;
}
mAlphaRatio = ratio;
@@ -1753,17 +1753,17 @@ bool dMenu_Fmap_c::isClose() {
}
if (mPanDirection == 1) {
- mTransX = (1.0f - ratio) * 608.0f;
+ mTransX = (1.0f - ratio) * FB_WIDTH_BASE;
mTransY = 0.0f;
} else if (mPanDirection == 3) {
- mTransX = (1.0f - ratio) * -608.0f;
+ mTransX = (1.0f - ratio) * -FB_WIDTH_BASE;
mTransY = 0.0f;
} else if (mPanDirection == 2) {
mTransX = 0.0f;
- mTransY = (1.0f - ratio) * 448.0f;
+ mTransY = (1.0f - ratio) * FB_HEIGHT_BASE;
} else if (mPanDirection == 0) {
mTransX = 0.0f;
- mTransY = (1.0f - ratio) * -448.0f;
+ mTransY = (1.0f - ratio) * -FB_HEIGHT_BASE;
}
mAlphaRatio = ratio;