summaryrefslogtreecommitdiffstats
path: root/src/render/Draw.cpp
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2021-01-08 23:01:41 +0100
committerFire-Head <Fire-Head@users.noreply.github.com>2021-01-08 23:01:41 +0100
commit7a3ee349da51543f5e273df1a7d932a25602ea2a (patch)
tree89dfabef536de8e7163e4fe1b094957e6d3ac762 /src/render/Draw.cpp
parentTrain anims in enum (diff)
downloadre3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.gz
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.bz2
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.lz
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.xz
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.tar.zst
re3-7a3ee349da51543f5e273df1a7d932a25602ea2a.zip
Diffstat (limited to 'src/render/Draw.cpp')
-rw-r--r--src/render/Draw.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp
index 912399c9..507653f6 100644
--- a/src/render/Draw.cpp
+++ b/src/render/Draw.cpp
@@ -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 \ No newline at end of file
+#endif \ No newline at end of file