Rename field of all config categories

This commit is contained in:
Gymnasiast committed 2025-10-07 20:21:32 +02:00
1 parent a6515487a3
commit daa4fe8ac3
104 files changed
+1175 -1175

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ CursorRepository::~CursorRepository()
void CursorRepository::LoadCursors()
{
SetCursorScale(static_cast<uint8_t>(round(Config::Get().general.WindowScale)));
SetCursorScale(static_cast<uint8_t>(round(Config::Get().general.windowScale)));
SetCurrentCursor(CursorID::Arrow);
}
+30 -30
View File
@@ -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<int32_t>(e.motion.x / Config::Get().general.WindowScale),
static_cast<int32_t>(e.motion.y / Config::Get().general.WindowScale) };
_cursorState.position = { static_cast<int32_t>(e.motion.x / Config::Get().general.windowScale),
static_cast<int32_t>(e.motion.y / Config::Get().general.windowScale) };
break;
case SDL_MOUSEWHEEL:
if (_inGameConsole.IsOpen())
@@ -413,8 +413,8 @@ public:
{
break;
}
ScreenCoordsXY mousePos = { static_cast<int32_t>(e.button.x / Config::Get().general.WindowScale),
static_cast<int32_t>(e.button.y / Config::Get().general.WindowScale) };
ScreenCoordsXY mousePos = { static_cast<int32_t>(e.button.x / Config::Get().general.windowScale),
static_cast<int32_t>(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<int32_t>(e.button.x / Config::Get().general.WindowScale),
static_cast<int32_t>(e.button.y / Config::Get().general.WindowScale) };
ScreenCoordsXY mousePos = { static_cast<int32_t>(e.button.x / Config::Get().general.windowScale),
static_cast<int32_t>(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<int32_t>(SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay)),
static_cast<int32_t>(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<FullscreenMode>(Config::Get().general.FullscreenMode));
SetFullscreenMode(static_cast<FullscreenMode>(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<int32_t>(width / Config::Get().general.WindowScale);
_height = static_cast<int32_t>(height / Config::Get().general.WindowScale);
_width = static_cast<int32_t>(width / Config::Get().general.windowScale);
_height = static_cast<int32_t>(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;
+2 -2
View File
@@ -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<size_t>(Config::Get().general.WindowLimit + kWindowLimitReserved))
if (gWindowList.size() >= static_cast<size_t>(Config::Get().general.windowLimit + kWindowLimitReserved))
{
// Close least recently used window
for (auto& w : gWindowList)
+7 -7
View File
@@ -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<float>(_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<float>(_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<float>(Config::Get().sound.MasterVolume) / 100.0f)
volumeAdjust *= Config::Get().sound.masterSoundEnabled ? (static_cast<float>(Config::Get().sound.masterVolume) / 100.0f)
: 0.0f;
switch (channel->GetGroup())
@@ -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<float>(windowX);
float scaleY = Config::Get().general.WindowScale * renderY / static_cast<float>(windowY);
float scaleX = Config::Get().general.windowScale * renderX / static_cast<float>(windowX);
float scaleY = Config::Get().general.windowScale * renderY / static_cast<float>(windowY);
SDL_SetRenderDrawBlendMode(_sdlRenderer, SDL_BLENDMODE_BLEND);
for (uint32_t y = 0; y < _invalidationGrid.getRowCount(); y++)
@@ -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<OpenGLFramebuffer>(_width * scale, _height * scale, false, false);
}
}
+2 -2
View File
@@ -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();
+7 -7
View File
@@ -233,8 +233,8 @@ namespace OpenRCT2
windowMgr->InvalidateByNumber(w->classification, w->number);
ScreenCoordsXY fixedCursorPosition = {
static_cast<int32_t>(std::ceil(gInputDragLast.x * Config::Get().general.WindowScale)),
static_cast<int32_t>(std::ceil(gInputDragLast.y * Config::Get().general.WindowScale))
static_cast<int32_t>(std::ceil(gInputDragLast.x * Config::Get().general.windowScale)),
static_cast<int32_t>(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;
+6 -6
View File
@@ -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);
}
+18 -18
View File
@@ -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());
+1 -1
View File
@@ -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()
+7 -7
View File
@@ -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<UITheme*>(&PredefinedThemeRCT2));
ThemeManager::ActiveAvailableThemeIndex = 1;
Config::Get().interface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1);
Config::Get().interface.currentThemePreset = ThemeManagerGetAvailableThemeConfigName(1);
}
void ThemeManagerInitialise()
+2 -2
View File
@@ -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(
+3 -3
View File
@@ -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.
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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();
}
+5 -5
View File
@@ -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();
}
+4 -4
View File
@@ -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
@@ -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;
@@ -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<StringId>(DateDayNames[day]);
ft.Add<int16_t>(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;
+2 -2
View File
@@ -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<GuestWindow>(WindowClass::peep, windowSize, WindowFlag::resizable);
+38 -38
View File
@@ -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<StringId>(DateFormatStringFormatIds[Config::Get().general.DateFormat]);
ft.Add<StringId>(DateFormatStringFormatIds[Config::Get().general.dateFormat]);
ft.Add<StringId>(DateDayNames[_preview.day]);
ft.Add<int16_t>(_preview.month);
ft.Add<int16_t>(_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<StringId>(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<StringId>(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<LoadSaveWindow>(
WindowClass::loadsave, windowSize,
+6 -6
View File
@@ -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;
}
};
+1 -1
View File
@@ -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);
+7 -7
View File
@@ -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;
}
}
+6 -6
View File
@@ -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<RideObject>(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<StringId>(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();
+18 -18
View File
@@ -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
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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.
+4 -4
View File
@@ -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;
+7 -7
View File
@@ -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);
}
+2 -2
View File
@@ -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<utf8*>(_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<utf8*>(_playerName.c_str());
invalidateWidget(WIDX_PLAYER_NAME_INPUT);
+17 -17
View File
@@ -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<uint16_t>(Config::Get().network.Maxplayers);
ft.Add<uint16_t>(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);
}
}
};
+2 -2
View File
@@ -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();
}
};
+1 -1
View File
@@ -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;
}
+2 -2
View File
@@ -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;
}
+14 -14
View File
@@ -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();
+2 -2
View File
@@ -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();
+6 -6
View File
@@ -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();
}
};
+2 -2
View File
@@ -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:
+4 -4
View File
@@ -164,7 +164,7 @@ namespace OpenRCT2
{
// Re-order asset packs
std::vector<std::unique_ptr<AssetPack>> 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<size_t>::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
+19 -19
View File
@@ -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<uint8_t>(std::round(Config::Get().general.WindowScale)));
GetContext()->GetUiContext().SetCursorScale(static_cast<uint8_t>(std::round(Config::Get().general.windowScale)));
}
void ContextHideCursor()
@@ -1630,8 +1630,8 @@ namespace OpenRCT2
{
auto cursorCoords = ContextGetCursorPosition();
// Compensate for window scaling.
return { static_cast<int32_t>(std::ceil(cursorCoords.x / Config::Get().general.WindowScale)),
static_cast<int32_t>(std::ceil(cursorCoords.y / Config::Get().general.WindowScale)) };
return { static_cast<int32_t>(std::ceil(cursorCoords.x / Config::Get().general.windowScale)),
static_cast<int32_t>(std::ceil(cursorCoords.y / Config::Get().general.windowScale)) };
}
void ContextSetCursorPosition(const ScreenCoordsXY& cursorPosition)
+3 -3
View File
@@ -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();
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -285,11 +285,11 @@ std::unique_ptr<IPlatformEnvironment> 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
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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::seconds>(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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -236,7 +236,7 @@ namespace OpenRCT2::GameActions
auto numCircuits = std::max<uint8_t>(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);
+7 -7
View File
@@ -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<AudioObject*>(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();
}
+2 -2
View File
@@ -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;
}
+331 -331
View File
@@ -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<CurrencyType>(
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<CurrencyType>(
"currency_format", Platform::GetLocaleCurrency(), Enum_Currency);
model->CustomCurrencyRate = reader->GetInt32("custom_currency_rate", 10);
model->CustomCurrencyAffix = reader->GetEnum<CurrencyAffix>(
model->customCurrencyRate = reader->GetInt32("custom_currency_rate", 10);
model->customCurrencyAffix = reader->GetEnum<CurrencyAffix>(
"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<int32_t>("language", Platform::GetLocaleLanguage(), Enum_LanguageEnum);
model->MeasurementFormat = reader->GetEnum<MeasurementFormat>(
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<int32_t>("language", Platform::GetLocaleLanguage(), Enum_LanguageEnum);
model->measurementFormat = reader->GetEnum<MeasurementFormat>(
"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<TemperatureUnit>(
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<TemperatureUnit>(
"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<DrawingEngine>(
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<DrawingEngine>(
"drawing_engine", DrawingEngine::SoftwareWithHardwareDisplay, Enum_DrawingEngine);
model->UncapFPS = reader->GetBoolean("uncap_fps", false);
model->UseVSync = reader->GetBoolean("use_vsync", true);
model->VirtualFloorStyle = reader->GetEnum<VirtualFloorStyles>(
model->uncapFPS = reader->GetBoolean("uncap_fps", false);
model->useVSync = reader->GetBoolean("use_vsync", true);
model->virtualFloorStyle = reader->GetEnum<VirtualFloorStyles>(
"virtual_floor_style", VirtualFloorStyles::Glassy, Enum_VirtualFloorStyle);
model->DateFormat = reader->GetEnum<int32_t>("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<FileBrowserSort>(
model->dateFormat = reader->GetEnum<int32_t>("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<FileBrowserSort>(
"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<ParkPreviewPref>(
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<ParkPreviewPref>(
"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<CurrencyType>("currency_format", model->CurrencyFormat, Enum_Currency);
writer->WriteInt32("custom_currency_rate", model->CustomCurrencyRate);
writer->WriteEnum<CurrencyAffix>("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<int32_t>("language", model->Language, Enum_LanguageEnum);
writer->WriteEnum<MeasurementFormat>("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<TemperatureUnit>("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<DrawingEngine>("drawing_engine", model->DrawingEngine, Enum_DrawingEngine);
writer->WriteBoolean("uncap_fps", model->UncapFPS);
writer->WriteBoolean("use_vsync", model->UseVSync);
writer->WriteEnum<int32_t>("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<FileBrowserSort>("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<CurrencyType>("currency_format", model->currencyFormat, Enum_Currency);
writer->WriteInt32("custom_currency_rate", model->customCurrencyRate);
writer->WriteEnum<CurrencyAffix>("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<int32_t>("language", model->language, Enum_LanguageEnum);
writer->WriteEnum<MeasurementFormat>("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<TemperatureUnit>("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<DrawingEngine>("drawing_engine", model->drawingEngine, Enum_DrawingEngine);
writer->WriteBoolean("uncap_fps", model->uncapFPS);
writer->WriteBoolean("use_vsync", model->useVSync);
writer->WriteEnum<int32_t>("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<FileBrowserSort>("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<VirtualFloorStyles>("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<ParkPreviewPref>("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<VirtualFloorStyles>("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<ParkPreviewPref>("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<TitleMusicKind>(
model->device = reader->GetString("audio_device", "");
model->masterSoundEnabled = reader->GetBoolean("master_sound", true);
model->masterVolume = reader->GetInt32("master_volume", 100);
model->titleMusic = static_cast<TitleMusicKind>(
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;
+163 -163
View File
@@ -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
+3 -3
View File
@@ -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);
+1 -1
View File
@@ -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);
}
+3 -3
View File
@@ -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();
}
+2 -2
View File
@@ -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();
+2 -2
View File
@@ -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()
+2 -2
View File
@@ -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++)
{
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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);
}
+4 -4
View File
@@ -1701,7 +1701,7 @@ static bool GuestDecideAndBuyItem(Guest& guest, Ride& ride, const ShopItem shopI
auto ft = Formatter();
guest.FormatNameTo(ft);
ft.Add<StringId>(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);
}
+1 -1
View File
@@ -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;
+17 -17
View File
@@ -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<uint32_t>(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<uint32_t>(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<uint32_t>(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<uint32_t>(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<uint32_t>(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<uint32_t>(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<uint32_t>(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<uint32_t>(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;
+10 -10
View File
@@ -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))
{
+11 -11
View File
@@ -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<float>(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();
+2 -2
View File
@@ -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;
}
+6 -6
View File
@@ -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<JobPool>();
@@ -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
+3 -3
View File
@@ -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<int32_t>(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));
+3 -3
View File
@@ -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
+6 -6
View File
@@ -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;
+4 -4
View File
@@ -400,7 +400,7 @@ namespace OpenRCT2
template<size_t TDecimalPlace, bool TDigitSep, typename T>
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<int64_t>(rawValue) * currencyDesc->rate;
// Negative sign
@@ -553,7 +553,7 @@ namespace OpenRCT2
case FormatToken::Velocity:
if constexpr (std::is_integral<T>())
{
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<T>())
{
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<T>())
{
auto metres = HeightUnitsToMetres(arg);
switch (Config::Get().general.MeasurementFormat)
switch (Config::Get().general.measurementFormat)
{
default:
case MeasurementFormat::Imperial:
+1 -1
View File
@@ -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, {});
}
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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);
+28 -28
View File
@@ -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)
@@ -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;
}
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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)
@@ -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());
}
@@ -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());
}
@@ -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());
}
@@ -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());
}
@@ -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)
@@ -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);
}
@@ -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());
}
@@ -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));
+7 -7
View File
@@ -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);
+1 -1
View File
@@ -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();
+2 -2
View File
@@ -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<StringId>(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(
+4 -4
View File
@@ -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<float>(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;
}
}
+4 -4
View File
@@ -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, {});
}
+4 -4
View File
@@ -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()
+1 -1
View File
@@ -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();
}
Loaded 100 of 104 files, more files were not shown because too many files have changed in this diff. Show more