coastline 0.0.4
Loading...
Searching...
No Matches
frontendstate.h File Reference

The selections of the menus that the game reads, which the menus of the PC release and those of the SDL game set. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SdlFrontEndState
 Front-end choices and host paths for one active game session. More...

Macros

#define KEY_CONFIG_ENTRY_COUNT   21
 The number of controls displayed by key configuration.
#define FRONT_END_SAVE_PATH_SIZE   260
 The size of the path of a saved season or ghost, MAX_PATH of Windows.
#define g_szConfigFilePath   (GetSdlFrontEndState()->configPath)
#define g_szSeasonSaveFileName   (GetSdlFrontEndState()->seasonPath)
#define g_szTimeAttackSaveFileName   (GetSdlFrontEndState()->timeAttackPath)
#define g_dwChosenCar   (GetSdlFrontEndState()->chosenCar)
#define g_dwInNetworkCarSetup   (GetSdlFrontEndState()->networkCarSetup)
#define g_dwFrontEndAtRootMenu   (GetSdlFrontEndState()->rootMenu)
#define g_dwSelectedTransmission   (GetSdlFrontEndState()->transmission)
#define g_dwTireMenuIndex   (GetSdlFrontEndState()->tires)
#define g_dwSuspensionMenuIndex   (GetSdlFrontEndState()->suspension)
#define g_dwCarMenuIndex   (GetSdlFrontEndState()->car)
#define g_dwTotalLapsSetting   (GetSdlFrontEndState()->laps)
#define g_dwAccumUnlockedCarMask   (GetSdlFrontEndState()->unlockedCars)
#define g_dwAccumUnlockedTrackMask   (GetSdlFrontEndState()->unlockedTracks)
#define g_dwHandlingTypeMenuIndex   (GetSdlFrontEndState()->handling)
#define g_dwRunBenchmark   (GetSdlFrontEndState()->benchmark)
#define g_dwNetworkPlayMode   (GetSdlFrontEndState()->networkPlay)
#define g_dwNullStubEnable   (GetSdlFrontEndState()->frontEndEnabled)

Typedefs

typedef struct SdlFrontEndState SdlFrontEndState
 Front-end choices and host paths for one active game session.

Functions

SdlFrontEndState * GetSdlFrontEndState (void)
void BackupMenuSelections (void)
 Copy the choices of the menus to adwMenuSelectionBackup of g_GlobalRallyConfig.
void ShowErrorMessage (int nErrorCode)
 Show an error of the game in a message box from its second character, and exit when the error is fatal.
void ResolveRaceSelections (void)
 Restore menu choices, advance unavailable selections, and apply race settings.
void ResetMenuSelectionsToDefaults (void)
 Reset menu selections, championship profiles, and result display values.
void StopActiveFrontEndForSeasonTransition (void)
 Stop and shut down the active menu screen after a season transition.

Detailed Description

The selections of the menus that the game reads, which the menus of the PC release and those of the SDL game set.

Macro Definition Documentation

◆ KEY_CONFIG_ENTRY_COUNT

#define KEY_CONFIG_ENTRY_COUNT   21

The number of controls displayed by key configuration.

◆ FRONT_END_SAVE_PATH_SIZE

#define FRONT_END_SAVE_PATH_SIZE   260

The size of the path of a saved season or ghost, MAX_PATH of Windows.

◆ g_szConfigFilePath

#define g_szConfigFilePath   (GetSdlFrontEndState()->configPath)

The null-terminated path of the active configuration file.

◆ g_szSeasonSaveFileName

#define g_szSeasonSaveFileName   (GetSdlFrontEndState()->seasonPath)

The path of the saved season file.

◆ g_szTimeAttackSaveFileName

#define g_szTimeAttackSaveFileName   (GetSdlFrontEndState()->timeAttackPath)

The path of the saved time-attack ghost.

◆ g_dwChosenCar

#define g_dwChosenCar   (GetSdlFrontEndState()->chosenCar)

