mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-23 01:29:16 +01:00
ps2 hud, restore original code
This commit is contained in:
parent
0fbf624623
commit
c5fbb594a5
@ -163,7 +163,11 @@ cMusicManager::DisplayRadioStationName()
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH));
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(22.0f) + SCREEN_SCALE_Y(2.0f), pCurrentStation);
|
||||
#else
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + 2.0f, SCREEN_SCALE_Y(22.0f) + 2.0f, pCurrentStation);
|
||||
#endif
|
||||
|
||||
if(gNumRetunePresses)
|
||||
CFont::SetColor(CRGBA(102, 133, 143, 255));
|
||||
|
@ -72,13 +72,21 @@ CDarkel::DrawMessages()
|
||||
{
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(610.0f));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - 30));
|
||||
#else
|
||||
CFont::SetCentreSize(SCREEN_WIDTH - 30);
|
||||
#endif
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetPropOn();
|
||||
uint32 timePassedSinceStart = CTimer::GetTimeInMilliseconds() - CDarkel::TimeOfFrenzyStart;
|
||||
if (CDarkel::bStandardSoundAndMessages) {
|
||||
if (timePassedSinceStart >= 3000 && timePassedSinceStart < 11000) {
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.3f), SCREEN_SCALE_Y(1.3f));
|
||||
#else
|
||||
CFont::SetScale(1.3f, 1.3f);
|
||||
#endif
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetColor(CRGBA(255, 255, 128, CalcFade(timePassedSinceStart, 3000, 11000)));
|
||||
CFont::SetFontStyle(FONT_BANK);
|
||||
@ -88,7 +96,11 @@ CDarkel::DrawMessages()
|
||||
}
|
||||
} else {
|
||||
if (timePassedSinceStart < 8000) {
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.3f), SCREEN_SCALE_Y(1.3f));
|
||||
#else
|
||||
CFont::SetScale(1.3f, 1.3f);
|
||||
#endif
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetColor(CRGBA(255, 255, 128, CalcFade(timePassedSinceStart, 0, 8000)));
|
||||
CFont::SetFontStyle(FONT_BANK);
|
||||
@ -97,7 +109,11 @@ CDarkel::DrawMessages()
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.75f), SCREEN_SCALE_Y(1.5f));
|
||||
#else
|
||||
CFont::SetScale(0.75f, 1.5f);
|
||||
#endif
|
||||
CFont::SetCentreOff();
|
||||
CFont::SetRightJustifyOn();
|
||||
CFont::SetFontStyle(FONT_HEADING);
|
||||
@ -107,7 +123,15 @@ CDarkel::DrawMessages()
|
||||
AsciiToUnicode(gString, gUString);
|
||||
if (timeLeft > 4000 || CTimer::GetFrameCounter() & 1) {
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(35.0f), SCREEN_SCALE_Y(109.0f), gUString);
|
||||
#if defined(PS2_HUD) || defined(FIX_BUGS)
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(34.0f - 1.0f), SCREEN_SCALE_Y(108.0f + 1.0f), gUString);
|
||||
#else -
|
||||
CFont::PrintString(SCREEN_WIDTH-(34.0f - 1.0f), 108.0f + 1.0f, gUString);
|
||||
#endif
|
||||
#else
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(34.0f + 1.0f), SCREEN_SCALE_Y(108.0f + 1.0f), gUString);
|
||||
#endif
|
||||
CFont::SetColor(CRGBA(150, 100, 255, 255));
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(34.0f), SCREEN_SCALE_Y(108.0f), gUString);
|
||||
}
|
||||
@ -120,7 +144,16 @@ CDarkel::DrawMessages()
|
||||
#else
|
||||
#define DARKEL_COUNTER_HEIGHT 128.0f
|
||||
#endif
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(35.0f), SCREEN_SCALE_Y(DARKEL_COUNTER_HEIGHT + 1.0f), gUString);
|
||||
|
||||
#if defined(PS2_HUD) || defined(FIX_BUGS)
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(34.0f - 1.0f), SCREEN_SCALE_Y(DARKEL_COUNTER_HEIGHT + 1.0f), gUString);
|
||||
#else
|
||||
CFont::PrintString(SCREEN_WIDTH-(34.0f - 1.0f), DARKEL_COUNTER_HEIGHT + 1.0f, gUString);
|
||||
#endif
|
||||
#else
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(34.0f + 1.0f), SCREEN_SCALE_Y(DARKEL_COUNTER_HEIGHT + 1.0f), gUString);
|
||||
#endif
|
||||
CFont::SetColor(CRGBA(255, 128, 128, 255));
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(34.0f), SCREEN_SCALE_Y(DARKEL_COUNTER_HEIGHT), gUString);
|
||||
#undef DARKEL_COUNTER_HEIGHT
|
||||
@ -132,13 +165,25 @@ CDarkel::DrawMessages()
|
||||
uint32 timePassedSinceStart = CTimer::GetTimeInMilliseconds() - CDarkel::TimeOfFrenzyStart;
|
||||
if (CTimer::GetTimeInMilliseconds() - CDarkel::TimeOfFrenzyStart < 5000) {
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(620.0f));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - 20));
|
||||
#else
|
||||
CFont::SetCentreSize(SCREEN_WIDTH - 20);
|
||||
#endif
|
||||
CFont::SetCentreOn();
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f));
|
||||
#else
|
||||
CFont::SetScale(1.5f, 1.5f);
|
||||
#endif
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetColor(CRGBA(128, 255, 128, CalcFade(timePassedSinceStart, 0, 5000)));
|
||||
CFont::SetFontStyle(FONT_BANK);
|
||||
#ifdef FIX_BUGS
|
||||
int y = SCREEN_HEIGHT / 2 + SCREEN_SCALE_Y(25.0f - timePassedSinceStart * 0.01f);
|
||||
#else
|
||||
int y = (SCREEN_HEIGHT / 2 + 25) - (timePassedSinceStart * 0.01f);
|
||||
#endif
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, y, TheText.Get("KF_3"));
|
||||
}
|
||||
}
|
||||
|
@ -1396,16 +1396,24 @@ void CGarage::RemoveCarsBlockingDoorNotInside()
|
||||
void CGarages::PrintMessages()
|
||||
{
|
||||
if (CTimer::GetTimeInMilliseconds() > MessageStartTime && CTimer::GetTimeInMilliseconds() < MessageEndTime) {
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f)); // BUG: game doesn't use macro here.
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
|
||||
#else
|
||||
CFont::SetScale(1.2f, 1.5f);
|
||||
#endif
|
||||
CFont::SetPropOn();
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - 50));
|
||||
#else
|
||||
CFont::SetCentreSize(SCREEN_WIDTH - 50);
|
||||
#endif
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
|
||||
#if defined(PS2) || defined (FIX_BUGS)
|
||||
#if defined(PS2_HUD) || defined (FIX_BUGS)
|
||||
float y_offset = SCREEN_HEIGHT / 3; // THIS is PS2 calculation
|
||||
#else
|
||||
float y_offset = SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(84.0f); // This is PC and results in text being written over some HUD elements
|
||||
@ -1413,26 +1421,44 @@ void CGarages::PrintMessages()
|
||||
|
||||
if (MessageNumberInString2 < 0) {
|
||||
if (MessageNumberInString < 0) {
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 - SCREEN_SCALE_X(2.0f), y_offset - SCREEN_SCALE_Y(2.0f), TheText.Get(MessageIDString));
|
||||
|
||||
#else
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 - 2.0f, y_offset - 2.0f, TheText.Get(MessageIDString));
|
||||
#endif
|
||||
CFont::SetColor(CRGBA(89, 115, 150, 255));
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, y_offset, TheText.Get(MessageIDString));
|
||||
}
|
||||
else {
|
||||
CMessages::InsertNumberInString(TheText.Get(MessageIDString), MessageNumberInString, -1, -1, -1, -1, -1, gUString);
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), y_offset - SCREEN_SCALE_Y(40.0f) + SCREEN_SCALE_Y(2.0f), gUString);
|
||||
#else
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + 2.0f, y_offset - 40.0f + 2.0f, gUString);
|
||||
#endif
|
||||
|
||||
CFont::SetColor(CRGBA(89, 115, 150, 255));
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, y_offset - SCREEN_SCALE_Y(40.0f), gUString);
|
||||
#else
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, y_offset - 40.0f, gUString);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else {
|
||||
CMessages::InsertNumberInString(TheText.Get(MessageIDString), MessageNumberInString, MessageNumberInString2, -1, -1, -1, -1, gUString);
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), y_offset - SCREEN_SCALE_Y(40.0f) + SCREEN_SCALE_Y(2.0f), gUString);
|
||||
|
||||
#else
|
||||
CFont::PrintString(SCREEN_WIDTH / 2 + 2.0f, y_offset - 40.0f + 2.0f, gUString);
|
||||
#endif
|
||||
CFont::SetColor(CRGBA(89, 115, 150, 255));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, y_offset - SCREEN_SCALE_Y(40.0f), gUString);
|
||||
#else
|
||||
CFont::PrintString(SCREEN_WIDTH / 2, y_offset - 40.0f, gUString);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -964,7 +964,11 @@ CPickups::RenderPickUpText()
|
||||
float fScaleX = aMessages[i].m_dist.x / 100.0f;
|
||||
if (fScaleX > MAX_SCALE) fScaleX = MAX_SCALE;
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetScale(SCREEN_SCALE_X(fScaleX), SCREEN_SCALE_Y(fScaleY));
|
||||
#else
|
||||
CFont::SetScale(fScaleX, fScaleY);
|
||||
#endif
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetCentreSize(SCREEN_WIDTH);
|
||||
CFont::SetJustifyOff();
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "FrontEndControls.h"
|
||||
|
||||
#define X SCREEN_SCALE_X
|
||||
#define Y(x) SCREEN_SCALE_Y(float(x)*(float(DEFAULT_SCREEN_HEIGHT)/float(DEFAULT_SCREEN_HEIGHT_PAL)))
|
||||
#define Y(x) SCREEN_SCALE_Y(float(x)*(float(DEFAULT_SCREEN_HEIGHT)/float(SCREEN_HEIGHT_PAL)))
|
||||
|
||||
void
|
||||
CPlaceableShText::Draw(float x, float y)
|
||||
|
@ -43,7 +43,7 @@ void DoRWStuffEndOfFrame(void);
|
||||
#define X SCREEN_SCALE_X
|
||||
#define Y SCREEN_SCALE_Y
|
||||
|
||||
#define YF(x) Y(float(x)*(float(DEFAULT_SCREEN_HEIGHT)/float(DEFAULT_SCREEN_HEIGHT_PAL)))
|
||||
#define YF(x) Y(float(x)*(float(DEFAULT_SCREEN_HEIGHT)/float(SCREEN_HEIGHT_PAL)))
|
||||
//#define X(x) ((x)/640.0f*SCRW)
|
||||
//#define Y(y) ((y)/448.0f*SCRH)
|
||||
|
||||
|
@ -86,7 +86,11 @@ VALIDATE_SIZE(sRadarTrace, 0x30);
|
||||
|
||||
// Values for screen space
|
||||
#define RADAR_LEFT (40.0f)
|
||||
#ifdef PS2_HUD
|
||||
#define RADAR_BOTTOM (44.0f)
|
||||
#else
|
||||
#define RADAR_BOTTOM (47.0f)
|
||||
#endif
|
||||
#define RADAR_WIDTH (94.0f)
|
||||
#define RADAR_HEIGHT (76.0f)
|
||||
|
||||
|
@ -116,17 +116,33 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w)
|
||||
#include "skeleton.h"
|
||||
#include "Draw.h"
|
||||
|
||||
#define DEFAULT_SCREEN_WIDTH (640)
|
||||
#define DEFAULT_SCREEN_HEIGHT (448)
|
||||
#define DEFAULT_SCREEN_HEIGHT_PAL (512)
|
||||
#define DEFAULT_SCREEN_HEIGHT_NTSC (448)
|
||||
#ifdef GTA_PS2
|
||||
#define DEFAULT_SCREEN_WIDTH (640)
|
||||
#define DEFAULT_SCREEN_HEIGHT (480)
|
||||
#else
|
||||
#define DEFAULT_SCREEN_WIDTH (640)
|
||||
//#define DEFAULT_SCREEN_HEIGHT (448)
|
||||
#define DEFAULT_SCREEN_HEIGHT (480)
|
||||
#endif
|
||||
#define DEFAULT_ASPECT_RATIO (4.0f/3.0f)
|
||||
#define DEFAULT_VIEWWINDOW (0.7f)
|
||||
|
||||
// game uses maximumWidth/Height, but this probably won't work
|
||||
// with RW windowed mode
|
||||
#define SCREEN_WIDTH ((float)RsGlobal.width)
|
||||
#ifdef GTA_PS2
|
||||
#ifdef GTA_PAL
|
||||
#define SCREEN_WIDTH ((float)640)
|
||||
#define SCREEN_HEIGHT ((float)512)
|
||||
#else
|
||||
#define SCREEN_WIDTH ((float)640)
|
||||
#define SCREEN_HEIGHT ((float)448)
|
||||
#endif
|
||||
#else
|
||||
#define SCREEN_WIDTH ((float)RsGlobal.width)
|
||||
#define SCREEN_HEIGHT ((float)RsGlobal.height)
|
||||
#endif
|
||||
#define SCREEN_HEIGHT_PAL (512)
|
||||
#define SCREEN_HEIGHT_NTSC (448)
|
||||
#define SCREEN_ASPECT_RATIO (CDraw::GetAspectRatio())
|
||||
#define SCREEN_VIEWWINDOW (Tan(DEGTORAD(CDraw::GetScaledFOV() * 0.5f)))
|
||||
|
||||
|
@ -209,7 +209,7 @@ enum Config {
|
||||
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
|
||||
#define PS2_ALPHA_TEST // emulate ps2 alpha test
|
||||
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
||||
#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
|
||||
//#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
|
||||
#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
|
||||
//#define USE_TEXTURE_POOL
|
||||
#define CUTSCENE_BORDERS_SWITCH
|
||||
@ -241,6 +241,7 @@ enum Config {
|
||||
//#define BIND_VEHICLE_FIREWEAPON // Adds ability to rebind fire key for 'in vehicle' controls
|
||||
|
||||
// Hud, frontend and radar
|
||||
#define PS2_HUD
|
||||
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
|
||||
// #define BETA_SLIDING_TEXT
|
||||
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
|
||||
|
@ -614,23 +614,39 @@ LoadingIslandScreen(const char *levelName)
|
||||
col = CRGBA(255, 255, 255, 255);
|
||||
splash->Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), col, col, col, col);
|
||||
CFont::SetBackgroundOff();
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f));
|
||||
#else
|
||||
CFont::SetScale(1.5f, 1.5f);
|
||||
#endif
|
||||
CFont::SetPropOn();
|
||||
CFont::SetRightJustifyOn();
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(150.0f));
|
||||
#else
|
||||
CFont::SetRightJustifyWrap(150.0f);
|
||||
#endif
|
||||
CFont::SetFontStyle(FONT_HEADING);
|
||||
sprintf(str, "WELCOME TO");
|
||||
AsciiToUnicode(str, wstr);
|
||||
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::SetDropShadowPosition(3);
|
||||
CFont::SetColor(CRGBA(243, 237, 71, 255));
|
||||
CFont::SetScale(SCREEN_STRETCH_X(1.2f), SCREEN_STRETCH_Y(1.2f));
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.2f));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(20.0f), SCREEN_STRETCH_FROM_BOTTOM(110.0f), TheText.Get("WELCOME"));
|
||||
#else
|
||||
CFont::PrintString(SCREEN_WIDTH - 20, SCREEN_STRETCH_FROM_BOTTOM(110.0f), TheText.Get("WELCOME"));
|
||||
#endif
|
||||
TextCopy(wstr, name);
|
||||
TheText.UpperCase(wstr);
|
||||
CFont::SetColor(CRGBA(243, 237, 71, 255));
|
||||
CFont::SetScale(SCREEN_STRETCH_X(1.2f), SCREEN_STRETCH_Y(1.2f));
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.2f));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(20.0f), SCREEN_STRETCH_FROM_BOTTOM(80.0f), wstr);
|
||||
#else
|
||||
CFont::PrintString(SCREEN_WIDTH-20, SCREEN_STRETCH_FROM_BOTTOM(80.0f), wstr);
|
||||
#endif
|
||||
CFont::DrawFonts();
|
||||
DoRWStuffEndOfFrame();
|
||||
}
|
||||
@ -782,7 +798,11 @@ DisplayGameDebugText()
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackGroundOnlyTextOff();
|
||||
CFont::SetColor(CRGBA(255, 108, 0, 255));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_SCALE_X(10.0f), SCREEN_SCALE_Y(10.0f), ver);
|
||||
#else
|
||||
CFont::PrintString(10.0f, 10.0f, ver);
|
||||
#endif
|
||||
|
||||
FrameSamples++;
|
||||
FramesPerSecondCounter += 1000.0f / (CTimer::GetTimeStepNonClippedInSeconds() * 1000.0f);
|
||||
@ -841,14 +861,26 @@ DisplayGameDebugText()
|
||||
CFont::SetRightJustifyOff();
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackGroundOnlyTextOff();
|
||||
CFont::SetWrapx(SCREEN_WIDTH);
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetWrapx(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH));
|
||||
#else
|
||||
CFont::SetWrapx(DEFAULT_SCREEN_WIDTH);
|
||||
#endif
|
||||
CFont::SetFontStyle(FONT_HEADING);
|
||||
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString(42.0f, 42.0f, ustr);
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_SCALE_X(40.0f+2.0f), SCREEN_SCALE_Y(40.0f+2.0f), ustr);
|
||||
#else
|
||||
CFont::PrintString(40.0f+2.0f, 40.0f+2.0f, ustr);
|
||||
#endif
|
||||
|
||||
CFont::SetColor(CRGBA(255, 108, 0, 255));
|
||||
#ifdef FIX_BUGS
|
||||
CFont::PrintString(SCREEN_SCALE_X(40.0f), SCREEN_SCALE_Y(40.0f), ustr);
|
||||
#else
|
||||
CFont::PrintString(40.0f, 40.0f, ustr);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1075,7 +1107,7 @@ Idle(void *arg)
|
||||
if((!FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bRenderGameInMenu) &&
|
||||
TheCamera.GetScreenFadeStatus() != FADE_2)
|
||||
{
|
||||
#ifdef GTA_PC
|
||||
#if defined(GTA_PC) && defined(FIX_BUGS)
|
||||
if (!FrontEndMenuManager.m_bRenderGameInMenu) {
|
||||
// This is from SA, but it's nice for windowed mode
|
||||
RwV2d pos;
|
||||
@ -1483,7 +1515,11 @@ void TheGame(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
CameraSize(Scene.camera, NULL, SCREEN_VIEWWINDOW, SCREEN_ASPECT_RATIO);
|
||||
#ifdef ASPECT_RATIO_SCALE
|
||||
CameraSize(Scene.camera, nil, SCREEN_VIEWWINDOW, SCREEN_ASPECT_RATIO);
|
||||
#else
|
||||
CameraSize(Scene.camera, nil, SCREEN_VIEWWINDOW, DEFAULT_ASPECT_RATIO);
|
||||
#endif
|
||||
CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
|
||||
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
|
||||
if (!RsCameraBeginUpdate(Scene.camera))
|
||||
|
@ -42,13 +42,30 @@ public:
|
||||
bottom += y;
|
||||
top += y;
|
||||
}
|
||||
void Grow(float r){
|
||||
|
||||
void Grow(float r) {
|
||||
left -= r;
|
||||
right += r;
|
||||
top -= r;
|
||||
bottom += r;
|
||||
}
|
||||
|
||||
void Grow(float l, float r)
|
||||
{
|
||||
left -= l;
|
||||
top -= l;
|
||||
right += r;
|
||||
bottom += r;
|
||||
}
|
||||
|
||||
void Grow(float l, float r, float t, float b)
|
||||
{
|
||||
left -= l;
|
||||
top -= t;
|
||||
right += r;
|
||||
bottom += b;
|
||||
}
|
||||
|
||||
float GetWidth(void) { return right - left; }
|
||||
float GetHeight(void) { return bottom - top; }
|
||||
};
|
||||
|
@ -39,11 +39,20 @@ CCredits::PrintCreditSpace(float space, uint32 &line)
|
||||
void
|
||||
CCredits::PrintCreditText(float scaleX, float scaleY, wchar *text, uint32 &lineoffset, float scrolloffset)
|
||||
{
|
||||
#ifdef FIX_BUGS
|
||||
float start = DEFAULT_SCREEN_HEIGHT + 50.0f;
|
||||
#else
|
||||
float start = SCREEN_HEIGHT + 50.0f;
|
||||
#endif
|
||||
float y = lineoffset + start - scrolloffset;
|
||||
if(y > -50.0f && y < start){
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetScale(SCREEN_SCALE_X(scaleX), SCREEN_SCALE_Y(scaleY));
|
||||
CFont::PrintString(SCREEN_WIDTH/2.0f, SCREEN_SCALE_Y(y), (uint16*)text);
|
||||
#else
|
||||
CFont::SetScale(scaleX, scaleY);
|
||||
CFont::PrintString(SCREEN_WIDTH/2.0f, y, (uint16*)text);
|
||||
#endif
|
||||
}
|
||||
lineoffset += scaleY*25.0f;
|
||||
}
|
||||
@ -62,7 +71,11 @@ CCredits::Render(void)
|
||||
scrolloffset = (CTimer::GetTimeInMilliseconds() - CreditsStartTime) / 24.0f;
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetBackgroundOff();
|
||||
#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(220, 220, 220, 220));
|
||||
@ -489,8 +502,14 @@ CCredits::Render(void)
|
||||
if(TheCamera.m_WideScreenOn)
|
||||
TheCamera.DrawBordersForWideScreen();
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
if(lineoffset + DEFAULT_SCREEN_HEIGHT - scrolloffset < -10.0f)
|
||||
#else
|
||||
if(lineoffset + SCREEN_HEIGHT - scrolloffset < -10.0f)
|
||||
#endif
|
||||
{
|
||||
bCreditsGoing = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool CCredits::AreCreditsDone(void)
|
||||
|
@ -267,13 +267,18 @@ CFont::Initialise(void)
|
||||
SetScale(1.0f, 1.0f);
|
||||
SetSlantRefPoint(SCREEN_WIDTH, 0.0f);
|
||||
SetSlant(0.0f);
|
||||
SetColor(CRGBA(0xFF, 0xFF, 0xFF, 0));
|
||||
SetColor(CRGBA(255, 255, 255, 0));
|
||||
SetJustifyOff();
|
||||
SetCentreOff();
|
||||
SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||
SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
|
||||
#ifdef FIX_BUGS
|
||||
SetWrapx(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH));
|
||||
SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH));
|
||||
#else
|
||||
SetWrapx(DEFAULT_SCREEN_WIDTH);
|
||||
SetCentreSize(DEFAULT_SCREEN_WIDTH);
|
||||
#endif
|
||||
SetBackgroundOff();
|
||||
SetBackgroundColor(CRGBA(0x80, 0x80, 0x80, 0x80));
|
||||
SetBackgroundColor(CRGBA(128, 128, 128, 128));
|
||||
SetBackGroundOnlyTextOff();
|
||||
SetPropOn();
|
||||
SetFontStyle(FONT_BANK);
|
||||
@ -360,7 +365,11 @@ void
|
||||
CFont::PrintChar(float x, float y, wchar c)
|
||||
{
|
||||
if(x <= 0.0f || x > SCREEN_WIDTH ||
|
||||
y <= 0.0f || y > SCREEN_HEIGHT) // BUG: game uses SCREENW again
|
||||
#ifdef FIX_BUGS
|
||||
y <= 0.0f || y > SCREEN_HEIGHT)
|
||||
#else
|
||||
y <= 0.0f || y > SCREEN_WIDTH)
|
||||
#endif
|
||||
return;
|
||||
|
||||
float w = GetCharacterWidth(c) / 32.0f;
|
||||
@ -421,6 +430,7 @@ CFont::PrintChar(float x, float y, wchar c)
|
||||
xoff * w / 1024.0f + (1.0f / 48.0f) - 0.001f, (yoff + 1.0f) / 25.6f - 0.0001f);
|
||||
#endif
|
||||
}else
|
||||
{
|
||||
CSprite2d::AddSpriteToBank(Details.bank + Details.style, // BUG: game doesn't add bank
|
||||
CRect(x, y,
|
||||
x + 32.0f * Details.scaleX * w,
|
||||
@ -430,6 +440,7 @@ CFont::PrintChar(float x, float y, wchar c)
|
||||
(xoff+w)/16.0f, yoff/16.0f,
|
||||
xoff/16.0f, (yoff+1.0f)/16.0f,
|
||||
(xoff+w)/16.0f - 0.0001f, (yoff+1.0f)/16.0f - 0.0001f);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MORE_LANGUAGES
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -37,63 +37,45 @@ enum eSprites
|
||||
class CHud
|
||||
{
|
||||
public:
|
||||
static int16 m_ItemToFlash;
|
||||
static CSprite2d Sprites[NUM_HUD_SPRITES];
|
||||
static wchar m_HelpMessage[HELP_MSG_LENGTH];
|
||||
static wchar m_LastHelpMessage[HELP_MSG_LENGTH];
|
||||
static uint32 m_HelpMessageState;
|
||||
static uint32 m_HelpMessageTimer;
|
||||
static int32 m_HelpMessageFadeTimer;
|
||||
static wchar m_HelpMessageToPrint[HELP_MSG_LENGTH];
|
||||
static float m_HelpMessageDisplayTime;
|
||||
static bool m_HelpMessageQuick;
|
||||
static uint32 m_ZoneState;
|
||||
static int32 m_ZoneFadeTimer;
|
||||
static uint32 m_ZoneNameTimer;
|
||||
static wchar *m_pZoneName;
|
||||
static wchar *m_pLastZoneName;
|
||||
static wchar *m_ZoneToPrint;
|
||||
static wchar *m_VehicleName;
|
||||
static wchar *m_pLastVehicleName;
|
||||
static wchar *m_pVehicleNameToPrint;
|
||||
static uint32 m_VehicleState;
|
||||
static int32 m_VehicleFadeTimer;
|
||||
static uint32 m_VehicleNameTimer;
|
||||
static wchar m_Message[256];
|
||||
static wchar m_BigMessage[6][128];
|
||||
static wchar m_PagerMessage[256];
|
||||
static uint32 m_ZoneNameTimer;
|
||||
static int32 m_ZoneFadeTimer;
|
||||
static uint32 m_ZoneState;
|
||||
static wchar m_HelpMessage[HELP_MSG_LENGTH];
|
||||
static wchar m_LastHelpMessage[HELP_MSG_LENGTH];
|
||||
static wchar m_HelpMessageToPrint[HELP_MSG_LENGTH];
|
||||
static uint32 m_HelpMessageTimer;
|
||||
static int32 m_HelpMessageFadeTimer;
|
||||
static uint32 m_HelpMessageState;
|
||||
static bool m_HelpMessageQuick;
|
||||
static float m_HelpMessageDisplayTime;
|
||||
static int32 SpriteBrightness;
|
||||
static bool m_Wants_To_Draw_Hud;
|
||||
static bool m_Wants_To_Draw_3dMarkers;
|
||||
static wchar m_BigMessage[6][128];
|
||||
static int16 m_ItemToFlash;
|
||||
|
||||
// These aren't really in CHud
|
||||
static float BigMessageInUse[6];
|
||||
static float BigMessageAlpha[6];
|
||||
static float BigMessageX[6];
|
||||
static float OddJob2OffTimer;
|
||||
static bool CounterOnLastFrame;
|
||||
static float OddJob2XOffset;
|
||||
static uint16 CounterFlashTimer;
|
||||
static uint16 OddJob2Timer;
|
||||
static bool TimerOnLastFrame;
|
||||
static int16 OddJob2On;
|
||||
static uint16 TimerFlashTimer;
|
||||
static int16 PagerSoundPlayed;
|
||||
static int32 SpriteBrightness;
|
||||
static float PagerXOffset;
|
||||
static int16 PagerTimer;
|
||||
static int16 PagerOn;
|
||||
|
||||
static wchar *m_pVehicleName;
|
||||
static wchar *m_pLastVehicleName;
|
||||
static uint32 m_VehicleNameTimer;
|
||||
static int32 m_VehicleFadeTimer;
|
||||
static uint32 m_VehicleState;
|
||||
static wchar *m_pVehicleNameToPrint;
|
||||
public:
|
||||
static void Initialise();
|
||||
static void Shutdown();
|
||||
static void ReInitialise();
|
||||
static void GetRidOfAllHudMessages();
|
||||
static void SetZoneName(wchar *name);
|
||||
static void SetHelpMessage(wchar *message, bool quick);
|
||||
static void SetVehicleName(wchar *name);
|
||||
static void Draw();
|
||||
static void DrawAfterFade();
|
||||
static void GetRidOfAllHudMessages();
|
||||
static void Initialise();
|
||||
static void ReInitialise();
|
||||
static void SetBigMessage(wchar *message, uint16 style);
|
||||
static void SetHelpMessage(wchar *message, bool quick);
|
||||
static void SetMessage(wchar *message);
|
||||
static void SetBigMessage(wchar *message, uint16 style);
|
||||
static void SetPagerMessage(wchar *message);
|
||||
static void SetVehicleName(wchar *name);
|
||||
static void SetZoneName(wchar *name);
|
||||
static void Shutdown();
|
||||
};
|
||||
|
@ -1048,17 +1048,21 @@ CMoneyMessage::Render()
|
||||
RwV3d vecOut;
|
||||
float fDistX, fDistY;
|
||||
if (CSprite::CalcScreenCoors(m_vecPosition + CVector(0.0f, 0.0f, fLifeTime), &vecOut, &fDistX, &fDistY, true)) {
|
||||
fDistX *= (0.7 * fLifeTime + 2.0) * m_fSize;
|
||||
fDistY *= (0.7 * fLifeTime + 2.0) * m_fSize;
|
||||
fDistX *= (0.7f * fLifeTime + 2.0f) * m_fSize;
|
||||
fDistY *= (0.7f * fLifeTime + 2.0f) * m_fSize;
|
||||
CFont::SetPropOn();
|
||||
CFont::SetBackgroundOff();
|
||||
|
||||
float fScaleY = Min(fDistY / 100.0f, MAX_SCALE);
|
||||
float fScaleX = Min(fDistX / 100.0f, MAX_SCALE);
|
||||
|
||||
CFont::SetScale(fScaleX, fScaleY); // maybe use SCREEN_SCALE_X and SCREEN_SCALE_Y here?
|
||||
#ifdef FIX_BUGS
|
||||
CFont::SetScale(SCREEN_SCALE_X(fScaleX), SCREEN_SCALE_Y(fScaleY));
|
||||
#else
|
||||
CFont::SetScale(fScaleX, fScaleY);
|
||||
#endif
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH));
|
||||
CFont::SetCentreSize(SCREEN_WIDTH);
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetColor(CRGBA(m_Colour.r, m_Colour.g, m_Colour.b, (255.0f - 255.0f * fLifeTime) * m_fOpacity));
|
||||
CFont::SetBackGroundOnlyTextOff();
|
||||
|
@ -226,6 +226,7 @@ ConvertingTexturesScreen(uint32 num, uint32 count, const char *text)
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetPropOn();
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.45f), SCREEN_SCALE_Y(0.7f));
|
||||
CFont::SetCentreOff();
|
||||
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(170.0f));
|
||||
CFont::SetJustifyOff();
|
||||
CFont::SetColor(CRGBA(255, 217, 106, 255));
|
||||
|
Loading…
Reference in New Issue
Block a user