summaryrefslogtreecommitdiffstats
path: root/src/render/Draw.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-03 13:13:55 +0200
committeraap <aap@papnet.eu>2019-07-03 13:13:55 +0200
commit25865e68c4c87cfe3cf63c8721f3d0ec8dfca35c (patch)
tree32f12eb5067af7c6ec08d16b2675a426096a9ad9 /src/render/Draw.h
parentMerge pull request #90 from GTAmodding/revert-88-master (diff)
downloadre3-25865e68c4c87cfe3cf63c8721f3d0ec8dfca35c.tar
re3-25865e68c4c87cfe3cf63c8721f3d0ec8dfca35c.tar.gz
re3-25865e68c4c87cfe3cf63c8721f3d0ec8dfca35c.tar.bz2
re3-25865e68c4c87cfe3cf63c8721f3d0ec8dfca35c.tar.lz
re3-25865e68c4c87cfe3cf63c8721f3d0ec8dfca35c.tar.xz
re3-25865e68c4c87cfe3cf63c8721f3d0ec8dfca35c.tar.zst
re3-25865e68c4c87cfe3cf63c8721f3d0ec8dfca35c.zip
Diffstat (limited to 'src/render/Draw.h')
-rw-r--r--src/render/Draw.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/render/Draw.h b/src/render/Draw.h
index 1fcb5212..3349c6c9 100644
--- a/src/render/Draw.h
+++ b/src/render/Draw.h
@@ -1,16 +1,18 @@
#pragma once
-#define HUD_SCALE 0.8f
-#define DEFAULT_SCALE 1.0f
-
class CDraw
{
private:
static float &ms_fNearClipZ;
static float &ms_fFarClipZ;
static float &ms_fFOV;
+ static float ms_fLODDistance; // unused
+
+#ifdef ASPECT_RATIO_SCALE
+ // we use this variable to scale a lot of 2D elements
+ // so better cache it
static float ms_fAspectRatio;
- static float ms_fScreenMultiplier;
+#endif
public:
static uint8 &FadeValue;
@@ -26,8 +28,12 @@ public:
static void SetFOV(float fov);
static float GetFOV(void) { return ms_fFOV; }
- static void CalculateAspectRatio();
+ static float FindAspectRatio(void);
+#ifdef ASPECT_RATIO_SCALE
+ static float ConvertFOV(float fov);
static float GetAspectRatio(void) { return ms_fAspectRatio; }
- static void SetScreenMult(float mult) { ms_fScreenMultiplier = mult; };
- static float GetScreenMult(void) { return ms_fScreenMultiplier; };
+ static void SetAspectRatio(float ratio) { ms_fAspectRatio = ratio; }
+#else
+ static float GetAspectRatio(void) { return FindAspectRatio(); }
+#endif
};