coastline 0.0.4
Loading...
Searching...
No Matches
rallyconfig.h
Go to the documentation of this file.
1#pragma once
2
8
9#include "common/guid.h"
10#include "common/inputbinding.h"
11
12#ifndef MAX_PATH
14#define MAX_PATH 260
15#endif
16
18#define MENU_SELECTION_COUNT 12
19
22public:
24 const char *GetPlayerName() const {
25 return szPlayerName;
26 }
27
28 int GetSfxVolume() const {
29 return dwSfxVolume;
30 }
31
32 int GetMusicVolume() const {
33 return dwMusicVolume;
34 }
35
47 char szPlayerName[1024];
56 char szTcpIpPort[32];
57 char szTcpIpAddress[64];
59
67
70 }
71
79 void LoadDeviceDefaultBindings(int nDevice);
80
92 void SetInputBinding(int nDevice, int nControl, int nKind, int nKeyCode);
93
103 int GetInputBindingFlags(int nDevice, int nControl);
104
115 int GetInputBindingKeyCode(int nDevice, int nControl);
116
124
134
144 bool LoadRallyConfigFile(const char *pszPath);
145
154 bool SaveConfigToFile(const char *pszPath);
155
163 switch (nDevice) {
164 case 1:
166 case 2:
168 case 3:
170 default:
172 }
173 }
174
179};
180
188
189#ifdef __cplusplus
190extern "C" {
191#endif
192
201void LoadBossRallyIniSettings(const char *pszCmdLine);
202#ifdef __cplusplus
203}
204#endif
The settings saved in BossRally.cfg.
Definition rallyconfig.h:21
const char * GetPlayerName() const
Definition rallyconfig.h:24
int GetMusicVolume() const
Definition rallyconfig.h:32
int dwDisplayModeHeight
Definition rallyconfig.h:49
int GetInputBindingKeyCode(int nDevice, int nControl)
The key or button of a binding.
int dwDisplayModeBitDepth
Definition rallyconfig.h:50
~RallyConfig()
The destructor does nothing, and the linker shares its code with NullStub().
Definition rallyconfig.h:69
bool SaveConfigToFile(const char *pszPath)
Write the settings to a configuration file of version 2.
int adwMenuSelectionBackup[MENU_SELECTION_COUNT]
Definition rallyconfig.h:55
InputBinding aInputBindingsDevice1[INPUT_BINDING_COUNT]
Definition rallyconfig.h:37
bool LoadRallyConfigFile(const char *pszPath)
Read the settings from a configuration file of version 2.
RallyConfig()
Set the defaults.
int GetInputBindingFlags(int nDevice, int nControl)
The kind of device of a binding.
InputBinding aInputBindingsDevice2[INPUT_BINDING_COUNT]
Definition rallyconfig.h:38
int GetSfxVolume() const
Definition rallyconfig.h:28
InputBinding aInputBindingsKeyboard[INPUT_BINDING_COUNT]
Definition rallyconfig.h:36
InputBinding * GetDeviceBindings(int nDevice)
The bindings of a device.
Definition rallyconfig.h:162
void SelectActiveInputBindings()
Point pActiveInputBindings at the table of dwInputDeviceType.
Definition rallyconfig.h:176
int bForceFeedbackEnabled
Definition rallyconfig.h:45
void SetInputBinding(int nDevice, int nControl, int nKind, int nKeyCode)
Bind a control of a device.
int dwInputDeviceType
The device the game reads, 1 to 3 for a game controller and any other for the keyboard.
Definition rallyconfig.h:41
int dwDisplayModeWidth
Definition rallyconfig.h:48
char szPlayerName[1024]
Definition rallyconfig.h:47
void InitRallyConfigDefaults()
Set every setting to its default and bind each device to its default controls.
InputBinding aInputBindingsDevice3[INPUT_BINDING_COUNT]
Definition rallyconfig.h:39
int dwMusicVolume
Definition rallyconfig.h:54
InputBinding * pActiveInputBindings
Definition rallyconfig.h:42
char szTcpIpAddress[64]
Definition rallyconfig.h:57
int dwSfxVolume
Definition rallyconfig.h:53
GUID DisplayDriverGuid
Definition rallyconfig.h:52
RallyConfig & CopyRallyConfig(const RallyConfig &other)
Copy the settings of another configuration, binding the copy to its own tables.
char szTcpIpPort[32]
Definition rallyconfig.h:56
int bSpecularLightingSelection
Definition rallyconfig.h:44
void LoadDeviceDefaultBindings(int nDevice)
Bind a device to its default controls.
int bSkidMarksSelection
Definition rallyconfig.h:58
char szSavedModemPhoneNumber[MAX_PATH]
Definition rallyconfig.h:46
int bCarShadowSelection
Definition rallyconfig.h:43
int dwDisplayModeExtra
Definition rallyconfig.h:51
The globally unique identifier the settings of the game save, laid out as the GUID of Windows.
The bindings of the controls of the game, which the settings save.
#define INPUT_BINDING_COUNT
The number of controls a binding table has.
Definition inputbinding.h:9
void LoadBossRallyIniSettings(const char *pszCmdLine)
Read BossRally.ini and apply the command line on top of it.
#define MENU_SELECTION_COUNT
The number of menu selections the configuration saves.
Definition rallyconfig.h:18
#define MAX_PATH
The longest path of the Windows API, the size of the paths the settings save.
Definition rallyconfig.h:14
RallyConfig g_GlobalRallyConfig
Settings of the running game.
The binding of one control of the game to a key, a button, or an axis.
Definition inputbinding.h:12