mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
@@ -170,7 +170,7 @@ void input_handle_keyboard(bool isTitle)
|
||||
}
|
||||
}
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VIRTUAL_FLOOR_STYLE_OFF)
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
{
|
||||
if (gInputPlaceObjectModifier & (PLACE_OBJECT_MODIFIER_COPY_Z | PLACE_OBJECT_MODIFIER_SHIFT_Z))
|
||||
virtual_floor_enable();
|
||||
|
||||
@@ -1087,7 +1087,7 @@ static void window_options_mousedown(rct_window* w, rct_widgetindex widgetIndex,
|
||||
|
||||
window_options_show_dropdown(w, widget, 3);
|
||||
|
||||
dropdown_set_checked(gConfigGeneral.virtual_floor_style, true);
|
||||
dropdown_set_checked(static_cast<int32_t>(gConfigGeneral.virtual_floor_style), true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -1382,7 +1382,7 @@ static void window_options_dropdown(rct_window* w, rct_widgetindex widgetIndex,
|
||||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_VIRTUAL_FLOOR_DROPDOWN:
|
||||
gConfigGeneral.virtual_floor_style = dropdownIndex;
|
||||
gConfigGeneral.virtual_floor_style = static_cast<VirtualFloorStyles>(dropdownIndex);
|
||||
config_save_default();
|
||||
break;
|
||||
}
|
||||
@@ -1684,8 +1684,8 @@ static void window_options_invalidate(rct_window* w)
|
||||
rct_string_id VirtualFloorStyleStrings[] = { STR_VIRTUAL_FLOOR_STYLE_DISABLED, STR_VIRTUAL_FLOOR_STYLE_TRANSPARENT,
|
||||
STR_VIRTUAL_FLOOR_STYLE_GLASSY };
|
||||
|
||||
window_options_rendering_widgets[WIDX_VIRTUAL_FLOOR].text = VirtualFloorStyleStrings[gConfigGeneral
|
||||
.virtual_floor_style];
|
||||
window_options_rendering_widgets[WIDX_VIRTUAL_FLOOR].text = VirtualFloorStyleStrings[static_cast<int32_t>(
|
||||
gConfigGeneral.virtual_floor_style)];
|
||||
|
||||
widget_set_checkbox_value(w, WIDX_ENABLE_LIGHT_FX_CHECKBOX, gConfigGeneral.enable_light_fx);
|
||||
if (gConfigGeneral.day_night_cycle
|
||||
|
||||
@@ -1373,7 +1373,7 @@ static void sub_6E1F34(
|
||||
*parameter_2 = (quadrant ^ (1 << 1)) | (gWindowSceneryPrimaryColour << 8);
|
||||
*parameter_3 = rotation | (gWindowScenerySecondaryColour << 16);
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VIRTUAL_FLOOR_STYLE_OFF)
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
{
|
||||
virtual_floor_set_height(gSceneryPlaceZ);
|
||||
}
|
||||
@@ -1664,7 +1664,7 @@ static void sub_6E1F34(
|
||||
}
|
||||
}
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VIRTUAL_FLOOR_STYLE_OFF)
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
{
|
||||
virtual_floor_set_height(gSceneryPlaceZ);
|
||||
}
|
||||
@@ -2663,7 +2663,7 @@ static void top_toolbar_tool_update_scenery(const ScreenCoordsXY& screenPos)
|
||||
map_invalidate_selection_rect();
|
||||
map_invalidate_map_selection_tiles();
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VIRTUAL_FLOOR_STYLE_OFF)
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
{
|
||||
virtual_floor_invalidate();
|
||||
}
|
||||
|
||||
@@ -99,10 +99,10 @@ namespace Config
|
||||
ConfigEnumEntry<ScaleQuality>("SMOOTH_NEAREST_NEIGHBOUR", ScaleQuality::SmoothNearestNeighbour),
|
||||
});
|
||||
|
||||
static const auto Enum_VirtualFloorStyle = ConfigEnum<int32_t>({
|
||||
ConfigEnumEntry<int32_t>("OFF", VIRTUAL_FLOOR_STYLE_OFF),
|
||||
ConfigEnumEntry<int32_t>("CLEAR", VIRTUAL_FLOOR_STYLE_CLEAR),
|
||||
ConfigEnumEntry<int32_t>("GLASSY", VIRTUAL_FLOOR_STYLE_GLASSY),
|
||||
static const auto Enum_VirtualFloorStyle = ConfigEnum<VirtualFloorStyles>({
|
||||
ConfigEnumEntry<VirtualFloorStyles>("OFF", VirtualFloorStyles::Off),
|
||||
ConfigEnumEntry<VirtualFloorStyles>("CLEAR", VirtualFloorStyles::Clear),
|
||||
ConfigEnumEntry<VirtualFloorStyles>("GLASSY", VirtualFloorStyles::Glassy),
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -171,8 +171,8 @@ namespace Config
|
||||
model->drawing_engine = reader->GetEnum<int32_t>("drawing_engine", DRAWING_ENGINE_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<int32_t>(
|
||||
"virtual_floor_style", VIRTUAL_FLOOR_STYLE_GLASSY, Enum_VirtualFloorStyle);
|
||||
model->virtual_floor_style = reader->GetEnum<VirtualFloorStyles>(
|
||||
"virtual_floor_style", VirtualFloorStyles::Glassy, Enum_VirtualFloorStyle);
|
||||
model->date_format = reader->GetEnum<int32_t>("date_format", platform_get_locale_date_format(), Enum_DateFormat);
|
||||
model->auto_staff_placement = reader->GetBoolean("auto_staff", true);
|
||||
model->handymen_mow_default = reader->GetBoolean("handymen_mow_default", false);
|
||||
@@ -288,7 +288,7 @@ namespace Config
|
||||
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->WriteEnum<int32_t>("virtual_floor_style", model->virtual_floor_style, Enum_VirtualFloorStyle);
|
||||
writer->WriteEnum<VirtualFloorStyles>("virtual_floor_style", model->virtual_floor_style, Enum_VirtualFloorStyle);
|
||||
writer->WriteBoolean("transparent_screenshot", model->transparent_screenshot);
|
||||
writer->WriteInt64("last_version_check_time", model->last_version_check_time);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
enum class MeasurementFormat : int32_t;
|
||||
enum class TemperatureUnit : int32_t;
|
||||
enum class ScaleQuality : int32_t;
|
||||
enum class VirtualFloorStyles : int32_t;
|
||||
|
||||
struct GeneralConfiguration
|
||||
{
|
||||
@@ -44,7 +45,7 @@ struct GeneralConfiguration
|
||||
// Map rendering
|
||||
bool landscape_smoothing;
|
||||
bool always_show_gridlines;
|
||||
int32_t virtual_floor_style;
|
||||
VirtualFloorStyles virtual_floor_style;
|
||||
bool day_night_cycle;
|
||||
bool enable_light_fx;
|
||||
bool enable_light_fx_for_vehicles;
|
||||
|
||||
@@ -398,7 +398,7 @@ void virtual_floor_paint(paint_session* session)
|
||||
0, 0, 0, 0, 1, _virtualFloorHeight, 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NW) ? -2 : 0));
|
||||
}
|
||||
|
||||
if (gConfigGeneral.virtual_floor_style != VIRTUAL_FLOOR_STYLE_GLASSY)
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Glassy)
|
||||
return;
|
||||
|
||||
if (!weAreOccupied && !weAreLit && weAreAboveGround && weAreOwned)
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
|
||||
struct CoordsXY;
|
||||
|
||||
enum VirtualFloorStyles
|
||||
enum class VirtualFloorStyles : int32_t
|
||||
{
|
||||
VIRTUAL_FLOOR_STYLE_OFF,
|
||||
VIRTUAL_FLOOR_STYLE_CLEAR,
|
||||
VIRTUAL_FLOOR_STYLE_GLASSY
|
||||
Off,
|
||||
Clear,
|
||||
Glassy
|
||||
};
|
||||
|
||||
struct paint_session;
|
||||
|
||||
@@ -161,7 +161,7 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
|
||||
bool partOfVirtualFloor = false;
|
||||
#ifndef __TESTPAINT__
|
||||
if (gConfigGeneral.virtual_floor_style != VIRTUAL_FLOOR_STYLE_OFF)
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off)
|
||||
{
|
||||
partOfVirtualFloor = virtual_floor_tile_is_floor(session->MapPosition);
|
||||
}
|
||||
@@ -330,7 +330,7 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
} while (!(tile_element++)->IsLastForTile());
|
||||
|
||||
#ifndef __TESTPAINT__
|
||||
if (gConfigGeneral.virtual_floor_style != VIRTUAL_FLOOR_STYLE_OFF && partOfVirtualFloor)
|
||||
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Off && partOfVirtualFloor)
|
||||
{
|
||||
virtual_floor_paint(session);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user