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

The front end of the PC port: its menus and their surfaces, the cheats, the selections it restores, and the window procedure of the menus. More...

#include <windows.h>
#include <cstdio>
#include <ddraw.h>
#include "common/assetnames.h"
#include "common/frontendstate.h"
#include "win32/glide/rgb565image.h"
#include "win32/menufont.h"
Include dependency graph for frontend.h:

Go to the source code of this file.

Classes

class  SaveFileList
 The names of the saved files a screen of the front end lists. More...
struct  MenuItemData
 Byte payload associated with a menu-list slot. More...
class  MenuItemList
 Menu list with 100 font and payload slots, optional scrolling, and selection callbacks. More...
class  MenuWidget
 Front-end panel widget with text, sprites, animations, and input callbacks. More...
class  AudioOptionsUI
 Callbacks for PC music-track selection and persistent music and sound-effect volume. More...
class  CarSetupUI
 Callbacks for car, handling, equipment, and navigation choices in the PC car-setup menus. More...
class  ChampionshipSeasonUI
 Callbacks for starting a championship season and returning to the root menu. More...
class  ConnectionUI
 Text-entry and network-provider presentation callbacks for the connection menu. More...
class  CreateGameMenuUI
 Text-entry and return callbacks for creating a network game. More...
class  CreateGameUI
 State-update callbacks for the network game-creation screen. More...
class  D3DDeviceSelectUI
 Device-list and driver-selection callbacks for the Direct3D backend. More...
class  DisplayModeSelectUI
 Display-mode list and configuration callbacks for the video-options screen. More...
class  GameOptionsUI
 Configuration, image, and label callbacks for PC graphics and force-feedback options. More...
class  InputOptionsUI
 Input-device selection, default bindings, and label callbacks for PC controls. More...
class  JoinCreateGameUI
 Session-list and return callbacks for joining or creating a network game. More...
class  KeyConfigUI
 Action selection, key capture, and binding-warning callbacks for PC input configuration. More...
class  LoadFileListUI
 Saved-file list selection callbacks. More...
class  LoadSeasonUI
 Championship save loading, continuation, and return callbacks. More...
class  LoadTimeAttackMenuUI
 Saved time-attack selection, car setup, and return callbacks. More...
class  MainMenuUI
 Root-menu callbacks for entering the credits sequence. More...
class  ModemConnectionUI
 Modem-number entry, provider selection, and connection-screen return callbacks. More...
class  MultiplayerConnectionUI
 Provider selection, hover animation, and return callbacks for multiplayer connections. More...
class  MultiplayerGameSetupUI
 Multiplayer race-setup callbacks using the shared session and cached connection screens. More...
class  MultiplayerSetupUI
 Sprite-update callbacks for multiplayer car-group choices. More...
class  NetworkCarSetupUI
 Network car-setup callbacks for chat, player selection, readiness, and session transitions. More...
class  OptionsMenuUI
 Return callbacks that destroy the active Options screen and restore a cached destination. More...
class  OverwritePromptUI
 Drawing callbacks for the overwrite-confirmation prompt. More...
class  PlayerNameEntryUI
 Player-name editing, continuation, and root-menu return callbacks. More...
class  PreRaceExitSeasonConfirmUI
 Confirmation callbacks for abandoning a championship from pre-race information. More...
class  PreRaceInfoUI
 Championship pre-race records, options, saving, and exit-confirmation callbacks. More...
class  QuitGameConfirmUI
 Application-exit confirmation and root-menu return callbacks. More...
class  RaceResultsInfoUI
 Lap selection, timing labels, and submenu callbacks for race-results information. More...
class  RaceResultsSummaryUI
 Submenu and return callbacks for the championship race-results summary. More...
class  RaceResultsTotalsUI
 Season points, progress labels, submenu callbacks, and continuation from results totals. More...
class  RaceSetupUI
 Callbacks for selecting a track, weather, and lap count. More...
class  ResultsSummaryExitSeasonConfirmUI
 Callbacks for confirming an exit from the championship results. More...
class  SaveSeasonUI
 Callbacks for selecting and naming a championship save slot. More...
class  SaveTimeAttackMenuUI
 Callbacks for the time attack save menu. More...
class  SaveTimeAttackUI
 Callbacks for the time attack save-slot screen. More...
class  SeasonCongratsUI
 Callbacks for the championship completion screen. More...
class  SeasonFileUI
 Callbacks for the selected championship file's labels. More...
class  SeasonProgressInfoUI
 Callbacks for championship progress and actions. More...
class  SeasonUI
 Callbacks for championship standings and totals. More...
class  TimeAttackMenuUI
 Callbacks for the time attack menu. More...
class  TimeAttackUI
 Callbacks for the selected time attack record. More...
class  VideoOptionsUI
 Callbacks for the video options screen. More...
struct  KeyConfigEntry
 A keyboard configuration row and its label resource. More...
class  MenuPanel
 A panel of a screen of the front end. More...
class  MenuScreen
 A screen of the front end menus. More...
struct  MenuImage
 An image of the menus and the file it is loaded from. More...
struct  FrontEndResourceSlot
 A resource of the front end. More...
struct  MenuSprite
 A sprite of the menus, a part of a menu image. More...
struct  CheatCode
 A cheat: the sequence of button changes that applies it, newest first, ending in 0xFFFF. More...
struct  ErrorMessage
 An error of the game that ShowErrorMessage() can show. More...
struct  KeyCharacter
 A key of text input and the character it types. More...

Macros

#define SAVE_FILE_NAME_COUNT   100
 The number of names of a SaveFileList.
#define SAVE_FILE_NAME_SIZE   0x104
 The size of a name of a SaveFileList.
#define MENU_PANEL_WIDGET_COUNT   200
 The number of widgets of a MenuPanel.
#define MENU_SCREEN_PANEL_COUNT   20
 The number of panels of a MenuScreen.
#define MENU_CURSOR_WIDGET_INDEX   (MENU_PANEL_WIDGET_COUNT - 1)
 The index in apWidgets of the mouse cursor of the first panel of the root screen.
#define MENU_IMAGE_COUNT   145
 The number of entries of g_aMenuImages.
#define MENU_IMAGE_PATH_SIZE   0x104
 The size of the path of a menu image.
#define FRONT_END_RESOURCE_SLOT_COUNT   60
 The number of entries of g_aFrontEndResourceSlots.
#define FRONT_END_RESOURCE_FLAG_COUNT   100
 The number of entries of g_adwFrontEndResourceFlags.
#define MENU_GLYPH_RECT_COUNT   68
 The number of entries of g_aMenuGlyphRects.
#define MENU_ALT_GLYPH_RECT_COUNT   20
 The number of entries of g_aMenuAltGlyphRects.
#define MENU_LARGE_ICON_RECT_COUNT   15
 The number of entries of g_aMenuLargeIconRects.
#define MENU_LARGE_ICON_3_COLUMN_RECT_COUNT   9
 The number of entries of g_aMenuLargeIconRects3Col.
#define INPUT_DEVICE_MENU_CHOICES   4
 The number of entries of g_adwInputDeviceMenuIndexToDevice.
#define CHEAT_CODE_COUNT   7
 The number of entries of g_aCheatCodes, with the entry that ends it.
#define CHEAT_INPUT_BUFFER_SIZE   32
 The number of entries of g_anCheatInputBuffer.
#define ERROR_MESSAGE_COUNT   8
 The number of entries of g_ErrorMessageTable.
#define KEY_CHARACTER_COUNT   98
 The number of entries of g_KeyNameLookupTable.

Typedefs

using MenuActionWidget = MenuWidget
 Common widget representation used by menu action callbacks.
using NetworkMenuWidget = MenuWidget
 Common widget representation used by network menu callbacks.

Functions

int ToggleMenuItemTextEditA (MenuWidget *pWidget)
 Toggle text editing for the selected season-save slot and back up its previous label.
int ToggleMenuItemTextEditB (MenuWidget *pWidget)
 Toggle text editing for the selected time-attack slot and back up its previous label.
int RestoreMenuItemTextA (MenuWidget *pWidget)
 Restore the previous season-save label when editing was active.
int RestoreMenuItemTextB (MenuWidget *pWidget)
 Restore the previous time-attack label when editing was active.
int ReturnToMultiplayerLobby (MenuWidget *pWidget)
 Destroy the active network setup screen and restore the cached race setup.
int ReturnToVideoOptionsFromResolution (MenuWidget *pWidget)
 Destroy display mode panels and restore the cached input configuration screen.
int ReturnToVideoOptionsFromDeviceSelect (MenuWidget *pWidget)
 Destroy device selection panels and restore the cached input configuration screen.
void RefreshSessionListSlots (void)
 Remove player-list items by index before enumerating a session's players.
int GetSelectedSessionGuid (GUID *guid)
 Copy the selected session's instance GUID when its menu item has one.
int ShowInputOptionsMenu (MenuWidget *pWidget)
 Open cached input options, building the screen on its first visit.
int SeasonRoundList_SetBrowsingFlag (MenuWidget *pWidget=nullptr)
 Select saved-round browsing for season previews.
int SeasonRoundList_ClearBrowsingFlag (MenuWidget *pWidget=nullptr)
 Select the current round for season previews.
int OnSessionNameEdited (MenuWidget *pWidget)
 Update the session name from the text field and enable continuing when it is nonempty.
int OnPlayerNameEdited (MenuWidget *pWidget)
 Update the player name from the text field and enable continuing when it is nonempty.
int OnModemPhoneNumberEdited (MenuWidget *pWidget)
 Save the edited modem number and enable continuing when it is nonempty.
int SeasonRoundList_UpdateRoundSelection (MenuWidget *pWidget)
 Update the selected round from the season preview list.
int OnChatMessageEdited (MenuWidget *pWidget)
 Copy the edited chat text into the outgoing message buffer.
int OnTcpIpAddressEdited (MenuWidget *pWidget)
 Save the edited TCP/IP address in the game configuration.
int OnTcpIpPortEdited (MenuWidget *pWidget)
 Save the edited TCP/IP port in the game configuration.
int BuildInputOptionsUI (MenuScreen *pScreen)
 Build input options on the supplied screen.
int ShowVideoOptionsMenu (MenuWidget *pWidget)
 Open cached video options, building the screen on its first visit.
int ShowAudioOptionsMenu (MenuWidget *pWidget)
int ShowGameOptionsMenu (MenuWidget *pWidget)
int BuildAudioOptionsUI (MenuScreen *pScreen)
 Build the CD music and volume controls on an audio options screen.
int DrawGameplaySliderA (MenuWidget *pWidget)
 Draw the sound-effects volume slider.
int DrawGameplaySliderB (MenuWidget *pWidget)
 Draw the music volume slider.
int BuildGameOptionsUI (MenuScreen *pScreen)
 Build gameplay options on the supplied screen.
int BuildVideoOptionsUI (MenuScreen *pScreen)
 Build video options on the supplied screen.
int ShowKeyConfigScreen (MenuWidget *pWidget)
 Open cached key configuration, building the screen on its first visit.
int BuildKeyConfigUI (MenuScreen *pScreen)
 Build key configuration on the supplied screen.
int ShowModemDialUpScreen (MenuWidget *pWidget)
 Open cached modem connection options, building the screen on its first visit.
int ReturnToMainMenuFromSeason (MenuWidget *pWidget)
 Reset time attack choices and restore race setup after a season.
int BuildModemConnectionUI (MenuScreen *pScreen)
 Build modem connection options on the supplied screen.
int ShowDisplayModeSelectMenu (MenuWidget *pWidget)
 Open display mode selection and populate its settings lists after successful creation.
int BuildDisplayModeSelectUI (MenuScreen *pScreen)
 Build display mode selection on the supplied screen.
int PopulateVideoSettingsLists (void)
 Populate the video settings lists.
int PopulateDisplayDeviceList (void)
 Populate available display devices.
int CompareDisplayModes (const void *left, const void *right)
 Compare display modes by colour depth, width, then height for sorting.
int PopulateDisplayModeList (void)
 Populate available display modes for the selected device.
int ShowD3DDeviceSelectMenu (MenuWidget *pWidget)
 Open Direct3D device selection and populate its settings lists.
int BuildD3DDeviceSelectUI (MenuScreen *pScreen)
 Build Direct3D device selection on the supplied screen.
int ProcessMenuTextEditInput (MenuWidget *pWidget, short nFont)
 Process text entry and notify the widget when editing finishes.
int DetectDuplicateKeyBindings (int nDevice)
 Mark repeated key bindings in the selected device's action table.
int ShowCarSetupScreen (MenuWidget *pWidget)
int BuildCarSetupUI (MenuScreen *pScreen)
 Build car selection and handling controls on the supplied screen.
int OnListDialogItemSelected (MenuWidget *pWidget)
 Advance to pre-race information and discard the points dialog.
int OnPressAnyKeyContinue (MenuWidget *pWidget)
 Advance to pre-race information and reset the season totals after congratulations.
int ValidateEntityState (MenuWidget *pWidget)
 Update a menu item's font and sprite for its active state.
int ValidateEntityStateAlwaysTrue (MenuWidget *pWidget)
 Update a menu item's active state while always accepting the update.
int ProcessCheatInputAndValidateEntity (MenuWidget *pWidget)
 Process cheat-code input and update the menu item's active state.
int BuildMultiplayerConnectionUI (MenuScreen *pScreen)
 Build connection-provider choices on the supplied screen.
int ShowMultiplayerConnectionScreen (MenuWidget *pWidget=nullptr)
 Open cached connection settings, building the screen on its first visit.
int RaceResultsPanel_PreUpdateSelectLastRace (void)
 Display the previous race's season position in the results panel.
int RaceResultsPanel_PostUpdateRestoreSeasonProgress (void)
 Restore the current season position after drawing the results panel.
bool InitializeFrontEndResources (void)
 Set up the front end.
int ShowNetworkCarSetupScreen (MenuWidget *pWidget=nullptr)
 Open car setup for network play and update the host session settings.
int BuildNetworkCarSetupUI (MenuScreen *pScreen)
 Build player, car, and chat controls for network car setup.
int CompleteConnectionTextEdit (MenuWidget *pWidget)
 Accept the edited text of a connection field.
int IsGameCdInDrive (int nDrive)
 Check whether a drive contains a CD-ROM volume labelled Boss Rally.
int FindGameCdDrive (void)
 Search CD-ROM drives for the Boss Rally disc and restore the original working directory.
int ShowChampionshipSeasonMenu (MenuWidget *pWidget)
int BuildChampionshipSeasonUI (MenuScreen *pScreen)
 Build the championship season-selection screen.
int BuildSaveTimeAttackMenuUI (MenuScreen *pScreen)
 Build the time-attack save-slot screen.
int ShowLoadGhostMenu (MenuWidget *pWidget)
int ShowHostRaceSetupScreen (MenuWidget *pWidget)
 Host a session and show the race setup of the network game.
int ShowCreateGameScreen (MenuWidget *pWidget)
 Show the screen that creates a network game.
int ShowMultiplayerNameScreen (MenuWidget *pWidget)
int ShowJoinCreateGameScreen (MenuWidget *pWidget)
int ShowSeasonProgressInfoScreen (MenuWidget *pWidget=nullptr)
 Open the season progress screen with the currently selected round.
int ShowRaceSetupMenu (MenuWidget *pWidget)
int ShowQuitGameConfirmMenu (MenuWidget *pWidget)
int BuildTimeAttackMenuUI (MenuScreen *pScreen)
 Build the time-attack setup screen.
int BuildLoadTimeAttackMenuUI (MenuScreen *pScreen)
 Build the time-attack load-slot screen.
int BuildMultiplayerGameSetupUI (MenuScreen *pScreen)
 Build race settings for a network game.
int BuildPlayerNameEntryUI (MenuScreen *pScreen)
 Build the player-name entry screen for network play.
int BuildJoinCreateGameUI (MenuScreen *pScreen)
 Build the menu for joining or creating a network game.
int BuildCreateGameMenuUI (MenuScreen *pScreen)
 Build the network game-creation screen.
int JoinSessionAndShowRaceSetup (MenuWidget *pWidget=nullptr)
int BuildSeasonProgressInfoUI (MenuScreen *pScreen)
 Build the current championship progress screen.
int BuildRaceSetupUI (MenuScreen *pScreen)
 Build track, car, and weather settings for an arcade race.
int BuildQuitGameConfirmUI (MenuScreen *pScreen)
 Build the confirmation screen for quitting the game.
int ShowOptionsMenu (MenuWidget *pWidget)
int BuildOptionsMenuUI (MenuScreen *pScreen)
 Build the main options menu.
void SetActiveMenuItemText (const char *pszText)
 Set the root menu item's text when the item exists.
int BuildFrontEndRootMenuUI (MenuScreen *pScreen)
 Build the items of the root screen of the front end.
void InitMenuSpriteRects (void)
 Set the rectangles of the sprites of the menus.
bool InitMenuSurfaces (void)
 Create g_pMenuFrameSurface, show the loading screen unless this is the first call, and load every menu image with its colour key.
void RestoreMenuSelections (void)
 Copy adwMenuSelectionBackup of g_GlobalRallyConfig and its other settings back into the choices of the menus.
int ShowRaceResultsScreen (void)
 Show the screen of the results of a race.
int ReturnToNetworkLobbyScreen (void)
 Show the lobby of network play again after a race.
int ShowTimeAttackMenu (MenuWidget *pWidget)
 Show the menu of a finished time attack, when it is not shown already.
int ShowSaveGhostMenu (int nUnused)
 Show the menu to save the ghost car of a time attack, when it is not shown already.
int EnterTimeAttackMode (void)
 Enter the time attack mode, first showing the menus of a finished time attack when the first vehicle has driven every lap.
void EnterNetworkLobbyScreen (void)
 Show the lobby of network play.
bool RestoreMenuSurfaces (void)
 Restore the surfaces of the loaded menu images and load their bitmaps into them again.
bool ReleaseMenuSurfacesAndFail (HWND hWnd)
 Release the surfaces of the menu images and exit the game.
void BlitSurfaceRegion (int nDestX, int nDestY, WORD wImage, const RECT *pRect, DWORD dwFlags)
 Draw a part of a menu image into the back buffer.
void ReleaseMenuSurfaces (void)
 Release the surfaces of the loaded menu images.
void Cheat_Hazel_UnlockAllTracks (void)
 Unlock every track, play the sound of a cheat, and set the network menus to state 2.
void Cheat_Brielle_UnlockBonusTracks (void)
 Unlock the bonus tracks, play the sound of a cheat, and set the network menus to state 2.
void Cheat_DisableVehicleDeformation (void)
 Stop the vehicles deforming, play the sound of this cheat, and set the network menus to state 3.
void Cheat_Sophia_EnableOutroSequence (void)
 Show the closing sequence, play the sound of a cheat, and set the network menus to state 2.
void Cheat_Lynette_UnlockBonusCars (void)
 Unlock the bonus cars, play the sound of a cheat, and set the network menus to state 2.
void Cheat_Benjamin_UnlockAllCars (void)
 Unlock every car, play the sound of a cheat, and set the network menus to state 2.
void ProcessCheatCodeInput (void)
 Add the last character the window received to the characters of the cheats, in lowercase, and apply each cheat whose word they end with.
void CheckCheatCodeMatches (void)
 Apply each cheat whose word the characters of the cheats end with.
void ApplyCarGroupPreset (void)
 Set the cars of the chosen class and choose the first of them, when the class changed since the last call.
int IsCarSelectable (int nCar)
 Report whether a car can be chosen in the current mode of the game.
void ResetGameModeConfig (void)
 Reset the track, the weather, the car and its settings, and the input device, to the keyboard, for a new game mode.
LRESULT WINAPI FrontEndWindowProc (void *pUnused, HWND hWnd, UINT nMessage, WPARAM wParam, LPARAM lParam)
 Give a message of the main window to the front end.
char LookupKeyCharacter (DWORD dwKey)
 The character a key of text input types.
unsigned IsTrackSelectable (int nTrack)
 Report a track's selection mask or a cheat override.
int BuildRaceResultsInfoUI (MenuScreen *pScreen)
 Build the race-results information screen.
int BuildRaceResultsSummaryUI (MenuScreen *pScreen)
 Build the race-results summary screen.
int BuildRaceResultsTotalsUI (MenuScreen *pScreen)
 Build the race-results totals screen.
int BuildResultsSummaryExitSeasonConfirmUI (MenuScreen *pScreen)
 Build confirmation for exiting a season after the results summary.
int BuildSeasonCongratsUI (MenuScreen *pScreen)
 Build the championship congratulations screen.
int BuildNotEnoughPointsUI (MenuScreen *pScreen)
 Build the insufficient-points screen after a championship race.
int ShowSeasonCongratsScreen (MenuWidget *pWidget)
 Show cached championship congratulations, building the screen on its first visit.
