coastline 0.0.4
Loading...
Searching...
No Matches
RallyConfig Class Reference

The settings saved in BossRally.cfg. More...

#include <rallyconfig.h>

Collaboration diagram for RallyConfig:

Public Member Functions

const char * GetPlayerName () const
int GetSfxVolume () const
int GetMusicVolume () const
 RallyConfig ()
 Set the defaults.
 ~RallyConfig ()
 The destructor does nothing, and the linker shares its code with NullStub().
void LoadDeviceDefaultBindings (int nDevice)
 Bind a device to its default controls.
void SetInputBinding (int nDevice, int nControl, int nKind, int nKeyCode)
 Bind a control of a device.
int GetInputBindingFlags (int nDevice, int nControl)
 The kind of device of a binding.
int GetInputBindingKeyCode (int nDevice, int nControl)
 The key or button of a binding.
void InitRallyConfigDefaults ()
 Set every setting to its default and bind each device to its default controls.
RallyConfig & CopyRallyConfig (const RallyConfig &other)
 Copy the settings of another configuration, binding the copy to its own tables.
bool LoadRallyConfigFile (const char *pszPath)
 Read the settings from a configuration file of version 2.
bool SaveConfigToFile (const char *pszPath)
 Write the settings to a configuration file of version 2.
InputBinding * GetDeviceBindings (int nDevice)
 The bindings of a device.
void SelectActiveInputBindings ()
 Point pActiveInputBindings at the table of dwInputDeviceType.

Public Attributes

InputBinding aInputBindingsKeyboard [INPUT_BINDING_COUNT]
InputBinding aInputBindingsDevice1 [INPUT_BINDING_COUNT]
InputBinding aInputBindingsDevice2 [INPUT_BINDING_COUNT]
InputBinding aInputBindingsDevice3 [INPUT_BINDING_COUNT]
int dwInputDeviceType
 The device the game reads, 1 to 3 for a game controller and any other for the keyboard.
InputBinding * pActiveInputBindings
int bCarShadowSelection
int bSpecularLightingSelection
int bForceFeedbackEnabled
char szSavedModemPhoneNumber [MAX_PATH]
char szPlayerName [1024]
int dwDisplayModeWidth
int dwDisplayModeHeight
int dwDisplayModeBitDepth
int dwDisplayModeExtra
GUID DisplayDriverGuid
int dwSfxVolume
int dwMusicVolume
int adwMenuSelectionBackup [MENU_SELECTION_COUNT]
char szTcpIpPort [32]
char szTcpIpAddress [64]
int bSkidMarksSelection

Detailed Description

The settings saved in BossRally.cfg.

Constructor & Destructor Documentation

◆ RallyConfig()

RallyConfig::RallyConfig ( )

Set the defaults.

Ghidra address:
BRD3D: 0x10069a90
Ghidra address:
BRGlide: 0x10062b00

◆ ~RallyConfig()

RallyConfig::~RallyConfig ( )
inline

The destructor does nothing, and the linker shares its code with NullStub().

Member Function Documentation

◆ GetPlayerName()

const char * RallyConfig::GetPlayerName ( ) const
inline
Returns
The configured player name.

◆ GetSfxVolume()

int RallyConfig::GetSfxVolume ( ) const
inline
Returns
The sound-effects volume.

◆ GetMusicVolume()

int RallyConfig::GetMusicVolume ( ) const
inline
Returns
The music volume.

◆ LoadDeviceDefaultBindings()

void RallyConfig::LoadDeviceDefaultBindings ( int nDevice)

Bind a device to its default controls.

Parameters
nDeviceThe device, 1 to 3 for a game controller and any other for the keyboard.
Ghidra address:
BRD3D: 0x10069aa0
Ghidra address:
BRGlide: 0x10062b10

◆ SetInputBinding()

void RallyConfig::SetInputBinding ( int nDevice,
int nControl,
int nKind,
int nKeyCode )

Bind a control of a device.

The alternate controls are taken from the defaults, and an alternate that another binding of the device uses is cleared.

Parameters
nDeviceThe device, 1 to 3 for a game controller and any other for the keyboard.
nControlThe control of the game.
nKindThe kind of device in the high byte.
nKeyCodeThe key or button in the low byte.
Ghidra address:
BRD3D: 0x10069b10
Ghidra address:
BRGlide: 0x10062b80

◆ GetInputBindingFlags()

int RallyConfig::GetInputBindingFlags ( int nDevice,
int nControl )

The kind of device of a binding.

Parameters
nDeviceThe device, 1 to 3 for a game controller and any other for the keyboard.
nControlThe control of the game.
Returns
The high byte of the control of the binding, in place.
Ghidra address:
BRD3D: 0x10069bc0
Ghidra address:
BRGlide: 0x10062c30

◆ GetInputBindingKeyCode()

int RallyConfig::GetInputBindingKeyCode ( int nDevice,
int nControl )

The key or button of a binding.

A control of a game controller with its top bit set has the code in its high byte.

