summaryrefslogtreecommitdiff
path: root/src/render/Draw.h
diff options
context:
space:
mode:
authorclaude-bot <[email protected]>2026-07-13 12:27:07 +0000
committerclaude-bot <[email protected]>2026-07-13 12:27:07 +0000
commit9f61c9e6ac6b1ac5692cf6352d2ebbd47a31a686 (patch)
treea84756b82513739a2672db3a1f0ec579db6d18ff /src/render/Draw.h
downloadre3-9f61c9e6ac6b1ac5692cf6352d2ebbd47a31a686.tar.gz
re3-9f61c9e6ac6b1ac5692cf6352d2ebbd47a31a686.zip
Import Cai1Hsu/re3 @ miami (reVC / GTA:VC decompilation)HEADmiami
Snapshot import (no upstream history) into git.ancap.in.ua/claude, per @lzcnt. Source: https://github.com/Cai1Hsu/re3 branch miami.
Diffstat (limited to 'src/render/Draw.h')
-rw-r--r--src/render/Draw.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/render/Draw.h b/src/render/Draw.h
new file mode 100644
index 0000000..b96fa81
--- /dev/null
+++ b/src/render/Draw.h
@@ -0,0 +1,70 @@
+#pragma once
+
+enum eAspectRatio
+{
+ // Make sure these work the same as FrontEndMenuManager.m_PrefsUseWideScreen
+ // without widescreen support
+ AR_AUTO,
+ AR_4_3,
+ AR_5_4,
+ AR_16_10,
+ AR_16_9,
+ AR_21_9,
+
+ AR_MAX,
+};
+
+class CDraw
+{
+private:
+ static float ms_fNearClipZ;
+ static float ms_fFarClipZ;
+ static float ms_fFOV;
+ // we use this variable to scale a lot of 2D elements
+ // so better cache it
+ static float ms_fAspectRatio;
+#ifdef ASPECT_RATIO_SCALE
+ // similar thing for 3D rendering
+ static float ms_fScaledFOV;
+#endif
+public:
+ static float ms_fLODDistance; // set but unused?
+
+ static uint8 FadeValue;
+ 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; }
+ static void SetFarClipZ(float farclip) { ms_fFarClipZ = farclip; }
+ static float GetFarClipZ(void) { return ms_fFarClipZ; }
+
+ static void SetFOV(float fov);
+ static float GetFOV(void) { return ms_fFOV; }
+#ifdef ASPECT_RATIO_SCALE
+ static float GetScaledFOV(void) { return ms_fScaledFOV; }
+#else
+ static float GetScaledFOV(void) { return ms_fFOV; }
+#endif
+
+ static float CalculateAspectRatio(void);
+#ifdef ASPECT_RATIO_SCALE
+ static float ConvertFOV(float fov);
+#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
+};