forked from rosebudai/OpenRCT2-Web
Rename public general config data members
This commit is contained in:
70 files changed
+625
-627
No files matched your search
@@ -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,9 +351,9 @@ public:
|
||||
{
|
||||
// Update default display index
|
||||
int32_t displayIndex = SDL_GetWindowDisplayIndex(_window);
|
||||
if (displayIndex != gConfigGeneral.default_display)
|
||||
if (displayIndex != gConfigGeneral.DefaultDisplay)
|
||||
{
|
||||
gConfigGeneral.default_display = displayIndex;
|
||||
gConfigGeneral.DefaultDisplay = displayIndex;
|
||||
config_save_default();
|
||||
}
|
||||
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,10 +798,10 @@ 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;
|
||||
gConfigGeneral.WindowWidth = width;
|
||||
gConfigGeneral.WindowHeight = height;
|
||||
config_save_default();
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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,7 +473,7 @@ static void ShortcutOpenSceneryPicker()
|
||||
|
||||
static void ShortcutScaleUp()
|
||||
{
|
||||
gConfigGeneral.window_scale += 0.25f;
|
||||
gConfigGeneral.WindowScale += 0.25f;
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
context_trigger_resize();
|
||||
@@ -482,8 +482,8 @@ static void ShortcutScaleUp()
|
||||
|
||||
static void ShortcutScaleDown()
|
||||
{
|
||||
gConfigGeneral.window_scale -= 0.25f;
|
||||
gConfigGeneral.window_scale = std::max(0.5f, gConfigGeneral.window_scale);
|
||||
gConfigGeneral.WindowScale -= 0.25f;
|
||||
gConfigGeneral.WindowScale = std::max(0.5f, gConfigGeneral.WindowScale);
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
context_trigger_resize();
|
||||
@@ -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,7 +730,7 @@ static void ShortcutToggleTransparentWater()
|
||||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
|
||||
gConfigGeneral.transparent_water ^= 1;
|
||||
gConfigGeneral.TransparentWater ^= 1;
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
|
||||
@@ -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,7 +70,7 @@ public:
|
||||
break;
|
||||
case WIDX_RATE_UP:
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate += 1;
|
||||
gConfigGeneral.custom_currency_rate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
config_save_default();
|
||||
window_invalidate_all();
|
||||
break;
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
if (CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate > 1)
|
||||
{
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate -= 1;
|
||||
gConfigGeneral.custom_currency_rate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
config_save_default();
|
||||
window_invalidate_all();
|
||||
}
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = CurrencyAffix::Suffix;
|
||||
}
|
||||
|
||||
gConfigGeneral.custom_currency_affix = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode;
|
||||
gConfigGeneral.CustomCurrencyAffix = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode;
|
||||
config_save_default();
|
||||
|
||||
window_invalidate_all();
|
||||
@@ -165,7 +165,7 @@ 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();
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
{
|
||||
rate = res.value();
|
||||
CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = rate;
|
||||
gConfigGeneral.custom_currency_rate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate;
|
||||
config_save_default();
|
||||
window_invalidate_all();
|
||||
}
|
||||
|
||||
@@ -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,13 +479,13 @@ 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();
|
||||
WindowLoadsaveSortList();
|
||||
@@ -493,13 +493,13 @@ static void WindowLoadsaveMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
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();
|
||||
WindowLoadsaveSortList();
|
||||
@@ -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;
|
||||
@@ -988,15 +988,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;
|
||||
@@ -1016,7 +1016,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;
|
||||
@@ -1032,9 +1032,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);
|
||||
@@ -1050,12 +1050,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)
|
||||
@@ -1075,7 +1075,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);
|
||||
@@ -1086,7 +1086,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)
|
||||
|
||||
+143
-145
@@ -681,40 +681,40 @@ private:
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_UNCAP_FPS_CHECKBOX:
|
||||
gConfigGeneral.uncap_fps ^= 1;
|
||||
drawing_engine_set_vsync(gConfigGeneral.use_vsync);
|
||||
gConfigGeneral.UncapFPS ^= 1;
|
||||
drawing_engine_set_vsync(gConfigGeneral.UseVSync);
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_USE_VSYNC_CHECKBOX:
|
||||
gConfigGeneral.use_vsync ^= 1;
|
||||
drawing_engine_set_vsync(gConfigGeneral.use_vsync);
|
||||
gConfigGeneral.UseVSync ^= 1;
|
||||
drawing_engine_set_vsync(gConfigGeneral.UseVSync);
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_SHOW_FPS_CHECKBOX:
|
||||
gConfigGeneral.show_fps ^= 1;
|
||||
gConfigGeneral.ShowFPS ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_MULTITHREADING_CHECKBOX:
|
||||
gConfigGeneral.multithreading ^= 1;
|
||||
gConfigGeneral.MultiThreading ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_MINIMIZE_FOCUS_LOSS:
|
||||
gConfigGeneral.minimize_fullscreen_focus_loss ^= 1;
|
||||
gConfigGeneral.MinimizeFullscreenFocusLoss ^= 1;
|
||||
RefreshVideo(false);
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_STEAM_OVERLAY_PAUSE:
|
||||
gConfigGeneral.steam_overlay_pause ^= 1;
|
||||
gConfigGeneral.SteamOverlayPause ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_DISABLE_SCREENSAVER_LOCK:
|
||||
gConfigGeneral.disable_screensaver ^= 1;
|
||||
gConfigGeneral.DisableScreensaver ^= 1;
|
||||
ApplyScreenSaverLockSetting();
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
@@ -744,8 +744,8 @@ private:
|
||||
args[1] = resolution.Width;
|
||||
args[2] = resolution.Height;
|
||||
|
||||
if (resolution.Width == gConfigGeneral.fullscreen_width
|
||||
&& resolution.Height == gConfigGeneral.fullscreen_height)
|
||||
if (resolution.Width == gConfigGeneral.FullscreenWidth
|
||||
&& resolution.Height == gConfigGeneral.FullscreenHeight)
|
||||
{
|
||||
selectedResolution = static_cast<int32_t>(i);
|
||||
}
|
||||
@@ -770,7 +770,7 @@ private:
|
||||
|
||||
ShowDropdown(widget, 3);
|
||||
|
||||
Dropdown::SetChecked(gConfigGeneral.fullscreen_mode, true);
|
||||
Dropdown::SetChecked(gConfigGeneral.FullscreenMode, true);
|
||||
break;
|
||||
case WIDX_DRAWING_ENGINE_DROPDOWN:
|
||||
{
|
||||
@@ -785,19 +785,19 @@ private:
|
||||
gDropdownItems[i].Args = DrawingEngineStringIds[i];
|
||||
}
|
||||
ShowDropdown(widget, numItems);
|
||||
Dropdown::SetChecked(EnumValue(gConfigGeneral.drawing_engine), true);
|
||||
Dropdown::SetChecked(EnumValue(gConfigGeneral.DrawingEngine), true);
|
||||
break;
|
||||
}
|
||||
case WIDX_SCALE_UP:
|
||||
gConfigGeneral.window_scale += 0.25f;
|
||||
gConfigGeneral.WindowScale += 0.25f;
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
context_trigger_resize();
|
||||
context_update_cursor_scale();
|
||||
break;
|
||||
case WIDX_SCALE_DOWN:
|
||||
gConfigGeneral.window_scale -= 0.25f;
|
||||
gConfigGeneral.window_scale = std::max(0.5f, gConfigGeneral.window_scale);
|
||||
gConfigGeneral.WindowScale -= 0.25f;
|
||||
gConfigGeneral.WindowScale = std::max(0.5f, gConfigGeneral.WindowScale);
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
context_trigger_resize();
|
||||
@@ -815,13 +815,12 @@ private:
|
||||
const auto& resolutions = OpenRCT2::GetContext()->GetUiContext()->GetFullscreenResolutions();
|
||||
|
||||
const Resolution& resolution = resolutions[dropdownIndex];
|
||||
if (resolution.Width != gConfigGeneral.fullscreen_width
|
||||
|| resolution.Height != gConfigGeneral.fullscreen_height)
|
||||
if (resolution.Width != gConfigGeneral.FullscreenWidth || resolution.Height != gConfigGeneral.FullscreenHeight)
|
||||
{
|
||||
gConfigGeneral.fullscreen_width = resolution.Width;
|
||||
gConfigGeneral.fullscreen_height = resolution.Height;
|
||||
gConfigGeneral.FullscreenWidth = resolution.Width;
|
||||
gConfigGeneral.FullscreenHeight = resolution.Height;
|
||||
|
||||
if (gConfigGeneral.fullscreen_mode == static_cast<int32_t>(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN))
|
||||
if (gConfigGeneral.FullscreenMode == static_cast<int32_t>(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN))
|
||||
context_set_fullscreen_mode(static_cast<int32_t>(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN));
|
||||
|
||||
config_save_default();
|
||||
@@ -830,22 +829,22 @@ private:
|
||||
}
|
||||
break;
|
||||
case WIDX_FULLSCREEN_DROPDOWN:
|
||||
if (dropdownIndex != gConfigGeneral.fullscreen_mode)
|
||||
if (dropdownIndex != gConfigGeneral.FullscreenMode)
|
||||
{
|
||||
context_set_fullscreen_mode(dropdownIndex);
|
||||
|
||||
gConfigGeneral.fullscreen_mode = static_cast<uint8_t>(dropdownIndex);
|
||||
gConfigGeneral.FullscreenMode = static_cast<uint8_t>(dropdownIndex);
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
break;
|
||||
case WIDX_DRAWING_ENGINE_DROPDOWN:
|
||||
if (dropdownIndex != EnumValue(gConfigGeneral.drawing_engine))
|
||||
if (dropdownIndex != EnumValue(gConfigGeneral.DrawingEngine))
|
||||
{
|
||||
DrawingEngine srcEngine = drawing_engine_get_type();
|
||||
DrawingEngine dstEngine = static_cast<DrawingEngine>(dropdownIndex);
|
||||
|
||||
gConfigGeneral.drawing_engine = dstEngine;
|
||||
gConfigGeneral.DrawingEngine = dstEngine;
|
||||
bool recreate_window = drawing_engine_requires_new_window(srcEngine, dstEngine);
|
||||
RefreshVideo(recreate_window);
|
||||
config_save_default();
|
||||
@@ -860,11 +859,11 @@ private:
|
||||
// Resolution dropdown caption.
|
||||
auto ft = Formatter::Common();
|
||||
ft.Increment(16);
|
||||
ft.Add<uint16_t>(static_cast<uint16_t>(gConfigGeneral.fullscreen_width));
|
||||
ft.Add<uint16_t>(static_cast<uint16_t>(gConfigGeneral.fullscreen_height));
|
||||
ft.Add<uint16_t>(static_cast<uint16_t>(gConfigGeneral.FullscreenWidth));
|
||||
ft.Add<uint16_t>(static_cast<uint16_t>(gConfigGeneral.FullscreenHeight));
|
||||
|
||||
// Disable resolution dropdown on "Windowed" and "Fullscreen (desktop)"
|
||||
if (gConfigGeneral.fullscreen_mode != static_cast<int32_t>(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN))
|
||||
if (gConfigGeneral.FullscreenMode != static_cast<int32_t>(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN))
|
||||
{
|
||||
disabled_widgets |= (1ULL << WIDX_RESOLUTION_DROPDOWN);
|
||||
disabled_widgets |= (1ULL << WIDX_RESOLUTION);
|
||||
@@ -878,7 +877,7 @@ private:
|
||||
}
|
||||
|
||||
// Disable Steam Overlay checkbox when using software or OpenGL rendering.
|
||||
if (gConfigGeneral.drawing_engine == DrawingEngine::Software || gConfigGeneral.drawing_engine == DrawingEngine::OpenGL)
|
||||
if (gConfigGeneral.DrawingEngine == DrawingEngine::Software || gConfigGeneral.DrawingEngine == DrawingEngine::OpenGL)
|
||||
{
|
||||
disabled_widgets |= (1ULL << WIDX_STEAM_OVERLAY_PAUSE);
|
||||
}
|
||||
@@ -888,7 +887,7 @@ private:
|
||||
}
|
||||
|
||||
// Disable changing VSync for Software engine, as we can't control its use of VSync
|
||||
if (gConfigGeneral.drawing_engine == DrawingEngine::Software)
|
||||
if (gConfigGeneral.DrawingEngine == DrawingEngine::Software)
|
||||
{
|
||||
disabled_widgets |= (1ULL << WIDX_USE_VSYNC_CHECKBOX);
|
||||
}
|
||||
@@ -897,23 +896,23 @@ private:
|
||||
disabled_widgets &= ~(1ULL << WIDX_USE_VSYNC_CHECKBOX);
|
||||
}
|
||||
|
||||
SetCheckboxValue(WIDX_UNCAP_FPS_CHECKBOX, gConfigGeneral.uncap_fps);
|
||||
SetCheckboxValue(WIDX_USE_VSYNC_CHECKBOX, gConfigGeneral.use_vsync);
|
||||
SetCheckboxValue(WIDX_SHOW_FPS_CHECKBOX, gConfigGeneral.show_fps);
|
||||
SetCheckboxValue(WIDX_MULTITHREADING_CHECKBOX, gConfigGeneral.multithreading);
|
||||
SetCheckboxValue(WIDX_MINIMIZE_FOCUS_LOSS, gConfigGeneral.minimize_fullscreen_focus_loss);
|
||||
SetCheckboxValue(WIDX_STEAM_OVERLAY_PAUSE, gConfigGeneral.steam_overlay_pause);
|
||||
SetCheckboxValue(WIDX_DISABLE_SCREENSAVER_LOCK, gConfigGeneral.disable_screensaver);
|
||||
SetCheckboxValue(WIDX_UNCAP_FPS_CHECKBOX, gConfigGeneral.UncapFPS);
|
||||
SetCheckboxValue(WIDX_USE_VSYNC_CHECKBOX, gConfigGeneral.UseVSync);
|
||||
SetCheckboxValue(WIDX_SHOW_FPS_CHECKBOX, gConfigGeneral.ShowFPS);
|
||||
SetCheckboxValue(WIDX_MULTITHREADING_CHECKBOX, gConfigGeneral.MultiThreading);
|
||||
SetCheckboxValue(WIDX_MINIMIZE_FOCUS_LOSS, gConfigGeneral.MinimizeFullscreenFocusLoss);
|
||||
SetCheckboxValue(WIDX_STEAM_OVERLAY_PAUSE, gConfigGeneral.SteamOverlayPause);
|
||||
SetCheckboxValue(WIDX_DISABLE_SCREENSAVER_LOCK, gConfigGeneral.DisableScreensaver);
|
||||
|
||||
// Dropdown captions for straightforward strings.
|
||||
widgets[WIDX_FULLSCREEN].text = FullscreenModeNames[gConfigGeneral.fullscreen_mode];
|
||||
widgets[WIDX_DRAWING_ENGINE].text = DrawingEngineStringIds[EnumValue(gConfigGeneral.drawing_engine)];
|
||||
widgets[WIDX_FULLSCREEN].text = FullscreenModeNames[gConfigGeneral.FullscreenMode];
|
||||
widgets[WIDX_DRAWING_ENGINE].text = DrawingEngineStringIds[EnumValue(gConfigGeneral.DrawingEngine)];
|
||||
}
|
||||
|
||||
void DisplayDraw(rct_drawpixelinfo* dpi)
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(static_cast<int32_t>(gConfigGeneral.window_scale * 100));
|
||||
ft.Add<int32_t>(static_cast<int32_t>(gConfigGeneral.WindowScale * 100));
|
||||
DrawTextBasic(
|
||||
dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_SCALE].left + 1, widgets[WIDX_SCALE].top + 1 },
|
||||
STR_WINDOW_COLOUR_2_COMMA2DP32, ft, { colours[1] });
|
||||
@@ -926,19 +925,19 @@ private:
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_TILE_SMOOTHING_CHECKBOX:
|
||||
gConfigGeneral.landscape_smoothing ^= 1;
|
||||
gConfigGeneral.LandscapeSmoothing ^= 1;
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
break;
|
||||
case WIDX_GRIDLINES_CHECKBOX:
|
||||
{
|
||||
gConfigGeneral.always_show_gridlines ^= 1;
|
||||
gConfigGeneral.AlwaysShowGridlines ^= 1;
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
rct_window* mainWindow = window_get_main();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
if (gConfigGeneral.always_show_gridlines)
|
||||
if (gConfigGeneral.AlwaysShowGridlines)
|
||||
mainWindow->viewport->flags |= VIEWPORT_FLAG_GRIDLINES;
|
||||
else
|
||||
mainWindow->viewport->flags &= ~VIEWPORT_FLAG_GRIDLINES;
|
||||
@@ -946,45 +945,45 @@ private:
|
||||
break;
|
||||
}
|
||||
case WIDX_DAY_NIGHT_CHECKBOX:
|
||||
gConfigGeneral.day_night_cycle ^= 1;
|
||||
gConfigGeneral.DayNightCycle ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_ENABLE_LIGHT_FX_CHECKBOX:
|
||||
gConfigGeneral.enable_light_fx ^= 1;
|
||||
gConfigGeneral.EnableLightFx ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX:
|
||||
gConfigGeneral.enable_light_fx_for_vehicles ^= 1;
|
||||
gConfigGeneral.EnableLightFxForVehicles ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_UPPER_CASE_BANNERS_CHECKBOX:
|
||||
gConfigGeneral.upper_case_banners ^= 1;
|
||||
gConfigGeneral.UpperCaseBanners ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
scrolling_text_invalidate();
|
||||
break;
|
||||
case WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX:
|
||||
gConfigGeneral.disable_lightning_effect ^= 1;
|
||||
gConfigGeneral.DisableLightningEffect ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_RENDER_WEATHER_EFFECTS_CHECKBOX:
|
||||
gConfigGeneral.render_weather_effects ^= 1;
|
||||
gConfigGeneral.render_weather_gloom = gConfigGeneral.render_weather_effects;
|
||||
gConfigGeneral.RenderWeatherEffects ^= 1;
|
||||
gConfigGeneral.RenderWeatherGloom = gConfigGeneral.RenderWeatherEffects;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
gfx_invalidate_screen();
|
||||
break;
|
||||
case WIDX_SHOW_GUEST_PURCHASES_CHECKBOX:
|
||||
gConfigGeneral.show_guest_purchases ^= 1;
|
||||
gConfigGeneral.ShowGuestPurchases ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_TRANSPARENT_SCREENSHOTS_CHECKBOX:
|
||||
gConfigGeneral.transparent_screenshot ^= 1;
|
||||
gConfigGeneral.TransparentScreenshot ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
@@ -1006,7 +1005,7 @@ private:
|
||||
rct_widget* widget = &widgets[widgetIndex - 1];
|
||||
ShowDropdown(widget, 3);
|
||||
|
||||
Dropdown::SetChecked(static_cast<int32_t>(gConfigGeneral.virtual_floor_style), true);
|
||||
Dropdown::SetChecked(static_cast<int32_t>(gConfigGeneral.VirtualFloorStyle), true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1016,7 +1015,7 @@ private:
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_VIRTUAL_FLOOR_DROPDOWN:
|
||||
gConfigGeneral.virtual_floor_style = static_cast<VirtualFloorStyles>(dropdownIndex);
|
||||
gConfigGeneral.VirtualFloorStyle = static_cast<VirtualFloorStyles>(dropdownIndex);
|
||||
config_save_default();
|
||||
break;
|
||||
}
|
||||
@@ -1024,12 +1023,12 @@ private:
|
||||
|
||||
void RenderingPrepareDraw()
|
||||
{
|
||||
SetCheckboxValue(WIDX_TILE_SMOOTHING_CHECKBOX, gConfigGeneral.landscape_smoothing);
|
||||
SetCheckboxValue(WIDX_GRIDLINES_CHECKBOX, gConfigGeneral.always_show_gridlines);
|
||||
SetCheckboxValue(WIDX_DAY_NIGHT_CHECKBOX, gConfigGeneral.day_night_cycle);
|
||||
SetCheckboxValue(WIDX_SHOW_GUEST_PURCHASES_CHECKBOX, gConfigGeneral.show_guest_purchases);
|
||||
SetCheckboxValue(WIDX_TRANSPARENT_SCREENSHOTS_CHECKBOX, gConfigGeneral.transparent_screenshot);
|
||||
SetCheckboxValue(WIDX_UPPER_CASE_BANNERS_CHECKBOX, gConfigGeneral.upper_case_banners);
|
||||
SetCheckboxValue(WIDX_TILE_SMOOTHING_CHECKBOX, gConfigGeneral.LandscapeSmoothing);
|
||||
SetCheckboxValue(WIDX_GRIDLINES_CHECKBOX, gConfigGeneral.AlwaysShowGridlines);
|
||||
SetCheckboxValue(WIDX_DAY_NIGHT_CHECKBOX, gConfigGeneral.DayNightCycle);
|
||||
SetCheckboxValue(WIDX_SHOW_GUEST_PURCHASES_CHECKBOX, gConfigGeneral.ShowGuestPurchases);
|
||||
SetCheckboxValue(WIDX_TRANSPARENT_SCREENSHOTS_CHECKBOX, gConfigGeneral.TransparentScreenshot);
|
||||
SetCheckboxValue(WIDX_UPPER_CASE_BANNERS_CHECKBOX, gConfigGeneral.UpperCaseBanners);
|
||||
|
||||
static constexpr StringId _virtualFloorStyleStrings[] = {
|
||||
STR_VIRTUAL_FLOOR_STYLE_DISABLED,
|
||||
@@ -1037,36 +1036,36 @@ private:
|
||||
STR_VIRTUAL_FLOOR_STYLE_GLASSY,
|
||||
};
|
||||
|
||||
widgets[WIDX_VIRTUAL_FLOOR].text = _virtualFloorStyleStrings[static_cast<int32_t>(gConfigGeneral.virtual_floor_style)];
|
||||
widgets[WIDX_VIRTUAL_FLOOR].text = _virtualFloorStyleStrings[static_cast<int32_t>(gConfigGeneral.VirtualFloorStyle)];
|
||||
|
||||
SetCheckboxValue(WIDX_ENABLE_LIGHT_FX_CHECKBOX, gConfigGeneral.enable_light_fx);
|
||||
if (gConfigGeneral.day_night_cycle && gConfigGeneral.drawing_engine == DrawingEngine::SoftwareWithHardwareDisplay)
|
||||
SetCheckboxValue(WIDX_ENABLE_LIGHT_FX_CHECKBOX, gConfigGeneral.EnableLightFx);
|
||||
if (gConfigGeneral.DayNightCycle && gConfigGeneral.DrawingEngine == DrawingEngine::SoftwareWithHardwareDisplay)
|
||||
{
|
||||
disabled_widgets &= ~(1ULL << WIDX_ENABLE_LIGHT_FX_CHECKBOX);
|
||||
}
|
||||
else
|
||||
{
|
||||
disabled_widgets |= (1ULL << WIDX_ENABLE_LIGHT_FX_CHECKBOX);
|
||||
gConfigGeneral.enable_light_fx = false;
|
||||
gConfigGeneral.EnableLightFx = false;
|
||||
}
|
||||
|
||||
SetCheckboxValue(WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX, gConfigGeneral.enable_light_fx_for_vehicles);
|
||||
if (gConfigGeneral.day_night_cycle && gConfigGeneral.drawing_engine == DrawingEngine::SoftwareWithHardwareDisplay
|
||||
&& gConfigGeneral.enable_light_fx)
|
||||
SetCheckboxValue(WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX, gConfigGeneral.EnableLightFxForVehicles);
|
||||
if (gConfigGeneral.DayNightCycle && gConfigGeneral.DrawingEngine == DrawingEngine::SoftwareWithHardwareDisplay
|
||||
&& gConfigGeneral.EnableLightFx)
|
||||
{
|
||||
disabled_widgets &= ~(1ULL << WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX);
|
||||
}
|
||||
else
|
||||
{
|
||||
disabled_widgets |= (1ULL << WIDX_ENABLE_LIGHT_FX_FOR_VEHICLES_CHECKBOX);
|
||||
gConfigGeneral.enable_light_fx_for_vehicles = false;
|
||||
gConfigGeneral.EnableLightFxForVehicles = false;
|
||||
}
|
||||
|
||||
WidgetSetCheckboxValue(
|
||||
*this, WIDX_RENDER_WEATHER_EFFECTS_CHECKBOX,
|
||||
gConfigGeneral.render_weather_effects || gConfigGeneral.render_weather_gloom);
|
||||
SetCheckboxValue(WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX, gConfigGeneral.disable_lightning_effect);
|
||||
if (!gConfigGeneral.render_weather_effects && !gConfigGeneral.render_weather_gloom)
|
||||
gConfigGeneral.RenderWeatherEffects || gConfigGeneral.RenderWeatherGloom);
|
||||
SetCheckboxValue(WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX, gConfigGeneral.DisableLightningEffect);
|
||||
if (!gConfigGeneral.RenderWeatherEffects && !gConfigGeneral.RenderWeatherGloom)
|
||||
{
|
||||
SetCheckboxValue(WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX, true);
|
||||
disabled_widgets |= (1ULL << WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX);
|
||||
@@ -1094,7 +1093,7 @@ private:
|
||||
|
||||
ShowDropdown(widget, 2);
|
||||
|
||||
Dropdown::SetChecked(gConfigGeneral.show_height_as_units ? 0 : 1, true);
|
||||
Dropdown::SetChecked(gConfigGeneral.ShowHeightAsUnits ? 0 : 1, true);
|
||||
break;
|
||||
case WIDX_CURRENCY_DROPDOWN:
|
||||
{
|
||||
@@ -1117,13 +1116,13 @@ private:
|
||||
|
||||
ShowDropdown(widget, numItems);
|
||||
|
||||
if (gConfigGeneral.currency_format == CurrencyType::Custom)
|
||||
if (gConfigGeneral.CurrencyFormat == CurrencyType::Custom)
|
||||
{
|
||||
Dropdown::SetChecked(EnumValue(gConfigGeneral.currency_format) + 1, true);
|
||||
Dropdown::SetChecked(EnumValue(gConfigGeneral.CurrencyFormat) + 1, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Dropdown::SetChecked(EnumValue(gConfigGeneral.currency_format), true);
|
||||
Dropdown::SetChecked(EnumValue(gConfigGeneral.CurrencyFormat), true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1137,7 +1136,7 @@ private:
|
||||
|
||||
ShowDropdown(widget, 3);
|
||||
|
||||
Dropdown::SetChecked(static_cast<int32_t>(gConfigGeneral.measurement_format), true);
|
||||
Dropdown::SetChecked(static_cast<int32_t>(gConfigGeneral.MeasurementFormat), true);
|
||||
break;
|
||||
case WIDX_TEMPERATURE_DROPDOWN:
|
||||
gDropdownItems[0].Format = STR_DROPDOWN_MENU_LABEL;
|
||||
@@ -1147,7 +1146,7 @@ private:
|
||||
|
||||
ShowDropdown(widget, 2);
|
||||
|
||||
Dropdown::SetChecked(static_cast<int32_t>(gConfigGeneral.temperature_format), true);
|
||||
Dropdown::SetChecked(static_cast<int32_t>(gConfigGeneral.TemperatureFormat), true);
|
||||
break;
|
||||
case WIDX_LANGUAGE_DROPDOWN:
|
||||
for (size_t i = 1; i < LANGUAGE_COUNT; i++)
|
||||
@@ -1165,7 +1164,7 @@ private:
|
||||
gDropdownItems[i].Args = DateFormatStringIds[i];
|
||||
}
|
||||
ShowDropdown(widget, 4);
|
||||
Dropdown::SetChecked(gConfigGeneral.date_format, true);
|
||||
Dropdown::SetChecked(gConfigGeneral.DateFormat, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1176,11 +1175,11 @@ private:
|
||||
{
|
||||
case WIDX_HEIGHT_LABELS_DROPDOWN:
|
||||
// reset flag and set it to 1 if height as units is selected
|
||||
gConfigGeneral.show_height_as_units = 0;
|
||||
gConfigGeneral.ShowHeightAsUnits = 0;
|
||||
|
||||
if (dropdownIndex == 0)
|
||||
{
|
||||
gConfigGeneral.show_height_as_units = 1;
|
||||
gConfigGeneral.ShowHeightAsUnits = 1;
|
||||
}
|
||||
config_save_default();
|
||||
UpdateHeightMarkers();
|
||||
@@ -1188,25 +1187,25 @@ private:
|
||||
case WIDX_CURRENCY_DROPDOWN:
|
||||
if (dropdownIndex == EnumValue(CurrencyType::Custom) + 1)
|
||||
{ // Add 1 because the separator occupies a position
|
||||
gConfigGeneral.currency_format = static_cast<CurrencyType>(dropdownIndex - 1);
|
||||
gConfigGeneral.CurrencyFormat = static_cast<CurrencyType>(dropdownIndex - 1);
|
||||
context_open_window(WindowClass::CustomCurrencyConfig);
|
||||
}
|
||||
else
|
||||
{
|
||||
gConfigGeneral.currency_format = static_cast<CurrencyType>(dropdownIndex);
|
||||
gConfigGeneral.CurrencyFormat = static_cast<CurrencyType>(dropdownIndex);
|
||||
}
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
break;
|
||||
case WIDX_DISTANCE_DROPDOWN:
|
||||
gConfigGeneral.measurement_format = static_cast<MeasurementFormat>(dropdownIndex);
|
||||
gConfigGeneral.MeasurementFormat = static_cast<MeasurementFormat>(dropdownIndex);
|
||||
config_save_default();
|
||||
UpdateHeightMarkers();
|
||||
break;
|
||||
case WIDX_TEMPERATURE_DROPDOWN:
|
||||
if (dropdownIndex != static_cast<int32_t>(gConfigGeneral.temperature_format))
|
||||
if (dropdownIndex != static_cast<int32_t>(gConfigGeneral.TemperatureFormat))
|
||||
{
|
||||
gConfigGeneral.temperature_format = static_cast<TemperatureUnit>(dropdownIndex);
|
||||
gConfigGeneral.TemperatureFormat = static_cast<TemperatureUnit>(dropdownIndex);
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
@@ -1230,7 +1229,7 @@ private:
|
||||
}
|
||||
else
|
||||
{
|
||||
gConfigGeneral.language = dropdownIndex + 1;
|
||||
gConfigGeneral.Language = dropdownIndex + 1;
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
@@ -1238,9 +1237,9 @@ private:
|
||||
}
|
||||
break;
|
||||
case WIDX_DATE_FORMAT_DROPDOWN:
|
||||
if (dropdownIndex != gConfigGeneral.date_format)
|
||||
if (dropdownIndex != gConfigGeneral.DateFormat)
|
||||
{
|
||||
gConfigGeneral.date_format = static_cast<uint8_t>(dropdownIndex);
|
||||
gConfigGeneral.DateFormat = static_cast<uint8_t>(dropdownIndex);
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
@@ -1255,12 +1254,12 @@ private:
|
||||
ft.Add<char*>(LanguagesDescriptors[LocalisationService_GetCurrentLanguage()].native_name);
|
||||
|
||||
// Currency: pounds, dollars, etc. (10 total)
|
||||
widgets[WIDX_CURRENCY].text = CurrencyDescriptors[EnumValue(gConfigGeneral.currency_format)].stringId;
|
||||
widgets[WIDX_CURRENCY].text = CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)].stringId;
|
||||
|
||||
// Distance: metric / imperial / si
|
||||
{
|
||||
StringId stringId = STR_NONE;
|
||||
switch (gConfigGeneral.measurement_format)
|
||||
switch (gConfigGeneral.MeasurementFormat)
|
||||
{
|
||||
case MeasurementFormat::Imperial:
|
||||
stringId = STR_IMPERIAL;
|
||||
@@ -1276,14 +1275,14 @@ private:
|
||||
}
|
||||
|
||||
// Date format
|
||||
widgets[WIDX_DATE_FORMAT].text = DateFormatStringIds[gConfigGeneral.date_format];
|
||||
widgets[WIDX_DATE_FORMAT].text = DateFormatStringIds[gConfigGeneral.DateFormat];
|
||||
|
||||
// Temperature: celsius/fahrenheit
|
||||
widgets[WIDX_TEMPERATURE].text = gConfigGeneral.temperature_format == TemperatureUnit::Fahrenheit ? STR_FAHRENHEIT
|
||||
: STR_CELSIUS;
|
||||
widgets[WIDX_TEMPERATURE].text = gConfigGeneral.TemperatureFormat == TemperatureUnit::Fahrenheit ? STR_FAHRENHEIT
|
||||
: STR_CELSIUS;
|
||||
|
||||
// Height: units/real values
|
||||
widgets[WIDX_HEIGHT_LABELS].text = gConfigGeneral.show_height_as_units ? STR_HEIGHT_IN_UNITS : STR_REAL_VALUES;
|
||||
widgets[WIDX_HEIGHT_LABELS].text = gConfigGeneral.ShowHeightAsUnits ? STR_HEIGHT_IN_UNITS : STR_REAL_VALUES;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
@@ -1534,18 +1533,18 @@ private:
|
||||
context_open_window(WindowClass::KeyboardShortcutList);
|
||||
break;
|
||||
case WIDX_SCREEN_EDGE_SCROLLING:
|
||||
gConfigGeneral.edge_scrolling ^= 1;
|
||||
gConfigGeneral.EdgeScrolling ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_TRAP_CURSOR:
|
||||
gConfigGeneral.trap_cursor ^= 1;
|
||||
gConfigGeneral.TrapCursor ^= 1;
|
||||
config_save_default();
|
||||
context_set_cursor_trap(gConfigGeneral.trap_cursor);
|
||||
context_set_cursor_trap(gConfigGeneral.TrapCursor);
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_ZOOM_TO_CURSOR:
|
||||
gConfigGeneral.zoom_to_cursor ^= 1;
|
||||
gConfigGeneral.ZoomToCursor ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
@@ -1592,7 +1591,7 @@ private:
|
||||
window_invalidate_by_class(WindowClass::TopToolbar);
|
||||
break;
|
||||
case WIDX_INVERT_DRAG:
|
||||
gConfigGeneral.invert_viewport_drag ^= 1;
|
||||
gConfigGeneral.InvertViewportDrag ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
@@ -1644,10 +1643,10 @@ private:
|
||||
|
||||
void ControlsPrepareDraw()
|
||||
{
|
||||
SetCheckboxValue(WIDX_SCREEN_EDGE_SCROLLING, gConfigGeneral.edge_scrolling);
|
||||
SetCheckboxValue(WIDX_TRAP_CURSOR, gConfigGeneral.trap_cursor);
|
||||
SetCheckboxValue(WIDX_INVERT_DRAG, gConfigGeneral.invert_viewport_drag);
|
||||
SetCheckboxValue(WIDX_ZOOM_TO_CURSOR, gConfigGeneral.zoom_to_cursor);
|
||||
SetCheckboxValue(WIDX_SCREEN_EDGE_SCROLLING, gConfigGeneral.EdgeScrolling);
|
||||
SetCheckboxValue(WIDX_TRAP_CURSOR, gConfigGeneral.TrapCursor);
|
||||
SetCheckboxValue(WIDX_INVERT_DRAG, gConfigGeneral.InvertViewportDrag);
|
||||
SetCheckboxValue(WIDX_ZOOM_TO_CURSOR, gConfigGeneral.ZoomToCursor);
|
||||
SetCheckboxValue(WIDX_TOOLBAR_SHOW_FINANCES, gConfigInterface.toolbar_show_finances);
|
||||
SetCheckboxValue(WIDX_TOOLBAR_SHOW_RESEARCH, gConfigInterface.toolbar_show_research);
|
||||
SetCheckboxValue(WIDX_TOOLBAR_SHOW_CHEATS, gConfigInterface.toolbar_show_cheats);
|
||||
@@ -1670,34 +1669,34 @@ private:
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_REAL_NAME_CHECKBOX:
|
||||
gConfigGeneral.show_real_names_of_guests ^= 1;
|
||||
gConfigGeneral.ShowRealNamesOfGuests ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
peep_update_names(gConfigGeneral.show_real_names_of_guests);
|
||||
peep_update_names(gConfigGeneral.ShowRealNamesOfGuests);
|
||||
break;
|
||||
case WIDX_AUTO_STAFF_PLACEMENT:
|
||||
gConfigGeneral.auto_staff_placement ^= 1;
|
||||
gConfigGeneral.AutoStaffPlacement ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_SCENARIO_UNLOCKING:
|
||||
gConfigGeneral.scenario_unlocking_enabled ^= 1;
|
||||
gConfigGeneral.ScenarioUnlockingEnabled ^= 1;
|
||||
config_save_default();
|
||||
window_close_by_class(WindowClass::ScenarioSelect);
|
||||
break;
|
||||
case WIDX_AUTO_OPEN_SHOPS:
|
||||
gConfigGeneral.auto_open_shops = !gConfigGeneral.auto_open_shops;
|
||||
gConfigGeneral.AutoOpenShops = !gConfigGeneral.AutoOpenShops;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_ALLOW_EARLY_COMPLETION:
|
||||
gConfigGeneral.allow_early_completion ^= 1;
|
||||
gConfigGeneral.AllowEarlyCompletion ^= 1;
|
||||
// Only the server can control this setting and needs to send the
|
||||
// current value of allow_early_completion to all clients
|
||||
if (network_get_mode() == NETWORK_MODE_SERVER)
|
||||
{
|
||||
auto setAllowEarlyCompletionAction = ScenarioSetSettingAction(
|
||||
ScenarioSetSetting::AllowEarlyCompletion, gConfigGeneral.allow_early_completion);
|
||||
ScenarioSetSetting::AllowEarlyCompletion, gConfigGeneral.AllowEarlyCompletion);
|
||||
GameActions::Execute(&setAllowEarlyCompletionAction);
|
||||
}
|
||||
config_save_default();
|
||||
@@ -1750,7 +1749,7 @@ private:
|
||||
{ windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0,
|
||||
Dropdown::Flag::StayOpen, numItems, widget->width() - 3);
|
||||
|
||||
Dropdown::SetChecked(gConfigGeneral.scenario_select_mode, true);
|
||||
Dropdown::SetChecked(gConfigGeneral.ScenarioSelectMode, true);
|
||||
break;
|
||||
}
|
||||
case WIDX_DEFAULT_INSPECTION_INTERVAL_DROPDOWN:
|
||||
@@ -1761,7 +1760,7 @@ private:
|
||||
}
|
||||
|
||||
ShowDropdown(widget, 7);
|
||||
Dropdown::SetChecked(gConfigGeneral.default_inspection_interval, true);
|
||||
Dropdown::SetChecked(gConfigGeneral.DefaultInspectionInterval, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1789,17 +1788,17 @@ private:
|
||||
break;
|
||||
}
|
||||
case WIDX_DEFAULT_INSPECTION_INTERVAL_DROPDOWN:
|
||||
if (dropdownIndex != gConfigGeneral.default_inspection_interval)
|
||||
if (dropdownIndex != gConfigGeneral.DefaultInspectionInterval)
|
||||
{
|
||||
gConfigGeneral.default_inspection_interval = static_cast<uint8_t>(dropdownIndex);
|
||||
gConfigGeneral.DefaultInspectionInterval = static_cast<uint8_t>(dropdownIndex);
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
}
|
||||
break;
|
||||
case WIDX_SCENARIO_GROUPING_DROPDOWN:
|
||||
if (dropdownIndex != gConfigGeneral.scenario_select_mode)
|
||||
if (dropdownIndex != gConfigGeneral.ScenarioSelectMode)
|
||||
{
|
||||
gConfigGeneral.scenario_select_mode = dropdownIndex;
|
||||
gConfigGeneral.ScenarioSelectMode = dropdownIndex;
|
||||
gConfigInterface.scenarioselect_last_tab = 0;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
@@ -1839,19 +1838,19 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
SetCheckboxValue(WIDX_REAL_NAME_CHECKBOX, gConfigGeneral.show_real_names_of_guests);
|
||||
SetCheckboxValue(WIDX_AUTO_STAFF_PLACEMENT, gConfigGeneral.auto_staff_placement);
|
||||
SetCheckboxValue(WIDX_AUTO_OPEN_SHOPS, gConfigGeneral.auto_open_shops);
|
||||
SetCheckboxValue(WIDX_ALLOW_EARLY_COMPLETION, gConfigGeneral.allow_early_completion);
|
||||
SetCheckboxValue(WIDX_REAL_NAME_CHECKBOX, gConfigGeneral.ShowRealNamesOfGuests);
|
||||
SetCheckboxValue(WIDX_AUTO_STAFF_PLACEMENT, gConfigGeneral.AutoStaffPlacement);
|
||||
SetCheckboxValue(WIDX_AUTO_OPEN_SHOPS, gConfigGeneral.AutoOpenShops);
|
||||
SetCheckboxValue(WIDX_ALLOW_EARLY_COMPLETION, gConfigGeneral.AllowEarlyCompletion);
|
||||
|
||||
if (gConfigGeneral.scenario_select_mode == SCENARIO_SELECT_MODE_DIFFICULTY)
|
||||
if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_DIFFICULTY)
|
||||
widgets[WIDX_SCENARIO_GROUPING].text = STR_OPTIONS_SCENARIO_DIFFICULTY;
|
||||
else
|
||||
widgets[WIDX_SCENARIO_GROUPING].text = STR_OPTIONS_SCENARIO_ORIGIN;
|
||||
|
||||
SetCheckboxValue(WIDX_SCENARIO_UNLOCKING, gConfigGeneral.scenario_unlocking_enabled);
|
||||
SetCheckboxValue(WIDX_SCENARIO_UNLOCKING, gConfigGeneral.ScenarioUnlockingEnabled);
|
||||
|
||||
if (gConfigGeneral.scenario_select_mode == SCENARIO_SELECT_MODE_ORIGIN)
|
||||
if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN)
|
||||
{
|
||||
disabled_widgets &= ~(1ULL << WIDX_SCENARIO_UNLOCKING);
|
||||
}
|
||||
@@ -1860,8 +1859,7 @@ private:
|
||||
disabled_widgets |= (1ULL << WIDX_SCENARIO_UNLOCKING);
|
||||
}
|
||||
|
||||
widgets[WIDX_DEFAULT_INSPECTION_INTERVAL].text = RideInspectionIntervalNames[gConfigGeneral
|
||||
.default_inspection_interval];
|
||||
widgets[WIDX_DEFAULT_INSPECTION_INTERVAL].text = RideInspectionIntervalNames[gConfigGeneral.DefaultInspectionInterval];
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
@@ -1872,12 +1870,12 @@ private:
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_DEBUGGING_TOOLS:
|
||||
gConfigGeneral.debugging_tools ^= 1;
|
||||
gConfigGeneral.DebuggingTools ^= 1;
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
break;
|
||||
case WIDX_SAVE_PLUGIN_DATA_CHECKBOX:
|
||||
gConfigGeneral.save_plugin_data ^= 1;
|
||||
gConfigGeneral.SavePluginData ^= 1;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
@@ -1887,7 +1885,7 @@ private:
|
||||
Invalidate();
|
||||
break;
|
||||
case WIDX_ALWAYS_NATIVE_LOADSAVE:
|
||||
gConfigGeneral.use_native_browse_dialog = !gConfigGeneral.use_native_browse_dialog;
|
||||
gConfigGeneral.UseNativeBrowseDialog = !gConfigGeneral.UseNativeBrowseDialog;
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
break;
|
||||
@@ -1904,7 +1902,7 @@ private:
|
||||
{
|
||||
if (CsgAtLocationIsUsable(rct1path))
|
||||
{
|
||||
gConfigGeneral.rct1_path = std::move(rct1path);
|
||||
gConfigGeneral.RCT1Path = std::move(rct1path);
|
||||
gConfigInterface.scenarioselect_last_tab = 0;
|
||||
config_save_default();
|
||||
context_show_error(STR_RESTART_REQUIRED, STR_NONE, {});
|
||||
@@ -1928,9 +1926,9 @@ private:
|
||||
break;
|
||||
}
|
||||
case WIDX_PATH_TO_RCT1_CLEAR:
|
||||
if (!gConfigGeneral.rct1_path.empty())
|
||||
if (!gConfigGeneral.RCT1Path.empty())
|
||||
{
|
||||
gConfigGeneral.rct1_path.clear();
|
||||
gConfigGeneral.RCT1Path.clear();
|
||||
config_save_default();
|
||||
}
|
||||
Invalidate();
|
||||
@@ -1955,19 +1953,19 @@ private:
|
||||
}
|
||||
|
||||
ShowDropdown(widget, AUTOSAVE_NEVER + 1);
|
||||
Dropdown::SetChecked(gConfigGeneral.autosave_frequency, true);
|
||||
Dropdown::SetChecked(gConfigGeneral.AutosaveFrequency, true);
|
||||
break;
|
||||
case WIDX_AUTOSAVE_AMOUNT_UP:
|
||||
gConfigGeneral.autosave_amount += 1;
|
||||
gConfigGeneral.AutosaveAmount += 1;
|
||||
config_save_default();
|
||||
InvalidateWidget(WIDX_AUTOSAVE_FREQUENCY);
|
||||
InvalidateWidget(WIDX_AUTOSAVE_FREQUENCY_DROPDOWN);
|
||||
InvalidateWidget(WIDX_AUTOSAVE_AMOUNT);
|
||||
break;
|
||||
case WIDX_AUTOSAVE_AMOUNT_DOWN:
|
||||
if (gConfigGeneral.autosave_amount > 1)
|
||||
if (gConfigGeneral.AutosaveAmount > 1)
|
||||
{
|
||||
gConfigGeneral.autosave_amount -= 1;
|
||||
gConfigGeneral.AutosaveAmount -= 1;
|
||||
config_save_default();
|
||||
InvalidateWidget(WIDX_AUTOSAVE_FREQUENCY);
|
||||
InvalidateWidget(WIDX_AUTOSAVE_FREQUENCY_DROPDOWN);
|
||||
@@ -1981,9 +1979,9 @@ private:
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_AUTOSAVE_FREQUENCY_DROPDOWN:
|
||||
if (dropdownIndex != gConfigGeneral.autosave_frequency)
|
||||
if (dropdownIndex != gConfigGeneral.AutosaveFrequency)
|
||||
{
|
||||
gConfigGeneral.autosave_frequency = static_cast<uint8_t>(dropdownIndex);
|
||||
gConfigGeneral.AutosaveFrequency = static_cast<uint8_t>(dropdownIndex);
|
||||
config_save_default();
|
||||
Invalidate();
|
||||
}
|
||||
@@ -1993,22 +1991,22 @@ private:
|
||||
|
||||
void AdvancedPrepareDraw()
|
||||
{
|
||||
SetCheckboxValue(WIDX_DEBUGGING_TOOLS, gConfigGeneral.debugging_tools);
|
||||
SetCheckboxValue(WIDX_SAVE_PLUGIN_DATA_CHECKBOX, gConfigGeneral.save_plugin_data);
|
||||
SetCheckboxValue(WIDX_DEBUGGING_TOOLS, gConfigGeneral.DebuggingTools);
|
||||
SetCheckboxValue(WIDX_SAVE_PLUGIN_DATA_CHECKBOX, gConfigGeneral.SavePluginData);
|
||||
SetCheckboxValue(WIDX_STAY_CONNECTED_AFTER_DESYNC, gConfigNetwork.stay_connected);
|
||||
SetCheckboxValue(WIDX_ALWAYS_NATIVE_LOADSAVE, gConfigGeneral.use_native_browse_dialog);
|
||||
widgets[WIDX_AUTOSAVE_FREQUENCY].text = AutosaveNames[gConfigGeneral.autosave_frequency];
|
||||
SetCheckboxValue(WIDX_ALWAYS_NATIVE_LOADSAVE, gConfigGeneral.UseNativeBrowseDialog);
|
||||
widgets[WIDX_AUTOSAVE_FREQUENCY].text = AutosaveNames[gConfigGeneral.AutosaveFrequency];
|
||||
}
|
||||
|
||||
void AdvancedDraw(rct_drawpixelinfo* dpi)
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(static_cast<int32_t>(gConfigGeneral.autosave_amount));
|
||||
ft.Add<int32_t>(static_cast<int32_t>(gConfigGeneral.AutosaveAmount));
|
||||
DrawTextBasic(
|
||||
dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_AUTOSAVE_AMOUNT].left + 1, widgets[WIDX_AUTOSAVE_AMOUNT].top + 1 },
|
||||
STR_WINDOW_COLOUR_2_COMMA16, ft, { colours[1] });
|
||||
|
||||
const auto normalisedPath = Platform::StrDecompToPrecomp(gConfigGeneral.rct1_path);
|
||||
const auto normalisedPath = Platform::StrDecompToPrecomp(gConfigGeneral.RCT1Path);
|
||||
ft = Formatter();
|
||||
ft.Add<const utf8*>(normalisedPath.c_str());
|
||||
|
||||
@@ -2027,14 +2025,14 @@ private:
|
||||
{
|
||||
if (widgetIndex == WIDX_PATH_TO_RCT1_BUTTON)
|
||||
{
|
||||
if (gConfigGeneral.rct1_path.empty())
|
||||
if (gConfigGeneral.RCT1Path.empty())
|
||||
{
|
||||
// No tooltip if the path is empty
|
||||
return { STR_NONE, {} };
|
||||
}
|
||||
|
||||
auto ft = Formatter();
|
||||
ft.Add<utf8*>(gConfigGeneral.rct1_path.c_str());
|
||||
ft.Add<utf8*>(gConfigGeneral.RCT1Path.c_str());
|
||||
return { fallback, ft };
|
||||
}
|
||||
return { fallback, {} };
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
|
||||
@@ -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,8 +696,8 @@ 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;
|
||||
|
||||
@@ -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,7 +3722,7 @@ static void TopToolbarViewMenuDropdown(int16_t dropdownIndex)
|
||||
w->viewport->flags ^= VIEWPORT_FLAG_UNDERGROUND_INSIDE;
|
||||
break;
|
||||
case DDIDX_TRANSPARENT_WATER:
|
||||
gConfigGeneral.transparent_water ^= 1;
|
||||
gConfigGeneral.TransparentWater ^= 1;
|
||||
config_save_default();
|
||||
break;
|
||||
case DDIDX_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,12 +234,12 @@ 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;
|
||||
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;
|
||||
config_save_default();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
gConfigGeneral.AssetPackOrder = orderList;
|
||||
gConfigGeneral.EnabledAssetPacks = enabledList;
|
||||
config_save_default();
|
||||
}
|
||||
+16
-16
@@ -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;
|
||||
gConfigGeneral.LastRunVersion = OPENRCT2_VERSION;
|
||||
config_save_default();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_localisationService->OpenLanguage(gConfigGeneral.language);
|
||||
_localisationService->OpenLanguage(gConfigGeneral.Language);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
@@ -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,7 +512,7 @@ namespace OpenRCT2
|
||||
log_error("Unable to create drawing engine. Falling back to software.");
|
||||
|
||||
// Fallback to software
|
||||
gConfigGeneral.drawing_engine = DrawingEngine::Software;
|
||||
gConfigGeneral.DrawingEngine = DrawingEngine::Software;
|
||||
config_save_default();
|
||||
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,7 +540,7 @@ namespace OpenRCT2
|
||||
log_error("Unable to initialise drawing engine. Falling back to software.");
|
||||
|
||||
// Fallback to software
|
||||
gConfigGeneral.drawing_engine = DrawingEngine::Software;
|
||||
gConfigGeneral.DrawingEngine = DrawingEngine::Software;
|
||||
config_save_default();
|
||||
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,10 +812,10 @@ 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());
|
||||
"install directory does not exist or invalid directory selected, %s", gConfigGeneral.RCT2Path.c_str());
|
||||
if (!config_find_or_browse_install_directory())
|
||||
{
|
||||
auto path = config_get_default_path();
|
||||
@@ -824,7 +824,7 @@ namespace OpenRCT2
|
||||
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;
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
@@ -212,11 +212,11 @@ std::unique_ptr<IPlatformEnvironment> OpenRCT2::CreatePlatformEnvironment()
|
||||
}
|
||||
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,7 +88,7 @@ NewVersionInfo get_latest_version()
|
||||
verinfo.changelog = Json::GetString(root["body"]);
|
||||
verinfo.url = Json::GetString(root["html_url"]);
|
||||
|
||||
gConfigGeneral.last_version_check_time = now;
|
||||
gConfigGeneral.LastVersionCheckTime = now;
|
||||
config_save_default();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -370,7 +370,7 @@ static exitcode_t HandleCommandSetRCT2(CommandLineArgEnumerator* enumerator)
|
||||
auto configPath = env->GetFilePath(OpenRCT2::PATHID::CONFIG);
|
||||
config_set_defaults();
|
||||
config_open(configPath);
|
||||
gConfigGeneral.rct2_path = path;
|
||||
gConfigGeneral.RCT2Path = path;
|
||||
if (config_save(configPath))
|
||||
{
|
||||
Console::WriteFormat("Updating RCT2 path to '%s'.", path.c_str());
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+159
-159
@@ -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)
|
||||
@@ -802,7 +802,7 @@ bool config_save(u8string_view path)
|
||||
|
||||
void config_release()
|
||||
{
|
||||
SafeFree(gConfigGeneral.custom_currency_symbol);
|
||||
SafeFree(gConfigGeneral.CustomCurrencySymbol);
|
||||
SafeFree(gConfigInterface.current_theme_preset);
|
||||
SafeFree(gConfigInterface.current_title_sequence_preset);
|
||||
SafeFree(gConfigFonts.file_name);
|
||||
@@ -826,7 +826,7 @@ bool config_find_or_browse_install_directory()
|
||||
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,96 +27,96 @@ 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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
gConfigGeneral.FullscreenMode = targetMode;
|
||||
config_save_default();
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -2296,7 +2296,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
|
||||
|
||||
@@ -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")
|
||||
{
|
||||
@@ -1067,7 +1067,7 @@ 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);
|
||||
gConfigGeneral.WindowScale = std::clamp(newScale, 0.5f, 5.0f);
|
||||
config_save_default();
|
||||
gfx_invalidate_screen();
|
||||
context_trigger_resize();
|
||||
@@ -1081,13 +1081,13 @@ 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);
|
||||
gConfigGeneral.RenderWeatherEffects = (int_val[0] != 0);
|
||||
config_save_default();
|
||||
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);
|
||||
gConfigGeneral.RenderWeatherGloom = (int_val[0] != 0);
|
||||
config_save_default();
|
||||
console.Execute("get render_weather_gloom");
|
||||
}
|
||||
|
||||
@@ -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,9 +186,9 @@ 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;
|
||||
gConfigGeneral.WindowLimit = val;
|
||||
config_save_default();
|
||||
// Checks if value decreases and then closes surplus
|
||||
// windows if one sets a limit lower than the number of windows open
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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))
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user