summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2020-12-19 19:25:45 +0100
committerFire-Head <Fire-Head@users.noreply.github.com>2020-12-19 19:25:45 +0100
commit140fa2a21c345123c83435558849feb29d3f2eba (patch)
tree4c6eb275b6952a30cbe288e3f3b999dab4224b5d /src/core
parentMerge branch 'master' of https://github.com/GTAmodding/re3 (diff)
downloadre3-140fa2a21c345123c83435558849feb29d3f2eba.tar
re3-140fa2a21c345123c83435558849feb29d3f2eba.tar.gz
re3-140fa2a21c345123c83435558849feb29d3f2eba.tar.bz2
re3-140fa2a21c345123c83435558849feb29d3f2eba.tar.lz
re3-140fa2a21c345123c83435558849feb29d3f2eba.tar.xz
re3-140fa2a21c345123c83435558849feb29d3f2eba.tar.zst
re3-140fa2a21c345123c83435558849feb29d3f2eba.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Game.cpp49
-rw-r--r--src/core/Pad.cpp20
-rw-r--r--src/core/main.cpp48
3 files changed, 94 insertions, 23 deletions
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 33302653..0a6c3eec 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -116,8 +116,6 @@ void DoRWStuffEndOfFrame(void);
#ifdef PS2_MENU
void MessageScreen(char *msg)
{
- //TODO: stretch_screen
-
CRect rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
CRGBA color(255, 255, 255, 255);
@@ -129,20 +127,32 @@ void MessageScreen(char *msg)
CSprite2d *splash = LoadSplash(NULL);
splash->Draw(rect, color, color, color, color);
- splash->DrawRect(CRect(SCREEN_SCALE_X(20.0f), SCREEN_SCALE_Y(110.0f), SCREEN_SCALE_X(620.0f), SCREEN_SCALE_Y(300.0f)), CRGBA(50, 50, 50, 192));
-
+#ifdef FIX_BUGS
+ splash->DrawRect(CRect(SCREEN_SCALE_X(20.0f), SCREEN_SCALE_Y(110.0f), SCREEN_WIDTH-SCREEN_SCALE_X(20.0f), SCREEN_SCALE_Y(300.0f)), CRGBA(50, 50, 50, 192));
+#else
+ splash->DrawRect(CRect(20.0f, 110.0f, SCREEN_WIDTH-20.0f, 300.0f), CRGBA(50, 50, 50, 192));
+#endif
CFont::SetFontStyle(FONT_BANK);
CFont::SetBackgroundOff();
- CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(190.0f)); // 450.0f
+ CFont::SetWrapx(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH-190));
+#ifdef FIX_BUGS
CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.0f));
+#else
+ CFont::SetScale(1.0f, 1.0f);
+#endif
CFont::SetCentreOn();
- CFont::SetCentreSize(SCREEN_SCALE_X(450.0f)); // 450.0f
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - 190)); // 450.0f
CFont::SetJustifyOff();
CFont::SetColor(CRGBA(255, 255, 255, 255));
CFont::SetDropColor(CRGBA(32, 32, 32, 255));
CFont::SetDropShadowPosition(3);
+ CFont::SetBackGroundOnlyTextOff();
CFont::SetPropOn();
- CFont::PrintString(SCREEN_SCALE_X(320.0f), SCREEN_SCALE_Y(130.0f), TheText.Get(msg));
+#ifdef FIX_BUGS
+ CFont::PrintString(SCREEN_WIDTH/2, SCREEN_SCALE_Y(130.0f), TheText.Get(msg));
+#else
+ CFont::PrintString(SCREEN_WIDTH/2, 130.0f, TheText.Get(msg));
+#endif
CFont::DrawFonts();
DoRWStuffEndOfFrame();
@@ -889,12 +899,15 @@ void CGame::InitialiseWhenRestarting(void)
DefinedState();
CSprite2d *splash = LoadSplash(NULL);
- splash->Draw(rect, color, color, color, color);
- splash->DrawRect(CRect(SCREEN_SCALE_X(20.0f), SCREEN_SCALE_Y(110.0f), SCREEN_SCALE_X(620.0f), SCREEN_SCALE_Y(300.0f)), CRGBA(50, 50, 50, 192));
-
- //CFont::SetFontStyle(?);
+ splash->Draw(rect, color, color, color, color);
+#ifdef FIX_BUGS
+ splash->DrawRect(CRect(SCREEN_SCALE_X(20.0f), SCREEN_SCALE_Y(110.0f), SCREEN_WIDTH-SCREEN_SCALE_X(20.0f), SCREEN_SCALE_Y(300.0f)), CRGBA(50, 50, 50, 192));
+#else
+ splash->DrawRect(CRect(20.0f, 110.0f, SCREEN_WIDTH-20.0f, 300.0f), CRGBA(50, 50, 50, 192));
+#endif
+
CFont::SetBackgroundOff();
- CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(160.0f)); // 480.0f
+ CFont::SetWrapx(SCREEN_SCALE_X(480.0f));
CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.0f));
CFont::SetCentreOn();
CFont::SetCentreSize(SCREEN_SCALE_X(480.0f));
@@ -904,9 +917,15 @@ void CGame::InitialiseWhenRestarting(void)
CFont::SetDropColor(CRGBA(32, 32, 32, 255));
CFont::SetDropShadowPosition(3);
CFont::SetPropOn();
- CFont::PrintString(SCREEN_SCALE_X(320.0f), SCREEN_SCALE_Y(130.0f), TheText.Get("MC_LDFL")); // Load Failed!
- CFont::PrintString(SCREEN_SCALE_X(320.0f), SCREEN_SCALE_Y(170.0f), TheText.Get("FES_NOC")); // No Memory Card (PS2) in MEMORY CARD slot 1.
- CFont::PrintString(SCREEN_SCALE_X(320.0f), SCREEN_SCALE_Y(240.0f), TheText.Get("MC_NWRE")); // Now Restarting Game.
+#ifdef FIX_BUGS
+ CFont::PrintString(SCREEN_WIDTH/2, SCREEN_SCALE_Y(130.0f), TheText.Get("MC_LDFL")); // Load Failed!
+ CFont::PrintString(SCREEN_WIDTH/2, SCREEN_SCALE_Y(170.0f), TheText.Get("FES_NOC")); // No Memory Card (PS2) in MEMORY CARD slot 1.
+ CFont::PrintString(SCREEN_WIDTH/2, SCREEN_SCALE_Y(240.0f), TheText.Get("MC_NWRE")); // Now Restarting Game.
+#else
+ CFont::PrintString(SCREEN_WIDTH/2, 130.0f, TheText.Get("MC_LDFL")); // Load Failed!
+ CFont::PrintString(SCREEN_WIDTH/2, 170.0f, TheText.Get("FES_NOC")); // No Memory Card (PS2) in MEMORY CARD slot 1.
+ CFont::PrintString(SCREEN_WIDTH/2, 240.0f, TheText.Get("MC_NWRE")); // Now Restarting Game.
+#endif
CFont::DrawFonts();
DoRWStuffEndOfFrame();
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index b971f3ec..7dc9aba0 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -2607,10 +2607,18 @@ void CPad::PrintErrorMessage(void)
{
if ( bDisplayNoControllerMessage && !CGame::playingIntro && !FrontEndMenuManager.m_bMenuActive )
{
+#ifdef FIX_BUGS
+ CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
+#else
CFont::SetScale(0.85f, 1.0f);
+#endif
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_SCALE_X(SCREEN_WIDTH - 20));
+#ifdef FIX_BUGS
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - 20));
+#else
+ CFont::SetCentreSize(SCREEN_WIDTH - 20);
+#endif
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200));
@@ -2624,10 +2632,18 @@ void CPad::PrintErrorMessage(void)
}
else if ( bObsoleteControllerMessage )
{
+#ifdef FIX_BUGS
+ CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
+#else
CFont::SetScale(0.85f, 1.0f);
+#endif
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_SCALE_X(SCREEN_WIDTH - 20));
+#ifdef FIX_BUGS
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - 20));
+#else
+ CFont::SetCentreSize(SCREEN_WIDTH - 20);
+#endif
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200));
diff --git a/src/core/main.cpp b/src/core/main.cpp
index cc7f3259..d02b8098 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -577,7 +577,12 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
return;
#endif
- if(DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255)){
+#ifndef GTA_PS2
+ if(DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255))
+#else
+ DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255);
+#endif
+ {
CSprite2d::SetRecipNearClip();
CSprite2d::InitPerFrame();
CFont::InitPerFrame();
@@ -637,8 +642,13 @@ LoadingIslandScreen(const char *levelName)
splash = LoadSplash(nil);
name = TheText.Get(levelName);
+
+#ifndef GTA_PS2
if(!DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255))
return;
+#else
+ DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255);
+#endif
CSprite2d::SetRecipNearClip();
CSprite2d::InitPerFrame();
@@ -665,20 +675,42 @@ LoadingIslandScreen(const char *levelName)
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
CFont::SetDropShadowPosition(3);
CFont::SetColor(CRGBA(243, 237, 71, 255));
+#if !defined(PS2_HUD) && defined(GTA_PC)
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.2f));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(110.0f), TheText.Get("WELCOME"));
+#endif
+
+#ifdef PS2_HUD
+ #ifdef FIX_BUGS
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(140.0f), TheText.Get("WELCOME"));
+ #else
+ CFont::PrintString(SCREEN_WIDTH - 20, SCREEN_HEIGHT - 140, TheText.Get("WELCOME"));
+ #endif
#else
+ #ifdef FIX_BUGS
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(110.0f), TheText.Get("WELCOME"));
+ #else
CFont::PrintString(SCREEN_WIDTH - 20, SCREEN_SCALE_FROM_BOTTOM(110.0f), TheText.Get("WELCOME"));
+ #endif
#endif
TextCopy(wstr, name);
TheText.UpperCase(wstr);
CFont::SetColor(CRGBA(243, 237, 71, 255));
+#if !defined(PS2_HUD) && defined(GTA_PC)
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.2f));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(80.0f), wstr);
+#endif
+
+#ifdef PS2_HUD
+ #ifdef FIX_BUGS
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(110.0f), wstr);
+ #else
+ CFont::PrintString(SCREEN_WIDTH-20, SCREEN_HEIGHT - 110, wstr);
+ #endif
#else
- CFont::PrintString(SCREEN_WIDTH-20, SCREEN_SCALE_FROM_BOTTOM(80.0f), wstr);
+ #ifdef FIX_BUGS
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(80.0f), wstr);
+ #else
+ CFont::PrintString(SCREEN_WIDTH-20, SCREEN_SCALE_FROM_BOTTOM(80.0f), wstr);
+ #endif
#endif
CFont::DrawFonts();
DoRWStuffEndOfFrame();
@@ -1058,7 +1090,11 @@ DisplayGameDebugText()
// Let's not scale those numbers, they look better that way :eyes:
CFont::SetPropOff();
CFont::SetBackgroundOff();
+#ifdef FIX_BUGS
+ CFont::SetScale(SCREEN_SCALE_X(0.7f), SCREEN_SCALE_Y(1.5f));
+#else
CFont::SetScale(0.7f, 1.5f);
+#endif
CFont::SetCentreOff();
CFont::SetRightJustifyOff();
CFont::SetJustifyOff();