1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-05 04:15:55 +00:00

Sync aspect ratio setting with master

This commit is contained in:
Sergeanur 2021-02-12 18:00:20 +02:00
parent b1698948e6
commit e98164ec41
13 changed files with 72 additions and 17 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1138,18 +1138,34 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
#else
switch (m_PrefsUseWideScreen) {
case AR_AUTO:
sprintf(asciiTemp, "AUTO");
rightText = TheText.Get("FEM_AUT");
break;
case AR_4_3:
sprintf(asciiTemp, "4:3");
AsciiToUnicode(asciiTemp, unicodeTemp);
rightText = unicodeTemp;
break;
case AR_5_4:
sprintf(asciiTemp, "5:4");
AsciiToUnicode(asciiTemp, unicodeTemp);
rightText = unicodeTemp;
break;
case AR_16_10:
sprintf(asciiTemp, "16:10");
AsciiToUnicode(asciiTemp, unicodeTemp);
rightText = unicodeTemp;
break;
case AR_16_9:
sprintf(asciiTemp, "16:9");
AsciiToUnicode(asciiTemp, unicodeTemp);
rightText = unicodeTemp;
break;
case AR_21_9:
sprintf(asciiTemp, "21:9");
AsciiToUnicode(asciiTemp, unicodeTemp);
rightText = unicodeTemp;
break;
}
AsciiToUnicode(asciiTemp, unicodeTemp);
rightText = unicodeTemp;
#endif
break;
@ -4951,12 +4967,12 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
case MENUACTION_WIDESCREEN:
if (changeAmount > 0) {
m_PrefsUseWideScreen++;
if (m_PrefsUseWideScreen > 2)
if (m_PrefsUseWideScreen > AR_MAX - 1)
m_PrefsUseWideScreen = 0;
} else {
m_PrefsUseWideScreen--;
if (m_PrefsUseWideScreen < 0)
m_PrefsUseWideScreen = 2;
m_PrefsUseWideScreen = AR_MAX - 1;
}
SaveSettings();
break;

View file

@ -30,28 +30,48 @@ bool CDraw::ms_bFixRadar = true;
bool CDraw::ms_bFixSprites = true;
#endif
#ifdef ASPECT_RATIO_SCALE
float
FindAspectRatio(void)
{
switch (FrontEndMenuManager.m_PrefsUseWideScreen) {
case AR_AUTO:
return SCREEN_WIDTH / SCREEN_HEIGHT;
default:
case AR_4_3:
return 4.0f / 3.0f;
case AR_5_4:
return 5.0f / 4.0f;
case AR_16_10:
return 16.0f / 10.0f;
case AR_16_9:
return 16.0f / 9.0f;
case AR_21_9:
return 21.0f / 9.0f;
};
}
#endif
float
CDraw::CalculateAspectRatio(void)
{
if (FrontEndMenuManager.m_PrefsUseWideScreen) {
#ifdef ASPECT_RATIO_SCALE
if (TheCamera.m_WideScreenOn)
CDraw::ms_fAspectRatio = FrontEndMenuManager.m_PrefsUseWideScreen == AR_AUTO ?
(5.f / 3.f) * (SCREEN_WIDTH / SCREEN_HEIGHT) / (16.f / 9.f) :
5.f / 3.f; // It's used on theatrical showings according to Wiki
else
CDraw::ms_fAspectRatio = FrontEndMenuManager.m_PrefsUseWideScreen == AR_AUTO ? SCREEN_WIDTH / SCREEN_HEIGHT : 16.f / 9.f;
if (TheCamera.m_WideScreenOn)
CDraw::ms_fAspectRatio = (5.f / 3.f) * FindAspectRatio() / (16.f / 9.f); // It's used on theatrical showings according to Wiki
else
CDraw::ms_fAspectRatio = FindAspectRatio();
#else
if(FrontEndMenuManager.m_PrefsUseWideScreen) {
if (TheCamera.m_WideScreenOn)
CDraw::ms_fAspectRatio = 5.f / 3.f; // It's used on theatrical showings according to Wiki
else
CDraw::ms_fAspectRatio = 16.f / 9.f;
#endif
} else if (TheCamera.m_WideScreenOn) {
CDraw::ms_fAspectRatio = 5.f/4.f;
} else {
CDraw::ms_fAspectRatio = 4.f/3.f;
}
#endif
return CDraw::ms_fAspectRatio;
}

View file

@ -4,10 +4,14 @@ enum eAspectRatio
{
// Make sure these work the same as FrontEndMenuManager.m_PrefsUseWideScreen
// without widescreen support
AR_4_3,
AR_16_9,
AR_AUTO,
AR_4_3,
AR_5_4,
AR_16_10,
AR_16_9,
AR_21_9,
AR_MAX,
};
class CDraw

View file

@ -14420,6 +14420,9 @@ GAMEPAD TYPE
[FET_AGS]
GAMEPAD SETTINGS
[FEM_AUT] { aspect ratio related }
AUTO
{ end of file }
[DUMMY]
THIS LABEL NEEDS TO BE HERE !!!

View file

@ -14709,6 +14709,9 @@ GAMEPAD TYPE
[FET_AGS]
GAMEPAD SETTINGS
[FEM_AUT] { aspect ratio related }
AUTO
[DUMMY]
THIS LABEL NEEDS TO BE HERE !!!
AS THE LAST LABEL DOES NOT GET COMPILED

View file

@ -14709,6 +14709,9 @@ GAMEPAD TYPE
[FET_AGS]
GAMEPAD SETTINGS
[FEM_AUT] { aspect ratio related }
AUTO
[DUMMY]
THIS LABEL NEEDS TO BE HERE !!!
AS THE LAST LABEL DOES NOT GET COMPILED

View file

@ -14718,6 +14718,9 @@ GAMEPAD TYPE
[FET_AGS]
GAMEPAD SETTINGS
[FEM_AUT] { aspect ratio related }
AUTO
[DUMMY]
THIS LABEL NEEDS TO BE HERE !!!
AS THE LAST LABEL DOES NOT GET COMPILED

View file

@ -14404,6 +14404,9 @@ TIPO DE MANDO
[FET_AGS]
AJUSTES DE MANDO
[FEM_AUT] { aspect ratio related }
AUTO
{ end of file }
[DUMMY]
THIS LABEL NEEDS TO BE HERE !!!