Browse Source

Sync aspect ratio setting with master

miami
Sergeanur 2 years ago
parent
commit
e98164ec41
  1. BIN
      gamefiles/TEXT/american.gxt
  2. BIN
      gamefiles/TEXT/french.gxt
  3. BIN
      gamefiles/TEXT/german.gxt
  4. BIN
      gamefiles/TEXT/italian.gxt
  5. BIN
      gamefiles/TEXT/spanish.gxt
  6. 28
      src/core/Frontend.cpp
  7. 36
      src/render/Draw.cpp
  8. 6
      src/render/Draw.h
  9. 3
      utils/gxt/american.txt
  10. 3
      utils/gxt/french.txt
  11. 3
      utils/gxt/german.txt
  12. 3
      utils/gxt/italian.txt
  13. 3
      utils/gxt/spanish.txt

BIN
gamefiles/TEXT/american.gxt

Binary file not shown.

BIN
gamefiles/TEXT/french.gxt

Binary file not shown.

BIN
gamefiles/TEXT/german.gxt

Binary file not shown.

BIN
gamefiles/TEXT/italian.gxt

Binary file not shown.

BIN
gamefiles/TEXT/spanish.gxt

Binary file not shown.

28
src/core/Frontend.cpp

@ -1138,18 +1138,34 @@ CMenuManager::DrawStandardMenus(bool activeScreen) @@ -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 @@ -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;

36
src/render/Draw.cpp

@ -30,28 +30,48 @@ bool CDraw::ms_bFixRadar = true; @@ -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;
}

6
src/render/Draw.h

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

3
utils/gxt/american.txt

@ -14420,6 +14420,9 @@ GAMEPAD TYPE @@ -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 !!!

3
utils/gxt/french.txt

@ -14709,6 +14709,9 @@ GAMEPAD TYPE @@ -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

3
utils/gxt/german.txt

@ -14709,6 +14709,9 @@ GAMEPAD TYPE @@ -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

3
utils/gxt/italian.txt

@ -14718,6 +14718,9 @@ GAMEPAD TYPE @@ -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

3
utils/gxt/spanish.txt

@ -14404,6 +14404,9 @@ TIPO DE MANDO @@ -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 !!!

Loading…
Cancel
Save