mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 00:02:43 +02:00
Recalculate model position in device training menu every tick, so it adjusts when resizing the window.
This commit is contained in:
1 file changed
+43
@@ -1888,6 +1888,7 @@ MenuDialogHandlerResult dtTrainingDetailsMenuDialog(s32 operation, struct menudi
|
||||
g_Menus[g_MpPlayerNum].training.weaponnum = weaponnum;
|
||||
func0f105948(weaponnum);
|
||||
|
||||
#ifdef PLATFORM_N64
|
||||
#if VERSION == VERSION_PAL_FINAL
|
||||
if (g_ViRes == VIRES_HI) {
|
||||
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
|
||||
@@ -1923,6 +1924,7 @@ MenuDialogHandlerResult dtTrainingDetailsMenuDialog(s32 operation, struct menudi
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 90;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx *= ((f32)SCREEN_WIDTH_LO / (f32)SCREEN_HEIGHT_LO) / videoGetAspect();
|
||||
@@ -1935,6 +1937,47 @@ MenuDialogHandlerResult dtTrainingDetailsMenuDialog(s32 operation, struct menudi
|
||||
case MENUOP_CLOSE:
|
||||
break;
|
||||
case MENUOP_TICK:
|
||||
#ifndef PLATFORM_N64
|
||||
#if VERSION == VERSION_PAL_FINAL
|
||||
if (g_ViRes == VIRES_HI) {
|
||||
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 84;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 84;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 104;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 104;
|
||||
}
|
||||
} else {
|
||||
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 64;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 64;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 84;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 84;
|
||||
}
|
||||
}
|
||||
#elif VERSION == VERSION_PAL_BETA
|
||||
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 64;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 64;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 84;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 84;
|
||||
}
|
||||
#else
|
||||
if (optionsGetScreenRatio() == SCREENRATIO_16_9) {
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 70;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 70;
|
||||
} else {
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx = 90;
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = 90;
|
||||
}
|
||||
#endif
|
||||
|
||||
g_Menus[g_MpPlayerNum].menumodel.newposx *= ((f32)SCREEN_WIDTH_LO / (f32)SCREEN_HEIGHT_LO) / videoGetAspect();
|
||||
g_Menus[g_MpPlayerNum].menumodel.curposx = g_Menus[g_MpPlayerNum].menumodel.newposx;
|
||||
#endif
|
||||
|
||||
if (g_Menus[g_MpPlayerNum].curdialog && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) {
|
||||
if (dtGetWeaponByDeviceIndex(dtGetIndexBySlot(g_DtSlot)) == WEAPON_DISGUISE41) {
|
||||
g_Menus[g_MpPlayerNum].menumodel.newanimnum = ANIM_006A;
|
||||
|
||||
Reference in new issue
Block a user