/
CSettings.h
171 lines (144 loc) · 6.29 KB
/
CSettings.h
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/*****************************************************************************
*
* PROJECT: Multi Theft Auto v1.0
* LICENSE: See LICENSE in the top level directory
* FILE: sdk/game/CSettings.h
* PURPOSE: Game settings interface
*
* Multi Theft Auto is available from http://www.multitheftauto.com/
*
*****************************************************************************/
#ifndef __CGAME_SETTINGS
#define __CGAME_SETTINGS
#if (!defined(RWFORCEENUMSIZEINT))
#define RWFORCEENUMSIZEINT ((int)((~((unsigned int)0))>>1))
#endif /* (!defined(RWFORCEENUMSIZEINT)) */
enum VideoModeFlag // RwVideoModeFlag
{
rwVIDEOMODEEXCLUSIVE = 0x0001, /**<Exclusive (i.e. full-screen) */
rwVIDEOMODEINTERLACE = 0x0002, /**<Interlaced */
rwVIDEOMODEFFINTERLACE = 0x0004, /**<Flicker Free Interlaced */
/* Platform specific video mode flags. */
rwVIDEOMODE_PS2_FSAASHRINKBLIT = 0x0100,
/**< \if sky2
* Full-screen antialiasing mode 0
* \endif
*/
rwVIDEOMODE_PS2_FSAAREADCIRCUIT = 0x0200,
/**< \if sky2
* Full-screen antialiasing mode 1
* \endif
*/
rwVIDEOMODE_XBOX_WIDESCREEN = 0x0100,
/**< \if xbox
* Wide screen.
* \endif
*/
rwVIDEOMODE_XBOX_PROGRESSIVE = 0x0200,
/**< \if xbox
* Progressive.
* \endif
*/
rwVIDEOMODE_XBOX_FIELD = 0x0400,
/**< \if xbox
* Field rendering.
* \endif
*/
rwVIDEOMODE_XBOX_10X11PIXELASPECT = 0x0800,
/**< \if xbox
* The frame buffer is centered on the display.
* On a TV that is 704 pixels across, this would leave 32 pixels of black
* border on the left and 32 pixels of black border on the right.
* \endif
*/
rwVIDEOMODEFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
struct VideoMode // RwVideoMode
{
int width; /**< Width */
int height; /**< Height */
int depth; /**< Depth */
VideoModeFlag flags; /**< Flags */
int refRate; /**< Approximate refresh rate */
int format; /**< Raster format
* \see RwRasterFormat
*/
};
enum eAspectRatio
{
ASPECT_RATIO_AUTO,
ASPECT_RATIO_4_3,
ASPECT_RATIO_16_10,
ASPECT_RATIO_16_9,
};
enum eRadarMode
{
RADAR_MODE_ALL = 0,
RADAR_MODE_BLIPS_ONLY,
RADAR_MODE_NO_HUD
};
class CGameSettings
{
public:
virtual bool IsWideScreenEnabled(void) = 0;
virtual void SetWideScreenEnabled(bool bEnabled) = 0;
virtual unsigned int GetNumVideoModes(void) = 0;
virtual VideoMode* GetVideoModeInfo(VideoMode* modeInfo, unsigned int modeIndex) = 0;
virtual unsigned int GetCurrentVideoMode(void) = 0;
virtual void SetCurrentVideoMode(unsigned int modeIndex, bool bOnRestart) = 0;
virtual unsigned int GetNumAdapters(void) = 0;
virtual unsigned int GetCurrentAdapter(void) = 0;
virtual bool HasUnsafeResolutions(void) = 0;
virtual bool IsUnsafeResolution(int iWidth, int iHeight) = 0;
virtual void SetAdapter(unsigned int uiAdapterIndex) = 0;
virtual unsigned char GetRadioVolume(void) = 0;
virtual void SetRadioVolume(unsigned char ucVolume) = 0;
virtual unsigned char GetSFXVolume(void) = 0;
virtual void SetSFXVolume(unsigned char ucVolume) = 0;
virtual unsigned int GetUsertrackMode(void) = 0;
virtual void SetUsertrackMode(unsigned int uiMode) = 0;
virtual bool IsUsertrackAutoScan(void) = 0;
virtual void SetUsertrackAutoScan(bool bEnable) = 0;
virtual bool IsRadioEqualizerEnabled(void) = 0;
virtual void SetRadioEqualizerEnabled(bool bEnable) = 0;
virtual bool IsRadioAutotuneEnabled(void) = 0;
virtual void SetRadioAutotuneEnabled(bool bEnable) = 0;
virtual float GetDrawDistance(void) = 0;
virtual void SetDrawDistance(float fDrawDistance) = 0;
virtual unsigned int GetBrightness(void) = 0;
virtual void SetBrightness(unsigned int uiBrightness) = 0;
virtual unsigned int GetFXQuality(void) = 0;
virtual void SetFXQuality(unsigned int fxQualityId) = 0;
virtual float GetMouseSensitivity(void) = 0;
virtual void SetMouseSensitivity(float fSensitivity) = 0;
virtual unsigned int GetAntiAliasing(void) = 0;
virtual void SetAntiAliasing(unsigned int uiAntiAliasing, bool bOnRestart) = 0;
virtual bool IsMipMappingEnabled(void) = 0;
virtual void SetMipMappingEnabled(bool bEnable) = 0;
virtual bool IsVolumetricShadowsEnabled(void) = 0;
virtual void SetVolumetricShadowsEnabled(bool bEnable) = 0;
virtual void SetVolumetricShadowsSuspended(bool bSuspended) = 0;
virtual float GetAspectRatioValue(void) = 0;
virtual eAspectRatio GetAspectRatio(void) = 0;
virtual void SetAspectRatio(eAspectRatio aspectRatio, bool bAdjustmentEnabled = true) = 0;
virtual bool IsGrassEnabled(void) = 0;
virtual void SetGrassEnabled(bool bEnable) = 0;
virtual eRadarMode GetRadarMode(void) = 0;
virtual void SetRadarMode(eRadarMode hudMode) = 0;
virtual void UpdateFieldOfViewFromSettings(void) = 0;
virtual void ResetFieldOfViewFromScript(void) = 0;
virtual void SetFieldOfViewPlayer(float fAngle, bool bFromScript) = 0;
virtual void SetFieldOfViewVehicle(float fAngle, bool bFromScript) = 0;
virtual void SetFieldOfViewVehicleMax(float fAngle, bool bFromScript) = 0;
virtual float GetFieldOfViewPlayer(void) = 0;
virtual float GetFieldOfViewVehicle(void) = 0;
virtual float GetFieldOfViewVehicleMax(void) = 0;
virtual void SetVehiclesLODDistance(float fVehiclesLODDistance, float fTrainsPlanesLODDistance) = 0;
virtual void ResetVehiclesLODDistance(void) = 0;
virtual void GetVehiclesLODDistance(float& fVehiclesLODDistance, float& fTrainsPlanesLODDistance) = 0;
virtual void SetPedsLODDistance(float fPedsLODDistance) = 0;
virtual void ResetPedsLODDistance(void) = 0;
virtual float GetPedsLODDistance(void) = 0;
virtual void Save(void) = 0;
};
#endif