The selected car index transferred from the front end into race setup.

◆ g_dwInNetworkCarSetup

#define g_dwInNetworkCarSetup   (GetSdlFrontEndState()->networkCarSetup)

Whether the network car setup screen is active.

◆ g_dwFrontEndAtRootMenu

#define g_dwFrontEndAtRootMenu   (GetSdlFrontEndState()->rootMenu)

Whether the root front-end screen is active.

◆ g_dwSelectedTransmission

#define g_dwSelectedTransmission   (GetSdlFrontEndState()->transmission)

The selected transmission mode.

◆ g_dwTireMenuIndex

#define g_dwTireMenuIndex   (GetSdlFrontEndState()->tires)

The selected tyre option index.

◆ g_dwSuspensionMenuIndex

#define g_dwSuspensionMenuIndex   (GetSdlFrontEndState()->suspension)

The selected suspension option index.

◆ g_dwCarMenuIndex

#define g_dwCarMenuIndex   (GetSdlFrontEndState()->car)

The car option index displayed in car setup.

◆ g_dwTotalLapsSetting

#define g_dwTotalLapsSetting   (GetSdlFrontEndState()->laps)

The configured race lap count.

◆ g_dwAccumUnlockedCarMask

#define g_dwAccumUnlockedCarMask   (GetSdlFrontEndState()->unlockedCars)

The accumulated car unlock mask, one bit per car.

◆ g_dwAccumUnlockedTrackMask

#define g_dwAccumUnlockedTrackMask   (GetSdlFrontEndState()->unlockedTracks)

The accumulated track unlock mask, one bit per track.

◆ g_dwHandlingTypeMenuIndex

#define g_dwHandlingTypeMenuIndex   (GetSdlFrontEndState()->handling)

The selected handling option index.

◆ g_dwRunBenchmark

#define g_dwRunBenchmark   (GetSdlFrontEndState()->benchmark)

Whether benchmark mode is requested.

◆ g_dwNetworkPlayMode

#define g_dwNetworkPlayMode   (GetSdlFrontEndState()->networkPlay)

Whether the selected race uses network play.

◆ g_dwNullStubEnable

#define g_dwNullStubEnable   (GetSdlFrontEndState()->frontEndEnabled)

Whether PC front-end-dependent features are enabled.

Typedef Documentation

◆ SdlFrontEndState

typedef struct SdlFrontEndState SdlFrontEndState

Front-end choices and host paths for one active game session.

Function Documentation

◆ GetSdlFrontEndState()

SdlFrontEndState * GetSdlFrontEndState ( void )
Precondition
An EngineRuntime is active.
Returns
Front-end storage, valid until the runtime is destroyed.

◆ BackupMenuSelections()

void BackupMenuSelections ( void )

Copy the choices of the menus to adwMenuSelectionBackup of g_GlobalRallyConfig.

Ghidra address:
BRD3D: 0x1003e310
Ghidra address:
BRGlide: 0x10037920

◆ ShowErrorMessage()

void ShowErrorMessage ( int nErrorCode)

Show an error of the game in a message box from its second character, and exit when the error is fatal.

Codes above the error-table bound show nothing.

Parameters
nErrorCodeThe error code.
Ghidra address:
BRD3D: 0x1003e260
Ghidra address:
BRGlide: 0x100378c0

◆ ResolveRaceSelections()

void ResolveRaceSelections ( void )

Restore menu choices, advance unavailable selections, and apply race settings.

Ghidra address:
BRD3D: 0x1003e510
Ghidra address:
BRGlide: 0x10037b20

◆ ResetMenuSelectionsToDefaults()

void ResetMenuSelectionsToDefaults ( void )

Reset menu selections, championship profiles, and result display values.

Ghidra address:
BRD3D: 0x1003e680
Ghidra address:
BRGlide: 0x10037c90

◆ StopActiveFrontEndForSeasonTransition()

void StopActiveFrontEndForSeasonTransition ( void )

Stop and shut down the active menu screen after a season transition.