mirror of
https://github.com/zeldaret/tp
synced 2026-06-26 18:32:08 -04:00
Replace magic constants derived from framebuffer size (#3144)
This commit is contained in:
+12
-12
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user