diff --git a/src/openrct2-ui/CursorRepository.cpp b/src/openrct2-ui/CursorRepository.cpp index ce6a895fd5..9a98428c9b 100644 --- a/src/openrct2-ui/CursorRepository.cpp +++ b/src/openrct2-ui/CursorRepository.cpp @@ -28,7 +28,7 @@ CursorRepository::~CursorRepository() void CursorRepository::LoadCursors() { - SetCursorScale(static_cast(round(Config::Get().general.WindowScale))); + SetCursorScale(static_cast(round(Config::Get().general.windowScale))); SetCurrentCursor(CursorID::Arrow); } diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 3c75079196..329845ae29 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -198,12 +198,12 @@ public: // Set window size UpdateFullscreenResolutions(); Resolution resolution = GetClosestResolution( - Config::Get().general.FullscreenWidth, Config::Get().general.FullscreenHeight); + Config::Get().general.fullscreenWidth, Config::Get().general.fullscreenHeight); SDL_SetWindowSize(_window, resolution.Width, resolution.Height); } else if (mode == FullscreenMode::windowed) { - SDL_SetWindowSize(_window, Config::Get().general.WindowWidth, Config::Get().general.WindowHeight); + SDL_SetWindowSize(_window, Config::Get().general.windowWidth, Config::Get().general.windowHeight); } if (SDL_SetWindowFullscreen(_window, windowFlags)) @@ -374,16 +374,16 @@ public: { // Update default display index int32_t displayIndex = SDL_GetWindowDisplayIndex(_window); - if (displayIndex != Config::Get().general.DefaultDisplay) + if (displayIndex != Config::Get().general.defaultDisplay) { - Config::Get().general.DefaultDisplay = displayIndex; + Config::Get().general.defaultDisplay = displayIndex; Config::Save(); } break; } } - if (Config::Get().sound.audio_focus) + if (Config::Get().sound.audioFocus) { if (e.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) { @@ -396,8 +396,8 @@ public: } break; case SDL_MOUSEMOTION: - _cursorState.position = { static_cast(e.motion.x / Config::Get().general.WindowScale), - static_cast(e.motion.y / Config::Get().general.WindowScale) }; + _cursorState.position = { static_cast(e.motion.x / Config::Get().general.windowScale), + static_cast(e.motion.y / Config::Get().general.windowScale) }; break; case SDL_MOUSEWHEEL: if (_inGameConsole.IsOpen()) @@ -413,8 +413,8 @@ public: { break; } - ScreenCoordsXY mousePos = { static_cast(e.button.x / Config::Get().general.WindowScale), - static_cast(e.button.y / Config::Get().general.WindowScale) }; + ScreenCoordsXY mousePos = { static_cast(e.button.x / Config::Get().general.windowScale), + static_cast(e.button.y / Config::Get().general.windowScale) }; switch (e.button.button) { case SDL_BUTTON_LEFT: @@ -449,8 +449,8 @@ public: { break; } - ScreenCoordsXY mousePos = { static_cast(e.button.x / Config::Get().general.WindowScale), - static_cast(e.button.y / Config::Get().general.WindowScale) }; + ScreenCoordsXY mousePos = { static_cast(e.button.x / Config::Get().general.windowScale), + static_cast(e.button.y / Config::Get().general.windowScale) }; switch (e.button.button) { case SDL_BUTTON_LEFT: @@ -604,7 +604,7 @@ public: { char scaleQualityBuffer[4]; _scaleQuality = ScaleQuality::SmoothNearestNeighbour; - if (Config::Get().general.WindowScale == std::floor(Config::Get().general.WindowScale)) + if (Config::Get().general.windowScale == std::floor(Config::Get().general.windowScale)) { _scaleQuality = ScaleQuality::NearestNeighbour; } @@ -624,10 +624,10 @@ public: void CreateWindow() override { - SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, Config::Get().general.MinimizeFullscreenFocusLoss ? "1" : "0"); + SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, Config::Get().general.minimizeFullscreenFocusLoss ? "1" : "0"); // Set window position to default display - int32_t defaultDisplay = std::clamp(Config::Get().general.DefaultDisplay, 0, 0xFFFF); + int32_t defaultDisplay = std::clamp(Config::Get().general.defaultDisplay, 0, 0xFFFF); auto windowPos = ScreenCoordsXY{ static_cast(SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay)), static_cast(SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay)) }; @@ -770,7 +770,7 @@ private: void InferDisplayDPI() { auto& config = Config::Get().general; - if (!config.InferDisplayDPI) + if (!config.inferDisplayDPI) return; int wWidth, wHeight; @@ -779,9 +779,9 @@ private: auto renderer = SDL_GetRenderer(_window); int rWidth, rHeight; if (SDL_GetRendererOutputSize(renderer, &rWidth, &rHeight) == 0) - config.WindowScale = rWidth / wWidth; + config.windowScale = rWidth / wWidth; - config.InferDisplayDPI = false; + config.inferDisplayDPI = false; Config::Save(); } @@ -797,8 +797,8 @@ private: emscripten_get_canvas_element_size("!canvas", &width, &height); #else // Get saved window size - int32_t width = Config::Get().general.WindowWidth; - int32_t height = Config::Get().general.WindowHeight; + int32_t width = Config::Get().general.windowWidth; + int32_t height = Config::Get().general.windowHeight; #endif if (width <= 0) width = 640; @@ -807,7 +807,7 @@ private: // Create window in window first rather than fullscreen so we have the display the window is on first uint32_t flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI; - if (Config::Get().general.DrawingEngine == DrawingEngine::OpenGL) + if (Config::Get().general.drawingEngine == DrawingEngine::OpenGL) { flags |= SDL_WINDOW_OPENGL; } @@ -821,7 +821,7 @@ private: ApplyScreenSaverLockSetting(); SDL_SetWindowMinimumSize(_window, 720, 480); - SetCursorTrap(Config::Get().general.TrapCursor); + SetCursorTrap(Config::Get().general.trapCursor); _platformUiContext->SetWindowIcon(_window); // Initialise the surface, palette and draw buffer @@ -831,15 +831,15 @@ private: UpdateFullscreenResolutions(); - SetFullscreenMode(static_cast(Config::Get().general.FullscreenMode)); + SetFullscreenMode(static_cast(Config::Get().general.fullscreenMode)); TriggerResize(); } void OnResize(int32_t width, int32_t height) { // Scale the native window size to the game's canvas size - _width = static_cast(width / Config::Get().general.WindowScale); - _height = static_cast(height / Config::Get().general.WindowScale); + _width = static_cast(width / Config::Get().general.windowScale); + _height = static_cast(height / Config::Get().general.windowScale); DrawingEngineResize(); @@ -861,10 +861,10 @@ private: if (!(flags & nonWindowFlags)) { - if (width != Config::Get().general.WindowWidth || height != Config::Get().general.WindowHeight) + if (width != Config::Get().general.windowWidth || height != Config::Get().general.windowHeight) { - Config::Get().general.WindowWidth = width; - Config::Get().general.WindowHeight = height; + Config::Get().general.windowWidth = width; + Config::Get().general.windowHeight = height; Config::Save(); } } @@ -911,10 +911,10 @@ private: // Update config fullscreen resolution if not set if (!resolutions.empty() - && (Config::Get().general.FullscreenWidth == -1 || Config::Get().general.FullscreenHeight == -1)) + && (Config::Get().general.fullscreenWidth == -1 || Config::Get().general.fullscreenHeight == -1)) { - Config::Get().general.FullscreenWidth = resolutions.back().Width; - Config::Get().general.FullscreenHeight = resolutions.back().Height; + Config::Get().general.fullscreenWidth = resolutions.back().Width; + Config::Get().general.fullscreenHeight = resolutions.back().Height; } _fsResolutions = resolutions; diff --git a/src/openrct2-ui/WindowManager.cpp b/src/openrct2-ui/WindowManager.cpp index 82dcab401c..b71e0d78d5 100644 --- a/src/openrct2-ui/WindowManager.cpp +++ b/src/openrct2-ui/WindowManager.cpp @@ -182,7 +182,7 @@ public: case WindowView::financesResearch: return FinancesResearchOpen(); case WindowView::rideResearch: - if (Config::Get().interface.ToolbarShowResearch) + if (Config::Get().interface.toolbarShowResearch) { return this->OpenWindow(WindowClass::research); } @@ -855,7 +855,7 @@ public: // Check if there are any window slots left // include kWindowLimitReserved for items such as the main viewport and toolbars to not appear to be counted. - if (gWindowList.size() >= static_cast(Config::Get().general.WindowLimit + kWindowLimitReserved)) + if (gWindowList.size() >= static_cast(Config::Get().general.windowLimit + kWindowLimitReserved)) { // Close least recently used window for (auto& w : gWindowList) diff --git a/src/openrct2-ui/audio/AudioMixer.cpp b/src/openrct2-ui/audio/AudioMixer.cpp index e7e72fa33e..01a7de4bde 100644 --- a/src/openrct2-ui/audio/AudioMixer.cpp +++ b/src/openrct2-ui/audio/AudioMixer.cpp @@ -146,8 +146,8 @@ void AudioMixer::GetNextAudioChunk(uint8_t* dst, size_t length) else { auto group = channel->GetGroup(); - if ((group != MixerGroup::Sound || Config::Get().sound.SoundEnabled) && Config::Get().sound.MasterSoundEnabled - && Config::Get().sound.MasterVolume != 0) + if ((group != MixerGroup::Sound || Config::Get().sound.soundEnabled) && Config::Get().sound.masterSoundEnabled + && Config::Get().sound.masterVolume != 0) { MixChannel(channel.get(), dst, length); } @@ -159,14 +159,14 @@ void AudioMixer::GetNextAudioChunk(uint8_t* dst, size_t length) void AudioMixer::UpdateAdjustedSound() { // Did the volume level get changed? Recalculate level in this case. - if (_settingSoundVolume != Config::Get().sound.SoundVolume) + if (_settingSoundVolume != Config::Get().sound.soundVolume) { - _settingSoundVolume = Config::Get().sound.SoundVolume; + _settingSoundVolume = Config::Get().sound.soundVolume; _adjustSoundVolume = powf(static_cast(_settingSoundVolume) / 100.f, 10.f / 6.f); } - if (_settingMusicVolume != Config::Get().sound.AudioFocus) + if (_settingMusicVolume != Config::Get().sound.rideMusicVolume) { - _settingMusicVolume = Config::Get().sound.AudioFocus; + _settingMusicVolume = Config::Get().sound.rideMusicVolume; _adjustMusicVolume = powf(static_cast(_settingMusicVolume) / 100.f, 10.f / 6.f); } } @@ -297,7 +297,7 @@ void AudioMixer::ApplyPan(const IAudioChannel* channel, void* buffer, size_t len int32_t AudioMixer::ApplyVolume(const IAudioChannel* channel, void* buffer, size_t len) { float volumeAdjust = _volume; - volumeAdjust *= Config::Get().sound.MasterSoundEnabled ? (static_cast(Config::Get().sound.MasterVolume) / 100.0f) + volumeAdjust *= Config::Get().sound.masterSoundEnabled ? (static_cast(Config::Get().sound.masterVolume) / 100.0f) : 0.0f; switch (channel->GetGroup()) diff --git a/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp index 0a0186f1b0..f58f25f74b 100644 --- a/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp @@ -153,7 +153,7 @@ public: SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaleQualityBuffer); - uint32_t scale = std::ceil(Config::Get().general.WindowScale); + uint32_t scale = std::ceil(Config::Get().general.windowScale); _scaledScreenTexture = SDL_CreateTexture( _sdlRenderer, pixelFormat, SDL_TEXTUREACCESS_TARGET, width * scale, height * scale); @@ -186,7 +186,7 @@ public: _paletteHWMapped[i] = SDL_MapRGB(_screenTextureFormat, palette[i].Red, palette[i].Green, palette[i].Blue); } - if (Config::Get().general.EnableLightFx) + if (Config::Get().general.enableLightFx) { auto& lightPalette = LightFx::GetPalette(); for (int32_t i = 0; i < 256; i++) @@ -235,7 +235,7 @@ private: { auto* viewport = WindowGetViewport(WindowGetMain()); - if (Config::Get().general.EnableLightFx && viewport != nullptr) + if (Config::Get().general.enableLightFx && viewport != nullptr) { void* pixels; int32_t pitch; @@ -351,8 +351,8 @@ private: SDL_GetWindowSize(_window, &windowX, &windowY); SDL_GetRendererOutputSize(_sdlRenderer, &renderX, &renderY); - float scaleX = Config::Get().general.WindowScale * renderX / static_cast(windowX); - float scaleY = Config::Get().general.WindowScale * renderY / static_cast(windowY); + float scaleX = Config::Get().general.windowScale * renderX / static_cast(windowX); + float scaleY = Config::Get().general.windowScale * renderY / static_cast(windowY); SDL_SetRenderDrawBlendMode(_sdlRenderer, SDL_BLENDMODE_BLEND); for (uint32_t y = 0; y < _invalidationGrid.getRowCount(); y++) diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index 01221e9941..7fd40749ab 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -613,7 +613,7 @@ private: } if (GetContext()->GetUiContext().GetScaleQuality() == ScaleQuality::SmoothNearestNeighbour) { - uint32_t scale = std::ceil(Config::Get().general.WindowScale); + uint32_t scale = std::ceil(Config::Get().general.windowScale); _smoothScaleFramebuffer = std::make_unique(_width * scale, _height * scale, false, false); } } diff --git a/src/openrct2-ui/input/InputManager.cpp b/src/openrct2-ui/input/InputManager.cpp index ffe9fd0f20..6f2d5a8bdd 100644 --- a/src/openrct2-ui/input/InputManager.cpp +++ b/src/openrct2-ui/input/InputManager.cpp @@ -263,7 +263,7 @@ void InputManager::handleViewScrolling() } // Mouse edge scrolling - if (Config::Get().general.EdgeScrolling) + if (Config::Get().general.edgeScrolling) { if (InputGetState() != InputState::Normal) return; @@ -299,7 +299,7 @@ void InputManager::handleModifiers() } #endif - if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Off) { if (isModifierKeyPressed(ModifierKey::ctrl) || isModifierKeyPressed(ModifierKey::shift)) VirtualFloorEnable(); diff --git a/src/openrct2-ui/input/MouseInput.cpp b/src/openrct2-ui/input/MouseInput.cpp index cbf5833de6..652ae9492b 100644 --- a/src/openrct2-ui/input/MouseInput.cpp +++ b/src/openrct2-ui/input/MouseInput.cpp @@ -233,8 +233,8 @@ namespace OpenRCT2 windowMgr->InvalidateByNumber(w->classification, w->number); ScreenCoordsXY fixedCursorPosition = { - static_cast(std::ceil(gInputDragLast.x * Config::Get().general.WindowScale)), - static_cast(std::ceil(gInputDragLast.y * Config::Get().general.WindowScale)) + static_cast(std::ceil(gInputDragLast.x * Config::Get().general.windowScale)), + static_cast(std::ceil(gInputDragLast.y * Config::Get().general.windowScale)) }; ContextSetCursorPosition(fixedCursorPosition); @@ -492,7 +492,7 @@ namespace OpenRCT2 { int32_t snapProximity; - snapProximity = (w.flags.has(WindowFlag::noSnapping)) ? 0 : Config::Get().general.WindowSnapProximity; + snapProximity = (w.flags.has(WindowFlag::noSnapping)) ? 0 : Config::Get().general.windowSnapProximity; WindowMoveAndSnap(w, newScreenCoords - lastScreenCoords, snapProximity); } @@ -547,7 +547,7 @@ namespace OpenRCT2 _ticksSinceDragStart = gCurrentRealTimeTicks; auto cursorPosition = ContextGetCursorPosition(); gInputDragLast = cursorPosition; - if (!Config::Get().general.InvertViewportDrag) + if (!Config::Get().general.invertViewportDrag) { ContextHideCursor(); } @@ -608,7 +608,7 @@ namespace OpenRCT2 differentialCoords.x = posX ? -differentialCoords.x : differentialCoords.x; differentialCoords.y = posY ? -differentialCoords.y : differentialCoords.y; - if (Config::Get().general.InvertViewportDrag) + if (Config::Get().general.invertViewportDrag) { w->savedViewPos -= differentialCoords; } @@ -621,7 +621,7 @@ namespace OpenRCT2 #ifndef __EMSCRIPTEN__ const CursorState* cursorState = ContextGetCursorState(); - if (cursorState->touch || Config::Get().general.InvertViewportDrag) + if (cursorState->touch || Config::Get().general.invertViewportDrag) { gInputDragLast = newDragCoords; } @@ -1634,7 +1634,7 @@ namespace OpenRCT2 if (viewport == nullptr) return; - const int32_t speed = Config::Get().general.EdgeScrollingSpeed; + const int32_t speed = Config::Get().general.edgeScrollingSpeed; int32_t multiplier = viewport->zoom.ApplyTo(speed); int32_t dx = scrollScreenCoords.x * multiplier; diff --git a/src/openrct2-ui/input/Shortcuts.cpp b/src/openrct2-ui/input/Shortcuts.cpp index f04f523d40..df517933d3 100644 --- a/src/openrct2-ui/input/Shortcuts.cpp +++ b/src/openrct2-ui/input/Shortcuts.cpp @@ -457,7 +457,7 @@ static void ShortcutOpenSceneryPicker() static void ShortcutScaleUp() { - Config::Get().general.WindowScale += 0.25f; + Config::Get().general.windowScale += 0.25f; Config::Save(); GfxInvalidateScreen(); ContextTriggerResize(); @@ -466,8 +466,8 @@ static void ShortcutScaleUp() static void ShortcutScaleDown() { - Config::Get().general.WindowScale -= 0.25f; - Config::Get().general.WindowScale = std::max(0.5f, Config::Get().general.WindowScale); + Config::Get().general.windowScale -= 0.25f; + Config::Get().general.windowScale = std::max(0.5f, Config::Get().general.windowScale); Config::Save(); GfxInvalidateScreen(); ContextTriggerResize(); @@ -623,7 +623,7 @@ static void ShortcutToggleConsole() { console.Toggle(); } - else if (Config::Get().general.DebuggingTools && !ContextIsInputActive()) + else if (Config::Get().general.debuggingTools && !ContextIsInputActive()) { WindowCancelTextbox(); console.Toggle(); @@ -737,7 +737,7 @@ static void ShortcutToggleTransparentWater() if (gLegacyScene == LegacyScene::titleSequence) return; - Config::Get().general.TransparentWater ^= 1; + Config::Get().general.transparentWater ^= 1; Config::Save(); GfxInvalidateScreen(); } @@ -827,7 +827,7 @@ void ShortcutManager::registerDefaultShortcuts() registerShortcut(ShortcutId::kInterfaceOpenTransparencyOptions, STR_SHORTCUT_OPEN_TRANSPARENCY_OPTIONS, "CTRL+T", ShortcutOpenTransparencyWindow); registerShortcut(ShortcutId::kInterfaceOpenCheats, STR_SHORTCUT_OPEN_CHEATS_WINDOW, "CTRL+ALT+C", ShortcutOpenCheatWindow); registerShortcut(ShortcutId::kInterfaceOpenTileInspector, STR_SHORTCUT_OPEN_TILE_INSPECTOR, []() { - if (Config::Get().interface.ToolbarShowCheats) + if (Config::Get().interface.toolbarShowCheats) { OpenWindow(WindowClass::tileInspector); } diff --git a/src/openrct2-ui/interface/FileBrowser.cpp b/src/openrct2-ui/interface/FileBrowser.cpp index 8618e966b5..ab7a0539c3 100644 --- a/src/openrct2-ui/interface/FileBrowser.cpp +++ b/src/openrct2-ui/interface/FileBrowser.cpp @@ -62,7 +62,7 @@ namespace OpenRCT2::Ui::FileBrowser auto& config = Config::Get().general; // Open system file picker? - if (config.UseNativeBrowseDialog && hasFilePicker) + if (config.useNativeBrowseDialog && hasFilePicker) { const bool isSave = (action == LoadSaveAction::save); const auto defaultDirectory = GetDir(type); @@ -84,7 +84,7 @@ namespace OpenRCT2::Ui::FileBrowser if (a.type != b.type) return EnumValue(a.type) - EnumValue(b.type) < 0; - switch (Config::Get().general.LoadSaveSort) + switch (Config::Get().general.loadSaveSort) { case FileBrowserSort::NameAscending: return String::logicalCmp(a.name.c_str(), b.name.c_str()) < 0; @@ -123,16 +123,16 @@ namespace OpenRCT2::Ui::FileBrowser switch (type) { case LoadSaveType::park: - return Config::Get().general.LastSaveGameDirectory; + return Config::Get().general.lastSaveGameDirectory; case LoadSaveType::landscape: - return Config::Get().general.LastSaveLandscapeDirectory; + return Config::Get().general.lastSaveLandscapeDirectory; case LoadSaveType::scenario: - return Config::Get().general.LastSaveScenarioDirectory; + return Config::Get().general.lastSaveScenarioDirectory; case LoadSaveType::track: - return Config::Get().general.LastSaveTrackDirectory; + return Config::Get().general.lastSaveTrackDirectory; default: return u8string(); @@ -257,7 +257,7 @@ namespace OpenRCT2::Ui::FileBrowser { case (LoadSaveType::park): { - SetAndSaveConfigPath(Config::Get().general.LastSaveGameDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.lastSaveGameDirectory, pathBuffer); if (GetContext()->LoadParkFromFile(pathBuffer)) { InvokeCallback(ModalResult::ok, pathBuffer); @@ -278,7 +278,7 @@ namespace OpenRCT2::Ui::FileBrowser } case (LoadSaveType::landscape): { - SetAndSaveConfigPath(Config::Get().general.LastSaveLandscapeDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.lastSaveLandscapeDirectory, pathBuffer); if (Editor::LoadLandscape(pathBuffer)) { gCurrentLoadedPath = pathBuffer; @@ -295,12 +295,12 @@ namespace OpenRCT2::Ui::FileBrowser } case (LoadSaveType::scenario): { - SetAndSaveConfigPath(Config::Get().general.LastSaveScenarioDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.lastSaveScenarioDirectory, pathBuffer); int32_t parkFlagsBackup = gameState.park.flags; gameState.park.flags &= ~PARK_FLAGS_SPRITES_INITIALISED; gameState.editorStep = EditorStep::Invalid; gameState.scenarioFileName = std::string(String::toStringView(pathBuffer, std::size(pathBuffer))); - int32_t success = ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2); + int32_t success = ScenarioSave(gameState, pathBuffer, Config::Get().general.savePluginData ? 3 : 2); gameState.park.flags = parkFlagsBackup; if (success) @@ -321,7 +321,7 @@ namespace OpenRCT2::Ui::FileBrowser } case (LoadSaveType::track): { - SetAndSaveConfigPath(Config::Get().general.LastSaveTrackDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.lastSaveTrackDirectory, pathBuffer); auto intent = Intent(WindowClass::installTrack); intent.PutExtra(INTENT_EXTRA_PATH, std::string{ pathBuffer }); ContextOpenIntent(&intent); @@ -344,8 +344,8 @@ namespace OpenRCT2::Ui::FileBrowser { case LoadSaveType::park: { - SetAndSaveConfigPath(Config::Get().general.LastSaveGameDirectory, pathBuffer); - if (ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 1 : 0)) + SetAndSaveConfigPath(Config::Get().general.lastSaveGameDirectory, pathBuffer); + if (ScenarioSave(gameState, pathBuffer, Config::Get().general.savePluginData ? 1 : 0)) { gScenarioSavePath = pathBuffer; gCurrentLoadedPath = pathBuffer; @@ -366,9 +366,9 @@ namespace OpenRCT2::Ui::FileBrowser } case LoadSaveType::landscape: { - SetAndSaveConfigPath(Config::Get().general.LastSaveLandscapeDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.lastSaveLandscapeDirectory, pathBuffer); gameState.scenarioFileName = std::string(String::toStringView(pathBuffer, std::size(pathBuffer))); - if (ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2)) + if (ScenarioSave(gameState, pathBuffer, Config::Get().general.savePluginData ? 3 : 2)) { gCurrentLoadedPath = pathBuffer; windowMgr->CloseByClass(WindowClass::loadsave); @@ -384,12 +384,12 @@ namespace OpenRCT2::Ui::FileBrowser } case LoadSaveType::scenario: { - SetAndSaveConfigPath(Config::Get().general.LastSaveScenarioDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.lastSaveScenarioDirectory, pathBuffer); int32_t parkFlagsBackup = gameState.park.flags; gameState.park.flags &= ~PARK_FLAGS_SPRITES_INITIALISED; gameState.editorStep = EditorStep::Invalid; gameState.scenarioFileName = std::string(String::toStringView(pathBuffer, std::size(pathBuffer))); - int32_t success = ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2); + int32_t success = ScenarioSave(gameState, pathBuffer, Config::Get().general.savePluginData ? 3 : 2); gameState.park.flags = parkFlagsBackup; if (success) @@ -410,7 +410,7 @@ namespace OpenRCT2::Ui::FileBrowser } case LoadSaveType::track: { - SetAndSaveConfigPath(Config::Get().general.LastSaveTrackDirectory, pathBuffer); + SetAndSaveConfigPath(Config::Get().general.lastSaveTrackDirectory, pathBuffer); const auto withExtension = Path::WithExtension(pathBuffer, ".td6"); String::set(pathBuffer, sizeof(pathBuffer), withExtension.c_str()); diff --git a/src/openrct2-ui/interface/InGameConsole.cpp b/src/openrct2-ui/interface/InGameConsole.cpp index 44b09c1061..c308201d88 100644 --- a/src/openrct2-ui/interface/InGameConsole.cpp +++ b/src/openrct2-ui/interface/InGameConsole.cpp @@ -33,7 +33,7 @@ static InGameConsole _inGameConsole; static FontStyle InGameConsoleGetFontStyle() { - return (Config::Get().interface.ConsoleSmallFont ? FontStyle::Small : FontStyle::Medium); + return (Config::Get().interface.consoleSmallFont ? FontStyle::Small : FontStyle::Medium); } static int32_t InGameConsoleGetLineHeight() diff --git a/src/openrct2-ui/interface/Theme.cpp b/src/openrct2-ui/interface/Theme.cpp index 84198b8c89..1c7f4466b7 100644 --- a/src/openrct2-ui/interface/Theme.cpp +++ b/src/openrct2-ui/interface/Theme.cpp @@ -649,9 +649,9 @@ static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] = ActiveAvailableThemeIndex = 1; bool configValid = false; - if (!Config::Get().interface.CurrentThemePreset.empty()) + if (!Config::Get().interface.currentThemePreset.empty()) { - if (LoadThemeByConfigName(Config::Get().interface.CurrentThemePreset.c_str())) + if (LoadThemeByConfigName(Config::Get().interface.currentThemePreset.c_str())) { configValid = true; } @@ -659,7 +659,7 @@ static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] = if (!configValid) { - Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); + Config::Get().interface.currentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); } } @@ -741,7 +741,7 @@ static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] = } } ThemeManager::ActiveAvailableThemeIndex = index; - Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(index); + Config::Get().interface.currentThemePreset = ThemeManagerGetAvailableThemeConfigName(index); ColourSchemeUpdateAll(); } @@ -837,7 +837,7 @@ static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] = if (Path::Equals(newPath, ThemeManager::AvailableThemes[i].Path)) { ThemeManager::ActiveAvailableThemeIndex = i; - Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); + Config::Get().interface.currentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); break; } } @@ -862,7 +862,7 @@ static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] = if (Path::Equals(newPath, ThemeManager::AvailableThemes[i].Path)) { ThemeManager::ActiveAvailableThemeIndex = i; - Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(i); + Config::Get().interface.currentThemePreset = ThemeManagerGetAvailableThemeConfigName(i); break; } } @@ -873,7 +873,7 @@ static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] = File::Delete(ThemeManager::CurrentThemePath); ThemeManager::LoadTheme(const_cast(&PredefinedThemeRCT2)); ThemeManager::ActiveAvailableThemeIndex = 1; - Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); + Config::Get().interface.currentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); } void ThemeManagerInitialise() diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index 4d12a443b5..892792ec04 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -568,9 +568,9 @@ namespace OpenRCT2::Ui width -= kCloseButtonSize; } topLeft.x += width / 2; - if (Config::Get().interface.WindowButtonsOnTheLeft) + if (Config::Get().interface.windowButtonsOnTheLeft) topLeft.x += kCloseButtonSize; - if (Config::Get().interface.EnlargedUi) + if (Config::Get().interface.enlargedUi) topLeft.y += kTitleHeightLarge / 4; DrawTextEllipsised( diff --git a/src/openrct2-ui/interface/Window.cpp b/src/openrct2-ui/interface/Window.cpp index 7a92872627..9adfae6f42 100644 --- a/src/openrct2-ui/interface/Window.cpp +++ b/src/openrct2-ui/interface/Window.cpp @@ -314,7 +314,7 @@ namespace OpenRCT2::Ui void ApplyScreenSaverLockSetting() { - Config::Get().general.DisableScreensaver ? SDL_DisableScreenSaver() : SDL_EnableScreenSaver(); + Config::Get().general.disableScreensaver ? SDL_DisableScreenSaver() : SDL_EnableScreenSaver(); } void Window::scrollToViewport() @@ -514,7 +514,7 @@ namespace OpenRCT2::Ui ScreenCoordsXY WindowGetViewportSoundIconPos(WindowBase& w) { - const uint8_t buttonOffset = (Config::Get().interface.WindowButtonsOnTheLeft) ? kCloseButtonSize + 2 : 0; + const uint8_t buttonOffset = (Config::Get().interface.windowButtonsOnTheLeft) ? kCloseButtonSize + 2 : 0; return w.windowPos + ScreenCoordsXY{ 2 + buttonOffset, 2 }; } } // namespace OpenRCT2::Ui @@ -960,7 +960,7 @@ namespace OpenRCT2::Ui::Windows w.maxWidth = std::max(minSize.width, maxSize.width); w.maxHeight = std::max(minSize.height, maxSize.height); - if (Config::Get().interface.EnlargedUi) + if (Config::Get().interface.enlargedUi) { // Not sure why plugin windows have to be treated differently, // but they currently show a deviation if we don't. diff --git a/src/openrct2-ui/scripting/CustomWindow.cpp b/src/openrct2-ui/scripting/CustomWindow.cpp index 9cdb4c16a7..6e786ef75e 100644 --- a/src/openrct2-ui/scripting/CustomWindow.cpp +++ b/src/openrct2-ui/scripting/CustomWindow.cpp @@ -489,7 +489,7 @@ namespace OpenRCT2::Ui::Windows { auto& closeButton = widgets[WIDX_CLOSE]; bool translucent = colours[closeButton.colour].hasFlag(ColourFlag::translucent); - if (Config::Get().interface.EnlargedUi) + if (Config::Get().interface.enlargedUi) closeButton.string = !translucent ? kCloseBoxStringBlackLarge : kCloseBoxStringWhiteLarge; else closeButton.string = !translucent ? kCloseBoxStringBlackNormal : kCloseBoxStringWhiteNormal; diff --git a/src/openrct2-ui/windows/Banner.cpp b/src/openrct2-ui/windows/Banner.cpp index 3cf07e3fb2..d8bfb13ced 100644 --- a/src/openrct2-ui/windows/Banner.cpp +++ b/src/openrct2-ui/windows/Banner.cpp @@ -91,7 +91,7 @@ namespace OpenRCT2::Ui::Windows (viewportWidget.width()) - 1, (viewportWidget.height()) - 1, Focus(_bannerViewPos)); if (viewport != nullptr) - viewport->flags = Config::Get().general.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; + viewport->flags = Config::Get().general.alwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; invalidate(); } diff --git a/src/openrct2-ui/windows/CustomCurrency.cpp b/src/openrct2-ui/windows/CustomCurrency.cpp index 9f98a32ab5..6960ad6728 100644 --- a/src/openrct2-ui/windows/CustomCurrency.cpp +++ b/src/openrct2-ui/windows/CustomCurrency.cpp @@ -73,7 +73,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_RATE_UP: CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate += 1; - Config::Get().general.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; + Config::Get().general.customCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; Config::Save(); windowMgr->InvalidateAll(); break; @@ -81,7 +81,7 @@ namespace OpenRCT2::Ui::Windows if (CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate > 1) { CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate -= 1; - Config::Get().general.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; + Config::Get().general.customCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; Config::Save(); windowMgr->InvalidateAll(); } @@ -143,7 +143,7 @@ namespace OpenRCT2::Ui::Windows CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = CurrencyAffix::Suffix; } - Config::Get().general.CustomCurrencyAffix = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode; + Config::Get().general.customCurrencyAffix = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode; Config::Save(); auto* windowMgr = Ui::GetWindowManager(); @@ -165,7 +165,7 @@ namespace OpenRCT2::Ui::Windows CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, std::string(text).c_str(), kCurrencySymbolMaxSize); - Config::Get().general.CustomCurrencySymbol = CurrencyDescriptors[EnumValue(CurrencyType::Custom)] + Config::Get().general.customCurrencySymbol = CurrencyDescriptors[EnumValue(CurrencyType::Custom)] .symbol_unicode; Config::Save(); @@ -179,7 +179,7 @@ namespace OpenRCT2::Ui::Windows { int32_t rate = res.value(); CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = rate; - Config::Get().general.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; + Config::Get().general.customCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; Config::Save(); windowMgr->InvalidateAll(); } diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 2596ade153..d6aceea7e5 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -75,12 +75,12 @@ namespace OpenRCT2::Ui::Windows static int32_t GetDefaultRowHeight() { - return Config::Get().interface.EnlargedUi ? kDropdownItemHeightTouch : kDropdownItemHeight; + return Config::Get().interface.enlargedUi ? kDropdownItemHeightTouch : kDropdownItemHeight; } static int32_t GetAdditionalRowPadding() { - return Config::Get().interface.EnlargedUi ? 6 : 0; + return Config::Get().interface.enlargedUi ? 6 : 0; } static void drawTextItem( @@ -386,7 +386,7 @@ namespace OpenRCT2::Ui::Windows size_t num_items, int32_t width, size_t prefRowsPerColumn) { gInputFlags.unset(InputFlag::dropdownStayOpen, InputFlag::dropdownMouseUp); - if (flags & Dropdown::Flag::StayOpen || Config::Get().interface.TouchEnhancements) + if (flags & Dropdown::Flag::StayOpen || Config::Get().interface.touchEnhancements) gInputFlags.set(InputFlag::dropdownStayOpen); WindowDropdownClose(); @@ -430,7 +430,7 @@ namespace OpenRCT2::Ui::Windows int32_t itemHeight, int32_t numColumns) { gInputFlags.unset(InputFlag::dropdownStayOpen, InputFlag::dropdownMouseUp); - if (flags & Dropdown::Flag::StayOpen || Config::Get().interface.TouchEnhancements) + if (flags & Dropdown::Flag::StayOpen || Config::Get().interface.touchEnhancements) gInputFlags.set(InputFlag::dropdownStayOpen); // Close existing dropdown diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index be34b2c7d7..78351873f7 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -277,7 +277,7 @@ namespace OpenRCT2::Ui::Windows Sub6AB211(); ResetSelectedObjectCountAndSize(); - _filterFlags = FILTER_RIDES_ALL | Config::Get().interface.ObjectSelectionFilterFlags; + _filterFlags = FILTER_RIDES_ALL | Config::Get().interface.objectSelectionFilterFlags; _filter.clear(); WindowInitScrollWidgets(*this); @@ -411,7 +411,7 @@ namespace OpenRCT2::Ui::Windows _filterFlags &= ~FILTER_RIDES_ALL; _filterFlags |= subTabDef.flagFilter; - Config::Get().interface.ObjectSelectionFilterFlags = _filterFlags; + Config::Get().interface.objectSelectionFilterFlags = _filterFlags; Config::Save(); VisibleListRefresh(); @@ -572,7 +572,7 @@ namespace OpenRCT2::Ui::Windows { _filterFlags ^= (1 << dropdownIndex); } - Config::Get().interface.ObjectSelectionFilterFlags = _filterFlags; + Config::Get().interface.objectSelectionFilterFlags = _filterFlags; Config::Save(); scrolls->contentOffsetY = 0; @@ -923,7 +923,7 @@ namespace OpenRCT2::Ui::Windows widget.type = WidgetType::empty; } - if (Config::Get().general.DebuggingTools) + if (Config::Get().general.debuggingTools) widgets[WIDX_RELOAD_OBJECT].type = WidgetType::imgBtn; else widgets[WIDX_RELOAD_OBJECT].type = WidgetType::empty; diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index ca46f8e239..c1ef4d904e 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -187,7 +187,7 @@ namespace OpenRCT2::Ui::Windows int32_t day = date.GetDay(); auto colour = GetHoverWidgetColour(WIDX_DATE); - StringId stringId = DateFormatStringFormatIds[Config::Get().general.DateFormat]; + StringId stringId = DateFormatStringFormatIds[Config::Get().general.dateFormat]; auto ft = Formatter(); ft.Add(DateDayNames[day]); ft.Add(month); @@ -202,7 +202,7 @@ namespace OpenRCT2::Ui::Windows int32_t temperature = getGameState().weatherCurrent.temperature; StringId format = STR_CELSIUS_VALUE; - if (Config::Get().general.TemperatureFormat == TemperatureUnit::Fahrenheit) + if (Config::Get().general.temperatureFormat == TemperatureUnit::Fahrenheit) { temperature = ClimateCelsiusToFahrenheit(temperature); format = STR_FAHRENHEIT_VALUE; diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 81a73ff1ce..20424b80f4 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -494,7 +494,7 @@ namespace OpenRCT2::Ui::Windows { newDisabledWidgets |= (1uLL << WIDX_TAB_4); // Disable finance tab if no money } - if (!Config::Get().general.DebuggingTools) + if (!Config::Get().general.debuggingTools) { newDisabledWidgets |= (1uLL << WIDX_TAB_7); // Disable debug tab when debug tools not turned on } @@ -1921,7 +1921,7 @@ namespace OpenRCT2::Ui::Windows if (window == nullptr) { auto windowSize = kWindowSize; - if (Config::Get().general.DebuggingTools) + if (Config::Get().general.debuggingTools) windowSize.width += kTabWidth; window = windowMgr->Create(WindowClass::peep, windowSize, WindowFlag::resizable); diff --git a/src/openrct2-ui/windows/LoadSave.cpp b/src/openrct2-ui/windows/LoadSave.cpp index d5df1fcd0e..7854d6ce75 100644 --- a/src/openrct2-ui/windows/LoadSave.cpp +++ b/src/openrct2-ui/windows/LoadSave.cpp @@ -136,13 +136,13 @@ namespace OpenRCT2::Ui::Windows bool ShowPreviews() { auto& config = Config::Get().general; - return config.FileBrowserPreviewType != ParkPreviewPref::disabled; + return config.fileBrowserPreviewType != ParkPreviewPref::disabled; } ScreenSize GetPreviewSize() const { auto& config = Config::Get().general; - switch (config.FileBrowserPreviewType) + switch (config.fileBrowserPreviewType) { case ParkPreviewPref::screenshot: return { kPreviewWidthScreenshot, kPreviewWidthScreenshot / 5 * 4 }; @@ -405,7 +405,7 @@ namespace OpenRCT2::Ui::Windows { // Find preview image to draw PreviewImage* image = nullptr; - auto targetPref = Config::Get().general.FileBrowserPreviewType; + auto targetPref = Config::Get().general.fileBrowserPreviewType; auto targetType = targetPref == ParkPreviewPref::screenshot ? PreviewImageType::screenshot : PreviewImageType::miniMap; for (auto& candidate : _preview.images) @@ -483,7 +483,7 @@ namespace OpenRCT2::Ui::Windows // Date { auto ft = Formatter(); - ft.Add(DateFormatStringFormatIds[Config::Get().general.DateFormat]); + ft.Add(DateFormatStringFormatIds[Config::Get().general.dateFormat]); ft.Add(DateDayNames[_preview.day]); ft.Add(_preview.month); ft.Add(_preview.year + 1); @@ -606,8 +606,8 @@ namespace OpenRCT2::Ui::Windows WindowSetResize(*this, GetMinimumWindowSize(), kWindowSizeMax); auto& config = Config::Get().general; - config.FileBrowserWidth = width; - config.FileBrowserHeight = height - getTitleBarDiffNormal(); + config.fileBrowserWidth = width; + config.fileBrowserHeight = height - getTitleBarDiffNormal(); } void onUpdate() override @@ -642,7 +642,7 @@ namespace OpenRCT2::Ui::Windows customiseWidget.left = customiseWidget.right - 14; auto& config = Config::Get().general; - if (config.FileBrowserShowDateColumn) + if (config.fileBrowserShowDateColumn) { // Date column on the right Widget& dateWidget = widgets[WIDX_SORT_DATE]; @@ -650,7 +650,7 @@ namespace OpenRCT2::Ui::Windows dateWidget.right = customiseWidget.left - 1; dateWidget.left = dateWidget.right - (maxDateWidth + maxTimeWidth + (4 * kDateTimeGap) + (kScrollBarWidth + 1)); - if (config.FileBrowserShowSizeColumn) + if (config.fileBrowserShowSizeColumn) { // File size column in the middle Widget& sizeWidget = widgets[WIDX_SORT_SIZE]; @@ -671,7 +671,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_SORT_NAME].right = dateWidget.left - 1; } } - else if (config.FileBrowserShowSizeColumn) + else if (config.fileBrowserShowSizeColumn) { // Hide date header Widget& dateWidget = widgets[WIDX_SORT_DATE]; @@ -758,9 +758,9 @@ namespace OpenRCT2::Ui::Windows const auto drawButtonCaption = [rt, this](Widget& widget, StringId strId, FileBrowserSort ascSort, FileBrowserSort descSort) { StringId indicatorId = kStringIdNone; - if (Config::Get().general.LoadSaveSort == ascSort) + if (Config::Get().general.loadSaveSort == ascSort) indicatorId = STR_UP; - else if (Config::Get().general.LoadSaveSort == descSort) + else if (Config::Get().general.loadSaveSort == descSort) indicatorId = STR_DOWN; auto ft = Formatter(); @@ -776,12 +776,12 @@ namespace OpenRCT2::Ui::Windows drawButtonCaption( widgets[WIDX_SORT_NAME], STR_NAME_COLUMN, FileBrowserSort::NameAscending, FileBrowserSort::NameDescending); - if (config.FileBrowserShowSizeColumn) + if (config.fileBrowserShowSizeColumn) drawButtonCaption( widgets[WIDX_SORT_SIZE], STR_FILEBROWSER_SIZE_COLUMN, FileBrowserSort::SizeAscending, FileBrowserSort::SizeDescending); - if (config.FileBrowserShowDateColumn) + if (config.fileBrowserShowDateColumn) drawButtonCaption( widgets[WIDX_SORT_DATE], STR_DATE_COLUMN, FileBrowserSort::DateAscending, FileBrowserSort::DateDescending); @@ -833,13 +833,13 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_SORT_NAME: - if (Config::Get().general.LoadSaveSort == FileBrowserSort::NameAscending) + if (Config::Get().general.loadSaveSort == FileBrowserSort::NameAscending) { - Config::Get().general.LoadSaveSort = FileBrowserSort::NameDescending; + Config::Get().general.loadSaveSort = FileBrowserSort::NameDescending; } else { - Config::Get().general.LoadSaveSort = FileBrowserSort::NameAscending; + Config::Get().general.loadSaveSort = FileBrowserSort::NameAscending; } Config::Save(); SortList(); @@ -847,13 +847,13 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_SORT_SIZE: - if (Config::Get().general.LoadSaveSort == FileBrowserSort::SizeDescending) + if (Config::Get().general.loadSaveSort == FileBrowserSort::SizeDescending) { - Config::Get().general.LoadSaveSort = FileBrowserSort::SizeAscending; + Config::Get().general.loadSaveSort = FileBrowserSort::SizeAscending; } else { - Config::Get().general.LoadSaveSort = FileBrowserSort::SizeDescending; + Config::Get().general.loadSaveSort = FileBrowserSort::SizeDescending; } Config::Save(); SortList(); @@ -861,13 +861,13 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_SORT_DATE: - if (Config::Get().general.LoadSaveSort == FileBrowserSort::DateDescending) + if (Config::Get().general.loadSaveSort == FileBrowserSort::DateDescending) { - Config::Get().general.LoadSaveSort = FileBrowserSort::DateAscending; + Config::Get().general.loadSaveSort = FileBrowserSort::DateAscending; } else { - Config::Get().general.LoadSaveSort = FileBrowserSort::DateDescending; + Config::Get().general.loadSaveSort = FileBrowserSort::DateDescending; } Config::Save(); SortList(); @@ -921,11 +921,11 @@ namespace OpenRCT2::Ui::Windows auto& config = Config::Get().general; gDropdown.items[0].setChecked(true); - gDropdown.items[1].setChecked(config.FileBrowserShowSizeColumn); - gDropdown.items[2].setChecked(config.FileBrowserShowDateColumn); - gDropdown.items[4].setChecked(config.FileBrowserPreviewType == ParkPreviewPref::disabled); - gDropdown.items[5].setChecked(config.FileBrowserPreviewType == ParkPreviewPref::miniMap); - gDropdown.items[6].setChecked(config.FileBrowserPreviewType == ParkPreviewPref::screenshot); + gDropdown.items[1].setChecked(config.fileBrowserShowSizeColumn); + gDropdown.items[2].setChecked(config.fileBrowserShowDateColumn); + gDropdown.items[4].setChecked(config.fileBrowserPreviewType == ParkPreviewPref::disabled); + gDropdown.items[5].setChecked(config.fileBrowserPreviewType == ParkPreviewPref::miniMap); + gDropdown.items[6].setChecked(config.fileBrowserPreviewType == ParkPreviewPref::screenshot); } void onDropdown(WidgetIndex widgetIndex, int32_t selectedIndex) override @@ -937,23 +937,23 @@ namespace OpenRCT2::Ui::Windows bool changed = false; if (selectedIndex == 1) { - config.FileBrowserShowSizeColumn ^= true; + config.fileBrowserShowSizeColumn ^= true; changed = true; } else if (selectedIndex == 2) { - config.FileBrowserShowDateColumn ^= true; + config.fileBrowserShowDateColumn ^= true; changed = true; } else if (selectedIndex >= 4 && selectedIndex <= 6) { auto newPref = ParkPreviewPref(selectedIndex - 4); - if (config.FileBrowserPreviewType != newPref) + if (config.fileBrowserPreviewType != newPref) { invalidate(); width -= GetPreviewSize().width; - config.FileBrowserPreviewType = newPref; + config.fileBrowserPreviewType = newPref; width += GetPreviewSize().width; changed = true; @@ -1127,7 +1127,7 @@ namespace OpenRCT2::Ui::Windows if (_listItems[i].type != FileType::file) continue; - if (config.FileBrowserShowSizeColumn) + if (config.fileBrowserShowSizeColumn) { ft = Formatter(); ft.Add(STR_FILEBROWSER_FILE_SIZE_VALUE); @@ -1136,7 +1136,7 @@ namespace OpenRCT2::Ui::Windows DrawTextEllipsised(rt, { sizeColumnLeft + 2, y }, maxDateWidth + maxTimeWidth, stringId, ft); } - if (config.FileBrowserShowDateColumn) + if (config.fileBrowserShowDateColumn) { ft = Formatter(); ft.Add(STR_STRING); @@ -1168,15 +1168,15 @@ namespace OpenRCT2::Ui::Windows if (w == nullptr) { auto& config = Config::Get().general; - if (config.FileBrowserWidth < kWindowSizeMin.width || config.FileBrowserHeight < kWindowSizeMin.height - || config.FileBrowserWidth > kWindowSizeMax.width || config.FileBrowserHeight > kWindowSizeMax.height) + if (config.fileBrowserWidth < kWindowSizeMin.width || config.fileBrowserHeight < kWindowSizeMin.height + || config.fileBrowserWidth > kWindowSizeMax.width || config.fileBrowserHeight > kWindowSizeMax.height) { - config.FileBrowserWidth = kWindowSize.width; - config.FileBrowserHeight = kWindowSize.height; + config.fileBrowserWidth = kWindowSize.width; + config.fileBrowserHeight = kWindowSize.height; Config::Save(); } - ScreenSize windowSize = { config.FileBrowserWidth, config.FileBrowserHeight }; + ScreenSize windowSize = { config.fileBrowserWidth, config.fileBrowserHeight }; w = windowMgr->Create( WindowClass::loadsave, windowSize, diff --git a/src/openrct2-ui/windows/Main.cpp b/src/openrct2-ui/windows/Main.cpp index 785a576aaa..a336ac81c0 100644 --- a/src/openrct2-ui/windows/Main.cpp +++ b/src/openrct2-ui/windows/Main.cpp @@ -55,17 +55,17 @@ namespace OpenRCT2::Ui::Windows void SetViewportFlags() { viewport->flags |= VIEWPORT_FLAG_SOUND_ON; - if (Config::Get().general.InvisibleRides) + if (Config::Get().general.invisibleRides) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_RIDES; - if (Config::Get().general.InvisibleVehicles) + if (Config::Get().general.invisibleVehicles) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_VEHICLES; - if (Config::Get().general.InvisibleTrees) + if (Config::Get().general.invisibleTrees) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_VEGETATION; - if (Config::Get().general.InvisibleScenery) + if (Config::Get().general.invisibleScenery) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_SCENERY; - if (Config::Get().general.InvisiblePaths) + if (Config::Get().general.invisiblePaths) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_PATHS; - if (Config::Get().general.InvisibleSupports) + if (Config::Get().general.invisibleSupports) viewport->flags |= VIEWPORT_FLAG_INVISIBLE_SUPPORTS; } }; diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index b8c0e43cc7..19f2443e19 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -1480,7 +1480,7 @@ namespace OpenRCT2::Ui::Windows int32_t rawValue = value; if (page != WINDOW_MAPGEN_PAGE_BASE) { - switch (Config::Get().general.MeasurementFormat) + switch (Config::Get().general.measurementFormat) { case MeasurementFormat::Imperial: value = FeetToMetres(value); diff --git a/src/openrct2-ui/windows/Multiplayer.cpp b/src/openrct2-ui/windows/Multiplayer.cpp index 4566d6d2a5..c93d545fec 100644 --- a/src/openrct2-ui/windows/Multiplayer.cpp +++ b/src/openrct2-ui/windows/Multiplayer.cpp @@ -137,7 +137,7 @@ namespace OpenRCT2::Ui::Windows static bool IsServerPlayerInvisible() { - return Network::IsServerPlayerInvisible() && !Config::Get().general.DebuggingTools; + return Network::IsServerPlayerInvisible() && !Config::Get().general.debuggingTools; } class MultiplayerWindow final : public Window @@ -589,15 +589,15 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_LOG_CHAT_CHECKBOX: - Config::Get().network.LogChat = !Config::Get().network.LogChat; + Config::Get().network.logChat = !Config::Get().network.logChat; Config::Save(); break; case WIDX_LOG_SERVER_ACTIONS_CHECKBOX: - Config::Get().network.LogServerActions = !Config::Get().network.LogServerActions; + Config::Get().network.logServerActions = !Config::Get().network.logServerActions; Config::Save(); break; case WIDX_KNOWN_KEYS_ONLY_CHECKBOX: - Config::Get().network.KnownKeysOnly = !Config::Get().network.KnownKeysOnly; + Config::Get().network.knownKeysOnly = !Config::Get().network.knownKeysOnly; Config::Save(); break; } @@ -692,9 +692,9 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_KNOWN_KEYS_ONLY_CHECKBOX].type = WidgetType::empty; } - setCheckboxValue(WIDX_LOG_CHAT_CHECKBOX, Config::Get().network.LogChat); - setCheckboxValue(WIDX_LOG_SERVER_ACTIONS_CHECKBOX, Config::Get().network.LogServerActions); - setCheckboxValue(WIDX_KNOWN_KEYS_ONLY_CHECKBOX, Config::Get().network.KnownKeysOnly); + setCheckboxValue(WIDX_LOG_CHAT_CHECKBOX, Config::Get().network.logChat); + setCheckboxValue(WIDX_LOG_SERVER_ACTIONS_CHECKBOX, Config::Get().network.logServerActions); + setCheckboxValue(WIDX_KNOWN_KEYS_ONLY_CHECKBOX, Config::Get().network.knownKeysOnly); break; } } diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 1f7fe749b4..cb61925d52 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -366,7 +366,7 @@ namespace OpenRCT2::Ui::Windows ContextOpenWindowView(WindowView::financesResearch); break; case WIDX_GROUP_BY_TRACK_TYPE: - Config::Get().interface.ListRideVehiclesSeparately = !Config::Get().interface.ListRideVehiclesSeparately; + Config::Get().interface.listRideVehiclesSeparately = !Config::Get().interface.listRideVehiclesSeparately; Config::Save(); PopulateRideList(); invalidate(); @@ -394,7 +394,7 @@ namespace OpenRCT2::Ui::Windows { SetPressedTab(); - if (!Config::Get().interface.ListRideVehiclesSeparately) + if (!Config::Get().interface.listRideVehiclesSeparately) pressedWidgets |= (1LL << WIDX_GROUP_BY_TRACK_TYPE); else pressedWidgets &= ~(1LL << WIDX_GROUP_BY_TRACK_TYPE); @@ -695,7 +695,7 @@ namespace OpenRCT2::Ui::Windows auto* rideObj = objMgr.GetLoadedObject(rideEntryIndex); // Skip if the vehicle isn't the preferred vehicle for this generic track type - if (!Config::Get().interface.ListRideVehiclesSeparately + if (!Config::Get().interface.listRideVehiclesSeparately && !GetRideTypeDescriptor(rideType).HasFlag(RtdFlag::listVehiclesSeparately) && highestVehiclePriority > rideObj->GetEntry().BuildMenuPriority) { @@ -710,7 +710,7 @@ namespace OpenRCT2::Ui::Windows highestVehiclePriority = rideObj->GetEntry().BuildMenuPriority; // Determines how and where to draw a button for this ride type/vehicle. - if (Config::Get().interface.ListRideVehiclesSeparately + if (Config::Get().interface.listRideVehiclesSeparately || GetRideTypeDescriptor(rideType).HasFlag(RtdFlag::listVehiclesSeparately)) { // Separate, draw apart @@ -933,7 +933,7 @@ namespace OpenRCT2::Ui::Windows if (!_vehicleAvailability.empty()) { - if (Config::Get().interface.ListRideVehiclesSeparately) + if (Config::Get().interface.listRideVehiclesSeparately) { ft = Formatter(); ft.Add(rideEntry.naming.Name); @@ -979,7 +979,7 @@ namespace OpenRCT2::Ui::Windows } // Draw object author(s) if debugging tools are active - if (Config::Get().general.DebuggingTools && !rideObj->GetAuthors().empty()) + if (Config::Get().general.debuggingTools && !rideObj->GetAuthors().empty()) { const auto& authors = rideObj->GetAuthors(); diff --git a/src/openrct2-ui/windows/News.cpp b/src/openrct2-ui/windows/News.cpp index 250b336107..35070aec37 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -80,24 +80,24 @@ namespace OpenRCT2::Ui::Windows // clang-format off static constexpr NewsOption kNewsItemOptionDefinitions[] = { - { STR_NEWS_GROUP_PARK, STR_NOTIFICATION_PARK_AWARD, offsetof(Config::Notification, ParkAward) }, - { STR_NEWS_GROUP_PARK, STR_NOTIFICATION_PARK_MARKETING_CAMPAIGN_FINISHED, offsetof(Config::Notification, ParkMarketingCampaignFinished) }, - { STR_NEWS_GROUP_PARK, STR_NOTIFICATION_PARK_WARNINGS, offsetof(Config::Notification, ParkWarnings) }, - { STR_NEWS_GROUP_PARK, STR_NOTIFICATION_PARK_RATING_WARNINGS, offsetof(Config::Notification, ParkRatingWarnings) }, - { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_BROKEN_DOWN, offsetof(Config::Notification, RideBrokenDown) }, - { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_CRASHED, offsetof(Config::Notification, RideCrashed) }, - { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_CASUALTIES, offsetof(Config::Notification, RideCasualties) }, - { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_WARNINGS, offsetof(Config::Notification, RideWarnings) }, - { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_RESEARCHED, offsetof(Config::Notification, RideResearched) }, - { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_VEHICLE_STALLED, offsetof(Config::Notification, RideStalledVehicles) }, - { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_WARNINGS, offsetof(Config::Notification, GuestWarnings) }, - { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_LEFT_PARK, offsetof(Config::Notification, GuestLeftPark) }, - { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE, offsetof(Config::Notification, GuestQueuingForRide) }, - { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_ON_RIDE, offsetof(Config::Notification, GuestOnRide) }, - { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_LEFT_RIDE, offsetof(Config::Notification, GuestLeftRide) }, - { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_BOUGHT_ITEM, offsetof(Config::Notification, GuestBoughtItem) }, - { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_USED_FACILITY, offsetof(Config::Notification, GuestUsedFacility) }, - { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_DIED, offsetof(Config::Notification, GuestDied) }, + { STR_NEWS_GROUP_PARK, STR_NOTIFICATION_PARK_AWARD, offsetof(Config::Notification, parkAward) }, + { STR_NEWS_GROUP_PARK, STR_NOTIFICATION_PARK_MARKETING_CAMPAIGN_FINISHED, offsetof(Config::Notification, parkMarketingCampaignFinished) }, + { STR_NEWS_GROUP_PARK, STR_NOTIFICATION_PARK_WARNINGS, offsetof(Config::Notification, parkWarnings) }, + { STR_NEWS_GROUP_PARK, STR_NOTIFICATION_PARK_RATING_WARNINGS, offsetof(Config::Notification, parkRatingWarnings) }, + { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_BROKEN_DOWN, offsetof(Config::Notification, rideBrokenDown) }, + { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_CRASHED, offsetof(Config::Notification, rideCrashed) }, + { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_CASUALTIES, offsetof(Config::Notification, rideCasualties) }, + { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_WARNINGS, offsetof(Config::Notification, rideWarnings) }, + { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_RESEARCHED, offsetof(Config::Notification, rideResearched) }, + { STR_NEWS_GROUP_RIDE, STR_NOTIFICATION_RIDE_VEHICLE_STALLED, offsetof(Config::Notification, rideStalledVehicles) }, + { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_WARNINGS, offsetof(Config::Notification, guestWarnings) }, + { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_LEFT_PARK, offsetof(Config::Notification, guestLeftPark) }, + { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE, offsetof(Config::Notification, guestQueuingForRide) }, + { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_ON_RIDE, offsetof(Config::Notification, guestOnRide) }, + { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_LEFT_RIDE, offsetof(Config::Notification, guestLeftRide) }, + { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_BOUGHT_ITEM, offsetof(Config::Notification, guestBoughtItem) }, + { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_USED_FACILITY, offsetof(Config::Notification, guestUsedFacility) }, + { STR_NEWS_GROUP_GUEST, STR_NOTIFICATION_GUEST_DIED, offsetof(Config::Notification, guestDied) }, }; // clang-format on diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index 982b7401cf..bf2cb6b3bb 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -785,22 +785,22 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_SHOW_FPS_CHECKBOX: - Config::Get().general.ShowFPS ^= 1; + Config::Get().general.showFPS ^= 1; Config::Save(); invalidate(); break; case WIDX_MULTITHREADING_CHECKBOX: - Config::Get().general.MultiThreading ^= 1; + Config::Get().general.multiThreading ^= 1; Config::Save(); invalidate(); break; case WIDX_MINIMIZE_FOCUS_LOSS: - Config::Get().general.MinimizeFullscreenFocusLoss ^= 1; + Config::Get().general.minimizeFullscreenFocusLoss ^= 1; Config::Save(); invalidate(); break; case WIDX_DISABLE_SCREENSAVER_LOCK: - Config::Get().general.DisableScreensaver ^= 1; + Config::Get().general.disableScreensaver ^= 1; ApplyScreenSaverLockSetting(); Config::Save(); invalidate(); @@ -828,8 +828,8 @@ namespace OpenRCT2::Ui::Windows ft.Add(resolution.Height); gDropdown.items[i] = Dropdown::MenuLabel(STR_RESOLUTION_X_BY_Y, ft); - if (resolution.Width == Config::Get().general.FullscreenWidth - && resolution.Height == Config::Get().general.FullscreenHeight) + if (resolution.Width == Config::Get().general.fullscreenWidth + && resolution.Height == Config::Get().general.fullscreenHeight) { selectedResolution = static_cast(i); } @@ -851,7 +851,7 @@ namespace OpenRCT2::Ui::Windows ShowDropdown(widget, 3); - gDropdown.items[Config::Get().general.FullscreenMode].setChecked(true); + gDropdown.items[Config::Get().general.fullscreenMode].setChecked(true); break; case WIDX_DRAWING_ENGINE_DROPDOWN: { @@ -861,19 +861,19 @@ namespace OpenRCT2::Ui::Windows gDropdown.items[i] = Dropdown::MenuLabel(kDrawingEngineStringIds[i]); } ShowDropdown(widget, numItems); - gDropdown.items[EnumValue(Config::Get().general.DrawingEngine)].setChecked(true); + gDropdown.items[EnumValue(Config::Get().general.drawingEngine)].setChecked(true); break; } case WIDX_SCALE_UP: - Config::Get().general.WindowScale += 0.25f; + Config::Get().general.windowScale += 0.25f; Config::Save(); GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); break; case WIDX_SCALE_DOWN: - Config::Get().general.WindowScale -= 0.25f; - Config::Get().general.WindowScale = std::max(0.5f, Config::Get().general.WindowScale); + Config::Get().general.windowScale -= 0.25f; + Config::Get().general.windowScale = std::max(0.5f, Config::Get().general.windowScale); Config::Save(); GfxInvalidateScreen(); ContextTriggerResize(); @@ -889,9 +889,9 @@ namespace OpenRCT2::Ui::Windows auto& config = Config::Get().general; auto activeItem = 0; - if (config.UncapFPS) + if (config.uncapFPS) { - activeItem = config.UseVSync ? 1 : 2; + activeItem = config.useVSync ? 1 : 2; } gDropdown.items[activeItem].setChecked(true); @@ -909,13 +909,13 @@ namespace OpenRCT2::Ui::Windows const auto& resolutions = OpenRCT2::GetContext()->GetUiContext().GetFullscreenResolutions(); const Resolution& resolution = resolutions[dropdownIndex]; - if (resolution.Width != Config::Get().general.FullscreenWidth - || resolution.Height != Config::Get().general.FullscreenHeight) + if (resolution.Width != Config::Get().general.fullscreenWidth + || resolution.Height != Config::Get().general.fullscreenHeight) { - Config::Get().general.FullscreenWidth = resolution.Width; - Config::Get().general.FullscreenHeight = resolution.Height; + Config::Get().general.fullscreenWidth = resolution.Width; + Config::Get().general.fullscreenHeight = resolution.Height; - if (Config::Get().general.FullscreenMode + if (Config::Get().general.fullscreenMode == static_cast(OpenRCT2::Ui::FullscreenMode::fullscreen)) ContextSetFullscreenMode(static_cast(OpenRCT2::Ui::FullscreenMode::fullscreen)); @@ -925,21 +925,21 @@ namespace OpenRCT2::Ui::Windows break; } case WIDX_FULLSCREEN_DROPDOWN: - if (dropdownIndex != Config::Get().general.FullscreenMode) + if (dropdownIndex != Config::Get().general.fullscreenMode) { ContextSetFullscreenMode(dropdownIndex); - Config::Get().general.FullscreenMode = static_cast(dropdownIndex); + Config::Get().general.fullscreenMode = static_cast(dropdownIndex); Config::Save(); GfxInvalidateScreen(); } break; case WIDX_DRAWING_ENGINE_DROPDOWN: - if (dropdownIndex != EnumValue(Config::Get().general.DrawingEngine)) + if (dropdownIndex != EnumValue(Config::Get().general.drawingEngine)) { DrawingEngine dstEngine = static_cast(dropdownIndex); - Config::Get().general.DrawingEngine = dstEngine; + Config::Get().general.drawingEngine = dstEngine; RefreshVideo(); Config::Save(); invalidate(); @@ -951,20 +951,20 @@ namespace OpenRCT2::Ui::Windows switch (dropdownIndex) { case 0: // vanilla - config.UncapFPS = 0; - config.UseVSync = 0; + config.uncapFPS = 0; + config.useVSync = 0; break; case 1: // vsync - config.UncapFPS = 1; - config.UseVSync = 1; + config.uncapFPS = 1; + config.useVSync = 1; break; case 2: // uncapped - config.UncapFPS = 1; - config.UseVSync = 0; + config.uncapFPS = 1; + config.useVSync = 0; break; } - DrawingEngineSetVSync(config.UseVSync); + DrawingEngineSetVSync(config.useVSync); Config::Save(); invalidate(); break; @@ -977,11 +977,11 @@ namespace OpenRCT2::Ui::Windows // Resolution dropdown caption. auto ft = Formatter::Common(); ft.Increment(16); - ft.Add(static_cast(Config::Get().general.FullscreenWidth)); - ft.Add(static_cast(Config::Get().general.FullscreenHeight)); + ft.Add(static_cast(Config::Get().general.fullscreenWidth)); + ft.Add(static_cast(Config::Get().general.fullscreenHeight)); // Disable resolution dropdown on "Windowed" and "Fullscreen (desktop)" - if (Config::Get().general.FullscreenMode != static_cast(OpenRCT2::Ui::FullscreenMode::fullscreen)) + if (Config::Get().general.fullscreenMode != static_cast(OpenRCT2::Ui::FullscreenMode::fullscreen)) { disabledWidgets |= (1uLL << WIDX_RESOLUTION_DROPDOWN); disabledWidgets |= (1uLL << WIDX_RESOLUTION); @@ -994,14 +994,14 @@ namespace OpenRCT2::Ui::Windows disabledWidgets &= ~(1uLL << WIDX_RESOLUTION_LABEL); } - setCheckboxValue(WIDX_SHOW_FPS_CHECKBOX, Config::Get().general.ShowFPS); - setCheckboxValue(WIDX_MULTITHREADING_CHECKBOX, Config::Get().general.MultiThreading); - setCheckboxValue(WIDX_MINIMIZE_FOCUS_LOSS, Config::Get().general.MinimizeFullscreenFocusLoss); - setCheckboxValue(WIDX_DISABLE_SCREENSAVER_LOCK, Config::Get().general.DisableScreensaver); + setCheckboxValue(WIDX_SHOW_FPS_CHECKBOX, Config::Get().general.showFPS); + setCheckboxValue(WIDX_MULTITHREADING_CHECKBOX, Config::Get().general.multiThreading); + setCheckboxValue(WIDX_MINIMIZE_FOCUS_LOSS, Config::Get().general.minimizeFullscreenFocusLoss); + setCheckboxValue(WIDX_DISABLE_SCREENSAVER_LOCK, Config::Get().general.disableScreensaver); // Dropdown captions for straightforward strings. - widgets[WIDX_FULLSCREEN].text = FullscreenModeNames[Config::Get().general.FullscreenMode]; - widgets[WIDX_DRAWING_ENGINE].text = kDrawingEngineStringIds[EnumValue(Config::Get().general.DrawingEngine)]; + widgets[WIDX_FULLSCREEN].text = FullscreenModeNames[Config::Get().general.fullscreenMode]; + widgets[WIDX_DRAWING_ENGINE].text = kDrawingEngineStringIds[EnumValue(Config::Get().general.drawingEngine)]; static constexpr StringId kFrameRateLimitStringIds[] = { STR_FRAME_RATE_LIMIT_DEFAULT, @@ -1011,9 +1011,9 @@ namespace OpenRCT2::Ui::Windows auto& config = Config::Get().general; auto activeItem = 0; - if (config.UncapFPS) + if (config.uncapFPS) { - activeItem = config.UseVSync ? 1 : 2; + activeItem = config.useVSync ? 1 : 2; } widgets[WIDX_FRAME_RATE_LIMIT].text = kFrameRateLimitStringIds[activeItem]; } @@ -1021,7 +1021,7 @@ namespace OpenRCT2::Ui::Windows void DisplayDraw(RenderTarget& rt) { auto ft = Formatter(); - ft.Add(static_cast(Config::Get().general.WindowScale * 100)); + ft.Add(static_cast(Config::Get().general.windowScale * 100)); DrawTextBasic( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_SCALE].left + 1, widgets[WIDX_SCALE].top + 1 }, STR_WINDOW_COLOUR_2_COMMA2DP32, ft, { colours[1] }); @@ -1034,19 +1034,19 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_TILE_SMOOTHING_CHECKBOX: - Config::Get().general.LandscapeSmoothing ^= 1; + Config::Get().general.landscapeSmoothing ^= 1; Config::Save(); GfxInvalidateScreen(); break; case WIDX_GRIDLINES_CHECKBOX: { - Config::Get().general.AlwaysShowGridlines ^= 1; + Config::Get().general.alwaysShowGridlines ^= 1; Config::Save(); GfxInvalidateScreen(); WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - if (Config::Get().general.AlwaysShowGridlines) + if (Config::Get().general.alwaysShowGridlines) mainWindow->viewport->flags |= VIEWPORT_FLAG_GRIDLINES; else mainWindow->viewport->flags &= ~VIEWPORT_FLAG_GRIDLINES; @@ -1054,45 +1054,45 @@ namespace OpenRCT2::Ui::Windows break; } case WIDX_DAY_NIGHT_CHECKBOX: - Config::Get().general.DayNightCycle ^= 1; + Config::Get().general.dayNightCycle ^= 1; Config::Save(); invalidate(); break; case WIDX_ENABLE_LIGHT_FX_CHECKBOX: - Config::Get().general.EnableLightFx ^= 1; + Config::Get().general.enableLightFx ^= 1; Config::Save(); invalidate(); break; case WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX: - Config::Get().general.EnableLightFxForVehicles ^= 1; + Config::Get().general.enableLightFxForVehicles ^= 1; Config::Save(); invalidate(); break; case WIDX_UPPER_CASE_BANNERS_CHECKBOX: - Config::Get().general.UpperCaseBanners ^= 1; + Config::Get().general.upperCaseBanners ^= 1; Config::Save(); invalidate(); ScrollingTextInvalidate(); break; case WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX: - Config::Get().general.DisableLightningEffect ^= 1; + Config::Get().general.disableLightningEffect ^= 1; Config::Save(); invalidate(); break; case WIDX_RENDER_WEATHER_EFFECTS_CHECKBOX: - Config::Get().general.RenderWeatherEffects ^= 1; - Config::Get().general.RenderWeatherGloom = Config::Get().general.RenderWeatherEffects; + Config::Get().general.renderWeatherEffects ^= 1; + Config::Get().general.renderWeatherGloom = Config::Get().general.renderWeatherEffects; Config::Save(); invalidate(); GfxInvalidateScreen(); break; case WIDX_SHOW_GUEST_PURCHASES_CHECKBOX: - Config::Get().general.ShowGuestPurchases ^= 1; + Config::Get().general.showGuestPurchases ^= 1; Config::Save(); invalidate(); break; case WIDX_TRANSPARENT_SCREENSHOTS_CHECKBOX: - Config::Get().general.TransparentScreenshot ^= 1; + Config::Get().general.transparentScreenshot ^= 1; Config::Save(); invalidate(); break; @@ -1111,7 +1111,7 @@ namespace OpenRCT2::Ui::Windows Widget* widget = &widgets[widgetIndex - 1]; ShowDropdown(widget, 3); - gDropdown.items[static_cast(Config::Get().general.VirtualFloorStyle)].setChecked(true); + gDropdown.items[static_cast(Config::Get().general.virtualFloorStyle)].setChecked(true); break; } } @@ -1121,7 +1121,7 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_VIRTUAL_FLOOR_DROPDOWN: - Config::Get().general.VirtualFloorStyle = static_cast(dropdownIndex); + Config::Get().general.virtualFloorStyle = static_cast(dropdownIndex); Config::Save(); break; } @@ -1129,12 +1129,12 @@ namespace OpenRCT2::Ui::Windows void RenderingPrepareDraw() { - setCheckboxValue(WIDX_TILE_SMOOTHING_CHECKBOX, Config::Get().general.LandscapeSmoothing); - setCheckboxValue(WIDX_GRIDLINES_CHECKBOX, Config::Get().general.AlwaysShowGridlines); - setCheckboxValue(WIDX_DAY_NIGHT_CHECKBOX, Config::Get().general.DayNightCycle); - setCheckboxValue(WIDX_SHOW_GUEST_PURCHASES_CHECKBOX, Config::Get().general.ShowGuestPurchases); - setCheckboxValue(WIDX_TRANSPARENT_SCREENSHOTS_CHECKBOX, Config::Get().general.TransparentScreenshot); - setCheckboxValue(WIDX_UPPER_CASE_BANNERS_CHECKBOX, Config::Get().general.UpperCaseBanners); + setCheckboxValue(WIDX_TILE_SMOOTHING_CHECKBOX, Config::Get().general.landscapeSmoothing); + setCheckboxValue(WIDX_GRIDLINES_CHECKBOX, Config::Get().general.alwaysShowGridlines); + setCheckboxValue(WIDX_DAY_NIGHT_CHECKBOX, Config::Get().general.dayNightCycle); + setCheckboxValue(WIDX_SHOW_GUEST_PURCHASES_CHECKBOX, Config::Get().general.showGuestPurchases); + setCheckboxValue(WIDX_TRANSPARENT_SCREENSHOTS_CHECKBOX, Config::Get().general.transparentScreenshot); + setCheckboxValue(WIDX_UPPER_CASE_BANNERS_CHECKBOX, Config::Get().general.upperCaseBanners); static constexpr StringId _virtualFloorStyleStrings[] = { STR_VIRTUAL_FLOOR_STYLE_DISABLED, @@ -1142,38 +1142,38 @@ namespace OpenRCT2::Ui::Windows STR_VIRTUAL_FLOOR_STYLE_GLASSY, }; - widgets[WIDX_VIRTUAL_FLOOR].text = _virtualFloorStyleStrings[EnumValue(Config::Get().general.VirtualFloorStyle)]; + widgets[WIDX_VIRTUAL_FLOOR].text = _virtualFloorStyleStrings[EnumValue(Config::Get().general.virtualFloorStyle)]; - setCheckboxValue(WIDX_ENABLE_LIGHT_FX_CHECKBOX, Config::Get().general.EnableLightFx); - if (Config::Get().general.DayNightCycle - && Config::Get().general.DrawingEngine == DrawingEngine::SoftwareWithHardwareDisplay) + setCheckboxValue(WIDX_ENABLE_LIGHT_FX_CHECKBOX, Config::Get().general.enableLightFx); + if (Config::Get().general.dayNightCycle + && Config::Get().general.drawingEngine == DrawingEngine::SoftwareWithHardwareDisplay) { disabledWidgets &= ~(1uLL << WIDX_ENABLE_LIGHT_FX_CHECKBOX); } else { disabledWidgets |= (1uLL << WIDX_ENABLE_LIGHT_FX_CHECKBOX); - Config::Get().general.EnableLightFx = false; + Config::Get().general.enableLightFx = false; } - setCheckboxValue(WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX, Config::Get().general.EnableLightFxForVehicles); - if (Config::Get().general.DayNightCycle - && Config::Get().general.DrawingEngine == DrawingEngine::SoftwareWithHardwareDisplay - && Config::Get().general.EnableLightFx) + setCheckboxValue(WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX, Config::Get().general.enableLightFxForVehicles); + if (Config::Get().general.dayNightCycle + && Config::Get().general.drawingEngine == DrawingEngine::SoftwareWithHardwareDisplay + && Config::Get().general.enableLightFx) { disabledWidgets &= ~(1uLL << WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX); } else { disabledWidgets |= (1uLL << WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX); - Config::Get().general.EnableLightFxForVehicles = false; + Config::Get().general.enableLightFxForVehicles = false; } setCheckboxValue( WIDX_RENDER_WEATHER_EFFECTS_CHECKBOX, - Config::Get().general.RenderWeatherEffects || Config::Get().general.RenderWeatherGloom); - setCheckboxValue(WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX, Config::Get().general.DisableLightningEffect); - if (!Config::Get().general.RenderWeatherEffects && !Config::Get().general.RenderWeatherGloom) + Config::Get().general.renderWeatherEffects || Config::Get().general.renderWeatherGloom); + setCheckboxValue(WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX, Config::Get().general.disableLightningEffect); + if (!Config::Get().general.renderWeatherEffects && !Config::Get().general.renderWeatherGloom) { setCheckboxValue(WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX, true); disabledWidgets |= (1uLL << WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX); @@ -1199,7 +1199,7 @@ namespace OpenRCT2::Ui::Windows ShowDropdown(widget, 2); - gDropdown.items[Config::Get().general.ShowHeightAsUnits ? 0 : 1].setChecked(true); + gDropdown.items[Config::Get().general.showHeightAsUnits ? 0 : 1].setChecked(true); break; case WIDX_CURRENCY_DROPDOWN: { @@ -1221,13 +1221,13 @@ namespace OpenRCT2::Ui::Windows ShowDropdown(widget, numItems); - if (Config::Get().general.CurrencyFormat == CurrencyType::Custom) + if (Config::Get().general.currencyFormat == CurrencyType::Custom) { - gDropdown.items[EnumValue(Config::Get().general.CurrencyFormat) + 1].setChecked(true); + gDropdown.items[EnumValue(Config::Get().general.currencyFormat) + 1].setChecked(true); } else { - gDropdown.items[EnumValue(Config::Get().general.CurrencyFormat)].setChecked(true); + gDropdown.items[EnumValue(Config::Get().general.currencyFormat)].setChecked(true); } break; } @@ -1238,7 +1238,7 @@ namespace OpenRCT2::Ui::Windows ShowDropdown(widget, 3); - gDropdown.items[static_cast(Config::Get().general.MeasurementFormat)].setChecked(true); + gDropdown.items[static_cast(Config::Get().general.measurementFormat)].setChecked(true); break; case WIDX_TEMPERATURE_DROPDOWN: gDropdown.items[0] = Dropdown::MenuLabel(STR_CELSIUS); @@ -1246,7 +1246,7 @@ namespace OpenRCT2::Ui::Windows ShowDropdown(widget, 2); - gDropdown.items[static_cast(Config::Get().general.TemperatureFormat)].setChecked(true); + gDropdown.items[static_cast(Config::Get().general.temperatureFormat)].setChecked(true); break; case WIDX_LANGUAGE_DROPDOWN: for (size_t i = 1; i < LANGUAGE_COUNT; i++) @@ -1262,7 +1262,7 @@ namespace OpenRCT2::Ui::Windows gDropdown.items[i] = Dropdown::MenuLabel(DateFormatStringIDs[i]); } ShowDropdown(widget, 4); - gDropdown.items[Config::Get().general.DateFormat].setChecked(true); + gDropdown.items[Config::Get().general.dateFormat].setChecked(true); break; } } @@ -1273,11 +1273,11 @@ namespace OpenRCT2::Ui::Windows { case WIDX_HEIGHT_LABELS_DROPDOWN: // reset flag and set it to 1 if height as units is selected - Config::Get().general.ShowHeightAsUnits = 0; + Config::Get().general.showHeightAsUnits = 0; if (dropdownIndex == 0) { - Config::Get().general.ShowHeightAsUnits = 1; + Config::Get().general.showHeightAsUnits = 1; } Config::Save(); UpdateHeightMarkers(); @@ -1285,25 +1285,25 @@ namespace OpenRCT2::Ui::Windows case WIDX_CURRENCY_DROPDOWN: if (dropdownIndex == EnumValue(CurrencyType::Custom) + 1) { // Add 1 because the separator occupies a position - Config::Get().general.CurrencyFormat = static_cast(dropdownIndex - 1); + Config::Get().general.currencyFormat = static_cast(dropdownIndex - 1); ContextOpenWindow(WindowClass::customCurrencyConfig); } else { - Config::Get().general.CurrencyFormat = static_cast(dropdownIndex); + Config::Get().general.currencyFormat = static_cast(dropdownIndex); } Config::Save(); GfxInvalidateScreen(); break; case WIDX_DISTANCE_DROPDOWN: - Config::Get().general.MeasurementFormat = static_cast(dropdownIndex); + Config::Get().general.measurementFormat = static_cast(dropdownIndex); Config::Save(); UpdateHeightMarkers(); break; case WIDX_TEMPERATURE_DROPDOWN: - if (dropdownIndex != static_cast(Config::Get().general.TemperatureFormat)) + if (dropdownIndex != static_cast(Config::Get().general.temperatureFormat)) { - Config::Get().general.TemperatureFormat = static_cast(dropdownIndex); + Config::Get().general.temperatureFormat = static_cast(dropdownIndex); Config::Save(); GfxInvalidateScreen(); } @@ -1327,7 +1327,7 @@ namespace OpenRCT2::Ui::Windows } else { - Config::Get().general.Language = dropdownIndex + 1; + Config::Get().general.language = dropdownIndex + 1; Config::Save(); GfxInvalidateScreen(); } @@ -1335,9 +1335,9 @@ namespace OpenRCT2::Ui::Windows } break; case WIDX_DATE_FORMAT_DROPDOWN: - if (dropdownIndex != Config::Get().general.DateFormat) + if (dropdownIndex != Config::Get().general.dateFormat) { - Config::Get().general.DateFormat = static_cast(dropdownIndex); + Config::Get().general.dateFormat = static_cast(dropdownIndex); Config::Save(); GfxInvalidateScreen(); } @@ -1352,12 +1352,12 @@ namespace OpenRCT2::Ui::Windows ft.Add(LanguagesDescriptors[LocalisationService_GetCurrentLanguage()].native_name); // Currency: pounds, dollars, etc. (10 total) - widgets[WIDX_CURRENCY].text = CurrencyDescriptors[EnumValue(Config::Get().general.CurrencyFormat)].stringId; + widgets[WIDX_CURRENCY].text = CurrencyDescriptors[EnumValue(Config::Get().general.currencyFormat)].stringId; // Distance: metric / imperial / si { StringId stringId = kStringIdNone; - switch (Config::Get().general.MeasurementFormat) + switch (Config::Get().general.measurementFormat) { case MeasurementFormat::Imperial: stringId = STR_IMPERIAL; @@ -1373,15 +1373,15 @@ namespace OpenRCT2::Ui::Windows } // Date format - widgets[WIDX_DATE_FORMAT].text = DateFormatStringIDs[Config::Get().general.DateFormat]; + widgets[WIDX_DATE_FORMAT].text = DateFormatStringIDs[Config::Get().general.dateFormat]; // Temperature: celsius/fahrenheit - widgets[WIDX_TEMPERATURE].text = Config::Get().general.TemperatureFormat == TemperatureUnit::Fahrenheit + widgets[WIDX_TEMPERATURE].text = Config::Get().general.temperatureFormat == TemperatureUnit::Fahrenheit ? STR_FAHRENHEIT : STR_CELSIUS; // Height: units/real values - widgets[WIDX_HEIGHT_LABELS].text = Config::Get().general.ShowHeightAsUnits ? STR_HEIGHT_IN_UNITS : STR_REAL_VALUES; + widgets[WIDX_HEIGHT_LABELS].text = Config::Get().general.showHeightAsUnits ? STR_HEIGHT_IN_UNITS : STR_REAL_VALUES; } #pragma endregion @@ -1392,15 +1392,15 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_SOUND_CHECKBOX: - Config::Get().sound.SoundEnabled = !Config::Get().sound.SoundEnabled; + Config::Get().sound.soundEnabled = !Config::Get().sound.soundEnabled; Config::Save(); invalidate(); break; case WIDX_MASTER_SOUND_CHECKBOX: { - Config::Get().sound.MasterSoundEnabled = !Config::Get().sound.MasterSoundEnabled; - if (!Config::Get().sound.MasterSoundEnabled) + Config::Get().sound.masterSoundEnabled = !Config::Get().sound.masterSoundEnabled; + if (!Config::Get().sound.masterSoundEnabled) OpenRCT2::Audio::Pause(); else OpenRCT2::Audio::Resume(); @@ -1413,8 +1413,8 @@ namespace OpenRCT2::Ui::Windows } case WIDX_MUSIC_CHECKBOX: - Config::Get().sound.RideMusicEnabled = !Config::Get().sound.RideMusicEnabled; - if (!Config::Get().sound.RideMusicEnabled) + Config::Get().sound.rideMusicEnabled = !Config::Get().sound.rideMusicEnabled; + if (!Config::Get().sound.rideMusicEnabled) { OpenRCT2::RideAudio::StopAllChannels(); } @@ -1423,7 +1423,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_AUDIO_FOCUS_CHECKBOX: - Config::Get().sound.audio_focus = !Config::Get().sound.audio_focus; + Config::Get().sound.audioFocus = !Config::Get().sound.audioFocus; Config::Save(); invalidate(); break; @@ -1459,7 +1459,7 @@ namespace OpenRCT2::Ui::Windows if (theme.Kind == TitleMusicKind::RCT1 && !rct1MusicThemeIsAvailable) continue; - if (Config::Get().sound.TitleMusic == theme.Kind) + if (Config::Get().sound.titleMusic == theme.Kind) checkedIndex = numItems; gDropdown.items[numItems++] = Dropdown::MenuLabel(theme.Name); @@ -1483,13 +1483,13 @@ namespace OpenRCT2::Ui::Windows if (dropdownIndex == 0) { audioContext.SetOutputDevice(""); - Config::Get().sound.Device = ""; + Config::Get().sound.device = ""; } else { const auto& deviceName = GetDeviceName(dropdownIndex); audioContext.SetOutputDevice(deviceName); - Config::Get().sound.Device = deviceName; + Config::Get().sound.device = deviceName; } Config::Save(); OpenRCT2::Audio::PlayTitleMusic(); @@ -1507,12 +1507,12 @@ namespace OpenRCT2::Ui::Windows dropdownIndex++; } - Config::Get().sound.TitleMusic = TitleThemeOptions[dropdownIndex].Kind; + Config::Get().sound.titleMusic = TitleThemeOptions[dropdownIndex].Kind; Config::Save(); invalidate(); OpenRCT2::Audio::StopTitleMusic(); - if (Config::Get().sound.TitleMusic != TitleMusicKind::None) + if (Config::Get().sound.titleMusic != TitleMusicKind::None) { OpenRCT2::Audio::PlayTitleMusic(); } @@ -1526,9 +1526,9 @@ namespace OpenRCT2::Ui::Windows const auto& masterVolumeWidget = widgets[WIDX_MASTER_VOLUME]; const auto& masterVolumeScroll = scrolls[0]; uint8_t masterVolume = GetScrollPercentage(masterVolumeWidget, masterVolumeScroll); - if (masterVolume != Config::Get().sound.MasterVolume) + if (masterVolume != Config::Get().sound.masterVolume) { - Config::Get().sound.MasterVolume = masterVolume; + Config::Get().sound.masterVolume = masterVolume; Config::Save(); invalidateWidget(WIDX_MASTER_VOLUME); } @@ -1536,9 +1536,9 @@ namespace OpenRCT2::Ui::Windows const auto& soundVolumeWidget = widgets[WIDX_MASTER_VOLUME]; const auto& soundVolumeScroll = scrolls[1]; uint8_t soundVolume = GetScrollPercentage(soundVolumeWidget, soundVolumeScroll); - if (soundVolume != Config::Get().sound.SoundVolume) + if (soundVolume != Config::Get().sound.soundVolume) { - Config::Get().sound.SoundVolume = soundVolume; + Config::Get().sound.soundVolume = soundVolume; Config::Save(); invalidateWidget(WIDX_SOUND_VOLUME); } @@ -1546,9 +1546,9 @@ namespace OpenRCT2::Ui::Windows const auto& musicVolumeWidget = widgets[WIDX_MASTER_VOLUME]; const auto& musicVolumeScroll = scrolls[2]; uint8_t rideMusicVolume = GetScrollPercentage(musicVolumeWidget, musicVolumeScroll); - if (rideMusicVolume != Config::Get().sound.AudioFocus) + if (rideMusicVolume != Config::Get().sound.rideMusicVolume) { - Config::Get().sound.AudioFocus = rideMusicVolume; + Config::Get().sound.rideMusicVolume = rideMusicVolume; Config::Save(); invalidateWidget(WIDX_MUSIC_VOLUME); } @@ -1598,7 +1598,7 @@ namespace OpenRCT2::Ui::Windows StringId GetTitleMusicName() const { auto theme = std::find_if(std::begin(TitleThemeOptions), std::end(TitleThemeOptions), [](auto&& option) { - return Config::Get().sound.TitleMusic == option.Kind; + return Config::Get().sound.titleMusic == option.Kind; }); if (theme != std::end(TitleThemeOptions)) return theme->Name; @@ -1636,19 +1636,19 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_TITLE_MUSIC].text = GetTitleMusicName(); - setCheckboxValue(WIDX_SOUND_CHECKBOX, Config::Get().sound.SoundEnabled); - setCheckboxValue(WIDX_MASTER_SOUND_CHECKBOX, Config::Get().sound.MasterSoundEnabled); - setCheckboxValue(WIDX_MUSIC_CHECKBOX, Config::Get().sound.RideMusicEnabled); - setCheckboxValue(WIDX_AUDIO_FOCUS_CHECKBOX, Config::Get().sound.audio_focus); - widgetSetEnabled(*this, WIDX_SOUND_CHECKBOX, Config::Get().sound.MasterSoundEnabled); - widgetSetEnabled(*this, WIDX_MUSIC_CHECKBOX, Config::Get().sound.MasterSoundEnabled); + setCheckboxValue(WIDX_SOUND_CHECKBOX, Config::Get().sound.soundEnabled); + setCheckboxValue(WIDX_MASTER_SOUND_CHECKBOX, Config::Get().sound.masterSoundEnabled); + setCheckboxValue(WIDX_MUSIC_CHECKBOX, Config::Get().sound.rideMusicEnabled); + setCheckboxValue(WIDX_AUDIO_FOCUS_CHECKBOX, Config::Get().sound.audioFocus); + widgetSetEnabled(*this, WIDX_SOUND_CHECKBOX, Config::Get().sound.masterSoundEnabled); + widgetSetEnabled(*this, WIDX_MUSIC_CHECKBOX, Config::Get().sound.masterSoundEnabled); // Initialize only on first frame, otherwise the scrollbars won't be able to be modified if (currentFrame == 0) { - initialiseScrollPosition(WIDX_MASTER_VOLUME, 0, Config::Get().sound.MasterVolume); - initialiseScrollPosition(WIDX_SOUND_VOLUME, 1, Config::Get().sound.SoundVolume); - initialiseScrollPosition(WIDX_MUSIC_VOLUME, 2, Config::Get().sound.AudioFocus); + initialiseScrollPosition(WIDX_MASTER_VOLUME, 0, Config::Get().sound.masterVolume); + initialiseScrollPosition(WIDX_SOUND_VOLUME, 1, Config::Get().sound.soundVolume); + initialiseScrollPosition(WIDX_MUSIC_VOLUME, 2, Config::Get().sound.rideMusicVolume); } } @@ -1665,45 +1665,45 @@ namespace OpenRCT2::Ui::Windows ContextOpenWindow(WindowClass::keyboardShortcutList); break; case WIDX_SCREEN_EDGE_SCROLLING: - Config::Get().general.EdgeScrolling ^= 1; + Config::Get().general.edgeScrolling ^= 1; Config::Save(); invalidate(); break; case WIDX_TRAP_CURSOR: - Config::Get().general.TrapCursor ^= 1; + Config::Get().general.trapCursor ^= 1; Config::Save(); - ContextSetCursorTrap(Config::Get().general.TrapCursor); + ContextSetCursorTrap(Config::Get().general.trapCursor); invalidate(); break; case WIDX_ZOOM_TO_CURSOR: - Config::Get().general.ZoomToCursor ^= 1; + Config::Get().general.zoomToCursor ^= 1; Config::Save(); invalidate(); break; case WIDX_WINDOW_BUTTONS_ON_THE_LEFT: - Config::Get().interface.WindowButtonsOnTheLeft ^= 1; + Config::Get().interface.windowButtonsOnTheLeft ^= 1; Config::Save(); invalidate(); windowMgr->InvalidateAll(); WindowVisitEach([](WindowBase* w) { w->resizeFrame(); }); break; case WIDX_ENLARGED_UI: - Config::Get().interface.EnlargedUi ^= 1; - if (Config::Get().interface.EnlargedUi == false) - Config::Get().interface.TouchEnhancements = false; + Config::Get().interface.enlargedUi ^= 1; + if (Config::Get().interface.enlargedUi == false) + Config::Get().interface.touchEnhancements = false; Config::Save(); invalidate(); windowMgr->InvalidateAll(); WindowVisitEach([](WindowBase* w) { w->resizeFrame(); }); break; case WIDX_TOUCH_ENHANCEMENTS: - Config::Get().interface.TouchEnhancements ^= 1; + Config::Get().interface.touchEnhancements ^= 1; Config::Save(); invalidate(); windowMgr->InvalidateAll(); break; case WIDX_INVERT_DRAG: - Config::Get().general.InvertViewportDrag ^= 1; + Config::Get().general.invertViewportDrag ^= 1; Config::Save(); invalidate(); break; @@ -1712,15 +1712,15 @@ namespace OpenRCT2::Ui::Windows void ControlsPrepareDraw() { - setCheckboxValue(WIDX_SCREEN_EDGE_SCROLLING, Config::Get().general.EdgeScrolling); - setCheckboxValue(WIDX_TRAP_CURSOR, Config::Get().general.TrapCursor); - setCheckboxValue(WIDX_INVERT_DRAG, Config::Get().general.InvertViewportDrag); - setCheckboxValue(WIDX_ZOOM_TO_CURSOR, Config::Get().general.ZoomToCursor); - setCheckboxValue(WIDX_WINDOW_BUTTONS_ON_THE_LEFT, Config::Get().interface.WindowButtonsOnTheLeft); - setCheckboxValue(WIDX_ENLARGED_UI, Config::Get().interface.EnlargedUi); - setCheckboxValue(WIDX_TOUCH_ENHANCEMENTS, Config::Get().interface.TouchEnhancements); + setCheckboxValue(WIDX_SCREEN_EDGE_SCROLLING, Config::Get().general.edgeScrolling); + setCheckboxValue(WIDX_TRAP_CURSOR, Config::Get().general.trapCursor); + setCheckboxValue(WIDX_INVERT_DRAG, Config::Get().general.invertViewportDrag); + setCheckboxValue(WIDX_ZOOM_TO_CURSOR, Config::Get().general.zoomToCursor); + setCheckboxValue(WIDX_WINDOW_BUTTONS_ON_THE_LEFT, Config::Get().interface.windowButtonsOnTheLeft); + setCheckboxValue(WIDX_ENLARGED_UI, Config::Get().interface.enlargedUi); + setCheckboxValue(WIDX_TOUCH_ENHANCEMENTS, Config::Get().interface.touchEnhancements); - widgetSetEnabled(*this, WIDX_TOUCH_ENHANCEMENTS, Config::Get().interface.EnlargedUi); + widgetSetEnabled(*this, WIDX_TOUCH_ENHANCEMENTS, Config::Get().interface.enlargedUi); // Initialize scroll positions for sliders only on first frame if (currentFrame == 0) @@ -1754,31 +1754,31 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_TOOLBAR_BUTTONS_CENTRED: - ToggleToolbarSetting(Config::Get().interface.ToolbarButtonsCentred); + ToggleToolbarSetting(Config::Get().interface.toolbarButtonsCentred); break; case WIDX_TOOLBAR_SHOW_FINANCES: - ToggleToolbarSetting(Config::Get().interface.ToolbarShowFinances); + ToggleToolbarSetting(Config::Get().interface.toolbarShowFinances); break; case WIDX_TOOLBAR_SHOW_RESEARCH: - ToggleToolbarSetting(Config::Get().interface.ToolbarShowResearch); + ToggleToolbarSetting(Config::Get().interface.toolbarShowResearch); break; case WIDX_TOOLBAR_SHOW_CHEATS: - ToggleToolbarSetting(Config::Get().interface.ToolbarShowCheats); + ToggleToolbarSetting(Config::Get().interface.toolbarShowCheats); break; case WIDX_TOOLBAR_SHOW_NEWS: - ToggleToolbarSetting(Config::Get().interface.ToolbarShowNews); + ToggleToolbarSetting(Config::Get().interface.toolbarShowNews); break; case WIDX_TOOLBAR_SHOW_MUTE: - ToggleToolbarSetting(Config::Get().interface.ToolbarShowMute); + ToggleToolbarSetting(Config::Get().interface.toolbarShowMute); break; case WIDX_TOOLBAR_SHOW_CHAT: - ToggleToolbarSetting(Config::Get().interface.ToolbarShowChat); + ToggleToolbarSetting(Config::Get().interface.toolbarShowChat); break; case WIDX_TOOLBAR_SHOW_ZOOM: - ToggleToolbarSetting(Config::Get().interface.ToolbarShowZoom); + ToggleToolbarSetting(Config::Get().interface.toolbarShowZoom); break; case WIDX_TOOLBAR_SHOW_ROTATE_ANTI_CLOCKWISE: - ToggleToolbarSetting(Config::Get().interface.ToolbarShowRotateAnticlockwise); + ToggleToolbarSetting(Config::Get().interface.toolbarShowRotateAnticlockwise); break; case WIDX_THEMES_BUTTON: ContextOpenWindow(WindowClass::themes); @@ -1827,15 +1827,15 @@ namespace OpenRCT2::Ui::Windows void InterfacePrepareDraw() { - setCheckboxValue(WIDX_TOOLBAR_BUTTONS_CENTRED, Config::Get().interface.ToolbarButtonsCentred); - setCheckboxValue(WIDX_TOOLBAR_SHOW_FINANCES, Config::Get().interface.ToolbarShowFinances); - setCheckboxValue(WIDX_TOOLBAR_SHOW_RESEARCH, Config::Get().interface.ToolbarShowResearch); - setCheckboxValue(WIDX_TOOLBAR_SHOW_CHEATS, Config::Get().interface.ToolbarShowCheats); - setCheckboxValue(WIDX_TOOLBAR_SHOW_NEWS, Config::Get().interface.ToolbarShowNews); - setCheckboxValue(WIDX_TOOLBAR_SHOW_MUTE, Config::Get().interface.ToolbarShowMute); - setCheckboxValue(WIDX_TOOLBAR_SHOW_CHAT, Config::Get().interface.ToolbarShowChat); - setCheckboxValue(WIDX_TOOLBAR_SHOW_ZOOM, Config::Get().interface.ToolbarShowZoom); - setCheckboxValue(WIDX_TOOLBAR_SHOW_ROTATE_ANTI_CLOCKWISE, Config::Get().interface.ToolbarShowRotateAnticlockwise); + setCheckboxValue(WIDX_TOOLBAR_BUTTONS_CENTRED, Config::Get().interface.toolbarButtonsCentred); + setCheckboxValue(WIDX_TOOLBAR_SHOW_FINANCES, Config::Get().interface.toolbarShowFinances); + setCheckboxValue(WIDX_TOOLBAR_SHOW_RESEARCH, Config::Get().interface.toolbarShowResearch); + setCheckboxValue(WIDX_TOOLBAR_SHOW_CHEATS, Config::Get().interface.toolbarShowCheats); + setCheckboxValue(WIDX_TOOLBAR_SHOW_NEWS, Config::Get().interface.toolbarShowNews); + setCheckboxValue(WIDX_TOOLBAR_SHOW_MUTE, Config::Get().interface.toolbarShowMute); + setCheckboxValue(WIDX_TOOLBAR_SHOW_CHAT, Config::Get().interface.toolbarShowChat); + setCheckboxValue(WIDX_TOOLBAR_SHOW_ZOOM, Config::Get().interface.toolbarShowZoom); + setCheckboxValue(WIDX_TOOLBAR_SHOW_ROTATE_ANTI_CLOCKWISE, Config::Get().interface.toolbarShowRotateAnticlockwise); size_t activeAvailableThemeIndex = ThemeManagerGetAvailableThemeIndex(); const utf8* activeThemeName = ThemeManagerGetAvailableThemeName(activeAvailableThemeIndex); @@ -1851,43 +1851,43 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_REAL_NAMES_GUESTS_CHECKBOX: - Config::Get().general.ShowRealNamesOfGuests ^= 1; + Config::Get().general.showRealNamesOfGuests ^= 1; Config::Save(); invalidate(); PeepUpdateNames(); break; case WIDX_REAL_NAMES_STAFF_CHECKBOX: - Config::Get().general.ShowRealNamesOfStaff ^= 1; + Config::Get().general.showRealNamesOfStaff ^= 1; Config::Save(); invalidate(); PeepUpdateNames(); break; case WIDX_AUTO_STAFF_PLACEMENT: - Config::Get().general.AutoStaffPlacement ^= 1; + Config::Get().general.autoStaffPlacement ^= 1; Config::Save(); invalidate(); break; case WIDX_SCENARIO_UNLOCKING: { - Config::Get().general.ScenarioUnlockingEnabled ^= 1; + Config::Get().general.scenarioUnlockingEnabled ^= 1; Config::Save(); auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::scenarioSelect); break; } case WIDX_AUTO_OPEN_SHOPS: - Config::Get().general.AutoOpenShops = !Config::Get().general.AutoOpenShops; + Config::Get().general.autoOpenShops = !Config::Get().general.autoOpenShops; Config::Save(); invalidate(); break; case WIDX_ALLOW_EARLY_COMPLETION: - Config::Get().general.AllowEarlyCompletion ^= 1; + Config::Get().general.allowEarlyCompletion ^= 1; // only the server can control this setting and needs to send the // current value of allow_early_completion to all clients if (Network::GetMode() == Network::Mode::server) { auto setAllowEarlyCompletionAction = GameActions::ScenarioSetSettingAction( - GameActions::ScenarioSetSetting::AllowEarlyCompletion, Config::Get().general.AllowEarlyCompletion); + GameActions::ScenarioSetSetting::AllowEarlyCompletion, Config::Get().general.allowEarlyCompletion); GameActions::Execute(&setAllowEarlyCompletionAction, getGameState()); } Config::Save(); @@ -1919,7 +1919,7 @@ namespace OpenRCT2::Ui::Windows { windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], Dropdown::Flag::StayOpen, numItems); - auto selectedIndex = Config::Get().interface.RandomTitleSequence + auto selectedIndex = Config::Get().interface.randomTitleSequence ? numItems - 1 : static_cast(TitleGetCurrentSequence()); gDropdown.items[selectedIndex].setChecked(true); @@ -1946,7 +1946,7 @@ namespace OpenRCT2::Ui::Windows } ShowDropdown(widget, 7); - gDropdown.items[Config::Get().general.DefaultInspectionInterval].setChecked(true); + gDropdown.items[Config::Get().general.defaultInspectionInterval].setChecked(true); break; } } @@ -1960,23 +1960,23 @@ namespace OpenRCT2::Ui::Windows auto numItems = static_cast(TitleSequenceManager::GetCount()); if (dropdownIndex < numItems && dropdownIndex != static_cast(TitleGetCurrentSequence())) { - Config::Get().interface.RandomTitleSequence = false; + Config::Get().interface.randomTitleSequence = false; TitleSequenceChangePreset(static_cast(dropdownIndex)); Config::Save(); invalidate(); } else if (dropdownIndex == numItems + 1) { - Config::Get().interface.RandomTitleSequence = true; + Config::Get().interface.randomTitleSequence = true; Config::Save(); invalidate(); } break; } case WIDX_DEFAULT_INSPECTION_INTERVAL_DROPDOWN: - if (dropdownIndex != Config::Get().general.DefaultInspectionInterval) + if (dropdownIndex != Config::Get().general.defaultInspectionInterval) { - Config::Get().general.DefaultInspectionInterval = static_cast(dropdownIndex); + Config::Get().general.defaultInspectionInterval = static_cast(dropdownIndex); Config::Save(); invalidate(); } @@ -1997,7 +1997,7 @@ namespace OpenRCT2::Ui::Windows void MiscPrepareDraw() { auto ft = Formatter::Common(); - if (Config::Get().interface.RandomTitleSequence) + if (Config::Get().interface.randomTitleSequence) { ft.Add(STR_TITLE_SEQUENCE_RANDOM); } @@ -2026,21 +2026,21 @@ namespace OpenRCT2::Ui::Windows } } - setCheckboxValue(WIDX_REAL_NAMES_GUESTS_CHECKBOX, Config::Get().general.ShowRealNamesOfGuests); - setCheckboxValue(WIDX_REAL_NAMES_STAFF_CHECKBOX, Config::Get().general.ShowRealNamesOfStaff); - setCheckboxValue(WIDX_AUTO_STAFF_PLACEMENT, Config::Get().general.AutoStaffPlacement); - setCheckboxValue(WIDX_AUTO_OPEN_SHOPS, Config::Get().general.AutoOpenShops); - setCheckboxValue(WIDX_ALLOW_EARLY_COMPLETION, Config::Get().general.AllowEarlyCompletion); + setCheckboxValue(WIDX_REAL_NAMES_GUESTS_CHECKBOX, Config::Get().general.showRealNamesOfGuests); + setCheckboxValue(WIDX_REAL_NAMES_STAFF_CHECKBOX, Config::Get().general.showRealNamesOfStaff); + setCheckboxValue(WIDX_AUTO_STAFF_PLACEMENT, Config::Get().general.autoStaffPlacement); + setCheckboxValue(WIDX_AUTO_OPEN_SHOPS, Config::Get().general.autoOpenShops); + setCheckboxValue(WIDX_ALLOW_EARLY_COMPLETION, Config::Get().general.allowEarlyCompletion); if (Config::Get().interface.scenarioPreviewScreenshots) widgets[WIDX_SCENARIO_PREVIEWS].text = STR_SCENARIO_PREVIEWS_SCREENSHOTS; else widgets[WIDX_SCENARIO_PREVIEWS].text = STR_SCENARIO_PREVIEWS_MINIMAPS; - setCheckboxValue(WIDX_SCENARIO_UNLOCKING, Config::Get().general.ScenarioUnlockingEnabled); + setCheckboxValue(WIDX_SCENARIO_UNLOCKING, Config::Get().general.scenarioUnlockingEnabled); widgets[WIDX_DEFAULT_INSPECTION_INTERVAL].text = kRideInspectionIntervalNames - [Config::Get().general.DefaultInspectionInterval]; + [Config::Get().general.defaultInspectionInterval]; } #pragma endregion @@ -2051,22 +2051,22 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_DEBUGGING_TOOLS: - Config::Get().general.DebuggingTools ^= 1; + Config::Get().general.debuggingTools ^= 1; Config::Save(); GfxInvalidateScreen(); break; case WIDX_EXPORT_CUSTOM_OBJECTS_CHECKBOX: - Config::Get().general.SavePluginData ^= 1; + Config::Get().general.savePluginData ^= 1; Config::Save(); invalidate(); break; case WIDX_STAY_CONNECTED_AFTER_DESYNC: - Config::Get().network.StayConnected = !Config::Get().network.StayConnected; + Config::Get().network.stayConnected = !Config::Get().network.stayConnected; Config::Save(); invalidate(); break; case WIDX_ALWAYS_NATIVE_LOADSAVE: - Config::Get().general.UseNativeBrowseDialog = !Config::Get().general.UseNativeBrowseDialog; + Config::Get().general.useNativeBrowseDialog = !Config::Get().general.useNativeBrowseDialog; Config::Save(); invalidate(); break; @@ -2083,7 +2083,7 @@ namespace OpenRCT2::Ui::Windows { if (CsgAtLocationIsUsable(rct1path)) { - Config::Get().general.RCT1Path = std::move(rct1path); + Config::Get().general.rct1Path = std::move(rct1path); Config::Get().interface.scenarioSelectLastTab = 0; Config::Save(); ContextShowError(STR_RESTART_REQUIRED, kStringIdNone, {}); @@ -2107,9 +2107,9 @@ namespace OpenRCT2::Ui::Windows break; } case WIDX_PATH_TO_RCT1_CLEAR: - if (!Config::Get().general.RCT1Path.empty()) + if (!Config::Get().general.rct1Path.empty()) { - Config::Get().general.RCT1Path.clear(); + Config::Get().general.rct1Path.clear(); Config::Save(); } invalidate(); @@ -2141,19 +2141,19 @@ namespace OpenRCT2::Ui::Windows } ShowDropdown(widget, AUTOSAVE_NEVER + 1); - gDropdown.items[Config::Get().general.AutosaveFrequency].setChecked(true); + gDropdown.items[Config::Get().general.autosaveFrequency].setChecked(true); break; case WIDX_AUTOSAVE_AMOUNT_UP: - Config::Get().general.AutosaveAmount += 1; + Config::Get().general.autosaveAmount += 1; Config::Save(); invalidateWidget(WIDX_AUTOSAVE_FREQUENCY); invalidateWidget(WIDX_AUTOSAVE_FREQUENCY_DROPDOWN); invalidateWidget(WIDX_AUTOSAVE_AMOUNT); break; case WIDX_AUTOSAVE_AMOUNT_DOWN: - if (Config::Get().general.AutosaveAmount > 1) + if (Config::Get().general.autosaveAmount > 1) { - Config::Get().general.AutosaveAmount -= 1; + Config::Get().general.autosaveAmount -= 1; Config::Save(); invalidateWidget(WIDX_AUTOSAVE_FREQUENCY); invalidateWidget(WIDX_AUTOSAVE_FREQUENCY_DROPDOWN); @@ -2167,9 +2167,9 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_AUTOSAVE_FREQUENCY_DROPDOWN: - if (dropdownIndex != Config::Get().general.AutosaveFrequency) + if (dropdownIndex != Config::Get().general.autosaveFrequency) { - Config::Get().general.AutosaveFrequency = static_cast(dropdownIndex); + Config::Get().general.autosaveFrequency = static_cast(dropdownIndex); Config::Save(); invalidate(); } @@ -2179,7 +2179,7 @@ namespace OpenRCT2::Ui::Windows void AdvancedPrepareDraw() { - if (!Config::Get().general.RCT1Path.empty()) + if (!Config::Get().general.rct1Path.empty()) { widgets[WIDX_PATH_TO_RCT1_PATH].type = WidgetType::label; widgets[WIDX_PATH_TO_RCT1_BROWSE].type = WidgetType::empty; @@ -2206,12 +2206,12 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_PATH_TO_RCT1_BROWSE].left = widgets[WIDX_PATH_TO_RCT1_BROWSE].right - browseLabelWidth; } - setCheckboxValue(WIDX_EXPORT_CUSTOM_OBJECTS_CHECKBOX, Config::Get().general.SavePluginData); - setCheckboxValue(WIDX_ALWAYS_NATIVE_LOADSAVE, Config::Get().general.UseNativeBrowseDialog); - widgets[WIDX_AUTOSAVE_FREQUENCY].text = AutosaveNames[Config::Get().general.AutosaveFrequency]; + setCheckboxValue(WIDX_EXPORT_CUSTOM_OBJECTS_CHECKBOX, Config::Get().general.savePluginData); + setCheckboxValue(WIDX_ALWAYS_NATIVE_LOADSAVE, Config::Get().general.useNativeBrowseDialog); + widgets[WIDX_AUTOSAVE_FREQUENCY].text = AutosaveNames[Config::Get().general.autosaveFrequency]; - setCheckboxValue(WIDX_DEBUGGING_TOOLS, Config::Get().general.DebuggingTools); - setCheckboxValue(WIDX_STAY_CONNECTED_AFTER_DESYNC, Config::Get().network.StayConnected); + setCheckboxValue(WIDX_DEBUGGING_TOOLS, Config::Get().general.debuggingTools); + setCheckboxValue(WIDX_STAY_CONNECTED_AFTER_DESYNC, Config::Get().network.stayConnected); #ifdef __EMSCRIPTEN__ widgets[WIDX_GROUP_ADVANCED].bottom = kAdvancedStart + 84 + getTitleBarDiffNormal(); @@ -2226,13 +2226,13 @@ namespace OpenRCT2::Ui::Windows void AdvancedDraw(RenderTarget& rt) { auto ft = Formatter(); - ft.Add(static_cast(Config::Get().general.AutosaveAmount)); + ft.Add(static_cast(Config::Get().general.autosaveAmount)); DrawTextBasic( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_AUTOSAVE_AMOUNT].left + 1, widgets[WIDX_AUTOSAVE_AMOUNT].top + 1 }, STR_WINDOW_COLOUR_2_COMMA32, ft, { colours[1] }); // Format RCT1 path - const auto normalisedPath = Platform::StrDecompToPrecomp(Config::Get().general.RCT1Path); + const auto normalisedPath = Platform::StrDecompToPrecomp(Config::Get().general.rct1Path); ft = Formatter(); ft.Add(STR_STRING); ft.Add(normalisedPath.c_str()); @@ -2252,14 +2252,14 @@ namespace OpenRCT2::Ui::Windows { if (widgetIndex == WIDX_PATH_TO_RCT1_PATH) { - if (Config::Get().general.RCT1Path.empty()) + if (Config::Get().general.rct1Path.empty()) { // No tooltip if the path is empty return { kStringIdNone, {} }; } auto ft = Formatter(); - ft.Add(Config::Get().general.RCT1Path.c_str()); + ft.Add(Config::Get().general.rct1Path.c_str()); return { fallback, ft }; } return { fallback, {} }; diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index cc432cab78..4ecffc3652 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -622,7 +622,7 @@ namespace OpenRCT2::Ui::Windows int32_t viewportFlags{}; if (viewport == nullptr) { - viewportFlags = Config::Get().general.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; + viewportFlags = Config::Get().general.alwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; } else { @@ -947,7 +947,7 @@ namespace OpenRCT2::Ui::Windows // Draw park size auto parkSize = gameState.park.size * 10; auto stringIndex = STR_PARK_SIZE_METRIC_LABEL; - if (Config::Get().general.MeasurementFormat == MeasurementFormat::Imperial) + if (Config::Get().general.measurementFormat == MeasurementFormat::Imperial) { stringIndex = STR_PARK_SIZE_IMPERIAL_LABEL; parkSize = SquaredMetresToSquaredFeet(parkSize); diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 9dd87718be..ad186f11e1 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -1565,7 +1565,7 @@ namespace OpenRCT2::Ui::Windows newViewportFlags = viewport->flags; removeViewport(); } - else if (Config::Get().general.AlwaysShowGridlines) + else if (Config::Get().general.alwaysShowGridlines) { newViewportFlags |= VIEWPORT_FLAG_GRIDLINES; } @@ -3997,7 +3997,7 @@ namespace OpenRCT2::Ui::Windows WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_10); - if (Config::Get().general.DebuggingTools && Network::GetMode() == Network::Mode::none) + if (Config::Get().general.debuggingTools && Network::GetMode() == Network::Mode::none) { widgets[WIDX_FORCE_BREAKDOWN].type = WidgetType::flatBtn; } diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 96f2bff5b5..f9a4d9e45b 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -311,7 +311,7 @@ namespace OpenRCT2::Ui::Windows if (RideTryGetOriginElement(*currentRide, nullptr)) { // Auto open shops if required. - if (currentRide->mode == RideMode::shopStall && Config::Get().general.AutoOpenShops) + if (currentRide->mode == RideMode::shopStall && Config::Get().general.autoOpenShops) { // HACK: Until we find a good a way to defer the game command for opening the shop, stop this // from getting stuck in an infinite loop as opening the currentRide will try to close this window diff --git a/src/openrct2-ui/windows/SavePrompt.cpp b/src/openrct2-ui/windows/SavePrompt.cpp index 413f99ffb2..b92126bc5a 100644 --- a/src/openrct2-ui/windows/SavePrompt.cpp +++ b/src/openrct2-ui/windows/SavePrompt.cpp @@ -211,7 +211,7 @@ namespace OpenRCT2::Ui::Windows return nullptr; } - if (!Config::Get().general.ConfirmationPrompt) + if (!Config::Get().general.confirmationPrompt) { /* game_load_or_quit_no_save_prompt() will exec requested task and close this window * immediately again. diff --git a/src/openrct2-ui/windows/ScenarioSelect.cpp b/src/openrct2-ui/windows/ScenarioSelect.cpp index ba884d1429..81666e02ff 100644 --- a/src/openrct2-ui/windows/ScenarioSelect.cpp +++ b/src/openrct2-ui/windows/ScenarioSelect.cpp @@ -352,7 +352,7 @@ namespace OpenRCT2::Ui::Windows } // Scenario path - if (Config::Get().general.DebuggingTools) + if (Config::Get().general.debuggingTools) { const auto shortPath = ShortenPath(scenario->Path, width - 6 - kTabWidth, FontStyle::Medium); @@ -429,7 +429,7 @@ namespace OpenRCT2::Ui::Windows pressedWidgets |= 1LL << (selectedTab + WIDX_TAB1); - const int32_t bottomMargin = Config::Get().general.DebuggingTools ? 17 : 5; + const int32_t bottomMargin = Config::Get().general.debuggingTools ? 17 : 5; widgets[WIDX_SCENARIOLIST].right = width - GetPreviewPaneWidth() - 2 * kPadding; widgets[WIDX_SCENARIOLIST].bottom = height - bottomMargin; } @@ -748,7 +748,7 @@ namespace OpenRCT2::Ui::Windows bool megaParkLocked = (rct1CompletedScenarios & rct1RequiredCompletedScenarios) != rct1RequiredCompletedScenarios; _listItems[megaParkListItemIndex.value()].scenario.is_locked = megaParkLocked; - if (megaParkLocked && Config::Get().general.ScenarioHideMegaPark) + if (megaParkLocked && Config::Get().general.scenarioHideMegaPark) { // Remove mega park _listItems.pop_back(); @@ -784,7 +784,7 @@ namespace OpenRCT2::Ui::Windows bool IsLockingEnabled() const { - if (!Config::Get().general.ScenarioUnlockingEnabled) + if (!Config::Get().general.scenarioUnlockingEnabled) return false; if (selectedTab >= 6) return false; diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 952de74eb9..1ed73fb851 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -881,7 +881,7 @@ namespace OpenRCT2::Ui::Windows DrawTextEllipsised(rt, { windowPos.x + 3, windowPos.y + height - 23 }, width - 19, STR_BLACK_STRING, ft); // Draw object author(s) if debugging tools are active - if (Config::Get().general.DebuggingTools) + if (Config::Get().general.debuggingTools) { auto sceneryObjectType = GetObjectTypeFromSceneryType(selectedSceneryEntry.SceneryType); auto& objManager = GetContext()->GetObjectManager(); @@ -2573,7 +2573,7 @@ namespace OpenRCT2::Ui::Windows rotation -= GetCurrentRotation(); rotation &= 0x3; - if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -2657,7 +2657,7 @@ namespace OpenRCT2::Ui::Windows rotation -= GetCurrentRotation(); rotation &= 0x3; - if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -2692,7 +2692,7 @@ namespace OpenRCT2::Ui::Windows return; } - if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -2783,7 +2783,7 @@ namespace OpenRCT2::Ui::Windows if (gridPos.IsNull()) return; - if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -2884,7 +2884,7 @@ namespace OpenRCT2::Ui::Windows rotation -= GetCurrentRotation(); rotation &= 0x3; - if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } @@ -2933,7 +2933,7 @@ namespace OpenRCT2::Ui::Windows } } - if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Off) { VirtualFloorSetHeight(gSceneryPlaceZ); } diff --git a/src/openrct2-ui/windows/ServerList.cpp b/src/openrct2-ui/windows/ServerList.cpp index e6568f89de..a6430c653b 100644 --- a/src/openrct2-ui/windows/ServerList.cpp +++ b/src/openrct2-ui/windows/ServerList.cpp @@ -91,7 +91,7 @@ namespace OpenRCT2::Ui::Windows void onOpen() override { - _playerName = Config::Get().network.PlayerName; + _playerName = Config::Get().network.playerName; setWidgets(_serverListWidgets); widgets[WIDX_PLAYER_NAME_INPUT].string = const_cast(_playerName.c_str()); initScrollWidgets(); @@ -275,7 +275,7 @@ namespace OpenRCT2::Ui::Windows return; _playerName = temp; - Config::Get().network.PlayerName = _playerName; + Config::Get().network.playerName = _playerName; widgets[WIDX_PLAYER_NAME_INPUT].string = const_cast(_playerName.c_str()); invalidateWidget(WIDX_PLAYER_NAME_INPUT); diff --git a/src/openrct2-ui/windows/ServerStart.cpp b/src/openrct2-ui/windows/ServerStart.cpp index 8f1781e719..e2e6806156 100644 --- a/src/openrct2-ui/windows/ServerStart.cpp +++ b/src/openrct2-ui/windows/ServerStart.cpp @@ -78,10 +78,10 @@ namespace OpenRCT2::Ui::Windows page = 0; listInformationType = 0; - snprintf(_port, 7, "%u", Config::Get().network.DefaultPort); - String::safeUtf8Copy(_name, Config::Get().network.ServerName.c_str(), sizeof(_name)); - String::safeUtf8Copy(_description, Config::Get().network.ServerDescription.c_str(), sizeof(_description)); - String::safeUtf8Copy(_greeting, Config::Get().network.ServerGreeting.c_str(), sizeof(_greeting)); + snprintf(_port, 7, "%u", Config::Get().network.defaultPort); + String::safeUtf8Copy(_name, Config::Get().network.serverName.c_str(), sizeof(_name)); + String::safeUtf8Copy(_description, Config::Get().network.serverDescription.c_str(), sizeof(_description)); + String::safeUtf8Copy(_greeting, Config::Get().network.serverGreeting.c_str(), sizeof(_greeting)); } void onMouseUp(WidgetIndex widgetIndex) override { @@ -106,23 +106,23 @@ namespace OpenRCT2::Ui::Windows WindowStartTextbox(*this, widgetIndex, _password, 32); break; case WIDX_MAXPLAYERS_INCREASE: - if (Config::Get().network.Maxplayers < 255) + if (Config::Get().network.maxplayers < 255) { - Config::Get().network.Maxplayers++; + Config::Get().network.maxplayers++; } Config::Save(); invalidate(); break; case WIDX_MAXPLAYERS_DECREASE: - if (Config::Get().network.Maxplayers > 1) + if (Config::Get().network.maxplayers > 1) { - Config::Get().network.Maxplayers--; + Config::Get().network.maxplayers--; } Config::Save(); invalidate(); break; case WIDX_ADVERTISE_CHECKBOX: - Config::Get().network.Advertise = !Config::Get().network.Advertise; + Config::Get().network.advertise = !Config::Get().network.advertise; Config::Save(); invalidate(); break; @@ -144,10 +144,10 @@ namespace OpenRCT2::Ui::Windows { ColourSchemeUpdateByClass(this, WindowClass::serverList); - setCheckboxValue(WIDX_ADVERTISE_CHECKBOX, Config::Get().network.Advertise); + setCheckboxValue(WIDX_ADVERTISE_CHECKBOX, Config::Get().network.advertise); auto ft = Formatter::Common(); ft.Increment(18); - ft.Add(Config::Get().network.Maxplayers); + ft.Add(Config::Get().network.maxplayers); } void onUpdate() override { @@ -177,7 +177,7 @@ namespace OpenRCT2::Ui::Windows tempPort = atoi(_port); if (tempPort > 0) { - Config::Get().network.DefaultPort = tempPort; + Config::Get().network.defaultPort = tempPort; Config::Save(); } @@ -192,7 +192,7 @@ namespace OpenRCT2::Ui::Windows // Don't allow empty server names if (_name[0] != '\0') { - Config::Get().network.ServerName = _name; + Config::Get().network.serverName = _name; Config::Save(); } @@ -203,7 +203,7 @@ namespace OpenRCT2::Ui::Windows return; String::safeUtf8Copy(_description, temp.c_str(), sizeof(_description)); - Config::Get().network.ServerDescription = _description; + Config::Get().network.serverDescription = _description; Config::Save(); invalidateWidget(WIDX_DESCRIPTION_INPUT); @@ -213,7 +213,7 @@ namespace OpenRCT2::Ui::Windows return; String::safeUtf8Copy(_greeting, temp.c_str(), sizeof(_greeting)); - Config::Get().network.ServerGreeting = _greeting; + Config::Get().network.serverGreeting = _greeting; Config::Save(); invalidateWidget(WIDX_GREETING_INPUT); @@ -257,7 +257,7 @@ namespace OpenRCT2::Ui::Windows GameNotifyMapChange(); if (GetContext()->LoadParkFromFile(path, false, true)) { - Network::BeginServer(Config::Get().network.DefaultPort, Config::Get().network.ListenAddress); + Network::BeginServer(Config::Get().network.defaultPort, Config::Get().network.listenAddress); } } @@ -267,7 +267,7 @@ namespace OpenRCT2::Ui::Windows { GameNotifyMapChange(); GetContext()->LoadParkFromFile(path); - Network::BeginServer(Config::Get().network.DefaultPort, Config::Get().network.ListenAddress); + Network::BeginServer(Config::Get().network.defaultPort, Config::Get().network.listenAddress); } } }; diff --git a/src/openrct2-ui/windows/Sign.cpp b/src/openrct2-ui/windows/Sign.cpp index d55d08138d..b028aca961 100644 --- a/src/openrct2-ui/windows/Sign.cpp +++ b/src/openrct2-ui/windows/Sign.cpp @@ -137,7 +137,7 @@ namespace OpenRCT2::Ui::Windows *this, windowPos + ScreenCoordsXY{ viewportWidget.left + 1, viewportWidget.top + 1 }, viewportWidget.width() - 1, viewportWidget.height() - 1, Focus(CoordsXYZ{ signViewPosition, viewZ })); - viewport->flags = Config::Get().general.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; + viewport->flags = Config::Get().general.alwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; invalidate(); return true; @@ -320,7 +320,7 @@ namespace OpenRCT2::Ui::Windows *this, windowPos + ScreenCoordsXY{ viewportWidget->left + 1, viewportWidget->top + 1 }, viewportWidget->width() - 1, viewportWidget->height() - 1, Focus(CoordsXYZ{ signViewPos })); if (viewport != nullptr) - viewport->flags = Config::Get().general.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; + viewport->flags = Config::Get().general.alwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE; invalidate(); } }; diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 9e06128912..cad0cc4ea6 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1137,7 +1137,7 @@ namespace OpenRCT2::Ui::Windows else { viewport_flags = 0; - if (Config::Get().general.AlwaysShowGridlines) + if (Config::Get().general.alwaysShowGridlines) viewport_flags |= VIEWPORT_FLAG_GRIDLINES; } diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index 98fb9d1187..b1d2d91996 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -511,7 +511,7 @@ namespace OpenRCT2::Ui::Windows */ void HireNewMember(StaffType staffType) { - bool autoPosition = Config::Get().general.AutoStaffPlacement; + bool autoPosition = Config::Get().general.autoStaffPlacement; if (GetInputManager().isModifierKeyPressed(ModifierKey::shift)) { autoPosition = autoPosition ^ 1; @@ -522,7 +522,7 @@ namespace OpenRCT2::Ui::Windows if (staffType == StaffType::handyman) { staffOrders = STAFF_ORDERS_SWEEPING | STAFF_ORDERS_WATER_FLOWERS | STAFF_ORDERS_EMPTY_BINS; - if (Config::Get().general.HandymenMowByDefault) + if (Config::Get().general.handymenMowByDefault) { staffOrders |= STAFF_ORDERS_MOWING; } diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index 384a5799d3..1ea3a557e9 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -317,7 +317,7 @@ namespace OpenRCT2::Ui::Windows auto mvpFlags = WindowGetMain()->viewport->flags; gDropdown.items[DDIDX_UNDERGROUND_INSIDE].setChecked(mvpFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE); - gDropdown.items[DDIDX_TRANSPARENT_WATER].setChecked(Config::Get().general.TransparentWater); + gDropdown.items[DDIDX_TRANSPARENT_WATER].setChecked(Config::Get().general.transparentWater); gDropdown.items[DDIDX_HIDE_BASE].setChecked(mvpFlags & VIEWPORT_FLAG_HIDE_BASE); gDropdown.items[DDIDX_HIDE_VERTICAL].setChecked(mvpFlags & VIEWPORT_FLAG_HIDE_VERTICAL); gDropdown.items[DDIDX_HIDE_RIDES].setChecked(mvpFlags & VIEWPORT_FLAG_HIDE_RIDES); @@ -348,7 +348,7 @@ namespace OpenRCT2::Ui::Windows w->viewport->flags ^= VIEWPORT_FLAG_UNDERGROUND_INSIDE; break; case DDIDX_TRANSPARENT_WATER: - Config::Get().general.TransparentWater ^= 1; + Config::Get().general.transparentWater ^= 1; Config::Save(); break; case DDIDX_HIDE_BASE: @@ -502,7 +502,7 @@ namespace OpenRCT2::Ui::Windows gDropdown.items[2] = Dropdown::MenuLabel(STR_SPEED_FAST); gDropdown.items[3] = Dropdown::MenuLabel(STR_SPEED_TURBO); - if (Config::Get().general.DebuggingTools) + if (Config::Get().general.debuggingTools) { num_items = 6; @@ -524,7 +524,7 @@ namespace OpenRCT2::Ui::Windows gDropdown.items[5].setChecked(true); } - if (Config::Get().general.DebuggingTools) + if (Config::Get().general.debuggingTools) { gDropdown.defaultIndex = (gGameSpeed == 8 ? 0 : gGameSpeed); } @@ -1108,35 +1108,35 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_RESEARCH].type = WidgetType::trnBtn; widgets[WIDX_FASTFORWARD].type = WidgetType::trnBtn; widgets[WIDX_CHEATS].type = WidgetType::trnBtn; - widgets[WIDX_DEBUG].type = Config::Get().general.DebuggingTools ? WidgetType::trnBtn : WidgetType::empty; + widgets[WIDX_DEBUG].type = Config::Get().general.debuggingTools ? WidgetType::trnBtn : WidgetType::empty; widgets[WIDX_NEWS].type = WidgetType::trnBtn; widgets[WIDX_NETWORK].type = WidgetType::trnBtn; } void HideDisabledButtons() { - if (!Config::Get().interface.ToolbarShowMute) + if (!Config::Get().interface.toolbarShowMute) widgets[WIDX_MUTE].type = WidgetType::empty; - if (!Config::Get().interface.ToolbarShowChat) + if (!Config::Get().interface.toolbarShowChat) widgets[WIDX_CHAT].type = WidgetType::empty; - if (!Config::Get().interface.ToolbarShowResearch) + if (!Config::Get().interface.toolbarShowResearch) widgets[WIDX_RESEARCH].type = WidgetType::empty; - if (!Config::Get().interface.ToolbarShowCheats) + if (!Config::Get().interface.toolbarShowCheats) widgets[WIDX_CHEATS].type = WidgetType::empty; - if (!Config::Get().interface.ToolbarShowNews) + if (!Config::Get().interface.toolbarShowNews) widgets[WIDX_NEWS].type = WidgetType::empty; - if (!Config::Get().interface.ToolbarShowZoom) + if (!Config::Get().interface.toolbarShowZoom) { widgets[WIDX_ZOOM_IN].type = WidgetType::empty; widgets[WIDX_ZOOM_OUT].type = WidgetType::empty; } - if (!Config::Get().interface.ToolbarShowRotateAnticlockwise) + if (!Config::Get().interface.toolbarShowRotateAnticlockwise) widgets[WIDX_ROTATE_ANTI_CLOCKWISE].type = WidgetType::empty; if (gLegacyScene == LegacyScene::scenarioEditor || gLegacyScene == LegacyScene::trackDesignsManager) @@ -1144,7 +1144,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_PAUSE].type = WidgetType::empty; } - if ((getGameState().park.flags & PARK_FLAGS_NO_MONEY) || !Config::Get().interface.ToolbarShowFinances) + if ((getGameState().park.flags & PARK_FLAGS_NO_MONEY) || !Config::Get().interface.toolbarShowFinances) widgets[WIDX_FINANCES].type = WidgetType::empty; } @@ -1364,7 +1364,7 @@ namespace OpenRCT2::Ui::Windows ApplyMapRotation(); ApplyFootpathPressed(); - if (!Config::Get().interface.ToolbarButtonsCentred) + if (!Config::Get().interface.toolbarButtonsCentred) AlignButtonsLeftRight(); else AlignButtonsCentre(); diff --git a/src/openrct2-ui/windows/TrackList.cpp b/src/openrct2-ui/windows/TrackList.cpp index 69368c6a0a..ebcff9bdca 100644 --- a/src/openrct2-ui/windows/TrackList.cpp +++ b/src/openrct2-ui/windows/TrackList.cpp @@ -423,7 +423,7 @@ namespace OpenRCT2::Ui::Windows } // When debugging tools are on, shift everything up a bit to make room for displaying the path. - const int32_t bottomMargin = Config::Get().general.DebuggingTools ? (kWindowPadding + kDebugPathHeight) + const int32_t bottomMargin = Config::Get().general.debuggingTools ? (kWindowPadding + kDebugPathHeight) : kWindowPadding; widgets[WIDX_TRACK_LIST].bottom = height - bottomMargin; widgets[WIDX_ROTATE].bottom = height - bottomMargin; @@ -471,7 +471,7 @@ namespace OpenRCT2::Ui::Windows u8string path = _trackDesigns[trackIndex].path; // Show track file path (in debug mode) - if (Config::Get().general.DebuggingTools) + if (Config::Get().general.debuggingTools) { const auto shortPath = ShortenPath(path, width, FontStyle::Medium); auto ft = Formatter(); diff --git a/src/openrct2-ui/windows/Transparency.cpp b/src/openrct2-ui/windows/Transparency.cpp index 443f55a40f..0c13353dec 100644 --- a/src/openrct2-ui/windows/Transparency.cpp +++ b/src/openrct2-ui/windows/Transparency.cpp @@ -230,12 +230,12 @@ namespace OpenRCT2::Ui::Windows void SaveInConfig(uint32_t wflags) { - Config::Get().general.InvisibleRides = wflags & VIEWPORT_FLAG_INVISIBLE_RIDES; - Config::Get().general.InvisibleVehicles = wflags & VIEWPORT_FLAG_INVISIBLE_VEHICLES; - Config::Get().general.InvisibleScenery = wflags & VIEWPORT_FLAG_INVISIBLE_SCENERY; - Config::Get().general.InvisibleTrees = wflags & VIEWPORT_FLAG_INVISIBLE_VEGETATION; - Config::Get().general.InvisiblePaths = wflags & VIEWPORT_FLAG_INVISIBLE_PATHS; - Config::Get().general.InvisibleSupports = wflags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS; + Config::Get().general.invisibleRides = wflags & VIEWPORT_FLAG_INVISIBLE_RIDES; + Config::Get().general.invisibleVehicles = wflags & VIEWPORT_FLAG_INVISIBLE_VEHICLES; + Config::Get().general.invisibleScenery = wflags & VIEWPORT_FLAG_INVISIBLE_SCENERY; + Config::Get().general.invisibleTrees = wflags & VIEWPORT_FLAG_INVISIBLE_VEGETATION; + Config::Get().general.invisiblePaths = wflags & VIEWPORT_FLAG_INVISIBLE_PATHS; + Config::Get().general.invisibleSupports = wflags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS; Config::Save(); } }; diff --git a/src/openrct2-ui/windows/ViewClipping.cpp b/src/openrct2-ui/windows/ViewClipping.cpp index cabcc7ec54..9c536ef8f9 100644 --- a/src/openrct2-ui/windows/ViewClipping.cpp +++ b/src/openrct2-ui/windows/ViewClipping.cpp @@ -316,7 +316,7 @@ namespace OpenRCT2::Ui::Windows case DisplayType::DisplayUnits: { // Print the value in the configured height label type: - if (Config::Get().general.ShowHeightAsUnits) + if (Config::Get().general.showHeightAsUnits) { // Height label is Units. auto ft = Formatter(); @@ -329,7 +329,7 @@ namespace OpenRCT2::Ui::Windows { // Height label is Real Values. // Print the value in the configured measurement units. - switch (Config::Get().general.MeasurementFormat) + switch (Config::Get().general.measurementFormat) { case MeasurementFormat::Metric: case MeasurementFormat::SI: diff --git a/src/openrct2/AssetPackManager.cpp b/src/openrct2/AssetPackManager.cpp index 8a8b1a9e95..9e12d400b7 100644 --- a/src/openrct2/AssetPackManager.cpp +++ b/src/openrct2/AssetPackManager.cpp @@ -164,7 +164,7 @@ namespace OpenRCT2 { // Re-order asset packs std::vector> newAssetPacks; - EnumerateCommaSeparatedList(Config::Get().general.AssetPackOrder, [&](std::string_view id) { + EnumerateCommaSeparatedList(Config::Get().general.assetPackOrder, [&](std::string_view id) { auto index = GetAssetPackIndex(id); if (index != std::numeric_limits::max()) { @@ -181,7 +181,7 @@ namespace OpenRCT2 _assetPacks = std::move(newAssetPacks); // Set which asset packs are enabled - EnumerateCommaSeparatedList(Config::Get().general.EnabledAssetPacks, [&](std::string_view id) { + EnumerateCommaSeparatedList(Config::Get().general.enabledAssetPacks, [&](std::string_view id) { auto assetPack = GetAssetPack(id); if (assetPack != nullptr) { @@ -208,8 +208,8 @@ namespace OpenRCT2 orderList.pop_back(); if (enabledList.size() > 0) enabledList.pop_back(); - Config::Get().general.AssetPackOrder = orderList; - Config::Get().general.EnabledAssetPacks = enabledList; + Config::Get().general.assetPackOrder = orderList; + Config::Get().general.enabledAssetPacks = enabledList; Config::Save(); } } // namespace OpenRCT2 diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 1a73db5da0..78867e2f83 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -409,20 +409,20 @@ namespace OpenRCT2 CrashInit(); - if (String::equals(Config::Get().general.LastRunVersion, kOpenRCT2Version)) + if (String::equals(Config::Get().general.lastRunVersion, kOpenRCT2Version)) { gOpenRCT2ShowChangelog = false; } else { gOpenRCT2ShowChangelog = true; - Config::Get().general.LastRunVersion = kOpenRCT2Version; + Config::Get().general.lastRunVersion = kOpenRCT2Version; Config::Save(); } try { - _localisationService->OpenLanguage(Config::Get().general.Language); + _localisationService->OpenLanguage(Config::Get().general.language); } catch (const std::exception& e) { @@ -518,7 +518,7 @@ namespace OpenRCT2 Audio::Init(); Audio::PopulateDevices(); Audio::InitRideSoundsAndInfo(); - Audio::gGameSoundsOff = !Config::Get().sound.MasterSoundEnabled; + Audio::gGameSoundsOff = !Config::Get().sound.masterSoundEnabled; } ChatInit(); @@ -622,7 +622,7 @@ namespace OpenRCT2 } drawingEngine->Initialise(); - drawingEngine->SetVSync(Config::Get().general.UseVSync); + drawingEngine->SetVSync(Config::Get().general.useVSync); return drawingEngine; } @@ -634,7 +634,7 @@ namespace OpenRCT2 return nullptr; }; - auto drawingEngineType = Config::Get().general.DrawingEngine; + auto drawingEngineType = Config::Get().general.drawingEngine; // Attempt to create drawing engine of the type specified in the config. { @@ -667,7 +667,7 @@ namespace OpenRCT2 _drawingEngineType = drawingEngineType; - Config::Get().general.DrawingEngine = drawingEngineType; + Config::Get().general.drawingEngine = drawingEngineType; Config::Save(); WindowCheckAllValidZoom(); @@ -1006,11 +1006,11 @@ namespace OpenRCT2 if (gCustomRCT2DataPath.empty()) { // Check install directory - if (Config::Get().general.RCT2Path.empty() || !Platform::OriginalGameDataExists(Config::Get().general.RCT2Path)) + if (Config::Get().general.rct2Path.empty() || !Platform::OriginalGameDataExists(Config::Get().general.rct2Path)) { LOG_VERBOSE( "install directory does not exist or invalid directory selected, %s", - Config::Get().general.RCT2Path.c_str()); + Config::Get().general.rct2Path.c_str()); if (!Config::FindOrBrowseInstallDirectory()) { auto path = Config::GetDefaultPath(); @@ -1019,7 +1019,7 @@ namespace OpenRCT2 return std::string(); } } - result = Config::Get().general.RCT2Path; + result = Config::Get().general.rct2Path; } else { @@ -1053,7 +1053,7 @@ namespace OpenRCT2 } else { - if ((gOpenRCT2StartupAction == StartupAction::Title) && Config::Get().general.PlayIntro) + if ((gOpenRCT2StartupAction == StartupAction::Title) && Config::Get().general.playIntro) { gOpenRCT2StartupAction = StartupAction::Intro; } @@ -1159,17 +1159,17 @@ namespace OpenRCT2 { if (gNetworkStartPort == 0) { - gNetworkStartPort = Config::Get().network.DefaultPort; + gNetworkStartPort = Config::Get().network.defaultPort; } if (gNetworkStartAddress.empty()) { - gNetworkStartAddress = Config::Get().network.ListenAddress; + gNetworkStartAddress = Config::Get().network.listenAddress; } if (gCustomPassword.empty()) { - _network.SetPassword(Config::Get().network.DefaultPassword.c_str()); + _network.SetPassword(Config::Get().network.defaultPassword.c_str()); } else { @@ -1190,7 +1190,7 @@ namespace OpenRCT2 { if (gNetworkStartPort == 0) { - gNetworkStartPort = Config::Get().network.DefaultPort; + gNetworkStartPort = Config::Get().network.defaultPort; } _network.BeginClient(gNetworkStartHost, gNetworkStartPort); } @@ -1251,7 +1251,7 @@ namespace OpenRCT2 { if (!ShouldDraw()) return false; - if (!Config::Get().general.UncapFPS) + if (!Config::Get().general.uncapFPS) return false; if (gGameSpeed > 4) return false; @@ -1608,7 +1608,7 @@ namespace OpenRCT2 void ContextUpdateCursorScale() { - GetContext()->GetUiContext().SetCursorScale(static_cast(std::round(Config::Get().general.WindowScale))); + GetContext()->GetUiContext().SetCursorScale(static_cast(std::round(Config::Get().general.windowScale))); } void ContextHideCursor() @@ -1630,8 +1630,8 @@ namespace OpenRCT2 { auto cursorCoords = ContextGetCursorPosition(); // Compensate for window scaling. - return { static_cast(std::ceil(cursorCoords.x / Config::Get().general.WindowScale)), - static_cast(std::ceil(cursorCoords.y / Config::Get().general.WindowScale)) }; + return { static_cast(std::ceil(cursorCoords.x / Config::Get().general.windowScale)), + static_cast(std::ceil(cursorCoords.y / Config::Get().general.windowScale)) }; } void ContextSetCursorPosition(const ScreenCoordsXY& cursorPosition) diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index c779b40109..d309e0f81d 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -115,7 +115,7 @@ void GameResetSpeed() void GameIncreaseGameSpeed() { - auto newSpeed = std::min(Config::Get().general.DebuggingTools ? 5 : 4, gGameSpeed + 1); + auto newSpeed = std::min(Config::Get().general.debuggingTools ? 5 : 4, gGameSpeed + 1); if (newSpeed == 5) newSpeed = 8; @@ -498,7 +498,7 @@ void SaveGameWithName(u8string_view name) LOG_VERBOSE("Saving to %s", u8string(name).c_str()); auto& gameState = getGameState(); - if (ScenarioSave(gameState, name, Config::Get().general.SavePluginData ? 1 : 0)) + if (ScenarioSave(gameState, name, Config::Get().general.savePluginData ? 1 : 0)) { LOG_VERBOSE("Saved to %s", u8string(name).c_str()); gCurrentLoadedPath = name; @@ -609,7 +609,7 @@ void GameAutosave() timeName, sizeof(timeName), "autosave_%04u-%02u-%02u_%02u-%02u-%02u%s", currentDate.year, currentDate.month, currentDate.day, currentTime.hour, currentTime.minute, currentTime.second, fileExtension); - int32_t autosavesToKeep = Config::Get().general.AutosaveAmount; + int32_t autosavesToKeep = Config::Get().general.autosaveAmount; LimitAutosaveCount(autosavesToKeep - 1, isInEditorMode()); auto& env = GetContext()->GetPlatformEnvironment(); diff --git a/src/openrct2/GameState.cpp b/src/openrct2/GameState.cpp index 510f3fe54b..d8ec67127b 100644 --- a/src/openrct2/GameState.cpp +++ b/src/openrct2/GameState.cpp @@ -139,7 +139,7 @@ namespace OpenRCT2 } bool isPaused = GameIsPaused(); - if (Network::GetMode() == Network::Mode::server && Config::Get().network.PauseServerIfNoClients) + if (Network::GetMode() == Network::Mode::server && Config::Get().network.pauseServerIfNoClients) { // If we are headless we always have 1 player (host), pause if no one else is around. if (gOpenRCT2Headless && Network::GetNumPlayers() == 1) diff --git a/src/openrct2/PlatformEnvironment.cpp b/src/openrct2/PlatformEnvironment.cpp index eb49c4576f..8772048703 100644 --- a/src/openrct2/PlatformEnvironment.cpp +++ b/src/openrct2/PlatformEnvironment.cpp @@ -285,11 +285,11 @@ std::unique_ptr OpenRCT2::CreatePlatformEnvironment() } if (gCustomRCT1DataPath.empty()) { - env->SetBasePath(DirBase::rct1, Config::Get().general.RCT1Path); + env->SetBasePath(DirBase::rct1, Config::Get().general.rct1Path); } if (gCustomRCT2DataPath.empty()) { - env->SetBasePath(DirBase::rct2, Config::Get().general.RCT2Path); + env->SetBasePath(DirBase::rct2, Config::Get().general.rct2Path); } // Log base paths diff --git a/src/openrct2/ReplayManager.cpp b/src/openrct2/ReplayManager.cpp index 3fdb2ede3c..f20979fce2 100644 --- a/src/openrct2/ReplayManager.cpp +++ b/src/openrct2/ReplayManager.cpp @@ -645,7 +645,7 @@ namespace OpenRCT2 serialiser << park.guestGenerationProbability; serialiser << park.suggestedGuestMaximum; - serialiser << Config::Get().general.ShowRealNamesOfGuests; + serialiser << Config::Get().general.showRealNamesOfGuests; // To make this a little bit less volatile against updates // we reserve some space for future additions. diff --git a/src/openrct2/Version.cpp b/src/openrct2/Version.cpp index 37dffddad7..921bd12be9 100644 --- a/src/openrct2/Version.cpp +++ b/src/openrct2/Version.cpp @@ -79,7 +79,7 @@ NewVersionInfo GetLatestVersion() NewVersionInfo verinfo{ tag, "", "" }; #if !defined(DISABLE_HTTP) && !defined(DISABLE_VERSION_CHECKER) auto now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); - auto then = Config::Get().general.LastVersionCheckTime; + auto then = Config::Get().general.lastVersionCheckTime; using namespace std::chrono_literals; if (then < now - std::chrono::seconds(24h).count()) @@ -107,7 +107,7 @@ NewVersionInfo GetLatestVersion() verinfo.name = Json::GetString(root["name"]); verinfo.changelog = Json::GetString(root["body"]); - Config::Get().general.LastVersionCheckTime = now; + Config::Get().general.lastVersionCheckTime = now; Config::Save(); } #endif diff --git a/src/openrct2/actions/GameSetSpeedAction.cpp b/src/openrct2/actions/GameSetSpeedAction.cpp index b64f9b179a..d62a8090e0 100644 --- a/src/openrct2/actions/GameSetSpeedAction.cpp +++ b/src/openrct2/actions/GameSetSpeedAction.cpp @@ -70,6 +70,6 @@ namespace OpenRCT2::GameActions bool GameSetSpeedAction::IsValidSpeed(uint8_t speed) const { - return speed >= 1 && (speed <= 4 || (Config::Get().general.DebuggingTools && speed <= 8)); + return speed >= 1 && (speed <= 4 || (Config::Get().general.debuggingTools && speed <= 8)); } } // namespace OpenRCT2::GameActions diff --git a/src/openrct2/actions/TrackDesignAction.cpp b/src/openrct2/actions/TrackDesignAction.cpp index d6aeb0d55a..c5d286584d 100644 --- a/src/openrct2/actions/TrackDesignAction.cpp +++ b/src/openrct2/actions/TrackDesignAction.cpp @@ -236,7 +236,7 @@ namespace OpenRCT2::GameActions auto numCircuits = std::max(1, _td.operation.numCircuits); SetOperatingSettingNested(ride->id, RideSetSetting::NumCircuits, numCircuits, flags); - uint8_t defaultInspectionInterval = Config::Get().general.DefaultInspectionInterval; + uint8_t defaultInspectionInterval = Config::Get().general.defaultInspectionInterval; if (defaultInspectionInterval <= RIDE_INSPECTION_NEVER) SetOperatingSettingNested(ride->id, RideSetSetting::InspectionInterval, defaultInspectionInterval, flags); diff --git a/src/openrct2/audio/Audio.cpp b/src/openrct2/audio/Audio.cpp index 75e93da291..a12c789048 100644 --- a/src/openrct2/audio/Audio.cpp +++ b/src/openrct2/audio/Audio.cpp @@ -68,7 +68,7 @@ namespace OpenRCT2::Audio return false; if (gGameSoundsOff) return false; - if (!Config::Get().sound.SoundEnabled) + if (!Config::Get().sound.soundEnabled) return false; if (gOpenRCT2Headless) return false; @@ -78,19 +78,19 @@ namespace OpenRCT2::Audio void Init() { auto& audioContext = GetContext()->GetAudioContext(); - if (Config::Get().sound.Device.empty()) + if (Config::Get().sound.device.empty()) { audioContext.SetOutputDevice(""); _currentAudioDevice = 0; } else { - audioContext.SetOutputDevice(Config::Get().sound.Device); + audioContext.SetOutputDevice(Config::Get().sound.device); PopulateDevices(); for (int32_t i = 0; i < GetDeviceCount(); i++) { - if (_audioDevices[i] == Config::Get().sound.Device) + if (_audioDevices[i] == Config::Get().sound.device) { _currentAudioDevice = i; } @@ -305,7 +305,7 @@ namespace OpenRCT2::Audio } // Load title sequence audio object - auto descriptor = GetTitleMusicDescriptor(Config::Get().sound.TitleMusic); + auto descriptor = GetTitleMusicDescriptor(Config::Get().sound.titleMusic); auto& objManager = GetContext()->GetObjectManager(); auto* audioObject = static_cast(objManager.LoadObject(descriptor)); if (audioObject != nullptr) @@ -404,8 +404,8 @@ namespace OpenRCT2::Audio void ToggleAllSounds() { - Config::Get().sound.MasterSoundEnabled = !Config::Get().sound.MasterSoundEnabled; - if (Config::Get().sound.MasterSoundEnabled) + Config::Get().sound.masterSoundEnabled = !Config::Get().sound.masterSoundEnabled; + if (Config::Get().sound.masterSoundEnabled) { Resume(); } diff --git a/src/openrct2/command_line/RootCommands.cpp b/src/openrct2/command_line/RootCommands.cpp index 66e26735e8..a8f7dcd3d6 100644 --- a/src/openrct2/command_line/RootCommands.cpp +++ b/src/openrct2/command_line/RootCommands.cpp @@ -376,7 +376,7 @@ namespace OpenRCT2 auto configPath = env->GetFilePath(OpenRCT2::PathId::config); Config::SetDefaults(); Config::OpenFromPath(configPath); - Config::Get().general.RCT2Path = path; + Config::Get().general.rct2Path = path; if (Config::SaveToPath(configPath)) { Console::WriteFormat("Updating RCT2 path to '%s'.", path.c_str()); @@ -403,7 +403,7 @@ namespace OpenRCT2 auto context = OpenRCT2::CreateContext(); auto& env = context->GetPlatformEnvironment(); auto objectRepository = CreateObjectRepository(env); - objectRepository->Construct(Config::Get().general.Language); + objectRepository->Construct(Config::Get().general.language); return EXITCODE_OK; } diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index 49ec295325..c88ab271fb 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -164,110 +164,110 @@ namespace OpenRCT2::Config if (reader->ReadSection("general")) { auto model = &_config.general; - model->AlwaysShowGridlines = reader->GetBoolean("always_show_gridlines", false); - model->AutosaveFrequency = reader->GetInt32("autosave", AUTOSAVE_EVERY_5MINUTES); - model->AutosaveAmount = reader->GetInt32("autosave_amount", kDefaultNumAutosavesToKeep); - model->ConfirmationPrompt = reader->GetBoolean("confirmation_prompt", false); - model->CurrencyFormat = reader->GetEnum( + model->alwaysShowGridlines = reader->GetBoolean("always_show_gridlines", false); + model->autosaveFrequency = reader->GetInt32("autosave", AUTOSAVE_EVERY_5MINUTES); + model->autosaveAmount = reader->GetInt32("autosave_amount", kDefaultNumAutosavesToKeep); + model->confirmationPrompt = reader->GetBoolean("confirmation_prompt", false); + model->currencyFormat = reader->GetEnum( "currency_format", Platform::GetLocaleCurrency(), Enum_Currency); - model->CustomCurrencyRate = reader->GetInt32("custom_currency_rate", 10); - model->CustomCurrencyAffix = reader->GetEnum( + model->customCurrencyRate = reader->GetInt32("custom_currency_rate", 10); + model->customCurrencyAffix = reader->GetEnum( "custom_currency_affix", CurrencyAffix::Suffix, Enum_CurrencySymbolAffix); - model->CustomCurrencySymbol = reader->GetString("custom_currency_symbol", "Ctm"); - model->EdgeScrolling = reader->GetBoolean("edge_scrolling", true); - model->EdgeScrollingSpeed = reader->GetInt32("edge_scrolling_speed", 12); - model->FullscreenMode = reader->GetInt32("fullscreen_mode", 0); - model->FullscreenHeight = reader->GetInt32("fullscreen_height", -1); - model->FullscreenWidth = reader->GetInt32("fullscreen_width", -1); - model->RCT1Path = reader->GetString("rct1_path", ""); - model->RCT2Path = reader->GetString("game_path", ""); - model->LandscapeSmoothing = reader->GetBoolean("landscape_smoothing", true); - model->Language = reader->GetEnum("language", Platform::GetLocaleLanguage(), Enum_LanguageEnum); - model->MeasurementFormat = reader->GetEnum( + model->customCurrencySymbol = reader->GetString("custom_currency_symbol", "Ctm"); + model->edgeScrolling = reader->GetBoolean("edge_scrolling", true); + model->edgeScrollingSpeed = reader->GetInt32("edge_scrolling_speed", 12); + model->fullscreenMode = reader->GetInt32("fullscreen_mode", 0); + model->fullscreenHeight = reader->GetInt32("fullscreen_height", -1); + model->fullscreenWidth = reader->GetInt32("fullscreen_width", -1); + model->rct1Path = reader->GetString("rct1_path", ""); + model->rct2Path = reader->GetString("game_path", ""); + model->landscapeSmoothing = reader->GetBoolean("landscape_smoothing", true); + model->language = reader->GetEnum("language", Platform::GetLocaleLanguage(), Enum_LanguageEnum); + model->measurementFormat = reader->GetEnum( "measurement_format", Platform::GetLocaleMeasurementFormat(), Enum_MeasurementFormat); - model->PlayIntro = reader->GetBoolean("play_intro", false); - model->SavePluginData = reader->GetBoolean("save_plugin_data", true); - model->DebuggingTools = reader->GetBoolean("debugging_tools", false); - model->ShowHeightAsUnits = reader->GetBoolean("show_height_as_units", false); - model->TemperatureFormat = reader->GetEnum( + model->playIntro = reader->GetBoolean("play_intro", false); + model->savePluginData = reader->GetBoolean("save_plugin_data", true); + model->debuggingTools = reader->GetBoolean("debugging_tools", false); + model->showHeightAsUnits = reader->GetBoolean("show_height_as_units", false); + model->temperatureFormat = reader->GetEnum( "temperature_format", Platform::GetLocaleTemperatureFormat(), Enum_Temperature); - model->WindowHeight = reader->GetInt32("window_height", -1); - model->WindowSnapProximity = reader->GetInt32("window_snap_proximity", 5); - model->WindowWidth = reader->GetInt32("window_width", -1); - model->DefaultDisplay = reader->GetInt32("default_display", 0); - model->DrawingEngine = reader->GetEnum( + model->windowHeight = reader->GetInt32("window_height", -1); + model->windowSnapProximity = reader->GetInt32("window_snap_proximity", 5); + model->windowWidth = reader->GetInt32("window_width", -1); + model->defaultDisplay = reader->GetInt32("default_display", 0); + model->drawingEngine = reader->GetEnum( "drawing_engine", DrawingEngine::SoftwareWithHardwareDisplay, Enum_DrawingEngine); - model->UncapFPS = reader->GetBoolean("uncap_fps", false); - model->UseVSync = reader->GetBoolean("use_vsync", true); - model->VirtualFloorStyle = reader->GetEnum( + model->uncapFPS = reader->GetBoolean("uncap_fps", false); + model->useVSync = reader->GetBoolean("use_vsync", true); + model->virtualFloorStyle = reader->GetEnum( "virtual_floor_style", VirtualFloorStyles::Glassy, Enum_VirtualFloorStyle); - model->DateFormat = reader->GetEnum("date_format", Platform::GetLocaleDateFormat(), Enum_DateFormat); - model->AutoStaffPlacement = reader->GetBoolean("auto_staff", true); - model->HandymenMowByDefault = reader->GetBoolean("handymen_mow_default", false); - model->DefaultInspectionInterval = reader->GetInt32("default_inspection_interval", 2); - model->LastRunVersion = reader->GetString("last_run_version", ""); - model->InvertViewportDrag = reader->GetBoolean("invert_viewport_drag", false); - model->LoadSaveSort = reader->GetEnum( + model->dateFormat = reader->GetEnum("date_format", Platform::GetLocaleDateFormat(), Enum_DateFormat); + model->autoStaffPlacement = reader->GetBoolean("auto_staff", true); + model->handymenMowByDefault = reader->GetBoolean("handymen_mow_default", false); + model->defaultInspectionInterval = reader->GetInt32("default_inspection_interval", 2); + model->lastRunVersion = reader->GetString("last_run_version", ""); + model->invertViewportDrag = reader->GetBoolean("invert_viewport_drag", false); + model->loadSaveSort = reader->GetEnum( "load_save_sort", FileBrowserSort::NameAscending, Enum_FileBrowserSort); - model->MinimizeFullscreenFocusLoss = reader->GetBoolean("minimize_fullscreen_focus_loss", true); - model->DisableScreensaver = reader->GetBoolean("disable_screensaver", true); + model->minimizeFullscreenFocusLoss = reader->GetBoolean("minimize_fullscreen_focus_loss", true); + model->disableScreensaver = reader->GetBoolean("disable_screensaver", true); // Default config setting is false until the games canvas can be separated from the effect - model->DayNightCycle = reader->GetBoolean("day_night_cycle", false); - const bool supportsLightFx = model->DrawingEngine == DrawingEngine::SoftwareWithHardwareDisplay; - model->EnableLightFx = supportsLightFx && reader->GetBoolean("enable_light_fx", false); - model->EnableLightFxForVehicles = supportsLightFx && reader->GetBoolean("enable_light_fx_for_vehicles", false); - model->UpperCaseBanners = reader->GetBoolean("upper_case_banners", false); - model->DisableLightningEffect = reader->GetBoolean("disable_lightning_effect", false); - model->WindowScale = reader->GetFloat("window_scale", Platform::GetDefaultScale()); - model->InferDisplayDPI = reader->GetBoolean("infer_display_dpi", true); - model->ShowFPS = reader->GetBoolean("show_fps", false); + model->dayNightCycle = reader->GetBoolean("day_night_cycle", false); + const bool supportsLightFx = model->drawingEngine == DrawingEngine::SoftwareWithHardwareDisplay; + model->enableLightFx = supportsLightFx && reader->GetBoolean("enable_light_fx", false); + model->enableLightFxForVehicles = supportsLightFx && reader->GetBoolean("enable_light_fx_for_vehicles", false); + model->upperCaseBanners = reader->GetBoolean("upper_case_banners", false); + model->disableLightningEffect = reader->GetBoolean("disable_lightning_effect", false); + model->windowScale = reader->GetFloat("window_scale", Platform::GetDefaultScale()); + model->inferDisplayDPI = reader->GetBoolean("infer_display_dpi", true); + model->showFPS = reader->GetBoolean("show_fps", false); #ifdef _DEBUG // Always have multi-threading disabled in debug builds, this makes things slower. - model->MultiThreading = false; + model->multiThreading = false; #else - model->MultiThreading = reader->GetBoolean("multithreading", true); + model->multiThreading = reader->GetBoolean("multithreading", true); #endif // _DEBUG - model->TrapCursor = reader->GetBoolean("trap_cursor", false); - model->AutoOpenShops = reader->GetBoolean("auto_open_shops", false); + model->trapCursor = reader->GetBoolean("trap_cursor", false); + model->autoOpenShops = reader->GetBoolean("auto_open_shops", false); // Gamepad settings model->gamepadDeadzone = reader->GetInt32("gamepad_deadzone", 3600); model->gamepadSensitivity = reader->GetFloat("gamepad_sensitivity", 1.5f); - model->ScenarioUnlockingEnabled = reader->GetBoolean("scenario_unlocking_enabled", true); - model->ScenarioHideMegaPark = reader->GetBoolean("scenario_hide_mega_park", true); - model->LastSaveGameDirectory = reader->GetString("last_game_directory", ""); - model->LastSaveLandscapeDirectory = reader->GetString("last_landscape_directory", ""); - model->LastSaveScenarioDirectory = reader->GetString("last_scenario_directory", ""); - model->LastSaveTrackDirectory = reader->GetString("last_track_directory", ""); - model->UseNativeBrowseDialog = reader->GetBoolean("use_native_browse_dialog", false); - model->WindowLimit = reader->GetInt32("window_limit", kWindowLimitMax); - model->ZoomToCursor = reader->GetBoolean("zoom_to_cursor", true); - model->RenderWeatherEffects = reader->GetBoolean("render_weather_effects", true); - model->RenderWeatherGloom = reader->GetBoolean("render_weather_gloom", true); - model->ShowGuestPurchases = reader->GetBoolean("show_guest_purchases", false); - model->ShowRealNamesOfGuests = reader->GetBoolean("show_real_names_of_guests", true); - model->ShowRealNamesOfStaff = reader->GetBoolean("show_real_names_of_staff", false); - model->AllowEarlyCompletion = reader->GetBoolean("allow_early_completion", false); - model->AssetPackOrder = reader->GetString("asset_pack_order", ""); - model->EnabledAssetPacks = reader->GetString("enabled_asset_packs", ""); - model->TransparentScreenshot = reader->GetBoolean("transparent_screenshot", true); - model->TransparentWater = reader->GetBoolean("transparent_water", true); + model->scenarioUnlockingEnabled = reader->GetBoolean("scenario_unlocking_enabled", true); + model->scenarioHideMegaPark = reader->GetBoolean("scenario_hide_mega_park", true); + model->lastSaveGameDirectory = reader->GetString("last_game_directory", ""); + model->lastSaveLandscapeDirectory = reader->GetString("last_landscape_directory", ""); + model->lastSaveScenarioDirectory = reader->GetString("last_scenario_directory", ""); + model->lastSaveTrackDirectory = reader->GetString("last_track_directory", ""); + model->useNativeBrowseDialog = reader->GetBoolean("use_native_browse_dialog", false); + model->windowLimit = reader->GetInt32("window_limit", kWindowLimitMax); + model->zoomToCursor = reader->GetBoolean("zoom_to_cursor", true); + model->renderWeatherEffects = reader->GetBoolean("render_weather_effects", true); + model->renderWeatherGloom = reader->GetBoolean("render_weather_gloom", true); + model->showGuestPurchases = reader->GetBoolean("show_guest_purchases", false); + model->showRealNamesOfGuests = reader->GetBoolean("show_real_names_of_guests", true); + model->showRealNamesOfStaff = reader->GetBoolean("show_real_names_of_staff", false); + model->allowEarlyCompletion = reader->GetBoolean("allow_early_completion", false); + model->assetPackOrder = reader->GetString("asset_pack_order", ""); + model->enabledAssetPacks = reader->GetString("enabled_asset_packs", ""); + model->transparentScreenshot = reader->GetBoolean("transparent_screenshot", true); + model->transparentWater = reader->GetBoolean("transparent_water", true); - model->InvisibleRides = reader->GetBoolean("invisible_rides", false); - model->InvisibleVehicles = reader->GetBoolean("invisible_vehicles", false); - model->InvisibleTrees = reader->GetBoolean("invisible_trees", false); - model->InvisibleScenery = reader->GetBoolean("invisible_scenery", false); - model->InvisiblePaths = reader->GetBoolean("invisible_paths", false); - model->InvisibleSupports = reader->GetBoolean("invisible_supports", true); + model->invisibleRides = reader->GetBoolean("invisible_rides", false); + model->invisibleVehicles = reader->GetBoolean("invisible_vehicles", false); + model->invisibleTrees = reader->GetBoolean("invisible_trees", false); + model->invisibleScenery = reader->GetBoolean("invisible_scenery", false); + model->invisiblePaths = reader->GetBoolean("invisible_paths", false); + model->invisibleSupports = reader->GetBoolean("invisible_supports", true); - model->LastVersionCheckTime = reader->GetInt64("last_version_check_time", 0); + model->lastVersionCheckTime = reader->GetInt64("last_version_check_time", 0); - model->FileBrowserWidth = reader->GetInt32("file_browser_width", 0); - model->FileBrowserHeight = reader->GetInt32("file_browser_height", 0); - model->FileBrowserShowSizeColumn = reader->GetBoolean("file_browser_show_size_column", true); - model->FileBrowserShowDateColumn = reader->GetBoolean("file_browser_show_date_column", true); - model->FileBrowserPreviewType = reader->GetEnum( + model->fileBrowserWidth = reader->GetInt32("file_browser_width", 0); + model->fileBrowserHeight = reader->GetInt32("file_browser_height", 0); + model->fileBrowserShowSizeColumn = reader->GetBoolean("file_browser_show_size_column", true); + model->fileBrowserShowDateColumn = reader->GetBoolean("file_browser_show_date_column", true); + model->fileBrowserPreviewType = reader->GetEnum( "file_browser_preview_type", ParkPreviewPref::screenshot, Enum_ParkPreviewPref); } } @@ -276,92 +276,92 @@ namespace OpenRCT2::Config { auto model = &_config.general; writer->WriteSection("general"); - writer->WriteBoolean("always_show_gridlines", model->AlwaysShowGridlines); - writer->WriteInt32("autosave", model->AutosaveFrequency); - writer->WriteInt32("autosave_amount", model->AutosaveAmount); - writer->WriteBoolean("confirmation_prompt", model->ConfirmationPrompt); - writer->WriteEnum("currency_format", model->CurrencyFormat, Enum_Currency); - writer->WriteInt32("custom_currency_rate", model->CustomCurrencyRate); - writer->WriteEnum("custom_currency_affix", model->CustomCurrencyAffix, Enum_CurrencySymbolAffix); - writer->WriteString("custom_currency_symbol", model->CustomCurrencySymbol); - writer->WriteBoolean("edge_scrolling", model->EdgeScrolling); - writer->WriteInt32("edge_scrolling_speed", model->EdgeScrollingSpeed); - writer->WriteInt32("fullscreen_mode", model->FullscreenMode); - writer->WriteInt32("fullscreen_height", model->FullscreenHeight); - writer->WriteInt32("fullscreen_width", model->FullscreenWidth); - writer->WriteString("rct1_path", model->RCT1Path); - writer->WriteString("game_path", model->RCT2Path); - writer->WriteBoolean("landscape_smoothing", model->LandscapeSmoothing); - writer->WriteEnum("language", model->Language, Enum_LanguageEnum); - writer->WriteEnum("measurement_format", model->MeasurementFormat, Enum_MeasurementFormat); - writer->WriteBoolean("play_intro", model->PlayIntro); - writer->WriteBoolean("save_plugin_data", model->SavePluginData); - writer->WriteBoolean("debugging_tools", model->DebuggingTools); - writer->WriteBoolean("show_height_as_units", model->ShowHeightAsUnits); - writer->WriteEnum("temperature_format", model->TemperatureFormat, Enum_Temperature); - writer->WriteInt32("window_height", model->WindowHeight); - writer->WriteInt32("window_snap_proximity", model->WindowSnapProximity); - writer->WriteInt32("window_width", model->WindowWidth); - writer->WriteInt32("default_display", model->DefaultDisplay); - writer->WriteEnum("drawing_engine", model->DrawingEngine, Enum_DrawingEngine); - writer->WriteBoolean("uncap_fps", model->UncapFPS); - writer->WriteBoolean("use_vsync", model->UseVSync); - writer->WriteEnum("date_format", model->DateFormat, Enum_DateFormat); - writer->WriteBoolean("auto_staff", model->AutoStaffPlacement); - writer->WriteBoolean("handymen_mow_default", model->HandymenMowByDefault); - writer->WriteInt32("default_inspection_interval", model->DefaultInspectionInterval); - writer->WriteString("last_run_version", model->LastRunVersion); - writer->WriteBoolean("invert_viewport_drag", model->InvertViewportDrag); - writer->WriteEnum("load_save_sort", model->LoadSaveSort, Enum_FileBrowserSort); - writer->WriteBoolean("minimize_fullscreen_focus_loss", model->MinimizeFullscreenFocusLoss); - writer->WriteBoolean("disable_screensaver", model->DisableScreensaver); - writer->WriteBoolean("day_night_cycle", model->DayNightCycle); - writer->WriteBoolean("enable_light_fx", model->EnableLightFx); - writer->WriteBoolean("enable_light_fx_for_vehicles", model->EnableLightFxForVehicles); - writer->WriteBoolean("upper_case_banners", model->UpperCaseBanners); - writer->WriteBoolean("disable_lightning_effect", model->DisableLightningEffect); - writer->WriteFloat("window_scale", model->WindowScale); - writer->WriteBoolean("infer_display_dpi", model->InferDisplayDPI); - writer->WriteBoolean("show_fps", model->ShowFPS); - writer->WriteBoolean("multithreading", model->MultiThreading); - writer->WriteBoolean("trap_cursor", model->TrapCursor); - writer->WriteBoolean("auto_open_shops", model->AutoOpenShops); + writer->WriteBoolean("always_show_gridlines", model->alwaysShowGridlines); + writer->WriteInt32("autosave", model->autosaveFrequency); + writer->WriteInt32("autosave_amount", model->autosaveAmount); + writer->WriteBoolean("confirmation_prompt", model->confirmationPrompt); + writer->WriteEnum("currency_format", model->currencyFormat, Enum_Currency); + writer->WriteInt32("custom_currency_rate", model->customCurrencyRate); + writer->WriteEnum("custom_currency_affix", model->customCurrencyAffix, Enum_CurrencySymbolAffix); + writer->WriteString("custom_currency_symbol", model->customCurrencySymbol); + writer->WriteBoolean("edge_scrolling", model->edgeScrolling); + writer->WriteInt32("edge_scrolling_speed", model->edgeScrollingSpeed); + writer->WriteInt32("fullscreen_mode", model->fullscreenMode); + writer->WriteInt32("fullscreen_height", model->fullscreenHeight); + writer->WriteInt32("fullscreen_width", model->fullscreenWidth); + writer->WriteString("rct1_path", model->rct1Path); + writer->WriteString("game_path", model->rct2Path); + writer->WriteBoolean("landscape_smoothing", model->landscapeSmoothing); + writer->WriteEnum("language", model->language, Enum_LanguageEnum); + writer->WriteEnum("measurement_format", model->measurementFormat, Enum_MeasurementFormat); + writer->WriteBoolean("play_intro", model->playIntro); + writer->WriteBoolean("save_plugin_data", model->savePluginData); + writer->WriteBoolean("debugging_tools", model->debuggingTools); + writer->WriteBoolean("show_height_as_units", model->showHeightAsUnits); + writer->WriteEnum("temperature_format", model->temperatureFormat, Enum_Temperature); + writer->WriteInt32("window_height", model->windowHeight); + writer->WriteInt32("window_snap_proximity", model->windowSnapProximity); + writer->WriteInt32("window_width", model->windowWidth); + writer->WriteInt32("default_display", model->defaultDisplay); + writer->WriteEnum("drawing_engine", model->drawingEngine, Enum_DrawingEngine); + writer->WriteBoolean("uncap_fps", model->uncapFPS); + writer->WriteBoolean("use_vsync", model->useVSync); + writer->WriteEnum("date_format", model->dateFormat, Enum_DateFormat); + writer->WriteBoolean("auto_staff", model->autoStaffPlacement); + writer->WriteBoolean("handymen_mow_default", model->handymenMowByDefault); + writer->WriteInt32("default_inspection_interval", model->defaultInspectionInterval); + writer->WriteString("last_run_version", model->lastRunVersion); + writer->WriteBoolean("invert_viewport_drag", model->invertViewportDrag); + writer->WriteEnum("load_save_sort", model->loadSaveSort, Enum_FileBrowserSort); + writer->WriteBoolean("minimize_fullscreen_focus_loss", model->minimizeFullscreenFocusLoss); + writer->WriteBoolean("disable_screensaver", model->disableScreensaver); + writer->WriteBoolean("day_night_cycle", model->dayNightCycle); + writer->WriteBoolean("enable_light_fx", model->enableLightFx); + writer->WriteBoolean("enable_light_fx_for_vehicles", model->enableLightFxForVehicles); + writer->WriteBoolean("upper_case_banners", model->upperCaseBanners); + writer->WriteBoolean("disable_lightning_effect", model->disableLightningEffect); + writer->WriteFloat("window_scale", model->windowScale); + writer->WriteBoolean("infer_display_dpi", model->inferDisplayDPI); + writer->WriteBoolean("show_fps", model->showFPS); + writer->WriteBoolean("multithreading", model->multiThreading); + writer->WriteBoolean("trap_cursor", model->trapCursor); + writer->WriteBoolean("auto_open_shops", model->autoOpenShops); // Gamepad settings writer->WriteInt32("gamepad_deadzone", model->gamepadDeadzone); writer->WriteFloat("gamepad_sensitivity", model->gamepadSensitivity); - writer->WriteBoolean("scenario_unlocking_enabled", model->ScenarioUnlockingEnabled); - writer->WriteBoolean("scenario_hide_mega_park", model->ScenarioHideMegaPark); - writer->WriteString("last_game_directory", model->LastSaveGameDirectory); - writer->WriteString("last_landscape_directory", model->LastSaveLandscapeDirectory); - writer->WriteString("last_scenario_directory", model->LastSaveScenarioDirectory); - writer->WriteString("last_track_directory", model->LastSaveTrackDirectory); - writer->WriteBoolean("use_native_browse_dialog", model->UseNativeBrowseDialog); - writer->WriteInt32("window_limit", model->WindowLimit); - writer->WriteBoolean("zoom_to_cursor", model->ZoomToCursor); - writer->WriteBoolean("render_weather_effects", model->RenderWeatherEffects); - writer->WriteBoolean("render_weather_gloom", model->RenderWeatherGloom); - writer->WriteBoolean("show_guest_purchases", model->ShowGuestPurchases); - writer->WriteBoolean("show_real_names_of_guests", model->ShowRealNamesOfGuests); - writer->WriteBoolean("show_real_names_of_staff", model->ShowRealNamesOfStaff); - writer->WriteBoolean("allow_early_completion", model->AllowEarlyCompletion); - writer->WriteString("asset_pack_order", model->AssetPackOrder); - writer->WriteString("enabled_asset_packs", model->EnabledAssetPacks); - writer->WriteEnum("virtual_floor_style", model->VirtualFloorStyle, Enum_VirtualFloorStyle); - writer->WriteBoolean("transparent_screenshot", model->TransparentScreenshot); - writer->WriteBoolean("transparent_water", model->TransparentWater); - writer->WriteBoolean("invisible_rides", model->InvisibleRides); - writer->WriteBoolean("invisible_vehicles", model->InvisibleVehicles); - writer->WriteBoolean("invisible_trees", model->InvisibleTrees); - writer->WriteBoolean("invisible_scenery", model->InvisibleScenery); - writer->WriteBoolean("invisible_paths", model->InvisiblePaths); - writer->WriteBoolean("invisible_supports", model->InvisibleSupports); - writer->WriteInt64("last_version_check_time", model->LastVersionCheckTime); - writer->WriteInt32("file_browser_width", model->FileBrowserWidth); - writer->WriteInt32("file_browser_height", model->FileBrowserHeight); - writer->WriteBoolean("file_browser_show_size_column", model->FileBrowserShowSizeColumn); - writer->WriteBoolean("file_browser_show_date_column", model->FileBrowserShowDateColumn); - writer->WriteEnum("file_browser_preview_type", model->FileBrowserPreviewType, Enum_ParkPreviewPref); + writer->WriteBoolean("scenario_unlocking_enabled", model->scenarioUnlockingEnabled); + writer->WriteBoolean("scenario_hide_mega_park", model->scenarioHideMegaPark); + writer->WriteString("last_game_directory", model->lastSaveGameDirectory); + writer->WriteString("last_landscape_directory", model->lastSaveLandscapeDirectory); + writer->WriteString("last_scenario_directory", model->lastSaveScenarioDirectory); + writer->WriteString("last_track_directory", model->lastSaveTrackDirectory); + writer->WriteBoolean("use_native_browse_dialog", model->useNativeBrowseDialog); + writer->WriteInt32("window_limit", model->windowLimit); + writer->WriteBoolean("zoom_to_cursor", model->zoomToCursor); + writer->WriteBoolean("render_weather_effects", model->renderWeatherEffects); + writer->WriteBoolean("render_weather_gloom", model->renderWeatherGloom); + writer->WriteBoolean("show_guest_purchases", model->showGuestPurchases); + writer->WriteBoolean("show_real_names_of_guests", model->showRealNamesOfGuests); + writer->WriteBoolean("show_real_names_of_staff", model->showRealNamesOfStaff); + writer->WriteBoolean("allow_early_completion", model->allowEarlyCompletion); + writer->WriteString("asset_pack_order", model->assetPackOrder); + writer->WriteString("enabled_asset_packs", model->enabledAssetPacks); + writer->WriteEnum("virtual_floor_style", model->virtualFloorStyle, Enum_VirtualFloorStyle); + writer->WriteBoolean("transparent_screenshot", model->transparentScreenshot); + writer->WriteBoolean("transparent_water", model->transparentWater); + writer->WriteBoolean("invisible_rides", model->invisibleRides); + writer->WriteBoolean("invisible_vehicles", model->invisibleVehicles); + writer->WriteBoolean("invisible_trees", model->invisibleTrees); + writer->WriteBoolean("invisible_scenery", model->invisibleScenery); + writer->WriteBoolean("invisible_paths", model->invisiblePaths); + writer->WriteBoolean("invisible_supports", model->invisibleSupports); + writer->WriteInt64("last_version_check_time", model->lastVersionCheckTime); + writer->WriteInt32("file_browser_width", model->fileBrowserWidth); + writer->WriteInt32("file_browser_height", model->fileBrowserHeight); + writer->WriteBoolean("file_browser_show_size_column", model->fileBrowserShowSizeColumn); + writer->WriteBoolean("file_browser_show_date_column", model->fileBrowserShowDateColumn); + writer->WriteEnum("file_browser_preview_type", model->fileBrowserPreviewType, Enum_ParkPreviewPref); } static void ReadInterface(IIniReader* reader) @@ -369,26 +369,26 @@ namespace OpenRCT2::Config if (reader->ReadSection("interface")) { auto model = &_config.interface; - model->ToolbarButtonsCentred = reader->GetBoolean("toolbar_buttons_centred", false); - model->ToolbarShowFinances = reader->GetBoolean("toolbar_show_finances", true); - model->ToolbarShowResearch = reader->GetBoolean("toolbar_show_research", true); - model->ToolbarShowCheats = reader->GetBoolean("toolbar_show_cheats", false); - model->ToolbarShowNews = reader->GetBoolean("toolbar_show_news", false); - model->ToolbarShowMute = reader->GetBoolean("toolbar_show_mute", false); - model->ToolbarShowChat = reader->GetBoolean("toolbar_show_chat", false); - model->ToolbarShowZoom = reader->GetBoolean("toolbar_show_zoom", true); - model->ToolbarShowRotateAnticlockwise = reader->GetBoolean("toolbar_show_rotate_anti_clockwise", false); - model->ConsoleSmallFont = reader->GetBoolean("console_small_font", false); - model->CurrentThemePreset = reader->GetString("current_theme", "*RCT2"); - model->CurrentTitleSequencePreset = reader->GetString("current_title_sequence", "*OPENRCT2"); - model->RandomTitleSequence = reader->GetBoolean("random_title_sequence", false); - model->ObjectSelectionFilterFlags = reader->GetInt32("object_selection_filter_flags", 0x3FFF); + model->toolbarButtonsCentred = reader->GetBoolean("toolbar_buttons_centred", false); + model->toolbarShowFinances = reader->GetBoolean("toolbar_show_finances", true); + model->toolbarShowResearch = reader->GetBoolean("toolbar_show_research", true); + model->toolbarShowCheats = reader->GetBoolean("toolbar_show_cheats", false); + model->toolbarShowNews = reader->GetBoolean("toolbar_show_news", false); + model->toolbarShowMute = reader->GetBoolean("toolbar_show_mute", false); + model->toolbarShowChat = reader->GetBoolean("toolbar_show_chat", false); + model->toolbarShowZoom = reader->GetBoolean("toolbar_show_zoom", true); + model->toolbarShowRotateAnticlockwise = reader->GetBoolean("toolbar_show_rotate_anti_clockwise", false); + model->consoleSmallFont = reader->GetBoolean("console_small_font", false); + model->currentThemePreset = reader->GetString("current_theme", "*RCT2"); + model->currentTitleSequencePreset = reader->GetString("current_title_sequence", "*OPENRCT2"); + model->randomTitleSequence = reader->GetBoolean("random_title_sequence", false); + model->objectSelectionFilterFlags = reader->GetInt32("object_selection_filter_flags", 0x3FFF); model->scenarioSelectLastTab = reader->GetInt32("scenarioselect_last_tab", 0); model->scenarioPreviewScreenshots = reader->GetBoolean("scenario_preview_screenshots", true); - model->ListRideVehiclesSeparately = reader->GetBoolean("list_ride_vehicles_separately", false); - model->WindowButtonsOnTheLeft = reader->GetBoolean("window_buttons_on_the_left", kWindowButtonsOnTheLeftDefault); - model->EnlargedUi = reader->GetBoolean("enlarged_ui", kEnlargedUiDefault); - model->TouchEnhancements = reader->GetBoolean("touch_enhancements", kEnlargedUiDefault); + model->listRideVehiclesSeparately = reader->GetBoolean("list_ride_vehicles_separately", false); + model->windowButtonsOnTheLeft = reader->GetBoolean("window_buttons_on_the_left", kWindowButtonsOnTheLeftDefault); + model->enlargedUi = reader->GetBoolean("enlarged_ui", kEnlargedUiDefault); + model->touchEnhancements = reader->GetBoolean("touch_enhancements", kEnlargedUiDefault); } } @@ -396,26 +396,26 @@ namespace OpenRCT2::Config { auto model = &_config.interface; writer->WriteSection("interface"); - writer->WriteBoolean("toolbar_buttons_centred", model->ToolbarButtonsCentred); - writer->WriteBoolean("toolbar_show_finances", model->ToolbarShowFinances); - writer->WriteBoolean("toolbar_show_research", model->ToolbarShowResearch); - writer->WriteBoolean("toolbar_show_cheats", model->ToolbarShowCheats); - writer->WriteBoolean("toolbar_show_news", model->ToolbarShowNews); - writer->WriteBoolean("toolbar_show_mute", model->ToolbarShowMute); - writer->WriteBoolean("toolbar_show_chat", model->ToolbarShowChat); - writer->WriteBoolean("toolbar_show_zoom", model->ToolbarShowZoom); - writer->WriteBoolean("toolbar_show_rotate_anti_clockwise", model->ToolbarShowRotateAnticlockwise); - writer->WriteBoolean("console_small_font", model->ConsoleSmallFont); - writer->WriteString("current_theme", model->CurrentThemePreset); - writer->WriteString("current_title_sequence", model->CurrentTitleSequencePreset); - writer->WriteBoolean("random_title_sequence", model->RandomTitleSequence); - writer->WriteInt32("object_selection_filter_flags", model->ObjectSelectionFilterFlags); + writer->WriteBoolean("toolbar_buttons_centred", model->toolbarButtonsCentred); + writer->WriteBoolean("toolbar_show_finances", model->toolbarShowFinances); + writer->WriteBoolean("toolbar_show_research", model->toolbarShowResearch); + writer->WriteBoolean("toolbar_show_cheats", model->toolbarShowCheats); + writer->WriteBoolean("toolbar_show_news", model->toolbarShowNews); + writer->WriteBoolean("toolbar_show_mute", model->toolbarShowMute); + writer->WriteBoolean("toolbar_show_chat", model->toolbarShowChat); + writer->WriteBoolean("toolbar_show_zoom", model->toolbarShowZoom); + writer->WriteBoolean("toolbar_show_rotate_anti_clockwise", model->toolbarShowRotateAnticlockwise); + writer->WriteBoolean("console_small_font", model->consoleSmallFont); + writer->WriteString("current_theme", model->currentThemePreset); + writer->WriteString("current_title_sequence", model->currentTitleSequencePreset); + writer->WriteBoolean("random_title_sequence", model->randomTitleSequence); + writer->WriteInt32("object_selection_filter_flags", model->objectSelectionFilterFlags); writer->WriteInt32("scenarioselect_last_tab", model->scenarioSelectLastTab); writer->WriteBoolean("scenario_preview_screenshots", model->scenarioPreviewScreenshots); - writer->WriteBoolean("list_ride_vehicles_separately", model->ListRideVehiclesSeparately); - writer->WriteBoolean("window_buttons_on_the_left", model->WindowButtonsOnTheLeft); - writer->WriteBoolean("enlarged_ui", model->EnlargedUi); - writer->WriteBoolean("touch_enhancements", model->TouchEnhancements); + writer->WriteBoolean("list_ride_vehicles_separately", model->listRideVehiclesSeparately); + writer->WriteBoolean("window_buttons_on_the_left", model->windowButtonsOnTheLeft); + writer->WriteBoolean("enlarged_ui", model->enlargedUi); + writer->WriteBoolean("touch_enhancements", model->touchEnhancements); } static void ReadSound(IIniReader* reader) @@ -423,16 +423,16 @@ namespace OpenRCT2::Config if (reader->ReadSection("sound")) { auto model = &_config.sound; - model->Device = reader->GetString("audio_device", ""); - model->MasterSoundEnabled = reader->GetBoolean("master_sound", true); - model->MasterVolume = reader->GetInt32("master_volume", 100); - model->TitleMusic = static_cast( + model->device = reader->GetString("audio_device", ""); + model->masterSoundEnabled = reader->GetBoolean("master_sound", true); + model->masterVolume = reader->GetInt32("master_volume", 100); + model->titleMusic = static_cast( reader->GetInt32("title_theme", EnumValue(TitleMusicKind::OpenRCT2))); - model->SoundEnabled = reader->GetBoolean("sound", true); - model->SoundVolume = reader->GetInt32("sound_volume", 100); - model->RideMusicEnabled = reader->GetBoolean("ride_music", true); - model->AudioFocus = reader->GetInt32("ride_music_volume", 100); - model->audio_focus = reader->GetBoolean("audio_focus", false); + model->soundEnabled = reader->GetBoolean("sound", true); + model->soundVolume = reader->GetInt32("sound_volume", 100); + model->rideMusicEnabled = reader->GetBoolean("ride_music", true); + model->rideMusicVolume = reader->GetInt32("ride_music_volume", 100); + model->audioFocus = reader->GetBoolean("audio_focus", false); } } @@ -440,15 +440,15 @@ namespace OpenRCT2::Config { auto model = &_config.sound; writer->WriteSection("sound"); - writer->WriteString("audio_device", model->Device); - writer->WriteBoolean("master_sound", model->MasterSoundEnabled); - writer->WriteInt32("master_volume", model->MasterVolume); - writer->WriteInt32("title_theme", EnumValue(model->TitleMusic)); - writer->WriteBoolean("sound", model->SoundEnabled); - writer->WriteInt32("sound_volume", model->SoundVolume); - writer->WriteBoolean("ride_music", model->RideMusicEnabled); - writer->WriteInt32("ride_music_volume", model->AudioFocus); - writer->WriteBoolean("audio_focus", model->audio_focus); + writer->WriteString("audio_device", model->device); + writer->WriteBoolean("master_sound", model->masterSoundEnabled); + writer->WriteInt32("master_volume", model->masterVolume); + writer->WriteInt32("title_theme", EnumValue(model->titleMusic)); + writer->WriteBoolean("sound", model->soundEnabled); + writer->WriteInt32("sound_volume", model->soundVolume); + writer->WriteBoolean("ride_music", model->rideMusicEnabled); + writer->WriteInt32("ride_music_volume", model->rideMusicVolume); + writer->WriteBoolean("audio_focus", model->audioFocus); } static void ReadNetwork(IIniReader* reader) @@ -472,26 +472,26 @@ namespace OpenRCT2::Config playerName = String::trim(playerName); auto model = &_config.network; - model->PlayerName = std::move(playerName); - model->DefaultPort = reader->GetInt32("default_port", ::Network::kDefaultPort); - model->ListenAddress = reader->GetString("listen_address", ""); - model->DefaultPassword = reader->GetString("default_password", ""); - model->StayConnected = reader->GetBoolean("stay_connected", true); - model->Advertise = reader->GetBoolean("advertise", true); - model->AdvertiseAddress = reader->GetString("advertise_address", ""); - model->Maxplayers = reader->GetInt32("maxplayers", 16); - model->ServerName = reader->GetString("server_name", "Server"); - model->ServerDescription = reader->GetString("server_description", ""); - model->ServerGreeting = reader->GetString("server_greeting", ""); - model->MasterServerUrl = reader->GetString("master_server_url", ""); - model->ProviderName = reader->GetString("provider_name", ""); - model->ProviderEmail = reader->GetString("provider_email", ""); - model->ProviderWebsite = reader->GetString("provider_website", ""); - model->KnownKeysOnly = reader->GetBoolean("known_keys_only", false); - model->LogChat = reader->GetBoolean("log_chat", false); - model->LogServerActions = reader->GetBoolean("log_server_actions", false); - model->PauseServerIfNoClients = reader->GetBoolean("pause_server_if_no_clients", false); - model->DesyncDebugging = reader->GetBoolean("desync_debugging", false); + model->playerName = std::move(playerName); + model->defaultPort = reader->GetInt32("default_port", ::Network::kDefaultPort); + model->listenAddress = reader->GetString("listen_address", ""); + model->defaultPassword = reader->GetString("default_password", ""); + model->stayConnected = reader->GetBoolean("stay_connected", true); + model->advertise = reader->GetBoolean("advertise", true); + model->advertiseAddress = reader->GetString("advertise_address", ""); + model->maxplayers = reader->GetInt32("maxplayers", 16); + model->serverName = reader->GetString("server_name", "Server"); + model->serverDescription = reader->GetString("server_description", ""); + model->serverGreeting = reader->GetString("server_greeting", ""); + model->masterServerUrl = reader->GetString("master_server_url", ""); + model->providerName = reader->GetString("provider_name", ""); + model->providerEmail = reader->GetString("provider_email", ""); + model->providerWebsite = reader->GetString("provider_website", ""); + model->knownKeysOnly = reader->GetBoolean("known_keys_only", false); + model->logChat = reader->GetBoolean("log_chat", false); + model->logServerActions = reader->GetBoolean("log_server_actions", false); + model->pauseServerIfNoClients = reader->GetBoolean("pause_server_if_no_clients", false); + model->desyncDebugging = reader->GetBoolean("desync_debugging", false); } } @@ -499,26 +499,26 @@ namespace OpenRCT2::Config { auto model = &_config.network; writer->WriteSection("network"); - writer->WriteString("player_name", model->PlayerName); - writer->WriteInt32("default_port", model->DefaultPort); - writer->WriteString("listen_address", model->ListenAddress); - writer->WriteString("default_password", model->DefaultPassword); - writer->WriteBoolean("stay_connected", model->StayConnected); - writer->WriteBoolean("advertise", model->Advertise); - writer->WriteString("advertise_address", model->AdvertiseAddress); - writer->WriteInt32("maxplayers", model->Maxplayers); - writer->WriteString("server_name", model->ServerName); - writer->WriteString("server_description", model->ServerDescription); - writer->WriteString("server_greeting", model->ServerGreeting); - writer->WriteString("master_server_url", model->MasterServerUrl); - writer->WriteString("provider_name", model->ProviderName); - writer->WriteString("provider_email", model->ProviderEmail); - writer->WriteString("provider_website", model->ProviderWebsite); - writer->WriteBoolean("known_keys_only", model->KnownKeysOnly); - writer->WriteBoolean("log_chat", model->LogChat); - writer->WriteBoolean("log_server_actions", model->LogServerActions); - writer->WriteBoolean("pause_server_if_no_clients", model->PauseServerIfNoClients); - writer->WriteBoolean("desync_debugging", model->DesyncDebugging); + writer->WriteString("player_name", model->playerName); + writer->WriteInt32("default_port", model->defaultPort); + writer->WriteString("listen_address", model->listenAddress); + writer->WriteString("default_password", model->defaultPassword); + writer->WriteBoolean("stay_connected", model->stayConnected); + writer->WriteBoolean("advertise", model->advertise); + writer->WriteString("advertise_address", model->advertiseAddress); + writer->WriteInt32("maxplayers", model->maxplayers); + writer->WriteString("server_name", model->serverName); + writer->WriteString("server_description", model->serverDescription); + writer->WriteString("server_greeting", model->serverGreeting); + writer->WriteString("master_server_url", model->masterServerUrl); + writer->WriteString("provider_name", model->providerName); + writer->WriteString("provider_email", model->providerEmail); + writer->WriteString("provider_website", model->providerWebsite); + writer->WriteBoolean("known_keys_only", model->knownKeysOnly); + writer->WriteBoolean("log_chat", model->logChat); + writer->WriteBoolean("log_server_actions", model->logServerActions); + writer->WriteBoolean("pause_server_if_no_clients", model->pauseServerIfNoClients); + writer->WriteBoolean("desync_debugging", model->desyncDebugging); } static void ReadNotifications(IIniReader* reader) @@ -526,24 +526,24 @@ namespace OpenRCT2::Config if (reader->ReadSection("notifications")) { auto model = &_config.notifications; - model->ParkAward = reader->GetBoolean("park_award", true); - model->ParkMarketingCampaignFinished = reader->GetBoolean("park_marketing_campaign_finished", true); - model->ParkWarnings = reader->GetBoolean("park_warnings", true); - model->ParkRatingWarnings = reader->GetBoolean("park_rating_warnings", true); - model->RideBrokenDown = reader->GetBoolean("ride_broken_down", true); - model->RideCrashed = reader->GetBoolean("ride_crashed", true); - model->RideCasualties = reader->GetBoolean("ride_casualties", true); - model->RideWarnings = reader->GetBoolean("ride_warnings", true); - model->RideResearched = reader->GetBoolean("ride_researched", true); - model->RideStalledVehicles = reader->GetBoolean("ride_stalled_vehicles", true); - model->GuestWarnings = reader->GetBoolean("guest_warnings", true); - model->GuestLeftPark = reader->GetBoolean("guest_left_park", true); - model->GuestQueuingForRide = reader->GetBoolean("guest_queuing_for_ride", true); - model->GuestOnRide = reader->GetBoolean("guest_on_ride", true); - model->GuestLeftRide = reader->GetBoolean("guest_left_ride", true); - model->GuestBoughtItem = reader->GetBoolean("guest_bought_item", true); - model->GuestUsedFacility = reader->GetBoolean("guest_used_facility", true); - model->GuestDied = reader->GetBoolean("guest_died", true); + model->parkAward = reader->GetBoolean("park_award", true); + model->parkMarketingCampaignFinished = reader->GetBoolean("park_marketing_campaign_finished", true); + model->parkWarnings = reader->GetBoolean("park_warnings", true); + model->parkRatingWarnings = reader->GetBoolean("park_rating_warnings", true); + model->rideBrokenDown = reader->GetBoolean("ride_broken_down", true); + model->rideCrashed = reader->GetBoolean("ride_crashed", true); + model->rideCasualties = reader->GetBoolean("ride_casualties", true); + model->rideWarnings = reader->GetBoolean("ride_warnings", true); + model->rideResearched = reader->GetBoolean("ride_researched", true); + model->rideStalledVehicles = reader->GetBoolean("ride_stalled_vehicles", true); + model->guestWarnings = reader->GetBoolean("guest_warnings", true); + model->guestLeftPark = reader->GetBoolean("guest_left_park", true); + model->guestQueuingForRide = reader->GetBoolean("guest_queuing_for_ride", true); + model->guestOnRide = reader->GetBoolean("guest_on_ride", true); + model->guestLeftRide = reader->GetBoolean("guest_left_ride", true); + model->guestBoughtItem = reader->GetBoolean("guest_bought_item", true); + model->guestUsedFacility = reader->GetBoolean("guest_used_facility", true); + model->guestDied = reader->GetBoolean("guest_died", true); } } @@ -551,24 +551,24 @@ namespace OpenRCT2::Config { auto model = &_config.notifications; writer->WriteSection("notifications"); - writer->WriteBoolean("park_award", model->ParkAward); - writer->WriteBoolean("park_marketing_campaign_finished", model->ParkMarketingCampaignFinished); - writer->WriteBoolean("park_warnings", model->ParkWarnings); - writer->WriteBoolean("park_rating_warnings", model->ParkRatingWarnings); - writer->WriteBoolean("ride_broken_down", model->RideBrokenDown); - writer->WriteBoolean("ride_crashed", model->RideCrashed); - writer->WriteBoolean("ride_casualties", model->RideCasualties); - writer->WriteBoolean("ride_warnings", model->RideWarnings); - writer->WriteBoolean("ride_researched", model->RideResearched); - writer->WriteBoolean("ride_stalled_vehicles", model->RideStalledVehicles); - writer->WriteBoolean("guest_warnings", model->GuestWarnings); - writer->WriteBoolean("guest_left_park", model->GuestLeftPark); - writer->WriteBoolean("guest_queuing_for_ride", model->GuestQueuingForRide); - writer->WriteBoolean("guest_on_ride", model->GuestOnRide); - writer->WriteBoolean("guest_left_ride", model->GuestLeftRide); - writer->WriteBoolean("guest_bought_item", model->GuestBoughtItem); - writer->WriteBoolean("guest_used_facility", model->GuestUsedFacility); - writer->WriteBoolean("guest_died", model->GuestDied); + writer->WriteBoolean("park_award", model->parkAward); + writer->WriteBoolean("park_marketing_campaign_finished", model->parkMarketingCampaignFinished); + writer->WriteBoolean("park_warnings", model->parkWarnings); + writer->WriteBoolean("park_rating_warnings", model->parkRatingWarnings); + writer->WriteBoolean("ride_broken_down", model->rideBrokenDown); + writer->WriteBoolean("ride_crashed", model->rideCrashed); + writer->WriteBoolean("ride_casualties", model->rideCasualties); + writer->WriteBoolean("ride_warnings", model->rideWarnings); + writer->WriteBoolean("ride_researched", model->rideResearched); + writer->WriteBoolean("ride_stalled_vehicles", model->rideStalledVehicles); + writer->WriteBoolean("guest_warnings", model->guestWarnings); + writer->WriteBoolean("guest_left_park", model->guestLeftPark); + writer->WriteBoolean("guest_queuing_for_ride", model->guestQueuingForRide); + writer->WriteBoolean("guest_on_ride", model->guestOnRide); + writer->WriteBoolean("guest_left_ride", model->guestLeftRide); + writer->WriteBoolean("guest_bought_item", model->guestBoughtItem); + writer->WriteBoolean("guest_used_facility", model->guestUsedFacility); + writer->WriteBoolean("guest_died", model->guestDied); } static void ReadFont(IIniReader* reader) @@ -576,20 +576,20 @@ namespace OpenRCT2::Config if (reader->ReadSection("font")) { auto model = &_config.fonts; - model->FileName = reader->GetString("file_name", ""); - model->FontName = reader->GetString("font_name", ""); - model->OffsetX = reader->GetInt32("x_offset", false); - model->OffsetY = reader->GetInt32("y_offset", true); - model->SizeTiny = reader->GetInt32("size_tiny", true); - model->SizeSmall = reader->GetInt32("size_small", false); - model->SizeMedium = reader->GetInt32("size_medium", false); - model->SizeBig = reader->GetInt32("size_big", false); - model->HeightTiny = reader->GetInt32("height_tiny", false); - model->HeightSmall = reader->GetInt32("height_small", false); - model->HeightMedium = reader->GetInt32("height_medium", false); - model->HeightBig = reader->GetInt32("height_big", false); - model->EnableHinting = reader->GetBoolean("enable_hinting", true); - model->HintingThreshold = reader->GetInt32("hinting_threshold", false); + model->fileName = reader->GetString("file_name", ""); + model->fontName = reader->GetString("font_name", ""); + model->offsetX = reader->GetInt32("x_offset", false); + model->offsetY = reader->GetInt32("y_offset", true); + model->sizeTiny = reader->GetInt32("size_tiny", true); + model->sizeSmall = reader->GetInt32("size_small", false); + model->sizeMedium = reader->GetInt32("size_medium", false); + model->sizeBig = reader->GetInt32("size_big", false); + model->heightTiny = reader->GetInt32("height_tiny", false); + model->heightSmall = reader->GetInt32("height_small", false); + model->heightMedium = reader->GetInt32("height_medium", false); + model->heightBig = reader->GetInt32("height_big", false); + model->enableHinting = reader->GetBoolean("enable_hinting", true); + model->hintingThreshold = reader->GetInt32("hinting_threshold", false); } } @@ -597,20 +597,20 @@ namespace OpenRCT2::Config { auto model = &_config.fonts; writer->WriteSection("font"); - writer->WriteString("file_name", model->FileName); - writer->WriteString("font_name", model->FontName); - writer->WriteInt32("x_offset", model->OffsetX); - writer->WriteInt32("y_offset", model->OffsetY); - writer->WriteInt32("size_tiny", model->SizeTiny); - writer->WriteInt32("size_small", model->SizeSmall); - writer->WriteInt32("size_medium", model->SizeMedium); - writer->WriteInt32("size_big", model->SizeBig); - writer->WriteInt32("height_tiny", model->HeightTiny); - writer->WriteInt32("height_small", model->HeightSmall); - writer->WriteInt32("height_medium", model->HeightMedium); - writer->WriteInt32("height_big", model->HeightBig); - writer->WriteBoolean("enable_hinting", model->EnableHinting); - writer->WriteInt32("hinting_threshold", model->HintingThreshold); + writer->WriteString("file_name", model->fileName); + writer->WriteString("font_name", model->fontName); + writer->WriteInt32("x_offset", model->offsetX); + writer->WriteInt32("y_offset", model->offsetY); + writer->WriteInt32("size_tiny", model->sizeTiny); + writer->WriteInt32("size_small", model->sizeSmall); + writer->WriteInt32("size_medium", model->sizeMedium); + writer->WriteInt32("size_big", model->sizeBig); + writer->WriteInt32("height_tiny", model->heightTiny); + writer->WriteInt32("height_small", model->heightSmall); + writer->WriteInt32("height_medium", model->heightMedium); + writer->WriteInt32("height_big", model->heightBig); + writer->WriteBoolean("enable_hinting", model->enableHinting); + writer->WriteInt32("hinting_threshold", model->hintingThreshold); } static void ReadPlugin(IIniReader* reader) @@ -618,8 +618,8 @@ namespace OpenRCT2::Config if (reader->ReadSection("plugin")) { auto model = &_config.plugin; - model->EnableHotReloading = reader->GetBoolean("enable_hot_reloading", false); - model->AllowedHosts = reader->GetString("allowed_hosts", ""); + model->enableHotReloading = reader->GetBoolean("enable_hot_reloading", false); + model->allowedHosts = reader->GetString("allowed_hosts", ""); } } @@ -627,8 +627,8 @@ namespace OpenRCT2::Config { auto model = &_config.plugin; writer->WriteSection("plugin"); - writer->WriteBoolean("enable_hot_reloading", model->EnableHotReloading); - writer->WriteString("allowed_hosts", model->AllowedHosts); + writer->WriteBoolean("enable_hot_reloading", model->enableHotReloading); + writer->WriteString("allowed_hosts", model->allowedHosts); } bool SetDefaults() @@ -852,7 +852,7 @@ namespace OpenRCT2::Config std::string path = FindRCT2Path(); if (!path.empty()) { - Get().general.RCT2Path = path; + Get().general.rct2Path = path; } else { @@ -950,7 +950,7 @@ namespace OpenRCT2::Config { if (Platform::OriginalGameDataExists(possiblePath)) { - Get().general.RCT2Path = possiblePath; + Get().general.rct2Path = possiblePath; return true; } } @@ -968,7 +968,7 @@ namespace OpenRCT2::Config std::string rct1Path = FindRCT1Path(); if (!rct1Path.empty()) { - Get().general.RCT1Path = std::move(rct1Path); + Get().general.rct2Path = std::move(rct1Path); } return true; diff --git a/src/openrct2/config/Config.h b/src/openrct2/config/Config.h index 2711c27c51..29cb6727e8 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -24,212 +24,212 @@ namespace OpenRCT2::Config struct General { // Paths - u8string RCT1Path; - u8string RCT2Path; + u8string rct1Path; + u8string rct2Path; // Display - int32_t DefaultDisplay; - int32_t WindowWidth; - int32_t WindowHeight; - int32_t FullscreenMode; - int32_t FullscreenWidth; - int32_t FullscreenHeight; - float WindowScale; - bool InferDisplayDPI; - ::DrawingEngine DrawingEngine; - bool UncapFPS; - bool UseVSync; - bool ShowFPS; - std::atomic_uint8_t MultiThreading; - bool MinimizeFullscreenFocusLoss; - bool DisableScreensaver; + int32_t defaultDisplay; + int32_t windowWidth; + int32_t windowHeight; + int32_t fullscreenMode; + int32_t fullscreenWidth; + int32_t fullscreenHeight; + float windowScale; + bool inferDisplayDPI; + ::DrawingEngine drawingEngine; + bool uncapFPS; + bool useVSync; + bool showFPS; + std::atomic_uint8_t multiThreading; + bool minimizeFullscreenFocusLoss; + bool disableScreensaver; // Map rendering - bool LandscapeSmoothing; - bool AlwaysShowGridlines; - VirtualFloorStyles VirtualFloorStyle; - bool DayNightCycle; - bool EnableLightFx; - bool EnableLightFxForVehicles; - bool UpperCaseBanners; - bool RenderWeatherEffects; - bool RenderWeatherGloom; - bool DisableLightningEffect; - bool ShowGuestPurchases; - bool TransparentScreenshot; - bool TransparentWater; + bool landscapeSmoothing; + bool alwaysShowGridlines; + VirtualFloorStyles virtualFloorStyle; + bool dayNightCycle; + bool enableLightFx; + bool enableLightFxForVehicles; + bool upperCaseBanners; + bool renderWeatherEffects; + bool renderWeatherGloom; + bool disableLightningEffect; + bool showGuestPurchases; + bool transparentScreenshot; + bool transparentWater; - bool InvisibleRides; - bool InvisibleVehicles; - bool InvisibleTrees; - bool InvisibleScenery; - bool InvisiblePaths; - bool InvisibleSupports; + bool invisibleRides; + bool invisibleVehicles; + bool invisibleTrees; + bool invisibleScenery; + bool invisiblePaths; + bool invisibleSupports; // Localisation - int32_t Language; - OpenRCT2::MeasurementFormat MeasurementFormat; - TemperatureUnit TemperatureFormat; - bool ShowHeightAsUnits; - int32_t DateFormat; - CurrencyType CurrencyFormat; - int32_t CustomCurrencyRate; - CurrencyAffix CustomCurrencyAffix; - u8string CustomCurrencySymbol; + int32_t language; + OpenRCT2::MeasurementFormat measurementFormat; + TemperatureUnit temperatureFormat; + bool showHeightAsUnits; + int32_t dateFormat; + CurrencyType currencyFormat; + int32_t customCurrencyRate; + CurrencyAffix customCurrencyAffix; + u8string customCurrencySymbol; // Controls - bool EdgeScrolling; - int32_t EdgeScrollingSpeed; - bool TrapCursor; - bool InvertViewportDrag; - bool ZoomToCursor; + bool edgeScrolling; + int32_t edgeScrollingSpeed; + bool trapCursor; + bool invertViewportDrag; + bool zoomToCursor; // Gamepad int32_t gamepadDeadzone; float gamepadSensitivity; // Miscellaneous - bool PlayIntro; - int32_t WindowSnapProximity; - bool SavePluginData; - bool DebuggingTools; - int32_t AutosaveFrequency; - int32_t AutosaveAmount; - bool AutoStaffPlacement; - bool HandymenMowByDefault; - bool AutoOpenShops; - int32_t DefaultInspectionInterval; - int32_t WindowLimit; - bool ScenarioUnlockingEnabled; - bool ScenarioHideMegaPark; - bool ShowRealNamesOfGuests; - bool ShowRealNamesOfStaff; - bool AllowEarlyCompletion; - u8string AssetPackOrder; - u8string EnabledAssetPacks; + bool playIntro; + int32_t windowSnapProximity; + bool savePluginData; + bool debuggingTools; + int32_t autosaveFrequency; + int32_t autosaveAmount; + bool autoStaffPlacement; + bool handymenMowByDefault; + bool autoOpenShops; + int32_t defaultInspectionInterval; + int32_t windowLimit; + bool scenarioUnlockingEnabled; + bool scenarioHideMegaPark; + bool showRealNamesOfGuests; + bool showRealNamesOfStaff; + bool allowEarlyCompletion; + u8string assetPackOrder; + u8string enabledAssetPacks; // Loading and saving - bool ConfirmationPrompt; - FileBrowserSort LoadSaveSort; - u8string LastSaveGameDirectory; - u8string LastSaveLandscapeDirectory; - u8string LastSaveScenarioDirectory; - u8string LastSaveTrackDirectory; - u8string LastRunVersion; - bool UseNativeBrowseDialog; - int64_t LastVersionCheckTime; - int16_t FileBrowserWidth; - int16_t FileBrowserHeight; - bool FileBrowserShowSizeColumn; - bool FileBrowserShowDateColumn; - ParkPreviewPref FileBrowserPreviewType; + bool confirmationPrompt; + FileBrowserSort loadSaveSort; + u8string lastSaveGameDirectory; + u8string lastSaveLandscapeDirectory; + u8string lastSaveScenarioDirectory; + u8string lastSaveTrackDirectory; + u8string lastRunVersion; + bool useNativeBrowseDialog; + int64_t lastVersionCheckTime; + int16_t fileBrowserWidth; + int16_t fileBrowserHeight; + bool fileBrowserShowSizeColumn; + bool fileBrowserShowDateColumn; + ParkPreviewPref fileBrowserPreviewType; }; struct Interface { - bool ToolbarButtonsCentred; - bool ToolbarShowFinances; - bool ToolbarShowResearch; - bool ToolbarShowCheats; - bool ToolbarShowNews; - bool ToolbarShowMute; - bool ToolbarShowChat; - bool ToolbarShowZoom; - bool ToolbarShowRotateAnticlockwise; - bool ConsoleSmallFont; - bool RandomTitleSequence; - u8string CurrentThemePreset; - u8string CurrentTitleSequencePreset; - int32_t ObjectSelectionFilterFlags; + bool toolbarButtonsCentred; + bool toolbarShowFinances; + bool toolbarShowResearch; + bool toolbarShowCheats; + bool toolbarShowNews; + bool toolbarShowMute; + bool toolbarShowChat; + bool toolbarShowZoom; + bool toolbarShowRotateAnticlockwise; + bool consoleSmallFont; + bool randomTitleSequence; + u8string currentThemePreset; + u8string currentTitleSequencePreset; + int32_t objectSelectionFilterFlags; int32_t scenarioSelectLastTab; bool scenarioPreviewScreenshots; - bool ListRideVehiclesSeparately; - bool WindowButtonsOnTheLeft; - bool EnlargedUi; - bool TouchEnhancements; + bool listRideVehiclesSeparately; + bool windowButtonsOnTheLeft; + bool enlargedUi; + bool touchEnhancements; }; struct Sound { - u8string Device; - bool MasterSoundEnabled; - uint8_t MasterVolume; - TitleMusicKind TitleMusic; - bool SoundEnabled; - uint8_t SoundVolume; - bool RideMusicEnabled; - uint8_t AudioFocus; - bool audio_focus; + u8string device; + bool masterSoundEnabled; + uint8_t masterVolume; + TitleMusicKind titleMusic; + bool soundEnabled; + uint8_t soundVolume; + bool rideMusicEnabled; + uint8_t rideMusicVolume; + bool audioFocus; }; struct Network { - u8string PlayerName; - int32_t DefaultPort; - u8string ListenAddress; - u8string DefaultPassword; - bool StayConnected; - bool Advertise; - u8string AdvertiseAddress; - int32_t Maxplayers; - u8string ServerName; - u8string ServerDescription; - u8string ServerGreeting; - u8string MasterServerUrl; - u8string ProviderName; - u8string ProviderEmail; - u8string ProviderWebsite; - bool KnownKeysOnly; - bool LogChat; - bool LogServerActions; - bool PauseServerIfNoClients; - bool DesyncDebugging; + u8string playerName; + int32_t defaultPort; + u8string listenAddress; + u8string defaultPassword; + bool stayConnected; + bool advertise; + u8string advertiseAddress; + int32_t maxplayers; + u8string serverName; + u8string serverDescription; + u8string serverGreeting; + u8string masterServerUrl; + u8string providerName; + u8string providerEmail; + u8string providerWebsite; + bool knownKeysOnly; + bool logChat; + bool logServerActions; + bool pauseServerIfNoClients; + bool desyncDebugging; }; struct Notification { - bool ParkAward; - bool ParkMarketingCampaignFinished; - bool ParkWarnings; - bool ParkRatingWarnings; - bool RideBrokenDown; - bool RideCrashed; - bool RideCasualties; - bool RideWarnings; - bool RideResearched; - bool RideStalledVehicles; - bool GuestWarnings; - bool GuestLeftPark; - bool GuestQueuingForRide; - bool GuestOnRide; - bool GuestLeftRide; - bool GuestBoughtItem; - bool GuestUsedFacility; - bool GuestDied; + bool parkAward; + bool parkMarketingCampaignFinished; + bool parkWarnings; + bool parkRatingWarnings; + bool rideBrokenDown; + bool rideCrashed; + bool rideCasualties; + bool rideWarnings; + bool rideResearched; + bool rideStalledVehicles; + bool guestWarnings; + bool guestLeftPark; + bool guestQueuingForRide; + bool guestOnRide; + bool guestLeftRide; + bool guestBoughtItem; + bool guestUsedFacility; + bool guestDied; }; struct Font { - u8string FileName; - u8string FontName; - int32_t OffsetX; - int32_t OffsetY; - int32_t SizeTiny; - int32_t SizeSmall; - int32_t SizeMedium; - int32_t SizeBig; - int32_t HeightTiny; - int32_t HeightSmall; - int32_t HeightMedium; - int32_t HeightBig; - bool EnableHinting; - int32_t HintingThreshold; + u8string fileName; + u8string fontName; + int32_t offsetX; + int32_t offsetY; + int32_t sizeTiny; + int32_t sizeSmall; + int32_t sizeMedium; + int32_t sizeBig; + int32_t heightTiny; + int32_t heightSmall; + int32_t heightMedium; + int32_t heightBig; + bool enableHinting; + int32_t hintingThreshold; }; struct Plugin { - bool EnableHotReloading; - u8string AllowedHosts; + bool enableHotReloading; + u8string allowedHosts; }; struct Config diff --git a/src/openrct2/drawing/Drawing.Sprite.cpp b/src/openrct2/drawing/Drawing.Sprite.cpp index 8baafc555b..5bd630f0fb 100644 --- a/src/openrct2/drawing/Drawing.Sprite.cpp +++ b/src/openrct2/drawing/Drawing.Sprite.cpp @@ -606,14 +606,14 @@ bool GfxLoadCsg() { LOG_VERBOSE("GfxLoadCsg()"); - if (Config::Get().general.RCT1Path.empty()) + if (Config::Get().general.rct1Path.empty()) { LOG_VERBOSE(" unable to load CSG, RCT1 path not set"); return false; } - auto pathHeaderPath = FindCsg1idatAtLocation(Config::Get().general.RCT1Path); - auto pathDataPath = FindCsg1datAtLocation(Config::Get().general.RCT1Path); + auto pathHeaderPath = FindCsg1idatAtLocation(Config::Get().general.rct1Path); + auto pathDataPath = FindCsg1datAtLocation(Config::Get().general.rct1Path); try { auto fileHeader = FileStream(pathHeaderPath, FileMode::open); diff --git a/src/openrct2/drawing/Drawing.String.cpp b/src/openrct2/drawing/Drawing.String.cpp index f876b99b12..6022be7b85 100644 --- a/src/openrct2/drawing/Drawing.String.cpp +++ b/src/openrct2/drawing/Drawing.String.cpp @@ -533,7 +533,7 @@ static void TTFDrawStringRawTTF(RenderTarget& rt, std::string_view text, TextDra { int32_t drawX = info->x + fontDesc->offset_x; int32_t drawY = info->y + fontDesc->offset_y; - uint8_t hintThresh = Config::Get().fonts.EnableHinting ? fontDesc->hinting_threshold : 0; + uint8_t hintThresh = Config::Get().fonts.enableHinting ? fontDesc->hinting_threshold : 0; OpenRCT2::Drawing::IDrawingContext* dc = drawingEngine->GetDrawingContext(); dc->DrawTTFBitmap(rt, info, surface, drawX, drawY, hintThresh); } diff --git a/src/openrct2/drawing/Drawing.cpp b/src/openrct2/drawing/Drawing.cpp index 13aa27a688..40d7bf594b 100644 --- a/src/openrct2/drawing/Drawing.cpp +++ b/src/openrct2/drawing/Drawing.cpp @@ -1011,7 +1011,7 @@ void UpdatePaletteEffects() // Animate the water/lava/chain movement palette uint32_t shade = 0; - if (Config::Get().general.RenderWeatherGloom) + if (Config::Get().general.renderWeatherGloom) { auto paletteId = ClimateGetWeatherGloomPaletteId(getGameState().weatherCurrent); if (paletteId != FilterPaletteID::paletteNull) @@ -1113,9 +1113,9 @@ void RefreshVideo() void ToggleWindowedMode() { - int32_t rt = Config::Get().general.FullscreenMode == 0 ? 2 : 0; + int32_t rt = Config::Get().general.fullscreenMode == 0 ? 2 : 0; ContextSetFullscreenMode(rt); - Config::Get().general.FullscreenMode = rt; + Config::Get().general.fullscreenMode = rt; Config::Save(); } diff --git a/src/openrct2/drawing/DrawingLock.hpp b/src/openrct2/drawing/DrawingLock.hpp index 00fa292cf9..dfee740028 100644 --- a/src/openrct2/drawing/DrawingLock.hpp +++ b/src/openrct2/drawing/DrawingLock.hpp @@ -22,7 +22,7 @@ class DrawingUniqueLock public: DrawingUniqueLock(T& mutex) : _mutex(mutex) - , _enabled(Config::Get().general.MultiThreading) + , _enabled(Config::Get().general.multiThreading) { if (_enabled) _mutex.lock(); @@ -43,7 +43,7 @@ class DrawingSharedLock public: DrawingSharedLock(T& mutex) : _mutex(mutex) - , _enabled(Config::Get().general.MultiThreading) + , _enabled(Config::Get().general.multiThreading) { if (_enabled) _mutex.lock_shared(); diff --git a/src/openrct2/drawing/LightFX.cpp b/src/openrct2/drawing/LightFX.cpp index 0c26ae1421..2325588820 100644 --- a/src/openrct2/drawing/LightFX.cpp +++ b/src/openrct2/drawing/LightFX.cpp @@ -142,12 +142,12 @@ namespace OpenRCT2::Drawing::LightFx bool IsAvailable() { - return _lightfxAvailable && Config::Get().general.EnableLightFx; + return _lightfxAvailable && Config::Get().general.enableLightFx; } bool ForVehiclesIsAvailable() { - return IsAvailable() && Config::Get().general.EnableLightFxForVehicles; + return IsAvailable() && Config::Get().general.enableLightFxForVehicles; } void Init() diff --git a/src/openrct2/drawing/ScrollingText.cpp b/src/openrct2/drawing/ScrollingText.cpp index 81bd802ee5..3b571802ba 100644 --- a/src/openrct2/drawing/ScrollingText.cpp +++ b/src/openrct2/drawing/ScrollingText.cpp @@ -143,7 +143,7 @@ static int32_t ScrollingTextGetMatchingOrOldest( static void ScrollingTextFormat(utf8* dst, size_t size, DrawScrollText* scrollText) { - if (Config::Get().general.UpperCaseBanners) + if (Config::Get().general.upperCaseBanners) { FormatStringToUpper(dst, size, scrollText->string_id, scrollText->string_args); } @@ -1585,7 +1585,7 @@ static void ScrollingTextSetBitmapForTTF( int32_t min_vpos = -fontDesc->offset_y; int32_t max_vpos = std::min(surface->h - 2, min_vpos + 7); - bool use_hinting = Config::Get().fonts.EnableHinting && fontDesc->hinting_threshold > 0; + bool use_hinting = Config::Get().fonts.enableHinting && fontDesc->hinting_threshold > 0; for (int32_t x = 0;; x++) { diff --git a/src/openrct2/drawing/TTF.cpp b/src/openrct2/drawing/TTF.cpp index cef6458ace..358bd95f41 100644 --- a/src/openrct2/drawing/TTF.cpp +++ b/src/openrct2/drawing/TTF.cpp @@ -82,7 +82,7 @@ static void TTFToggleHinting(bool) for (int32_t i = 0; i < FontStyleCount; i++) { TTFFontDescriptor* fontDesc = &(gCurrentTTFFontSet->size[i]); - bool use_hinting = Config::Get().fonts.EnableHinting && fontDesc->hinting_threshold; + bool use_hinting = Config::Get().fonts.enableHinting && fontDesc->hinting_threshold; TTF_SetFontHinting(fontDesc->font, use_hinting ? 1 : 0); } diff --git a/src/openrct2/drawing/Weather.cpp b/src/openrct2/drawing/Weather.cpp index 7612b75373..b69cc47025 100644 --- a/src/openrct2/drawing/Weather.cpp +++ b/src/openrct2/drawing/Weather.cpp @@ -53,7 +53,7 @@ const DrawWeatherFunc DrawSnowFunctions[] = { */ void DrawWeather(RenderTarget& rt, IWeatherDrawer* weatherDrawer) { - if (!Config::Get().general.RenderWeatherEffects) + if (!Config::Get().general.renderWeatherEffects) return; uint32_t viewFlags = 0; diff --git a/src/openrct2/drawing/X8DrawingEngine.cpp b/src/openrct2/drawing/X8DrawingEngine.cpp index 021118354d..fc8731e7bb 100644 --- a/src/openrct2/drawing/X8DrawingEngine.cpp +++ b/src/openrct2/drawing/X8DrawingEngine.cpp @@ -123,7 +123,7 @@ X8DrawingEngine::X8DrawingEngine([[maybe_unused]] Ui::IUiContext& uiContext) _drawingContext = new X8DrawingContext(this); _mainRT.DrawingEngine = this; LightFx::SetAvailable(true); - _lastLightFXenabled = Config::Get().general.EnableLightFx; + _lastLightFXenabled = Config::Get().general.enableLightFx; } X8DrawingEngine::~X8DrawingEngine() @@ -165,11 +165,11 @@ void X8DrawingEngine::BeginDraw() if (!IntroIsPlaying()) { // HACK we need to re-configure the bits if light fx has been enabled / disabled - if (_lastLightFXenabled != Config::Get().general.EnableLightFx) + if (_lastLightFXenabled != Config::Get().general.enableLightFx) { Resize(_width, _height); GfxInvalidateScreen(); - _lastLightFXenabled = Config::Get().general.EnableLightFx; + _lastLightFXenabled = Config::Get().general.enableLightFx; } _weatherDrawer.Restore(_mainRT); } diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index b821d36a47..4cfab84ac1 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -1701,7 +1701,7 @@ static bool GuestDecideAndBuyItem(Guest& guest, Ride& ride, const ShopItem shopI auto ft = Formatter(); guest.FormatNameTo(ft); ft.Add(shopItemDescriptor.Naming.Indefinite); - if (Config::Get().notifications.GuestBoughtItem) + if (Config::Get().notifications.guestBoughtItem) { News::AddItemToQueue(News::ItemType::peepOnRide, STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X, guest.Id, ft); } @@ -3633,7 +3633,7 @@ void PeepUpdateRideLeaveEntranceDefault(Guest& guest, Ride& ride, CoordsXYZD& en auto ft = Formatter(); ride.formatNameTo(ft); - if (Config::Get().notifications.RideWarnings) + if (Config::Get().notifications.rideWarnings) { News::AddItemToQueue(News::ItemType::ride, STR_GUESTS_GETTING_STUCK_ON_RIDE, guest.CurrentRide.ToUnderlying(), ft); } @@ -3938,7 +3938,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride& ride) else msg_string = STR_PEEP_TRACKING_PEEP_IS_ON_X; - if (Config::Get().notifications.GuestOnRide) + if (Config::Get().notifications.guestOnRide) { News::AddItemToQueue(News::ItemType::peepOnRide, msg_string, Id, ft); } @@ -5097,7 +5097,7 @@ void Guest::UpdateRideLeaveExit() FormatNameTo(ft); ride->formatNameTo(ft); - if (Config::Get().notifications.GuestLeftRide) + if (Config::Get().notifications.guestLeftRide) { News::AddItemToQueue(News::ItemType::peepOnRide, STR_PEEP_TRACKING_LEFT_RIDE_X, Id, ft); } diff --git a/src/openrct2/entity/MoneyEffect.cpp b/src/openrct2/entity/MoneyEffect.cpp index a55a6ad42d..d96e87ea49 100644 --- a/src/openrct2/entity/MoneyEffect.cpp +++ b/src/openrct2/entity/MoneyEffect.cpp @@ -192,7 +192,7 @@ void MoneyEffect::Paint(PaintSession& session, int32_t imageDirection) const return; } - if (GuestPurchase && !Config::Get().general.ShowGuestPurchases) + if (GuestPurchase && !Config::Get().general.showGuestPurchases) { // Don't show the money effect for guest purchases when the option is disabled. return; diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 6b8fdf34ad..4b34e64383 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -757,7 +757,7 @@ void Peep::UpdateFalling() if (Action == PeepActionType::drowning) return; - if (Config::Get().notifications.GuestDied) + if (Config::Get().notifications.guestDied) { auto ft = Formatter(); FormatNameTo(ft); @@ -1020,7 +1020,7 @@ void PeepProblemWarningsUpdate() else if (hungerCounter >= kPeepHungerWarningThreshold && hungerCounter >= gameState.park.numGuestsInPark / 16) { warningThrottle[0] = 4; - if (Config::Get().notifications.GuestWarnings) + if (Config::Get().notifications.guestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Hungry); News::AddItemToQueue(News::ItemType::peeps, STR_PEEPS_ARE_HUNGRY, thoughtId, {}); @@ -1032,7 +1032,7 @@ void PeepProblemWarningsUpdate() else if (thirstCounter >= kPeepThirstWarningThreshold && thirstCounter >= gameState.park.numGuestsInPark / 16) { warningThrottle[1] = 4; - if (Config::Get().notifications.GuestWarnings) + if (Config::Get().notifications.guestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Thirsty); News::AddItemToQueue(News::ItemType::peeps, STR_PEEPS_ARE_THIRSTY, thoughtId, {}); @@ -1044,7 +1044,7 @@ void PeepProblemWarningsUpdate() else if (toiletCounter >= kPeepToiletWarningThreshold && toiletCounter >= gameState.park.numGuestsInPark / 16) { warningThrottle[2] = 4; - if (Config::Get().notifications.GuestWarnings) + if (Config::Get().notifications.guestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Toilet); News::AddItemToQueue(News::ItemType::peeps, STR_PEEPS_CANT_FIND_TOILET, thoughtId, {}); @@ -1056,7 +1056,7 @@ void PeepProblemWarningsUpdate() else if (litterCounter >= kPeepLitterWarningThreshold && litterCounter >= gameState.park.numGuestsInPark / 32) { warningThrottle[3] = 4; - if (Config::Get().notifications.GuestWarnings) + if (Config::Get().notifications.guestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::BadLitter); News::AddItemToQueue(News::ItemType::peeps, STR_PEEPS_DISLIKE_LITTER, thoughtId, {}); @@ -1068,7 +1068,7 @@ void PeepProblemWarningsUpdate() else if (disgustCounter >= kPeepDisgustWarningThreshold && disgustCounter >= gameState.park.numGuestsInPark / 32) { warningThrottle[4] = 4; - if (Config::Get().notifications.GuestWarnings) + if (Config::Get().notifications.guestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::PathDisgusting); News::AddItemToQueue(News::ItemType::peeps, STR_PEEPS_DISGUSTED_BY_PATHS, thoughtId, {}); @@ -1080,7 +1080,7 @@ void PeepProblemWarningsUpdate() else if (vandalismCounter >= kPeepVandalismWarningThreshold && vandalismCounter >= gameState.park.numGuestsInPark / 32) { warningThrottle[5] = 4; - if (Config::Get().notifications.GuestWarnings) + if (Config::Get().notifications.guestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Vandalism); News::AddItemToQueue(News::ItemType::peeps, STR_PEEPS_DISLIKE_VANDALISM, thoughtId, {}); @@ -1092,7 +1092,7 @@ void PeepProblemWarningsUpdate() else if (noexitCounter >= kPeepNoExitWarningThreshold) { warningThrottle[6] = 4; - if (Config::Get().notifications.GuestWarnings) + if (Config::Get().notifications.guestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::CantFindExit); News::AddItemToQueue(News::ItemType::peeps, STR_PEEPS_GETTING_LOST_OR_STUCK, thoughtId, {}); @@ -1101,7 +1101,7 @@ void PeepProblemWarningsUpdate() else if (lostCounter >= kPeepLostWarningThreshold) { warningThrottle[6] = 4; - if (Config::Get().notifications.GuestWarnings) + if (Config::Get().notifications.guestWarnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Lost); News::AddItemToQueue(News::ItemType::peeps, STR_PEEPS_GETTING_LOST_OR_STUCK, thoughtId, {}); @@ -1114,7 +1114,7 @@ void PeepProblemWarningsUpdate() { // The amount of guests complaining about queue duration is at least 5% of the amount of queuing guests. // This includes guests who are no longer queuing. warningThrottle[7] = 4; - if (Config::Get().notifications.GuestWarnings) + if (Config::Get().notifications.guestWarnings) { auto rideWithMostQueueComplaints = std::max_element( queueComplainingGuestsMap.begin(), queueComplainingGuestsMap.end(), @@ -1145,7 +1145,7 @@ void PeepUpdateCrowdNoise() if (OpenRCT2::Audio::gGameSoundsOff) return; - if (!Config::Get().sound.SoundEnabled) + if (!Config::Get().sound.soundEnabled) return; if (gLegacyScene == LegacyScene::scenarioEditor) @@ -1709,7 +1709,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ auto ft = Formatter(); guest->FormatNameTo(ft); ride->formatNameTo(ft); - if (Config::Get().notifications.GuestQueuingForRide) + if (Config::Get().notifications.guestQueuingForRide) { News::AddItemToQueue(News::ItemType::peepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->Id, ft); } @@ -1770,7 +1770,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ { auto ft = Formatter(); guest->FormatNameTo(ft); - if (Config::Get().notifications.GuestLeftPark) + if (Config::Get().notifications.guestLeftPark) { News::AddItemToQueue(News::ItemType::peepOnRide, STR_PEEP_TRACKING_LEFT_PARK, guest->Id, ft); } @@ -2161,7 +2161,7 @@ static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) auto ft = Formatter(); guest->FormatNameTo(ft); ride->formatNameTo(ft); - if (Config::Get().notifications.GuestQueuingForRide) + if (Config::Get().notifications.guestQueuingForRide) { News::AddItemToQueue( News::ItemType::peepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->Id, ft); @@ -2279,7 +2279,7 @@ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) StringId string_id = ride->getRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside) ? STR_PEEP_TRACKING_PEEP_IS_IN_X : STR_PEEP_TRACKING_PEEP_IS_ON_X; - if (Config::Get().notifications.GuestUsedFacility) + if (Config::Get().notifications.guestUsedFacility) { News::AddItemToQueue(News::ItemType::peepOnRide, string_id, guest->Id, ft); } @@ -2556,12 +2556,12 @@ void PeepUpdateNames() auto& gameState = getGameState(); auto& config = Config::Get().general; - if (config.ShowRealNamesOfGuests) + if (config.showRealNamesOfGuests) gameState.park.flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; else gameState.park.flags &= ~PARK_FLAGS_SHOW_REAL_GUEST_NAMES; - if (config.ShowRealNamesOfStaff) + if (config.showRealNamesOfStaff) gameState.park.flags |= PARK_FLAGS_SHOW_REAL_STAFF_NAMES; else gameState.park.flags &= ~PARK_FLAGS_SHOW_REAL_STAFF_NAMES; diff --git a/src/openrct2/interface/Fonts.cpp b/src/openrct2/interface/Fonts.cpp index 1677d476f8..54185412f8 100644 --- a/src/openrct2/interface/Fonts.cpp +++ b/src/openrct2/interface/Fonts.cpp @@ -149,15 +149,15 @@ static bool LoadFont(LocalisationService& localisationService, TTFFontSetDescrip static bool LoadCustomConfigFont(LocalisationService& localisationService) { static TTFFontSetDescriptor TTFFontCustom = { { - { Config::Get().fonts.FileName.c_str(), Config::Get().fonts.FontName.c_str(), Config::Get().fonts.SizeTiny, - Config::Get().fonts.OffsetX, Config::Get().fonts.OffsetY, Config::Get().fonts.HeightTiny, - Config::Get().fonts.HintingThreshold, nullptr }, - { Config::Get().fonts.FileName.c_str(), Config::Get().fonts.FontName.c_str(), Config::Get().fonts.SizeSmall, - Config::Get().fonts.OffsetX, Config::Get().fonts.OffsetY, Config::Get().fonts.HeightSmall, - Config::Get().fonts.HintingThreshold, nullptr }, - { Config::Get().fonts.FileName.c_str(), Config::Get().fonts.FontName.c_str(), Config::Get().fonts.SizeMedium, - Config::Get().fonts.OffsetX, Config::Get().fonts.OffsetY, Config::Get().fonts.HeightMedium, - Config::Get().fonts.HintingThreshold, nullptr }, + { Config::Get().fonts.fileName.c_str(), Config::Get().fonts.fontName.c_str(), Config::Get().fonts.sizeTiny, + Config::Get().fonts.offsetX, Config::Get().fonts.offsetY, Config::Get().fonts.heightTiny, + Config::Get().fonts.hintingThreshold, nullptr }, + { Config::Get().fonts.fileName.c_str(), Config::Get().fonts.fontName.c_str(), Config::Get().fonts.sizeSmall, + Config::Get().fonts.offsetX, Config::Get().fonts.offsetY, Config::Get().fonts.heightSmall, + Config::Get().fonts.hintingThreshold, nullptr }, + { Config::Get().fonts.fileName.c_str(), Config::Get().fonts.fontName.c_str(), Config::Get().fonts.sizeMedium, + Config::Get().fonts.offsetX, Config::Get().fonts.offsetY, Config::Get().fonts.heightMedium, + Config::Get().fonts.hintingThreshold, nullptr }, } }; TTFDispose(); @@ -177,7 +177,7 @@ void TryLoadFonts(LocalisationService& localisationService) if (fontFamily != kFamilyOpenRCT2Sprite) { - if (!Config::Get().fonts.FileName.empty()) + if (!Config::Get().fonts.fileName.empty()) { if (LoadCustomConfigFont(localisationService)) { diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index e2813feaff..0d620c1438 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -682,7 +682,7 @@ static void ConsoleCommandGet(InteractiveConsole& console, const arguments_t& ar } else if (argv[0] == "console_small_font") { - console.WriteFormatLine("console_small_font %d", Config::Get().interface.ConsoleSmallFont); + console.WriteFormatLine("console_small_font %d", Config::Get().interface.consoleSmallFont); } else if (argv[0] == "location") { @@ -699,19 +699,19 @@ static void ConsoleCommandGet(InteractiveConsole& console, const arguments_t& ar } else if (argv[0] == "window_scale") { - console.WriteFormatLine("window_scale %.3f", Config::Get().general.WindowScale); + console.WriteFormatLine("window_scale %.3f", Config::Get().general.windowScale); } else if (argv[0] == "window_limit") { - console.WriteFormatLine("window_limit %d", Config::Get().general.WindowLimit); + console.WriteFormatLine("window_limit %d", Config::Get().general.windowLimit); } else if (argv[0] == "render_weather_effects") { - console.WriteFormatLine("render_weather_effects %d", Config::Get().general.RenderWeatherEffects); + console.WriteFormatLine("render_weather_effects %d", Config::Get().general.renderWeatherEffects); } else if (argv[0] == "render_weather_gloom") { - console.WriteFormatLine("render_weather_gloom %d", Config::Get().general.RenderWeatherGloom); + console.WriteFormatLine("render_weather_gloom %d", Config::Get().general.renderWeatherGloom); } else if (argv[0] == "cheat_sandbox_mode") { @@ -736,7 +736,7 @@ static void ConsoleCommandGet(InteractiveConsole& console, const arguments_t& ar #ifndef DISABLE_TTF else if (argv[0] == "enable_hinting") { - console.WriteFormatLine("enable_hinting %d", Config::Get().fonts.EnableHinting); + console.WriteFormatLine("enable_hinting %d", Config::Get().fonts.enableHinting); } #endif else @@ -923,7 +923,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar } else if (varName == "console_small_font" && InvalidArguments(&invalidArgs, int_valid[0])) { - Config::Get().interface.ConsoleSmallFont = (int_val[0] != 0); + Config::Get().interface.consoleSmallFont = (int_val[0] != 0); Config::Save(); console.Execute("get console_small_font"); } @@ -941,7 +941,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar else if (varName == "window_scale" && InvalidArguments(&invalidArgs, double_valid[0])) { float newScale = static_cast(0.001 * std::trunc(1000 * double_val[0])); - Config::Get().general.WindowScale = std::clamp(newScale, 0.5f, 5.0f); + Config::Get().general.windowScale = std::clamp(newScale, 0.5f, 5.0f); Config::Save(); GfxInvalidateScreen(); ContextTriggerResize(); @@ -955,13 +955,13 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar } else if (varName == "render_weather_effects" && InvalidArguments(&invalidArgs, int_valid[0])) { - Config::Get().general.RenderWeatherEffects = (int_val[0] != 0); + Config::Get().general.renderWeatherEffects = (int_val[0] != 0); Config::Save(); console.Execute("get render_weather_effects"); } else if (varName == "render_weather_gloom" && InvalidArguments(&invalidArgs, int_valid[0])) { - Config::Get().general.RenderWeatherGloom = (int_val[0] != 0); + Config::Get().general.renderWeatherGloom = (int_val[0] != 0); Config::Save(); console.Execute("get render_weather_gloom"); } @@ -1026,7 +1026,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar #ifndef DISABLE_TTF else if (varName == "enable_hinting" && InvalidArguments(&invalidArgs, int_valid[0])) { - Config::Get().fonts.EnableHinting = (int_val[0] != 0); + Config::Get().fonts.enableHinting = (int_val[0] != 0); Config::Save(); console.Execute("get enable_hinting"); TTFToggleHinting(); diff --git a/src/openrct2/interface/Screenshot.cpp b/src/openrct2/interface/Screenshot.cpp index 9b2dc527fd..56be9db427 100644 --- a/src/openrct2/interface/Screenshot.cpp +++ b/src/openrct2/interface/Screenshot.cpp @@ -350,7 +350,7 @@ void ScreenshotGiant() { viewport.flags = vp->flags; } - if (Config::Get().general.TransparentScreenshot) + if (Config::Get().general.transparentScreenshot) { viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND; } @@ -418,7 +418,7 @@ static void ApplyOptions(const ScreenshotOptions* options, Viewport& viewport) CheatsSet(CheatType::removeLitter); } - if (options->transparent || Config::Get().general.TransparentScreenshot) + if (options->transparent || Config::Get().general.transparentScreenshot) { viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND; } diff --git a/src/openrct2/interface/Viewport.cpp b/src/openrct2/interface/Viewport.cpp index 1b90652fd4..4d3c842127 100644 --- a/src/openrct2/interface/Viewport.cpp +++ b/src/openrct2/interface/Viewport.cpp @@ -201,7 +201,7 @@ namespace OpenRCT2 viewport->flags = 0; viewport->rotation = GetCurrentRotation(); - if (Config::Get().general.AlwaysShowGridlines) + if (Config::Get().general.alwaysShowGridlines) viewport->flags |= VIEWPORT_FLAG_GRIDLINES; w.viewport = viewport; viewport->isVisible = w.isVisible; @@ -889,7 +889,7 @@ namespace OpenRCT2 PaintDrawStructs(session); - if (Config::Get().general.RenderWeatherGloom && !gTrackDesignSaveMode + if (Config::Get().general.renderWeatherGloom && !gTrackDesignSaveMode && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_ENTITIES) && !(session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) { ViewportPaintWeatherGloom(session.DPI); @@ -934,7 +934,7 @@ namespace OpenRCT2 _paintColumns.clear(); - bool useMultithreading = Config::Get().general.MultiThreading; + bool useMultithreading = Config::Get().general.multiThreading; if (useMultithreading && _paintJobs == nullptr) { _paintJobs = std::make_unique(); @@ -1172,7 +1172,7 @@ namespace OpenRCT2 WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - if (!Config::Get().general.AlwaysShowGridlines) + if (!Config::Get().general.alwaysShowGridlines) { mainWindow->viewport->flags &= ~VIEWPORT_FLAG_GRIDLINES; mainWindow->invalidate(); @@ -1989,11 +1989,11 @@ namespace OpenRCT2 int32_t GetHeightMarkerOffset() { // Height labels in units - if (Config::Get().general.ShowHeightAsUnits) + if (Config::Get().general.showHeightAsUnits) return 0; // Height labels in feet - if (Config::Get().general.MeasurementFormat == MeasurementFormat::Imperial) + if (Config::Get().general.measurementFormat == MeasurementFormat::Imperial) return 1 * 256; // Height labels in metres diff --git a/src/openrct2/interface/Window.cpp b/src/openrct2/interface/Window.cpp index 0d42f7ea76..8773b3dc30 100644 --- a/src/openrct2/interface/Window.cpp +++ b/src/openrct2/interface/Window.cpp @@ -209,9 +209,9 @@ static constexpr float kWindowScrollLocations[][2] = { */ void WindowSetWindowLimit(int32_t value) { - int32_t prev = Config::Get().general.WindowLimit; + int32_t prev = Config::Get().general.windowLimit; int32_t val = std::clamp(value, kWindowLimitMin, kWindowLimitMax); - Config::Get().general.WindowLimit = val; + Config::Get().general.windowLimit = val; Config::Save(); // Checks if value decreases and then closes surplus // windows if one sets a limit lower than the number of windows open @@ -455,7 +455,7 @@ static constexpr float kWindowScrollLocations[][2] = { w.savedViewPos.y -= v->ViewHeight() / 4; } - if (Config::Get().general.ZoomToCursor && atCursor) + if (Config::Get().general.zoomToCursor && atCursor) { const auto mouseCoords = ContextGetCursorPositionScaled() - v->pos; const int32_t diffX = (mouseCoords.x - (zoomLevel.ApplyInversedTo(v->ViewWidth()) / 2)); diff --git a/src/openrct2/interface/WindowBase.cpp b/src/openrct2/interface/WindowBase.cpp index 7c3e08c20f..c2642acede 100644 --- a/src/openrct2/interface/WindowBase.cpp +++ b/src/openrct2/interface/WindowBase.cpp @@ -51,8 +51,8 @@ namespace OpenRCT2 static inline void repositionCloseButton(Widget& closeButton, int32_t windowWidth, bool translucent) { - auto closeButtonSize = Config::Get().interface.EnlargedUi ? kCloseButtonSizeTouch : kCloseButtonSize; - if (Config::Get().interface.WindowButtonsOnTheLeft) + auto closeButtonSize = Config::Get().interface.enlargedUi ? kCloseButtonSizeTouch : kCloseButtonSize; + if (Config::Get().interface.windowButtonsOnTheLeft) { closeButton.left = 2; closeButton.right = 2 + closeButtonSize; @@ -146,7 +146,7 @@ namespace OpenRCT2 int16_t WindowBase::getTitleBarTargetHeight() const { - return Config::Get().interface.EnlargedUi ? kTitleHeightLarge : kTitleHeightNormal; + return Config::Get().interface.enlargedUi ? kTitleHeightLarge : kTitleHeightNormal; } int16_t WindowBase::getTitleBarCurrentHeight() const diff --git a/src/openrct2/localisation/Currency.cpp b/src/openrct2/localisation/Currency.cpp index 5cd858c14f..9d4b17c373 100644 --- a/src/openrct2/localisation/Currency.cpp +++ b/src/openrct2/localisation/Currency.cpp @@ -45,20 +45,20 @@ namespace OpenRCT2 void CurrencyLoadCustomCurrencyConfig() { - CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = Config::Get().general.CustomCurrencyRate; - CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = Config::Get().general.CustomCurrencyAffix; - if (!Config::Get().general.CustomCurrencySymbol.empty()) + CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = Config::Get().general.customCurrencyRate; + CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = Config::Get().general.customCurrencyAffix; + if (!Config::Get().general.customCurrencySymbol.empty()) { String::safeUtf8Copy( CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, - Config::Get().general.CustomCurrencySymbol.c_str(), kCurrencySymbolMaxSize); + Config::Get().general.customCurrencySymbol.c_str(), kCurrencySymbolMaxSize); } } money64 StringToMoney(const char* string_to_monetise) { const char* decimal_char = LanguageGetString(STR_LOCALE_DECIMAL_POINT); - const CurrencyDescriptor* currencyDesc = &CurrencyDescriptors[EnumValue(Config::Get().general.CurrencyFormat)]; + const CurrencyDescriptor* currencyDesc = &CurrencyDescriptors[EnumValue(Config::Get().general.currencyFormat)]; char processedString[128] = {}; Guard::Assert(strlen(string_to_monetise) < sizeof(processedString)); @@ -148,7 +148,7 @@ namespace OpenRCT2 return; } - const CurrencyDescriptor& currencyDesc = CurrencyDescriptors[EnumValue(Config::Get().general.CurrencyFormat)]; + const CurrencyDescriptor& currencyDesc = CurrencyDescriptors[EnumValue(Config::Get().general.currencyFormat)]; const char* sign = amount >= 0 ? "" : "-"; const uint64_t a = std::abs(amount) * currencyDesc.rate; diff --git a/src/openrct2/localisation/Formatting.cpp b/src/openrct2/localisation/Formatting.cpp index b90afb8c09..31e2d756f7 100644 --- a/src/openrct2/localisation/Formatting.cpp +++ b/src/openrct2/localisation/Formatting.cpp @@ -400,7 +400,7 @@ namespace OpenRCT2 template void FormatCurrency(FormatBuffer& ss, T rawValue) { - auto currencyDesc = &CurrencyDescriptors[EnumValue(Config::Get().general.CurrencyFormat)]; + auto currencyDesc = &CurrencyDescriptors[EnumValue(Config::Get().general.currencyFormat)]; auto value = static_cast(rawValue) * currencyDesc->rate; // Negative sign @@ -553,7 +553,7 @@ namespace OpenRCT2 case FormatToken::Velocity: if constexpr (std::is_integral()) { - switch (Config::Get().general.MeasurementFormat) + switch (Config::Get().general.measurementFormat) { default: case MeasurementFormat::Imperial: @@ -583,7 +583,7 @@ namespace OpenRCT2 case FormatToken::Length: if constexpr (std::is_integral()) { - switch (Config::Get().general.MeasurementFormat) + switch (Config::Get().general.measurementFormat) { default: case MeasurementFormat::Imperial: @@ -600,7 +600,7 @@ namespace OpenRCT2 if constexpr (std::is_integral()) { auto metres = HeightUnitsToMetres(arg); - switch (Config::Get().general.MeasurementFormat) + switch (Config::Get().general.measurementFormat) { default: case MeasurementFormat::Imperial: diff --git a/src/openrct2/management/Award.cpp b/src/openrct2/management/Award.cpp index ed047de19c..4ea352f94a 100644 --- a/src/openrct2/management/Award.cpp +++ b/src/openrct2/management/Award.cpp @@ -607,7 +607,7 @@ void AwardReset() static void AwardAdd(AwardType type) { getGameState().park.currentAwards.push_back(Award{ 5u, type }); - if (Config::Get().notifications.ParkAward) + if (Config::Get().notifications.parkAward) { News::AddItemToQueue(News::ItemType::award, AwardGetNews(type), 0, {}); } diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index 28277d5420..7e2576ac1e 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -83,7 +83,7 @@ uint16_t MarketingGetCampaignGuestGenerationProbability(int32_t campaignType) static void MarketingRaiseFinishedNotification(const MarketingCampaign& campaign) { - if (Config::Get().notifications.ParkMarketingCampaignFinished) + if (Config::Get().notifications.parkMarketingCampaignFinished) { Formatter ft; // This sets the string parameters for the marketing types that have an argument. diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index e09a1fd68c..3a05154a5d 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -270,7 +270,7 @@ void ResearchFinishItem(const ResearchItem& researchItem) if (!gSilentResearch) { - if (Config::Get().notifications.RideResearched) + if (Config::Get().notifications.rideResearched) { News::AddItemToQueue(News::ItemType::research, availabilityString, researchItem.rawValue, ft); } @@ -292,7 +292,7 @@ void ResearchFinishItem(const ResearchItem& researchItem) if (!gSilentResearch) { - if (Config::Get().notifications.RideResearched) + if (Config::Get().notifications.rideResearched) { News::AddItemToQueue( News::ItemType::research, STR_NEWS_ITEM_RESEARCH_NEW_SCENERY_SET_AVAILABLE, researchItem.rawValue, ft); diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 27b45a8232..ac26bf9315 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -283,7 +283,7 @@ namespace OpenRCT2::Network // risk of tick collision with the server map and title screen map. GameActions::SuspendQueue(); - auto keyPath = GetPrivateKeyPath(Config::Get().network.PlayerName); + auto keyPath = GetPrivateKeyPath(Config::Get().network.playerName); if (!File::Exists(keyPath)) { Console::WriteLine("Generating key... This may take a while"); @@ -311,7 +311,7 @@ namespace OpenRCT2::Network const std::string hash = _key.PublicKeyHash(); const utf8* publicKeyHash = hash.c_str(); - keyPath = GetPublicKeyPath(Config::Get().network.PlayerName, publicKeyHash); + keyPath = GetPublicKeyPath(Config::Get().network.playerName, publicKeyHash); Console::WriteLine("Key generated, saving public bits as %s", keyPath.c_str()); try @@ -373,12 +373,12 @@ namespace OpenRCT2::Network return false; } - ServerName = Config::Get().network.ServerName; - ServerDescription = Config::Get().network.ServerDescription; - ServerGreeting = Config::Get().network.ServerGreeting; - ServerProviderName = Config::Get().network.ProviderName; - ServerProviderEmail = Config::Get().network.ProviderEmail; - ServerProviderWebsite = Config::Get().network.ProviderWebsite; + ServerName = Config::Get().network.serverName; + ServerDescription = Config::Get().network.serverDescription; + ServerGreeting = Config::Get().network.serverGreeting; + ServerProviderName = Config::Get().network.providerName; + ServerProviderEmail = Config::Get().network.providerEmail; + ServerProviderWebsite = Config::Get().network.providerWebsite; IsServerPlayerInvisible = gOpenRCT2Headless; @@ -386,7 +386,7 @@ namespace OpenRCT2::Network BeginChatLog(); BeginServerLog(); - Player* player = AddPlayer(Config::Get().network.PlayerName, ""); + Player* player = AddPlayer(Config::Get().network.playerName, ""); player->Flags |= PlayerFlags::kIsServer; player->Group = 0; player_id = player->Id; @@ -407,7 +407,7 @@ namespace OpenRCT2::Network status = Status::connected; listening_port = port; - _serverState.gamestateSnapshotsEnabled = Config::Get().network.DesyncDebugging; + _serverState.gamestateSnapshotsEnabled = Config::Get().network.desyncDebugging; _advertiser = CreateServerAdvertiser(listening_port); GameLoadScripts(); @@ -863,7 +863,7 @@ namespace OpenRCT2::Network intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_desync }); ContextOpenIntent(&intent); - if (!Config::Get().network.StayConnected) + if (!Config::Get().network.stayConnected) { Close(); } @@ -935,12 +935,12 @@ namespace OpenRCT2::Network std::string NetworkBase::GetMasterServerUrl() { - if (Config::Get().network.MasterServerUrl.empty()) + if (Config::Get().network.masterServerUrl.empty()) { return kMasterServerURL; } - return Config::Get().network.MasterServerUrl; + return Config::Get().network.masterServerUrl; } NetworkGroup* NetworkBase::AddGroup() @@ -1180,7 +1180,7 @@ namespace OpenRCT2::Network void NetworkBase::AppendChatLog(std::string_view s) { - if (Config::Get().network.LogChat && _chat_log_fs.is_open()) + if (Config::Get().network.logChat && _chat_log_fs.is_open()) { AppendLog(_chat_log_fs, s); } @@ -1218,7 +1218,7 @@ namespace OpenRCT2::Network void NetworkBase::AppendServerLog(const std::string& s) { - if (Config::Get().network.LogServerActions && _server_log_fs.is_open()) + if (Config::Get().network.logServerActions && _server_log_fs.is_open()) { AppendLog(_server_log_fs, s); } @@ -1670,13 +1670,13 @@ namespace OpenRCT2::Network json_t NetworkBase::GetServerInfoAsJson() const { json_t jsonObj = { - { "name", Config::Get().network.ServerName }, + { "name", Config::Get().network.serverName }, { "requiresPassword", _password.size() > 0 }, { "version", GetVersion() }, { "players", GetNumVisiblePlayers() }, - { "maxPlayers", Config::Get().network.Maxplayers }, - { "description", Config::Get().network.ServerDescription }, - { "greeting", Config::Get().network.ServerGreeting }, + { "maxPlayers", Config::Get().network.maxplayers }, + { "description", Config::Get().network.serverDescription }, + { "greeting", Config::Get().network.serverGreeting }, { "dedicated", gOpenRCT2Headless }, }; return jsonObj; @@ -1690,9 +1690,9 @@ namespace OpenRCT2::Network // Provider details json_t jsonProvider = { - { "name", Config::Get().network.ProviderName }, - { "email", Config::Get().network.ProviderEmail }, - { "website", Config::Get().network.ProviderWebsite }, + { "name", Config::Get().network.providerName }, + { "email", Config::Get().network.providerEmail }, + { "website", Config::Get().network.providerWebsite }, }; jsonObj["provider"] = jsonProvider; @@ -2212,7 +2212,7 @@ namespace OpenRCT2::Network void NetworkBase::Client_Handle_TOKEN(Connection& connection, Packet& packet) { - auto keyPath = GetPrivateKeyPath(Config::Get().network.PlayerName); + auto keyPath = GetPrivateKeyPath(Config::Get().network.playerName); if (!File::Exists(keyPath)) { LOG_ERROR("Key file (%s) was not found. Restart client to re-generate it.", keyPath.c_str()); @@ -2255,7 +2255,7 @@ namespace OpenRCT2::Network // when process dump gets collected at some point in future. _key.Unload(); - Client_Send_AUTH(Config::Get().network.PlayerName, gCustomPassword, pubkey, signature); + Client_Send_AUTH(Config::Get().network.playerName, gCustomPassword, pubkey, signature); } void NetworkBase::ServerHandleRequestGamestate(Connection& connection, Packet& packet) @@ -2688,7 +2688,7 @@ namespace OpenRCT2::Network if (verified) { LOG_VERBOSE("Connection %s: Signature verification ok. Hash %s", hostName, hash.c_str()); - if (Config::Get().network.KnownKeysOnly && _userManager.GetUserByHash(hash) == nullptr) + if (Config::Get().network.knownKeysOnly && _userManager.GetUserByHash(hash) == nullptr) { LOG_VERBOSE("Connection %s: Hash %s, not known", hostName, hash.c_str()); connection.AuthStatus = Auth::unknownKeyDisallowed; @@ -2744,7 +2744,7 @@ namespace OpenRCT2::Network } } - if (GetNumVisiblePlayers() >= Config::Get().network.Maxplayers) + if (GetNumVisiblePlayers() >= Config::Get().network.maxplayers) { connection.AuthStatus = Auth::full; LOG_INFO("Connection %s: Server is full.", hostName); @@ -3981,7 +3981,7 @@ namespace OpenRCT2::Network void SendPassword(const std::string& password) { auto& network = GetContext()->GetNetwork(); - const auto keyPath = GetPrivateKeyPath(Config::Get().network.PlayerName); + const auto keyPath = GetPrivateKeyPath(Config::Get().network.playerName); if (!File::Exists(keyPath)) { LOG_ERROR("Private key %s missing! Restart the game to generate it.", keyPath.c_str()); @@ -4004,7 +4004,7 @@ namespace OpenRCT2::Network // Don't keep private key in memory. There's no need and it may get leaked // when process dump gets collected at some point in future. network._key.Unload(); - network.Client_Send_AUTH(Config::Get().network.PlayerName, password, pubkey, signature); + network.Client_Send_AUTH(Config::Get().network.playerName, password, pubkey, signature); } void SetPassword(const char* password) diff --git a/src/openrct2/network/NetworkServerAdvertiser.cpp b/src/openrct2/network/NetworkServerAdvertiser.cpp index d8a3c04841..51c5828de1 100644 --- a/src/openrct2/network/NetworkServerAdvertiser.cpp +++ b/src/openrct2/network/NetworkServerAdvertiser.cpp @@ -93,7 +93,7 @@ namespace OpenRCT2::Network { UpdateLAN(); #ifndef DISABLE_HTTP - if (Config::Get().network.Advertise) + if (Config::Get().network.advertise) { UpdateWAN(); } @@ -183,9 +183,9 @@ namespace OpenRCT2::Network { "port", _port }, }; - if (!Config::Get().network.AdvertiseAddress.empty()) + if (!Config::Get().network.advertiseAddress.empty()) { - body["address"] = Config::Get().network.AdvertiseAddress; + body["address"] = Config::Get().network.advertiseAddress; } request.body = body.dump(); @@ -346,9 +346,9 @@ namespace OpenRCT2::Network static std::string GetMasterServerUrl() { std::string result = kMasterServerURL; - if (!Config::Get().network.MasterServerUrl.empty()) + if (!Config::Get().network.masterServerUrl.empty()) { - result = Config::Get().network.MasterServerUrl; + result = Config::Get().network.masterServerUrl; } return result; } diff --git a/src/openrct2/network/ServerList.cpp b/src/openrct2/network/ServerList.cpp index e857f3c60b..11ab4dfb73 100644 --- a/src/openrct2/network/ServerList.cpp +++ b/src/openrct2/network/ServerList.cpp @@ -364,9 +364,9 @@ namespace OpenRCT2::Network auto f = p->get_future(); std::string masterServerUrl = kMasterServerURL; - if (!Config::Get().network.MasterServerUrl.empty()) + if (!Config::Get().network.masterServerUrl.empty()) { - masterServerUrl = Config::Get().network.MasterServerUrl; + masterServerUrl = Config::Get().network.masterServerUrl; } Http::Request request; diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index b15910bc84..8c5fb8b63c 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -1090,7 +1090,7 @@ void PaintDrawMoneyStructs(RenderTarget& rt, PaintStringStruct* ps) // Use sprite font unless the currency contains characters unsupported by the sprite font auto forceSpriteFont = false; - const auto& currencyDesc = CurrencyDescriptors[EnumValue(Config::Get().general.CurrencyFormat)]; + const auto& currencyDesc = CurrencyDescriptors[EnumValue(Config::Get().general.currencyFormat)]; if (LocalisationService_UseTrueTypeFont() && FontSupportsStringSprite(currencyDesc.symbol_unicode)) { forceSpriteFont = true; diff --git a/src/openrct2/paint/Painter.cpp b/src/openrct2/paint/Painter.cpp index 2fd0c56646..6ab1efbc38 100644 --- a/src/openrct2/paint/Painter.cpp +++ b/src/openrct2/paint/Painter.cpp @@ -74,7 +74,7 @@ void Painter::Paint(IDrawingEngine& de) if (text != nullptr) PaintReplayNotice(*rt, text); - if (Config::Get().general.ShowFPS) + if (Config::Get().general.showFPS) { PaintFPS(*rt); } @@ -124,7 +124,7 @@ void Painter::PaintFPS(RenderTarget& rt) // Move counter below toolbar if buttons are centred const bool isTitle = gLegacyScene == LegacyScene::titleSequence; - if (!isTitle && Config::Get().interface.ToolbarButtonsCentred) + if (!isTitle && Config::Get().interface.toolbarButtonsCentred) { screenCoords.y = kTopToolbarHeight + 3; } diff --git a/src/openrct2/paint/VirtualFloor.cpp b/src/openrct2/paint/VirtualFloor.cpp index 21ea96bc55..3df3fa28ed 100644 --- a/src/openrct2/paint/VirtualFloor.cpp +++ b/src/openrct2/paint/VirtualFloor.cpp @@ -385,7 +385,7 @@ void VirtualFloorPaint(PaintSession& session) { { 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NW) ? -2 : 0) }, { 0, 0, 1 } }); } - if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Glassy) + if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Glassy) return; if (!weAreOccupied && !weAreLit && weAreAboveGround && weAreOwned) diff --git a/src/openrct2/paint/tile_element/Paint.Banner.cpp b/src/openrct2/paint/tile_element/Paint.Banner.cpp index ba0dbded72..5a54a0a035 100644 --- a/src/openrct2/paint/tile_element/Paint.Banner.cpp +++ b/src/openrct2/paint/tile_element/Paint.Banner.cpp @@ -58,7 +58,7 @@ static void PaintBannerScrollingText( banner.formatTextWithColourTo(ft); char text[256]; - if (Config::Get().general.UpperCaseBanners) + if (Config::Get().general.upperCaseBanners) { FormatStringToUpper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } diff --git a/src/openrct2/paint/tile_element/Paint.Entrance.cpp b/src/openrct2/paint/tile_element/Paint.Entrance.cpp index 8a6e991499..2ffd312361 100644 --- a/src/openrct2/paint/tile_element/Paint.Entrance.cpp +++ b/src/openrct2/paint/tile_element/Paint.Entrance.cpp @@ -67,7 +67,7 @@ static void PaintRideEntranceExitScrollingText( } char text[256]; - if (Config::Get().general.UpperCaseBanners) + if (Config::Get().general.upperCaseBanners) { FormatStringToUpper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } @@ -248,7 +248,7 @@ static void PaintParkEntranceScrollingText( } char text[256]; - if (Config::Get().general.UpperCaseBanners) + if (Config::Get().general.upperCaseBanners) { FormatStringToUpper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } diff --git a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp index 70273d48ca..a29cb8ab7d 100644 --- a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp @@ -317,7 +317,7 @@ static void PaintLargeSceneryScrollingText( banner->formatTextTo(ft); char text[256]; - if (Config::Get().general.UpperCaseBanners) + if (Config::Get().general.upperCaseBanners) { FormatStringToUpper(text, sizeof(text), STR_SCROLLING_SIGN_TEXT, ft.Data()); } diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index c17f4a47c5..e740ff2e70 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -166,7 +166,7 @@ static void PathPaintQueueBanner( } utf8 bannerBuffer[512]{}; - if (Config::Get().general.UpperCaseBanners) + if (Config::Get().general.upperCaseBanners) { FormatStringToUpper(bannerBuffer, sizeof(bannerBuffer), STR_BANNER_TEXT_FORMAT, ft.Data()); } diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index 76f46d1df6..448f8b2090 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -1199,7 +1199,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con } if (zoomLevel <= ZoomLevel{ 0 } && has_surface && !(session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) - && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_BASE) && Config::Get().general.LandscapeSmoothing) + && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_BASE) && Config::Get().general.landscapeSmoothing) { ViewportSurfaceSmoothenEdge(session, EDGE_TOPLEFT, selfDescriptor, tileDescriptors[2]); ViewportSurfaceSmoothenEdge(session, EDGE_TOPRIGHT, selfDescriptor, tileDescriptors[3]); @@ -1229,7 +1229,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con const uint16_t waterHeight = tileElement.GetWaterHeight(); const bool waterGetsClipped = (session.ViewFlags & VIEWPORT_FLAG_CLIP_VIEW) && (waterHeight > gClipHeight * kCoordsZStep); - const bool waterIsTransparent = Config::Get().general.TransparentWater + const bool waterIsTransparent = Config::Get().general.transparentWater || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE); if (waterHeight > 0 && !gTrackDesignSaveMode && !waterGetsClipped) diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.cpp b/src/openrct2/paint/tile_element/Paint.TileElement.cpp index cd88e9d559..f201a4b502 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.cpp +++ b/src/openrct2/paint/tile_element/Paint.TileElement.cpp @@ -139,7 +139,7 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor bool partOfVirtualFloor = false; - if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off) + if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Off) { partOfVirtualFloor = VirtualFloorTileIsFloor(session.MapPosition); } @@ -294,7 +294,7 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor session.MapPosition = mapPosition; } while (!(tile_element++)->IsLastForTile()); - if (Config::Get().general.VirtualFloorStyle != VirtualFloorStyles::Off && partOfVirtualFloor) + if (Config::Get().general.virtualFloorStyle != VirtualFloorStyles::Off && partOfVirtualFloor) { VirtualFloorPaint(session); } diff --git a/src/openrct2/paint/tile_element/Paint.Wall.cpp b/src/openrct2/paint/tile_element/Paint.Wall.cpp index c9a94f154f..a1fc5dd449 100644 --- a/src/openrct2/paint/tile_element/Paint.Wall.cpp +++ b/src/openrct2/paint/tile_element/Paint.Wall.cpp @@ -175,7 +175,7 @@ static void PaintWallScrollingText( auto ft = Formatter(); banner->formatTextTo(ft); char signString[256]; - if (Config::Get().general.UpperCaseBanners) + if (Config::Get().general.upperCaseBanners) { FormatStringToUpper(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data()); } diff --git a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp index 19b12ce1c6..154da4a2ab 100644 --- a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp @@ -6576,7 +6576,7 @@ static void WoodenRCTrackWaterSplash( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const bool transparent = Config::Get().general.TransparentWater || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE); + const bool transparent = Config::Get().general.transparentWater || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE); const auto waterMask = ImageId(SPR_WATER_MASK).WithRemap(FilterPaletteID::paletteWater).WithBlended(true); const auto waterOverlay = ImageId(transparent ? EnumValue(SPR_WATER_OVERLAY) : EnumValue(SPR_G2_OPAQUE_WATER_OVERLAY)); diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index acbdfb0aa8..1c7271604c 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -1646,7 +1646,7 @@ void RidePrepareBreakdown(Ride& ride, int32_t breakdownReason) */ void RideBreakdownAddNewsItem(const Ride& ride) { - if (Config::Get().notifications.RideBrokenDown) + if (Config::Get().notifications.rideBrokenDown) { Formatter ft; ride.formatNameTo(ft); @@ -1673,7 +1673,7 @@ static void RideBreakdownStatusUpdate(Ride& ride) if (!(ride.notFixedTimeout & 15) && ride.mechanicStatus != RIDE_MECHANIC_STATUS_FIXING && ride.mechanicStatus != RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) { - if (Config::Get().notifications.RideWarnings) + if (Config::Get().notifications.rideWarnings) { Formatter ft; ride.formatNameTo(ft); @@ -2360,7 +2360,7 @@ static void RideEntranceExitConnected(Ride& ride) // name of ride is parameter of the format string Formatter ft; ride.formatNameTo(ft); - if (Config::Get().notifications.RideWarnings) + if (Config::Get().notifications.rideWarnings) { News::AddItemToQueue(News::ItemType::ride, STR_ENTRANCE_NOT_CONNECTED, ride.id.ToUnderlying(), ft); } @@ -2372,7 +2372,7 @@ static void RideEntranceExitConnected(Ride& ride) // name of ride is parameter of the format string Formatter ft; ride.formatNameTo(ft); - if (Config::Get().notifications.RideWarnings) + if (Config::Get().notifications.rideWarnings) { News::AddItemToQueue(News::ItemType::ride, STR_EXIT_NOT_CONNECTED, ride.id.ToUnderlying(), ft); } @@ -2437,7 +2437,7 @@ static void RideShopConnected(const Ride& ride) } // Name of ride is parameter of the format string - if (Config::Get().notifications.RideWarnings) + if (Config::Get().notifications.rideWarnings) { Formatter ft; ride2->formatNameTo(ft); @@ -5310,7 +5310,7 @@ void Ride::setReversedTrains(bool reverseTrains) void Ride::setToDefaultInspectionInterval() { - uint8_t defaultInspectionInterval = Config::Get().general.DefaultInspectionInterval; + uint8_t defaultInspectionInterval = Config::Get().general.defaultInspectionInterval; if (inspectionInterval != defaultInspectionInterval) { if (defaultInspectionInterval <= RIDE_INSPECTION_NEVER) @@ -5342,7 +5342,7 @@ void Ride::crash(uint8_t vehicleIndex) } } - if (Config::Get().notifications.RideCrashed) + if (Config::Get().notifications.rideCrashed) { Formatter ft; formatNameTo(ft); diff --git a/src/openrct2/ride/RideAudio.cpp b/src/openrct2/ride/RideAudio.cpp index 2f9125dbf1..b43e53e528 100644 --- a/src/openrct2/ride/RideAudio.cpp +++ b/src/openrct2/ride/RideAudio.cpp @@ -258,7 +258,7 @@ namespace OpenRCT2::RideAudio return; // TODO Allow circus music (CSS24) to play if ride music is disabled (that should be sound) - if (gGameSoundsOff || !Config::Get().sound.RideMusicEnabled) + if (gGameSoundsOff || !Config::Get().sound.rideMusicEnabled) return; StopInactiveRideMusicChannels(); diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index b550945833..8e7c320d63 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -2803,7 +2803,7 @@ void Vehicle::CheckIfMissing() curRide->lifecycleFlags |= RIDE_LIFECYCLE_HAS_STALLED_VEHICLE; - if (Config::Get().notifications.RideStalledVehicles) + if (Config::Get().notifications.rideStalledVehicles) { Formatter ft; ft.Add(GetRideComponentName(GetRideTypeDescriptor(curRide->type).NameConvention.vehicle).number); @@ -4566,7 +4566,7 @@ static void ride_train_crash(Ride& ride, uint16_t numFatalities) if (numFatalities != 0) { - if (Config::Get().notifications.RideCasualties) + if (Config::Get().notifications.rideCasualties) { ride.formatNameTo(ft); News::AddItemToQueue( diff --git a/src/openrct2/scenario/Scenario.cpp b/src/openrct2/scenario/Scenario.cpp index e3f89cb3be..a57b29e898 100644 --- a/src/openrct2/scenario/Scenario.cpp +++ b/src/openrct2/scenario/Scenario.cpp @@ -235,7 +235,7 @@ static void ScenarioCheckEntranceFeeTooHigh() auto y = entrance.y + 16; uint32_t packed_xy = (y << 16) | x; - if (Config::Get().notifications.ParkWarnings) + if (Config::Get().notifications.parkWarnings) { News::AddItemToQueue(News::ItemType::blank, STR_ENTRANCE_FEE_TOO_HI, packed_xy, {}); } @@ -254,7 +254,7 @@ void ScenarioAutosaveCheck() bool shouldSave = false; using namespace std::chrono_literals; - switch (Config::Get().general.AutosaveFrequency) + switch (Config::Get().general.autosaveFrequency) { case AUTOSAVE_EVERY_MINUTE: shouldSave = timeSinceSave >= std::chrono::milliseconds(1min).count(); @@ -352,7 +352,7 @@ static void ScenarioUpdateDayNightCycle() float currentDayNightCycle = gDayNightCycle; gDayNightCycle = 0; - if (gLegacyScene == LegacyScene::playing && Config::Get().general.DayNightCycle) + if (gLegacyScene == LegacyScene::playing && Config::Get().general.dayNightCycle) { float monthFraction = GetDate().GetMonthTicks() / static_cast(kTicksPerMonth); if (monthFraction < (1 / 8.0f)) @@ -614,7 +614,7 @@ bool AllowEarlyCompletion() case Network::Mode::none: case Network::Mode::server: default: - return Config::Get().general.AllowEarlyCompletion; + return Config::Get().general.allowEarlyCompletion; } } diff --git a/src/openrct2/scenario/ScenarioObjective.cpp b/src/openrct2/scenario/ScenarioObjective.cpp index 9b8427e194..a624ed36ad 100644 --- a/src/openrct2/scenario/ScenarioObjective.cpp +++ b/src/openrct2/scenario/ScenarioObjective.cpp @@ -106,28 +106,28 @@ namespace OpenRCT2::Scenario gameState.scenarioParkRatingWarningDays++; if (gameState.scenarioParkRatingWarningDays == 1) { - if (Config::Get().notifications.ParkRatingWarnings) + if (Config::Get().notifications.parkRatingWarnings) { News::AddItemToQueue(News::ItemType::graph, STR_PARK_RATING_WARNING_4_WEEKS_REMAINING, 0, {}); } } else if (gameState.scenarioParkRatingWarningDays == 8) { - if (Config::Get().notifications.ParkRatingWarnings) + if (Config::Get().notifications.parkRatingWarnings) { News::AddItemToQueue(News::ItemType::graph, STR_PARK_RATING_WARNING_3_WEEKS_REMAINING, 0, {}); } } else if (gameState.scenarioParkRatingWarningDays == 15) { - if (Config::Get().notifications.ParkRatingWarnings) + if (Config::Get().notifications.parkRatingWarnings) { News::AddItemToQueue(News::ItemType::graph, STR_PARK_RATING_WARNING_2_WEEKS_REMAINING, 0, {}); } } else if (gameState.scenarioParkRatingWarningDays == 22) { - if (Config::Get().notifications.ParkRatingWarnings) + if (Config::Get().notifications.parkRatingWarnings) { News::AddItemToQueue(News::ItemType::graph, STR_PARK_RATING_WARNING_1_WEEK_REMAINING, 0, {}); } diff --git a/src/openrct2/scenes/title/TitleScene.cpp b/src/openrct2/scenes/title/TitleScene.cpp index faf1a4a4e6..9ab24763d2 100644 --- a/src/openrct2/scenes/title/TitleScene.cpp +++ b/src/openrct2/scenes/title/TitleScene.cpp @@ -180,7 +180,7 @@ void TitleScene::ChangePresetSequence(size_t preset) } const utf8* configId = TitleSequenceManager::GetConfigID(preset); - Config::Get().interface.CurrentTitleSequencePreset = configId; + Config::Get().interface.currentTitleSequencePreset = configId; if (!_previewingSequence) _currentSequence = preset; @@ -209,7 +209,7 @@ void TitleScene::TitleInitialise() { _sequencePlayer = GetContext().GetUiContext().GetTitleSequencePlayer(); } - if (Config::Get().interface.RandomTitleSequence) + if (Config::Get().interface.randomTitleSequence) { const size_t total = TitleSequenceManager::GetCount(); if (total > 0) @@ -305,7 +305,7 @@ bool TitleScene::TryLoadSequence(bool loadPreview) { // Forcefully change the preset to a preset that works. const utf8* configId = TitleSequenceManager::GetConfigID(targetSequence); - Config::Get().interface.CurrentTitleSequencePreset = configId; + Config::Get().interface.currentTitleSequencePreset = configId; } _currentSequence = targetSequence; GfxInvalidateScreen(); @@ -361,7 +361,7 @@ void TitleSequenceChangePreset(size_t preset) size_t TitleGetConfigSequence() { - return TitleSequenceManager::GetIndexForConfigID(Config::Get().interface.CurrentTitleSequencePreset.c_str()); + return TitleSequenceManager::GetIndexForConfigID(Config::Get().interface.currentTitleSequencePreset.c_str()); } size_t TitleGetCurrentSequence() diff --git a/src/openrct2/scripting/ScriptEngine.cpp b/src/openrct2/scripting/ScriptEngine.cpp index 1db154a36c..80a013c9d3 100644 --- a/src/openrct2/scripting/ScriptEngine.cpp +++ b/src/openrct2/scripting/ScriptEngine.cpp @@ -588,7 +588,7 @@ void ScriptEngine::RefreshPlugins() } // Turn on hot reload if not already enabled - if (!_hotReloadingInitialised && Config::Get().plugin.EnableHotReloading && Network::GetMode() == Network::Mode::none) + if (!_hotReloadingInitialised && Config::Get().plugin.enableHotReloading && Network::GetMode() == Network::Mode::none) { SetupHotReloading(); } diff --git a/src/openrct2/scripting/bindings/game/ScConfiguration.hpp b/src/openrct2/scripting/bindings/game/ScConfiguration.hpp index 9997bb4aed..40b163333b 100644 --- a/src/openrct2/scripting/bindings/game/ScConfiguration.hpp +++ b/src/openrct2/scripting/bindings/game/ScConfiguration.hpp @@ -173,8 +173,8 @@ namespace OpenRCT2::Scripting DukObject obj(ctx); if (ns == "general") { - obj.Set("general.language", Config::Get().general.Language); - obj.Set("general.showFps", Config::Get().general.ShowFPS); + obj.Set("general.language", Config::Get().general.language); + obj.Set("general.showFps", Config::Get().general.showFPS); } result = obj.Take(); } @@ -205,7 +205,7 @@ namespace OpenRCT2::Scripting } if (key == "general.showFps") { - duk_push_boolean(ctx, Config::Get().general.ShowFPS); + duk_push_boolean(ctx, Config::Get().general.showFPS); return DukValue::take_from_stack(ctx); } } @@ -246,7 +246,7 @@ namespace OpenRCT2::Scripting { if (key == "general.showFps") { - Config::Get().general.ShowFPS = value.as_bool(); + Config::Get().general.showFPS = value.as_bool(); } else { diff --git a/src/openrct2/scripting/bindings/network/ScSocket.hpp b/src/openrct2/scripting/bindings/network/ScSocket.hpp index fb1f625de0..e28f5e41cb 100644 --- a/src/openrct2/scripting/bindings/network/ScSocket.hpp +++ b/src/openrct2/scripting/bindings/network/ScSocket.hpp @@ -89,16 +89,16 @@ namespace OpenRCT2::Scripting constexpr char delimiter = ','; size_t start_pos = 0; size_t end_pos = 0; - while ((end_pos = Config::Get().plugin.AllowedHosts.find(delimiter, start_pos)) != std::string::npos) + while ((end_pos = Config::Get().plugin.allowedHosts.find(delimiter, start_pos)) != std::string::npos) { - if (host == Config::Get().plugin.AllowedHosts.substr(start_pos, end_pos - start_pos)) + if (host == Config::Get().plugin.allowedHosts.substr(start_pos, end_pos - start_pos)) { return true; } start_pos = end_pos + 1; } return host - == Config::Get().plugin.AllowedHosts.substr(start_pos, Config::Get().plugin.AllowedHosts.length() - start_pos); + == Config::Get().plugin.allowedHosts.substr(start_pos, Config::Get().plugin.allowedHosts.length() - start_pos); } public: diff --git a/src/openrct2/world/Climate.cpp b/src/openrct2/world/Climate.cpp index 71b48dfbb7..11ed1c07cd 100644 --- a/src/openrct2/world/Climate.cpp +++ b/src/openrct2/world/Climate.cpp @@ -445,9 +445,9 @@ static void ClimateUpdateLightning() { if (_lightningTimer == 0) return; - if (Config::Get().general.DisableLightningEffect) + if (Config::Get().general.disableLightningEffect) return; - if (!Config::Get().general.RenderWeatherEffects && !Config::Get().general.RenderWeatherGloom) + if (!Config::Get().general.renderWeatherEffects && !Config::Get().general.renderWeatherGloom) return; _lightningTimer--; diff --git a/test/tests/FormattingTests.cpp b/test/tests/FormattingTests.cpp index f73cc5c591..db6397a117 100644 --- a/test/tests/FormattingTests.cpp +++ b/test/tests/FormattingTests.cpp @@ -140,7 +140,7 @@ TEST_F(FormattingTests, comma_large) TEST_F(FormattingTests, currency) { - Config::Get().general.CurrencyFormat = CurrencyType::Pounds; + Config::Get().general.currencyFormat = CurrencyType::Pounds; ASSERT_EQ(u8"-£251", FormatString("{CURRENCY}", -2510)); ASSERT_EQ(u8"£1", FormatString("{CURRENCY}", 4)); ASSERT_EQ(u8"£1", FormatString("{CURRENCY}", 5)); @@ -151,7 +151,7 @@ TEST_F(FormattingTests, currency) TEST_F(FormattingTests, currency2dp) { - Config::Get().general.CurrencyFormat = CurrencyType::Pounds; + Config::Get().general.currencyFormat = CurrencyType::Pounds; ASSERT_EQ(u8"-£251.00", FormatString("{CURRENCY2DP}", -2510)); ASSERT_EQ(u8"£0.40", FormatString("{CURRENCY2DP}", 4)); ASSERT_EQ(u8"£0.50", FormatString("{CURRENCY2DP}", 5)); @@ -162,7 +162,7 @@ TEST_F(FormattingTests, currency2dp) TEST_F(FormattingTests, currency_yen) { - Config::Get().general.CurrencyFormat = CurrencyType::Yen; + Config::Get().general.currencyFormat = CurrencyType::Yen; ASSERT_EQ(u8"-¥25,100", FormatString("{CURRENCY}", -2510)); ASSERT_EQ(u8"¥40", FormatString("{CURRENCY2DP}", 4)); ASSERT_EQ(u8"¥50", FormatString("{CURRENCY2DP}", 5)); @@ -173,7 +173,7 @@ TEST_F(FormattingTests, currency_yen) TEST_F(FormattingTests, currency2dp_yen) { - Config::Get().general.CurrencyFormat = CurrencyType::Yen; + Config::Get().general.currencyFormat = CurrencyType::Yen; ASSERT_EQ(u8"-¥25,100", FormatString("{CURRENCY2DP}", -2510)); ASSERT_EQ(u8"¥40", FormatString("{CURRENCY2DP}", 4)); ASSERT_EQ(u8"¥50", FormatString("{CURRENCY2DP}", 5)); @@ -184,14 +184,14 @@ TEST_F(FormattingTests, currency2dp_yen) TEST_F(FormattingTests, currency_pts) { - Config::Get().general.CurrencyFormat = CurrencyType::Peseta; + Config::Get().general.currencyFormat = CurrencyType::Peseta; ASSERT_EQ("-251Pts", FormatString("{CURRENCY}", -2510)); ASSERT_EQ("112Pts", FormatString("{CURRENCY}", 1111)); } TEST_F(FormattingTests, currency2dp_pts) { - Config::Get().general.CurrencyFormat = CurrencyType::Peseta; + Config::Get().general.currencyFormat = CurrencyType::Peseta; ASSERT_EQ("-251.00Pts", FormatString("{CURRENCY2DP}", -2510)); ASSERT_EQ("0.40Pts", FormatString("{CURRENCY2DP}", 4)); ASSERT_EQ("111.10Pts", FormatString("{CURRENCY2DP}", 1111)); @@ -211,42 +211,42 @@ TEST_F(FormattingTests, escaped_braces) TEST_F(FormattingTests, velocity_mph) { - Config::Get().general.MeasurementFormat = MeasurementFormat::Imperial; + Config::Get().general.measurementFormat = MeasurementFormat::Imperial; auto actual = FormatString("Train is going at {VELOCITY}.", 1024); ASSERT_EQ("Train is going at 1,024 mph.", actual); } TEST_F(FormattingTests, velocity_kph) { - Config::Get().general.MeasurementFormat = MeasurementFormat::Metric; + Config::Get().general.measurementFormat = MeasurementFormat::Metric; auto actual = FormatString("Train is going at {VELOCITY}.", 1024); ASSERT_EQ("Train is going at 1,648 km/h.", actual); } TEST_F(FormattingTests, velocity_mps) { - Config::Get().general.MeasurementFormat = MeasurementFormat::SI; + Config::Get().general.measurementFormat = MeasurementFormat::SI; auto actual = FormatString("Train is going at {VELOCITY}.", 1024); ASSERT_EQ("Train is going at 457.7 m/s.", actual); } TEST_F(FormattingTests, length_imperial) { - Config::Get().general.MeasurementFormat = MeasurementFormat::Imperial; + Config::Get().general.measurementFormat = MeasurementFormat::Imperial; auto actual = FormatString("Height: {LENGTH}", 1024); ASSERT_EQ("Height: 3,360 ft", actual); } TEST_F(FormattingTests, length_metric) { - Config::Get().general.MeasurementFormat = MeasurementFormat::Metric; + Config::Get().general.measurementFormat = MeasurementFormat::Metric; auto actual = FormatString("Height: {LENGTH}", 1024); ASSERT_EQ("Height: 1,024 m", actual); } TEST_F(FormattingTests, length_si) { - Config::Get().general.MeasurementFormat = MeasurementFormat::SI; + Config::Get().general.measurementFormat = MeasurementFormat::SI; auto actual = FormatString("Height: {LENGTH}", 2048); ASSERT_EQ("Height: 2,048 m", actual); }