int ShowNotEnoughPointsScreen (MenuWidget *pWidget)
 Show cached championship failure results, building the screen on its first visit.
int ShowRaceResultsTotalsScreen (MenuWidget *pWidget=nullptr)
 Show cached race totals, building the screen on its first visit.
int ShowRaceResultsSummaryScreen (MenuWidget *pWidget=nullptr)
 Show cached race summary results and build an exit confirmation on the first visit.
int BuildPreRaceInfoUI (MenuScreen *pScreen)
 Build the pre-race information screen.
int BuildPreRaceExitSeasonConfirmUI (MenuScreen *pScreen)
 Build confirmation for exiting a season before a race.
int ShowPreRaceInfoScreen (MenuWidget *pWidget)
 Show cached pre-race information and build an exit confirmation on the first visit.
int BuildLoadSeasonUI (MenuScreen *pScreen)
 Build the saved-season selection screen.
int BuildSaveSeasonUI (MenuScreen *pScreen)
 Build the season save-slot screen.
int ShowLoadSeasonMenu (MenuWidget *pWidget)
 Show cached season loading, building the screen on its first visit.
int ShowSaveSeasonScreen (MenuWidget *pWidget)
 Show cached season saving, building the screen on its first visit.

Variables

int g_dwSelectedDisplayModeIndex
 The selected row in the display-mode list, updated by Direct3D and Glide device selection.
int g_dwActiveDisplayModeIndex
 The entry of the list of display modes in use.
RECT g_rcMenuDeviceListBox
 The menu bounds of the display-device list.
int g_adwKeyBindingDuplicateFlags [KEY_CONFIG_ENTRY_COUNT]
 Flags marking duplicate bindings in each key-configuration row.
MenuScreen * g_pActiveMenuScreen
 The screen of the front end that is showing.
NetworkMenuWidget * g_pJoinCreateGameMenu
 The list of sessions of the screen to join or create a network game, while it exists.
void * g_pFrontEndScratchBuffer
 A buffer of the front end, passed to FrontEndWindowProc() and not read by it.
MenuImage g_aMenuImages [MENU_IMAGE_COUNT]
 The images of the menus.
unsigned short g_wMenuImageLoadedCount
 The number of entries of g_aMenuImages loaded.
MenuScreen * g_pRootMenuScreen
 The screen the front end starts at.
MenuScreen * g_pCachedMenu_RaceSetupNetwork
 The cached screen of the setup of a network race.
MenuScreen * g_pCachedMenu_GameplaySettings
 The cached screen of the settings of the game.
MenuScreen * g_pCachedMenu_Championship
 The cached screen of the championship.
MenuWidget * g_pPlayerNameContinueItem
 The item that continues from the name of the player.
MenuWidget * g_pMultiplayerGameSetupMenu
 The menu of the setup of a network game.
RECT g_rcMenuCenterPanel
 Bounds used for the centre panel of the multiplayer session list.
RECT g_rcMenuNetworkPlayers
 Bounds of the network player list beside the session menu.
const char g_szSpace []
 A one-space string used by menu labels and the Glide texture cache.
MenuWidget * g_pSaveTimeAttackMenu
 The menu to save a time attack.
MenuItemList * g_pSaveTimeAttackEditMenu
 The field of the name of a saved time attack.
NetworkMenuWidget * g_pNetworkSessionJoinMenu
 The menu to join a network session.
NetworkMenuWidget * g_pNetworkCarSetupMenu
 The menu of the setup of the car of network play.
MenuWidget * g_pNetworkPlayerListMenu
 The list of the players of network play.
MenuWidget * g_pModemContinueItem
 The item that continues from the modem screen.
MenuWidget * g_pDisplayModeSelectMenu
 The menu that chooses the display mode.
MenuWidget * g_pD3DDeviceSelectMenu
 The menu that chooses the Direct3D device.
RECT g_aMenuGlyphRects [MENU_GLYPH_RECT_COUNT]
 The 16 by 16 glyphs of the menus, eight to a row.
RECT g_aMenuAltGlyphRects [MENU_ALT_GLYPH_RECT_COUNT]
 The 39 by 44 glyphs of the menus, five to a row.
MenuSprite g_aMenuSprites []
 The sprites of the menus.
int g_dwMenuSurfaceInitCount
 The number of times the menu images were loaded.
Rgb565Image * g_pMenuFrameSurface
 The frame the menus are drawn into, the size of the frame buffer.
int g_dwMenuScreenActivated
 Whether ActivateMenuScreen() is entering the screen the game returns to.
int g_dwLobbyLaunchHandled
 Whether the lobby was entered for a game launched from a lobby.
int g_dwNetworkMenuState
 The state of the network menus.
int g_dwCheatAllTracksUnlocked
 Whether the cheat that unlocks every track was entered.
int g_dwCheatBonusTracksUnlocked
 Whether the cheat that unlocks the bonus tracks was entered.
int g_dwCheatBonusCarsUnlocked
 Whether the cheat that unlocks the bonus cars was entered.
int g_dwCheatOutroSequenceEnabled
 Whether the cheat that shows the closing sequence was entered.
int g_dwCheatAllCarsUnlocked
 Whether the cheat that unlocks every car was entered.
CheatCode g_aCheatCodes [CHEAT_CODE_COUNT]
 The cheats, ended by an entry without a word.
int g_anCheatInputBuffer [CHEAT_INPUT_BUFFER_SIZE]
 The last characters typed for the cheats, a ring that wraps at its end.
int g_dwCheatInputCount
 The entry of g_anCheatInputBuffer the next character fills.
int g_dwLastWmCharParam
 The last character the window received, or 0 once it is read.
int g_dwSelectedSessionIndex
 The index of the network session chosen in the list of sessions.
int g_dwSelectedCdTrack
 The track of the CD the menus show, counted from the first music track.
int g_dwSessionListRefreshing
 Whether the list of network sessions is refreshing.
int g_dwTrackMenuIndex
 The chosen track.
int g_dwSelectedWeather
 The chosen weather.
int g_dwUnusedWeatherMenuValue
 An unused value cleared with the menu selections.
int g_dwSelectedCarClass
 The chosen class of car.
ErrorMessage g_ErrorMessageTable [ERROR_MESSAGE_COUNT]
 The errors of the game, indexed by the code of the error.
KeyCharacter g_KeyNameLookupTable [KEY_CHARACTER_COUNT]
 The keys of text input, each typing the printable character of its own code.

Detailed Description

The front end of the PC port: its menus and their surfaces, the cheats, the selections it restores, and the window procedure of the menus.

Macro Definition Documentation

◆ SAVE_FILE_NAME_COUNT

#define SAVE_FILE_NAME_COUNT   100

The number of names of a SaveFileList.

◆ SAVE_FILE_NAME_SIZE

#define SAVE_FILE_NAME_SIZE   0x104

The size of a name of a SaveFileList.

◆ MENU_PANEL_WIDGET_COUNT

#define MENU_PANEL_WIDGET_COUNT   200

The number of widgets of a MenuPanel.

◆ MENU_SCREEN_PANEL_COUNT

#define MENU_SCREEN_PANEL_COUNT   20

The number of panels of a MenuScreen.

◆ MENU_CURSOR_WIDGET_INDEX

#define MENU_CURSOR_WIDGET_INDEX   (MENU_PANEL_WIDGET_COUNT - 1)

The index in apWidgets of the mouse cursor of the first panel of the root screen.

◆ MENU_IMAGE_COUNT

#define MENU_IMAGE_COUNT   145

The number of entries of g_aMenuImages.

◆ MENU_IMAGE_PATH_SIZE

#define MENU_IMAGE_PATH_SIZE   0x104

The size of the path of a menu image.

◆ FRONT_END_RESOURCE_SLOT_COUNT

#define FRONT_END_RESOURCE_SLOT_COUNT   60

The number of entries of g_aFrontEndResourceSlots.

◆ FRONT_END_RESOURCE_FLAG_COUNT

#define FRONT_END_RESOURCE_FLAG_COUNT   100

The number of entries of g_adwFrontEndResourceFlags.

◆ MENU_GLYPH_RECT_COUNT

#define MENU_GLYPH_RECT_COUNT   68

The number of entries of g_aMenuGlyphRects.

◆ MENU_ALT_GLYPH_RECT_COUNT

#define MENU_ALT_GLYPH_RECT_COUNT   20

The number of entries of g_aMenuAltGlyphRects.

◆ MENU_LARGE_ICON_RECT_COUNT

#define MENU_LARGE_ICON_RECT_COUNT   15

The number of entries of g_aMenuLargeIconRects.

◆ MENU_LARGE_ICON_3_COLUMN_RECT_COUNT

#define MENU_LARGE_ICON_3_COLUMN_RECT_COUNT   9

The number of entries of g_aMenuLargeIconRects3Col.

◆ INPUT_DEVICE_MENU_CHOICES

#define INPUT_DEVICE_MENU_CHOICES   4

The number of entries of g_adwInputDeviceMenuIndexToDevice.

◆ CHEAT_CODE_COUNT

#define CHEAT_CODE_COUNT   7

The number of entries of g_aCheatCodes, with the entry that ends it.

◆ CHEAT_INPUT_BUFFER_SIZE

#define CHEAT_INPUT_BUFFER_SIZE   32

The number of entries of g_anCheatInputBuffer.

◆ ERROR_MESSAGE_COUNT

#define ERROR_MESSAGE_COUNT   8

The number of entries of g_ErrorMessageTable.

◆ KEY_CHARACTER_COUNT

#define KEY_CHARACTER_COUNT   98

The number of entries of g_KeyNameLookupTable.

Typedef Documentation

◆ MenuActionWidget

Common widget representation used by menu action callbacks.

◆ NetworkMenuWidget

Common widget representation used by network menu callbacks.

Function Documentation

◆ ToggleMenuItemTextEditA()

int ToggleMenuItemTextEditA ( MenuWidget * pWidget)

Toggle text editing for the selected season-save slot and back up its previous label.

Parameters
pWidgetThe menu item that opened text editing.
Returns
Always one.
Ghidra address:
BRD3D: 0x10041a00
Ghidra address:
BRGlide: 0x1003af60

◆ ToggleMenuItemTextEditB()

int ToggleMenuItemTextEditB ( MenuWidget * pWidget)

Toggle text editing for the selected time-attack slot and back up its previous label.

Parameters
pWidgetThe menu item that opened text editing.
Returns
Always one.
Ghidra address:
BRD3D: 0x10042410
Ghidra address:
BRGlide: 0x1003b970

