coastline 0.0.4
Loading...
Searching...
No Matches
menus.h
Go to the documentation of this file.
1#pragma once
2
8
9#include <array>
10#include <filesystem>
11#include <functional>
12#include <future>
13#include <memory>
14#include <optional>
15#include <span>
16#include <string>
17#include <string_view>
18#include <utility>
19#include <vector>
20
21#include <nlohmann/json.hpp>
22
23#include "config.h"
24#include "configsaver.h"
25#include "frontend.h"
26#include "gamesettings.h"
27#include "menuscreen.h"
28#include "paintshop.h"
29#include "racesession.h"
30#include "trackcatalog.h"
31
32namespace coastline {
33
34class GameConfig;
35class SceneRenderer;
36
65
68 int musicVolume = 10;
69 int sfxVolume = 4;
70 bool speedInMph = true;
71};
72
83
85struct MenuCar {
89 int engineCar = 0;
90 bool exists = false;
91 int driveType = 0;
92 int engineLayout = 0;
93 float acceleration = 0.0f;
94 float maxSpeed = 0.0f;
95 int gearCount = 0;
96 float shadowLength = 0.0f;
97 float shadowHalfWidth = 0.0f;
98 bool championship = true;
99};
100
106
128
140
148
150class Menus {
151public:
172 const std::filesystem::path &release,
173 const std::filesystem::path &saves,
174 const std::filesystem::path &cache,
175 GameConfig &config,
176 const std::filesystem::path &configPath,
177 ConfigSaver &configSaver,
179 std::string_view assetPack = {},
180 std::string_view unitsRegion = {},
181 const nlohmann::json &packSettings = nlohmann::json::object());
185 Menus(const Menus &) = delete;
187 Menus &operator=(const Menus &) = delete;
188
190 void Restart();
191
193 bool IsMainMenu() const {
194 return m_current == Screen::MainMenu;
195 }
196
209 float seconds,
210 const std::array<MenuButtons, 2> &players,
211 bool secondController,
212 const PaintShopInput &pointer);
213
215 bool DrawsPointer() const;
216
218 bool TakesText() const;
219
221 int ControlledPlayers() const;
222
225
232
242 void FinishRace(RaceEnd end, const RaceResults &results, bool sfxVolumeAdjusted = false);
243
246
253 void SetMenuMusic(std::function<void()> play) {
254 m_playMenuMusic = std::move(play);
255 }
256
263 if (m_config) {
264 const auto source = overrides.Get("Game", "SoundEffects")
265 .value_or(m_config->Get("Game", "SoundEffects").value_or("PC"));
266 m_options.sfxVolume = SoundEffectsVolume(*m_config, source == "N64");
268 }
269 if (m_gameSettings) {
270 m_gameSettings->SetOverrides(std::move(overrides));
271 }
272 }
273
274private:
276 enum class Screen {
277 MainMenu,
278 PlayerCountSelect,
279 TrackMenu,
280 WeatherSelect,
281 CarSelect,
282 DataSaveLoadMenu,
283 OptionsMenu,
284 RaceResultsScreen,
285 PaintShopScreen,
286 ControllerConfigScreen
287 };
288
289 explicit Menus(std::unique_ptr<MenuScreen> screen);
290 void SetCurrentScreen(Screen screen);
291 void ProcessMainMenu(SceneRenderer &renderer, float seconds, const MenuButtons &first);
293 void StartTimeAttack();
294 bool LoadPlayerCountItems(SceneRenderer &renderer, const std::filesystem::path &release);
295 void TwoControllersPostDraw(SceneRenderer &renderer, int item) const;
296 void ProcessPlayerCountSelect(SceneRenderer &renderer,
297 float seconds,
298 const MenuButtons &first,
299 bool secondController);
300 bool
301 LoadTrackMenu(SceneRenderer &renderer, const std::filesystem::path &release, bool pcPreviews);
302 void AddRegionalCars(const std::filesystem::path &cache,
304 std::string_view assetPack);
305 void SetTrackFromSeason();
306 void LoadSeasonCars(SceneRenderer &renderer);
307 bool IsTrackUnlocked(int track) const;
308 void LoadExtraTrackRecords();
309 void SetExtraTrackRecords();
310 bool SaveExtraTrackRecords();
312 void TrackMenuPostDraw(SceneRenderer &renderer, int item);
313 void SeasonRecordsPreDraw(SceneRenderer &renderer);
314 void ProcessTrackMenu(SceneRenderer &renderer, float seconds, const MenuButtons &first);
315 bool LoadWeatherItems(SceneRenderer &renderer, const std::filesystem::path &release);
316 bool IsWeatherSelectable(int weather) const;
317 void ProcessWeatherSelect(SceneRenderer &renderer, float seconds, const MenuButtons &first);
318 bool LoadCarSelect(SceneRenderer &renderer, const std::filesystem::path &release);
319 MenuProfile &ProfileOf(int player);
320 bool IsCarUnlocked(int car) const;
321 bool CanPaintCar(int car) const;
322 void LoadCarModel(SceneRenderer &renderer, int slot, int car);
323 void ResetCarPaint(int player);
324 void AdjustCarPaint(SceneRenderer &renderer,
325 int player,
326 const MenuButtons &buttons,
327 std::array<bool, 2> stick);
328 void RepaintCars(SceneRenderer &renderer, int player);
329 void LoadCustomModel(SceneRenderer &renderer, int player);
330 void TakeDecalPaint(int player);
331 void StartCarSelect(SceneRenderer &renderer);
332 void SetCarSelectOptions(int player,
333 const std::vector<MenuItem> &options,
334 const char *name,
335 int cursor);
336 void StepCarSelectOption(int player, const MenuButtons &buttons);
337 void HandleCarSelectInput(SceneRenderer &renderer, int player, const MenuButtons &buttons);
338 void DrawCarStage(SceneRenderer &renderer, const Matrix4 &camera, bool hideChoiceMarker) const;
339 void DrawStageCar(SceneRenderer &renderer,
340 const Matrix4 &camera,
341 const std::array<float, 3> &eye,
342 int slot,
343 float x,
344 float y,
345 float angle,
346 const SDL_Rect &scissor) const;
347 void DrawPlayerStage(SceneRenderer &renderer, int player, int y, int height, float spread);
348 void DrawCarStats(SceneRenderer &renderer, int player, int y, int barY);
349 void DrawCarSelectChoices(SceneRenderer &renderer);
350 void UseCustomDecals(SceneRenderer &renderer, int player);
351 bool RestoreCustomDecals(SceneRenderer &renderer, int player);
352 void RunPakDialog(SceneRenderer &renderer, float seconds);
353 void LoadCarChoices();
354 void SaveCarChoice(int player);
355 void LeaveCarSelect();
356 void ProcessCarSelectScreen(SceneRenderer &renderer,
357 float seconds,
358 const std::array<MenuButtons, 2> &players);
359 void StartRaceResults(SceneRenderer &renderer);
361 std::vector<std::string> AdvanceSeason(MenuProfile &profile) const;
362 void DrawRaceResultsTitle(SceneRenderer &renderer);
363 void DrawPlayerRaceResults(SceneRenderer &renderer, int player);
364 void DrawSeasonResults(SceneRenderer &renderer);
365 void DrawSeasonMessage(SceneRenderer &renderer);
366 void HandleRaceResultsInput(const MenuButtons &buttons);
367 void LeaveRaceResults();
368 void ProcessRaceResultsScreen(SceneRenderer &renderer, float seconds, const MenuButtons &first);
369 bool LoadOptionsItems(SceneRenderer &renderer, const std::filesystem::path &release);
370 void LoadPakData();
371 void ApplyVolumeSettings() const;
372 void SaveConfig();
373 void RememberSpeedUnits();
374 void RememberSfxVolume(bool automatic = false);
375 void ToggleSpeedUnits();
376 bool SaveOptionsNote(int player) const;
377 std::vector<u8> SeasonNote(const MenuProfile &profile) const;
378 bool SaveSeasonNote(const MenuProfile &profile) const;
379 int SaveGhostNote() const;
380 void StartAutoSave();
381 void FinishAutoSave(bool wait);
382 void DrawMessageBox(int x, int y, int width, int height);
383 void SetMessageText();
384 bool ProcessPakDataScreen(SceneRenderer &renderer, int dataType);
385 void OptionsMenuPostDraw(SceneRenderer &renderer, int item);
386 void ProcessOptionsMenu(SceneRenderer &renderer, float seconds, const MenuButtons &first);
387 bool LoadControllerScreen(SceneRenderer &renderer, const std::filesystem::path &release);
388 void DrawControllerLayoutDiagram(SceneRenderer &renderer, int item) const;
389 void
390 ProcessControllerConfigScreen(SceneRenderer &renderer, float seconds, const MenuButtons &first);
392 enum class SaveLoadEntry {
393 MainMenu,
394 Season,
395 TimeAttack,
396 };
397 void StartDataSaveLoadMenu(SaveLoadEntry entry);
398 void DrawShortMessage(int boxX, int boxWidth, int textX, std::string_view text);
399 void DrawSaveLoadChoices();
400 void DrawSaveLoadError(int noteSize);
401 void DrawSaveLoadDone();
402 void DrawConfirmOverwrite();
403 bool ReadSeasonNote(const std::vector<u8> &note, int player, bool otherRetainsEquipment);
404 bool SeasonNoteIsValid(std::span<const u8> note) const;
405 std::optional<std::vector<u8>> ReadSavedNote(const std::string &name) const;
406 bool ReadGhostNote(const std::vector<u8> &note);
407 void KeepTimeAttackRecording(const std::vector<u8> &recording, const std::vector<u8> &frames);
408 bool LoadSaveLoadNote(int player);
409 int SaveSaveLoadNote(int player);
410 void LeaveDataSaveLoadMenu();
411 void ProcessDataSaveLoadMenu(SceneRenderer &renderer, float seconds, const MenuButtons &first);
412
413 std::unique_ptr<MenuScreen> m_screen;
414 std::unique_ptr<PaintShop> m_paintShop;
415 std::filesystem::path m_cache;
416 GameConfig *m_config = nullptr;
417 std::filesystem::path m_configPath;
418 ConfigSaver *m_configSaver = nullptr;
419 PaintShopInput m_pointer;
420 bool m_escapeDown = false;
421 // The decals each player loaded from the Controller Pak on the car select screen, the images
422 // of the car with them, and the model of the car that shows them.
423 std::array<std::optional<DecalCar>, 2> m_customDecals;
424 std::array<std::optional<std::filesystem::path>, 2> m_customDecalImages;
425 std::array<std::unique_ptr<RenderModel>, 2> m_customModels;
426 // The paint and the look each model of m_customModels was loaded in, as m_carModelLooks.
427 std::array<std::array<int, 4>, 2> m_customModelLooks{};
428 int m_pakDialogPlayer = -1;
429 std::filesystem::path m_release;
430 Screen m_current = Screen::MainMenu;
432 GameMode m_gameMode = GameMode::Championship;
433 int m_numLocalPlayers = 1;
434 bool m_paintMode = false;
435 MenuProfile m_profile;
436 float m_frameSeconds = 0.0f;
437 // The custom colours of the text. The console never turns them off once set.
438 std::optional<std::array<int, 6>> m_textCustomColors;
439
440 std::function<void()> m_playMenuMusic;
441 std::vector<MenuItem> m_mainMenuItems;
442 std::string m_mainMenuTitle = "TOP GEAR RALLY";
443 float m_mainMenuIdleTimeout = 20;
444 bool m_mainMenuAttractDemo = false;
445 int m_mainMenuInitState = 0;
446 int m_mainMenuSelection = 0;
447 int m_mainMenuEntrySource = 0;
448 std::size_t m_gamewinCheatProgress = 0;
449 std::uint16_t m_gamewinCheatHeld = 0;
450 bool m_gamewinUnlocked = false;
451
452 std::vector<MenuItem> m_playerCountItems;
453 int m_playerCountSelectState = 0;
454 int m_playerCountSelection = 0;
455
456 std::vector<MenuItem> m_trackMenuItems;
457 std::vector<bool> m_trackExists;
458 std::vector<std::string> m_weatherNames;
459 std::vector<MenuCar> m_cars;
460 std::vector<MenuSeason> m_seasons;
461 int m_numTracks = 0;
462 int m_trackMenuInitState = 0;
463 int m_trackMenuSelection = 0;
464 int m_selectedTrackId = 2;
465 int m_currentWeather = 1;
466 int m_totalLaps = 3;
467 bool m_seasonFirstRace = false;
468 bool m_continueFromResults = false;
469 bool m_trackMenuChampionship = false;
470 bool m_trackMenuPakScreen = false;
471 float m_seasonRecordsBlinkTime = 0.0f;
472 // The console boots with a recording of its header alone.
473 int m_ghostRecordingSize = 8;
474 // Whether the last time attack recorded a new ghost, g_dwSaveAvailable of the console.
475 bool m_ghostSaveAvailable = false;
476
477 std::vector<MenuItem> m_weatherItems;
478 int m_weatherSelectState = 0;
479 int m_weatherMenuSelection = 0;
480
481 std::vector<std::string> m_engineLayouts;
482 std::vector<std::string> m_driveTypes;
483 std::vector<MenuItem> m_handlingOptions;
484 std::vector<MenuItem> m_transmissionOptions;
485 std::vector<MenuItem> m_tiresOptions;
486 std::vector<MenuItem> m_suspensionOptions;
487 std::vector<MenuItem> m_decalOptions;
488 MenuProfile m_secondProfile;
489 std::array<CarSelectPlayer, 2> m_carSelect;
490 std::array<float, 2> m_carSelectAngle{};
491 // The car loaded into each of the four slots of the console, and the models of the cars in the
492 // colour of each of the two vehicles that draw them.
493 std::array<int, 4> m_slotCars{};
494 std::array<std::vector<std::unique_ptr<RenderModel>>, 2> m_carModels;
495 // The paint each model of m_carModels was loaded in, in the 5 bits a channel of
496 // SetMaterialColor(), and 1 after it for the other look. A model a frame drew and a load
497 // replaced is released at the start of the next frame.
498 std::array<std::vector<std::array<int, 4>>, 2> m_carModelLooks;
499 // The highlighted parts of each model of m_carModels in the other look, or none.
500 std::array<std::vector<std::unique_ptr<RenderModel>>, 2> m_carHighlightModels;
501 std::vector<std::unique_ptr<RenderModel>> m_retiredCarModels;
502 // The document of each car the models of both vehicles take, or none before the first load.
503 std::vector<std::shared_ptr<RenderDocument>> m_carDocuments;
504 // The time towards the next frame of the console, whether this frame is one, the frames of
505 // the console since the screen started, and the milliseconds of the last of them.
506 float m_carSelectFrameTime = 0.0f;
507 bool m_carSelectConsoleFrame = false;
508 std::uint64_t m_carSelectConsoleFrames = 0;
509 int m_carSelectFrameMs = 0;
510 // The choice marker of the stage of the cars, the shadow of a car on it, and the reflection of
511 // the sky on the cars.
512 StageMesh m_stageChoiceMarker;
513 StageMesh m_stageShadow;
514 std::unique_ptr<RenderTexture> m_stageReflection;
515 bool m_carSelectInitialized = false;
516 bool m_carSelectDone = false;
517
518 // The results screen, the car select screen of the console in its review mode.
519 RaceResults m_results;
520 bool m_afterSeasonRace = false;
521 bool m_resultsInitialized = false;
522 bool m_resultsDone = false;
523 bool m_seasonResultsShown = false;
524 int m_resultsPage = 0;
525 int m_resultsSeason = 0;
526 int m_resultsRound = 0;
527 int m_resultsTrack = 0;
528 int m_resultsWeather = 0;
529 s32 m_resultsChampionshipFlags = 0;
530 std::vector<std::string> m_seasonMessage;
531
532 // The Controller Pak of the first controller, a directory of the state of the game.
533 ControllerPak m_pak{std::filesystem::path()};
534 MenuOptions m_options;
535 std::vector<MenuItem> m_optionsMenuItems;
536 int m_optionsMenuState = 0;
537 int m_optionsMenuSelection = 0;
538 bool m_optionsChanged = false;
539 bool m_autoSaveFailed = false;
540 bool m_progressAutoSaved = false;
541 // A thread writes the automatic save of the last race. Both flags above are set when the save
542 // finishes.
543 std::future<bool> m_autoSave;
544 std::unique_ptr<GameSettings> m_gameSettings;
545 int m_gameSettingsStart = 0;
546 bool m_settingsPending = false;
547 bool m_reinitializePending = false;
548 bool m_loadConfigurationPending = false;
549 bool m_saveConfigurationPending = false;
550
551 // The screen of the Controller Pak data, and the presses of the frame it reads in place of the
552 // menu under it.
553 MenuButtons m_pakInput;
554 bool m_pakDataInitialized = false;
555 int m_pakDataStep = 0;
556 int m_pakDataWaitFrames = 0;
557 int m_pakError = 0;
558 std::optional<std::vector<u8>> m_pakNote;
559
560 // The controller configuration screen: its items and the pictures of the layouts of the
561 // console.
562 std::vector<MenuItem> m_controllerScreenItems;
563 std::array<std::unique_ptr<RenderTexture>, 5> m_controllerLayoutPictures;
564 int m_controllerScreenInitState = 0;
565 int m_controllerScreenSelection = 0;
566
567 // The save and load menu.
568 SaveLoadEntry m_saveLoadEntry = SaveLoadEntry::MainMenu;
569 bool m_saveLoadInitialized = false;
570 bool m_saveLoadInputEnabled = false;
571 bool m_saveLoadDataWasLoaded = false;
572 int m_saveLoadStep = 0;
573 int m_saveLoadChoice = 0;
574 int m_saveLoadFadeDelayFrames = 0;
575 // The ghost recording of the console, its track and its car first, g_abGhostRecording.
576 std::vector<u8> m_ghostRecording = std::vector<u8>(8);
577 // The frames of the race engine the ghost car plays, recorded with m_ghostRecording, and the
578 // file beside the pak they are saved to with the ghost. A ghost recorded on the console has
579 // none.
580 std::vector<u8> m_ghostFrames;
581 std::filesystem::path m_ghostFramesFile;
582};
583
584} // namespace coastline
s32 IsCarUnlocked(s32 car)
Whether a car may be chosen: unlocked, on the cartridge, and in the paint shop one of the first nine.
void ProcessCarSelectScreen(void)
Run one frame of the car selection screen, or of the results when g_dwIsReviewMode is set.
Attract-demo rotation for one front end.
Definition racedemo.h:29
Writes copies of the configuration on a thread, away from the frames.
Definition configsaver.h:18
The settings of BossRally.ini.
Definition config.h:18
std::optional< std::string > Get(std::string_view section, std::string_view key) const
static std::unique_ptr< Menus > Load(SceneRenderer &renderer, const std::filesystem::path &release, const std::filesystem::path &saves, const std::filesystem::path &cache, GameConfig &config, const std::filesystem::path &configPath, ConfigSaver &configSaver, std::span< const std::filesystem::path > dataRoots={}, std::string_view assetPack={}, std::string_view unitsRegion={}, const nlohmann::json &packSettings=nlohmann::json::object())
Read the assets of the menu screens and the items of each screen.
int ControlledPlayers() const
Menus(const Menus &)=delete
Prevent copying active front-end resources and screen progress.
MenusEnd Frame(SceneRenderer &renderer, float seconds, const std::array< MenuButtons, 2 > &players, bool secondController, const PaintShopInput &pointer)
Run a frame of the screen that shows and draw it.
void SetOptionOverrides(GameConfig overrides)
Display temporary command-line values and disable matching Options entries.
Definition menus.h:262
void FinishRace(RaceEnd end, const RaceResults &results, bool sfxVolumeAdjusted=false)
Go on from a race that Frame() started, as FinishRace() of the console goes on: to the results screen...
~Menus()
Release front-end resources before the configuration and renderer are destroyed.
std::optional< std::filesystem::path > CarImages(int car) const
bool IsMainMenu() const
Definition menus.h:193
bool TakesText() const
void FinishCredits()
Show the options menu again after the race of the credits it started.
void SetMenuMusic(std::function< void()> play)
Set the routine that starts the music module of the menus, which the main menu calls as it opens afte...
Definition menus.h:253
RaceSetup ChosenRace() const
bool DrawsPointer() const
Menus & operator=(const Menus &)=delete
Prevent assignment of active front-end resources and screen progress.
void Restart()
Show the main menu again, as the splash screens and the attract demo switch to it.
The renderer of a frame.
Definition scenerenderer.h:467
void ProcessControllerConfigScreen(void)
Run one frame of the controller screen of the player who opened the options.
void DrawControllerLayoutDiagram(s32 layout)
Draw the picture of a button layout with the action of each button.
s32 ProcessPakDataScreen(s32 dataType, u8 quiet)
Run one frame of the screen that loads or saves data on a Controller Pak.
void ProcessTrackMenu(void)
Run one frame of the track menu: set it up on its first frame, then act on its items.
void ProcessMainMenu(void)
Run one frame of the main menu.
void ProcessOptionsMenu(void)
Run one frame of the options menu.
void ProcessDataSaveLoadMenu(void)
Run one frame of the save and load menu.
void ProcessRaceResultsScreen(void)
Run one frame of the results of a race, on the car selection screen.
void StartTimeAttack(void)
Start a time attack for one player.
void StartChampionshipRace(void)
Start the next race of the championship for one player.
The menu screen of the Nintendo 64 release that every menu shares, ProcessScreenState() of the consol...
Definition assetimport.h:11
MenusEnd
Where the menus go next.
Definition menus.h:130
@ Splash
Definition menus.h:133
@ Race
Definition menus.h:135
@ Running
Definition menus.h:131
@ Credits
Definition menus.h:136
@ Reinitialize
Definition menus.h:138
@ ApplySettings
Definition menus.h:137
GameMode
The modes of the game, as g_dwGameMode of the console.
Definition menus.h:142
@ Practice
Definition menus.h:146
@ TimeAttack
Definition menus.h:145
@ Championship
Definition menus.h:143
@ Arcade
Definition menus.h:144
std::array< float, 16 > Matrix4
A 4 by 4 matrix, column by column.
Definition scenerenderer.h:28
@ Quit
Definition setupwizard.h:180
@ Running
Definition setupwizard.h:179
int SoundEffectsVolume(const GameConfig &config, bool n64)
Resolve SFX volume from a manual preference or the selected sample source.
RaceEnd
How a race ends.
Definition racesession.h:103
@ MainMenu
Definition intro.h:32
void OptionsMenuPostDraw(s32 item)
Draw the hint of the volume items, and run the screen that loads or saves the configuration while the...
void ApplyVolumeSettings(void)
Apply the music and effect volumes of the options.
void ProcessPlayerCountSelect(void)
Run one frame of the player count screen.
void SetTrackFromSeason(void)
Choose the track of the next race of the championship.
void ProcessSeasonResults(void)
Score championship progress and unlock bonuses when the season's points qualify.
void TrackMenuPostDraw(s32 item)
Draw the hints of the track menu, and run the screen of the controller pak while it is shown,...
void ValidateChampionshipProgress(void)
Reset the progress of the championship of the first player when its season, its round or its flags ar...
s32 IsTrackUnlocked(s32 track)
Whether a track may be chosen: in the championship only the track of the next race,...
A race of the menus of the Nintendo 64 release, run by the race engine of the PC release: the choices...
The space, the fades, and the sounds the splash screens and the menus of the console share.
The paint shop of the Nintendo 64 release, ProcessPaintShopScreen() of the console,...
A season of the championship.
Definition seasons.h:17
The choices of a player on the car select screen, the per-player state of the console.
Definition menus.h:108
int optionCount
Definition menus.h:112
bool customDecals
Definition menus.h:119
std::string category
Definition menus.h:114
std::array< u8, 3 > paint
Definition menus.h:120
int selectedCar
Definition menus.h:117
int carModel
Definition menus.h:118
std::array< int, 2 > stickRepeat
The milliseconds of the stick held up and down before it presses again, as the repeatUp and repeatDow...
Definition menus.h:126
float slide
Definition menus.h:115
int cursor
Definition menus.h:110
int slot
Definition menus.h:116
int state
Definition menus.h:109
const std::vector< MenuItem > * options
Definition menus.h:113
int prevCursor
Definition menus.h:111
bool otherLook
Definition menus.h:121
A car the players can choose, as g_aCarModels of the console records it.
Definition menus.h:85
int gearCount
Definition menus.h:95
int engineLayout
Definition menus.h:92
std::filesystem::path preview
Definition menus.h:88
std::string name
Definition menus.h:86
std::string directory
Definition menus.h:87
float shadowHalfWidth
Definition menus.h:97
float acceleration
Definition menus.h:93
bool exists
Definition menus.h:90
int engineCar
Definition menus.h:89
float shadowLength
Definition menus.h:96
bool championship
Definition menus.h:98
int driveType
Definition menus.h:91
float maxSpeed
Definition menus.h:94
The settings of the options menu, as OptionSettings of the console.
Definition menus.h:67
bool speedInMph
Definition menus.h:70
int musicVolume
Definition menus.h:68
int sfxVolume
Definition menus.h:69
The parts of the profile of a player of the console the menus read, as InitPlayerProfileDefaults() of...
Definition menus.h:41
u8 round
Definition menus.h:50
int controllerLayout
Definition menus.h:63
u16 unlocks
Definition menus.h:60
std::array< f32, MENU_TRACK_COUNT > lapRecords
Definition menus.h:57
u8 season
Definition menus.h:49
u16 unlockedWeathers
Definition menus.h:62
int tires
Definition menus.h:44
std::array< std::array< u8, 4 >, 6 > seasonPlaces
The place of each race of each season, from 0 for the winner.
Definition menus.h:53
int suspension
Definition menus.h:45
std::array< std::array< f32, 4 >, 6 > seasonTimes
The time of each race of each season, in seconds.
Definition menus.h:55
std::array< f32, MENU_TRACK_COUNT > raceRecords
Definition menus.h:59
std::array< u16, 6 > seasonPoints
Definition menus.h:51
int handling
Definition menus.h:42
u16 unlockedTracks
Definition menus.h:61
int transmission
Definition menus.h:43
s32 championshipFlags
The progress of the championship across its years, bit 0 set while the seasons race the tracks mirror...
Definition menus.h:48
A season of the championship, as g_SeasonTable of the console records it.
Definition menus.h:74
std::string subtitle
Definition menus.h:76
std::array< int, 2 > cars
Definition menus.h:80
int pointsNeeded
Definition menus.h:78
std::string name
Definition menus.h:75
std::array< std::array< int, 2 >, 4 > races
Definition menus.h:81
int unlocks
Definition menus.h:79
int raceCount
Definition menus.h:77
The input of the player of the paint shop for a frame.
Definition paintshop.h:52
The results of a race, as the race engine records them.
Definition racesession.h:90
What a race is, in the terms of the race engine.
Definition racesession.h:44
The shaded triangles of a display list of the stage of the cars.
Definition menus.h:102
std::vector< StageVertex > vertices
Definition menus.h:103
std::vector< std::array< int, 3 > > triangles
Definition menus.h:104
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18
T value_or(T... args)
void ProcessWeatherSelect(void)
Run one frame of the weather selection screen.
s32 IsWeatherSelectable(s32 weather)
Return whether a weather may be chosen.