mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 04:20:00 +00:00
Fixes: PS2/PS2-like menu, Hud, new sliding text found
This commit is contained in:
parent
9b76424540
commit
70aac0f460
|
@ -161,7 +161,7 @@ cMusicManager::DisplayRadioStationName()
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetFontStyle(FONT_HEADING);
|
CFont::SetFontStyle(FONT_HEADING);
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_X(640.0f));
|
CFont::SetCentreSize(SCREEN_STRETCH_X(640.0f));
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(22.0f) + SCREEN_SCALE_Y(2.0f), pCurrentStation);
|
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(22.0f) + SCREEN_SCALE_Y(2.0f), pCurrentStation);
|
||||||
|
|
||||||
|
|
|
@ -235,28 +235,15 @@ const char* MenuFilenames[][2] = {
|
||||||
{ nil, nil }
|
{ nil, nil }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define MENU_X_RIGHT_ALIGNED(x) SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH - (x))
|
||||||
|
|
||||||
#ifdef ASPECT_RATIO_SCALE
|
#ifdef ASPECT_RATIO_SCALE
|
||||||
// All of the defines below replace the StretchX function. Otherwise use SCREEN_SCALE_X.
|
// All of the defines below replace the StretchX function. Otherwise use SCREEN_SCALE_X.
|
||||||
#define MENU_X_LEFT_ALIGNED(x) ScaleAndCenterX(x)
|
#define MENU_X_LEFT_ALIGNED(x) SCALE_AND_CENTER_X(x)
|
||||||
#define MENU_X_RIGHT_ALIGNED(x) ScaleAndCenterX(DEFAULT_SCREEN_WIDTH - (x))
|
|
||||||
#define MENU_X(x) SCREEN_SCALE_X(x)
|
#define MENU_X(x) SCREEN_SCALE_X(x)
|
||||||
#define MENU_Y(y) SCREEN_SCALE_Y(y)
|
#define MENU_Y(y) SCREEN_SCALE_Y(y)
|
||||||
float
|
|
||||||
ScaleAndCenterX(float x)
|
|
||||||
{
|
|
||||||
if (SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH)
|
|
||||||
return x;
|
|
||||||
else {
|
|
||||||
if (x > DEFAULT_SCREEN_WIDTH / 2) {
|
|
||||||
return SCREEN_WIDTH / 2 + SCREEN_SCALE_X(x - DEFAULT_SCREEN_WIDTH / 2);
|
|
||||||
} else {
|
|
||||||
return SCREEN_WIDTH / 2 - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH / 2 - x);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
#define MENU_X_LEFT_ALIGNED(x) StretchX(x)
|
#define MENU_X_LEFT_ALIGNED(x) StretchX(x)
|
||||||
#define MENU_X_RIGHT_ALIGNED(x) SCREEN_STRETCH_FROM_RIGHT(x)
|
|
||||||
#define MENU_X(x) StretchX(x)
|
#define MENU_X(x) StretchX(x)
|
||||||
#define MENU_Y(y) StretchY(y)
|
#define MENU_Y(y) StretchY(y)
|
||||||
#endif
|
#endif
|
||||||
|
@ -1425,7 +1412,6 @@ CMenuManager::Draw()
|
||||||
#endif
|
#endif
|
||||||
if (i == m_nCurrOption && itemsAreSelectable) {
|
if (i == m_nCurrOption && itemsAreSelectable) {
|
||||||
#ifdef PS2_LIKE_MENU
|
#ifdef PS2_LIKE_MENU
|
||||||
// We keep stretching, because we also stretch background image and we want that bar to be aligned with borders of background
|
|
||||||
CSprite2d::DrawRect(CRect(MENU_X_LEFT_ALIGNED(29.0f), MENU_Y(bitAboveNextItemY),
|
CSprite2d::DrawRect(CRect(MENU_X_LEFT_ALIGNED(29.0f), MENU_Y(bitAboveNextItemY),
|
||||||
MENU_X_RIGHT_ALIGNED(29.0f), MENU_Y(usableLineHeight + nextItemY)),
|
MENU_X_RIGHT_ALIGNED(29.0f), MENU_Y(usableLineHeight + nextItemY)),
|
||||||
CRGBA(100, 200, 50, FadeIn(50)));
|
CRGBA(100, 200, 50, FadeIn(50)));
|
||||||
|
@ -2348,12 +2334,11 @@ CMenuManager::DrawFrontEndNormal()
|
||||||
|
|
||||||
if (!m_bGameNotLoaded) {
|
if (!m_bGameNotLoaded) {
|
||||||
CSprite2d *bg = LoadSplash(nil);
|
CSprite2d *bg = LoadSplash(nil);
|
||||||
bg->Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(255, 255, 255, 255));
|
bg->Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(48, 48, 48, 255));
|
||||||
} else {
|
} else {
|
||||||
CSprite2d::DrawRect(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(0, 0, 0, 255));
|
CSprite2d::DrawRect(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(0, 0, 0, 255));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST);
|
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST);
|
||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
|
||||||
|
@ -2461,6 +2446,46 @@ CMenuManager::DrawFrontEndNormal()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Positions/style from PS2 menu, credits to Fire_Head
|
||||||
|
/* Draw controller buttons */
|
||||||
|
CFont::SetFontStyle(FONT_BANK);
|
||||||
|
CFont::SetBackgroundOff();
|
||||||
|
CFont::SetScale(SCREEN_SCALE_X(0.35f), SCREEN_SCALE_Y(0.64f));
|
||||||
|
CFont::SetPropOn();
|
||||||
|
CFont::SetCentreOff();
|
||||||
|
CFont::SetJustifyOn();
|
||||||
|
CFont::SetRightJustifyOff();
|
||||||
|
CFont::SetBackGroundOnlyTextOn();
|
||||||
|
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(40.0f)); // 600.0f
|
||||||
|
CFont::SetColor(CRGBA(16, 16, 16, 255));
|
||||||
|
switch (m_nCurrScreen) {
|
||||||
|
|
||||||
|
// Page names overlaps buttons on those.
|
||||||
|
case MENUPAGE_MOUSE_CONTROLS:
|
||||||
|
case MENUPAGE_KEYBOARD_CONTROLS:
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(52.0f), MENU_Y(360.0f), TheText.Get("FEDS_SE"));
|
||||||
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(52.0f), MENU_Y(372.0f), TheText.Get("FEDS_BA"));
|
||||||
|
if (!m_bGameNotLoaded)
|
||||||
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(52.0f), MENU_Y(384.0f), TheText.Get("FEDS_ST"));
|
||||||
|
|
||||||
|
if (bottomBarActive)
|
||||||
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f), MENU_Y(372.0f), TheText.Get("FEDS_AM")); // <>-CHANGE MENU
|
||||||
|
else if (m_nCurrScreen != MENUPAGE_STATS && m_nCurrScreen != MENUPAGE_BRIEFS) {
|
||||||
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f), MENU_Y(360.0f + 3.5f), TheText.Get("FEA_UP")); // ;
|
||||||
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f), MENU_Y(384.0f - 3.5f), TheText.Get("FEA_DO")); // =
|
||||||
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f - 10.0f), MENU_Y(372.0f), TheText.Get("FEA_LE")); // <
|
||||||
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f + 11.0f), MENU_Y(372.0f), TheText.Get("FEA_RI")); // >
|
||||||
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f + 20.0f), MENU_Y(372.0f), TheText.Get("FEDSAS3")); // - CHANGE SELECTION
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define optionWidth MENU_X(66.0f)
|
#define optionWidth MENU_X(66.0f)
|
||||||
#define rawOptionHeight 22.0f
|
#define rawOptionHeight 22.0f
|
||||||
#define optionBottom SCREEN_SCALE_FROM_BOTTOM(20.0f)
|
#define optionBottom SCREEN_SCALE_FROM_BOTTOM(20.0f)
|
||||||
|
@ -3560,15 +3585,15 @@ CMenuManager::MessageScreen(const char *text)
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetJustifyOn();
|
CFont::SetJustifyOn();
|
||||||
CFont::SetBackGroundOnlyTextOn();
|
CFont::SetBackGroundOnlyTextOn();
|
||||||
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(170.0f));
|
CFont::SetWrapx(SCREEN_WIDTH - StretchX(170.0f));
|
||||||
CFont::SetRightJustifyWrap(SCREEN_SCALE_FROM_RIGHT(170.0f));
|
CFont::SetRightJustifyWrap(SCREEN_WIDTH - StretchX(170.0f));
|
||||||
CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(120.0f), SCREEN_SCALE_Y(150.0f), SCREEN_SCALE_FROM_RIGHT(120.0f), SCREEN_SCALE_FROM_BOTTOM(220.0f)), CRGBA(50, 50, 50, 210));
|
CSprite2d::DrawRect(CRect(StretchX(120.0f), StretchY(150.0f), SCREEN_WIDTH - StretchX(120.0f), SCREEN_HEIGHT - StretchY(220.0f)), CRGBA(50, 50, 50, 210));
|
||||||
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_X(380.0f));
|
CFont::SetCentreSize(SCREEN_STRETCH_X(380.0f));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetColor(CRGBA(255, 217, 106, 255));
|
CFont::SetColor(CRGBA(255, 217, 106, 255));
|
||||||
CFont::SetScale(SCREEN_SCALE_X(SMALLTEXT_X_SCALE), SCREEN_SCALE_Y(SMALLTEXT_Y_SCALE));
|
CFont::SetScale(SCREEN_SCALE_X(SMALLTEXT_X_SCALE), SCREEN_SCALE_Y(SMALLTEXT_Y_SCALE));
|
||||||
CFont::PrintString(SCREEN_SCALE_X(320.0f), SCREEN_SCALE_Y(170.0f), TheText.Get(text));
|
CFont::PrintString(StretchX(320.0f), StretchY(170.0f), TheText.Get(text));
|
||||||
CFont::DrawFonts();
|
CFont::DrawFonts();
|
||||||
DoRWStuffEndOfFrame();
|
DoRWStuffEndOfFrame();
|
||||||
}
|
}
|
||||||
|
@ -4543,18 +4568,24 @@ CMenuManager::ProcessButtonPresses(void)
|
||||||
return;
|
return;
|
||||||
} else if (CPad::GetPad(0)->GetLeftJustDown() || CPad::GetPad(0)->GetAnaloguePadLeft() || CPad::GetPad(0)->GetDPadLeftJustDown()
|
} else if (CPad::GetPad(0)->GetLeftJustDown() || CPad::GetPad(0)->GetAnaloguePadLeft() || CPad::GetPad(0)->GetDPadLeftJustDown()
|
||||||
|| CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) {
|
|| CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) {
|
||||||
|
|
||||||
|
if (reverseAlpha && m_nMenuFadeAlpha > 30)
|
||||||
|
return;
|
||||||
|
|
||||||
m_bShowMouse = false;
|
m_bShowMouse = false;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
|
||||||
if (curBottomBarOption > 0)
|
curBottomBarOption = ((curBottomBarOption + bbTabCount) - 1) % bbTabCount;
|
||||||
curBottomBarOption--;
|
|
||||||
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true);
|
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true);
|
||||||
return;
|
return;
|
||||||
} else if (CPad::GetPad(0)->GetRightJustDown() || CPad::GetPad(0)->GetAnaloguePadRight() || CPad::GetPad(0)->GetDPadRightJustDown()
|
} else if (CPad::GetPad(0)->GetRightJustDown() || CPad::GetPad(0)->GetAnaloguePadRight() || CPad::GetPad(0)->GetDPadRightJustDown()
|
||||||
|| CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) {
|
|| CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) {
|
||||||
|
|
||||||
|
if (reverseAlpha && m_nMenuFadeAlpha > 30)
|
||||||
|
return;
|
||||||
|
|
||||||
m_bShowMouse = false;
|
m_bShowMouse = false;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
|
||||||
if (curBottomBarOption < bbTabCount-1)
|
curBottomBarOption = ((curBottomBarOption + bbTabCount) + 1) % bbTabCount;
|
||||||
curBottomBarOption++;
|
|
||||||
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true);
|
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -5121,7 +5152,7 @@ CMenuManager::ProcessButtonPresses(void)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef PS2_LIKE_MENU
|
#ifdef PS2_SAVE_DIALOG
|
||||||
else if (m_nCurrScreen == MENUPAGE_CHOOSE_SAVE_SLOT || m_nCurrScreen == MENUPAGE_SAVE) {
|
else if (m_nCurrScreen == MENUPAGE_CHOOSE_SAVE_SLOT || m_nCurrScreen == MENUPAGE_SAVE) {
|
||||||
#else
|
#else
|
||||||
else if (m_nCurrScreen == MENUPAGE_CHOOSE_SAVE_SLOT) {
|
else if (m_nCurrScreen == MENUPAGE_CHOOSE_SAVE_SLOT) {
|
||||||
|
|
|
@ -203,6 +203,19 @@ static const char* FrontendFilenames[][2] =
|
||||||
{"fe_radio9", "" },
|
{"fe_radio9", "" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||||
|
bool CMenuManager::m_PrefsCutsceneBorders = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MULTISAMPLING
|
||||||
|
int8 CMenuManager::m_nPrefsMSAALevel = 0;
|
||||||
|
int8 CMenuManager::m_nDisplayMSAALevel = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
int8 CMenuManager::m_DisplayIslandLoading = ISLAND_LOADING_LOW;
|
||||||
|
int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW;
|
||||||
|
#endif
|
||||||
|
|
||||||
int32 CMenuManager::m_PrefsSfxVolume = 102;
|
int32 CMenuManager::m_PrefsSfxVolume = 102;
|
||||||
int32 CMenuManager::m_PrefsMusicVolume = 102;
|
int32 CMenuManager::m_PrefsMusicVolume = 102;
|
||||||
|
|
|
@ -160,7 +160,30 @@ public:
|
||||||
static int32 m_PrefsLanguage;
|
static int32 m_PrefsLanguage;
|
||||||
static CONTRCONFIG m_PrefsControllerConfig;
|
static CONTRCONFIG m_PrefsControllerConfig;
|
||||||
static bool m_PrefsUseVibration;
|
static bool m_PrefsUseVibration;
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ISLAND_LOADING_LOW = 0,
|
||||||
|
ISLAND_LOADING_MEDIUM,
|
||||||
|
ISLAND_LOADING_HIGH
|
||||||
|
};
|
||||||
|
|
||||||
|
static int8 m_DisplayIslandLoading;
|
||||||
|
static int8 m_PrefsIslandLoading;
|
||||||
|
|
||||||
|
#define ISLAND_LOADING_IS(p) if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_##p)
|
||||||
|
#define ISLAND_LOADING_ISNT(p) if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_##p)
|
||||||
|
#else
|
||||||
|
#define ISLAND_LOADING_IS(p)
|
||||||
|
#define ISLAND_LOADING_ISNT(p)
|
||||||
|
#endif
|
||||||
|
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||||
|
static bool m_PrefsCutsceneBorders;
|
||||||
|
#endif
|
||||||
|
#ifdef MULTISAMPLING
|
||||||
|
static int8 m_nPrefsMSAALevel;
|
||||||
|
static int8 m_nDisplayMSAALevel;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GTA_PC
|
#ifdef GTA_PC
|
||||||
bool m_bQuitGameNoCD;
|
bool m_bQuitGameNoCD;
|
||||||
|
|
|
@ -144,8 +144,11 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w)
|
||||||
|
|
||||||
#ifdef ASPECT_RATIO_SCALE
|
#ifdef ASPECT_RATIO_SCALE
|
||||||
#define SCREEN_SCALE_AR(a) ((a) * DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO)
|
#define SCREEN_SCALE_AR(a) ((a) * DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO)
|
||||||
|
extern float ScaleAndCenterX(float x);
|
||||||
|
#define SCALE_AND_CENTER_X(x) ScaleAndCenterX(x)
|
||||||
#else
|
#else
|
||||||
#define SCREEN_SCALE_AR(a) (a)
|
#define SCREEN_SCALE_AR(a) (a)
|
||||||
|
#define SCALE_AND_CENTER_X(x) SCREEN_STRETCH_X(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "maths.h"
|
#include "maths.h"
|
||||||
|
|
|
@ -235,7 +235,7 @@ enum Config {
|
||||||
|
|
||||||
// Hud, frontend and radar
|
// Hud, frontend and radar
|
||||||
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
|
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
|
||||||
#define BETA_SLIDING_TEXT
|
// #define BETA_SLIDING_TEXT
|
||||||
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
|
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
|
||||||
#define PC_MENU
|
#define PC_MENU
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,6 @@
|
||||||
bool CCredits::bCreditsGoing;
|
bool CCredits::bCreditsGoing;
|
||||||
uint32 CCredits::CreditsStartTime;
|
uint32 CCredits::CreditsStartTime;
|
||||||
|
|
||||||
#ifdef ASPECT_RATIO_SCALE
|
|
||||||
#define SCALE_AND_CENTER(x) ScaleAndCenterX(x)
|
|
||||||
extern float ScaleAndCenterX(float x);
|
|
||||||
#else
|
|
||||||
#define SCALE_AND_CENTER(x) SCREEN_STRETCH_X(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CCredits::Init(void)
|
CCredits::Init(void)
|
||||||
{
|
{
|
||||||
|
@ -69,7 +62,7 @@ CCredits::Render(void)
|
||||||
scrolloffset = (CTimer::GetTimeInMilliseconds() - CreditsStartTime) / 24.0f;
|
scrolloffset = (CTimer::GetTimeInMilliseconds() - CreditsStartTime) / 24.0f;
|
||||||
CFont::SetJustifyOff();
|
CFont::SetJustifyOff();
|
||||||
CFont::SetBackgroundOff();
|
CFont::SetBackgroundOff();
|
||||||
CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH - 20));
|
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH - 20));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetColor(CRGBA(220, 220, 220, 220));
|
CFont::SetColor(CRGBA(220, 220, 220, 220));
|
||||||
|
@ -504,5 +497,3 @@ bool CCredits::AreCreditsDone(void)
|
||||||
{
|
{
|
||||||
return !bCreditsGoing;
|
return !bCreditsGoing;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef SCALE_AND_CENTER
|
|
|
@ -70,3 +70,14 @@ CDraw::SetFOV(float fov)
|
||||||
#endif
|
#endif
|
||||||
ms_fFOV = fov;
|
ms_fFOV = fov;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ASPECT_RATIO_SCALE
|
||||||
|
float
|
||||||
|
ScaleAndCenterX(float x)
|
||||||
|
{
|
||||||
|
if (SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH)
|
||||||
|
return x;
|
||||||
|
else
|
||||||
|
return (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X(x);
|
||||||
|
}
|
||||||
|
#endif
|
|
@ -244,8 +244,8 @@ CFont::Initialise(void)
|
||||||
SetColor(CRGBA(0xFF, 0xFF, 0xFF, 0));
|
SetColor(CRGBA(0xFF, 0xFF, 0xFF, 0));
|
||||||
SetJustifyOff();
|
SetJustifyOff();
|
||||||
SetCentreOff();
|
SetCentreOff();
|
||||||
SetWrapx(DEFAULT_SCREEN_WIDTH);
|
SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||||
SetCentreSize(DEFAULT_SCREEN_WIDTH);
|
SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||||
SetBackgroundOff();
|
SetBackgroundOff();
|
||||||
SetBackgroundColor(CRGBA(0x80, 0x80, 0x80, 0x80));
|
SetBackgroundColor(CRGBA(0x80, 0x80, 0x80, 0x80));
|
||||||
SetBackGroundOnlyTextOff();
|
SetBackGroundOnlyTextOff();
|
||||||
|
|
|
@ -336,7 +336,7 @@ void CHud::Draw()
|
||||||
CFont::SetScale(SCREEN_SCALE_X(0.4f), SCREEN_SCALE_Y(0.6f));
|
CFont::SetScale(SCREEN_SCALE_X(0.4f), SCREEN_SCALE_Y(0.6f));
|
||||||
CFont::SetJustifyOff();
|
CFont::SetJustifyOff();
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_X(640.0f));
|
CFont::SetCentreSize(SCREEN_WIDTH);
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetFontStyle(FONT_BANK);
|
CFont::SetFontStyle(FONT_BANK);
|
||||||
|
|
||||||
|
@ -740,7 +740,7 @@ void CHud::Draw()
|
||||||
CFont::SetRightJustifyWrap(0.0f);
|
CFont::SetRightJustifyWrap(0.0f);
|
||||||
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
||||||
CFont::SetColor(CRGBA(244, 20, 20, 255));
|
CFont::SetColor(CRGBA(244, 20, 20, 255));
|
||||||
CFont::SetWrapx(SCREEN_SCALE_X(640.0f));
|
CFont::SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||||
CFont::SetPropOff();
|
CFont::SetPropOff();
|
||||||
CFont::SetBackGroundOnlyTextOn();
|
CFont::SetBackGroundOnlyTextOn();
|
||||||
|
|
||||||
|
@ -869,8 +869,8 @@ void CHud::Draw()
|
||||||
else
|
else
|
||||||
CFont::SetCentreOff();
|
CFont::SetCentreOff();
|
||||||
|
|
||||||
CFont::SetWrapx(SCREEN_SCALE_X(CTheScripts::IntroTextLines[i].m_fWrapX));
|
CFont::SetWrapx(SCALE_AND_CENTER_X(CTheScripts::IntroTextLines[i].m_fWrapX));
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_X(CTheScripts::IntroTextLines[i].m_fCenterSize));
|
CFont::SetCentreSize(SCALE_AND_CENTER_X(CTheScripts::IntroTextLines[i].m_fCenterSize));
|
||||||
|
|
||||||
if (CTheScripts::IntroTextLines[i].m_bBackground)
|
if (CTheScripts::IntroTextLines[i].m_bBackground)
|
||||||
CFont::SetBackgroundOn();
|
CFont::SetBackgroundOn();
|
||||||
|
@ -890,7 +890,7 @@ void CHud::Draw()
|
||||||
CFont::SetPropOff();
|
CFont::SetPropOff();
|
||||||
|
|
||||||
CFont::SetFontStyle(FONT_LOCALE(CTheScripts::IntroTextLines[i].m_nFont));
|
CFont::SetFontStyle(FONT_LOCALE(CTheScripts::IntroTextLines[i].m_nFont));
|
||||||
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - CTheScripts::IntroTextLines[i].m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - CTheScripts::IntroTextLines[i].m_fAtY), CTheScripts::IntroTextLines[i].m_Text);
|
CFont::PrintString(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH - CTheScripts::IntroTextLines[i].m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - CTheScripts::IntroTextLines[i].m_fAtY), CTheScripts::IntroTextLines[i].m_Text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroRectangles); i++) {
|
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroRectangles); i++) {
|
||||||
|
@ -957,9 +957,11 @@ void CHud::Draw()
|
||||||
CFont::SetScale(SCREEN_SCALE_X(1.8f), SCREEN_SCALE_Y(1.8f));
|
CFont::SetScale(SCREEN_SCALE_X(1.8f), SCREEN_SCALE_Y(1.8f));
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_X(615.0f));
|
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(25.0f));
|
||||||
CFont::SetFontStyle(FONT_HEADING);
|
CFont::SetFontStyle(FONT_HEADING);
|
||||||
|
|
||||||
|
// Appearently sliding text in here was abandoned very early, since this text is centered now.
|
||||||
|
|
||||||
if (BigMessageX[0] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) {
|
if (BigMessageX[0] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) {
|
||||||
BigMessageInUse[0] += CTimer::GetTimeStep();
|
BigMessageInUse[0] += CTimer::GetTimeStep();
|
||||||
|
|
||||||
|
@ -974,7 +976,7 @@ void CHud::Draw()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BigMessageX[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
BigMessageX[0] += SCREEN_SCALE_X((CTimer::GetTimeStepInMilliseconds() * 0.3f));
|
||||||
BigMessageAlpha[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
BigMessageAlpha[0] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
||||||
|
|
||||||
if (BigMessageAlpha[0] > 255.0f)
|
if (BigMessageAlpha[0] > 255.0f)
|
||||||
|
@ -983,17 +985,19 @@ void CHud::Draw()
|
||||||
|
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, BigMessageAlpha[0]));
|
CFont::SetColor(CRGBA(0, 0, 0, BigMessageAlpha[0]));
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(18.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[0]);
|
#define Y_OFFSET 18.0f
|
||||||
#else
|
#else
|
||||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[0]);
|
#define Y_OFFSET 20.0f
|
||||||
#endif
|
#endif
|
||||||
|
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(Y_OFFSET) + SCREEN_SCALE_Y(2.0f), m_BigMessage[0]);
|
||||||
CFont::SetColor(CRGBA(BIGMESSAGE_COLOR.r, BIGMESSAGE_COLOR.g, BIGMESSAGE_COLOR.b, BigMessageAlpha[0]));
|
CFont::SetColor(CRGBA(BIGMESSAGE_COLOR.r, BIGMESSAGE_COLOR.g, BIGMESSAGE_COLOR.b, BigMessageAlpha[0]));
|
||||||
CFont::PrintString(SCREEN_WIDTH / 2, (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(18.0f), m_BigMessage[0]);
|
CFont::PrintString(SCREEN_WIDTH / 2, (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(18.0f), m_BigMessage[0]);
|
||||||
|
|
||||||
|
#undef Y_OFFSET
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BigMessageAlpha[0] = 0.0f;
|
BigMessageAlpha[0] = 0.0f;
|
||||||
BigMessageX[0] = -60.0f;
|
BigMessageX[0] = SCALE_AND_CENTER_X(-60.0f);
|
||||||
BigMessageInUse[0] = 1.0f;
|
BigMessageInUse[0] = 1.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1162,8 +1166,8 @@ void CHud::DrawAfterFade()
|
||||||
else
|
else
|
||||||
CFont::SetCentreOff();
|
CFont::SetCentreOff();
|
||||||
|
|
||||||
CFont::SetWrapx(SCREEN_SCALE_X(line.m_fWrapX));
|
CFont::SetWrapx(SCALE_AND_CENTER_X(line.m_fWrapX));
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_X(line.m_fCenterSize));
|
CFont::SetCentreSize(SCALE_AND_CENTER_X(line.m_fCenterSize));
|
||||||
if (line.m_bBackground)
|
if (line.m_bBackground)
|
||||||
CFont::SetBackgroundOn();
|
CFont::SetBackgroundOn();
|
||||||
else
|
else
|
||||||
|
@ -1181,7 +1185,7 @@ void CHud::DrawAfterFade()
|
||||||
CFont::SetPropOff();
|
CFont::SetPropOff();
|
||||||
|
|
||||||
CFont::SetFontStyle(line.m_nFont);
|
CFont::SetFontStyle(line.m_nFont);
|
||||||
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - line.m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - line.m_fAtY), line.m_Text);
|
CFont::PrintString(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH - line.m_fAtX), SCREEN_SCALE_Y(DEFAULT_SCREEN_HEIGHT - line.m_fAtY), line.m_Text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroRectangles); i++) {
|
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroRectangles); i++) {
|
||||||
|
@ -1209,7 +1213,7 @@ void CHud::DrawAfterFade()
|
||||||
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
|
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_X(600.0f));
|
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(40.0f));
|
||||||
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
|
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||||
|
@ -1225,7 +1229,7 @@ void CHud::DrawAfterFade()
|
||||||
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
|
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetCentreSize(SCREEN_SCALE_X(620.0f));
|
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f));
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||||
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||||
|
|
||||||
|
@ -1329,7 +1333,7 @@ void CHud::DrawAfterFade()
|
||||||
BigMessageAlpha[1] = 0.0f;
|
BigMessageAlpha[1] = 0.0f;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
BigMessageX[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
BigMessageX[1] += SCREEN_SCALE_X((CTimer::GetTimeStepInMilliseconds() * 0.3f));
|
||||||
BigMessageAlpha[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
BigMessageAlpha[1] += (CTimer::GetTimeStepInMilliseconds() * 0.3f);
|
||||||
|
|
||||||
if (BigMessageAlpha[1] > 255.0f)
|
if (BigMessageAlpha[1] > 255.0f)
|
||||||
|
@ -1337,14 +1341,21 @@ void CHud::DrawAfterFade()
|
||||||
}
|
}
|
||||||
|
|
||||||
CFont::SetColor(CRGBA(40, 40, 40, BigMessageAlpha[1]));
|
CFont::SetColor(CRGBA(40, 40, 40, BigMessageAlpha[1]));
|
||||||
|
#ifdef BETA_SLIDING_TEXT
|
||||||
|
CFont::PrintString(SCREEN_SCALE_X(2.0f) + BigMessageX[1], SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[1]);
|
||||||
|
|
||||||
|
CFont::SetColor(CRGBA(MISSIONTITLE_COLOR.r, MISSIONTITLE_COLOR.g, MISSIONTITLE_COLOR.b, BigMessageAlpha[1]));
|
||||||
|
CFont::PrintString(BigMessageX[1], SCREEN_SCALE_FROM_BOTTOM(120.0f), m_BigMessage[1]);
|
||||||
|
#else
|
||||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[1]);
|
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[1]);
|
||||||
|
|
||||||
CFont::SetColor(CRGBA(MISSIONTITLE_COLOR.r, MISSIONTITLE_COLOR.g, MISSIONTITLE_COLOR.b, BigMessageAlpha[1]));
|
CFont::SetColor(CRGBA(MISSIONTITLE_COLOR.r, MISSIONTITLE_COLOR.g, MISSIONTITLE_COLOR.b, BigMessageAlpha[1]));
|
||||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), m_BigMessage[1]);
|
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), m_BigMessage[1]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BigMessageAlpha[1] = 0.0f;
|
BigMessageAlpha[1] = 0.0f;
|
||||||
BigMessageX[1] = -60.0f;
|
BigMessageX[1] = SCALE_AND_CENTER_X(-60.0f);
|
||||||
BigMessageInUse[1] = 1.0f;
|
BigMessageInUse[1] = 1.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1721,7 +1721,6 @@ main(int argc, char *argv[])
|
||||||
#else
|
#else
|
||||||
LoadingScreen(nil, nil, "loadsc0");
|
LoadingScreen(nil, nil, "loadsc0");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( !CGame::InitialiseOnceAfterRW() )
|
if ( !CGame::InitialiseOnceAfterRW() )
|
||||||
RsGlobal.quit = TRUE;
|
RsGlobal.quit = TRUE;
|
||||||
|
|
||||||
|
@ -1734,6 +1733,7 @@ main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef PS2_MENU
|
||||||
case GS_INIT_FRONTEND:
|
case GS_INIT_FRONTEND:
|
||||||
{
|
{
|
||||||
LoadingScreen(nil, nil, "loadsc0");
|
LoadingScreen(nil, nil, "loadsc0");
|
||||||
|
@ -1754,7 +1754,6 @@ main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef PS2_MENU
|
|
||||||
case GS_FRONTEND:
|
case GS_FRONTEND:
|
||||||
{
|
{
|
||||||
if(!glfwGetWindowAttrib(PSGLOBAL(window), GLFW_ICONIFIED))
|
if(!glfwGetWindowAttrib(PSGLOBAL(window), GLFW_ICONIFIED))
|
||||||
|
|
|
@ -2513,8 +2513,10 @@ WinMain(HINSTANCE instance,
|
||||||
{
|
{
|
||||||
if ( gGameState == GS_PLAYING_GAME )
|
if ( gGameState == GS_PLAYING_GAME )
|
||||||
CGame::ShutDown();
|
CGame::ShutDown();
|
||||||
|
#ifndef MASTER
|
||||||
else if ( gGameState == GS_ANIMVIEWER )
|
else if ( gGameState == GS_ANIMVIEWER )
|
||||||
CAnimViewer::Shutdown();
|
CAnimViewer::Shutdown();
|
||||||
|
#endif
|
||||||
|
|
||||||
CTimer::Stop();
|
CTimer::Stop();
|
||||||
|
|
||||||
|
@ -2538,8 +2540,10 @@ WinMain(HINSTANCE instance,
|
||||||
|
|
||||||
if ( gGameState == GS_PLAYING_GAME )
|
if ( gGameState == GS_PLAYING_GAME )
|
||||||
CGame::ShutDown();
|
CGame::ShutDown();
|
||||||
|
#ifndef MASTER
|
||||||
else if ( gGameState == GS_ANIMVIEWER )
|
else if ( gGameState == GS_ANIMVIEWER )
|
||||||
CAnimViewer::Shutdown();
|
CAnimViewer::Shutdown();
|
||||||
|
#endif
|
||||||
|
|
||||||
DMAudio.Terminate();
|
DMAudio.Terminate();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue