2019-05-15 16:52:37 +02:00
|
|
|
#pragma once
|
|
|
|
|
2019-07-03 17:26:15 +02:00
|
|
|
enum eAspectRatio
|
|
|
|
{
|
2019-07-12 18:28:40 +02:00
|
|
|
// Make sure these work the same as FrontEndMenuManager.m_PrefsUseWideScreen
|
|
|
|
// without widescreen support
|
2019-07-03 17:26:15 +02:00
|
|
|
AR_4_3,
|
|
|
|
AR_16_9,
|
2019-07-12 18:28:40 +02:00
|
|
|
|
|
|
|
AR_AUTO,
|
2019-07-03 17:26:15 +02:00
|
|
|
};
|
|
|
|
|
2019-05-15 16:52:37 +02:00
|
|
|
class CDraw
|
|
|
|
{
|
|
|
|
private:
|
2020-04-17 07:54:14 +02:00
|
|
|
static float ms_fNearClipZ;
|
|
|
|
static float ms_fFarClipZ;
|
|
|
|
static float ms_fFOV;
|
2019-07-03 13:13:55 +02:00
|
|
|
#ifdef ASPECT_RATIO_SCALE
|
|
|
|
// we use this variable to scale a lot of 2D elements
|
|
|
|
// so better cache it
|
2019-06-16 00:20:55 +02:00
|
|
|
static float ms_fAspectRatio;
|
2020-06-21 14:50:00 +02:00
|
|
|
// similar thing for 3D rendering
|
|
|
|
static float ms_fScaledFOV;
|
2019-07-03 13:13:55 +02:00
|
|
|
#endif
|
2020-06-21 14:50:00 +02:00
|
|
|
public:
|
|
|
|
static float ms_fLODDistance; // set but unused?
|
2019-06-16 00:20:55 +02:00
|
|
|
|
2020-04-17 07:54:14 +02:00
|
|
|
static uint8 FadeValue;
|
|
|
|
static uint8 FadeRed;
|
|
|
|
static uint8 FadeGreen;
|
|
|
|
static uint8 FadeBlue;
|
2019-05-30 21:24:47 +02:00
|
|
|
|
2019-05-15 16:52:37 +02:00
|
|
|
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; }
|
2019-06-16 00:20:55 +02:00
|
|
|
|
2019-05-30 13:35:13 +02:00
|
|
|
static void SetFOV(float fov);
|
2019-05-15 16:52:37 +02:00
|
|
|
static float GetFOV(void) { return ms_fFOV; }
|
2020-06-21 14:50:00 +02:00
|
|
|
#ifdef ASPECT_RATIO_SCALE
|
|
|
|
static float GetScaledFOV(void) { return ms_fScaledFOV; }
|
|
|
|
#else
|
|
|
|
static float GetScaledFOV(void) { return ms_fFOV; }
|
|
|
|
#endif
|
2019-06-16 00:20:55 +02:00
|
|
|
|
2020-05-24 01:59:30 +02:00
|
|
|
static float CalculateAspectRatio(void);
|
2019-07-03 13:13:55 +02:00
|
|
|
#ifdef ASPECT_RATIO_SCALE
|
|
|
|
static float ConvertFOV(float fov);
|
2020-05-24 01:59:30 +02:00
|
|
|
#endif
|
2019-06-16 00:20:55 +02:00
|
|
|
static float GetAspectRatio(void) { return ms_fAspectRatio; }
|
2019-07-03 13:13:55 +02:00
|
|
|
static void SetAspectRatio(float ratio) { ms_fAspectRatio = ratio; }
|
2019-05-15 16:52:37 +02:00
|
|
|
};
|