◆ RestoreMenuItemTextA()

int RestoreMenuItemTextA ( MenuWidget * pWidget)

Restore the previous season-save label when editing was active.

Parameters
pWidgetThe menu item associated with text editing.
Returns
Always one.
Ghidra address:
BRD3D: 0x10041ac0
Ghidra address:
BRGlide: 0x1003b020

◆ RestoreMenuItemTextB()

int RestoreMenuItemTextB ( MenuWidget * pWidget)

Restore the previous time-attack label when editing was active.

Parameters
pWidgetThe menu item associated with text editing.
Returns
Always one.
Ghidra address:
BRD3D: 0x100424d0
Ghidra address:
BRGlide: 0x1003ba30

◆ ReturnToMultiplayerLobby()

int ReturnToMultiplayerLobby ( MenuWidget * pWidget)

Destroy the active network setup screen and restore the cached race setup.

Ghidra address:
BRD3D: 0x10046400
Ghidra address:
BRGlide: 0x1003f8a0

◆ ReturnToVideoOptionsFromResolution()

int ReturnToVideoOptionsFromResolution ( MenuWidget * pWidget)

Destroy display mode panels and restore the cached input configuration screen.

Ghidra address:
BRD3D: 0x10046670
Ghidra address:
BRGlide: 0x1003fac0

◆ ReturnToVideoOptionsFromDeviceSelect()

int ReturnToVideoOptionsFromDeviceSelect ( MenuWidget * pWidget)

Destroy device selection panels and restore the cached input configuration screen.

Ghidra address:
BRD3D: 0x10046620

◆ RefreshSessionListSlots()

void RefreshSessionListSlots ( void )

Remove player-list items by index before enumerating a session's players.

Ghidra address:
BRD3D: 0x1003c9b0
Ghidra address:
BRGlide: 0x10036040

◆ GetSelectedSessionGuid()

int GetSelectedSessionGuid ( GUID * guid)

Copy the selected session's instance GUID when its menu item has one.

Parameters
guidReceives the selected GUID when available; otherwise it is unchanged.
Returns
Always zero.
Ghidra address:
BRD3D: 0x1003d030
Ghidra address:
BRGlide: 0x100366c0

◆ ShowInputOptionsMenu()

int ShowInputOptionsMenu ( MenuWidget * pWidget)

Open cached input options, building the screen on its first visit.

Parameters
pWidgetNot read.
Ghidra address:
BRD3D: 0x100452c0
Ghidra address:
BRGlide: 0x1003e810

◆ SeasonRoundList_SetBrowsingFlag()

int SeasonRoundList_SetBrowsingFlag ( MenuWidget * pWidget = nullptr)

Select saved-round browsing for season previews.

Ghidra address:
BRD3D: 0x1003e8b0
Ghidra address:
BRGlide: 0x10037ed0

◆ SeasonRoundList_ClearBrowsingFlag()

int SeasonRoundList_ClearBrowsingFlag ( MenuWidget * pWidget = nullptr)

Select the current round for season previews.

Ghidra address:
BRD3D: 0x1003e8c0
Ghidra address:
BRGlide: 0x10037ee0

◆ OnSessionNameEdited()

int OnSessionNameEdited ( MenuWidget * pWidget)

Update the session name from the text field and enable continuing when it is nonempty.

Parameters
pWidgetThe session-name text field.
Returns
Always one.
Ghidra address:
BRD3D: 0x1003f210
Ghidra address:
BRGlide: 0x10038750

◆ OnPlayerNameEdited()

int OnPlayerNameEdited ( MenuWidget * pWidget)

Update the player name from the text field and enable continuing when it is nonempty.

Parameters
pWidgetThe player-name text field.
Returns
Always one.
Ghidra address:
BRD3D: 0x1003eef0
Ghidra address:
BRGlide: 0x10038420

◆ OnModemPhoneNumberEdited()

int OnModemPhoneNumberEdited ( MenuWidget * pWidget)

Save the edited modem number and enable continuing when it is nonempty.

Parameters
pWidgetThe modem-number text field.
Returns
Always one.
Ghidra address:
BRD3D: 0x1003ef90
Ghidra address:
BRGlide: 0x100384c0

◆ SeasonRoundList_UpdateRoundSelection()

int SeasonRoundList_UpdateRoundSelection ( MenuWidget * pWidget)

Update the selected round from the season preview list.

Parameters
pWidgetThe round list widget.
Returns
Always one.
Ghidra address:
BRD3D: 0x1003eb60
Ghidra address:
BRGlide: 0x10038150

◆ OnChatMessageEdited()

int OnChatMessageEdited ( MenuWidget * pWidget)

Copy the edited chat text into the outgoing message buffer.

Parameters
pWidgetThe chat text field.
Returns
Always one.
Ghidra address:
BRD3D: 0x1003f110
Ghidra address:
BRGlide: 0x10038650

◆ OnTcpIpAddressEdited()

int OnTcpIpAddressEdited ( MenuWidget * pWidget)

Save the edited TCP/IP address in the game configuration.

Parameters
pWidgetThe address text field.
Returns
Always one.
Ghidra address:
BRD3D: 0x1003f0b0
Ghidra address:
BRGlide: 0x100385f0

◆ OnTcpIpPortEdited()

int OnTcpIpPortEdited ( MenuWidget * pWidget)

Save the edited TCP/IP port in the game configuration.

Parameters
pWidgetThe port text field.
Returns
Always one.
Ghidra address:
BRD3D: 0x1003f050
Ghidra address:
BRGlide: 0x10038580

◆ BuildInputOptionsUI()

int BuildInputOptionsUI ( MenuScreen * pScreen)

Build input options on the supplied screen.

Returns
1.
Ghidra address:
BRD3D: 0x1004c4a0
Ghidra address:
BRGlide: 0x100458d0

◆ ShowVideoOptionsMenu()

int ShowVideoOptionsMenu ( MenuWidget * pWidget)

Open cached video options, building the screen on its first visit.

Parameters
pWidgetNot read.
Ghidra address:
BRD3D: 0x10045390
Ghidra address:
BRGlide: 0x1003e8e0

◆ ShowAudioOptionsMenu()

int ShowAudioOptionsMenu ( MenuWidget * pWidget)
Parameters
pWidgetNot read.
Ghidra address:
BRD3D: 0x100455e0
Ghidra address:
BRGlide: 0x1003ea70

◆ ShowGameOptionsMenu()

int ShowGameOptionsMenu ( MenuWidget * pWidget)
Parameters
pWidgetNot read.
Ghidra address:
BRD3D: 0x100456b0
Ghidra address:
BRGlide: 0x1003eb40

◆ BuildAudioOptionsUI()

int BuildAudioOptionsUI ( MenuScreen * pScreen)

Build the CD music and volume controls on an audio options screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x1004dfc0
Ghidra address:
BRGlide: 0x10046e70

◆ DrawGameplaySliderA()

int DrawGameplaySliderA ( MenuWidget * pWidget)

Draw the sound-effects volume slider.

Parameters
pWidgetThe slider widget.
Returns
Always one.
Ghidra address:
BRD3D: 0x1003e980
Ghidra address:
BRGlide: 0x10037fa0

◆ DrawGameplaySliderB()

int DrawGameplaySliderB ( MenuWidget * pWidget)

Draw the music volume slider.

Parameters
pWidgetThe slider widget.
Returns
Always one.
Ghidra address:
BRD3D: 0x1003e9e0
Ghidra address:
BRGlide: 0x10038000

◆ BuildGameOptionsUI()

int BuildGameOptionsUI ( MenuScreen * pScreen)

Build gameplay options on the supplied screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x1004e830
Ghidra address:
BRGlide: 0x100476e0

◆ BuildVideoOptionsUI()

int BuildVideoOptionsUI ( MenuScreen * pScreen)

Build video options on the supplied screen.

Returns
1.
Ghidra address:
BRD3D: 0x1004d1f0
Ghidra address:
BRGlide: 0x10046620

◆ ShowKeyConfigScreen()

int ShowKeyConfigScreen ( MenuWidget * pWidget)

Open cached key configuration, building the screen on its first visit.

Parameters
pWidgetNot read.
Ghidra address:
BRD3D: 0x100434c0
Ghidra address:
BRGlide: 0x1003ca10

◆ BuildKeyConfigUI()

int BuildKeyConfigUI ( MenuScreen * pScreen)

Build key configuration on the supplied screen.

Returns
1.
Ghidra address:
BRD3D: 0x1004cac0
Ghidra address:
BRGlide: 0x10045ef0

◆ ShowModemDialUpScreen()

int ShowModemDialUpScreen ( MenuWidget * pWidget)

Open cached modem connection options, building the screen on its first visit.

Parameters
pWidgetNot read.
Ghidra address:
BRD3D: 0x10043da0
Ghidra address:
BRGlide: 0x1003d2f0

◆ ReturnToMainMenuFromSeason()

int ReturnToMainMenuFromSeason ( MenuWidget * pWidget)

Reset time attack choices and restore race setup after a season.

Parameters
pWidgetNot read.
Ghidra address:
BRD3D: 0x10046260
Ghidra address:
BRGlide: 0x1003f700

◆ BuildModemConnectionUI()

int BuildModemConnectionUI ( MenuScreen * pScreen)

Build modem connection options on the supplied screen.

Ghidra address:
BRD3D: 0x10056a10
Ghidra address:
BRGlide: 0x1004f8c0

◆ ShowDisplayModeSelectMenu()

int ShowDisplayModeSelectMenu ( MenuWidget * pWidget)

Open display mode selection and populate its settings lists after successful creation.

Parameters
pWidgetThe item chosen, unread.
Returns
0 when the screen cannot be created, 1 otherwise.
Ghidra address:
BRD3D: 0x10045520
Ghidra address:
BRGlide: 0x1003e9b0

◆ BuildDisplayModeSelectUI()

int BuildDisplayModeSelectUI ( MenuScreen * pScreen)

Build display mode selection on the supplied screen.

Returns
1.
Ghidra address:
BRD3D: 0x1004db00
Ghidra address:
BRGlide: 0x100469b0

◆ PopulateVideoSettingsLists()

int PopulateVideoSettingsLists ( void )

Populate the video settings lists.

The Glide library has no list of display devices.

Returns
Whether the lists were populated.
Ghidra address:
BRD3D: 0x1007ac00
Ghidra address:
BRGlide: 0x10058f90

◆ PopulateDisplayDeviceList()

int PopulateDisplayDeviceList ( void )

Populate available display devices.

Ghidra address:
BRD3D: 0x1007a840

◆ CompareDisplayModes()

int CompareDisplayModes ( const void * left,
const void * right )

Compare display modes by colour depth, width, then height for sorting.

Parameters
leftPointer to the first display-mode pointer.
rightPointer to the second display-mode pointer.
Returns
A negative, zero, or positive value according to the ordering.
Ghidra address:
BRD3D: 0x1007a710

◆ PopulateDisplayModeList()

int PopulateDisplayModeList ( void )

Populate available display modes for the selected device.

The Glide library lists the modes of BuildGlideDisplayModeList().

Returns
Whether a mode was listed.
Ghidra address:
BRD3D: 0x1007a940
Ghidra address:
BRGlide: 0x10058e20

◆ ShowD3DDeviceSelectMenu()

int ShowD3DDeviceSelectMenu ( MenuWidget * pWidget)

Open Direct3D device selection and populate its settings lists.

Parameters
pWidgetThe item chosen, unread.
Returns
0 when the screen cannot be created, 1 otherwise.
Ghidra address:
BRD3D: 0x10045460

◆ BuildD3DDeviceSelectUI()

int BuildD3DDeviceSelectUI ( MenuScreen * pScreen)

Build Direct3D device selection on the supplied screen.

Returns
1.
Ghidra address:
BRD3D: 0x1004d640

◆ ProcessMenuTextEditInput()

int ProcessMenuTextEditInput ( MenuWidget * pWidget,
short nFont )

Process text entry and notify the widget when editing finishes.

Parameters
pWidgetThe widget containing the editable font.
nFontThe font index within the widget.
Returns
Zero when the caret is hidden, otherwise one.
Ghidra address:
BRD3D: 0x1003ee50
Ghidra address:
BRGlide: 0x10038380

◆ DetectDuplicateKeyBindings()

int DetectDuplicateKeyBindings ( int nDevice)

Mark repeated key bindings in the selected device's action table.

Parameters
nDeviceThe input device index.
Returns
One when any binding is duplicated, otherwise zero.
Ghidra address:
BRD3D: 0x10040330
Ghidra address:
BRGlide: 0x10039870

◆ ShowCarSetupScreen()

int ShowCarSetupScreen ( MenuWidget * pWidget)
Parameters
pWidgetThe item chosen, unread.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10045110
Ghidra address:
BRGlide: 0x1003e660

◆ BuildCarSetupUI()

int BuildCarSetupUI ( MenuScreen * pScreen)

Build car selection and handling controls on the supplied screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x1004a580
Ghidra address:
BRGlide: 0x100439b0

◆ OnListDialogItemSelected()

int OnListDialogItemSelected ( MenuWidget * pWidget)

Advance to pre-race information and discard the points dialog.

Parameters
pWidgetThe selected dialog item.
Returns
Always zero.
Ghidra address:
BRD3D: 0x100471b0
Ghidra address:
BRGlide: 0x10040600

◆ OnPressAnyKeyContinue()

int OnPressAnyKeyContinue ( MenuWidget * pWidget)

Advance to pre-race information and reset the season totals after congratulations.

Parameters
pWidgetThe continue item.
Returns
Always zero.
Ghidra address:
BRD3D: 0x10047120
Ghidra address:
BRGlide: 0x10040570

◆ ValidateEntityState()

int ValidateEntityState ( MenuWidget * pWidget)

Update a menu item's font and sprite for its active state.

Parameters
pWidgetThe menu item to validate.
Returns
Zero when the item is disabled, otherwise one.
Ghidra address:
BRD3D: 0x10047360
Ghidra address:
BRGlide: 0x100407b0

◆ ValidateEntityStateAlwaysTrue()

int ValidateEntityStateAlwaysTrue ( MenuWidget * pWidget)

Update a menu item's active state while always accepting the update.

Parameters
pWidgetThe menu item to validate.
Returns
Always one.
Ghidra address:
BRD3D: 0x100474b0
Ghidra address:
BRGlide: 0x10040af0

◆ ProcessCheatInputAndValidateEntity()

int ProcessCheatInputAndValidateEntity ( MenuWidget * pWidget)

Process cheat-code input and update the menu item's active state.

Parameters
pWidgetThe menu item to validate.
Returns
Always one.
Ghidra address:
BRD3D: 0x100475f0
Ghidra address:
BRGlide: 0x10040a20

◆ BuildMultiplayerConnectionUI()

int BuildMultiplayerConnectionUI ( MenuScreen * pScreen)

Build connection-provider choices on the supplied screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x100558a0
Ghidra address:
BRGlide: 0x1004e750

◆ ShowMultiplayerConnectionScreen()

int ShowMultiplayerConnectionScreen ( MenuWidget * pWidget = nullptr)

Open cached connection settings, building the screen on its first visit.

Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10043cd0
Ghidra address:
BRGlide: 0x1003d220

◆ RaceResultsPanel_PreUpdateSelectLastRace()

int RaceResultsPanel_PreUpdateSelectLastRace ( void )

Display the previous race's season position in the results panel.

Returns
Always one.
Ghidra address:
BRD3D: 0x100409f0
Ghidra address:
BRGlide: 0x10039f30

◆ RaceResultsPanel_PostUpdateRestoreSeasonProgress()

int RaceResultsPanel_PostUpdateRestoreSeasonProgress ( void )

Restore the current season position after drawing the results panel.

Returns
Always one.
Ghidra address:
BRD3D: 0x10040a20
Ghidra address:
BRGlide: 0x10039f60

◆ InitializeFrontEndResources()

bool InitializeFrontEndResources ( void )

Set up the front end.

The paths of the 145 menu images are allocated and filled, the resources are reset, the root screen is created as the active one, the scratch buffer is allocated, and the paths of the saved season and ghost and the rectangles of the sprites are set.

Returns
Whether the root screen was created.
Ghidra address:
BRD3D: 0x1005d440
Ghidra address:
BRGlide: 0x10056260

◆ ShowNetworkCarSetupScreen()

int ShowNetworkCarSetupScreen ( MenuWidget * pWidget = nullptr)

Open car setup for network play and update the host session settings.

Parameters
pWidgetUnused.
Returns
Zero when the screen cannot be created, otherwise one.
Ghidra address:
BRD3D: 0x100446d0
Ghidra address:
BRGlide: 0x1003dc20

◆ BuildNetworkCarSetupUI()

int BuildNetworkCarSetupUI ( MenuScreen * pScreen)

Build player, car, and chat controls for network car setup.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10058750
Ghidra address:
BRGlide: 0x10051600

◆ CompleteConnectionTextEdit()

int CompleteConnectionTextEdit ( MenuWidget * pWidget)

Accept the edited text of a connection field.

The linker folds the routine with the other routines that return 1.

Parameters
pWidgetNot read.
Returns
1.
Ghidra address:
BRD3D: 0x10042af0
Ghidra address:
BRGlide: 0x100385e0

◆ IsGameCdInDrive()

int IsGameCdInDrive ( int nDrive)

Check whether a drive contains a CD-ROM volume labelled Boss Rally.

Parameters
nDriveThe drive number, with A as one.
Returns
One for the game CD, otherwise zero.
Ghidra address:
BRD3D: 0x1003e100
Ghidra address:
BRGlide: 0x100377a0

◆ FindGameCdDrive()

int FindGameCdDrive ( void )

Search CD-ROM drives for the Boss Rally disc and restore the original working directory.

Returns
One when the disc is found or patches bypass the check, otherwise zero.
Ghidra address:
BRD3D: 0x10045a00
Ghidra address:
BRGlide: 0x1003ee90

◆ ShowChampionshipSeasonMenu()

int ShowChampionshipSeasonMenu ( MenuWidget * pWidget)
Parameters
pWidgetThe item chosen, unread.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10045900
Ghidra address:
BRGlide: 0x1003ed90

◆ BuildChampionshipSeasonUI()

int BuildChampionshipSeasonUI ( MenuScreen * pScreen)

Build the championship season-selection screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x1004f2b0
Ghidra address:
BRGlide: 0x10048160

◆ BuildSaveTimeAttackMenuUI()

int BuildSaveTimeAttackMenuUI ( MenuScreen * pScreen)

Build the time-attack save-slot screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x1005a6e0
Ghidra address:
BRGlide: 0x10053590

◆ ShowLoadGhostMenu()

int ShowLoadGhostMenu ( MenuWidget * pWidget)
Parameters
pWidgetNot read.
Ghidra address:
BRD3D: 0x10044d00
Ghidra address:
BRGlide: 0x1003e250

◆ ShowHostRaceSetupScreen()

int ShowHostRaceSetupScreen ( MenuWidget * pWidget)

Host a session and show the race setup of the network game.

Parameters
pWidgetThe widget of the action. Not read, and the direct callers pass null.
Returns
0 when the screen cannot be allocated, otherwise 1.
Ghidra address:
BRD3D: 0x100443e0
Ghidra address:
BRGlide: 0x1003d930

◆ ShowCreateGameScreen()

int ShowCreateGameScreen ( MenuWidget * pWidget)

Show the screen that creates a network game.

Parameters
pWidgetThe widget of the action. Not read, and the direct callers pass null.
Returns
0 when the screen cannot be allocated, otherwise 1.
Ghidra address:
BRD3D: 0x100440d0
Ghidra address:
BRGlide: 0x1003d620

◆ ShowMultiplayerNameScreen()

int ShowMultiplayerNameScreen ( MenuWidget * pWidget)
Parameters
pWidgetThe item chosen, or null from the lobby; unread.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10043bf0
Ghidra address:
BRGlide: 0x1003d140

◆ ShowJoinCreateGameScreen()

int ShowJoinCreateGameScreen ( MenuWidget * pWidget)
Parameters
pWidgetThe item of the chosen service provider, or null from the lobby; unread.
Returns
0 when the screen cannot be allocated, otherwise 1.
Ghidra address:
BRD3D: 0x10043e70
Ghidra address:
BRGlide: 0x1003d3c0

◆ ShowSeasonProgressInfoScreen()

int ShowSeasonProgressInfoScreen ( MenuWidget * pWidget = nullptr)

Open the season progress screen with the currently selected round.

Parameters
pWidgetUnused.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10045dc0
Ghidra address:
BRGlide: 0x1003f260

◆ ShowRaceSetupMenu()

int ShowRaceSetupMenu ( MenuWidget * pWidget)
Parameters
pWidgetThe item chosen, unread.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10044f50
Ghidra address:
BRGlide: 0x1003e4a0

◆ ShowQuitGameConfirmMenu()

int ShowQuitGameConfirmMenu ( MenuWidget * pWidget)
Parameters
pWidgetThe item chosen, unread.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10046170
Ghidra address:
BRGlide: 0x1003f610

◆ BuildTimeAttackMenuUI()

int BuildTimeAttackMenuUI ( MenuScreen * pScreen)

Build the time-attack setup screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10059760
Ghidra address:
BRGlide: 0x10052610

◆ BuildLoadTimeAttackMenuUI()

int BuildLoadTimeAttackMenuUI ( MenuScreen * pScreen)

Build the time-attack load-slot screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10059bb0
Ghidra address:
BRGlide: 0x10052a60

◆ BuildMultiplayerGameSetupUI()

int BuildMultiplayerGameSetupUI ( MenuScreen * pScreen)

Build race settings for a network game.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10057c10
Ghidra address:
BRGlide: 0x10050ac0

◆ BuildPlayerNameEntryUI()

int BuildPlayerNameEntryUI ( MenuScreen * pScreen)

Build the player-name entry screen for network play.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x100563e0
Ghidra address:
BRGlide: 0x1004f290

◆ BuildJoinCreateGameUI()

int BuildJoinCreateGameUI ( MenuScreen * pScreen)

Build the menu for joining or creating a network game.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10056ff0
Ghidra address:
BRGlide: 0x1004fea0

◆ BuildCreateGameMenuUI()

int BuildCreateGameMenuUI ( MenuScreen * pScreen)

Build the network game-creation screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x100575f0
Ghidra address:
BRGlide: 0x100504a0

◆ JoinSessionAndShowRaceSetup()

int JoinSessionAndShowRaceSetup ( MenuWidget * pWidget = nullptr)
Parameters
pWidgetNot read.
Ghidra address:
BRD3D: 0x10044280
Ghidra address:
BRGlide: 0x1003d7d0

◆ BuildSeasonProgressInfoUI()

int BuildSeasonProgressInfoUI ( MenuScreen * pScreen)

Build the current championship progress screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10052030
Ghidra address:
BRGlide: 0x1004aee0

◆ BuildRaceSetupUI()

int BuildRaceSetupUI ( MenuScreen * pScreen)

Build track, car, and weather settings for an arcade race.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x1004b430
Ghidra address:
BRGlide: 0x10044860

◆ BuildQuitGameConfirmUI()

int BuildQuitGameConfirmUI ( MenuScreen * pScreen)

Build the confirmation screen for quitting the game.

Parameters
pScreenThe screen to populate.
Returns
The result of building the confirmation screen.
Ghidra address:
BRD3D: 0x10049c20
Ghidra address:
BRGlide: 0x10043050

◆ ShowOptionsMenu()

int ShowOptionsMenu ( MenuWidget * pWidget)
Parameters
pWidgetThe item chosen, unread.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x100451e0
Ghidra address:
BRGlide: 0x1003e730

◆ BuildOptionsMenuUI()

int BuildOptionsMenuUI ( MenuScreen * pScreen)

Build the main options menu.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x1004bdc0
Ghidra address:
BRGlide: 0x100451f0

◆ SetActiveMenuItemText()

void SetActiveMenuItemText ( const char * pszText)

Set the root menu item's text when the item exists.

Parameters
pszTextThe text to display.
Ghidra address:
BRD3D: 0x100419d0
Ghidra address:
BRGlide: 0x1003af30

◆ BuildFrontEndRootMenuUI()

int BuildFrontEndRootMenuUI ( MenuScreen * pScreen)

Build the items of the root screen of the front end.

Parameters
pScreenThe screen.
Returns
1.
Ghidra address:
BRD3D: 0x100491b0
Ghidra address:
BRGlide: 0x100425e0

◆ InitMenuSpriteRects()

void InitMenuSpriteRects ( void )

Set the rectangles of the sprites of the menus.

Ghidra address:
BRD3D: 0x1005f800
Ghidra address:
BRGlide: 0x10058540

◆ InitMenuSurfaces()

bool InitMenuSurfaces ( void )

Create g_pMenuFrameSurface, show the loading screen unless this is the first call, and load every menu image with its colour key.

Returns
Whether every image loaded. The game exits when one does not.
Ghidra address:
BRGlide: 0x100583c0

◆ RestoreMenuSelections()

void RestoreMenuSelections ( void )

Copy adwMenuSelectionBackup of g_GlobalRallyConfig and its other settings back into the choices of the menus.

The input device of the configuration is taken from the choice of the menu before the choice is restored, and a restored choice of 1 becomes 2. The cars and tracks the choices unlocked are added to the selectable ones.

Ghidra address:
BRD3D: 0x1003e3a0
Ghidra address:
BRGlide: 0x100379b0

◆ ShowRaceResultsScreen()

int ShowRaceResultsScreen ( void )

Show the screen of the results of a race.

Ghidra address:
BRD3D: 0x10045ea0
Ghidra address:
BRGlide: 0x1003f340

◆ ReturnToNetworkLobbyScreen()

int ReturnToNetworkLobbyScreen ( void )

Show the lobby of network play again after a race.

Ghidra address:
BRD3D: 0x100447d0
Ghidra address:
BRGlide: 0x1003dd20

◆ ShowTimeAttackMenu()

int ShowTimeAttackMenu ( MenuWidget * pWidget)

Show the menu of a finished time attack, when it is not shown already.

Parameters
pWidgetThe item chosen, or null after a race; unread.
Returns
0 when the menu cannot be created, 1 otherwise.
Ghidra address:
BRD3D: 0x10044b90
Ghidra address:
BRGlide: 0x1003e0e0

◆ ShowSaveGhostMenu()

int ShowSaveGhostMenu ( int nUnused)

Show the menu to save the ghost car of a time attack, when it is not shown already.

Parameters
nUnusedNot read.
Returns
0 when the menu cannot be created, 1 otherwise.
Ghidra address:
BRD3D: 0x10044e20
Ghidra address:
BRGlide: 0x1003e370

◆ EnterTimeAttackMode()

int EnterTimeAttackMode ( void )

Enter the time attack mode, first showing the menus of a finished time attack when the first vehicle has driven every lap.

Returns
Always true.
Ghidra address:
BRD3D: 0x10041930
Ghidra address:
BRGlide: 0x1003ae90

◆ EnterNetworkLobbyScreen()

void EnterNetworkLobbyScreen ( void )

Show the lobby of network play.

Ghidra address:
BRD3D: 0x100441a0
Ghidra address:
BRGlide: 0x1003d6f0

◆ RestoreMenuSurfaces()

bool RestoreMenuSurfaces ( void )

Restore the surfaces of the loaded menu images and load their bitmaps into them again.

Returns
Always true.
Ghidra address:
BRD3D: 0x1005f4e0

◆ ReleaseMenuSurfacesAndFail()

bool ReleaseMenuSurfacesAndFail ( HWND hWnd)

Release the surfaces of the menu images and exit the game.

Parameters
hWndNot read.
Returns
False, though the routine does not return.
Ghidra address:
BRD3D: 0x1005f580
Ghidra address:
BRGlide: 0x10058360

◆ BlitSurfaceRegion()

void BlitSurfaceRegion ( int nDestX,
int nDestY,
WORD wImage,
const RECT * pRect,
DWORD dwFlags )

Draw a part of a menu image into the back buffer.

The cursor is clipped to the screen of the menus. A lost surface restores the menu images and the part is not drawn. The Glide library copies the part into g_pMenuFrameSurface with BlitRgb565ImageRegion().

Parameters
nDestXThe left to draw at.
nDestYThe top to draw at.
wImageThe index in g_aMenuImages of the image.
pRectThe part of the image.
dwFlagsThe flags of BltFast(). DDBLTFAST_WAIT is added.
Ghidra address:
BRD3D: 0x1005f5a0
Ghidra address:
BRGlide: 0x10058380

◆ ReleaseMenuSurfaces()

void ReleaseMenuSurfaces ( void )

Release the surfaces of the loaded menu images.

The Glide library frees its images and the surface of the menu frame instead.

Ghidra address:
BRD3D: 0x1005f530
Ghidra address:
BRGlide: 0x10058300

◆ Cheat_Hazel_UnlockAllTracks()

void Cheat_Hazel_UnlockAllTracks ( void )

Unlock every track, play the sound of a cheat, and set the network menus to state 2.

Ghidra address:
BRD3D: 0x10047500
Ghidra address:
BRGlide: 0x10040930

◆ Cheat_Brielle_UnlockBonusTracks()

void Cheat_Brielle_UnlockBonusTracks ( void )

Unlock the bonus tracks, play the sound of a cheat, and set the network menus to state 2.

Ghidra address:
BRD3D: 0x10047530
Ghidra address:
BRGlide: 0x10040960

◆ Cheat_DisableVehicleDeformation()

void Cheat_DisableVehicleDeformation ( void )

Stop the vehicles deforming, play the sound of this cheat, and set the network menus to state 3.

Ghidra address:
BRD3D: 0x10047560
Ghidra address:
BRGlide: 0x10040990

◆ Cheat_Sophia_EnableOutroSequence()

void Cheat_Sophia_EnableOutroSequence ( void )

Show the closing sequence, play the sound of a cheat, and set the network menus to state 2.

Ghidra address:
BRD3D: 0x10047590
Ghidra address:
BRGlide: 0x100409c0

◆ Cheat_Lynette_UnlockBonusCars()

void Cheat_Lynette_UnlockBonusCars ( void )

Unlock the bonus cars, play the sound of a cheat, and set the network menus to state 2.

Ghidra address:
BRD3D: 0x100475c0
Ghidra address:
BRGlide: 0x100409f0

◆ Cheat_Benjamin_UnlockAllCars()

void Cheat_Benjamin_UnlockAllCars ( void )

Unlock every car, play the sound of a cheat, and set the network menus to state 2.

Ghidra address:
BRD3D: 0x100474d0
Ghidra address:
BRGlide: 0x10040900

◆ ProcessCheatCodeInput()

void ProcessCheatCodeInput ( void )

Add the last character the window received to the characters of the cheats, in lowercase, and apply each cheat whose word they end with.

Ghidra address:
BRD3D: 0x10047610
Ghidra address:
BRGlide: 0x10040a40

◆ CheckCheatCodeMatches()

void CheckCheatCodeMatches ( void )

Apply each cheat whose word the characters of the cheats end with.