Parameters
nDeviceThe device, 1 to 3 for a game controller and any other for the keyboard.
nControlThe control of the game.
Returns
The key or button.
Ghidra address:
BRD3D: 0x10069c30
Ghidra address:
BRGlide: 0x10062ca0

◆ InitRallyConfigDefaults()

void RallyConfig::InitRallyConfigDefaults ( )

Set every setting to its default and bind each device to its default controls.

Ghidra address:
BRD3D: 0x10069c90
Ghidra address:
BRGlide: 0x10062d00

◆ CopyRallyConfig()

RallyConfig & RallyConfig::CopyRallyConfig ( const RallyConfig & other)

Copy the settings of another configuration, binding the copy to its own tables.

Parameters
otherThe configuration copied.
Returns
This configuration.
Ghidra address:
BRD3D: 0x10069de0
Ghidra address:
BRGlide: 0x10062e50

◆ LoadRallyConfigFile()

bool RallyConfig::LoadRallyConfigFile ( const char * pszPath)

Read the settings from a configuration file of version 2.

A file that does not read whole results in the defaults.

Parameters
pszPathPath of the file.
Returns
Whether the file was read.
Ghidra address:
BRD3D: 0x10069ff0
Ghidra address:
BRGlide: 0x10063060

◆ SaveConfigToFile()

bool RallyConfig::SaveConfigToFile ( const char * pszPath)

Write the settings to a configuration file of version 2.

Parameters
pszPathPath of the file.
Returns
Whether every field was written.
Ghidra address:
BRD3D: 0x1006a4a0
Ghidra address:
BRGlide: 0x100634b0

◆ GetDeviceBindings()

InputBinding * RallyConfig::GetDeviceBindings ( int nDevice)
inline

The bindings of a device.

Parameters
nDeviceThe device, 1 to 3 for a game controller and any other for the keyboard.
Returns
The table of the device.

◆ SelectActiveInputBindings()

void RallyConfig::SelectActiveInputBindings ( )
inline

Point pActiveInputBindings at the table of dwInputDeviceType.

Member Data Documentation

◆ aInputBindingsKeyboard

InputBinding RallyConfig::aInputBindingsKeyboard[INPUT_BINDING_COUNT]

The keyboard bindings.

◆ aInputBindingsDevice1

InputBinding RallyConfig::aInputBindingsDevice1[INPUT_BINDING_COUNT]

First game controller bindings.

◆ aInputBindingsDevice2

InputBinding RallyConfig::aInputBindingsDevice2[INPUT_BINDING_COUNT]

Second controller bindings.

◆ aInputBindingsDevice3

InputBinding RallyConfig::aInputBindingsDevice3[INPUT_BINDING_COUNT]

Third controller bindings.

◆ dwInputDeviceType

int RallyConfig::dwInputDeviceType

The device the game reads, 1 to 3 for a game controller and any other for the keyboard.

◆ pActiveInputBindings

InputBinding* RallyConfig::pActiveInputBindings

The bindings of dwInputDeviceType, not saved.

◆ bCarShadowSelection

int RallyConfig::bCarShadowSelection

Whether the shadow of a car is drawn.

◆ bSpecularLightingSelection

int RallyConfig::bSpecularLightingSelection

Whether specular lighting is drawn.

◆ bForceFeedbackEnabled

int RallyConfig::bForceFeedbackEnabled

Whether force feedback is on.

◆ szSavedModemPhoneNumber

char RallyConfig::szSavedModemPhoneNumber[MAX_PATH]

The number the modem dials last.

◆ szPlayerName

char RallyConfig::szPlayerName[1024]

The name of the player.

◆ dwDisplayModeWidth

int RallyConfig::dwDisplayModeWidth

The width of the display mode.

◆ dwDisplayModeHeight

int RallyConfig::dwDisplayModeHeight

The height of the display mode.

◆ dwDisplayModeBitDepth

int RallyConfig::dwDisplayModeBitDepth

The bits of a pixel of the display mode.

◆ dwDisplayModeExtra

int RallyConfig::dwDisplayModeExtra

A fourth value of the display mode.

◆ DisplayDriverGuid

GUID RallyConfig::DisplayDriverGuid

The DirectDraw driver, all zero for the default.

◆ dwSfxVolume

int RallyConfig::dwSfxVolume

The volume of sound effects.

◆ dwMusicVolume

int RallyConfig::dwMusicVolume

The volume of music.

◆ adwMenuSelectionBackup

int RallyConfig::adwMenuSelectionBackup[MENU_SELECTION_COUNT]

The last choices of the menus.

◆ szTcpIpPort

char RallyConfig::szTcpIpPort[32]

The TCP/IP port of network play.

◆ szTcpIpAddress

char RallyConfig::szTcpIpAddress[64]

The TCP/IP address of network play.

◆ bSkidMarksSelection

int RallyConfig::bSkidMarksSelection

Whether skid marks are drawn.


The documentation for this class was generated from the following file: