mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #18359
This commit is contained in:
commit
f91df4138c
|
@ -27,7 +27,7 @@ CursorRepository::~CursorRepository()
|
|||
|
||||
void CursorRepository::LoadCursors()
|
||||
{
|
||||
SetCursorScale(static_cast<uint8_t>(round(gConfigGeneral.window_scale)));
|
||||
SetCursorScale(static_cast<uint8_t>(round(gConfigGeneral.WindowScale)));
|
||||
SetCurrentCursor(CursorID::Arrow);
|
||||
}
|
||||
|
||||
|
|
|
@ -186,12 +186,12 @@ public:
|
|||
|
||||
// Set window size
|
||||
UpdateFullscreenResolutions();
|
||||
Resolution resolution = GetClosestResolution(gConfigGeneral.fullscreen_width, gConfigGeneral.fullscreen_height);
|
||||
Resolution resolution = GetClosestResolution(gConfigGeneral.FullscreenWidth, gConfigGeneral.FullscreenHeight);
|
||||
SDL_SetWindowSize(_window, resolution.Width, resolution.Height);
|
||||
}
|
||||
else if (mode == FULLSCREEN_MODE::WINDOWED)
|
||||
{
|
||||
SDL_SetWindowSize(_window, gConfigGeneral.window_width, gConfigGeneral.window_height);
|
||||
SDL_SetWindowSize(_window, gConfigGeneral.WindowWidth, gConfigGeneral.WindowHeight);
|
||||
}
|
||||
|
||||
if (SDL_SetWindowFullscreen(_window, windowFlags))
|
||||
|
@ -351,10 +351,10 @@ public:
|
|||
{
|
||||
// Update default display index
|
||||
int32_t displayIndex = SDL_GetWindowDisplayIndex(_window);
|
||||
if (displayIndex != gConfigGeneral.default_display)
|
||||
if (displayIndex != gConfigGeneral.DefaultDisplay)
|
||||
{
|
||||
gConfigGeneral.default_display = displayIndex;
|
||||
config_save_default();
|
||||
gConfigGeneral.DefaultDisplay = displayIndex;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -373,8 +373,8 @@ public:
|
|||
}
|
||||
break;
|
||||
case SDL_MOUSEMOTION:
|
||||
_cursorState.position = { static_cast<int32_t>(e.motion.x / gConfigGeneral.window_scale),
|
||||
static_cast<int32_t>(e.motion.y / gConfigGeneral.window_scale) };
|
||||
_cursorState.position = { static_cast<int32_t>(e.motion.x / gConfigGeneral.WindowScale),
|
||||
static_cast<int32_t>(e.motion.y / gConfigGeneral.WindowScale) };
|
||||
break;
|
||||
case SDL_MOUSEWHEEL:
|
||||
if (_inGameConsole.IsOpen())
|
||||
|
@ -390,8 +390,8 @@ public:
|
|||
{
|
||||
break;
|
||||
}
|
||||
ScreenCoordsXY mousePos = { static_cast<int32_t>(e.button.x / gConfigGeneral.window_scale),
|
||||
static_cast<int32_t>(e.button.y / gConfigGeneral.window_scale) };
|
||||
ScreenCoordsXY mousePos = { static_cast<int32_t>(e.button.x / gConfigGeneral.WindowScale),
|
||||
static_cast<int32_t>(e.button.y / gConfigGeneral.WindowScale) };
|
||||
switch (e.button.button)
|
||||
{
|
||||
case SDL_BUTTON_LEFT:
|
||||
|
@ -426,8 +426,8 @@ public:
|
|||
{
|
||||
break;
|
||||
}
|
||||
ScreenCoordsXY mousePos = { static_cast<int32_t>(e.button.x / gConfigGeneral.window_scale),
|
||||
static_cast<int32_t>(e.button.y / gConfigGeneral.window_scale) };
|
||||
ScreenCoordsXY mousePos = { static_cast<int32_t>(e.button.x / gConfigGeneral.WindowScale),
|
||||
static_cast<int32_t>(e.button.y / gConfigGeneral.WindowScale) };
|
||||
switch (e.button.button)
|
||||
{
|
||||
case SDL_BUTTON_LEFT:
|
||||
|
@ -581,7 +581,7 @@ public:
|
|||
{
|
||||
char scaleQualityBuffer[4];
|
||||
_scaleQuality = ScaleQuality::SmoothNearestNeighbour;
|
||||
if (gConfigGeneral.window_scale == std::floor(gConfigGeneral.window_scale))
|
||||
if (gConfigGeneral.WindowScale == std::floor(gConfigGeneral.WindowScale))
|
||||
{
|
||||
_scaleQuality = ScaleQuality::NearestNeighbour;
|
||||
}
|
||||
|
@ -601,10 +601,10 @@ public:
|
|||
|
||||
void CreateWindow() override
|
||||
{
|
||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, gConfigGeneral.minimize_fullscreen_focus_loss ? "1" : "0");
|
||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, gConfigGeneral.MinimizeFullscreenFocusLoss ? "1" : "0");
|
||||
|
||||
// Set window position to default display
|
||||
int32_t defaultDisplay = std::clamp(gConfigGeneral.default_display, 0, 0xFFFF);
|
||||
int32_t defaultDisplay = std::clamp(gConfigGeneral.DefaultDisplay, 0, 0xFFFF);
|
||||
auto windowPos = ScreenCoordsXY{ static_cast<int32_t>(SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay)),
|
||||
static_cast<int32_t>(SDL_WINDOWPOS_UNDEFINED_DISPLAY(defaultDisplay)) };
|
||||
|
||||
|
@ -731,8 +731,8 @@ private:
|
|||
void CreateWindow(const ScreenCoordsXY& windowPos)
|
||||
{
|
||||
// Get saved window size
|
||||
int32_t width = gConfigGeneral.window_width;
|
||||
int32_t height = gConfigGeneral.window_height;
|
||||
int32_t width = gConfigGeneral.WindowWidth;
|
||||
int32_t height = gConfigGeneral.WindowHeight;
|
||||
if (width <= 0)
|
||||
width = 640;
|
||||
if (height <= 0)
|
||||
|
@ -740,7 +740,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 (gConfigGeneral.drawing_engine == DrawingEngine::OpenGL)
|
||||
if (gConfigGeneral.DrawingEngine == DrawingEngine::OpenGL)
|
||||
{
|
||||
flags |= SDL_WINDOW_OPENGL;
|
||||
}
|
||||
|
@ -754,7 +754,7 @@ private:
|
|||
ApplyScreenSaverLockSetting();
|
||||
|
||||
SDL_SetWindowMinimumSize(_window, 720, 480);
|
||||
SetCursorTrap(gConfigGeneral.trap_cursor);
|
||||
SetCursorTrap(gConfigGeneral.TrapCursor);
|
||||
_platformUiContext->SetWindowIcon(_window);
|
||||
|
||||
// Initialise the surface, palette and draw buffer
|
||||
|
@ -765,9 +765,9 @@ private:
|
|||
|
||||
// Fix #4022: Force Mac to windowed to avoid cursor offset on launch issue
|
||||
#ifdef __MACOSX__
|
||||
gConfigGeneral.fullscreen_mode = static_cast<int32_t>(OpenRCT2::Ui::FULLSCREEN_MODE::WINDOWED);
|
||||
gConfigGeneral.FullscreenMode = static_cast<int32_t>(OpenRCT2::Ui::FULLSCREEN_MODE::WINDOWED);
|
||||
#else
|
||||
SetFullscreenMode(static_cast<FULLSCREEN_MODE>(gConfigGeneral.fullscreen_mode));
|
||||
SetFullscreenMode(static_cast<FULLSCREEN_MODE>(gConfigGeneral.FullscreenMode));
|
||||
#endif
|
||||
TriggerResize();
|
||||
}
|
||||
|
@ -775,8 +775,8 @@ private:
|
|||
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 / gConfigGeneral.window_scale);
|
||||
_height = static_cast<int32_t>(height / gConfigGeneral.window_scale);
|
||||
_width = static_cast<int32_t>(width / gConfigGeneral.WindowScale);
|
||||
_height = static_cast<int32_t>(height / gConfigGeneral.WindowScale);
|
||||
|
||||
drawing_engine_resize();
|
||||
|
||||
|
@ -798,11 +798,11 @@ private:
|
|||
|
||||
if (!(flags & nonWindowFlags))
|
||||
{
|
||||
if (width != gConfigGeneral.window_width || height != gConfigGeneral.window_height)
|
||||
if (width != gConfigGeneral.WindowWidth || height != gConfigGeneral.WindowHeight)
|
||||
{
|
||||
gConfigGeneral.window_width = width;
|
||||
gConfigGeneral.window_height = height;
|
||||
config_save_default();
|
||||
gConfigGeneral.WindowWidth = width;
|
||||
gConfigGeneral.WindowHeight = height;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -847,10 +847,10 @@ private:
|
|||
resolutions.erase(last, resolutions.end());
|
||||
|
||||
// Update config fullscreen resolution if not set
|
||||
if (!resolutions.empty() && (gConfigGeneral.fullscreen_width == -1 || gConfigGeneral.fullscreen_height == -1))
|
||||
if (!resolutions.empty() && (gConfigGeneral.FullscreenWidth == -1 || gConfigGeneral.FullscreenHeight == -1))
|
||||
{
|
||||
gConfigGeneral.fullscreen_width = resolutions.back().Width;
|
||||
gConfigGeneral.fullscreen_height = resolutions.back().Height;
|
||||
gConfigGeneral.FullscreenWidth = resolutions.back().Width;
|
||||
gConfigGeneral.FullscreenHeight = resolutions.back().Height;
|
||||
}
|
||||
|
||||
_fsResolutions = resolutions;
|
||||
|
|
|
@ -159,7 +159,7 @@ public:
|
|||
case WV_FINANCES_RESEARCH:
|
||||
return WindowFinancesResearchOpen();
|
||||
case WV_RIDE_RESEARCH:
|
||||
if (gConfigInterface.toolbar_show_research)
|
||||
if (gConfigInterface.ToolbarShowResearch)
|
||||
{
|
||||
return this->OpenWindow(WindowClass::Research);
|
||||
}
|
||||
|
|
|
@ -146,8 +146,8 @@ void AudioMixer::GetNextAudioChunk(uint8_t* dst, size_t length)
|
|||
else
|
||||
{
|
||||
auto group = channel->GetGroup();
|
||||
if ((group != MixerGroup::Sound || gConfigSound.sound_enabled) && gConfigSound.master_sound_enabled
|
||||
&& gConfigSound.master_volume != 0)
|
||||
if ((group != MixerGroup::Sound || gConfigSound.SoundEnabled) && gConfigSound.MasterSoundEnabled
|
||||
&& gConfigSound.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 != gConfigSound.sound_volume)
|
||||
if (_settingSoundVolume != gConfigSound.SoundVolume)
|
||||
{
|
||||
_settingSoundVolume = gConfigSound.sound_volume;
|
||||
_settingSoundVolume = gConfigSound.SoundVolume;
|
||||
_adjustSoundVolume = powf(static_cast<float>(_settingSoundVolume) / 100.f, 10.f / 6.f);
|
||||
}
|
||||
if (_settingMusicVolume != gConfigSound.ride_music_volume)
|
||||
if (_settingMusicVolume != gConfigSound.AudioFocus)
|
||||
{
|
||||
_settingMusicVolume = gConfigSound.ride_music_volume;
|
||||
_settingMusicVolume = gConfigSound.AudioFocus;
|
||||
_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 *= gConfigSound.master_sound_enabled ? (static_cast<float>(gConfigSound.master_volume) / 100.0f) : 0.0f;
|
||||
volumeAdjust *= gConfigSound.MasterSoundEnabled ? (static_cast<float>(gConfigSound.MasterVolume) / 100.0f) : 0.0f;
|
||||
|
||||
switch (channel->GetGroup())
|
||||
{
|
||||
|
|
|
@ -138,7 +138,7 @@ public:
|
|||
_screenTexture = SDL_CreateTexture(_sdlRenderer, pixelFormat, SDL_TEXTUREACCESS_STREAMING, width, height);
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaleQualityBuffer);
|
||||
|
||||
uint32_t scale = std::ceil(gConfigGeneral.window_scale);
|
||||
uint32_t scale = std::ceil(gConfigGeneral.WindowScale);
|
||||
_scaledScreenTexture = SDL_CreateTexture(
|
||||
_sdlRenderer, pixelFormat, SDL_TEXTUREACCESS_TARGET, width * scale, height * scale);
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ public:
|
|||
_paletteHWMapped[i] = SDL_MapRGB(_screenTextureFormat, palette[i].Red, palette[i].Green, palette[i].Blue);
|
||||
}
|
||||
|
||||
if (gConfigGeneral.enable_light_fx)
|
||||
if (gConfigGeneral.EnableLightFx)
|
||||
{
|
||||
auto& lightPalette = lightfx_get_palette();
|
||||
for (int32_t i = 0; i < 256; i++)
|
||||
|
@ -204,7 +204,7 @@ protected:
|
|||
private:
|
||||
void Display()
|
||||
{
|
||||
if (gConfigGeneral.enable_light_fx)
|
||||
if (gConfigGeneral.EnableLightFx)
|
||||
{
|
||||
void* pixels;
|
||||
int32_t pitch;
|
||||
|
@ -238,14 +238,14 @@ private:
|
|||
}
|
||||
|
||||
bool isSteamOverlayActive = GetContext()->GetUiContext()->IsSteamOverlayActive();
|
||||
if (isSteamOverlayActive && gConfigGeneral.steam_overlay_pause)
|
||||
if (isSteamOverlayActive && gConfigGeneral.SteamOverlayPause)
|
||||
{
|
||||
OverlayPreRenderCheck();
|
||||
}
|
||||
|
||||
SDL_RenderPresent(_sdlRenderer);
|
||||
|
||||
if (isSteamOverlayActive && gConfigGeneral.steam_overlay_pause)
|
||||
if (isSteamOverlayActive && gConfigGeneral.SteamOverlayPause)
|
||||
{
|
||||
OverlayPostRenderCheck();
|
||||
}
|
||||
|
@ -337,8 +337,8 @@ private:
|
|||
|
||||
void RenderDirtyVisuals()
|
||||
{
|
||||
float scaleX = gConfigGeneral.window_scale;
|
||||
float scaleY = gConfigGeneral.window_scale;
|
||||
float scaleX = gConfigGeneral.WindowScale;
|
||||
float scaleY = gConfigGeneral.WindowScale;
|
||||
|
||||
SDL_SetRenderDrawBlendMode(_sdlRenderer, SDL_BLENDMODE_BLEND);
|
||||
for (uint32_t y = 0; y < _dirtyGrid.BlockRows; y++)
|
||||
|
|
|
@ -122,7 +122,7 @@ private:
|
|||
}
|
||||
|
||||
// Copy the surface to the window
|
||||
if (gConfigGeneral.window_scale == 1 || gConfigGeneral.window_scale <= 0)
|
||||
if (gConfigGeneral.WindowScale == 1 || gConfigGeneral.WindowScale <= 0)
|
||||
{
|
||||
SDL_Surface* windowSurface = SDL_GetWindowSurface(_window);
|
||||
if (SDL_BlitSurface(_surface, nullptr, windowSurface, nullptr))
|
||||
|
|
|
@ -451,7 +451,7 @@ private:
|
|||
}
|
||||
if (GetContext()->GetUiContext()->GetScaleQuality() == ScaleQuality::SmoothNearestNeighbour)
|
||||
{
|
||||
uint32_t scale = std::ceil(gConfigGeneral.window_scale);
|
||||
uint32_t scale = std::ceil(gConfigGeneral.WindowScale);
|
||||
_smoothScaleFramebuffer = std::make_unique<OpenGLFramebuffer>(_width * scale, _height * scale, false, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ void InputManager::HandleViewScrolling()
|
|||
InputScrollViewport(_viewScroll);
|
||||
|
||||
// Mouse edge scrolling
|
||||
if (gConfigGeneral.edge_scrolling)
|
||||
if (gConfigGeneral.EdgeScrolling)
|
||||
{
|
||||
if (input_get_state() != InputState::Normal)
|
||||
return;
|
||||
|
@ -155,7 +155,7 @@ void InputManager::HandleModifiers()
|
|||
}
|
||||
#endif
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off)
|
||||
{
|
||||
if (gInputPlaceObjectModifier & (PLACE_OBJECT_MODIFIER_COPY_Z | PLACE_OBJECT_MODIFIER_SHIFT_Z))
|
||||
VirtualFloorEnable();
|
||||
|
|
|
@ -219,8 +219,8 @@ static void InputScrollDragContinue(const ScreenCoordsXY& screenCoords, rct_wind
|
|||
WidgetScrollUpdateThumbs(*w, widgetIndex);
|
||||
window_invalidate_by_number(w->classification, w->number);
|
||||
|
||||
ScreenCoordsXY fixedCursorPosition = { static_cast<int32_t>(std::ceil(gInputDragLast.x * gConfigGeneral.window_scale)),
|
||||
static_cast<int32_t>(std::ceil(gInputDragLast.y * gConfigGeneral.window_scale)) };
|
||||
ScreenCoordsXY fixedCursorPosition = { static_cast<int32_t>(std::ceil(gInputDragLast.x * gConfigGeneral.WindowScale)),
|
||||
static_cast<int32_t>(std::ceil(gInputDragLast.y * gConfigGeneral.WindowScale)) };
|
||||
|
||||
context_set_cursor_position(fixedCursorPosition);
|
||||
}
|
||||
|
@ -471,7 +471,7 @@ static void InputWindowPositionContinue(
|
|||
{
|
||||
int32_t snapProximity;
|
||||
|
||||
snapProximity = (w.flags & WF_NO_SNAPPING) ? 0 : gConfigGeneral.window_snap_proximity;
|
||||
snapProximity = (w.flags & WF_NO_SNAPPING) ? 0 : gConfigGeneral.WindowSnapProximity;
|
||||
window_move_and_snap(w, newScreenCoords - lastScreenCoords, snapProximity);
|
||||
}
|
||||
|
||||
|
@ -570,7 +570,7 @@ static void InputViewportDragContinue()
|
|||
|
||||
differentialCoords.x = (viewport->zoom + 1).ApplyTo(differentialCoords.x);
|
||||
differentialCoords.y = (viewport->zoom + 1).ApplyTo(differentialCoords.y);
|
||||
if (gConfigGeneral.invert_viewport_drag)
|
||||
if (gConfigGeneral.InvertViewportDrag)
|
||||
{
|
||||
w->savedViewPos -= differentialCoords;
|
||||
}
|
||||
|
@ -1599,7 +1599,7 @@ void InputScrollViewport(const ScreenCoordsXY& scrollScreenCoords)
|
|||
rct_window* mainWindow = window_get_main();
|
||||
rct_viewport* viewport = mainWindow->viewport;
|
||||
|
||||
const int32_t speed = gConfigGeneral.edge_scrolling_speed;
|
||||
const int32_t speed = gConfigGeneral.EdgeScrollingSpeed;
|
||||
|
||||
int32_t multiplier = viewport->zoom.ApplyTo(speed);
|
||||
int32_t dx = scrollScreenCoords.x * multiplier;
|
||||
|
|
|
@ -473,8 +473,8 @@ static void ShortcutOpenSceneryPicker()
|
|||
|
||||
static void ShortcutScaleUp()
|
||||
{
|
||||
gConfigGeneral.window_scale += 0.25f;
|
||||
config_save_default();
|
||||
gConfigGeneral.WindowScale += 0.25f;
|
||||
ConfigSaveDefault();
|
||||
gfx_invalidate_screen();
|
||||
context_trigger_resize();
|
||||
context_update_cursor_scale();
|
||||
|
@ -482,9 +482,9 @@ static void ShortcutScaleUp()
|
|||
|
||||
static void ShortcutScaleDown()
|
||||
{
|
||||
gConfigGeneral.window_scale -= 0.25f;
|
||||
gConfigGeneral.window_scale = std::max(0.5f, gConfigGeneral.window_scale);
|
||||
config_save_default();
|
||||
gConfigGeneral.WindowScale -= 0.25f;
|
||||
gConfigGeneral.WindowScale = std::max(0.5f, gConfigGeneral.WindowScale);
|
||||
ConfigSaveDefault();
|
||||
gfx_invalidate_screen();
|
||||
context_trigger_resize();
|
||||
context_update_cursor_scale();
|
||||
|
@ -623,7 +623,7 @@ static void ShortcutToggleConsole()
|
|||
{
|
||||
console.Toggle();
|
||||
}
|
||||
else if (gConfigGeneral.debugging_tools && !context_is_input_active())
|
||||
else if (gConfigGeneral.DebuggingTools && !context_is_input_active())
|
||||
{
|
||||
window_cancel_textbox();
|
||||
console.Toggle();
|
||||
|
@ -730,8 +730,8 @@ static void ShortcutToggleTransparentWater()
|
|||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
|
||||
gConfigGeneral.transparent_water ^= 1;
|
||||
config_save_default();
|
||||
gConfigGeneral.TransparentWater ^= 1;
|
||||
ConfigSaveDefault();
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
|
||||
|
@ -832,7 +832,7 @@ void ShortcutManager::RegisterDefaultShortcuts()
|
|||
}
|
||||
});
|
||||
RegisterShortcut(ShortcutId::InterfaceOpenTileInspector, STR_SHORTCUT_OPEN_TILE_INSPECTOR, []() {
|
||||
if (gConfigInterface.toolbar_show_cheats)
|
||||
if (gConfigInterface.ToolbarShowCheats)
|
||||
{
|
||||
OpenWindow(WindowClass::TileInspector);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ static InGameConsole _inGameConsole;
|
|||
|
||||
static FontSpriteBase InGameConsoleGetFontSpriteBase()
|
||||
{
|
||||
return (gConfigInterface.console_small_font ? FontSpriteBase::SMALL : FontSpriteBase::MEDIUM);
|
||||
return (gConfigInterface.ConsoleSmallFont ? FontSpriteBase::SMALL : FontSpriteBase::MEDIUM);
|
||||
}
|
||||
|
||||
static int32_t InGameConsoleGetLineHeight()
|
||||
|
|
|
@ -617,9 +617,9 @@ namespace ThemeManager
|
|||
ActiveAvailableThemeIndex = 1;
|
||||
|
||||
bool configValid = false;
|
||||
if (!String::IsNullOrEmpty(gConfigInterface.current_theme_preset))
|
||||
if (!String::IsNullOrEmpty(gConfigInterface.CurrentThemePreset))
|
||||
{
|
||||
if (LoadThemeByConfigName(gConfigInterface.current_theme_preset))
|
||||
if (LoadThemeByConfigName(gConfigInterface.CurrentThemePreset))
|
||||
{
|
||||
configValid = true;
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ namespace ThemeManager
|
|||
|
||||
if (!configValid)
|
||||
{
|
||||
String::DiscardDuplicate(&gConfigInterface.current_theme_preset, ThemeManagerGetAvailableThemeConfigName(1));
|
||||
String::DiscardDuplicate(&gConfigInterface.CurrentThemePreset, ThemeManagerGetAvailableThemeConfigName(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -709,7 +709,7 @@ void ThemeManagerSetActiveAvailableTheme(size_t index)
|
|||
}
|
||||
}
|
||||
ThemeManager::ActiveAvailableThemeIndex = index;
|
||||
String::DiscardDuplicate(&gConfigInterface.current_theme_preset, ThemeManagerGetAvailableThemeConfigName(index));
|
||||
String::DiscardDuplicate(&gConfigInterface.CurrentThemePreset, ThemeManagerGetAvailableThemeConfigName(index));
|
||||
|
||||
ColourSchemeUpdateAll();
|
||||
}
|
||||
|
@ -805,7 +805,7 @@ void ThemeRename(const utf8* name)
|
|||
if (Path::Equals(newPath, ThemeManager::AvailableThemes[i].Path))
|
||||
{
|
||||
ThemeManager::ActiveAvailableThemeIndex = i;
|
||||
String::DiscardDuplicate(&gConfigInterface.current_theme_preset, ThemeManagerGetAvailableThemeConfigName(1));
|
||||
String::DiscardDuplicate(&gConfigInterface.CurrentThemePreset, ThemeManagerGetAvailableThemeConfigName(1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -830,7 +830,7 @@ void ThemeDuplicate(const utf8* name)
|
|||
if (Path::Equals(newPath, ThemeManager::AvailableThemes[i].Path))
|
||||
{
|
||||
ThemeManager::ActiveAvailableThemeIndex = i;
|
||||
String::DiscardDuplicate(&gConfigInterface.current_theme_preset, ThemeManagerGetAvailableThemeConfigName(i));
|
||||
String::DiscardDuplicate(&gConfigInterface.CurrentThemePreset, ThemeManagerGetAvailableThemeConfigName(i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -841,7 +841,7 @@ void ThemeDelete()
|
|||
File::Delete(ThemeManager::CurrentThemePath);
|
||||
ThemeManager::LoadTheme(const_cast<UITheme*>(&PredefinedThemeRCT2));
|
||||
ThemeManager::ActiveAvailableThemeIndex = 1;
|
||||
String::DiscardDuplicate(&gConfigInterface.current_theme_preset, ThemeManagerGetAvailableThemeConfigName(1));
|
||||
String::DiscardDuplicate(&gConfigInterface.CurrentThemePreset, ThemeManagerGetAvailableThemeConfigName(1));
|
||||
}
|
||||
|
||||
void ThemeManagerInitialise()
|
||||
|
|
|
@ -217,7 +217,7 @@ rct_window* WindowCreate(
|
|||
|
||||
// Check if there are any window slots left
|
||||
// include WINDOW_LIMIT_RESERVED for items such as the main viewport and toolbars to not appear to be counted.
|
||||
if (g_window_list.size() >= static_cast<size_t>(gConfigGeneral.window_limit + WINDOW_LIMIT_RESERVED))
|
||||
if (g_window_list.size() >= static_cast<size_t>(gConfigGeneral.WindowLimit + WINDOW_LIMIT_RESERVED))
|
||||
{
|
||||
// Close least recently used window
|
||||
for (auto& w : g_window_list)
|
||||
|
@ -566,7 +566,7 @@ void WindowAllWheelInput()
|
|||
|
||||
void ApplyScreenSaverLockSetting()
|
||||
{
|
||||
gConfigGeneral.disable_screensaver ? SDL_DisableScreenSaver() : SDL_EnableScreenSaver();
|
||||
gConfigGeneral.DisableScreensaver ? SDL_DisableScreenSaver() : SDL_EnableScreenSaver();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -83,7 +83,7 @@ private:
|
|||
(viewportWidget->width()) - 1, (viewportWidget->height()) - 1, Focus(_bannerViewPos));
|
||||
|
||||
if (viewport != nullptr)
|
||||
viewport->flags = gConfigGeneral.always_show_gridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
|
||||
viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
|
|
|
@ -70,16 +70,16 @@ public:
|
|||
break;
|
||||
case WIDX_RATE_UP:
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate += 1;
|
||||
gConfigGeneral.custom_currency_rate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
config_save_default();
|
||||
gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
ConfigSaveDefault();
|
||||
window_invalidate_all();
|
||||
break;
|
||||
case WIDX_RATE_DOWN:
|
||||
if (CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate > 1)
|
||||
{
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate -= 1;
|
||||
gConfigGeneral.custom_currency_rate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
config_save_default();
|
||||
gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
ConfigSaveDefault();
|
||||
window_invalidate_all();
|
||||
}
|
||||
break;
|
||||
|
@ -143,8 +143,8 @@ public:
|
|||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = CurrencyAffix::Suffix;
|
||||
}
|
||||
|
||||
gConfigGeneral.custom_currency_affix = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode;
|
||||
config_save_default();
|
||||
gConfigGeneral.CustomCurrencyAffix = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode;
|
||||
ConfigSaveDefault();
|
||||
|
||||
window_invalidate_all();
|
||||
}
|
||||
|
@ -165,10 +165,10 @@ public:
|
|||
CURRENCY_SYMBOL_MAX_SIZE);
|
||||
|
||||
safe_strcpy(
|
||||
gConfigGeneral.custom_currency_symbol, CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode,
|
||||
gConfigGeneral.CustomCurrencySymbol, CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode,
|
||||
CURRENCY_SYMBOL_MAX_SIZE);
|
||||
|
||||
config_save_default();
|
||||
ConfigSaveDefault();
|
||||
window_invalidate_all();
|
||||
break;
|
||||
|
||||
|
@ -178,8 +178,8 @@ public:
|
|||
{
|
||||
rate = res.value();
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = rate;
|
||||
gConfigGeneral.custom_currency_rate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
config_save_default();
|
||||
gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
ConfigSaveDefault();
|
||||
window_invalidate_all();
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -269,7 +269,7 @@ public:
|
|||
|
||||
widgets[WIDX_FILTER_TEXT_BOX].string = _filter_string;
|
||||
|
||||
_filter_flags = gConfigInterface.object_selection_filter_flags;
|
||||
_filter_flags = gConfigInterface.ObjectSelectionFilterFlags;
|
||||
std::fill_n(_filter_string, sizeof(_filter_string), 0x00);
|
||||
|
||||
WindowInitScrollWidgets(*this);
|
||||
|
@ -367,8 +367,8 @@ public:
|
|||
break;
|
||||
case WIDX_FILTER_RIDE_TAB_ALL:
|
||||
_filter_flags |= FILTER_RIDES;
|
||||
gConfigInterface.object_selection_filter_flags = _filter_flags;
|
||||
config_save_default();
|
||||
gConfigInterface.ObjectSelectionFilterFlags = _filter_flags;
|
||||
ConfigSaveDefault();
|
||||
|
||||
FilterUpdateCounts();
|
||||
VisibleListRefresh();
|
||||
|
@ -385,8 +385,8 @@ public:
|
|||
case WIDX_FILTER_RIDE_TAB_STALL:
|
||||
_filter_flags &= ~FILTER_RIDES;
|
||||
_filter_flags |= (1 << (widgetIndex - WIDX_FILTER_RIDE_TAB_TRANSPORT + _numSourceGameItems));
|
||||
gConfigInterface.object_selection_filter_flags = _filter_flags;
|
||||
config_save_default();
|
||||
gConfigInterface.ObjectSelectionFilterFlags = _filter_flags;
|
||||
ConfigSaveDefault();
|
||||
|
||||
FilterUpdateCounts();
|
||||
VisibleListRefresh();
|
||||
|
@ -546,8 +546,8 @@ public:
|
|||
{
|
||||
_filter_flags ^= (1 << dropdownIndex);
|
||||
}
|
||||
gConfigInterface.object_selection_filter_flags = _filter_flags;
|
||||
config_save_default();
|
||||
gConfigInterface.ObjectSelectionFilterFlags = _filter_flags;
|
||||
ConfigSaveDefault();
|
||||
|
||||
FilterUpdateCounts();
|
||||
scrolls->v_top = 0;
|
||||
|
|
|
@ -505,7 +505,7 @@ static void WindowGameBottomToolbarDrawRightPanel(rct_drawpixelinfo* dpi, rct_wi
|
|||
= (gHoverWidget.window_classification == WindowClass::BottomToolbar && gHoverWidget.widget_index == WIDX_DATE
|
||||
? COLOUR_WHITE
|
||||
: NOT_TRANSLUCENT(w->colours[0]));
|
||||
StringId stringId = DateFormatStringFormatIds[gConfigGeneral.date_format];
|
||||
StringId stringId = DateFormatStringFormatIds[gConfigGeneral.DateFormat];
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(DateDayNames[day]);
|
||||
ft.Add<int16_t>(month);
|
||||
|
@ -521,7 +521,7 @@ static void WindowGameBottomToolbarDrawRightPanel(rct_drawpixelinfo* dpi, rct_wi
|
|||
|
||||
int32_t temperature = gClimateCurrent.Temperature;
|
||||
StringId format = STR_CELSIUS_VALUE;
|
||||
if (gConfigGeneral.temperature_format == TemperatureUnit::Fahrenheit)
|
||||
if (gConfigGeneral.TemperatureFormat == TemperatureUnit::Fahrenheit)
|
||||
{
|
||||
temperature = ClimateCelsiusToFahrenheit(temperature);
|
||||
format = STR_FAHRENHEIT_VALUE;
|
||||
|
|
|
@ -475,7 +475,7 @@ private:
|
|||
{
|
||||
newDisabledWidgets |= (1ULL << WIDX_TAB_4); // Disable finance tab if no money
|
||||
}
|
||||
if (!gConfigGeneral.debugging_tools)
|
||||
if (!gConfigGeneral.DebuggingTools)
|
||||
{
|
||||
newDisabledWidgets |= (1ULL << WIDX_TAB_7); // Disable debug tab when debug tools not turned on
|
||||
}
|
||||
|
@ -1929,7 +1929,7 @@ rct_window* WindowGuestOpen(Peep* peep)
|
|||
if (window == nullptr)
|
||||
{
|
||||
int32_t windowWidth = 192;
|
||||
if (gConfigGeneral.debugging_tools)
|
||||
if (gConfigGeneral.DebuggingTools)
|
||||
windowWidth += TabWidth;
|
||||
|
||||
window = WindowCreate<GuestWindow>(WindowClass::Peep, windowWidth, 157, WF_RESIZABLE);
|
||||
|
|
|
@ -153,16 +153,16 @@ static u8string GetLastDirectoryByType(int32_t type)
|
|||
switch (type & 0x0E)
|
||||
{
|
||||
case LOADSAVETYPE_GAME:
|
||||
return gConfigGeneral.last_save_game_directory;
|
||||
return gConfigGeneral.LastSaveGameDirectory;
|
||||
|
||||
case LOADSAVETYPE_LANDSCAPE:
|
||||
return gConfigGeneral.last_save_landscape_directory;
|
||||
return gConfigGeneral.LastSaveLandscapeDirectory;
|
||||
|
||||
case LOADSAVETYPE_SCENARIO:
|
||||
return gConfigGeneral.last_save_scenario_directory;
|
||||
return gConfigGeneral.LastSaveScenarioDirectory;
|
||||
|
||||
case LOADSAVETYPE_TRACK:
|
||||
return gConfigGeneral.last_save_track_directory;
|
||||
return gConfigGeneral.LastSaveTrackDirectory;
|
||||
|
||||
default:
|
||||
return u8string();
|
||||
|
@ -262,7 +262,7 @@ rct_window* WindowLoadsaveOpen(
|
|||
|
||||
// Bypass the lot?
|
||||
auto hasFilePicker = OpenRCT2::GetContext()->GetUiContext()->HasFilePicker();
|
||||
if (gConfigGeneral.use_native_browse_dialog && hasFilePicker)
|
||||
if (gConfigGeneral.UseNativeBrowseDialog && hasFilePicker)
|
||||
{
|
||||
const u8string path = Browse(isSave);
|
||||
if (!path.empty())
|
||||
|
@ -479,29 +479,29 @@ static void WindowLoadsaveMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
break;
|
||||
|
||||
case WIDX_SORT_NAME:
|
||||
if (gConfigGeneral.load_save_sort == Sort::NameAscending)
|
||||
if (gConfigGeneral.LoadSaveSort == Sort::NameAscending)
|
||||
{
|
||||
gConfigGeneral.load_save_sort = Sort::NameDescending;
|
||||
gConfigGeneral.LoadSaveSort = Sort::NameDescending;
|
||||
}
|
||||
else
|
||||
{
|
||||
gConfigGeneral.load_save_sort = Sort::NameAscending;
|
||||
gConfigGeneral.LoadSaveSort = Sort::NameAscending;
|
||||
}
|
||||
config_save_default();
|
||||
ConfigSaveDefault();
|
||||
WindowLoadsaveSortList();
|
||||
w->Invalidate();
|
||||
break;
|
||||
|
||||
case WIDX_SORT_DATE:
|
||||
if (gConfigGeneral.load_save_sort == Sort::DateDescending)
|
||||
if (gConfigGeneral.LoadSaveSort == Sort::DateDescending)
|
||||
{
|
||||
gConfigGeneral.load_save_sort = Sort::DateAscending;
|
||||
gConfigGeneral.LoadSaveSort = Sort::DateAscending;
|
||||
}
|
||||
else
|
||||
{
|
||||
gConfigGeneral.load_save_sort = Sort::DateDescending;
|
||||
gConfigGeneral.LoadSaveSort = Sort::DateDescending;
|
||||
}
|
||||
config_save_default();
|
||||
ConfigSaveDefault();
|
||||
WindowLoadsaveSortList();
|
||||
w->Invalidate();
|
||||
break;
|
||||
|
@ -713,9 +713,9 @@ static void WindowLoadsavePaint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
|
||||
// Name button text
|
||||
StringId id = STR_NONE;
|
||||
if (gConfigGeneral.load_save_sort == Sort::NameAscending)
|
||||
if (gConfigGeneral.LoadSaveSort == Sort::NameAscending)
|
||||
id = STR_UP;
|
||||
else if (gConfigGeneral.load_save_sort == Sort::NameDescending)
|
||||
else if (gConfigGeneral.LoadSaveSort == Sort::NameDescending)
|
||||
id = STR_DOWN;
|
||||
|
||||
// Draw name button indicator.
|
||||
|
@ -727,9 +727,9 @@ static void WindowLoadsavePaint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
{ COLOUR_GREY });
|
||||
|
||||
// Date button text
|
||||
if (gConfigGeneral.load_save_sort == Sort::DateAscending)
|
||||
if (gConfigGeneral.LoadSaveSort == Sort::DateAscending)
|
||||
id = STR_UP;
|
||||
else if (gConfigGeneral.load_save_sort == Sort::DateDescending)
|
||||
else if (gConfigGeneral.LoadSaveSort == Sort::DateDescending)
|
||||
id = STR_DOWN;
|
||||
else
|
||||
id = STR_NONE;
|
||||
|
@ -803,7 +803,7 @@ static bool ListItemSort(LoadSaveListItem& a, LoadSaveListItem& b)
|
|||
if (a.type != b.type)
|
||||
return a.type - b.type < 0;
|
||||
|
||||
switch (gConfigGeneral.load_save_sort)
|
||||
switch (gConfigGeneral.LoadSaveSort)
|
||||
{
|
||||
case Sort::NameAscending:
|
||||
return strlogicalcmp(a.name.c_str(), b.name.c_str()) < 0;
|
||||
|
@ -962,7 +962,7 @@ static void WindowLoadsaveInvokeCallback(int32_t result, const utf8* path)
|
|||
static void SetAndSaveConfigPath(u8string& config_str, u8string_view path)
|
||||
{
|
||||
config_str = Path::GetDirectory(path);
|
||||
config_save_default();
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
|
||||
static bool IsValidPath(const char* path)
|
||||
|
@ -989,15 +989,15 @@ static void WindowLoadsaveSelect(rct_window* w, const char* path)
|
|||
switch (_type & 0x0F)
|
||||
{
|
||||
case (LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME):
|
||||
SetAndSaveConfigPath(gConfigGeneral.last_save_game_directory, pathBuffer);
|
||||
SetAndSaveConfigPath(gConfigGeneral.LastSaveGameDirectory, pathBuffer);
|
||||
WindowLoadsaveInvokeCallback(MODAL_RESULT_OK, pathBuffer);
|
||||
window_close_by_class(WindowClass::Loadsave);
|
||||
gfx_invalidate_screen();
|
||||
break;
|
||||
|
||||
case (LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME):
|
||||
SetAndSaveConfigPath(gConfigGeneral.last_save_game_directory, pathBuffer);
|
||||
if (scenario_save(pathBuffer, gConfigGeneral.save_plugin_data ? 1 : 0))
|
||||
SetAndSaveConfigPath(gConfigGeneral.LastSaveGameDirectory, pathBuffer);
|
||||
if (scenario_save(pathBuffer, gConfigGeneral.SavePluginData ? 1 : 0))
|
||||
{
|
||||
gScenarioSavePath = pathBuffer;
|
||||
gCurrentLoadedPath = pathBuffer;
|
||||
|
@ -1017,7 +1017,7 @@ static void WindowLoadsaveSelect(rct_window* w, const char* path)
|
|||
break;
|
||||
|
||||
case (LOADSAVETYPE_LOAD | LOADSAVETYPE_LANDSCAPE):
|
||||
SetAndSaveConfigPath(gConfigGeneral.last_save_landscape_directory, pathBuffer);
|
||||
SetAndSaveConfigPath(gConfigGeneral.LastSaveLandscapeDirectory, pathBuffer);
|
||||
if (Editor::LoadLandscape(pathBuffer))
|
||||
{
|
||||
gCurrentLoadedPath = pathBuffer;
|
||||
|
@ -1033,9 +1033,9 @@ static void WindowLoadsaveSelect(rct_window* w, const char* path)
|
|||
break;
|
||||
|
||||
case (LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE):
|
||||
SetAndSaveConfigPath(gConfigGeneral.last_save_landscape_directory, pathBuffer);
|
||||
SetAndSaveConfigPath(gConfigGeneral.LastSaveLandscapeDirectory, pathBuffer);
|
||||
gScenarioFileName = std::string(String::ToStringView(pathBuffer, std::size(pathBuffer)));
|
||||
if (scenario_save(pathBuffer, gConfigGeneral.save_plugin_data ? 3 : 2))
|
||||
if (scenario_save(pathBuffer, gConfigGeneral.SavePluginData ? 3 : 2))
|
||||
{
|
||||
gCurrentLoadedPath = pathBuffer;
|
||||
window_close_by_class(WindowClass::Loadsave);
|
||||
|
@ -1051,12 +1051,12 @@ static void WindowLoadsaveSelect(rct_window* w, const char* path)
|
|||
|
||||
case (LOADSAVETYPE_SAVE | LOADSAVETYPE_SCENARIO):
|
||||
{
|
||||
SetAndSaveConfigPath(gConfigGeneral.last_save_scenario_directory, pathBuffer);
|
||||
SetAndSaveConfigPath(gConfigGeneral.LastSaveScenarioDirectory, pathBuffer);
|
||||
int32_t parkFlagsBackup = gParkFlags;
|
||||
gParkFlags &= ~PARK_FLAGS_SPRITES_INITIALISED;
|
||||
gEditorStep = EditorStep::Invalid;
|
||||
gScenarioFileName = std::string(String::ToStringView(pathBuffer, std::size(pathBuffer)));
|
||||
int32_t success = scenario_save(pathBuffer, gConfigGeneral.save_plugin_data ? 3 : 2);
|
||||
int32_t success = scenario_save(pathBuffer, gConfigGeneral.SavePluginData ? 3 : 2);
|
||||
gParkFlags = parkFlagsBackup;
|
||||
|
||||
if (success)
|
||||
|
@ -1076,7 +1076,7 @@ static void WindowLoadsaveSelect(rct_window* w, const char* path)
|
|||
|
||||
case (LOADSAVETYPE_LOAD | LOADSAVETYPE_TRACK):
|
||||
{
|
||||
SetAndSaveConfigPath(gConfigGeneral.last_save_track_directory, pathBuffer);
|
||||
SetAndSaveConfigPath(gConfigGeneral.LastSaveTrackDirectory, pathBuffer);
|
||||
auto intent = Intent(WindowClass::InstallTrack);
|
||||
intent.putExtra(INTENT_EXTRA_PATH, std::string{ pathBuffer });
|
||||
context_open_intent(&intent);
|
||||
|
@ -1087,7 +1087,7 @@ static void WindowLoadsaveSelect(rct_window* w, const char* path)
|
|||
|
||||
case (LOADSAVETYPE_SAVE | LOADSAVETYPE_TRACK):
|
||||
{
|
||||
SetAndSaveConfigPath(gConfigGeneral.last_save_track_directory, pathBuffer);
|
||||
SetAndSaveConfigPath(gConfigGeneral.LastSaveTrackDirectory, pathBuffer);
|
||||
|
||||
const auto withExtension = Path::WithExtension(pathBuffer, "td6");
|
||||
String::Set(pathBuffer, sizeof(pathBuffer), withExtension.c_str());
|
||||
|
|
|
@ -52,17 +52,17 @@ private:
|
|||
void SetViewportFlags()
|
||||
{
|
||||
viewport->flags |= VIEWPORT_FLAG_SOUND_ON;
|
||||
if (gConfigGeneral.invisible_rides)
|
||||
if (gConfigGeneral.InvisibleRides)
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_RIDES;
|
||||
if (gConfigGeneral.invisible_vehicles)
|
||||
if (gConfigGeneral.InvisibleVehicles)
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_VEHICLES;
|
||||
if (gConfigGeneral.invisible_trees)
|
||||
if (gConfigGeneral.InvisibleTrees)
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_VEGETATION;
|
||||
if (gConfigGeneral.invisible_scenery)
|
||||
if (gConfigGeneral.InvisibleScenery)
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_SCENERY;
|
||||
if (gConfigGeneral.invisible_paths)
|
||||
if (gConfigGeneral.InvisiblePaths)
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_PATHS;
|
||||
if (gConfigGeneral.invisible_supports)
|
||||
if (gConfigGeneral.InvisibleSupports)
|
||||
viewport->flags |= VIEWPORT_FLAG_INVISIBLE_SUPPORTS;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -466,7 +466,7 @@ static void WindowMultiplayerInformationPaint(rct_window* w, rct_drawpixelinfo*
|
|||
|
||||
static bool IsServerPlayerInvisible()
|
||||
{
|
||||
return network_is_server_player_invisible() && !gConfigGeneral.debugging_tools;
|
||||
return network_is_server_player_invisible() && !gConfigGeneral.DebuggingTools;
|
||||
}
|
||||
|
||||
static void WindowMultiplayerPlayersMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
|
@ -958,16 +958,16 @@ static void WindowMultiplayerOptionsMouseup(rct_window* w, WidgetIndex widgetInd
|
|||
}
|
||||
break;
|
||||
case WIDX_LOG_CHAT_CHECKBOX:
|
||||
gConfigNetwork.log_chat = !gConfigNetwork.log_chat;
|
||||
config_save_default();
|
||||
gConfigNetwork.LogChat = !gConfigNetwork.LogChat;
|
||||
ConfigSaveDefault();
|
||||
break;
|
||||
case WIDX_LOG_SERVER_ACTIONS_CHECKBOX:
|
||||
gConfigNetwork.log_server_actions = !gConfigNetwork.log_server_actions;
|
||||
config_save_default();
|
||||
gConfigNetwork.LogServerActions = !gConfigNetwork.LogServerActions;
|
||||
ConfigSaveDefault();
|
||||
break;
|
||||
case WIDX_KNOWN_KEYS_ONLY_CHECKBOX:
|
||||
gConfigNetwork.known_keys_only = !gConfigNetwork.known_keys_only;
|
||||
config_save_default();
|
||||
gConfigNetwork.KnownKeysOnly = !gConfigNetwork.KnownKeysOnly;
|
||||
ConfigSaveDefault();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -994,9 +994,9 @@ static void WindowMultiplayerOptionsInvalidate(rct_window* w)
|
|||
w->widgets[WIDX_KNOWN_KEYS_ONLY_CHECKBOX].type = WindowWidgetType::Empty;
|
||||
}
|
||||
|
||||
WidgetSetCheckboxValue(*w, WIDX_LOG_CHAT_CHECKBOX, gConfigNetwork.log_chat);
|
||||
WidgetSetCheckboxValue(*w, WIDX_LOG_SERVER_ACTIONS_CHECKBOX, gConfigNetwork.log_server_actions);
|
||||
WidgetSetCheckboxValue(*w, WIDX_KNOWN_KEYS_ONLY_CHECKBOX, gConfigNetwork.known_keys_only);
|
||||
WidgetSetCheckboxValue(*w, WIDX_LOG_CHAT_CHECKBOX, gConfigNetwork.LogChat);
|
||||
WidgetSetCheckboxValue(*w, WIDX_LOG_SERVER_ACTIONS_CHECKBOX, gConfigNetwork.LogServerActions);
|
||||
WidgetSetCheckboxValue(*w, WIDX_KNOWN_KEYS_ONLY_CHECKBOX, gConfigNetwork.KnownKeysOnly);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerOptionsPaint(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
|
|
|
@ -343,8 +343,8 @@ public:
|
|||
context_open_window_view(WV_FINANCES_RESEARCH);
|
||||
break;
|
||||
case WIDX_GROUP_BY_TRACK_TYPE:
|
||||
gConfigInterface.list_ride_vehicles_separately = !gConfigInterface.list_ride_vehicles_separately;
|
||||
config_save_default();
|
||||
gConfigInterface.ListRideVehiclesSeparately = !gConfigInterface.ListRideVehiclesSeparately;
|
||||
ConfigSaveDefault();
|
||||
SetPage(_currentTab);
|
||||
break;
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ public:
|
|||
{
|
||||
SetPressedTab();
|
||||
|
||||
if (!gConfigInterface.list_ride_vehicles_separately)
|
||||
if (!gConfigInterface.ListRideVehiclesSeparately)
|
||||
pressed_widgets |= (1LL << WIDX_GROUP_BY_TRACK_TYPE);
|
||||
else
|
||||
pressed_widgets &= ~(1LL << WIDX_GROUP_BY_TRACK_TYPE);
|
||||
|
@ -646,7 +646,7 @@ private:
|
|||
rct_ride_entry* rideEntry = get_ride_entry(rideEntryIndex);
|
||||
|
||||
// Skip if the vehicle isn't the preferred vehicle for this generic track type
|
||||
if (!gConfigInterface.list_ride_vehicles_separately
|
||||
if (!gConfigInterface.ListRideVehiclesSeparately
|
||||
&& !GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY)
|
||||
&& highestVehiclePriority > rideEntry->BuildMenuPriority)
|
||||
{
|
||||
|
@ -656,7 +656,7 @@ private:
|
|||
highestVehiclePriority = rideEntry->BuildMenuPriority;
|
||||
|
||||
// Determines how and where to draw a button for this ride type/vehicle.
|
||||
if (gConfigInterface.list_ride_vehicles_separately
|
||||
if (gConfigInterface.ListRideVehiclesSeparately
|
||||
|| GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY))
|
||||
{
|
||||
// Separate, draw apart
|
||||
|
@ -843,7 +843,7 @@ private:
|
|||
|
||||
if (!_vehicleAvailability.empty())
|
||||
{
|
||||
if (gConfigInterface.list_ride_vehicles_separately)
|
||||
if (gConfigInterface.ListRideVehiclesSeparately)
|
||||
{
|
||||
ft = Formatter();
|
||||
ft.Add<StringId>(rideEntry->naming.Name);
|
||||
|
|
|
@ -35,24 +35,24 @@ struct NotificationDef
|
|||
};
|
||||
|
||||
static constexpr const NotificationDef NewsItemOptionDefinitions[] = {
|
||||
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_AWARD, offsetof(NotificationConfiguration, park_award) },
|
||||
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_MARKETING_CAMPAIGN_FINISHED, offsetof(NotificationConfiguration, park_marketing_campaign_finished) },
|
||||
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_WARNINGS, offsetof(NotificationConfiguration, park_warnings) },
|
||||
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_RATING_WARNINGS, offsetof(NotificationConfiguration, park_rating_warnings) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_BROKEN_DOWN, offsetof(NotificationConfiguration, ride_broken_down) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_CRASHED, offsetof(NotificationConfiguration, ride_crashed) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_CASUALTIES, offsetof(NotificationConfiguration, ride_casualties) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_WARNINGS, offsetof(NotificationConfiguration, ride_warnings) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_RESEARCHED, offsetof(NotificationConfiguration, ride_researched) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_VEHICLE_STALLED, offsetof(NotificationConfiguration, ride_stalled_vehicles) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_WARNINGS, offsetof(NotificationConfiguration, guest_warnings) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_PARK, offsetof(NotificationConfiguration, guest_left_park) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE, offsetof(NotificationConfiguration, guest_queuing_for_ride) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_ON_RIDE, offsetof(NotificationConfiguration, guest_on_ride) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_RIDE, offsetof(NotificationConfiguration, guest_left_ride) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_BOUGHT_ITEM, offsetof(NotificationConfiguration, guest_bought_item) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_USED_FACILITY, offsetof(NotificationConfiguration, guest_used_facility) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_DIED, offsetof(NotificationConfiguration, guest_died) },
|
||||
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_AWARD, offsetof(NotificationConfiguration, ParkAward) },
|
||||
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_MARKETING_CAMPAIGN_FINISHED, offsetof(NotificationConfiguration, ParkMarketingCampaignFinished) },
|
||||
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_WARNINGS, offsetof(NotificationConfiguration, ParkWarnings) },
|
||||
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_RATING_WARNINGS, offsetof(NotificationConfiguration, ParkRatingWarnings) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_BROKEN_DOWN, offsetof(NotificationConfiguration, RideBrokenDown) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_CRASHED, offsetof(NotificationConfiguration, RideCrashed) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_CASUALTIES, offsetof(NotificationConfiguration, RideCasualties) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_WARNINGS, offsetof(NotificationConfiguration, RideWarnings) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_RESEARCHED, offsetof(NotificationConfiguration, RideResearched) },
|
||||
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_VEHICLE_STALLED, offsetof(NotificationConfiguration, RideStalledVehicles) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_WARNINGS, offsetof(NotificationConfiguration, GuestWarnings) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_PARK, offsetof(NotificationConfiguration, GuestLeftPark) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE, offsetof(NotificationConfiguration, GuestQueuingForRide) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_ON_RIDE, offsetof(NotificationConfiguration, GuestOnRide) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_RIDE, offsetof(NotificationConfiguration, GuestLeftRide) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_BOUGHT_ITEM, offsetof(NotificationConfiguration, GuestBoughtItem) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_USED_FACILITY, offsetof(NotificationConfiguration, GuestUsedFacility) },
|
||||
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_DIED, offsetof(NotificationConfiguration, GuestDied) },
|
||||
};
|
||||
|
||||
enum WindowNewsOptionsWidgetIdx
|
||||
|
@ -129,7 +129,7 @@ public:
|
|||
bool* configValue = GetNotificationValuePtr(ndef);
|
||||
*configValue = !(*configValue);
|
||||
|
||||
config_save_default();
|
||||
ConfigSaveDefault();
|
||||
|
||||
InvalidateWidget(widgetIndex);
|
||||
break;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -622,7 +622,7 @@ private:
|
|||
int32_t viewportFlags{};
|
||||
if (viewport == nullptr)
|
||||
{
|
||||
viewportFlags = gConfigGeneral.always_show_gridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
|
||||
viewportFlags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -962,7 +962,7 @@ private:
|
|||
// Draw park size
|
||||
auto parkSize = gParkSize * 10;
|
||||
auto stringIndex = STR_PARK_SIZE_METRIC_LABEL;
|
||||
if (gConfigGeneral.measurement_format == MeasurementFormat::Imperial)
|
||||
if (gConfigGeneral.MeasurementFormat == MeasurementFormat::Imperial)
|
||||
{
|
||||
stringIndex = STR_PARK_SIZE_IMPERIAL_LABEL;
|
||||
parkSize = squaredmetres_to_squaredfeet(parkSize);
|
||||
|
|
|
@ -1572,7 +1572,7 @@ static void WindowRideInitViewport(rct_window* w)
|
|||
viewport_flags = w->viewport->flags;
|
||||
w->RemoveViewport();
|
||||
}
|
||||
else if (gConfigGeneral.always_show_gridlines)
|
||||
else if (gConfigGeneral.AlwaysShowGridlines)
|
||||
{
|
||||
viewport_flags |= VIEWPORT_FLAG_GRIDLINES;
|
||||
}
|
||||
|
@ -4074,7 +4074,7 @@ static void WindowRideMaintenanceInvalidate(rct_window* w)
|
|||
WindowRideAnchorBorderWidgets(w);
|
||||
window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10);
|
||||
|
||||
if (gConfigGeneral.debugging_tools && network_get_mode() == NETWORK_MODE_NONE)
|
||||
if (gConfigGeneral.DebuggingTools && network_get_mode() == NETWORK_MODE_NONE)
|
||||
{
|
||||
window_ride_maintenance_widgets[WIDX_FORCE_BREAKDOWN].type = WindowWidgetType::FlatBtn;
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ public:
|
|||
if (ride_try_get_origin_element(currentRide, nullptr))
|
||||
{
|
||||
// Auto open shops if required.
|
||||
if (currentRide->mode == RideMode::ShopStall && gConfigGeneral.auto_open_shops)
|
||||
if (currentRide->mode == RideMode::ShopStall && gConfigGeneral.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
|
||||
|
|
|
@ -103,7 +103,7 @@ rct_window* WindowSavePromptOpen()
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (!gConfigGeneral.confirmation_prompt)
|
||||
if (!gConfigGeneral.ConfirmationPrompt)
|
||||
{
|
||||
/* game_load_or_quit_no_save_prompt() will exec requested task and close this window
|
||||
* immediately again.
|
||||
|
|
|
@ -204,7 +204,7 @@ static void WindowScenarioselectInitTabs(rct_window* w)
|
|||
for (size_t i = 0; i < numScenarios; i++)
|
||||
{
|
||||
const scenario_index_entry* scenario = scenario_repository_get_by_index(i);
|
||||
if (gConfigGeneral.scenario_select_mode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor)
|
||||
if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor)
|
||||
{
|
||||
if (_titleEditor && scenario->source_game == ScenarioSource::Other)
|
||||
continue;
|
||||
|
@ -221,9 +221,9 @@ static void WindowScenarioselectInitTabs(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
if (showPages & (1 << gConfigInterface.scenarioselect_last_tab))
|
||||
if (showPages & (1 << gConfigInterface.ScenarioselectLastTab))
|
||||
{
|
||||
w->selected_tab = gConfigInterface.scenarioselect_last_tab;
|
||||
w->selected_tab = gConfigInterface.ScenarioselectLastTab;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -271,8 +271,8 @@ static void WindowScenarioselectMousedown(rct_window* w, WidgetIndex widgetIndex
|
|||
{
|
||||
w->selected_tab = widgetIndex - 4;
|
||||
w->highlighted_scenario = nullptr;
|
||||
gConfigInterface.scenarioselect_last_tab = w->selected_tab;
|
||||
config_save_default();
|
||||
gConfigInterface.ScenarioselectLastTab = w->selected_tab;
|
||||
ConfigSaveDefault();
|
||||
InitialiseListItems(w);
|
||||
w->Invalidate();
|
||||
window_event_resize_call(w);
|
||||
|
@ -424,7 +424,7 @@ static void WindowScenarioselectInvalidate(rct_window* w)
|
|||
window_scenarioselect_widgets[WIDX_BACKGROUND].bottom = windowHeight - 1;
|
||||
window_scenarioselect_widgets[WIDX_TABCONTENT].bottom = windowHeight - 1;
|
||||
|
||||
const int32_t bottomMargin = gConfigGeneral.debugging_tools ? 17 : 5;
|
||||
const int32_t bottomMargin = gConfigGeneral.DebuggingTools ? 17 : 5;
|
||||
window_scenarioselect_widgets[WIDX_SCENARIOLIST].bottom = windowHeight - bottomMargin;
|
||||
}
|
||||
|
||||
|
@ -446,7 +446,7 @@ static void WindowScenarioselectPaint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
continue;
|
||||
|
||||
auto ft = Formatter();
|
||||
if (gConfigGeneral.scenario_select_mode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor)
|
||||
if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor)
|
||||
{
|
||||
ft.Add<StringId>(ScenarioOriginStringIds[i]);
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ static void WindowScenarioselectPaint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
}
|
||||
|
||||
// Scenario path
|
||||
if (gConfigGeneral.debugging_tools)
|
||||
if (gConfigGeneral.DebuggingTools)
|
||||
{
|
||||
utf8 path[MAX_PATH];
|
||||
|
||||
|
@ -711,7 +711,7 @@ static void InitialiseListItems(rct_window* w)
|
|||
|
||||
// Category heading
|
||||
StringId headingStringId = STR_NONE;
|
||||
if (gConfigGeneral.scenario_select_mode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor)
|
||||
if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor)
|
||||
{
|
||||
if (w->selected_tab != static_cast<uint8_t>(ScenarioSource::Real) && currentHeading != scenario->category)
|
||||
{
|
||||
|
@ -790,7 +790,7 @@ static void InitialiseListItems(rct_window* w)
|
|||
{
|
||||
bool megaParkLocked = (rct1CompletedScenarios & rct1RequiredCompletedScenarios) != rct1RequiredCompletedScenarios;
|
||||
_listItems[megaParkListItemIndex].scenario.is_locked = megaParkLocked;
|
||||
if (megaParkLocked && gConfigGeneral.scenario_hide_mega_park)
|
||||
if (megaParkLocked && gConfigGeneral.ScenarioHideMegaPark)
|
||||
{
|
||||
// Remove mega park
|
||||
_listItems.pop_back();
|
||||
|
@ -816,7 +816,7 @@ static void InitialiseListItems(rct_window* w)
|
|||
|
||||
static bool IsScenarioVisible(rct_window* w, const scenario_index_entry* scenario)
|
||||
{
|
||||
if (gConfigGeneral.scenario_select_mode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor)
|
||||
if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor)
|
||||
{
|
||||
if (static_cast<uint8_t>(scenario->source_game) != w->selected_tab)
|
||||
{
|
||||
|
@ -840,9 +840,9 @@ static bool IsScenarioVisible(rct_window* w, const scenario_index_entry* scenari
|
|||
|
||||
static bool IsLockingEnabled(rct_window* w)
|
||||
{
|
||||
if (gConfigGeneral.scenario_select_mode != SCENARIO_SELECT_MODE_ORIGIN)
|
||||
if (gConfigGeneral.ScenarioSelectMode != SCENARIO_SELECT_MODE_ORIGIN)
|
||||
return false;
|
||||
if (!gConfigGeneral.scenario_unlocking_enabled)
|
||||
if (!gConfigGeneral.ScenarioUnlockingEnabled)
|
||||
return false;
|
||||
if (w->selected_tab >= 6)
|
||||
return false;
|
||||
|
|
|
@ -144,7 +144,7 @@ rct_window* WindowServerListOpen()
|
|||
|
||||
window_set_resize(*window, WWIDTH_MIN, WHEIGHT_MIN, WWIDTH_MAX, WHEIGHT_MAX);
|
||||
|
||||
safe_strcpy(_playerName, gConfigNetwork.player_name.c_str(), sizeof(_playerName));
|
||||
safe_strcpy(_playerName, gConfigNetwork.PlayerName.c_str(), sizeof(_playerName));
|
||||
|
||||
window->no_list_items = static_cast<uint16_t>(_serverList.GetCount());
|
||||
|
||||
|
@ -322,8 +322,8 @@ static void WindowServerListTextinput(rct_window* w, WidgetIndex widgetIndex, ch
|
|||
|
||||
if (_playerName[0] != '\0')
|
||||
{
|
||||
gConfigNetwork.player_name = _playerName;
|
||||
config_save_default();
|
||||
gConfigNetwork.PlayerName = _playerName;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
|
||||
widget_invalidate(*w, WIDX_PLAYER_NAME_INPUT);
|
||||
|
|
|
@ -84,10 +84,10 @@ public:
|
|||
page = 0;
|
||||
list_information_type = 0;
|
||||
|
||||
snprintf(_port, 7, "%u", gConfigNetwork.default_port);
|
||||
safe_strcpy(_name, gConfigNetwork.server_name.c_str(), sizeof(_name));
|
||||
safe_strcpy(_description, gConfigNetwork.server_description.c_str(), sizeof(_description));
|
||||
safe_strcpy(_greeting, gConfigNetwork.server_greeting.c_str(), sizeof(_greeting));
|
||||
snprintf(_port, 7, "%u", gConfigNetwork.DefaultPort);
|
||||
safe_strcpy(_name, gConfigNetwork.ServerName.c_str(), sizeof(_name));
|
||||
safe_strcpy(_description, gConfigNetwork.ServerDescription.c_str(), sizeof(_description));
|
||||
safe_strcpy(_greeting, gConfigNetwork.ServerGreeting.c_str(), sizeof(_greeting));
|
||||
}
|
||||
void OnMouseUp(WidgetIndex widgetIndex) override
|
||||
{
|
||||
|
@ -112,24 +112,24 @@ public:
|
|||
window_start_textbox(*this, widgetIndex, STR_STRING, _password, 32);
|
||||
break;
|
||||
case WIDX_MAXPLAYERS_INCREASE:
|
||||
if (gConfigNetwork.maxplayers < 255)
|
||||
if (gConfigNetwork.Maxplayers < 255)
|
||||
{
|
||||
gConfigNetwork.maxplayers++;
|
||||
gConfigNetwork.Maxplayers++;
|
||||
}
|
||||
config_save_default();
|
||||
ConfigSaveDefault();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_MAXPLAYERS_DECREASE:
|
||||
if (gConfigNetwork.maxplayers > 1)
|
||||
if (gConfigNetwork.Maxplayers > 1)
|
||||
{
|
||||
gConfigNetwork.maxplayers--;
|
||||
gConfigNetwork.Maxplayers--;
|
||||
}
|
||||
config_save_default();
|
||||
ConfigSaveDefault();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_ADVERTISE_CHECKBOX:
|
||||
gConfigNetwork.advertise = !gConfigNetwork.advertise;
|
||||
config_save_default();
|
||||
gConfigNetwork.Advertise = !gConfigNetwork.Advertise;
|
||||
ConfigSaveDefault();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_START_SERVER:
|
||||
|
@ -149,10 +149,10 @@ public:
|
|||
{
|
||||
ColourSchemeUpdateByClass(this, WindowClass::ServerList);
|
||||
|
||||
WidgetSetCheckboxValue(*this, WIDX_ADVERTISE_CHECKBOX, gConfigNetwork.advertise);
|
||||
WidgetSetCheckboxValue(*this, WIDX_ADVERTISE_CHECKBOX, gConfigNetwork.Advertise);
|
||||
auto ft = Formatter::Common();
|
||||
ft.Increment(18);
|
||||
ft.Add<uint16_t>(gConfigNetwork.maxplayers);
|
||||
ft.Add<uint16_t>(gConfigNetwork.Maxplayers);
|
||||
}
|
||||
void OnUpdate() override
|
||||
{
|
||||
|
@ -184,8 +184,8 @@ public:
|
|||
safe_strcpy(_port, temp.c_str(), sizeof(_port));
|
||||
}
|
||||
|
||||
gConfigNetwork.default_port = atoi(_port);
|
||||
config_save_default();
|
||||
gConfigNetwork.DefaultPort = atoi(_port);
|
||||
ConfigSaveDefault();
|
||||
|
||||
widget_invalidate(*this, WIDX_NAME_INPUT);
|
||||
break;
|
||||
|
@ -201,8 +201,8 @@ public:
|
|||
|
||||
if (_name[0] != '\0')
|
||||
{
|
||||
gConfigNetwork.server_name = _name;
|
||||
config_save_default();
|
||||
gConfigNetwork.ServerName = _name;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
|
||||
widget_invalidate(*this, WIDX_NAME_INPUT);
|
||||
|
@ -219,8 +219,8 @@ public:
|
|||
|
||||
if (_description[0] != '\0')
|
||||
{
|
||||
gConfigNetwork.server_description = _description;
|
||||
config_save_default();
|
||||
gConfigNetwork.ServerDescription = _description;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
|
||||
widget_invalidate(*this, WIDX_DESCRIPTION_INPUT);
|
||||
|
@ -237,8 +237,8 @@ public:
|
|||
|
||||
if (_greeting[0] != '\0')
|
||||
{
|
||||
gConfigNetwork.server_greeting = _greeting;
|
||||
config_save_default();
|
||||
gConfigNetwork.ServerGreeting = _greeting;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
|
||||
widget_invalidate(*this, WIDX_GREETING_INPUT);
|
||||
|
@ -284,7 +284,7 @@ private:
|
|||
game_notify_map_change();
|
||||
if (GetContext()->LoadParkFromFile(path, false, true))
|
||||
{
|
||||
network_begin_server(gConfigNetwork.default_port, gConfigNetwork.listen_address);
|
||||
network_begin_server(gConfigNetwork.DefaultPort, gConfigNetwork.ListenAddress);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ private:
|
|||
{
|
||||
game_notify_map_change();
|
||||
GetContext()->LoadParkFromFile(path);
|
||||
network_begin_server(gConfigNetwork.default_port, gConfigNetwork.listen_address);
|
||||
network_begin_server(gConfigNetwork.DefaultPort, gConfigNetwork.ListenAddress);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -135,7 +135,7 @@ public:
|
|||
this, windowPos + ScreenCoordsXY{ viewportWidget.left + 1, viewportWidget.top + 1 }, viewportWidget.width() - 1,
|
||||
viewportWidget.height() - 1, Focus(CoordsXYZ{ signViewPosition, viewZ }));
|
||||
|
||||
viewport->flags = gConfigGeneral.always_show_gridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
|
||||
viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
|
||||
Invalidate();
|
||||
|
||||
return true;
|
||||
|
@ -307,7 +307,7 @@ public:
|
|||
this, windowPos + ScreenCoordsXY{ viewportWidget->left + 1, viewportWidget->top + 1 }, viewportWidget->width() - 1,
|
||||
viewportWidget->height() - 1, Focus(CoordsXYZ{ signViewPos }));
|
||||
if (viewport != nullptr)
|
||||
viewport->flags = gConfigGeneral.always_show_gridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
|
||||
viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
|
||||
Invalidate();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1158,7 +1158,7 @@ private:
|
|||
else
|
||||
{
|
||||
viewport_flags = 0;
|
||||
if (gConfigGeneral.always_show_gridlines)
|
||||
if (gConfigGeneral.AlwaysShowGridlines)
|
||||
viewport_flags |= VIEWPORT_FLAG_GRIDLINES;
|
||||
}
|
||||
|
||||
|
|
|
@ -501,7 +501,7 @@ private:
|
|||
*/
|
||||
void HireNewMember(StaffType staffType, EntertainerCostume entertainerType)
|
||||
{
|
||||
bool autoPosition = gConfigGeneral.auto_staff_placement;
|
||||
bool autoPosition = gConfigGeneral.AutoStaffPlacement;
|
||||
if (gInputPlaceObjectModifier & PLACE_OBJECT_MODIFIER_SHIFT_Z)
|
||||
{
|
||||
autoPosition = autoPosition ^ 1;
|
||||
|
@ -512,7 +512,7 @@ private:
|
|||
if (staffType == StaffType::Handyman)
|
||||
{
|
||||
staffOrders = STAFF_ORDERS_SWEEPING | STAFF_ORDERS_WATER_FLOWERS | STAFF_ORDERS_EMPTY_BINS;
|
||||
if (gConfigGeneral.handymen_mow_default)
|
||||
if (gConfigGeneral.HandymenMowByDefault)
|
||||
{
|
||||
staffOrders |= STAFF_ORDERS_MOWING;
|
||||
}
|
||||
|
|
|
@ -696,27 +696,27 @@ static void WindowTopToolbarInvalidate(rct_window* w)
|
|||
window_top_toolbar_widgets[WIDX_RESEARCH].type = WindowWidgetType::TrnBtn;
|
||||
window_top_toolbar_widgets[WIDX_FASTFORWARD].type = WindowWidgetType::TrnBtn;
|
||||
window_top_toolbar_widgets[WIDX_CHEATS].type = WindowWidgetType::TrnBtn;
|
||||
window_top_toolbar_widgets[WIDX_DEBUG].type = gConfigGeneral.debugging_tools ? WindowWidgetType::TrnBtn
|
||||
: WindowWidgetType::Empty;
|
||||
window_top_toolbar_widgets[WIDX_DEBUG].type = gConfigGeneral.DebuggingTools ? WindowWidgetType::TrnBtn
|
||||
: WindowWidgetType::Empty;
|
||||
window_top_toolbar_widgets[WIDX_NEWS].type = WindowWidgetType::TrnBtn;
|
||||
window_top_toolbar_widgets[WIDX_NETWORK].type = WindowWidgetType::TrnBtn;
|
||||
|
||||
if (!gConfigInterface.toolbar_show_mute)
|
||||
if (!gConfigInterface.ToolbarShowMute)
|
||||
window_top_toolbar_widgets[WIDX_MUTE].type = WindowWidgetType::Empty;
|
||||
|
||||
if (!gConfigInterface.toolbar_show_chat)
|
||||
if (!gConfigInterface.ToolbarShowChat)
|
||||
window_top_toolbar_widgets[WIDX_CHAT].type = WindowWidgetType::Empty;
|
||||
|
||||
if (!gConfigInterface.toolbar_show_research)
|
||||
if (!gConfigInterface.ToolbarShowResearch)
|
||||
window_top_toolbar_widgets[WIDX_RESEARCH].type = WindowWidgetType::Empty;
|
||||
|
||||
if (!gConfigInterface.toolbar_show_cheats)
|
||||
if (!gConfigInterface.ToolbarShowCheats)
|
||||
window_top_toolbar_widgets[WIDX_CHEATS].type = WindowWidgetType::Empty;
|
||||
|
||||
if (!gConfigInterface.toolbar_show_news)
|
||||
if (!gConfigInterface.ToolbarShowNews)
|
||||
window_top_toolbar_widgets[WIDX_NEWS].type = WindowWidgetType::Empty;
|
||||
|
||||
if (!gConfigInterface.toolbar_show_zoom)
|
||||
if (!gConfigInterface.ToolbarShowZoom)
|
||||
{
|
||||
window_top_toolbar_widgets[WIDX_ZOOM_IN].type = WindowWidgetType::Empty;
|
||||
window_top_toolbar_widgets[WIDX_ZOOM_OUT].type = WindowWidgetType::Empty;
|
||||
|
@ -727,7 +727,7 @@ static void WindowTopToolbarInvalidate(rct_window* w)
|
|||
window_top_toolbar_widgets[WIDX_PAUSE].type = WindowWidgetType::Empty;
|
||||
}
|
||||
|
||||
if ((gParkFlags & PARK_FLAGS_NO_MONEY) || !gConfigInterface.toolbar_show_finances)
|
||||
if ((gParkFlags & PARK_FLAGS_NO_MONEY) || !gConfigInterface.ToolbarShowFinances)
|
||||
window_top_toolbar_widgets[WIDX_FINANCES].type = WindowWidgetType::Empty;
|
||||
|
||||
if (gScreenFlags & SCREEN_FLAGS_EDITOR)
|
||||
|
@ -1344,7 +1344,7 @@ static void Sub6E1F34SmallScenery(
|
|||
rotation -= get_current_rotation();
|
||||
rotation &= 0x3;
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off)
|
||||
{
|
||||
VirtualFloorSetHeight(gSceneryPlaceZ);
|
||||
}
|
||||
|
@ -1428,7 +1428,7 @@ static void Sub6E1F34SmallScenery(
|
|||
rotation -= get_current_rotation();
|
||||
rotation &= 0x3;
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off)
|
||||
{
|
||||
VirtualFloorSetHeight(gSceneryPlaceZ);
|
||||
}
|
||||
|
@ -1462,7 +1462,7 @@ static void Sub6E1F34PathItem(
|
|||
return;
|
||||
}
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off)
|
||||
{
|
||||
VirtualFloorSetHeight(gSceneryPlaceZ);
|
||||
}
|
||||
|
@ -1551,7 +1551,7 @@ static void Sub6E1F34Wall(
|
|||
if (gridPos.IsNull())
|
||||
return;
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off)
|
||||
{
|
||||
VirtualFloorSetHeight(gSceneryPlaceZ);
|
||||
}
|
||||
|
@ -1650,7 +1650,7 @@ static void Sub6E1F34LargeScenery(
|
|||
rotation -= get_current_rotation();
|
||||
rotation &= 0x3;
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off)
|
||||
{
|
||||
VirtualFloorSetHeight(gSceneryPlaceZ);
|
||||
}
|
||||
|
@ -1698,7 +1698,7 @@ static void Sub6E1F34Banner(
|
|||
}
|
||||
}
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off)
|
||||
{
|
||||
VirtualFloorSetHeight(gSceneryPlaceZ);
|
||||
}
|
||||
|
@ -2611,7 +2611,7 @@ static void TopToolbarToolUpdateScenery(const ScreenCoordsXY& screenPos)
|
|||
MapInvalidateSelectionRect();
|
||||
MapInvalidateMapSelectionTiles();
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off)
|
||||
{
|
||||
VirtualFloorInvalidate();
|
||||
}
|
||||
|
@ -3372,7 +3372,7 @@ static void TopToolbarInitFastforwardMenu(rct_window* w, rct_widget* widget)
|
|||
gDropdownItems[1].Format = STR_TOGGLE_OPTION;
|
||||
gDropdownItems[2].Format = STR_TOGGLE_OPTION;
|
||||
gDropdownItems[3].Format = STR_TOGGLE_OPTION;
|
||||
if (gConfigGeneral.debugging_tools)
|
||||
if (gConfigGeneral.DebuggingTools)
|
||||
{
|
||||
gDropdownItems[4].Format = STR_EMPTY;
|
||||
gDropdownItems[5].Format = STR_TOGGLE_OPTION;
|
||||
|
@ -3399,7 +3399,7 @@ static void TopToolbarInitFastforwardMenu(rct_window* w, rct_widget* widget)
|
|||
Dropdown::SetChecked(5, true);
|
||||
}
|
||||
|
||||
if (gConfigGeneral.debugging_tools)
|
||||
if (gConfigGeneral.DebuggingTools)
|
||||
{
|
||||
gDropdownDefaultIndex = (gGameSpeed == 8 ? 0 : gGameSpeed);
|
||||
}
|
||||
|
@ -3665,7 +3665,7 @@ static void TopToolbarInitViewMenu(rct_window* w, rct_widget* widget)
|
|||
rct_viewport* mainViewport = window_get_main()->viewport;
|
||||
if (mainViewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
|
||||
Dropdown::SetChecked(DDIDX_UNDERGROUND_INSIDE, true);
|
||||
if (gConfigGeneral.transparent_water)
|
||||
if (gConfigGeneral.TransparentWater)
|
||||
Dropdown::SetChecked(DDIDX_TRANSPARENT_WATER, true);
|
||||
if (mainViewport->flags & VIEWPORT_FLAG_HIDE_BASE)
|
||||
Dropdown::SetChecked(DDIDX_HIDE_BASE, true);
|
||||
|
@ -3722,8 +3722,8 @@ static void TopToolbarViewMenuDropdown(int16_t dropdownIndex)
|
|||
w->viewport->flags ^= VIEWPORT_FLAG_UNDERGROUND_INSIDE;
|
||||
break;
|
||||
case DDIDX_TRANSPARENT_WATER:
|
||||
gConfigGeneral.transparent_water ^= 1;
|
||||
config_save_default();
|
||||
gConfigGeneral.TransparentWater ^= 1;
|
||||
ConfigSaveDefault();
|
||||
break;
|
||||
case DDIDX_HIDE_BASE:
|
||||
w->viewport->flags ^= VIEWPORT_FLAG_HIDE_BASE;
|
||||
|
|
|
@ -407,7 +407,7 @@ public:
|
|||
}
|
||||
|
||||
// When debugging tools are on, shift everything up a bit to make room for displaying the path.
|
||||
const int32_t bottomMargin = gConfigGeneral.debugging_tools ? (WINDOW_PADDING + DEBUG_PATH_HEIGHT) : WINDOW_PADDING;
|
||||
const int32_t bottomMargin = gConfigGeneral.DebuggingTools ? (WINDOW_PADDING + DEBUG_PATH_HEIGHT) : WINDOW_PADDING;
|
||||
window_track_list_widgets[WIDX_TRACK_LIST].bottom = height - bottomMargin;
|
||||
window_track_list_widgets[WIDX_ROTATE].bottom = height - bottomMargin;
|
||||
window_track_list_widgets[WIDX_ROTATE].top = window_track_list_widgets[WIDX_ROTATE].bottom
|
||||
|
@ -461,7 +461,7 @@ public:
|
|||
u8string path = _trackDesigns[trackIndex].path;
|
||||
|
||||
// Show track file path (in debug mode)
|
||||
if (gConfigGeneral.debugging_tools)
|
||||
if (gConfigGeneral.DebuggingTools)
|
||||
{
|
||||
utf8 pathBuffer[MAX_PATH];
|
||||
const utf8* pathPtr = pathBuffer;
|
||||
|
|
|
@ -234,13 +234,13 @@ private:
|
|||
|
||||
void SaveInConfig(uint32_t wflags)
|
||||
{
|
||||
gConfigGeneral.invisible_rides = wflags & VIEWPORT_FLAG_INVISIBLE_RIDES;
|
||||
gConfigGeneral.invisible_vehicles = wflags & VIEWPORT_FLAG_INVISIBLE_VEHICLES;
|
||||
gConfigGeneral.invisible_scenery = wflags & VIEWPORT_FLAG_INVISIBLE_SCENERY;
|
||||
gConfigGeneral.invisible_trees = wflags & VIEWPORT_FLAG_INVISIBLE_VEGETATION;
|
||||
gConfigGeneral.invisible_paths = wflags & VIEWPORT_FLAG_INVISIBLE_PATHS;
|
||||
gConfigGeneral.invisible_supports = wflags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS;
|
||||
config_save_default();
|
||||
gConfigGeneral.InvisibleRides = wflags & VIEWPORT_FLAG_INVISIBLE_RIDES;
|
||||
gConfigGeneral.InvisibleVehicles = wflags & VIEWPORT_FLAG_INVISIBLE_VEHICLES;
|
||||
gConfigGeneral.InvisibleScenery = wflags & VIEWPORT_FLAG_INVISIBLE_SCENERY;
|
||||
gConfigGeneral.InvisibleTrees = wflags & VIEWPORT_FLAG_INVISIBLE_VEGETATION;
|
||||
gConfigGeneral.InvisiblePaths = wflags & VIEWPORT_FLAG_INVISIBLE_PATHS;
|
||||
gConfigGeneral.InvisibleSupports = wflags & VIEWPORT_FLAG_INVISIBLE_SUPPORTS;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ public:
|
|||
case DisplayType::DisplayUnits:
|
||||
{
|
||||
// Print the value in the configured height label type:
|
||||
if (gConfigGeneral.show_height_as_units)
|
||||
if (gConfigGeneral.ShowHeightAsUnits)
|
||||
{
|
||||
// Height label is Units.
|
||||
auto ft = Formatter();
|
||||
|
@ -311,7 +311,7 @@ public:
|
|||
{
|
||||
// Height label is Real Values.
|
||||
// Print the value in the configured measurement units.
|
||||
switch (gConfigGeneral.measurement_format)
|
||||
switch (gConfigGeneral.MeasurementFormat)
|
||||
{
|
||||
case MeasurementFormat::Metric:
|
||||
case MeasurementFormat::SI:
|
||||
|
|
|
@ -152,7 +152,7 @@ void AssetPackManager::LoadEnabledAssetPacks()
|
|||
{
|
||||
// Re-order asset packs
|
||||
std::vector<std::unique_ptr<AssetPack>> newAssetPacks;
|
||||
EnumerateCommaSeparatedList(gConfigGeneral.asset_pack_order, [&](std::string_view id) {
|
||||
EnumerateCommaSeparatedList(gConfigGeneral.AssetPackOrder, [&](std::string_view id) {
|
||||
auto index = GetAssetPackIndex(id);
|
||||
if (index != std::numeric_limits<size_t>::max())
|
||||
{
|
||||
|
@ -169,7 +169,7 @@ void AssetPackManager::LoadEnabledAssetPacks()
|
|||
_assetPacks = std::move(newAssetPacks);
|
||||
|
||||
// Set which asset packs are enabled
|
||||
EnumerateCommaSeparatedList(gConfigGeneral.enabled_asset_packs, [&](std::string_view id) {
|
||||
EnumerateCommaSeparatedList(gConfigGeneral.EnabledAssetPacks, [&](std::string_view id) {
|
||||
auto assetPack = GetAssetPack(id);
|
||||
if (assetPack != nullptr)
|
||||
{
|
||||
|
@ -196,7 +196,7 @@ void AssetPackManager::SaveEnabledAssetPacks()
|
|||
orderList.pop_back();
|
||||
if (enabledList.size() > 0)
|
||||
enabledList.pop_back();
|
||||
gConfigGeneral.asset_pack_order = orderList;
|
||||
gConfigGeneral.enabled_asset_packs = enabledList;
|
||||
config_save_default();
|
||||
gConfigGeneral.AssetPackOrder = orderList;
|
||||
gConfigGeneral.EnabledAssetPacks = enabledList;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ namespace OpenRCT2
|
|||
gfx_unload_g2();
|
||||
gfx_unload_g1();
|
||||
Audio::Close();
|
||||
config_release();
|
||||
ConfigRelease();
|
||||
|
||||
Instance = nullptr;
|
||||
}
|
||||
|
@ -337,20 +337,20 @@ namespace OpenRCT2
|
|||
|
||||
crash_init();
|
||||
|
||||
if (String::Equals(gConfigGeneral.last_run_version, OPENRCT2_VERSION))
|
||||
if (String::Equals(gConfigGeneral.LastRunVersion, OPENRCT2_VERSION))
|
||||
{
|
||||
gOpenRCT2ShowChangelog = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
gOpenRCT2ShowChangelog = true;
|
||||
gConfigGeneral.last_run_version = OPENRCT2_VERSION;
|
||||
config_save_default();
|
||||
gConfigGeneral.LastRunVersion = OPENRCT2_VERSION;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_localisationService->OpenLanguage(gConfigGeneral.language);
|
||||
_localisationService->OpenLanguage(gConfigGeneral.Language);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
|
@ -459,7 +459,7 @@ namespace OpenRCT2
|
|||
Init();
|
||||
PopulateDevices();
|
||||
InitRideSoundsAndInfo();
|
||||
gGameSoundsOff = !gConfigSound.master_sound_enabled;
|
||||
gGameSoundsOff = !gConfigSound.MasterSoundEnabled;
|
||||
}
|
||||
|
||||
chat_init();
|
||||
|
@ -494,7 +494,7 @@ namespace OpenRCT2
|
|||
{
|
||||
assert(_drawingEngine == nullptr);
|
||||
|
||||
_drawingEngineType = gConfigGeneral.drawing_engine;
|
||||
_drawingEngineType = gConfigGeneral.DrawingEngine;
|
||||
|
||||
auto drawingEngineFactory = _uiContext->GetDrawingEngineFactory();
|
||||
auto drawingEngine = drawingEngineFactory->Create(_drawingEngineType, _uiContext);
|
||||
|
@ -512,8 +512,8 @@ namespace OpenRCT2
|
|||
log_error("Unable to create drawing engine. Falling back to software.");
|
||||
|
||||
// Fallback to software
|
||||
gConfigGeneral.drawing_engine = DrawingEngine::Software;
|
||||
config_save_default();
|
||||
gConfigGeneral.DrawingEngine = DrawingEngine::Software;
|
||||
ConfigSaveDefault();
|
||||
drawing_engine_init();
|
||||
}
|
||||
}
|
||||
|
@ -522,7 +522,7 @@ namespace OpenRCT2
|
|||
try
|
||||
{
|
||||
drawingEngine->Initialise();
|
||||
drawingEngine->SetVSync(gConfigGeneral.use_vsync);
|
||||
drawingEngine->SetVSync(gConfigGeneral.UseVSync);
|
||||
_drawingEngine = std::move(drawingEngine);
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
|
@ -540,8 +540,8 @@ namespace OpenRCT2
|
|||
log_error("Unable to initialise drawing engine. Falling back to software.");
|
||||
|
||||
// Fallback to software
|
||||
gConfigGeneral.drawing_engine = DrawingEngine::Software;
|
||||
config_save_default();
|
||||
gConfigGeneral.DrawingEngine = DrawingEngine::Software;
|
||||
ConfigSaveDefault();
|
||||
drawing_engine_init();
|
||||
}
|
||||
}
|
||||
|
@ -690,7 +690,7 @@ namespace OpenRCT2
|
|||
}
|
||||
// This ensures that the newly loaded save reflects the user's
|
||||
// 'show real names of guests' option, now that it's a global setting
|
||||
peep_update_names(gConfigGeneral.show_real_names_of_guests);
|
||||
peep_update_names(gConfigGeneral.ShowRealNamesOfGuests);
|
||||
#ifndef DISABLE_NETWORK
|
||||
if (sendMap)
|
||||
{
|
||||
|
@ -812,19 +812,19 @@ namespace OpenRCT2
|
|||
if (gCustomRCT2DataPath.empty())
|
||||
{
|
||||
// Check install directory
|
||||
if (gConfigGeneral.rct2_path.empty() || !Platform::OriginalGameDataExists(gConfigGeneral.rct2_path))
|
||||
if (gConfigGeneral.RCT2Path.empty() || !Platform::OriginalGameDataExists(gConfigGeneral.RCT2Path))
|
||||
{
|
||||
log_verbose(
|
||||
"install directory does not exist or invalid directory selected, %s", gConfigGeneral.rct2_path.c_str());
|
||||
if (!config_find_or_browse_install_directory())
|
||||
"install directory does not exist or invalid directory selected, %s", gConfigGeneral.RCT2Path.c_str());
|
||||
if (!ConfigFindOrBrowseInstallDirectory())
|
||||
{
|
||||
auto path = config_get_default_path();
|
||||
auto path = ConfigGetDefaultPath();
|
||||
Console::Error::WriteLine(
|
||||
"An RCT2 install directory must be specified! Please edit \"game_path\" in %s.\n", path.c_str());
|
||||
return std::string();
|
||||
}
|
||||
}
|
||||
result = gConfigGeneral.rct2_path;
|
||||
result = gConfigGeneral.RCT2Path;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -872,7 +872,7 @@ namespace OpenRCT2
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((gOpenRCT2StartupAction == StartupAction::Title) && gConfigGeneral.play_intro)
|
||||
if ((gOpenRCT2StartupAction == StartupAction::Title) && gConfigGeneral.PlayIntro)
|
||||
{
|
||||
gOpenRCT2StartupAction = StartupAction::Intro;
|
||||
}
|
||||
|
@ -936,17 +936,17 @@ namespace OpenRCT2
|
|||
{
|
||||
if (gNetworkStartPort == 0)
|
||||
{
|
||||
gNetworkStartPort = gConfigNetwork.default_port;
|
||||
gNetworkStartPort = gConfigNetwork.DefaultPort;
|
||||
}
|
||||
|
||||
if (gNetworkStartAddress.empty())
|
||||
{
|
||||
gNetworkStartAddress = gConfigNetwork.listen_address;
|
||||
gNetworkStartAddress = gConfigNetwork.ListenAddress;
|
||||
}
|
||||
|
||||
if (gCustomPassword.empty())
|
||||
{
|
||||
_network.SetPassword(gConfigNetwork.default_password.c_str());
|
||||
_network.SetPassword(gConfigNetwork.DefaultPassword.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -981,7 +981,7 @@ namespace OpenRCT2
|
|||
{
|
||||
if (gNetworkStartPort == 0)
|
||||
{
|
||||
gNetworkStartPort = gConfigNetwork.default_port;
|
||||
gNetworkStartPort = gConfigNetwork.DefaultPort;
|
||||
}
|
||||
_network.BeginClient(gNetworkStartHost, gNetworkStartPort);
|
||||
}
|
||||
|
@ -1004,7 +1004,7 @@ namespace OpenRCT2
|
|||
{
|
||||
if (!ShouldDraw())
|
||||
return false;
|
||||
if (!gConfigGeneral.uncap_fps)
|
||||
if (!gConfigGeneral.UncapFPS)
|
||||
return false;
|
||||
if (gGameSpeed > 4)
|
||||
return false;
|
||||
|
@ -1382,7 +1382,7 @@ void context_setcurrentcursor(CursorID cursor)
|
|||
|
||||
void context_update_cursor_scale()
|
||||
{
|
||||
GetContext()->GetUiContext()->SetCursorScale(static_cast<uint8_t>(std::round(gConfigGeneral.window_scale)));
|
||||
GetContext()->GetUiContext()->SetCursorScale(static_cast<uint8_t>(std::round(gConfigGeneral.WindowScale)));
|
||||
}
|
||||
|
||||
void context_hide_cursor()
|
||||
|
@ -1404,8 +1404,8 @@ ScreenCoordsXY context_get_cursor_position_scaled()
|
|||
{
|
||||
auto cursorCoords = context_get_cursor_position();
|
||||
// Compensate for window scaling.
|
||||
return { static_cast<int32_t>(std::ceil(cursorCoords.x / gConfigGeneral.window_scale)),
|
||||
static_cast<int32_t>(std::ceil(cursorCoords.y / gConfigGeneral.window_scale)) };
|
||||
return { static_cast<int32_t>(std::ceil(cursorCoords.x / gConfigGeneral.WindowScale)),
|
||||
static_cast<int32_t>(std::ceil(cursorCoords.y / gConfigGeneral.WindowScale)) };
|
||||
}
|
||||
|
||||
void context_set_cursor_position(const ScreenCoordsXY& cursorPosition)
|
||||
|
|
|
@ -102,7 +102,7 @@ void game_reset_speed()
|
|||
|
||||
void game_increase_game_speed()
|
||||
{
|
||||
gGameSpeed = std::min(gConfigGeneral.debugging_tools ? 5 : 4, gGameSpeed + 1);
|
||||
gGameSpeed = std::min(gConfigGeneral.DebuggingTools ? 5 : 4, gGameSpeed + 1);
|
||||
if (gGameSpeed == 5)
|
||||
gGameSpeed = 8;
|
||||
window_invalidate_by_class(WindowClass::TopToolbar);
|
||||
|
@ -204,7 +204,7 @@ void update_palette_effects()
|
|||
|
||||
// Animate the water/lava/chain movement palette
|
||||
uint32_t shade = 0;
|
||||
if (gConfigGeneral.render_weather_gloom)
|
||||
if (gConfigGeneral.RenderWeatherGloom)
|
||||
{
|
||||
auto paletteId = ClimateGetWeatherGloomPaletteId(gClimateCurrent);
|
||||
if (paletteId != FilterPaletteID::PaletteNull)
|
||||
|
@ -593,7 +593,7 @@ void save_game_cmd(u8string_view name /* = {} */)
|
|||
void save_game_with_name(u8string_view name)
|
||||
{
|
||||
log_verbose("Saving to %s", u8string(name).c_str());
|
||||
if (scenario_save(name, gConfigGeneral.save_plugin_data ? 1 : 0))
|
||||
if (scenario_save(name, gConfigGeneral.SavePluginData ? 1 : 0))
|
||||
{
|
||||
log_verbose("Saved to %s", u8string(name).c_str());
|
||||
gCurrentLoadedPath = name;
|
||||
|
@ -699,7 +699,7 @@ void game_autosave()
|
|||
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 = gConfigGeneral.autosave_amount;
|
||||
int32_t autosavesToKeep = gConfigGeneral.AutosaveAmount;
|
||||
limit_autosave_count(autosavesToKeep - 1, (gScreenFlags & SCREEN_FLAGS_EDITOR));
|
||||
|
||||
auto env = GetContext()->GetPlatformEnvironment();
|
||||
|
|
|
@ -141,7 +141,7 @@ void GameState::Tick()
|
|||
}
|
||||
|
||||
bool isPaused = game_is_paused();
|
||||
if (network_get_mode() == NETWORK_MODE_SERVER && gConfigNetwork.pause_server_if_no_clients)
|
||||
if (network_get_mode() == NETWORK_MODE_SERVER && gConfigNetwork.PauseServerIfNoClients)
|
||||
{
|
||||
// If we are headless we always have 1 player (host), pause if no one else is around.
|
||||
if (gOpenRCT2Headless && network_get_num_players() == 1)
|
||||
|
|
|
@ -205,18 +205,18 @@ std::unique_ptr<IPlatformEnvironment> OpenRCT2::CreatePlatformEnvironment()
|
|||
|
||||
// Now load the config so we can get the RCT1 and RCT2 paths
|
||||
auto configPath = env->GetFilePath(PATHID::CONFIG);
|
||||
config_set_defaults();
|
||||
if (!config_open(configPath))
|
||||
ConfigSetDefaults();
|
||||
if (!ConfigOpen(configPath))
|
||||
{
|
||||
config_save(configPath);
|
||||
ConfigSave(configPath);
|
||||
}
|
||||
if (gCustomRCT1DataPath.empty())
|
||||
{
|
||||
env->SetBasePath(DIRBASE::RCT1, gConfigGeneral.rct1_path);
|
||||
env->SetBasePath(DIRBASE::RCT1, gConfigGeneral.RCT1Path);
|
||||
}
|
||||
if (gCustomRCT2DataPath.empty())
|
||||
{
|
||||
env->SetBasePath(DIRBASE::RCT2, gConfigGeneral.rct2_path);
|
||||
env->SetBasePath(DIRBASE::RCT2, gConfigGeneral.RCT2Path);
|
||||
}
|
||||
|
||||
// Log base paths
|
||||
|
|
|
@ -655,7 +655,7 @@ namespace OpenRCT2
|
|||
{
|
||||
serialiser << _guestGenerationProbability;
|
||||
serialiser << _suggestedGuestMaximum;
|
||||
serialiser << gConfigGeneral.show_real_names_of_guests;
|
||||
serialiser << gConfigGeneral.ShowRealNamesOfGuests;
|
||||
|
||||
// To make this a little bit less volatile against updates
|
||||
// we reserve some space for future additions.
|
||||
|
|
|
@ -61,7 +61,7 @@ NewVersionInfo get_latest_version()
|
|||
NewVersionInfo verinfo{ tag, "", "", "" };
|
||||
#ifndef DISABLE_HTTP
|
||||
auto now = std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count();
|
||||
auto then = gConfigGeneral.last_version_check_time;
|
||||
auto then = gConfigGeneral.LastVersionCheckTime;
|
||||
if (then < now - 24 * 60 * 60)
|
||||
{
|
||||
Http::Request request;
|
||||
|
@ -88,8 +88,8 @@ NewVersionInfo get_latest_version()
|
|||
verinfo.changelog = Json::GetString(root["body"]);
|
||||
verinfo.url = Json::GetString(root["html_url"]);
|
||||
|
||||
gConfigGeneral.last_version_check_time = now;
|
||||
config_save_default();
|
||||
gConfigGeneral.LastVersionCheckTime = now;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
#endif
|
||||
return verinfo;
|
||||
|
|
|
@ -250,7 +250,7 @@ GameActions::Result SetCheatAction::Execute() const
|
|||
|
||||
if (network_get_mode() == NETWORK_MODE_NONE)
|
||||
{
|
||||
config_save_default();
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
|
||||
window_invalidate_by_class(WindowClass::Cheats);
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace OpenRCT2::Audio
|
|||
return false;
|
||||
if (gGameSoundsOff)
|
||||
return false;
|
||||
if (!gConfigSound.sound_enabled)
|
||||
if (!gConfigSound.SoundEnabled)
|
||||
return false;
|
||||
if (gOpenRCT2Headless)
|
||||
return false;
|
||||
|
@ -75,19 +75,19 @@ namespace OpenRCT2::Audio
|
|||
void Init()
|
||||
{
|
||||
auto audioContext = GetContext()->GetAudioContext();
|
||||
if (gConfigSound.device.empty())
|
||||
if (gConfigSound.Device.empty())
|
||||
{
|
||||
audioContext->SetOutputDevice("");
|
||||
_currentAudioDevice = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
audioContext->SetOutputDevice(gConfigSound.device);
|
||||
audioContext->SetOutputDevice(gConfigSound.Device);
|
||||
|
||||
PopulateDevices();
|
||||
for (int32_t i = 0; i < GetDeviceCount(); i++)
|
||||
{
|
||||
if (_audioDevices[i] == gConfigSound.device)
|
||||
if (_audioDevices[i] == gConfigSound.Device)
|
||||
{
|
||||
_currentAudioDevice = i;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ namespace OpenRCT2::Audio
|
|||
|
||||
static ObjectEntryDescriptor GetTitleMusicDescriptor()
|
||||
{
|
||||
switch (gConfigSound.title_music)
|
||||
switch (gConfigSound.TitleMusic)
|
||||
{
|
||||
default:
|
||||
return {};
|
||||
|
@ -365,7 +365,7 @@ namespace OpenRCT2::Audio
|
|||
}
|
||||
|
||||
_currentAudioDevice = device;
|
||||
config_save_default();
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
|
||||
void Close()
|
||||
|
@ -379,8 +379,8 @@ namespace OpenRCT2::Audio
|
|||
|
||||
void ToggleAllSounds()
|
||||
{
|
||||
gConfigSound.master_sound_enabled = !gConfigSound.master_sound_enabled;
|
||||
if (gConfigSound.master_sound_enabled)
|
||||
gConfigSound.MasterSoundEnabled = !gConfigSound.MasterSoundEnabled;
|
||||
if (gConfigSound.MasterSoundEnabled)
|
||||
{
|
||||
Resume();
|
||||
PlayTitleMusic();
|
||||
|
|
|
@ -368,10 +368,10 @@ static exitcode_t HandleCommandSetRCT2(CommandLineArgEnumerator* enumerator)
|
|||
// Update RCT2 path in config
|
||||
auto env = OpenRCT2::CreatePlatformEnvironment();
|
||||
auto configPath = env->GetFilePath(OpenRCT2::PATHID::CONFIG);
|
||||
config_set_defaults();
|
||||
config_open(configPath);
|
||||
gConfigGeneral.rct2_path = path;
|
||||
if (config_save(configPath))
|
||||
ConfigSetDefaults();
|
||||
ConfigOpen(configPath);
|
||||
gConfigGeneral.RCT2Path = path;
|
||||
if (ConfigSave(configPath))
|
||||
{
|
||||
Console::WriteFormat("Updating RCT2 path to '%s'.", path.c_str());
|
||||
Console::WriteLine();
|
||||
|
@ -397,7 +397,7 @@ static exitcode_t HandleCommandScanObjects([[maybe_unused]] CommandLineArgEnumer
|
|||
auto context = OpenRCT2::CreateContext();
|
||||
auto env = context->GetPlatformEnvironment();
|
||||
auto objectRepository = CreateObjectRepository(env);
|
||||
objectRepository->Construct(gConfigGeneral.language);
|
||||
objectRepository->Construct(gConfigGeneral.Language);
|
||||
return EXITCODE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -138,94 +138,94 @@ namespace Config
|
|||
if (reader->ReadSection("general"))
|
||||
{
|
||||
auto model = &gConfigGeneral;
|
||||
model->always_show_gridlines = reader->GetBoolean("always_show_gridlines", false);
|
||||
model->autosave_frequency = reader->GetInt32("autosave", AUTOSAVE_EVERY_5MINUTES);
|
||||
model->autosave_amount = reader->GetInt32("autosave_amount", DEFAULT_NUM_AUTOSAVES_TO_KEEP);
|
||||
model->confirmation_prompt = reader->GetBoolean("confirmation_prompt", false);
|
||||
model->currency_format = 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", DEFAULT_NUM_AUTOSAVES_TO_KEEP);
|
||||
model->ConfirmationPrompt = reader->GetBoolean("confirmation_prompt", false);
|
||||
model->CurrencyFormat = reader->GetEnum<CurrencyType>(
|
||||
"currency_format", Platform::GetLocaleCurrency(), Enum_Currency);
|
||||
model->custom_currency_rate = reader->GetInt32("custom_currency_rate", 10);
|
||||
model->custom_currency_affix = reader->GetEnum<CurrencyAffix>(
|
||||
model->CustomCurrencyRate = reader->GetInt32("custom_currency_rate", 10);
|
||||
model->CustomCurrencyAffix = reader->GetEnum<CurrencyAffix>(
|
||||
"custom_currency_affix", CurrencyAffix::Suffix, Enum_CurrencySymbolAffix);
|
||||
model->custom_currency_symbol = reader->GetCString("custom_currency_symbol", "Ctm");
|
||||
model->edge_scrolling = reader->GetBoolean("edge_scrolling", true);
|
||||
model->edge_scrolling_speed = reader->GetInt32("edge_scrolling_speed", 12);
|
||||
model->fullscreen_mode = reader->GetInt32("fullscreen_mode", 0);
|
||||
model->fullscreen_height = reader->GetInt32("fullscreen_height", -1);
|
||||
model->fullscreen_width = reader->GetInt32("fullscreen_width", -1);
|
||||
model->rct1_path = reader->GetString("rct1_path", "");
|
||||
model->rct2_path = reader->GetString("game_path", "");
|
||||
model->landscape_smoothing = reader->GetBoolean("landscape_smoothing", true);
|
||||
model->language = reader->GetEnum<int32_t>("language", Platform::GetLocaleLanguage(), Enum_LanguageEnum);
|
||||
model->measurement_format = reader->GetEnum<MeasurementFormat>(
|
||||
model->CustomCurrencySymbol = reader->GetCString("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->play_intro = reader->GetBoolean("play_intro", false);
|
||||
model->save_plugin_data = reader->GetBoolean("save_plugin_data", true);
|
||||
model->debugging_tools = reader->GetBoolean("debugging_tools", false);
|
||||
model->show_height_as_units = reader->GetBoolean("show_height_as_units", false);
|
||||
model->temperature_format = 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->window_height = reader->GetInt32("window_height", -1);
|
||||
model->window_snap_proximity = reader->GetInt32("window_snap_proximity", 5);
|
||||
model->window_width = reader->GetInt32("window_width", -1);
|
||||
model->default_display = reader->GetInt32("default_display", 0);
|
||||
model->drawing_engine = 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::Software, Enum_DrawingEngine);
|
||||
model->uncap_fps = reader->GetBoolean("uncap_fps", false);
|
||||
model->use_vsync = reader->GetBoolean("use_vsync", true);
|
||||
model->virtual_floor_style = 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->date_format = reader->GetEnum<int32_t>("date_format", Platform::GetLocaleDateFormat(), Enum_DateFormat);
|
||||
model->auto_staff_placement = reader->GetBoolean("auto_staff", true);
|
||||
model->handymen_mow_default = reader->GetBoolean("handymen_mow_default", false);
|
||||
model->default_inspection_interval = reader->GetInt32("default_inspection_interval", 2);
|
||||
model->last_run_version = reader->GetString("last_run_version", "");
|
||||
model->invert_viewport_drag = reader->GetBoolean("invert_viewport_drag", false);
|
||||
model->load_save_sort = reader->GetEnum<Sort>("load_save_sort", Sort::NameAscending, Enum_Sort);
|
||||
model->minimize_fullscreen_focus_loss = reader->GetBoolean("minimize_fullscreen_focus_loss", true);
|
||||
model->disable_screensaver = reader->GetBoolean("disable_screensaver", true);
|
||||
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<Sort>("load_save_sort", Sort::NameAscending, Enum_Sort);
|
||||
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->day_night_cycle = reader->GetBoolean("day_night_cycle", false);
|
||||
const bool isHardware = model->drawing_engine != DrawingEngine::Software;
|
||||
model->enable_light_fx = isHardware && reader->GetBoolean("enable_light_fx", false);
|
||||
model->enable_light_fx_for_vehicles = isHardware && reader->GetBoolean("enable_light_fx_for_vehicles", false);
|
||||
model->upper_case_banners = reader->GetBoolean("upper_case_banners", false);
|
||||
model->disable_lightning_effect = reader->GetBoolean("disable_lightning_effect", false);
|
||||
model->steam_overlay_pause = reader->GetBoolean("steam_overlay_pause", true);
|
||||
model->window_scale = reader->GetFloat("window_scale", Platform::GetDefaultScale());
|
||||
model->show_fps = reader->GetBoolean("show_fps", false);
|
||||
model->multithreading = reader->GetBoolean("multi_threading", false);
|
||||
model->trap_cursor = reader->GetBoolean("trap_cursor", false);
|
||||
model->auto_open_shops = reader->GetBoolean("auto_open_shops", false);
|
||||
model->scenario_select_mode = reader->GetInt32("scenario_select_mode", SCENARIO_SELECT_MODE_ORIGIN);
|
||||
model->scenario_unlocking_enabled = reader->GetBoolean("scenario_unlocking_enabled", true);
|
||||
model->scenario_hide_mega_park = reader->GetBoolean("scenario_hide_mega_park", true);
|
||||
model->last_save_game_directory = reader->GetString("last_game_directory", "");
|
||||
model->last_save_landscape_directory = reader->GetString("last_landscape_directory", "");
|
||||
model->last_save_scenario_directory = reader->GetString("last_scenario_directory", "");
|
||||
model->last_save_track_directory = reader->GetString("last_track_directory", "");
|
||||
model->use_native_browse_dialog = reader->GetBoolean("use_native_browse_dialog", false);
|
||||
model->window_limit = reader->GetInt32("window_limit", WINDOW_LIMIT_MAX);
|
||||
model->zoom_to_cursor = reader->GetBoolean("zoom_to_cursor", true);
|
||||
model->render_weather_effects = reader->GetBoolean("render_weather_effects", true);
|
||||
model->render_weather_gloom = reader->GetBoolean("render_weather_gloom", true);
|
||||
model->show_guest_purchases = reader->GetBoolean("show_guest_purchases", false);
|
||||
model->show_real_names_of_guests = reader->GetBoolean("show_real_names_of_guests", true);
|
||||
model->allow_early_completion = reader->GetBoolean("allow_early_completion", false);
|
||||
model->asset_pack_order = reader->GetString("asset_pack_order", "");
|
||||
model->enabled_asset_packs = reader->GetString("enabled_asset_packs", "");
|
||||
model->transparent_screenshot = reader->GetBoolean("transparent_screenshot", true);
|
||||
model->transparent_water = reader->GetBoolean("transparent_water", true);
|
||||
model->DayNightCycle = reader->GetBoolean("day_night_cycle", false);
|
||||
const bool isHardware = model->DrawingEngine != DrawingEngine::Software;
|
||||
model->EnableLightFx = isHardware && reader->GetBoolean("enable_light_fx", false);
|
||||
model->EnableLightFxForVehicles = isHardware && 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->SteamOverlayPause = reader->GetBoolean("steam_overlay_pause", true);
|
||||
model->WindowScale = reader->GetFloat("window_scale", Platform::GetDefaultScale());
|
||||
model->ShowFPS = reader->GetBoolean("show_fps", false);
|
||||
model->MultiThreading = reader->GetBoolean("multi_threading", false);
|
||||
model->TrapCursor = reader->GetBoolean("trap_cursor", false);
|
||||
model->AutoOpenShops = reader->GetBoolean("auto_open_shops", false);
|
||||
model->ScenarioSelectMode = reader->GetInt32("scenario_select_mode", SCENARIO_SELECT_MODE_ORIGIN);
|
||||
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", WINDOW_LIMIT_MAX);
|
||||
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->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->invisible_rides = reader->GetBoolean("invisible_rides", false);
|
||||
model->invisible_vehicles = reader->GetBoolean("invisible_vehicles", false);
|
||||
model->invisible_trees = reader->GetBoolean("invisible_trees", false);
|
||||
model->invisible_scenery = reader->GetBoolean("invisible_scenery", false);
|
||||
model->invisible_paths = reader->GetBoolean("invisible_paths", false);
|
||||
model->invisible_supports = 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->last_version_check_time = reader->GetInt64("last_version_check_time", 0);
|
||||
model->LastVersionCheckTime = reader->GetInt64("last_version_check_time", 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -233,83 +233,83 @@ namespace Config
|
|||
{
|
||||
auto model = &gConfigGeneral;
|
||||
writer->WriteSection("general");
|
||||
writer->WriteBoolean("always_show_gridlines", model->always_show_gridlines);
|
||||
writer->WriteInt32("autosave", model->autosave_frequency);
|
||||
writer->WriteInt32("autosave_amount", model->autosave_amount);
|
||||
writer->WriteBoolean("confirmation_prompt", model->confirmation_prompt);
|
||||
writer->WriteEnum<CurrencyType>("currency_format", model->currency_format, Enum_Currency);
|
||||
writer->WriteInt32("custom_currency_rate", model->custom_currency_rate);
|
||||
writer->WriteEnum<CurrencyAffix>("custom_currency_affix", model->custom_currency_affix, Enum_CurrencySymbolAffix);
|
||||
writer->WriteString("custom_currency_symbol", model->custom_currency_symbol);
|
||||
writer->WriteBoolean("edge_scrolling", model->edge_scrolling);
|
||||
writer->WriteInt32("edge_scrolling_speed", model->edge_scrolling_speed);
|
||||
writer->WriteInt32("fullscreen_mode", model->fullscreen_mode);
|
||||
writer->WriteInt32("fullscreen_height", model->fullscreen_height);
|
||||
writer->WriteInt32("fullscreen_width", model->fullscreen_width);
|
||||
writer->WriteString("rct1_path", model->rct1_path);
|
||||
writer->WriteString("game_path", model->rct2_path);
|
||||
writer->WriteBoolean("landscape_smoothing", model->landscape_smoothing);
|
||||
writer->WriteEnum<int32_t>("language", model->language, Enum_LanguageEnum);
|
||||
writer->WriteEnum<MeasurementFormat>("measurement_format", model->measurement_format, Enum_MeasurementFormat);
|
||||
writer->WriteBoolean("play_intro", model->play_intro);
|
||||
writer->WriteBoolean("save_plugin_data", model->save_plugin_data);
|
||||
writer->WriteBoolean("debugging_tools", model->debugging_tools);
|
||||
writer->WriteBoolean("show_height_as_units", model->show_height_as_units);
|
||||
writer->WriteEnum<TemperatureUnit>("temperature_format", model->temperature_format, Enum_Temperature);
|
||||
writer->WriteInt32("window_height", model->window_height);
|
||||
writer->WriteInt32("window_snap_proximity", model->window_snap_proximity);
|
||||
writer->WriteInt32("window_width", model->window_width);
|
||||
writer->WriteInt32("default_display", model->default_display);
|
||||
writer->WriteEnum<DrawingEngine>("drawing_engine", model->drawing_engine, Enum_DrawingEngine);
|
||||
writer->WriteBoolean("uncap_fps", model->uncap_fps);
|
||||
writer->WriteBoolean("use_vsync", model->use_vsync);
|
||||
writer->WriteEnum<int32_t>("date_format", model->date_format, Enum_DateFormat);
|
||||
writer->WriteBoolean("auto_staff", model->auto_staff_placement);
|
||||
writer->WriteBoolean("handymen_mow_default", model->handymen_mow_default);
|
||||
writer->WriteInt32("default_inspection_interval", model->default_inspection_interval);
|
||||
writer->WriteString("last_run_version", model->last_run_version);
|
||||
writer->WriteBoolean("invert_viewport_drag", model->invert_viewport_drag);
|
||||
writer->WriteEnum<Sort>("load_save_sort", model->load_save_sort, Enum_Sort);
|
||||
writer->WriteBoolean("minimize_fullscreen_focus_loss", model->minimize_fullscreen_focus_loss);
|
||||
writer->WriteBoolean("disable_screensaver", model->disable_screensaver);
|
||||
writer->WriteBoolean("day_night_cycle", model->day_night_cycle);
|
||||
writer->WriteBoolean("enable_light_fx", model->enable_light_fx);
|
||||
writer->WriteBoolean("enable_light_fx_for_vehicles", model->enable_light_fx_for_vehicles);
|
||||
writer->WriteBoolean("upper_case_banners", model->upper_case_banners);
|
||||
writer->WriteBoolean("disable_lightning_effect", model->disable_lightning_effect);
|
||||
writer->WriteBoolean("steam_overlay_pause", model->steam_overlay_pause);
|
||||
writer->WriteFloat("window_scale", model->window_scale);
|
||||
writer->WriteBoolean("show_fps", model->show_fps);
|
||||
writer->WriteBoolean("multi_threading", model->multithreading);
|
||||
writer->WriteBoolean("trap_cursor", model->trap_cursor);
|
||||
writer->WriteBoolean("auto_open_shops", model->auto_open_shops);
|
||||
writer->WriteInt32("scenario_select_mode", model->scenario_select_mode);
|
||||
writer->WriteBoolean("scenario_unlocking_enabled", model->scenario_unlocking_enabled);
|
||||
writer->WriteBoolean("scenario_hide_mega_park", model->scenario_hide_mega_park);
|
||||
writer->WriteString("last_game_directory", model->last_save_game_directory);
|
||||
writer->WriteString("last_landscape_directory", model->last_save_landscape_directory);
|
||||
writer->WriteString("last_scenario_directory", model->last_save_scenario_directory);
|
||||
writer->WriteString("last_track_directory", model->last_save_track_directory);
|
||||
writer->WriteBoolean("use_native_browse_dialog", model->use_native_browse_dialog);
|
||||
writer->WriteInt32("window_limit", model->window_limit);
|
||||
writer->WriteBoolean("zoom_to_cursor", model->zoom_to_cursor);
|
||||
writer->WriteBoolean("render_weather_effects", model->render_weather_effects);
|
||||
writer->WriteBoolean("render_weather_gloom", model->render_weather_gloom);
|
||||
writer->WriteBoolean("show_guest_purchases", model->show_guest_purchases);
|
||||
writer->WriteBoolean("show_real_names_of_guests", model->show_real_names_of_guests);
|
||||
writer->WriteBoolean("allow_early_completion", model->allow_early_completion);
|
||||
writer->WriteString("asset_pack_order", model->asset_pack_order);
|
||||
writer->WriteString("enabled_asset_packs", model->enabled_asset_packs);
|
||||
writer->WriteEnum<VirtualFloorStyles>("virtual_floor_style", model->virtual_floor_style, Enum_VirtualFloorStyle);
|
||||
writer->WriteBoolean("transparent_screenshot", model->transparent_screenshot);
|
||||
writer->WriteBoolean("transparent_water", model->transparent_water);
|
||||
writer->WriteBoolean("invisible_rides", model->invisible_rides);
|
||||
writer->WriteBoolean("invisible_vehicles", model->invisible_vehicles);
|
||||
writer->WriteBoolean("invisible_trees", model->invisible_trees);
|
||||
writer->WriteBoolean("invisible_scenery", model->invisible_scenery);
|
||||
writer->WriteBoolean("invisible_paths", model->invisible_paths);
|
||||
writer->WriteBoolean("invisible_supports", model->invisible_supports);
|
||||
writer->WriteInt64("last_version_check_time", model->last_version_check_time);
|
||||
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<Sort>("load_save_sort", model->LoadSaveSort, Enum_Sort);
|
||||
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->WriteBoolean("steam_overlay_pause", model->SteamOverlayPause);
|
||||
writer->WriteFloat("window_scale", model->WindowScale);
|
||||
writer->WriteBoolean("show_fps", model->ShowFPS);
|
||||
writer->WriteBoolean("multi_threading", model->MultiThreading);
|
||||
writer->WriteBoolean("trap_cursor", model->TrapCursor);
|
||||
writer->WriteBoolean("auto_open_shops", model->AutoOpenShops);
|
||||
writer->WriteInt32("scenario_select_mode", model->ScenarioSelectMode);
|
||||
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("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);
|
||||
}
|
||||
|
||||
static void ReadInterface(IIniReader* reader)
|
||||
|
@ -317,20 +317,20 @@ namespace Config
|
|||
if (reader->ReadSection("interface"))
|
||||
{
|
||||
auto model = &gConfigInterface;
|
||||
model->toolbar_show_finances = reader->GetBoolean("toolbar_show_finances", true);
|
||||
model->toolbar_show_research = reader->GetBoolean("toolbar_show_research", true);
|
||||
model->toolbar_show_cheats = reader->GetBoolean("toolbar_show_cheats", false);
|
||||
model->toolbar_show_news = reader->GetBoolean("toolbar_show_news", false);
|
||||
model->toolbar_show_mute = reader->GetBoolean("toolbar_show_mute", false);
|
||||
model->toolbar_show_chat = reader->GetBoolean("toolbar_show_chat", false);
|
||||
model->toolbar_show_zoom = reader->GetBoolean("toolbar_show_zoom", true);
|
||||
model->console_small_font = reader->GetBoolean("console_small_font", false);
|
||||
model->current_theme_preset = reader->GetCString("current_theme", "*RCT2");
|
||||
model->current_title_sequence_preset = reader->GetCString("current_title_sequence", "*OPENRCT2");
|
||||
model->random_title_sequence = reader->GetBoolean("random_title_sequence", false);
|
||||
model->object_selection_filter_flags = reader->GetInt32("object_selection_filter_flags", 0x3FFF);
|
||||
model->scenarioselect_last_tab = reader->GetInt32("scenarioselect_last_tab", 0);
|
||||
model->list_ride_vehicles_separately = reader->GetBoolean("list_ride_vehicles_separately", 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->ConsoleSmallFont = reader->GetBoolean("console_small_font", false);
|
||||
model->CurrentThemePreset = reader->GetCString("current_theme", "*RCT2");
|
||||
model->CurrentTitleSequencePreset = reader->GetCString("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->ListRideVehiclesSeparately = reader->GetBoolean("list_ride_vehicles_separately", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,20 +338,20 @@ namespace Config
|
|||
{
|
||||
auto model = &gConfigInterface;
|
||||
writer->WriteSection("interface");
|
||||
writer->WriteBoolean("toolbar_show_finances", model->toolbar_show_finances);
|
||||
writer->WriteBoolean("toolbar_show_research", model->toolbar_show_research);
|
||||
writer->WriteBoolean("toolbar_show_cheats", model->toolbar_show_cheats);
|
||||
writer->WriteBoolean("toolbar_show_news", model->toolbar_show_news);
|
||||
writer->WriteBoolean("toolbar_show_mute", model->toolbar_show_mute);
|
||||
writer->WriteBoolean("toolbar_show_chat", model->toolbar_show_chat);
|
||||
writer->WriteBoolean("toolbar_show_zoom", model->toolbar_show_zoom);
|
||||
writer->WriteBoolean("console_small_font", model->console_small_font);
|
||||
writer->WriteString("current_theme", model->current_theme_preset);
|
||||
writer->WriteString("current_title_sequence", model->current_title_sequence_preset);
|
||||
writer->WriteBoolean("random_title_sequence", model->random_title_sequence);
|
||||
writer->WriteInt32("object_selection_filter_flags", model->object_selection_filter_flags);
|
||||
writer->WriteInt32("scenarioselect_last_tab", model->scenarioselect_last_tab);
|
||||
writer->WriteBoolean("list_ride_vehicles_separately", model->list_ride_vehicles_separately);
|
||||
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("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("list_ride_vehicles_separately", model->ListRideVehiclesSeparately);
|
||||
}
|
||||
|
||||
static void ReadSound(IIniReader* reader)
|
||||
|
@ -359,14 +359,14 @@ namespace Config
|
|||
if (reader->ReadSection("sound"))
|
||||
{
|
||||
auto model = &gConfigSound;
|
||||
model->device = reader->GetString("audio_device", "");
|
||||
model->master_sound_enabled = reader->GetBoolean("master_sound", true);
|
||||
model->master_volume = reader->GetInt32("master_volume", 100);
|
||||
model->title_music = static_cast<TitleMusicKind>(reader->GetInt32("title_music", EnumValue(TitleMusicKind::Rct2)));
|
||||
model->sound_enabled = reader->GetBoolean("sound", true);
|
||||
model->sound_volume = reader->GetInt32("sound_volume", 100);
|
||||
model->ride_music_enabled = reader->GetBoolean("ride_music", true);
|
||||
model->ride_music_volume = reader->GetInt32("ride_music_volume", 100);
|
||||
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_music", EnumValue(TitleMusicKind::Rct2)));
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -375,14 +375,14 @@ namespace Config
|
|||
{
|
||||
auto model = &gConfigSound;
|
||||
writer->WriteSection("sound");
|
||||
writer->WriteString("audio_device", model->device);
|
||||
writer->WriteBoolean("master_sound", model->master_sound_enabled);
|
||||
writer->WriteInt32("master_volume", model->master_volume);
|
||||
writer->WriteInt32("title_music", EnumValue(model->title_music));
|
||||
writer->WriteBoolean("sound", model->sound_enabled);
|
||||
writer->WriteInt32("sound_volume", model->sound_volume);
|
||||
writer->WriteBoolean("ride_music", model->ride_music_enabled);
|
||||
writer->WriteInt32("ride_music_volume", model->ride_music_volume);
|
||||
writer->WriteString("audio_device", model->Device);
|
||||
writer->WriteBoolean("master_sound", model->MasterSoundEnabled);
|
||||
writer->WriteInt32("master_volume", model->MasterVolume);
|
||||
writer->WriteInt32("title_music", 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);
|
||||
}
|
||||
|
||||
|
@ -407,26 +407,26 @@ namespace Config
|
|||
playerName = String::Trim(playerName);
|
||||
|
||||
auto model = &gConfigNetwork;
|
||||
model->player_name = std::move(playerName);
|
||||
model->default_port = reader->GetInt32("default_port", NETWORK_DEFAULT_PORT);
|
||||
model->listen_address = reader->GetString("listen_address", "");
|
||||
model->default_password = reader->GetString("default_password", "");
|
||||
model->stay_connected = reader->GetBoolean("stay_connected", true);
|
||||
model->advertise = reader->GetBoolean("advertise", true);
|
||||
model->advertise_address = reader->GetString("advertise_address", "");
|
||||
model->maxplayers = reader->GetInt32("maxplayers", 16);
|
||||
model->server_name = reader->GetString("server_name", "Server");
|
||||
model->server_description = reader->GetString("server_description", "");
|
||||
model->server_greeting = reader->GetString("server_greeting", "");
|
||||
model->master_server_url = reader->GetString("master_server_url", "");
|
||||
model->provider_name = reader->GetString("provider_name", "");
|
||||
model->provider_email = reader->GetString("provider_email", "");
|
||||
model->provider_website = reader->GetString("provider_website", "");
|
||||
model->known_keys_only = reader->GetBoolean("known_keys_only", false);
|
||||
model->log_chat = reader->GetBoolean("log_chat", false);
|
||||
model->log_server_actions = reader->GetBoolean("log_server_actions", false);
|
||||
model->pause_server_if_no_clients = reader->GetBoolean("pause_server_if_no_clients", false);
|
||||
model->desync_debugging = reader->GetBoolean("desync_debugging", false);
|
||||
model->PlayerName = std::move(playerName);
|
||||
model->DefaultPort = reader->GetInt32("default_port", NETWORK_DEFAULT_PORT);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -434,26 +434,26 @@ namespace Config
|
|||
{
|
||||
auto model = &gConfigNetwork;
|
||||
writer->WriteSection("network");
|
||||
writer->WriteString("player_name", model->player_name);
|
||||
writer->WriteInt32("default_port", model->default_port);
|
||||
writer->WriteString("listen_address", model->listen_address);
|
||||
writer->WriteString("default_password", model->default_password);
|
||||
writer->WriteBoolean("stay_connected", model->stay_connected);
|
||||
writer->WriteBoolean("advertise", model->advertise);
|
||||
writer->WriteString("advertise_address", model->advertise_address);
|
||||
writer->WriteInt32("maxplayers", model->maxplayers);
|
||||
writer->WriteString("server_name", model->server_name);
|
||||
writer->WriteString("server_description", model->server_description);
|
||||
writer->WriteString("server_greeting", model->server_greeting);
|
||||
writer->WriteString("master_server_url", model->master_server_url);
|
||||
writer->WriteString("provider_name", model->provider_name);
|
||||
writer->WriteString("provider_email", model->provider_email);
|
||||
writer->WriteString("provider_website", model->provider_website);
|
||||
writer->WriteBoolean("known_keys_only", model->known_keys_only);
|
||||
writer->WriteBoolean("log_chat", model->log_chat);
|
||||
writer->WriteBoolean("log_server_actions", model->log_server_actions);
|
||||
writer->WriteBoolean("pause_server_if_no_clients", model->pause_server_if_no_clients);
|
||||
writer->WriteBoolean("desync_debugging", model->desync_debugging);
|
||||
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)
|
||||
|
@ -461,24 +461,24 @@ namespace Config
|
|||
if (reader->ReadSection("notifications"))
|
||||
{
|
||||
auto model = &gConfigNotifications;
|
||||
model->park_award = reader->GetBoolean("park_award", true);
|
||||
model->park_marketing_campaign_finished = reader->GetBoolean("park_marketing_campaign_finished", true);
|
||||
model->park_warnings = reader->GetBoolean("park_warnings", true);
|
||||
model->park_rating_warnings = reader->GetBoolean("park_rating_warnings", true);
|
||||
model->ride_broken_down = reader->GetBoolean("ride_broken_down", true);
|
||||
model->ride_crashed = reader->GetBoolean("ride_crashed", true);
|
||||
model->ride_casualties = reader->GetBoolean("ride_casualties", true);
|
||||
model->ride_warnings = reader->GetBoolean("ride_warnings", true);
|
||||
model->ride_researched = reader->GetBoolean("ride_researched", true);
|
||||
model->ride_stalled_vehicles = reader->GetBoolean("ride_stalled_vehicles", true);
|
||||
model->guest_warnings = reader->GetBoolean("guest_warnings", true);
|
||||
model->guest_left_park = reader->GetBoolean("guest_left_park", true);
|
||||
model->guest_queuing_for_ride = reader->GetBoolean("guest_queuing_for_ride", true);
|
||||
model->guest_on_ride = reader->GetBoolean("guest_on_ride", true);
|
||||
model->guest_left_ride = reader->GetBoolean("guest_left_ride", true);
|
||||
model->guest_bought_item = reader->GetBoolean("guest_bought_item", true);
|
||||
model->guest_used_facility = reader->GetBoolean("guest_used_facility", true);
|
||||
model->guest_died = 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -486,24 +486,24 @@ namespace Config
|
|||
{
|
||||
auto model = &gConfigNotifications;
|
||||
writer->WriteSection("notifications");
|
||||
writer->WriteBoolean("park_award", model->park_award);
|
||||
writer->WriteBoolean("park_marketing_campaign_finished", model->park_marketing_campaign_finished);
|
||||
writer->WriteBoolean("park_warnings", model->park_warnings);
|
||||
writer->WriteBoolean("park_rating_warnings", model->park_rating_warnings);
|
||||
writer->WriteBoolean("ride_broken_down", model->ride_broken_down);
|
||||
writer->WriteBoolean("ride_crashed", model->ride_crashed);
|
||||
writer->WriteBoolean("ride_casualties", model->ride_casualties);
|
||||
writer->WriteBoolean("ride_warnings", model->ride_warnings);
|
||||
writer->WriteBoolean("ride_researched", model->ride_researched);
|
||||
writer->WriteBoolean("ride_stalled_vehicles", model->ride_stalled_vehicles);
|
||||
writer->WriteBoolean("guest_warnings", model->guest_warnings);
|
||||
writer->WriteBoolean("guest_left_park", model->guest_left_park);
|
||||
writer->WriteBoolean("guest_queuing_for_ride", model->guest_queuing_for_ride);
|
||||
writer->WriteBoolean("guest_on_ride", model->guest_on_ride);
|
||||
writer->WriteBoolean("guest_left_ride", model->guest_left_ride);
|
||||
writer->WriteBoolean("guest_bought_item", model->guest_bought_item);
|
||||
writer->WriteBoolean("guest_used_facility", model->guest_used_facility);
|
||||
writer->WriteBoolean("guest_died", model->guest_died);
|
||||
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)
|
||||
|
@ -511,20 +511,20 @@ namespace Config
|
|||
if (reader->ReadSection("font"))
|
||||
{
|
||||
auto model = &gConfigFonts;
|
||||
model->file_name = reader->GetCString("file_name", nullptr);
|
||||
model->font_name = reader->GetCString("font_name", nullptr);
|
||||
model->x_offset = reader->GetInt32("x_offset", false);
|
||||
model->y_offset = reader->GetInt32("y_offset", true);
|
||||
model->size_tiny = reader->GetInt32("size_tiny", true);
|
||||
model->size_small = reader->GetInt32("size_small", false);
|
||||
model->size_medium = reader->GetInt32("size_medium", false);
|
||||
model->size_big = reader->GetInt32("size_big", false);
|
||||
model->height_tiny = reader->GetInt32("height_tiny", false);
|
||||
model->height_small = reader->GetInt32("height_small", false);
|
||||
model->height_medium = reader->GetInt32("height_medium", false);
|
||||
model->height_big = reader->GetInt32("height_big", false);
|
||||
model->enable_hinting = reader->GetBoolean("enable_hinting", true);
|
||||
model->hinting_threshold = reader->GetInt32("hinting_threshold", false);
|
||||
model->FileName = reader->GetCString("file_name", nullptr);
|
||||
model->FontName = reader->GetCString("font_name", nullptr);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -532,20 +532,20 @@ namespace Config
|
|||
{
|
||||
auto model = &gConfigFonts;
|
||||
writer->WriteSection("font");
|
||||
writer->WriteString("file_name", model->file_name);
|
||||
writer->WriteString("font_name", model->font_name);
|
||||
writer->WriteInt32("x_offset", model->x_offset);
|
||||
writer->WriteInt32("y_offset", model->y_offset);
|
||||
writer->WriteInt32("size_tiny", model->size_tiny);
|
||||
writer->WriteInt32("size_small", model->size_small);
|
||||
writer->WriteInt32("size_medium", model->size_medium);
|
||||
writer->WriteInt32("size_big", model->size_big);
|
||||
writer->WriteInt32("height_tiny", model->height_tiny);
|
||||
writer->WriteInt32("height_small", model->height_small);
|
||||
writer->WriteInt32("height_medium", model->height_medium);
|
||||
writer->WriteInt32("height_big", model->height_big);
|
||||
writer->WriteBoolean("enable_hinting", model->enable_hinting);
|
||||
writer->WriteInt32("hinting_threshold", model->hinting_threshold);
|
||||
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)
|
||||
|
@ -553,8 +553,8 @@ namespace Config
|
|||
if (reader->ReadSection("plugin"))
|
||||
{
|
||||
auto model = &gConfigPlugin;
|
||||
model->enable_hot_reloading = reader->GetBoolean("enable_hot_reloading", false);
|
||||
model->allowed_hosts = reader->GetString("allowed_hosts", "");
|
||||
model->EnableHotReloading = reader->GetBoolean("enable_hot_reloading", false);
|
||||
model->AllowedHosts = reader->GetString("allowed_hosts", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -562,8 +562,8 @@ namespace Config
|
|||
{
|
||||
auto model = &gConfigPlugin;
|
||||
writer->WriteSection("plugin");
|
||||
writer->WriteBoolean("enable_hot_reloading", model->enable_hot_reloading);
|
||||
writer->WriteString("allowed_hosts", model->allowed_hosts);
|
||||
writer->WriteBoolean("enable_hot_reloading", model->EnableHotReloading);
|
||||
writer->WriteString("allowed_hosts", model->AllowedHosts);
|
||||
}
|
||||
|
||||
static bool SetDefaults()
|
||||
|
@ -773,20 +773,20 @@ NotificationConfiguration gConfigNotifications;
|
|||
FontConfiguration gConfigFonts;
|
||||
PluginConfiguration gConfigPlugin;
|
||||
|
||||
void config_set_defaults()
|
||||
void ConfigSetDefaults()
|
||||
{
|
||||
config_release();
|
||||
ConfigRelease();
|
||||
Config::SetDefaults();
|
||||
}
|
||||
|
||||
bool config_open(u8string_view path)
|
||||
bool ConfigOpen(u8string_view path)
|
||||
{
|
||||
if (!File::Exists(path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
config_release();
|
||||
ConfigRelease();
|
||||
auto result = Config::ReadFile(path);
|
||||
if (result)
|
||||
{
|
||||
|
@ -795,38 +795,38 @@ bool config_open(u8string_view path)
|
|||
return result;
|
||||
}
|
||||
|
||||
bool config_save(u8string_view path)
|
||||
bool ConfigSave(u8string_view path)
|
||||
{
|
||||
return Config::WriteFile(path);
|
||||
}
|
||||
|
||||
void config_release()
|
||||
void ConfigRelease()
|
||||
{
|
||||
SafeFree(gConfigGeneral.custom_currency_symbol);
|
||||
SafeFree(gConfigInterface.current_theme_preset);
|
||||
SafeFree(gConfigInterface.current_title_sequence_preset);
|
||||
SafeFree(gConfigFonts.file_name);
|
||||
SafeFree(gConfigFonts.font_name);
|
||||
SafeFree(gConfigGeneral.CustomCurrencySymbol);
|
||||
SafeFree(gConfigInterface.CurrentThemePreset);
|
||||
SafeFree(gConfigInterface.CurrentTitleSequencePreset);
|
||||
SafeFree(gConfigFonts.FileName);
|
||||
SafeFree(gConfigFonts.FontName);
|
||||
}
|
||||
|
||||
u8string config_get_default_path()
|
||||
u8string ConfigGetDefaultPath()
|
||||
{
|
||||
auto env = GetContext()->GetPlatformEnvironment();
|
||||
return Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"config.ini");
|
||||
}
|
||||
|
||||
bool config_save_default()
|
||||
bool ConfigSaveDefault()
|
||||
{
|
||||
auto path = config_get_default_path();
|
||||
return config_save(path);
|
||||
auto path = ConfigGetDefaultPath();
|
||||
return ConfigSave(path);
|
||||
}
|
||||
|
||||
bool config_find_or_browse_install_directory()
|
||||
bool ConfigFindOrBrowseInstallDirectory()
|
||||
{
|
||||
std::string path = Config::FindRCT2Path();
|
||||
if (!path.empty())
|
||||
{
|
||||
gConfigGeneral.rct2_path = path;
|
||||
gConfigGeneral.RCT2Path = path;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -917,7 +917,7 @@ bool config_find_or_browse_install_directory()
|
|||
{
|
||||
return false;
|
||||
}
|
||||
gConfigGeneral.rct2_path = installPath;
|
||||
gConfigGeneral.RCT2Path = installPath;
|
||||
|
||||
if (Platform::OriginalGameDataExists(installPath))
|
||||
{
|
||||
|
@ -937,7 +937,7 @@ bool config_find_or_browse_install_directory()
|
|||
std::string rct1Path = Config::FindRCT1Path();
|
||||
if (!rct1Path.empty())
|
||||
{
|
||||
gConfigGeneral.rct1_path = std::move(rct1Path);
|
||||
gConfigGeneral.RCT1Path = std::move(rct1Path);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -27,197 +27,197 @@ enum class TitleMusicKind : int32_t;
|
|||
struct GeneralConfiguration
|
||||
{
|
||||
// Paths
|
||||
u8string rct1_path;
|
||||
u8string rct2_path;
|
||||
u8string RCT1Path;
|
||||
u8string RCT2Path;
|
||||
|
||||
// Display
|
||||
int32_t default_display;
|
||||
int32_t window_width;
|
||||
int32_t window_height;
|
||||
int32_t fullscreen_mode;
|
||||
int32_t fullscreen_width;
|
||||
int32_t fullscreen_height;
|
||||
float window_scale;
|
||||
DrawingEngine drawing_engine;
|
||||
bool uncap_fps;
|
||||
bool use_vsync;
|
||||
bool show_fps;
|
||||
bool multithreading;
|
||||
bool minimize_fullscreen_focus_loss;
|
||||
bool disable_screensaver;
|
||||
int32_t DefaultDisplay;
|
||||
int32_t WindowWidth;
|
||||
int32_t WindowHeight;
|
||||
int32_t FullscreenMode;
|
||||
int32_t FullscreenWidth;
|
||||
int32_t FullscreenHeight;
|
||||
float WindowScale;
|
||||
::DrawingEngine DrawingEngine;
|
||||
bool UncapFPS;
|
||||
bool UseVSync;
|
||||
bool ShowFPS;
|
||||
bool MultiThreading;
|
||||
bool MinimizeFullscreenFocusLoss;
|
||||
bool DisableScreensaver;
|
||||
|
||||
// Map rendering
|
||||
bool landscape_smoothing;
|
||||
bool always_show_gridlines;
|
||||
VirtualFloorStyles virtual_floor_style;
|
||||
bool day_night_cycle;
|
||||
bool enable_light_fx;
|
||||
bool enable_light_fx_for_vehicles;
|
||||
bool upper_case_banners;
|
||||
bool render_weather_effects;
|
||||
bool render_weather_gloom;
|
||||
bool disable_lightning_effect;
|
||||
bool show_guest_purchases;
|
||||
bool transparent_screenshot;
|
||||
bool transparent_water;
|
||||
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 invisible_rides;
|
||||
bool invisible_vehicles;
|
||||
bool invisible_trees;
|
||||
bool invisible_scenery;
|
||||
bool invisible_paths;
|
||||
bool invisible_supports;
|
||||
bool InvisibleRides;
|
||||
bool InvisibleVehicles;
|
||||
bool InvisibleTrees;
|
||||
bool InvisibleScenery;
|
||||
bool InvisiblePaths;
|
||||
bool InvisibleSupports;
|
||||
|
||||
// Localisation
|
||||
int32_t language;
|
||||
MeasurementFormat measurement_format;
|
||||
TemperatureUnit temperature_format;
|
||||
bool show_height_as_units;
|
||||
int32_t date_format;
|
||||
CurrencyType currency_format;
|
||||
int32_t custom_currency_rate;
|
||||
CurrencyAffix custom_currency_affix;
|
||||
utf8* custom_currency_symbol;
|
||||
int32_t Language;
|
||||
::MeasurementFormat MeasurementFormat;
|
||||
TemperatureUnit TemperatureFormat;
|
||||
bool ShowHeightAsUnits;
|
||||
int32_t DateFormat;
|
||||
CurrencyType CurrencyFormat;
|
||||
int32_t CustomCurrencyRate;
|
||||
CurrencyAffix CustomCurrencyAffix;
|
||||
utf8* CustomCurrencySymbol;
|
||||
|
||||
// Controls
|
||||
bool edge_scrolling;
|
||||
int32_t edge_scrolling_speed;
|
||||
bool trap_cursor;
|
||||
bool invert_viewport_drag;
|
||||
bool zoom_to_cursor;
|
||||
bool EdgeScrolling;
|
||||
int32_t EdgeScrollingSpeed;
|
||||
bool TrapCursor;
|
||||
bool InvertViewportDrag;
|
||||
bool ZoomToCursor;
|
||||
|
||||
// Miscellaneous
|
||||
bool play_intro;
|
||||
int32_t window_snap_proximity;
|
||||
bool save_plugin_data;
|
||||
bool debugging_tools;
|
||||
int32_t autosave_frequency;
|
||||
int32_t autosave_amount;
|
||||
bool auto_staff_placement;
|
||||
bool handymen_mow_default;
|
||||
bool auto_open_shops;
|
||||
int32_t default_inspection_interval;
|
||||
int32_t window_limit;
|
||||
int32_t scenario_select_mode;
|
||||
bool scenario_unlocking_enabled;
|
||||
bool scenario_hide_mega_park;
|
||||
bool steam_overlay_pause;
|
||||
bool show_real_names_of_guests;
|
||||
bool allow_early_completion;
|
||||
u8string asset_pack_order;
|
||||
u8string enabled_asset_packs;
|
||||
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;
|
||||
int32_t ScenarioSelectMode;
|
||||
bool ScenarioUnlockingEnabled;
|
||||
bool ScenarioHideMegaPark;
|
||||
bool SteamOverlayPause;
|
||||
bool ShowRealNamesOfGuests;
|
||||
bool AllowEarlyCompletion;
|
||||
u8string AssetPackOrder;
|
||||
u8string EnabledAssetPacks;
|
||||
|
||||
// Loading and saving
|
||||
bool confirmation_prompt;
|
||||
Sort load_save_sort;
|
||||
u8string last_save_game_directory;
|
||||
u8string last_save_landscape_directory;
|
||||
u8string last_save_scenario_directory;
|
||||
u8string last_save_track_directory;
|
||||
u8string last_run_version;
|
||||
bool use_native_browse_dialog;
|
||||
int64_t last_version_check_time;
|
||||
bool ConfirmationPrompt;
|
||||
Sort LoadSaveSort;
|
||||
u8string LastSaveGameDirectory;
|
||||
u8string LastSaveLandscapeDirectory;
|
||||
u8string LastSaveScenarioDirectory;
|
||||
u8string LastSaveTrackDirectory;
|
||||
u8string LastRunVersion;
|
||||
bool UseNativeBrowseDialog;
|
||||
int64_t LastVersionCheckTime;
|
||||
};
|
||||
|
||||
struct InterfaceConfiguration
|
||||
{
|
||||
bool toolbar_show_finances;
|
||||
bool toolbar_show_research;
|
||||
bool toolbar_show_cheats;
|
||||
bool toolbar_show_news;
|
||||
bool toolbar_show_mute;
|
||||
bool toolbar_show_chat;
|
||||
bool toolbar_show_zoom;
|
||||
bool console_small_font;
|
||||
bool random_title_sequence;
|
||||
utf8* current_theme_preset;
|
||||
utf8* current_title_sequence_preset;
|
||||
int32_t object_selection_filter_flags;
|
||||
int32_t scenarioselect_last_tab;
|
||||
bool list_ride_vehicles_separately;
|
||||
bool ToolbarShowFinances;
|
||||
bool ToolbarShowResearch;
|
||||
bool ToolbarShowCheats;
|
||||
bool ToolbarShowNews;
|
||||
bool ToolbarShowMute;
|
||||
bool ToolbarShowChat;
|
||||
bool ToolbarShowZoom;
|
||||
bool ConsoleSmallFont;
|
||||
bool RandomTitleSequence;
|
||||
utf8* CurrentThemePreset;
|
||||
utf8* CurrentTitleSequencePreset;
|
||||
int32_t ObjectSelectionFilterFlags;
|
||||
int32_t ScenarioselectLastTab;
|
||||
bool ListRideVehiclesSeparately;
|
||||
};
|
||||
|
||||
struct SoundConfiguration
|
||||
{
|
||||
std::string device;
|
||||
bool master_sound_enabled;
|
||||
uint8_t master_volume;
|
||||
TitleMusicKind title_music;
|
||||
bool sound_enabled;
|
||||
uint8_t sound_volume;
|
||||
bool ride_music_enabled;
|
||||
uint8_t ride_music_volume;
|
||||
std::string Device;
|
||||
bool MasterSoundEnabled;
|
||||
uint8_t MasterVolume;
|
||||
TitleMusicKind TitleMusic;
|
||||
bool SoundEnabled;
|
||||
uint8_t SoundVolume;
|
||||
bool RideMusicEnabled;
|
||||
uint8_t AudioFocus;
|
||||
bool audio_focus;
|
||||
};
|
||||
|
||||
struct NetworkConfiguration
|
||||
{
|
||||
std::string player_name;
|
||||
int32_t default_port;
|
||||
std::string listen_address;
|
||||
std::string default_password;
|
||||
bool stay_connected;
|
||||
bool advertise;
|
||||
std::string advertise_address;
|
||||
int32_t maxplayers;
|
||||
std::string server_name;
|
||||
std::string server_description;
|
||||
std::string server_greeting;
|
||||
std::string master_server_url;
|
||||
std::string provider_name;
|
||||
std::string provider_email;
|
||||
std::string provider_website;
|
||||
bool known_keys_only;
|
||||
bool log_chat;
|
||||
bool log_server_actions;
|
||||
bool pause_server_if_no_clients;
|
||||
bool desync_debugging;
|
||||
std::string PlayerName;
|
||||
int32_t DefaultPort;
|
||||
std::string ListenAddress;
|
||||
std::string DefaultPassword;
|
||||
bool StayConnected;
|
||||
bool Advertise;
|
||||
std::string AdvertiseAddress;
|
||||
int32_t Maxplayers;
|
||||
std::string ServerName;
|
||||
std::string ServerDescription;
|
||||
std::string ServerGreeting;
|
||||
std::string MasterServerUrl;
|
||||
std::string ProviderName;
|
||||
std::string ProviderEmail;
|
||||
std::string ProviderWebsite;
|
||||
bool KnownKeysOnly;
|
||||
bool LogChat;
|
||||
bool LogServerActions;
|
||||
bool PauseServerIfNoClients;
|
||||
bool DesyncDebugging;
|
||||
};
|
||||
|
||||
struct NotificationConfiguration
|
||||
{
|
||||
bool park_award;
|
||||
bool park_marketing_campaign_finished;
|
||||
bool park_warnings;
|
||||
bool park_rating_warnings;
|
||||
bool ride_broken_down;
|
||||
bool ride_crashed;
|
||||
bool ride_casualties;
|
||||
bool ride_warnings;
|
||||
bool ride_researched;
|
||||
bool ride_stalled_vehicles;
|
||||
bool guest_warnings;
|
||||
bool guest_left_park;
|
||||
bool guest_queuing_for_ride;
|
||||
bool guest_on_ride;
|
||||
bool guest_left_ride;
|
||||
bool guest_bought_item;
|
||||
bool guest_used_facility;
|
||||
bool guest_died;
|
||||
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 FontConfiguration
|
||||
{
|
||||
utf8* file_name;
|
||||
utf8* font_name;
|
||||
int32_t x_offset;
|
||||
int32_t y_offset;
|
||||
int32_t size_tiny;
|
||||
int32_t size_small;
|
||||
int32_t size_medium;
|
||||
int32_t size_big;
|
||||
int32_t height_tiny;
|
||||
int32_t height_small;
|
||||
int32_t height_medium;
|
||||
int32_t height_big;
|
||||
bool enable_hinting;
|
||||
int32_t hinting_threshold;
|
||||
utf8* FileName;
|
||||
utf8* 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 PluginConfiguration
|
||||
{
|
||||
bool enable_hot_reloading;
|
||||
std::string allowed_hosts;
|
||||
bool EnableHotReloading;
|
||||
std::string AllowedHosts;
|
||||
};
|
||||
|
||||
enum class Sort : int32_t
|
||||
|
@ -264,13 +264,13 @@ extern NotificationConfiguration gConfigNotifications;
|
|||
extern FontConfiguration gConfigFonts;
|
||||
extern PluginConfiguration gConfigPlugin;
|
||||
|
||||
bool config_open(u8string_view path);
|
||||
bool config_save(u8string_view path);
|
||||
u8string config_get_default_path();
|
||||
void config_set_defaults();
|
||||
void config_release();
|
||||
bool config_save_default();
|
||||
bool config_find_or_browse_install_directory();
|
||||
bool ConfigOpen(u8string_view path);
|
||||
bool ConfigSave(u8string_view path);
|
||||
u8string ConfigGetDefaultPath();
|
||||
void ConfigSetDefaults();
|
||||
void ConfigRelease();
|
||||
bool ConfigSaveDefault();
|
||||
bool ConfigFindOrBrowseInstallDirectory();
|
||||
|
||||
bool RCT1DataPresentAtLocation(u8string_view path);
|
||||
std::string FindCsg1datAtLocation(u8string_view path);
|
||||
|
|
|
@ -324,14 +324,14 @@ bool gfx_load_csg()
|
|||
{
|
||||
log_verbose("gfx_load_csg()");
|
||||
|
||||
if (gConfigGeneral.rct1_path.empty())
|
||||
if (gConfigGeneral.RCT1Path.empty())
|
||||
{
|
||||
log_verbose(" unable to load CSG, RCT1 path not set");
|
||||
return false;
|
||||
}
|
||||
|
||||
auto pathHeaderPath = FindCsg1idatAtLocation(gConfigGeneral.rct1_path);
|
||||
auto pathDataPath = FindCsg1datAtLocation(gConfigGeneral.rct1_path);
|
||||
auto pathHeaderPath = FindCsg1idatAtLocation(gConfigGeneral.RCT1Path);
|
||||
auto pathDataPath = FindCsg1datAtLocation(gConfigGeneral.RCT1Path);
|
||||
try
|
||||
{
|
||||
auto fileHeader = FileStream(pathHeaderPath, FILE_MODE_OPEN);
|
||||
|
|
|
@ -666,7 +666,7 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo* dpi, std::string_view tex
|
|||
|
||||
dst = dst_orig;
|
||||
src = src_orig;
|
||||
bool use_hinting = gConfigFonts.enable_hinting && fontDesc->hinting_threshold > 0;
|
||||
bool use_hinting = gConfigFonts.EnableHinting && fontDesc->hinting_threshold > 0;
|
||||
for (int32_t yy = 0; yy < height; yy++)
|
||||
{
|
||||
for (int32_t xx = 0; xx < width; xx++)
|
||||
|
|
|
@ -858,8 +858,8 @@ void RefreshVideo(bool recreateWindow)
|
|||
|
||||
void ToggleWindowedMode()
|
||||
{
|
||||
int32_t targetMode = gConfigGeneral.fullscreen_mode == 0 ? 2 : 0;
|
||||
int32_t targetMode = gConfigGeneral.FullscreenMode == 0 ? 2 : 0;
|
||||
context_set_fullscreen_mode(targetMode);
|
||||
gConfigGeneral.fullscreen_mode = targetMode;
|
||||
config_save_default();
|
||||
gConfigGeneral.FullscreenMode = targetMode;
|
||||
ConfigSaveDefault();
|
||||
}
|
||||
|
|
|
@ -131,12 +131,12 @@ void lightfx_set_available(bool available)
|
|||
|
||||
bool lightfx_is_available()
|
||||
{
|
||||
return _lightfxAvailable && gConfigGeneral.enable_light_fx != 0;
|
||||
return _lightfxAvailable && gConfigGeneral.EnableLightFx != 0;
|
||||
}
|
||||
|
||||
bool lightfx_for_vehicles_is_available()
|
||||
{
|
||||
return lightfx_is_available() && gConfigGeneral.enable_light_fx_for_vehicles != 0;
|
||||
return lightfx_is_available() && gConfigGeneral.EnableLightFxForVehicles != 0;
|
||||
}
|
||||
|
||||
void lightfx_init()
|
||||
|
|
|
@ -159,7 +159,7 @@ static int32_t scrolling_text_get_matching_or_oldest(
|
|||
|
||||
static void scrolling_text_format(utf8* dst, size_t size, rct_draw_scroll_text* scrollText)
|
||||
{
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
if (gConfigGeneral.UpperCaseBanners)
|
||||
{
|
||||
format_string_to_upper(dst, size, scrollText->string_id, scrollText->string_args);
|
||||
}
|
||||
|
@ -1601,7 +1601,7 @@ static void scrolling_text_set_bitmap_for_ttf(
|
|||
int32_t min_vpos = -fontDesc->offset_y;
|
||||
int32_t max_vpos = std::min(surface->h - 2, min_vpos + 7);
|
||||
|
||||
bool use_hinting = gConfigFonts.enable_hinting && fontDesc->hinting_threshold > 0;
|
||||
bool use_hinting = gConfigFonts.EnableHinting && fontDesc->hinting_threshold > 0;
|
||||
|
||||
for (int32_t x = 0;; x++)
|
||||
{
|
||||
|
|
|
@ -76,7 +76,7 @@ template<typename T> class FontLockHelper
|
|||
public:
|
||||
FontLockHelper(T& mutex)
|
||||
: _mutex(mutex)
|
||||
, _enabled(gConfigGeneral.multithreading)
|
||||
, _enabled(gConfigGeneral.MultiThreading)
|
||||
{
|
||||
if (_enabled)
|
||||
_mutex.lock();
|
||||
|
@ -98,7 +98,7 @@ static void ttf_toggle_hinting(bool)
|
|||
for (int32_t i = 0; i < FONT_SIZE_COUNT; i++)
|
||||
{
|
||||
TTFFontDescriptor* fontDesc = &(gCurrentTTFFontSet->size[i]);
|
||||
bool use_hinting = gConfigFonts.enable_hinting && fontDesc->hinting_threshold;
|
||||
bool use_hinting = gConfigFonts.EnableHinting && fontDesc->hinting_threshold;
|
||||
TTF_SetFontHinting(fontDesc->font, use_hinting ? 1 : 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ const DrawWeatherFunc DrawSnowFunctions[] = {
|
|||
*/
|
||||
void DrawWeather(rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer)
|
||||
{
|
||||
if (gConfigGeneral.render_weather_effects)
|
||||
if (gConfigGeneral.RenderWeatherEffects)
|
||||
{
|
||||
uint32_t viewFlags = 0;
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ X8DrawingEngine::X8DrawingEngine([[maybe_unused]] const std::shared_ptr<Ui::IUiC
|
|||
_drawingContext = new X8DrawingContext(this);
|
||||
_bitsDPI.DrawingEngine = this;
|
||||
lightfx_set_available(true);
|
||||
_lastLightFXenabled = (gConfigGeneral.enable_light_fx != 0);
|
||||
_lastLightFXenabled = (gConfigGeneral.EnableLightFx != 0);
|
||||
}
|
||||
|
||||
X8DrawingEngine::~X8DrawingEngine()
|
||||
|
@ -189,7 +189,7 @@ void X8DrawingEngine::BeginDraw()
|
|||
if (gIntroState == IntroState::None)
|
||||
{
|
||||
// HACK we need to re-configure the bits if light fx has been enabled / disabled
|
||||
if (_lastLightFXenabled != (gConfigGeneral.enable_light_fx != 0))
|
||||
if (_lastLightFXenabled != (gConfigGeneral.EnableLightFx != 0))
|
||||
{
|
||||
Resize(_width, _height);
|
||||
}
|
||||
|
|
|
@ -1652,7 +1652,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price)
|
|||
auto ft = Formatter();
|
||||
FormatNameTo(ft);
|
||||
ft.Add<StringId>(GetShopItemDescriptor(shopItem).Naming.Indefinite);
|
||||
if (gConfigNotifications.guest_bought_item)
|
||||
if (gConfigNotifications.GuestBoughtItem)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X, sprite_index, ft);
|
||||
}
|
||||
|
@ -2297,7 +2297,7 @@ void Guest::SpendMoney(money16& peep_expend_type, money32 amount, ExpenditureTyp
|
|||
|
||||
finance_payment(-amount, expenditure);
|
||||
|
||||
if (gConfigGeneral.show_guest_purchases && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO))
|
||||
if (gConfigGeneral.ShowGuestPurchases && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO))
|
||||
{
|
||||
// HACK Currently disabled for multiplayer due to limitation of all sprites
|
||||
// needing to be synchronised
|
||||
|
@ -3569,7 +3569,7 @@ void PeepUpdateRideLeaveEntranceDefault(Guest* peep, Ride* ride, CoordsXYZD& ent
|
|||
|
||||
auto ft = Formatter();
|
||||
ride->FormatNameTo(ft);
|
||||
if (gConfigNotifications.ride_warnings)
|
||||
if (gConfigNotifications.RideWarnings)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::Ride, STR_GUESTS_GETTING_STUCK_ON_RIDE, peep->CurrentRide.ToUnderlying(), ft);
|
||||
}
|
||||
|
@ -3856,7 +3856,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride)
|
|||
else
|
||||
msg_string = STR_PEEP_TRACKING_PEEP_IS_ON_X;
|
||||
|
||||
if (gConfigNotifications.guest_on_ride)
|
||||
if (gConfigNotifications.GuestOnRide)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::PeepOnRide, msg_string, sprite_index, ft);
|
||||
}
|
||||
|
@ -4954,7 +4954,7 @@ void Guest::UpdateRideLeaveExit()
|
|||
FormatNameTo(ft);
|
||||
ride->FormatNameTo(ft);
|
||||
|
||||
if (gConfigNotifications.guest_left_ride)
|
||||
if (gConfigNotifications.GuestLeftRide)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_LEFT_RIDE_X, sprite_index, ft);
|
||||
}
|
||||
|
|
|
@ -746,7 +746,7 @@ void Peep::UpdateFalling()
|
|||
if (Action == PeepActionType::Drowning)
|
||||
return;
|
||||
|
||||
if (gConfigNotifications.guest_died)
|
||||
if (gConfigNotifications.GuestDied)
|
||||
{
|
||||
auto ft = Formatter();
|
||||
FormatNameTo(ft);
|
||||
|
@ -1124,7 +1124,7 @@ void peep_problem_warnings_update()
|
|||
else if (hungerCounter >= PEEP_HUNGER_WARNING_THRESHOLD && hungerCounter >= gNumGuestsInPark / 16)
|
||||
{
|
||||
warningThrottle[0] = 4;
|
||||
if (gConfigNotifications.guest_warnings)
|
||||
if (gConfigNotifications.GuestWarnings)
|
||||
{
|
||||
constexpr auto thoughtId = static_cast<uint32_t>(PeepThoughtType::Hungry);
|
||||
News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_ARE_HUNGRY, thoughtId, {});
|
||||
|
@ -1136,7 +1136,7 @@ void peep_problem_warnings_update()
|
|||
else if (thirstCounter >= PEEP_THIRST_WARNING_THRESHOLD && thirstCounter >= gNumGuestsInPark / 16)
|
||||
{
|
||||
warningThrottle[1] = 4;
|
||||
if (gConfigNotifications.guest_warnings)
|
||||
if (gConfigNotifications.GuestWarnings)
|
||||
{
|
||||
constexpr auto thoughtId = static_cast<uint32_t>(PeepThoughtType::Thirsty);
|
||||
News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_ARE_THIRSTY, thoughtId, {});
|
||||
|
@ -1148,7 +1148,7 @@ void peep_problem_warnings_update()
|
|||
else if (toiletCounter >= PEEP_TOILET_WARNING_THRESHOLD && toiletCounter >= gNumGuestsInPark / 16)
|
||||
{
|
||||
warningThrottle[2] = 4;
|
||||
if (gConfigNotifications.guest_warnings)
|
||||
if (gConfigNotifications.GuestWarnings)
|
||||
{
|
||||
constexpr auto thoughtId = static_cast<uint32_t>(PeepThoughtType::Toilet);
|
||||
News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_CANT_FIND_TOILET, thoughtId, {});
|
||||
|
@ -1160,7 +1160,7 @@ void peep_problem_warnings_update()
|
|||
else if (litterCounter >= PEEP_LITTER_WARNING_THRESHOLD && litterCounter >= gNumGuestsInPark / 32)
|
||||
{
|
||||
warningThrottle[3] = 4;
|
||||
if (gConfigNotifications.guest_warnings)
|
||||
if (gConfigNotifications.GuestWarnings)
|
||||
{
|
||||
constexpr auto thoughtId = static_cast<uint32_t>(PeepThoughtType::BadLitter);
|
||||
News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_DISLIKE_LITTER, thoughtId, {});
|
||||
|
@ -1172,7 +1172,7 @@ void peep_problem_warnings_update()
|
|||
else if (disgustCounter >= PEEP_DISGUST_WARNING_THRESHOLD && disgustCounter >= gNumGuestsInPark / 32)
|
||||
{
|
||||
warningThrottle[4] = 4;
|
||||
if (gConfigNotifications.guest_warnings)
|
||||
if (gConfigNotifications.GuestWarnings)
|
||||
{
|
||||
constexpr auto thoughtId = static_cast<uint32_t>(PeepThoughtType::PathDisgusting);
|
||||
News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_DISGUSTED_BY_PATHS, thoughtId, {});
|
||||
|
@ -1184,7 +1184,7 @@ void peep_problem_warnings_update()
|
|||
else if (vandalismCounter >= PEEP_VANDALISM_WARNING_THRESHOLD && vandalismCounter >= gNumGuestsInPark / 32)
|
||||
{
|
||||
warningThrottle[5] = 4;
|
||||
if (gConfigNotifications.guest_warnings)
|
||||
if (gConfigNotifications.GuestWarnings)
|
||||
{
|
||||
constexpr auto thoughtId = static_cast<uint32_t>(PeepThoughtType::Vandalism);
|
||||
News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_DISLIKE_VANDALISM, thoughtId, {});
|
||||
|
@ -1196,7 +1196,7 @@ void peep_problem_warnings_update()
|
|||
else if (noexitCounter >= PEEP_NOEXIT_WARNING_THRESHOLD)
|
||||
{
|
||||
warningThrottle[6] = 4;
|
||||
if (gConfigNotifications.guest_warnings)
|
||||
if (gConfigNotifications.GuestWarnings)
|
||||
{
|
||||
constexpr auto thoughtId = static_cast<uint32_t>(PeepThoughtType::CantFindExit);
|
||||
News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_GETTING_LOST_OR_STUCK, thoughtId, {});
|
||||
|
@ -1205,7 +1205,7 @@ void peep_problem_warnings_update()
|
|||
else if (lostCounter >= PEEP_LOST_WARNING_THRESHOLD)
|
||||
{
|
||||
warningThrottle[6] = 4;
|
||||
if (gConfigNotifications.guest_warnings)
|
||||
if (gConfigNotifications.GuestWarnings)
|
||||
{
|
||||
constexpr auto thoughtId = static_cast<uint32_t>(PeepThoughtType::Lost);
|
||||
News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_GETTING_LOST_OR_STUCK, thoughtId, {});
|
||||
|
@ -1218,7 +1218,7 @@ void peep_problem_warnings_update()
|
|||
{ // 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 (gConfigNotifications.guest_warnings)
|
||||
if (gConfigNotifications.GuestWarnings)
|
||||
{
|
||||
auto rideWithMostQueueComplaints = std::max_element(
|
||||
queueComplainingGuestsMap.begin(), queueComplainingGuestsMap.end(),
|
||||
|
@ -1249,7 +1249,7 @@ void peep_update_crowd_noise()
|
|||
if (OpenRCT2::Audio::gGameSoundsOff)
|
||||
return;
|
||||
|
||||
if (!gConfigSound.sound_enabled)
|
||||
if (!gConfigSound.SoundEnabled)
|
||||
return;
|
||||
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
|
@ -1789,7 +1789,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin
|
|||
auto ft = Formatter();
|
||||
guest->FormatNameTo(ft);
|
||||
ride->FormatNameTo(ft);
|
||||
if (gConfigNotifications.guest_queuing_for_ride)
|
||||
if (gConfigNotifications.GuestQueuingForRide)
|
||||
{
|
||||
News::AddItemToQueue(
|
||||
News::ItemType::PeepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->sprite_index, ft);
|
||||
|
@ -1850,7 +1850,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin
|
|||
{
|
||||
auto ft = Formatter();
|
||||
guest->FormatNameTo(ft);
|
||||
if (gConfigNotifications.guest_left_park)
|
||||
if (gConfigNotifications.GuestLeftPark)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_LEFT_PARK, guest->sprite_index, ft);
|
||||
}
|
||||
|
@ -2219,7 +2219,7 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords)
|
|||
auto ft = Formatter();
|
||||
guest->FormatNameTo(ft);
|
||||
ride->FormatNameTo(ft);
|
||||
if (gConfigNotifications.guest_queuing_for_ride)
|
||||
if (gConfigNotifications.GuestQueuingForRide)
|
||||
{
|
||||
News::AddItemToQueue(
|
||||
News::ItemType::PeepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->sprite_index, ft);
|
||||
|
@ -2334,7 +2334,7 @@ static bool peep_interact_with_shop(Peep* peep, const CoordsXYE& coords)
|
|||
ride->FormatNameTo(ft);
|
||||
StringId string_id = ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IN_RIDE) ? STR_PEEP_TRACKING_PEEP_IS_IN_X
|
||||
: STR_PEEP_TRACKING_PEEP_IS_ON_X;
|
||||
if (gConfigNotifications.guest_used_facility)
|
||||
if (gConfigNotifications.GuestUsedFacility)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::PeepOnRide, string_id, guest->sprite_index, ft);
|
||||
}
|
||||
|
|
|
@ -127,12 +127,12 @@ static bool LoadFont(LocalisationService& localisationService, TTFFontSetDescrip
|
|||
static bool LoadCustomConfigFont(LocalisationService& localisationService)
|
||||
{
|
||||
static TTFFontSetDescriptor TTFFontCustom = { {
|
||||
{ gConfigFonts.file_name, gConfigFonts.font_name, gConfigFonts.size_tiny, gConfigFonts.x_offset, gConfigFonts.y_offset,
|
||||
gConfigFonts.height_tiny, gConfigFonts.hinting_threshold, nullptr },
|
||||
{ gConfigFonts.file_name, gConfigFonts.font_name, gConfigFonts.size_small, gConfigFonts.x_offset, gConfigFonts.y_offset,
|
||||
gConfigFonts.height_small, gConfigFonts.hinting_threshold, nullptr },
|
||||
{ gConfigFonts.file_name, gConfigFonts.font_name, gConfigFonts.size_medium, gConfigFonts.x_offset,
|
||||
gConfigFonts.y_offset, gConfigFonts.height_medium, gConfigFonts.hinting_threshold, nullptr },
|
||||
{ gConfigFonts.FileName, gConfigFonts.FontName, gConfigFonts.SizeTiny, gConfigFonts.OffsetX, gConfigFonts.OffsetY,
|
||||
gConfigFonts.HeightTiny, gConfigFonts.HintingThreshold, nullptr },
|
||||
{ gConfigFonts.FileName, gConfigFonts.FontName, gConfigFonts.SizeSmall, gConfigFonts.OffsetX, gConfigFonts.OffsetY,
|
||||
gConfigFonts.HeightSmall, gConfigFonts.HintingThreshold, nullptr },
|
||||
{ gConfigFonts.FileName, gConfigFonts.FontName, gConfigFonts.SizeMedium, gConfigFonts.OffsetX, gConfigFonts.OffsetY,
|
||||
gConfigFonts.HeightMedium, gConfigFonts.HintingThreshold, nullptr },
|
||||
} };
|
||||
|
||||
ttf_dispose();
|
||||
|
@ -152,7 +152,7 @@ void TryLoadFonts(LocalisationService& localisationService)
|
|||
|
||||
if (fontFamily != FAMILY_OPENRCT2_SPRITE)
|
||||
{
|
||||
if (!String::IsNullOrEmpty(gConfigFonts.file_name))
|
||||
if (!String::IsNullOrEmpty(gConfigFonts.FileName))
|
||||
{
|
||||
if (LoadCustomConfigFont(localisationService))
|
||||
{
|
||||
|
|
|
@ -669,7 +669,7 @@ static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv)
|
|||
}
|
||||
else if (argv[0] == "console_small_font")
|
||||
{
|
||||
console.WriteFormatLine("console_small_font %d", gConfigInterface.console_small_font);
|
||||
console.WriteFormatLine("console_small_font %d", gConfigInterface.ConsoleSmallFont);
|
||||
}
|
||||
else if (argv[0] == "location")
|
||||
{
|
||||
|
@ -686,19 +686,19 @@ static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv)
|
|||
}
|
||||
else if (argv[0] == "window_scale")
|
||||
{
|
||||
console.WriteFormatLine("window_scale %.3f", gConfigGeneral.window_scale);
|
||||
console.WriteFormatLine("window_scale %.3f", gConfigGeneral.WindowScale);
|
||||
}
|
||||
else if (argv[0] == "window_limit")
|
||||
{
|
||||
console.WriteFormatLine("window_limit %d", gConfigGeneral.window_limit);
|
||||
console.WriteFormatLine("window_limit %d", gConfigGeneral.WindowLimit);
|
||||
}
|
||||
else if (argv[0] == "render_weather_effects")
|
||||
{
|
||||
console.WriteFormatLine("render_weather_effects %d", gConfigGeneral.render_weather_effects);
|
||||
console.WriteFormatLine("render_weather_effects %d", gConfigGeneral.RenderWeatherEffects);
|
||||
}
|
||||
else if (argv[0] == "render_weather_gloom")
|
||||
{
|
||||
console.WriteFormatLine("render_weather_gloom %d", gConfigGeneral.render_weather_gloom);
|
||||
console.WriteFormatLine("render_weather_gloom %d", gConfigGeneral.RenderWeatherGloom);
|
||||
}
|
||||
else if (argv[0] == "cheat_sandbox_mode")
|
||||
{
|
||||
|
@ -723,7 +723,7 @@ static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv)
|
|||
#ifndef NO_TTF
|
||||
else if (argv[0] == "enable_hinting")
|
||||
{
|
||||
console.WriteFormatLine("enable_hinting %d", gConfigFonts.enable_hinting);
|
||||
console.WriteFormatLine("enable_hinting %d", gConfigFonts.EnableHinting);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
|
@ -1047,8 +1047,8 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv)
|
|||
}
|
||||
else if (argv[0] == "console_small_font" && invalidArguments(&invalidArgs, int_valid[0]))
|
||||
{
|
||||
gConfigInterface.console_small_font = (int_val[0] != 0);
|
||||
config_save_default();
|
||||
gConfigInterface.ConsoleSmallFont = (int_val[0] != 0);
|
||||
ConfigSaveDefault();
|
||||
console.Execute("get console_small_font");
|
||||
}
|
||||
else if (argv[0] == "location" && invalidArguments(&invalidArgs, int_valid[0] && int_valid[1]))
|
||||
|
@ -1066,8 +1066,8 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv)
|
|||
else if (argv[0] == "window_scale" && invalidArguments(&invalidArgs, double_valid[0]))
|
||||
{
|
||||
float newScale = static_cast<float>(0.001 * std::trunc(1000 * double_val[0]));
|
||||
gConfigGeneral.window_scale = std::clamp(newScale, 0.5f, 5.0f);
|
||||
config_save_default();
|
||||
gConfigGeneral.WindowScale = std::clamp(newScale, 0.5f, 5.0f);
|
||||
ConfigSaveDefault();
|
||||
gfx_invalidate_screen();
|
||||
context_trigger_resize();
|
||||
context_update_cursor_scale();
|
||||
|
@ -1080,14 +1080,14 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv)
|
|||
}
|
||||
else if (argv[0] == "render_weather_effects" && invalidArguments(&invalidArgs, int_valid[0]))
|
||||
{
|
||||
gConfigGeneral.render_weather_effects = (int_val[0] != 0);
|
||||
config_save_default();
|
||||
gConfigGeneral.RenderWeatherEffects = (int_val[0] != 0);
|
||||
ConfigSaveDefault();
|
||||
console.Execute("get render_weather_effects");
|
||||
}
|
||||
else if (argv[0] == "render_weather_gloom" && invalidArguments(&invalidArgs, int_valid[0]))
|
||||
{
|
||||
gConfigGeneral.render_weather_gloom = (int_val[0] != 0);
|
||||
config_save_default();
|
||||
gConfigGeneral.RenderWeatherGloom = (int_val[0] != 0);
|
||||
ConfigSaveDefault();
|
||||
console.Execute("get render_weather_gloom");
|
||||
}
|
||||
else if (argv[0] == "cheat_sandbox_mode" && invalidArguments(&invalidArgs, int_valid[0]))
|
||||
|
@ -1170,8 +1170,8 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv)
|
|||
#ifndef NO_TTF
|
||||
else if (argv[0] == "enable_hinting" && invalidArguments(&invalidArgs, int_valid[0]))
|
||||
{
|
||||
gConfigFonts.enable_hinting = (int_val[0] != 0);
|
||||
config_save_default();
|
||||
gConfigFonts.EnableHinting = (int_val[0] != 0);
|
||||
ConfigSaveDefault();
|
||||
console.Execute("get enable_hinting");
|
||||
ttf_toggle_hinting();
|
||||
}
|
||||
|
|
|
@ -364,7 +364,7 @@ void screenshot_giant()
|
|||
{
|
||||
viewport.flags = vp->flags;
|
||||
}
|
||||
if (gConfigGeneral.transparent_screenshot)
|
||||
if (gConfigGeneral.TransparentScreenshot)
|
||||
{
|
||||
viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND;
|
||||
}
|
||||
|
@ -556,7 +556,7 @@ static void ApplyOptions(const ScreenshotOptions* options, rct_viewport& viewpor
|
|||
CheatsSet(CheatType::RemoveLitter);
|
||||
}
|
||||
|
||||
if (options->transparent || gConfigGeneral.transparent_screenshot)
|
||||
if (options->transparent || gConfigGeneral.TransparentScreenshot)
|
||||
{
|
||||
viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND;
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ void viewport_create(rct_window* w, const ScreenCoordsXY& screenCoords, int32_t
|
|||
viewport->zoom = zoom;
|
||||
viewport->flags = 0;
|
||||
|
||||
if (gConfigGeneral.always_show_gridlines)
|
||||
if (gConfigGeneral.AlwaysShowGridlines)
|
||||
viewport->flags |= VIEWPORT_FLAG_GRIDLINES;
|
||||
w->viewport = viewport;
|
||||
|
||||
|
@ -933,7 +933,7 @@ static void viewport_paint_column(PaintSession& session)
|
|||
|
||||
PaintDrawStructs(session);
|
||||
|
||||
if (gConfigGeneral.render_weather_gloom && !gTrackDesignSaveMode && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_ENTITIES)
|
||||
if (gConfigGeneral.RenderWeatherGloom && !gTrackDesignSaveMode && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_ENTITIES)
|
||||
&& !(session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
{
|
||||
viewport_paint_weather_gloom(&session.DPI);
|
||||
|
@ -999,7 +999,7 @@ void viewport_paint(
|
|||
|
||||
_paintColumns.clear();
|
||||
|
||||
bool useMultithreading = gConfigGeneral.multithreading;
|
||||
bool useMultithreading = gConfigGeneral.MultiThreading;
|
||||
if (useMultithreading && _paintJobs == nullptr)
|
||||
{
|
||||
_paintJobs = std::make_unique<JobPool>();
|
||||
|
@ -1208,7 +1208,7 @@ void hide_gridlines()
|
|||
rct_window* mainWindow = window_get_main();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
if (!gConfigGeneral.always_show_gridlines)
|
||||
if (!gConfigGeneral.AlwaysShowGridlines)
|
||||
{
|
||||
mainWindow->viewport->flags &= ~VIEWPORT_FLAG_GRIDLINES;
|
||||
mainWindow->Invalidate();
|
||||
|
@ -2114,11 +2114,11 @@ uint8_t get_current_rotation()
|
|||
int32_t get_height_marker_offset()
|
||||
{
|
||||
// Height labels in units
|
||||
if (gConfigGeneral.show_height_as_units)
|
||||
if (gConfigGeneral.ShowHeightAsUnits)
|
||||
return 0;
|
||||
|
||||
// Height labels in feet
|
||||
if (gConfigGeneral.measurement_format == MeasurementFormat::Imperial)
|
||||
if (gConfigGeneral.MeasurementFormat == MeasurementFormat::Imperial)
|
||||
return 1 * 256;
|
||||
|
||||
// Height labels in metres
|
||||
|
|
|
@ -186,10 +186,10 @@ static void window_close_surplus(int32_t cap, WindowClass avoid_classification)
|
|||
*/
|
||||
void window_set_window_limit(int32_t value)
|
||||
{
|
||||
int32_t prev = gConfigGeneral.window_limit;
|
||||
int32_t prev = gConfigGeneral.WindowLimit;
|
||||
int32_t val = std::clamp(value, WINDOW_LIMIT_MIN, WINDOW_LIMIT_MAX);
|
||||
gConfigGeneral.window_limit = val;
|
||||
config_save_default();
|
||||
gConfigGeneral.WindowLimit = val;
|
||||
ConfigSaveDefault();
|
||||
// Checks if value decreases and then closes surplus
|
||||
// windows if one sets a limit lower than the number of windows open
|
||||
if (val < prev)
|
||||
|
@ -1035,7 +1035,7 @@ void window_zoom_set(rct_window& w, ZoomLevel zoomLevel, bool atCursor)
|
|||
int32_t saved_map_y = 0;
|
||||
int32_t offset_x = 0;
|
||||
int32_t offset_y = 0;
|
||||
if (gConfigGeneral.zoom_to_cursor && atCursor)
|
||||
if (gConfigGeneral.ZoomToCursor && atCursor)
|
||||
{
|
||||
window_viewport_get_map_coords_by_cursor(w, &saved_map_x, &saved_map_y, &offset_x, &offset_y);
|
||||
}
|
||||
|
@ -1061,7 +1061,7 @@ void window_zoom_set(rct_window& w, ZoomLevel zoomLevel, bool atCursor)
|
|||
}
|
||||
|
||||
// Zooming to cursor? Centre around the tile we were hovering over just now.
|
||||
if (gConfigGeneral.zoom_to_cursor && atCursor)
|
||||
if (gConfigGeneral.ZoomToCursor && atCursor)
|
||||
{
|
||||
window_viewport_centre_tile_around_cursor(w, saved_map_x, saved_map_y, offset_x, offset_y);
|
||||
}
|
||||
|
|
|
@ -38,12 +38,12 @@ currency_descriptor CurrencyDescriptors[EnumValue(CurrencyType::Count)] = {
|
|||
|
||||
void currency_load_custom_currency_config()
|
||||
{
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = gConfigGeneral.custom_currency_rate;
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = gConfigGeneral.custom_currency_affix;
|
||||
if (gConfigGeneral.custom_currency_symbol != nullptr)
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = gConfigGeneral.CustomCurrencyRate;
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = gConfigGeneral.CustomCurrencyAffix;
|
||||
if (gConfigGeneral.CustomCurrencySymbol != nullptr)
|
||||
{
|
||||
safe_strcpy(
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, gConfigGeneral.custom_currency_symbol,
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, gConfigGeneral.CustomCurrencySymbol,
|
||||
CURRENCY_SYMBOL_MAX_SIZE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -383,7 +383,7 @@ namespace OpenRCT2
|
|||
|
||||
template<size_t TDecimalPlace, bool TDigitSep, typename T> void FormatCurrency(FormatBuffer& ss, T rawValue)
|
||||
{
|
||||
auto currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.currency_format)];
|
||||
auto currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)];
|
||||
auto value = static_cast<int64_t>(rawValue) * currencyDesc->rate;
|
||||
|
||||
// Negative sign
|
||||
|
@ -533,7 +533,7 @@ namespace OpenRCT2
|
|||
case FormatToken::Velocity:
|
||||
if constexpr (std::is_integral<T>())
|
||||
{
|
||||
switch (gConfigGeneral.measurement_format)
|
||||
switch (gConfigGeneral.MeasurementFormat)
|
||||
{
|
||||
default:
|
||||
case MeasurementFormat::Imperial:
|
||||
|
@ -563,7 +563,7 @@ namespace OpenRCT2
|
|||
case FormatToken::Length:
|
||||
if constexpr (std::is_integral<T>())
|
||||
{
|
||||
switch (gConfigGeneral.measurement_format)
|
||||
switch (gConfigGeneral.MeasurementFormat)
|
||||
{
|
||||
default:
|
||||
case MeasurementFormat::Imperial:
|
||||
|
|
|
@ -424,7 +424,7 @@ void format_readable_speed(char* buf, size_t bufSize, uint64_t sizeBytes)
|
|||
money32 string_to_money(const char* string_to_monetise)
|
||||
{
|
||||
const char* decimal_char = language_get_string(STR_LOCALE_DECIMAL_POINT);
|
||||
const currency_descriptor* currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.currency_format)];
|
||||
const currency_descriptor* currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)];
|
||||
char processedString[128] = {};
|
||||
|
||||
Guard::Assert(strlen(string_to_monetise) < sizeof(processedString));
|
||||
|
@ -521,7 +521,7 @@ void money_to_string(money32 amount, char* buffer_to_put_value_to, size_t buffer
|
|||
return;
|
||||
}
|
||||
|
||||
const currency_descriptor* currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.currency_format)];
|
||||
const currency_descriptor* currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)];
|
||||
|
||||
int sign = amount >= 0 ? 1 : -1;
|
||||
int a = abs(amount) * currencyDesc->rate;
|
||||
|
|
|
@ -631,7 +631,7 @@ void award_update_all()
|
|||
{
|
||||
// Add award
|
||||
_currentAwards.push_back(Award{ 5u, awardType });
|
||||
if (gConfigNotifications.park_award)
|
||||
if (gConfigNotifications.ParkAward)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::Award, AwardNewsStrings[EnumValue(awardType)], 0, {});
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ uint16_t marketing_get_campaign_guest_generation_probability(int32_t campaignTyp
|
|||
|
||||
static void marketing_raise_finished_notification(const MarketingCampaign& campaign)
|
||||
{
|
||||
if (gConfigNotifications.park_marketing_campaign_finished)
|
||||
if (gConfigNotifications.ParkMarketingCampaignFinished)
|
||||
{
|
||||
Formatter ft;
|
||||
// This sets the string parameters for the marketing types that have an argument.
|
||||
|
|
|
@ -272,7 +272,7 @@ void research_finish_item(ResearchItem* researchItem)
|
|||
|
||||
if (!gSilentResearch)
|
||||
{
|
||||
if (gConfigNotifications.ride_researched)
|
||||
if (gConfigNotifications.RideResearched)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::Research, availabilityString, researchItem->rawValue, ft);
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ void research_finish_item(ResearchItem* researchItem)
|
|||
|
||||
if (!gSilentResearch)
|
||||
{
|
||||
if (gConfigNotifications.ride_researched)
|
||||
if (gConfigNotifications.RideResearched)
|
||||
{
|
||||
News::AddItemToQueue(
|
||||
News::ItemType::Research, STR_NEWS_ITEM_RESEARCH_NEW_SCENERY_SET_AVAILABLE, researchItem->rawValue, ft);
|
||||
|
|
|
@ -282,7 +282,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port)
|
|||
// risk of tick collision with the server map and title screen map.
|
||||
GameActions::SuspendQueue();
|
||||
|
||||
auto keyPath = network_get_private_key_path(gConfigNetwork.player_name);
|
||||
auto keyPath = network_get_private_key_path(gConfigNetwork.PlayerName);
|
||||
if (!File::Exists(keyPath))
|
||||
{
|
||||
Console::WriteLine("Generating key... This may take a while");
|
||||
|
@ -310,7 +310,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port)
|
|||
|
||||
const std::string hash = _key.PublicKeyHash();
|
||||
const utf8* publicKeyHash = hash.c_str();
|
||||
keyPath = network_get_public_key_path(gConfigNetwork.player_name, publicKeyHash);
|
||||
keyPath = network_get_public_key_path(gConfigNetwork.PlayerName, publicKeyHash);
|
||||
Console::WriteLine("Key generated, saving public bits as %s", keyPath.c_str());
|
||||
|
||||
try
|
||||
|
@ -372,12 +372,12 @@ bool NetworkBase::BeginServer(uint16_t port, const std::string& address)
|
|||
return false;
|
||||
}
|
||||
|
||||
ServerName = gConfigNetwork.server_name;
|
||||
ServerDescription = gConfigNetwork.server_description;
|
||||
ServerGreeting = gConfigNetwork.server_greeting;
|
||||
ServerProviderName = gConfigNetwork.provider_name;
|
||||
ServerProviderEmail = gConfigNetwork.provider_email;
|
||||
ServerProviderWebsite = gConfigNetwork.provider_website;
|
||||
ServerName = gConfigNetwork.ServerName;
|
||||
ServerDescription = gConfigNetwork.ServerDescription;
|
||||
ServerGreeting = gConfigNetwork.ServerGreeting;
|
||||
ServerProviderName = gConfigNetwork.ProviderName;
|
||||
ServerProviderEmail = gConfigNetwork.ProviderEmail;
|
||||
ServerProviderWebsite = gConfigNetwork.ProviderWebsite;
|
||||
|
||||
IsServerPlayerInvisible = gOpenRCT2Headless;
|
||||
|
||||
|
@ -386,7 +386,7 @@ bool NetworkBase::BeginServer(uint16_t port, const std::string& address)
|
|||
BeginChatLog();
|
||||
BeginServerLog();
|
||||
|
||||
NetworkPlayer* player = AddPlayer(gConfigNetwork.player_name, "");
|
||||
NetworkPlayer* player = AddPlayer(gConfigNetwork.PlayerName, "");
|
||||
player->Flags |= NETWORK_PLAYER_FLAG_ISSERVER;
|
||||
player->Group = 0;
|
||||
player_id = player->Id;
|
||||
|
@ -407,7 +407,7 @@ bool NetworkBase::BeginServer(uint16_t port, const std::string& address)
|
|||
|
||||
status = NETWORK_STATUS_CONNECTED;
|
||||
listening_port = port;
|
||||
_serverState.gamestateSnapshotsEnabled = gConfigNetwork.desync_debugging;
|
||||
_serverState.gamestateSnapshotsEnabled = gConfigNetwork.DesyncDebugging;
|
||||
_advertiser = CreateServerAdvertiser(listening_port);
|
||||
|
||||
game_load_scripts();
|
||||
|
@ -796,7 +796,7 @@ bool NetworkBase::CheckDesynchronizaton()
|
|||
intent.putExtra(INTENT_EXTRA_MESSAGE, std::string{ str_desync });
|
||||
context_open_intent(&intent);
|
||||
|
||||
if (!gConfigNetwork.stay_connected)
|
||||
if (!gConfigNetwork.StayConnected)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
@ -868,12 +868,12 @@ std::string NetworkBase::GenerateAdvertiseKey()
|
|||
|
||||
std::string NetworkBase::GetMasterServerUrl()
|
||||
{
|
||||
if (gConfigNetwork.master_server_url.empty())
|
||||
if (gConfigNetwork.MasterServerUrl.empty())
|
||||
{
|
||||
return OPENRCT2_MASTER_SERVER_URL;
|
||||
}
|
||||
|
||||
return gConfigNetwork.master_server_url;
|
||||
return gConfigNetwork.MasterServerUrl;
|
||||
}
|
||||
|
||||
NetworkGroup* NetworkBase::AddGroup()
|
||||
|
@ -1111,7 +1111,7 @@ void NetworkBase::BeginChatLog()
|
|||
|
||||
void NetworkBase::AppendChatLog(std::string_view s)
|
||||
{
|
||||
if (gConfigNetwork.log_chat && _chat_log_fs.is_open())
|
||||
if (gConfigNetwork.LogChat && _chat_log_fs.is_open())
|
||||
{
|
||||
AppendLog(_chat_log_fs, s);
|
||||
}
|
||||
|
@ -1149,7 +1149,7 @@ void NetworkBase::BeginServerLog()
|
|||
|
||||
void NetworkBase::AppendServerLog(const std::string& s)
|
||||
{
|
||||
if (gConfigNetwork.log_server_actions && _server_log_fs.is_open())
|
||||
if (gConfigNetwork.LogServerActions && _server_log_fs.is_open())
|
||||
{
|
||||
AppendLog(_server_log_fs, s);
|
||||
}
|
||||
|
@ -1583,10 +1583,10 @@ void NetworkBase::Server_Send_SETDISCONNECTMSG(NetworkConnection& connection, co
|
|||
json_t NetworkBase::GetServerInfoAsJson() const
|
||||
{
|
||||
json_t jsonObj = {
|
||||
{ "name", gConfigNetwork.server_name }, { "requiresPassword", _password.size() > 0 },
|
||||
{ "version", network_get_version() }, { "players", GetNumVisiblePlayers() },
|
||||
{ "maxPlayers", gConfigNetwork.maxplayers }, { "description", gConfigNetwork.server_description },
|
||||
{ "greeting", gConfigNetwork.server_greeting }, { "dedicated", gOpenRCT2Headless },
|
||||
{ "name", gConfigNetwork.ServerName }, { "requiresPassword", _password.size() > 0 },
|
||||
{ "version", network_get_version() }, { "players", GetNumVisiblePlayers() },
|
||||
{ "maxPlayers", gConfigNetwork.Maxplayers }, { "description", gConfigNetwork.ServerDescription },
|
||||
{ "greeting", gConfigNetwork.ServerGreeting }, { "dedicated", gOpenRCT2Headless },
|
||||
};
|
||||
return jsonObj;
|
||||
}
|
||||
|
@ -1599,9 +1599,9 @@ void NetworkBase::Server_Send_GAMEINFO(NetworkConnection& connection)
|
|||
|
||||
// Provider details
|
||||
json_t jsonProvider = {
|
||||
{ "name", gConfigNetwork.provider_name },
|
||||
{ "email", gConfigNetwork.provider_email },
|
||||
{ "website", gConfigNetwork.provider_website },
|
||||
{ "name", gConfigNetwork.ProviderName },
|
||||
{ "email", gConfigNetwork.ProviderEmail },
|
||||
{ "website", gConfigNetwork.ProviderWebsite },
|
||||
};
|
||||
|
||||
jsonObj["provider"] = jsonProvider;
|
||||
|
@ -2119,7 +2119,7 @@ std::string NetworkBase::MakePlayerNameUnique(const std::string& name)
|
|||
|
||||
void NetworkBase::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPacket& packet)
|
||||
{
|
||||
auto keyPath = network_get_private_key_path(gConfigNetwork.player_name);
|
||||
auto keyPath = network_get_private_key_path(gConfigNetwork.PlayerName);
|
||||
if (!File::Exists(keyPath))
|
||||
{
|
||||
log_error("Key file (%s) was not found. Restart client to re-generate it.", keyPath.c_str());
|
||||
|
@ -2162,7 +2162,7 @@ void NetworkBase::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPack
|
|||
// when process dump gets collected at some point in future.
|
||||
_key.Unload();
|
||||
|
||||
Client_Send_AUTH(gConfigNetwork.player_name, gCustomPassword, pubkey, signature);
|
||||
Client_Send_AUTH(gConfigNetwork.PlayerName, gCustomPassword, pubkey, signature);
|
||||
}
|
||||
|
||||
void NetworkBase::Server_Handle_REQUEST_GAMESTATE(NetworkConnection& connection, NetworkPacket& packet)
|
||||
|
@ -2561,7 +2561,7 @@ void NetworkBase::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacke
|
|||
if (verified)
|
||||
{
|
||||
log_verbose("Connection %s: Signature verification ok. Hash %s", hostName, hash.c_str());
|
||||
if (gConfigNetwork.known_keys_only && _userManager.GetUserByHash(hash) == nullptr)
|
||||
if (gConfigNetwork.KnownKeysOnly && _userManager.GetUserByHash(hash) == nullptr)
|
||||
{
|
||||
log_verbose("Connection %s: Hash %s, not known", hostName, hash.c_str());
|
||||
connection.AuthStatus = NetworkAuth::UnknownKeyDisallowed;
|
||||
|
@ -2614,7 +2614,7 @@ void NetworkBase::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacke
|
|||
}
|
||||
}
|
||||
|
||||
if (GetNumVisiblePlayers() >= gConfigNetwork.maxplayers)
|
||||
if (GetNumVisiblePlayers() >= gConfigNetwork.Maxplayers)
|
||||
{
|
||||
connection.AuthStatus = NetworkAuth::Full;
|
||||
log_info("Connection %s: Server is full.", hostName);
|
||||
|
@ -3825,7 +3825,7 @@ void network_send_game_action(const GameAction* action)
|
|||
void network_send_password(const std::string& password)
|
||||
{
|
||||
auto& network = OpenRCT2::GetContext()->GetNetwork();
|
||||
const auto keyPath = network_get_private_key_path(gConfigNetwork.player_name);
|
||||
const auto keyPath = network_get_private_key_path(gConfigNetwork.PlayerName);
|
||||
if (!File::Exists(keyPath))
|
||||
{
|
||||
log_error("Private key %s missing! Restart the game to generate it.", keyPath.c_str());
|
||||
|
@ -3848,7 +3848,7 @@ void network_send_password(const std::string& password)
|
|||
// 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(gConfigNetwork.player_name, password, pubkey, signature);
|
||||
network.Client_Send_AUTH(gConfigNetwork.PlayerName, password, pubkey, signature);
|
||||
}
|
||||
|
||||
void network_set_password(const char* password)
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
{
|
||||
UpdateLAN();
|
||||
# ifndef DISABLE_HTTP
|
||||
if (gConfigNetwork.advertise)
|
||||
if (gConfigNetwork.Advertise)
|
||||
{
|
||||
UpdateWAN();
|
||||
}
|
||||
|
@ -179,9 +179,9 @@ private:
|
|||
{ "port", _port },
|
||||
};
|
||||
|
||||
if (!gConfigNetwork.advertise_address.empty())
|
||||
if (!gConfigNetwork.AdvertiseAddress.empty())
|
||||
{
|
||||
body["address"] = gConfigNetwork.advertise_address;
|
||||
body["address"] = gConfigNetwork.AdvertiseAddress;
|
||||
}
|
||||
|
||||
request.body = body.dump();
|
||||
|
@ -335,9 +335,9 @@ private:
|
|||
static std::string GetMasterServerUrl()
|
||||
{
|
||||
std::string result = OPENRCT2_MASTER_SERVER_URL;
|
||||
if (!gConfigNetwork.master_server_url.empty())
|
||||
if (!gConfigNetwork.MasterServerUrl.empty())
|
||||
{
|
||||
result = gConfigNetwork.master_server_url;
|
||||
result = gConfigNetwork.MasterServerUrl;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -361,9 +361,9 @@ std::future<std::vector<ServerListEntry>> ServerList::FetchOnlineServerListAsync
|
|||
auto f = p->get_future();
|
||||
|
||||
std::string masterServerUrl = OPENRCT2_MASTER_SERVER_URL;
|
||||
if (!gConfigNetwork.master_server_url.empty())
|
||||
if (!gConfigNetwork.MasterServerUrl.empty())
|
||||
{
|
||||
masterServerUrl = gConfigNetwork.master_server_url;
|
||||
masterServerUrl = gConfigNetwork.MasterServerUrl;
|
||||
}
|
||||
|
||||
Http::Request request;
|
||||
|
|
|
@ -918,7 +918,7 @@ void PaintDrawMoneyStructs(rct_drawpixelinfo* dpi, PaintStringStruct* ps)
|
|||
|
||||
// Use sprite font unless the currency contains characters unsupported by the sprite font
|
||||
auto forceSpriteFont = false;
|
||||
const auto& currencyDesc = CurrencyDescriptors[EnumValue(gConfigGeneral.currency_format)];
|
||||
const auto& currencyDesc = CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)];
|
||||
if (LocalisationService_UseTrueTypeFont() && font_supports_string_sprite(currencyDesc.symbol_unicode))
|
||||
{
|
||||
forceSpriteFont = true;
|
||||
|
|
|
@ -76,7 +76,7 @@ void Painter::Paint(IDrawingEngine& de)
|
|||
if (text != nullptr)
|
||||
PaintReplayNotice(dpi, text);
|
||||
|
||||
if (gConfigGeneral.show_fps)
|
||||
if (gConfigGeneral.ShowFPS)
|
||||
{
|
||||
PaintFPS(dpi);
|
||||
}
|
||||
|
|
|
@ -402,7 +402,7 @@ void VirtualFloorPaint(PaintSession& session)
|
|||
{ 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NW) ? -2 : 0) });
|
||||
}
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Glassy)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Glassy)
|
||||
return;
|
||||
|
||||
if (!weAreOccupied && !weAreLit && weAreAboveGround && weAreOwned)
|
||||
|
|
|
@ -52,7 +52,7 @@ static void PaintBannerScrollingText(
|
|||
banner.FormatTextTo(ft, true);
|
||||
|
||||
char text[256];
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
if (gConfigGeneral.UpperCaseBanners)
|
||||
{
|
||||
format_string_to_upper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ static void PaintRideEntranceExitScrollingText(
|
|||
}
|
||||
|
||||
char text[256];
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
if (gConfigGeneral.UpperCaseBanners)
|
||||
{
|
||||
format_string_to_upper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ static void PaintParkEntranceScrollingText(
|
|||
}
|
||||
|
||||
char text[256];
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
if (gConfigGeneral.UpperCaseBanners)
|
||||
{
|
||||
format_string_to_upper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
}
|
||||
|
|
|
@ -311,7 +311,7 @@ static void PaintLargeSceneryScrollingText(
|
|||
banner->FormatTextTo(ft);
|
||||
|
||||
char text[256];
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
if (gConfigGeneral.UpperCaseBanners)
|
||||
{
|
||||
format_string_to_upper(text, sizeof(text), STR_SCROLLING_SIGN_TEXT, ft.Data());
|
||||
}
|
||||
|
|
|
@ -455,7 +455,7 @@ static void sub_6A4101(
|
|||
{
|
||||
ft.Add<StringId>(STR_RIDE_ENTRANCE_CLOSED);
|
||||
}
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
if (gConfigGeneral.UpperCaseBanners)
|
||||
{
|
||||
format_string_to_upper(
|
||||
gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, ft.Data());
|
||||
|
|
|
@ -1280,7 +1280,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) && gConfigGeneral.landscape_smoothing)
|
||||
&& !(session.ViewFlags & VIEWPORT_FLAG_HIDE_BASE) && gConfigGeneral.LandscapeSmoothing)
|
||||
{
|
||||
ViewportSurfaceSmoothenEdge(session, EDGE_TOPLEFT, tileDescriptors[0], tileDescriptors[3]);
|
||||
ViewportSurfaceSmoothenEdge(session, EDGE_TOPRIGHT, tileDescriptors[0], tileDescriptors[4]);
|
||||
|
@ -1331,7 +1331,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
|
|||
const auto image_id = ImageId(SPR_WATER_MASK + image_offset, FilterPaletteID::PaletteWater).WithBlended(true);
|
||||
PaintAddImageAsParent(session, image_id, { 0, 0, waterHeight }, { 32, 32, -1 });
|
||||
|
||||
const bool transparent = gConfigGeneral.transparent_water || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE);
|
||||
const bool transparent = gConfigGeneral.TransparentWater || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE);
|
||||
const uint32_t overlayStart = transparent ? SPR_WATER_OVERLAY : SPR_RCT1_WATER_OVERLAY;
|
||||
PaintAttachToPreviousPS(session, ImageId(overlayStart + image_offset), 0, 0);
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor
|
|||
|
||||
bool partOfVirtualFloor = false;
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off)
|
||||
{
|
||||
partOfVirtualFloor = VirtualFloorTileIsFloor(session.MapPosition);
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor
|
|||
session.MapPosition = mapPosition;
|
||||
} while (!(tile_element++)->IsLastForTile());
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off && partOfVirtualFloor)
|
||||
if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off && partOfVirtualFloor)
|
||||
{
|
||||
VirtualFloorPaint(session);
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ static void PaintWallScrollingText(
|
|||
auto ft = Formatter();
|
||||
banner->FormatTextTo(ft);
|
||||
char signString[256];
|
||||
if (gConfigGeneral.upper_case_banners)
|
||||
if (gConfigGeneral.UpperCaseBanners)
|
||||
{
|
||||
format_string_to_upper(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data());
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ static bool OnCrash(
|
|||
}
|
||||
|
||||
auto configFilePathUTF8 = String::ToUtf8(configFilePath);
|
||||
if (config_save(configFilePathUTF8))
|
||||
if (ConfigSave(configFilePathUTF8))
|
||||
{
|
||||
_uploadFiles[L"attachment_config.ini"] = configFilePath;
|
||||
}
|
||||
|
|
|
@ -1564,7 +1564,7 @@ void ride_prepare_breakdown(Ride* ride, int32_t breakdownReason)
|
|||
*/
|
||||
void ride_breakdown_add_news_item(Ride* ride)
|
||||
{
|
||||
if (gConfigNotifications.ride_broken_down)
|
||||
if (gConfigNotifications.RideBrokenDown)
|
||||
{
|
||||
Formatter ft;
|
||||
ride->FormatNameTo(ft);
|
||||
|
@ -1591,7 +1591,7 @@ static void ride_breakdown_status_update(Ride* ride)
|
|||
if (!(ride->not_fixed_timeout & 15) && ride->mechanic_status != RIDE_MECHANIC_STATUS_FIXING
|
||||
&& ride->mechanic_status != RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES)
|
||||
{
|
||||
if (gConfigNotifications.ride_warnings)
|
||||
if (gConfigNotifications.RideWarnings)
|
||||
{
|
||||
Formatter ft;
|
||||
ride->FormatNameTo(ft);
|
||||
|
@ -2280,7 +2280,7 @@ static void ride_entrance_exit_connected(Ride* ride)
|
|||
// name of ride is parameter of the format string
|
||||
Formatter ft;
|
||||
ride->FormatNameTo(ft);
|
||||
if (gConfigNotifications.ride_warnings)
|
||||
if (gConfigNotifications.RideWarnings)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::Ride, STR_ENTRANCE_NOT_CONNECTED, ride->id.ToUnderlying(), ft);
|
||||
}
|
||||
|
@ -2292,7 +2292,7 @@ static void ride_entrance_exit_connected(Ride* ride)
|
|||
// name of ride is parameter of the format string
|
||||
Formatter ft;
|
||||
ride->FormatNameTo(ft);
|
||||
if (gConfigNotifications.ride_warnings)
|
||||
if (gConfigNotifications.RideWarnings)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::Ride, STR_EXIT_NOT_CONNECTED, ride->id.ToUnderlying(), ft);
|
||||
}
|
||||
|
@ -2359,7 +2359,7 @@ static void ride_shop_connected(Ride* ride)
|
|||
}
|
||||
|
||||
// Name of ride is parameter of the format string
|
||||
if (gConfigNotifications.ride_warnings)
|
||||
if (gConfigNotifications.RideWarnings)
|
||||
{
|
||||
Formatter ft;
|
||||
ride->FormatNameTo(ft);
|
||||
|
@ -5284,7 +5284,7 @@ void Ride::SetNumCarsPerVehicle(int32_t numCarsPerVehicle)
|
|||
|
||||
void Ride::SetToDefaultInspectionInterval()
|
||||
{
|
||||
uint8_t defaultInspectionInterval = gConfigGeneral.default_inspection_interval;
|
||||
uint8_t defaultInspectionInterval = gConfigGeneral.DefaultInspectionInterval;
|
||||
if (inspection_interval != defaultInspectionInterval)
|
||||
{
|
||||
if (defaultInspectionInterval <= RIDE_INSPECTION_NEVER)
|
||||
|
@ -5316,7 +5316,7 @@ void Ride::Crash(uint8_t vehicleIndex)
|
|||
}
|
||||
}
|
||||
|
||||
if (gConfigNotifications.ride_crashed)
|
||||
if (gConfigNotifications.RideCrashed)
|
||||
{
|
||||
Formatter ft;
|
||||
FormatNameTo(ft);
|
||||
|
|
|
@ -257,7 +257,7 @@ namespace OpenRCT2::RideAudio
|
|||
return;
|
||||
|
||||
// TODO Allow circus music (CSS24) to play if ride music is disabled (that should be sound)
|
||||
if (gGameSoundsOff || !gConfigSound.ride_music_enabled)
|
||||
if (gGameSoundsOff || !gConfigSound.RideMusicEnabled)
|
||||
return;
|
||||
|
||||
StopInactiveRideMusicChannels();
|
||||
|
|
|
@ -3410,7 +3410,7 @@ void Vehicle::CheckIfMissing()
|
|||
|
||||
curRide->lifecycle_flags |= RIDE_LIFECYCLE_HAS_STALLED_VEHICLE;
|
||||
|
||||
if (gConfigNotifications.ride_stalled_vehicles)
|
||||
if (gConfigNotifications.RideStalledVehicles)
|
||||
{
|
||||
Formatter ft;
|
||||
ft.Add<StringId>(GetRideComponentName(GetRideTypeDescriptor(curRide->type).NameConvention.vehicle).number);
|
||||
|
@ -5168,7 +5168,7 @@ static void ride_train_crash(Ride* ride, uint16_t numFatalities)
|
|||
|
||||
if (numFatalities != 0)
|
||||
{
|
||||
if (gConfigNotifications.ride_casualties)
|
||||
if (gConfigNotifications.RideCasualties)
|
||||
{
|
||||
ride->FormatNameTo(ft);
|
||||
News::AddItemToQueue(
|
||||
|
|
|
@ -7242,7 +7242,7 @@ static void wooden_rc_track_water_splash(
|
|||
PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
|
||||
const TrackElement& trackElement)
|
||||
{
|
||||
const bool transparent = gConfigGeneral.transparent_water || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE);
|
||||
const bool transparent = gConfigGeneral.TransparentWater || (session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE);
|
||||
const auto waterMask = ImageId(SPR_WATER_MASK).WithRemap(FilterPaletteID::PaletteWater).WithBlended(true);
|
||||
const auto waterOverlay = ImageId(transparent ? SPR_WATER_OVERLAY : SPR_RCT1_WATER_OVERLAY);
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ static void scenario_entrance_fee_too_high_check()
|
|||
auto y = entrance.y + 16;
|
||||
|
||||
uint32_t packed_xy = (y << 16) | x;
|
||||
if (gConfigNotifications.park_warnings)
|
||||
if (gConfigNotifications.ParkWarnings)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::Blank, STR_ENTRANCE_FEE_TOO_HI, packed_xy, {});
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ void scenario_autosave_check()
|
|||
uint32_t timeSinceSave = Platform::GetTicks() - gLastAutoSaveUpdate;
|
||||
|
||||
bool shouldSave = false;
|
||||
switch (gConfigGeneral.autosave_frequency)
|
||||
switch (gConfigGeneral.AutosaveFrequency)
|
||||
{
|
||||
case AUTOSAVE_EVERY_MINUTE:
|
||||
shouldSave = timeSinceSave >= 1 * 60 * 1000;
|
||||
|
@ -367,7 +367,7 @@ static void scenario_update_daynight_cycle()
|
|||
float currentDayNightCycle = gDayNightCycle;
|
||||
gDayNightCycle = 0;
|
||||
|
||||
if (gScreenFlags == SCREEN_FLAGS_PLAYING && gConfigGeneral.day_night_cycle)
|
||||
if (gScreenFlags == SCREEN_FLAGS_PLAYING && gConfigGeneral.DayNightCycle)
|
||||
{
|
||||
float monthFraction = gDateMonthTicks / static_cast<float>(TICKS_PER_MONTH);
|
||||
if (monthFraction < (1 / 8.0f))
|
||||
|
@ -700,28 +700,28 @@ ObjectiveStatus Objective::CheckGuestsAndRating() const
|
|||
gScenarioParkRatingWarningDays++;
|
||||
if (gScenarioParkRatingWarningDays == 1)
|
||||
{
|
||||
if (gConfigNotifications.park_rating_warnings)
|
||||
if (gConfigNotifications.ParkRatingWarnings)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_4_WEEKS_REMAINING, 0, {});
|
||||
}
|
||||
}
|
||||
else if (gScenarioParkRatingWarningDays == 8)
|
||||
{
|
||||
if (gConfigNotifications.park_rating_warnings)
|
||||
if (gConfigNotifications.ParkRatingWarnings)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_3_WEEKS_REMAINING, 0, {});
|
||||
}
|
||||
}
|
||||
else if (gScenarioParkRatingWarningDays == 15)
|
||||
{
|
||||
if (gConfigNotifications.park_rating_warnings)
|
||||
if (gConfigNotifications.ParkRatingWarnings)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_2_WEEKS_REMAINING, 0, {});
|
||||
}
|
||||
}
|
||||
else if (gScenarioParkRatingWarningDays == 22)
|
||||
{
|
||||
if (gConfigNotifications.park_rating_warnings)
|
||||
if (gConfigNotifications.ParkRatingWarnings)
|
||||
{
|
||||
News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_1_WEEK_REMAINING, 0, {});
|
||||
}
|
||||
|
@ -862,7 +862,7 @@ bool AllowEarlyCompletion()
|
|||
case NETWORK_MODE_NONE:
|
||||
case NETWORK_MODE_SERVER:
|
||||
default:
|
||||
return gConfigGeneral.allow_early_completion;
|
||||
return gConfigGeneral.AllowEarlyCompletion;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -578,7 +578,7 @@ private:
|
|||
|
||||
void Sort()
|
||||
{
|
||||
if (gConfigGeneral.scenario_select_mode == SCENARIO_SELECT_MODE_ORIGIN)
|
||||
if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN)
|
||||
{
|
||||
std::sort(
|
||||
_scenarios.begin(), _scenarios.end(), [](const scenario_index_entry& a, const scenario_index_entry& b) -> bool {
|
||||
|
|
|
@ -555,7 +555,7 @@ void ScriptEngine::RefreshPlugins()
|
|||
}
|
||||
|
||||
// Turn on hot reload if not already enabled
|
||||
if (!_hotReloadingInitialised && gConfigPlugin.enable_hot_reloading && network_get_mode() == NETWORK_MODE_NONE)
|
||||
if (!_hotReloadingInitialised && gConfigPlugin.EnableHotReloading && network_get_mode() == NETWORK_MODE_NONE)
|
||||
{
|
||||
SetupHotReloading();
|
||||
}
|
||||
|
|
|
@ -173,8 +173,8 @@ namespace OpenRCT2::Scripting
|
|||
DukObject obj(ctx);
|
||||
if (ns == "general")
|
||||
{
|
||||
obj.Set("general.language", gConfigGeneral.language);
|
||||
obj.Set("general.showFps", gConfigGeneral.show_fps);
|
||||
obj.Set("general.language", gConfigGeneral.Language);
|
||||
obj.Set("general.showFps", gConfigGeneral.ShowFPS);
|
||||
}
|
||||
result = obj.Take();
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ namespace OpenRCT2::Scripting
|
|||
}
|
||||
if (key == "general.showFps")
|
||||
{
|
||||
duk_push_boolean(ctx, gConfigGeneral.show_fps);
|
||||
duk_push_boolean(ctx, gConfigGeneral.ShowFPS);
|
||||
return DukValue::take_from_stack(ctx);
|
||||
}
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ namespace OpenRCT2::Scripting
|
|||
{
|
||||
if (key == "general.showFps")
|
||||
{
|
||||
gConfigGeneral.show_fps = value.as_bool();
|
||||
gConfigGeneral.ShowFPS = value.as_bool();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -90,15 +90,15 @@ namespace OpenRCT2::Scripting
|
|||
constexpr char delimiter = ',';
|
||||
size_t start_pos = 0;
|
||||
size_t end_pos = 0;
|
||||
while ((end_pos = gConfigPlugin.allowed_hosts.find(delimiter, start_pos)) != std::string::npos)
|
||||
while ((end_pos = gConfigPlugin.AllowedHosts.find(delimiter, start_pos)) != std::string::npos)
|
||||
{
|
||||
if (host == gConfigPlugin.allowed_hosts.substr(start_pos, end_pos - start_pos))
|
||||
if (host == gConfigPlugin.AllowedHosts.substr(start_pos, end_pos - start_pos))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
start_pos = end_pos + 1;
|
||||
}
|
||||
return host == gConfigPlugin.allowed_hosts.substr(start_pos, gConfigPlugin.allowed_hosts.length() - start_pos);
|
||||
return host == gConfigPlugin.AllowedHosts.substr(start_pos, gConfigPlugin.AllowedHosts.length() - start_pos);
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
@ -201,8 +201,8 @@ void TitleScreen::ChangePresetSequence(size_t preset)
|
|||
}
|
||||
|
||||
const utf8* configId = title_sequence_manager_get_config_id(preset);
|
||||
SafeFree(gConfigInterface.current_title_sequence_preset);
|
||||
gConfigInterface.current_title_sequence_preset = _strdup(configId);
|
||||
SafeFree(gConfigInterface.CurrentTitleSequencePreset);
|
||||
gConfigInterface.CurrentTitleSequencePreset = _strdup(configId);
|
||||
|
||||
if (!_previewingSequence)
|
||||
_currentSequence = preset;
|
||||
|
@ -229,7 +229,7 @@ void TitleScreen::TitleInitialise()
|
|||
{
|
||||
_sequencePlayer = GetContext()->GetUiContext()->GetTitleSequencePlayer();
|
||||
}
|
||||
if (gConfigInterface.random_title_sequence)
|
||||
if (gConfigInterface.RandomTitleSequence)
|
||||
{
|
||||
bool RCT1Installed = false, RCT1AAInstalled = false, RCT1LLInstalled = false;
|
||||
int RCT1Count = 0;
|
||||
|
@ -319,8 +319,8 @@ bool TitleScreen::TryLoadSequence(bool loadPreview)
|
|||
{
|
||||
// Forcefully change the preset to a preset that works.
|
||||
const utf8* configId = title_sequence_manager_get_config_id(targetSequence);
|
||||
SafeFree(gConfigInterface.current_title_sequence_preset);
|
||||
gConfigInterface.current_title_sequence_preset = _strdup(configId);
|
||||
SafeFree(gConfigInterface.CurrentTitleSequencePreset);
|
||||
gConfigInterface.CurrentTitleSequencePreset = _strdup(configId);
|
||||
}
|
||||
_currentSequence = targetSequence;
|
||||
gfx_invalidate_screen();
|
||||
|
@ -397,7 +397,7 @@ void title_set_hide_version_info(bool value)
|
|||
|
||||
size_t title_get_config_sequence()
|
||||
{
|
||||
return title_sequence_manager_get_index_for_config_id(gConfigInterface.current_title_sequence_preset);
|
||||
return title_sequence_manager_get_index_for_config_id(gConfigInterface.CurrentTitleSequencePreset);
|
||||
}
|
||||
|
||||
size_t title_get_current_sequence()
|
||||
|
|
|
@ -391,9 +391,9 @@ static void ClimateUpdateLightning()
|
|||
{
|
||||
if (_lightningTimer == 0)
|
||||
return;
|
||||
if (gConfigGeneral.disable_lightning_effect)
|
||||
if (gConfigGeneral.DisableLightningEffect)
|
||||
return;
|
||||
if (!gConfigGeneral.render_weather_effects && !gConfigGeneral.render_weather_gloom)
|
||||
if (!gConfigGeneral.RenderWeatherEffects && !gConfigGeneral.RenderWeatherGloom)
|
||||
return;
|
||||
|
||||
_lightningTimer--;
|
||||
|
|
|
@ -139,7 +139,7 @@ TEST_F(FormattingTests, comma_large)
|
|||
|
||||
TEST_F(FormattingTests, currency)
|
||||
{
|
||||
gConfigGeneral.currency_format = CurrencyType::Pounds;
|
||||
gConfigGeneral.CurrencyFormat = CurrencyType::Pounds;
|
||||
ASSERT_EQ(u8"-£251", FormatString("{CURRENCY}", -2510));
|
||||
ASSERT_EQ(u8"£1", FormatString("{CURRENCY}", 4));
|
||||
ASSERT_EQ(u8"£1", FormatString("{CURRENCY}", 5));
|
||||
|
@ -150,7 +150,7 @@ TEST_F(FormattingTests, currency)
|
|||
|
||||
TEST_F(FormattingTests, currency2dp)
|
||||
{
|
||||
gConfigGeneral.currency_format = CurrencyType::Pounds;
|
||||
gConfigGeneral.CurrencyFormat = CurrencyType::Pounds;
|
||||
ASSERT_EQ(u8"-£251.00", FormatString("{CURRENCY2DP}", -2510));
|
||||
ASSERT_EQ(u8"£0.40", FormatString("{CURRENCY2DP}", 4));
|
||||
ASSERT_EQ(u8"£0.50", FormatString("{CURRENCY2DP}", 5));
|
||||
|
@ -161,7 +161,7 @@ TEST_F(FormattingTests, currency2dp)
|
|||
|
||||
TEST_F(FormattingTests, currency_yen)
|
||||
{
|
||||
gConfigGeneral.currency_format = CurrencyType::Yen;
|
||||
gConfigGeneral.CurrencyFormat = CurrencyType::Yen;
|
||||
ASSERT_EQ(u8"-¥25,100", FormatString("{CURRENCY}", -2510));
|
||||
ASSERT_EQ(u8"¥40", FormatString("{CURRENCY2DP}", 4));
|
||||
ASSERT_EQ(u8"¥50", FormatString("{CURRENCY2DP}", 5));
|
||||
|
@ -172,7 +172,7 @@ TEST_F(FormattingTests, currency_yen)
|
|||
|
||||
TEST_F(FormattingTests, currency2dp_yen)
|
||||
{
|
||||
gConfigGeneral.currency_format = CurrencyType::Yen;
|
||||
gConfigGeneral.CurrencyFormat = CurrencyType::Yen;
|
||||
ASSERT_EQ(u8"-¥25,100", FormatString("{CURRENCY2DP}", -2510));
|
||||
ASSERT_EQ(u8"¥40", FormatString("{CURRENCY2DP}", 4));
|
||||
ASSERT_EQ(u8"¥50", FormatString("{CURRENCY2DP}", 5));
|
||||
|
@ -183,14 +183,14 @@ TEST_F(FormattingTests, currency2dp_yen)
|
|||
|
||||
TEST_F(FormattingTests, currency_pts)
|
||||
{
|
||||
gConfigGeneral.currency_format = CurrencyType::Peseta;
|
||||
gConfigGeneral.CurrencyFormat = CurrencyType::Peseta;
|
||||
ASSERT_EQ("-251Pts", FormatString("{CURRENCY}", -2510));
|
||||
ASSERT_EQ("112Pts", FormatString("{CURRENCY}", 1111));
|
||||
}
|
||||
|
||||
TEST_F(FormattingTests, currency2dp_pts)
|
||||
{
|
||||
gConfigGeneral.currency_format = CurrencyType::Peseta;
|
||||
gConfigGeneral.CurrencyFormat = CurrencyType::Peseta;
|
||||
ASSERT_EQ("-251.00Pts", FormatString("{CURRENCY2DP}", -2510));
|
||||
ASSERT_EQ("0.40Pts", FormatString("{CURRENCY2DP}", 4));
|
||||
ASSERT_EQ("111.10Pts", FormatString("{CURRENCY2DP}", 1111));
|
||||
|
@ -210,42 +210,42 @@ TEST_F(FormattingTests, escaped_braces)
|
|||
|
||||
TEST_F(FormattingTests, velocity_mph)
|
||||
{
|
||||
gConfigGeneral.measurement_format = MeasurementFormat::Imperial;
|
||||
gConfigGeneral.MeasurementFormat = MeasurementFormat::Imperial;
|
||||
auto actual = FormatString("Train is going at {VELOCITY}.", 1024);
|
||||
ASSERT_EQ("Train is going at 1,024 mph.", actual);
|
||||
}
|
||||
|
||||
TEST_F(FormattingTests, velocity_kph)
|
||||
{
|
||||
gConfigGeneral.measurement_format = MeasurementFormat::Metric;
|
||||
gConfigGeneral.MeasurementFormat = MeasurementFormat::Metric;
|
||||
auto actual = FormatString("Train is going at {VELOCITY}.", 1024);
|
||||
ASSERT_EQ("Train is going at 1,648 km/h.", actual);
|
||||
}
|
||||
|
||||
TEST_F(FormattingTests, velocity_mps)
|
||||
{
|
||||
gConfigGeneral.measurement_format = MeasurementFormat::SI;
|
||||
gConfigGeneral.MeasurementFormat = MeasurementFormat::SI;
|
||||
auto actual = FormatString("Train is going at {VELOCITY}.", 1024);
|
||||
ASSERT_EQ("Train is going at 457.7 m/s.", actual);
|
||||
}
|
||||
|
||||
TEST_F(FormattingTests, length_imperial)
|
||||
{
|
||||
gConfigGeneral.measurement_format = MeasurementFormat::Imperial;
|
||||
gConfigGeneral.MeasurementFormat = MeasurementFormat::Imperial;
|
||||
auto actual = FormatString("Height: {LENGTH}", 1024);
|
||||
ASSERT_EQ("Height: 3,360 ft", actual);
|
||||
}
|
||||
|
||||
TEST_F(FormattingTests, length_metric)
|
||||
{
|
||||
gConfigGeneral.measurement_format = MeasurementFormat::Metric;
|
||||
gConfigGeneral.MeasurementFormat = MeasurementFormat::Metric;
|
||||
auto actual = FormatString("Height: {LENGTH}", 1024);
|
||||
ASSERT_EQ("Height: 1,024 m", actual);
|
||||
}
|
||||
|
||||
TEST_F(FormattingTests, length_si)
|
||||
{
|
||||
gConfigGeneral.measurement_format = MeasurementFormat::SI;
|
||||
gConfigGeneral.MeasurementFormat = MeasurementFormat::SI;
|
||||
auto actual = FormatString("Height: {LENGTH}", 2048);
|
||||
ASSERT_EQ("Height: 2,048 m", actual);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue