blob: e67ab42bd74e1fef582c066c4053363a833f2d35 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#pragma once
enum eAspectRatio
{
// Make sure these work the same as FrontEndMenuManager.m_PrefsUseWideScreen
// without widescreen support
AR_4_3,
AR_16_9,
AR_AUTO,
};
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
};
|