fix some menus scaling wrong

This commit is contained in:
madeline
2026-04-20 06:45:05 -07:00
parent 9910320fb4
commit 2ce272d586
6 changed files with 52 additions and 2 deletions
+7
View File
@@ -47,6 +47,10 @@ public:
mPositionY = y;
}
#ifdef TARGET_PC
void refreshAspectScale();
#endif
void onUpdateFlag() { mUpdateFlag = true; }
void resetUpdateFlag() { mUpdateFlag = false; }
@@ -79,6 +83,9 @@ private:
/* 0x58 */ f32 mPositionX;
/* 0x5C */ f32 mPositionY;
/* 0x60 */ f32 mParam1;
#ifdef TARGET_PC
f32 mBaseParam1;
#endif
/* 0x64 */ f32 mParam2;
/* 0x68 */ f32 mParam3;
/* 0x6C */ f32 mParam4;
+10
View File
@@ -3812,6 +3812,16 @@ void dFile_select_c::fileSelectWide() {
fileSel.Scr->search(MULTI_CHAR('w_uzu07'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu08'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu09'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
#if TARGET_PC
if (mSelIcon) {
mSelIcon->refreshAspectScale();
}
if (mSelIcon2) {
mSelIcon2->refreshAspectScale();
}
#endif
}
#endif
+11
View File
@@ -164,11 +164,22 @@ void dMenu_Collect2D_c::menuCollectWide() {
// Item Description Text
mpScreen->search(MULTI_CHAR('infotxtn'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
#if TARGET_PC
if (mpDrawCursor) {
mpDrawCursor->refreshAspectScale();
}
#endif
}
#endif
void dMenu_Collect2D_c::_create() {
mpHeap->getTotalFreeSize();
#if TARGET_PC
mpDrawCursor = NULL;
#endif
mpScreen = JKR_NEW J2DScreen();
mpScreen->setPriority("zelda_collect_soubi_screen.blo", 0x1020000,
dComIfGp_getCollectResArchive());
+6
View File
@@ -2801,6 +2801,12 @@ void dMenu_save_c::menuSaveWide() {
mSaveSel.Scr->search(MULTI_CHAR('w_uzu07'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu08'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu09'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
#if TARGET_PC
if (mSelIcon) {
mSelIcon->refreshAspectScale();
}
#endif
}
#endif
+5 -1
View File
@@ -1288,7 +1288,11 @@ void dName_c::selectCursorPosSet(int row) {
#if TARGET_PC
void dName_c::nameWide() {
//Resize Select Icon
mSelIcon->setParam(0.82f, 0.77f, 0.05f, 0.4f, 0.4f);
#if TARGET_PC
if (mSelIcon) {
mSelIcon->refreshAspectScale();
}
#endif
// List of Characters Box
static u64 l_tagName[65] = {
+13 -1
View File
@@ -69,6 +69,9 @@ dSelect_cursor_c::dSelect_cursor_c(u8 param_0, f32 param_1, JKRArchive* param_2)
field_0x84[i] = 0.0f;
}
mParam1 = mpCursorHIO->mXAxisExpansion;
#ifdef TARGET_PC
mBaseParam1 = mParam1;
#endif
mParam2 = mpCursorHIO->mYAxisExpansion;
mParam3 = mpCursorHIO->mOscillation;
mParam4 = mpCursorHIO->mRatioX;
@@ -411,6 +414,9 @@ void dSelect_cursor_c::setPos(f32 i_posX, f32 i_posY, J2DPane* i_pane, bool i_sc
void dSelect_cursor_c::setParam(f32 i_param1, f32 i_param2, f32 i_param3, f32 i_param4,
f32 i_param5) {
mParam1 = i_param1;
#ifdef TARGET_PC
mBaseParam1 = i_param1;
#endif
mParam2 = i_param2;
mParam3 = i_param3;
mParam4 = i_param4;
@@ -551,7 +557,7 @@ void dSelect_cursor_c::setCursorAnimation() {
}
for (int i = 0; i < 4; i++) {
field_0x74[i] = mParam1 * (field_0x94[i] * ((1.0f - param3) + fVar2 * param3)) IF_DUSK(* mDoGph_gInf_c::hudAspectScaleUp);
field_0x74[i] = mParam1 * (field_0x94[i] * ((1.0f - param3) + fVar2 * param3));
field_0x84[i] = mParam2 * (field_0xa4[i] * ((1.0f - param3) + fVar2 * param3));
}
@@ -569,3 +575,9 @@ void dSelect_cursor_c::setBckAnimation(J2DAnmTransformKey* param_0) {
void dSelect_cursor_c::moveCenter(J2DPane* i_pane, f32 i_x, f32 i_y) {
i_pane->translate(i_x,i_y);
}
#ifdef TARGET_PC
void dSelect_cursor_c::refreshAspectScale() {
mParam1 = mBaseParam1 * mDoGph_gInf_c::hudAspectScaleUp;
}
#endif