Ghidra address:
BRD3D: 0x10047660
Ghidra address:
BRGlide: 0x10040a90

◆ ApplyCarGroupPreset()

void ApplyCarGroupPreset ( void )

Set the cars of the chosen class and choose the first of them, when the class changed since the last call.

An unknown class takes the cars of the first.

Ghidra address:
BRD3D: 0x10044540
Ghidra address:
BRGlide: 0x1003da90

◆ IsCarSelectable()

int IsCarSelectable ( int nCar)

Report whether a car can be chosen in the current mode of the game.

Parameters
nCarThe car.
Returns
Nonzero when the car can be chosen.
Ghidra address:
BRD3D: 0x1003f320
Ghidra address:
BRGlide: 0x10038860

◆ ResetGameModeConfig()

void ResetGameModeConfig ( void )

Reset the track, the weather, the car and its settings, and the input device, to the keyboard, for a new game mode.

Ghidra address:
BRD3D: 0x1003dfc0
Ghidra address:
BRGlide: 0x10037660

◆ FrontEndWindowProc()

LRESULT WINAPI FrontEndWindowProc ( void * pUnused,
HWND hWnd,
UINT nMessage,
WPARAM wParam,
LPARAM lParam )

Give a message of the main window to the front end.

Parameters
pUnusedNot read.
hWndThe main window.
nMessageThe message.
wParamThe first parameter of the message.
lParamThe second parameter of the message.
Returns
The result of the message for the front end.
Ghidra address:
BRD3D: 0x10060060
Ghidra address:
BRGlide: 0x100590d0

◆ LookupKeyCharacter()

char LookupKeyCharacter ( DWORD dwKey)

The character a key of text input types.

Parameters
dwKeyThe key.
Returns
The character, or 0 when the key types none.
Ghidra address:
BRD3D: 0x1005b540
Ghidra address:
BRGlide: 0x10054360

◆ IsTrackSelectable()

unsigned IsTrackSelectable ( int nTrack)

Report a track's selection mask or a cheat override.

Parameters
nTrackThe track menu index.
Returns
Zero when unavailable, otherwise a nonzero mask or one.
Ghidra address:
BRD3D: 0x1003f2b0
Ghidra address:
BRGlide: 0x100387f0

◆ BuildRaceResultsInfoUI()

int BuildRaceResultsInfoUI ( MenuScreen * pScreen)

Build the race-results information screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10052f50
Ghidra address:
BRGlide: 0x1004be00

◆ BuildRaceResultsSummaryUI()

int BuildRaceResultsSummaryUI ( MenuScreen * pScreen)

Build the race-results summary screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10053cf0
Ghidra address:
BRGlide: 0x1004cba0

◆ BuildRaceResultsTotalsUI()

int BuildRaceResultsTotalsUI ( MenuScreen * pScreen)

Build the race-results totals screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10054b50
Ghidra address:
BRGlide: 0x1004da00

◆ BuildResultsSummaryExitSeasonConfirmUI()

int BuildResultsSummaryExitSeasonConfirmUI ( MenuScreen * pScreen)

Build confirmation for exiting a season after the results summary.

Parameters
pScreenThe screen to populate.
Returns
The result of building the confirmation screen.
Ghidra address:
BRD3D: 0x1004a260
Ghidra address:
BRGlide: 0x10043690

◆ BuildSeasonCongratsUI()

int BuildSeasonCongratsUI ( MenuScreen * pScreen)

Build the championship congratulations screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10051990
Ghidra address:
BRGlide: 0x1004a840

◆ BuildNotEnoughPointsUI()

int BuildNotEnoughPointsUI ( MenuScreen * pScreen)

Build the insufficient-points screen after a championship race.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10051d30
Ghidra address:
BRGlide: 0x1004abe0

◆ ShowSeasonCongratsScreen()

int ShowSeasonCongratsScreen ( MenuWidget * pWidget)

Show cached championship congratulations, building the screen on its first visit.

Parameters
pWidgetThe item chosen, unread.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10043260
Ghidra address:
BRGlide: 0x1003c7b0

◆ ShowNotEnoughPointsScreen()

int ShowNotEnoughPointsScreen ( MenuWidget * pWidget)

Show cached championship failure results, building the screen on its first visit.

Parameters
pWidgetThe item chosen, unread.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10043330
Ghidra address:
BRGlide: 0x1003c880

◆ ShowRaceResultsTotalsScreen()

int ShowRaceResultsTotalsScreen ( MenuWidget * pWidget = nullptr)

Show cached race totals, building the screen on its first visit.

Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x100460a0
Ghidra address:
BRGlide: 0x1003f540

◆ ShowRaceResultsSummaryScreen()

int ShowRaceResultsSummaryScreen ( MenuWidget * pWidget = nullptr)

Show cached race summary results and build an exit confirmation on the first visit.

Returns
Whether both initial allocations succeeded, or the summary was already cached.
Ghidra address:
BRD3D: 0x10045f70
Ghidra address:
BRGlide: 0x1003f410

◆ BuildPreRaceInfoUI()

int BuildPreRaceInfoUI ( MenuScreen * pScreen)

Build the pre-race information screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x100509f0
Ghidra address:
BRGlide: 0x100498a0

◆ BuildPreRaceExitSeasonConfirmUI()

int BuildPreRaceExitSeasonConfirmUI ( MenuScreen * pScreen)

Build confirmation for exiting a season before a race.

Parameters
pScreenThe screen to populate.
Returns
The result of building the confirmation screen.
Ghidra address:
BRD3D: 0x10049f40
Ghidra address:
BRGlide: 0x10043370

◆ ShowPreRaceInfoScreen()

int ShowPreRaceInfoScreen ( MenuWidget * pWidget)

Show cached pre-race information and build an exit confirmation on the first visit.

Parameters
pWidgetThe item chosen, unread.
Returns
Whether both initial allocations succeeded, or the information screen was cached.
Ghidra address:
BRD3D: 0x10045c90
Ghidra address:
BRGlide: 0x1003f130

◆ BuildLoadSeasonUI()

int BuildLoadSeasonUI ( MenuScreen * pScreen)

Build the saved-season selection screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x1004f700
Ghidra address:
BRGlide: 0x100485b0

◆ BuildSaveSeasonUI()

int BuildSaveSeasonUI ( MenuScreen * pScreen)

Build the season save-slot screen.

Parameters
pScreenThe screen to populate.
Returns
Always one.
Ghidra address:
BRD3D: 0x10050060
Ghidra address:
BRGlide: 0x10048f10

◆ ShowLoadSeasonMenu()

int ShowLoadSeasonMenu ( MenuWidget * pWidget)

Show cached season loading, building the screen on its first visit.

Parameters
pWidgetNot read.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10045af0
Ghidra address:
BRGlide: 0x1003ef90

◆ ShowSaveSeasonScreen()

int ShowSaveSeasonScreen ( MenuWidget * pWidget)

Show cached season saving, building the screen on its first visit.

Parameters
pWidgetThe item chosen, unread.
Returns
Whether the screen was allocated or already cached.
Ghidra address:
BRD3D: 0x10045bc0
Ghidra address:
BRGlide: 0x1003f060

Variable Documentation

◆ g_dwSelectedDisplayModeIndex

int g_dwSelectedDisplayModeIndex
extern

The selected row in the display-mode list, updated by Direct3D and Glide device selection.

Ghidra address:
BRD3D: 0x10aa2a30
Ghidra address:
BRGlide: 0x10ac5d88

◆ g_dwActiveDisplayModeIndex

int g_dwActiveDisplayModeIndex
extern

The entry of the list of display modes in use.

Ghidra address:
BRD3D: 0x10aa2864
Ghidra address:
BRGlide: 0x10ac5bbc

◆ g_rcMenuDeviceListBox

RECT g_rcMenuDeviceListBox
extern

The menu bounds of the display-device list.

Ghidra address:
BRD3D: 0x100ab528
Ghidra address:
BRGlide: 0x100aacc8

◆ g_adwKeyBindingDuplicateFlags

int g_adwKeyBindingDuplicateFlags[KEY_CONFIG_ENTRY_COUNT]
extern

Flags marking duplicate bindings in each key-configuration row.

Ghidra address:
BRD3D: 0x10a9d5c0
Ghidra address:
BRGlide: 0x10ac4648

◆ g_pActiveMenuScreen

MenuScreen* g_pActiveMenuScreen
extern

The screen of the front end that is showing.

Ghidra address:
BRD3D: 0x10aa2904
Ghidra address:
BRGlide: 0x10ac5c5c

◆ g_pJoinCreateGameMenu

NetworkMenuWidget* g_pJoinCreateGameMenu
extern

The list of sessions of the screen to join or create a network game, while it exists.

Ghidra address:
BRD3D: 0x10aa29d4
Ghidra address:
BRGlide: 0x10ac5d2c

◆ g_pFrontEndScratchBuffer

void* g_pFrontEndScratchBuffer
extern

A buffer of the front end, passed to FrontEndWindowProc() and not read by it.

Ghidra address:
BRD3D: 0x10aa2900
Ghidra address:
BRGlide: 0x10ac5c58

◆ g_aMenuImages

MenuImage g_aMenuImages[MENU_IMAGE_COUNT]
extern

The images of the menus.

Ghidra address:
BRD3D: 0x10a9e360
Ghidra address:
BRGlide: 0x10ac53e8

◆ g_wMenuImageLoadedCount

unsigned short g_wMenuImageLoadedCount
extern

The number of entries of g_aMenuImages loaded.

Ghidra address:
BRD3D: 0x10aa28d4
Ghidra address:
BRGlide: 0x10ac5c2c

◆ g_pRootMenuScreen

MenuScreen* g_pRootMenuScreen
extern

The screen the front end starts at.

Ghidra address:
BRD3D: 0x10aa2908
Ghidra address:
BRGlide: 0x10ac5c60

◆ g_pCachedMenu_RaceSetupNetwork

MenuScreen* g_pCachedMenu_RaceSetupNetwork
extern

The cached screen of the setup of a network race.

Ghidra address:
BRD3D: 0x10aa2950
Ghidra address:
BRGlide: 0x10ac5ca8

◆ g_pCachedMenu_GameplaySettings

MenuScreen* g_pCachedMenu_GameplaySettings
extern

The cached screen of the settings of the game.

Ghidra address:
BRD3D: 0x10aa2984
Ghidra address:
BRGlide: 0x10ac5cdc

◆ g_pCachedMenu_Championship

MenuScreen* g_pCachedMenu_Championship
extern

The cached screen of the championship.

