mirror of
https://github.com/halpz/re3.git
synced 2025-07-26 12:22:46 +00:00
Merge branch 'miami' into lcs
# Conflicts: # src/control/Script.cpp # src/control/Script3.cpp # src/extras/custompipes_d3d9.cpp # src/extras/custompipes_gl.cpp
This commit is contained in:
@ -20,6 +20,16 @@ uint8 CDraw::FadeRed;
|
||||
uint8 CDraw::FadeGreen;
|
||||
uint8 CDraw::FadeBlue;
|
||||
|
||||
#ifdef PROPER_SCALING
|
||||
bool CDraw::ms_bProperScaling = true;
|
||||
#endif
|
||||
#ifdef FIX_RADAR
|
||||
bool CDraw::ms_bFixRadar = true;
|
||||
#endif
|
||||
#ifdef FIX_SPRITES
|
||||
bool CDraw::ms_bFixSprites = true;
|
||||
#endif
|
||||
|
||||
float
|
||||
CDraw::CalculateAspectRatio(void)
|
||||
{
|
||||
@ -75,13 +85,9 @@ CDraw::SetFOV(float fov)
|
||||
ms_fFOV = fov;
|
||||
}
|
||||
|
||||
#ifdef ASPECT_RATIO_SCALE
|
||||
float
|
||||
ScaleAndCenterX(float x)
|
||||
#ifdef PROPER_SCALING
|
||||
float CDraw::ScaleY(float y)
|
||||
{
|
||||
if (SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH)
|
||||
return x;
|
||||
else
|
||||
return (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X(x);
|
||||
return ms_bProperScaling ? y : y * ((float)DEFAULT_SCREEN_HEIGHT/SCREEN_HEIGHT_NTSC);
|
||||
}
|
||||
#endif
|
||||
#endif
|
@ -30,6 +30,16 @@ public:
|
||||
static uint8 FadeRed;
|
||||
static uint8 FadeGreen;
|
||||
static uint8 FadeBlue;
|
||||
|
||||
#ifdef PROPER_SCALING
|
||||
static bool ms_bProperScaling;
|
||||
#endif
|
||||
#ifdef FIX_RADAR
|
||||
static bool ms_bFixRadar;
|
||||
#endif
|
||||
#ifdef FIX_SPRITES
|
||||
static bool ms_bFixSprites;
|
||||
#endif
|
||||
|
||||
static void SetNearClipZ(float nearclip) { ms_fNearClipZ = nearclip; }
|
||||
static float GetNearClipZ(void) { return ms_fNearClipZ; }
|
||||
@ -50,4 +60,7 @@ public:
|
||||
#endif
|
||||
static float GetAspectRatio(void) { return ms_fAspectRatio; }
|
||||
static void SetAspectRatio(float ratio) { ms_fAspectRatio = ratio; }
|
||||
#ifdef PROPER_SCALING
|
||||
static float ScaleY(float y);
|
||||
#endif
|
||||
};
|
||||
|
@ -444,7 +444,7 @@ CFont::PrintChar(float x, float y, wchar c)
|
||||
}
|
||||
#endif
|
||||
|
||||
if(Details.style == FONT_BANK || Details.style == FONT_STANDARD){
|
||||
if(RenderState.style == FONT_BANK || RenderState.style == FONT_STANDARD){
|
||||
if (bDontPrint) return;
|
||||
if (RenderState.slant == 0.0f) {
|
||||
#ifdef FIX_BUGS
|
||||
@ -1051,10 +1051,10 @@ CFont::GetCharacterWidth(wchar c)
|
||||
return Size[LanguageSet][Details.style][192];
|
||||
#else
|
||||
|
||||
if (Details.proportional)
|
||||
return Size[Details.style][c];
|
||||
if (RenderState.proportional)
|
||||
return Size[RenderState.style][c];
|
||||
else
|
||||
return Size[Details.style][209];
|
||||
return Size[RenderState.style][209];
|
||||
#endif // MORE_LANGUAGES
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,16 @@
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
#if defined(FIX_BUGS)
|
||||
#define SCREEN_SCALE_X_FIX(a) SCREEN_SCALE_X(a)
|
||||
#define SCREEN_SCALE_Y_FIX(a) SCREEN_SCALE_Y(a)
|
||||
#define SCALE_AND_CENTER_X_FIX(a) SCALE_AND_CENTER_X(a)
|
||||
#else
|
||||
#define SCREEN_SCALE_X_FIX(a) (a)
|
||||
#define SCREEN_SCALE_Y_FIX(a) (a)
|
||||
#define SCALE_AND_CENTER_X_FIX(a) (a)
|
||||
#endif
|
||||
|
||||
// Game has colors inlined in code.
|
||||
// For easier modification we collect them here:
|
||||
CRGBA MONEY_COLOR(0, 207, 133, 255);
|
||||
@ -1052,16 +1062,17 @@ void CHud::Draw()
|
||||
CRadar::DrawMap();
|
||||
if (FrontEndMenuManager.m_PrefsRadarMode != 1) {
|
||||
CRect rect(0.0f, 0.0f, SCREEN_SCALE_X(RADAR_WIDTH), SCREEN_SCALE_Y(RADAR_HEIGHT));
|
||||
#ifdef FIX_BUGS
|
||||
rect.Translate(SCREEN_SCALE_X(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
|
||||
#else
|
||||
rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
|
||||
#endif
|
||||
|
||||
rect.Translate(SCREEN_SCALE_X_FIX(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
rect.Grow(SCREEN_SCALE_X(6.0f), SCREEN_SCALE_X(6.0f), SCREEN_SCALE_Y(6.0f), SCREEN_SCALE_Y(6.0f));
|
||||
#else
|
||||
rect.Grow(6.0f);
|
||||
rect.Translate(0.0f, 2.0f);
|
||||
#endif
|
||||
rect.Translate(SCREEN_SCALE_X_FIX(0.0f), SCREEN_SCALE_Y_FIX(2.0f));
|
||||
Sprites[HUD_RADARDISC].Draw(rect, CRGBA(0, 0, 0, 255));
|
||||
rect.Translate(0.0f, -2.0f);
|
||||
rect.Translate(SCREEN_SCALE_X_FIX(0.0f), SCREEN_SCALE_Y_FIX(-2.0f));
|
||||
Sprites[HUD_RADARDISC].Draw(rect, RADARDISC_COLOR);
|
||||
}
|
||||
CRadar::DrawBlips();
|
||||
|
@ -2331,9 +2331,9 @@ void CParticle::AddJetExplosion(CVector const &vecPos, float fPower, float fSize
|
||||
vecStepPos,
|
||||
CVector
|
||||
(
|
||||
CGeneral::GetRandomNumberInRange(-0.2f, 0.2f),
|
||||
CGeneral::GetRandomNumberInRange(-0.2f, 0.2f),
|
||||
CGeneral::GetRandomNumberInRange(-0.2f, 0.0f)
|
||||
CGeneral::GetRandomNumberInRange(-0.02f, 0.02f),
|
||||
CGeneral::GetRandomNumberInRange(-0.02f, 0.02f),
|
||||
CGeneral::GetRandomNumberInRange(-0.02f, 0.0f)
|
||||
),
|
||||
nil,
|
||||
fSize, color, 0, 0, 0, 0);
|
||||
|
@ -88,5 +88,5 @@ enum tParticleType
|
||||
|
||||
MAX_PARTICLES,
|
||||
PARTICLE_FIRST = PARTICLE_SPARK,
|
||||
PARTICLE_LAST = PARTICLE_RAINDROP_2D
|
||||
PARTICLE_LAST = PARTICLE_HEATHAZE_IN_DIST
|
||||
};
|
@ -33,7 +33,11 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
|
||||
// this is used to scale correctly if you zoom in with sniper rifle
|
||||
float fovScale = fov / CDraw::GetFOV();
|
||||
|
||||
#ifdef FIX_SPRITES
|
||||
*outw = CDraw::ms_bFixSprites ? (fovScale * recip * SCREEN_HEIGHT) : (fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH);
|
||||
#else
|
||||
*outw = fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH;
|
||||
#endif
|
||||
*outh = fovScale * recip * SCREEN_HEIGHT;
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user