Ghidra address:
BRD3D: 0x10aa2988
Ghidra address:
BRGlide: 0x10ac5ce0

◆ g_pPlayerNameContinueItem

MenuWidget* g_pPlayerNameContinueItem
extern

The item that continues from the name of the player.

Ghidra address:
BRD3D: 0x10aa29a8
Ghidra address:
BRGlide: 0x10ac5d00

◆ g_pMultiplayerGameSetupMenu

MenuWidget* g_pMultiplayerGameSetupMenu
extern

The menu of the setup of a network game.

Ghidra address:
BRD3D: 0x10aa29b8
Ghidra address:
BRGlide: 0x10ac5d10

◆ g_rcMenuCenterPanel

RECT g_rcMenuCenterPanel
extern

Bounds used for the centre panel of the multiplayer session list.

Ghidra address:
BRD3D: 0x100ab448
Ghidra address:
BRGlide: 0x100aabe8

◆ g_rcMenuNetworkPlayers

RECT g_rcMenuNetworkPlayers
extern

Bounds of the network player list beside the session menu.

Ghidra address:
BRD3D: 0x100ab3f8
Ghidra address:
BRGlide: 0x100aab98

◆ g_szSpace

const char g_szSpace[]
extern

A one-space string used by menu labels and the Glide texture cache.

Ghidra address:
BRD3D: 0x100ad300
Ghidra address:
BRGlide: 0x100acad8

◆ g_pSaveTimeAttackMenu

MenuWidget* g_pSaveTimeAttackMenu
extern

The menu to save a time attack.

Ghidra address:
BRD3D: 0x10aa29c4
Ghidra address:
BRGlide: 0x10ac5d1c

◆ g_pSaveTimeAttackEditMenu

MenuItemList* g_pSaveTimeAttackEditMenu
extern

The field of the name of a saved time attack.

Ghidra address:
BRD3D: 0x10aa29d0
Ghidra address:
BRGlide: 0x10ac5d28

◆ g_pNetworkSessionJoinMenu

NetworkMenuWidget* g_pNetworkSessionJoinMenu
extern

The menu to join a network session.

Ghidra address:
BRD3D: 0x10aa29d8
Ghidra address:
BRGlide: 0x10ac5d30

◆ g_pNetworkCarSetupMenu

NetworkMenuWidget* g_pNetworkCarSetupMenu
extern

The menu of the setup of the car of network play.

Ghidra address:
BRD3D: 0x10aa29e0
Ghidra address:
BRGlide: 0x10ac5d38

◆ g_pNetworkPlayerListMenu

MenuWidget* g_pNetworkPlayerListMenu
extern

The list of the players of network play.

Ghidra address:
BRD3D: 0x10aa29e4
Ghidra address:
BRGlide: 0x10ac5d3c

◆ g_pModemContinueItem

MenuWidget* g_pModemContinueItem
extern

The item that continues from the modem screen.

Ghidra address:
BRD3D: 0x10aa29e8
Ghidra address:
BRGlide: 0x10ac5d40

◆ g_pDisplayModeSelectMenu

MenuWidget* g_pDisplayModeSelectMenu
extern

The menu that chooses the display mode.

Ghidra address:
BRD3D: 0x10aa29ec
Ghidra address:
BRGlide: 0x10ac5d44

◆ g_pD3DDeviceSelectMenu

MenuWidget* g_pD3DDeviceSelectMenu
extern

The menu that chooses the Direct3D device.

Ghidra address:
BRD3D: 0x10aa29f0
Ghidra address:
BRGlide: 0x10ac5d48

◆ g_aMenuGlyphRects

RECT g_aMenuGlyphRects[MENU_GLYPH_RECT_COUNT]
extern

The 16 by 16 glyphs of the menus, eight to a row.

Ghidra address:
BRD3D: 0x10a9d180
Ghidra address:
BRGlide: 0x10ac4208

◆ g_aMenuAltGlyphRects

RECT g_aMenuAltGlyphRects[MENU_ALT_GLYPH_RECT_COUNT]
extern

The 39 by 44 glyphs of the menus, five to a row.

Ghidra address:
BRD3D: 0x10a9d638
Ghidra address:
BRGlide: 0x10ac46c0

◆ g_aMenuSprites

MenuSprite g_aMenuSprites[]
extern

The sprites of the menus.

The first is the whole of the loading image.

Ghidra address:
BRD3D: 0x100ab568
Ghidra address:
BRGlide: 0x100aad08

◆ g_dwMenuSurfaceInitCount

int g_dwMenuSurfaceInitCount
extern

The number of times the menu images were loaded.

Every load but the first shows the loading image first.

Ghidra address:
BRD3D: 0x10aa2a6c
Ghidra address:
BRGlide: 0x10ac5dc4

◆ g_pMenuFrameSurface

Rgb565Image* g_pMenuFrameSurface
extern

The frame the menus are drawn into, the size of the frame buffer.

Ghidra address:
BRGlide: 0x10ac5d84

◆ g_dwMenuScreenActivated

int g_dwMenuScreenActivated
extern

Whether ActivateMenuScreen() is entering the screen the game returns to.

Ghidra address:
BRD3D: 0x10aa2878
Ghidra address:
BRGlide: 0x10ac5bd0

◆ g_dwLobbyLaunchHandled

int g_dwLobbyLaunchHandled
extern

Whether the lobby was entered for a game launched from a lobby.

Ghidra address:
BRD3D: 0x10aa2a50
Ghidra address:
BRGlide: 0x10ac5da8

◆ g_dwNetworkMenuState

int g_dwNetworkMenuState
extern

The state of the network menus.

A state of 2 or 3 delays ShutdownFrontEnd().

Ghidra address:
BRD3D: 0x10aa2854
Ghidra address:
BRGlide: 0x10ac5bac

◆ g_dwCheatAllTracksUnlocked

int g_dwCheatAllTracksUnlocked
extern

Whether the cheat that unlocks every track was entered.

Ghidra address:
BRD3D: 0x10aa28f8
Ghidra address:
BRGlide: 0x10ac5c50

◆ g_dwCheatBonusTracksUnlocked

int g_dwCheatBonusTracksUnlocked
extern

Whether the cheat that unlocks the bonus tracks was entered.

Ghidra address:
BRD3D: 0x10aa28fc
Ghidra address:
BRGlide: 0x10ac5c54

◆ g_dwCheatBonusCarsUnlocked

int g_dwCheatBonusCarsUnlocked
extern

Whether the cheat that unlocks the bonus cars was entered.

Ghidra address:
BRD3D: 0x10aa28f4
Ghidra address:
BRGlide: 0x10ac5c4c

◆ g_dwCheatOutroSequenceEnabled

int g_dwCheatOutroSequenceEnabled
extern

Whether the cheat that shows the closing sequence was entered.

Ghidra address:
BRD3D: 0x10aa2a40
Ghidra address:
BRGlide: 0x10ac5d98

◆ g_dwCheatAllCarsUnlocked

int g_dwCheatAllCarsUnlocked
extern

Whether the cheat that unlocks every car was entered.

Ghidra address:
BRD3D: 0x10aa28f0
Ghidra address:
BRGlide: 0x10ac5c48

◆ g_aCheatCodes

CheatCode g_aCheatCodes[CHEAT_CODE_COUNT]
extern

The cheats, ended by an entry without a word.

Ghidra address:
BRD3D: 0x100ac6a8
Ghidra address:
BRGlide: 0x100abe48

◆ g_anCheatInputBuffer

int g_anCheatInputBuffer[CHEAT_INPUT_BUFFER_SIZE]
extern

The last characters typed for the cheats, a ring that wraps at its end.

Ghidra address:
BRD3D: 0x10a9e150
Ghidra address:
BRGlide: 0x10ac51d8

◆ g_dwCheatInputCount

int g_dwCheatInputCount
extern

The entry of g_anCheatInputBuffer the next character fills.

Ghidra address:
BRD3D: 0x10aa2a48
Ghidra address:
BRGlide: 0x10ac5da0

◆ g_dwLastWmCharParam

int g_dwLastWmCharParam
extern

The last character the window received, or 0 once it is read.

Ghidra address:
BRD3D: 0x10aa33e4
Ghidra address:
BRGlide: 0x10ac6744

◆ g_dwSelectedSessionIndex

int g_dwSelectedSessionIndex
extern

The index of the network session chosen in the list of sessions.

Ghidra address:
BRD3D: 0x10aa2880
Ghidra address:
BRGlide: 0x10ac5bd8

◆ g_dwSelectedCdTrack

int g_dwSelectedCdTrack
extern

The track of the CD the menus show, counted from the first music track.

Ghidra address:
BRD3D: 0x10aa2a34
Ghidra address:
BRGlide: 0x10ac5d8c

◆ g_dwSessionListRefreshing

int g_dwSessionListRefreshing
extern

Whether the list of network sessions is refreshing.

No frame is flipped while it refreshes.

Ghidra address:
BRD3D: 0x10aa2874
Ghidra address:
BRGlide: 0x10ac5bcc

◆ g_dwTrackMenuIndex

int g_dwTrackMenuIndex
extern

The chosen track.

Ghidra address:
BRD3D: 0x100ac648
Ghidra address:
BRGlide: 0x100abde8

◆ g_dwSelectedWeather

int g_dwSelectedWeather
extern

The chosen weather.

Ghidra address:
BRD3D: 0x10aa2a00
Ghidra address:
BRGlide: 0x10ac5d58

◆ g_dwUnusedWeatherMenuValue

int g_dwUnusedWeatherMenuValue
extern

An unused value cleared with the menu selections.

Ghidra address:
BRD3D: 0x10aa2a04
Ghidra address:
BRGlide: 0x10ac5d5c

◆ g_dwSelectedCarClass

int g_dwSelectedCarClass
extern

The chosen class of car.

Ghidra address:
BRD3D: 0x10aa2a18
Ghidra address:
BRGlide: 0x10ac5d70

◆ g_ErrorMessageTable

ErrorMessage g_ErrorMessageTable[ERROR_MESSAGE_COUNT]
extern

The errors of the game, indexed by the code of the error.

Ghidra address:
BRD3D: 0x100ac660
Ghidra address:
BRGlide: 0x100abe00

◆ g_KeyNameLookupTable

KeyCharacter g_KeyNameLookupTable[KEY_CHARACTER_COUNT]
extern

The keys of text input, each typing the printable character of its own code.

Ghidra address:
BRD3D: 0x100ace58
Ghidra address:
BRGlide: 0x100ac5f8