mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 23:04:36 +01:00
Initial attempt at paintClip UI
Compiles but untested. NOT INTENDED FOR MERGING
This commit is contained in:
@@ -4311,6 +4311,11 @@ STR_5999 :Set money
|
||||
STR_6000 :Enter new value
|
||||
STR_6001 :Enable lighting effects (experimental)
|
||||
STR_6002 :{SMALLFONT}{BLACK}Lamps and rides will be lit up at night.{NEWLINE}Requires rendering engine to be set to hardware display.
|
||||
STR_6003 :View Clipping
|
||||
STR_6004 :Enable clipping by height
|
||||
STR_6005 :Height clipping only displays map elements below the clip height
|
||||
STR_6006 :Clip height
|
||||
STR_6007 :Select clip height
|
||||
|
||||
#############
|
||||
# Scenarios #
|
||||
|
||||
@@ -471,6 +471,7 @@ enum {
|
||||
WC_SERVER_START = 128,
|
||||
WC_CUSTOM_CURRENCY_CONFIG = 129,
|
||||
WC_DEBUG_PAINT = 130,
|
||||
WC_VIEW_CLIPPING = 131,
|
||||
|
||||
// Only used for colour schemes
|
||||
WC_STAFF = 220,
|
||||
@@ -726,6 +727,9 @@ void window_editor_inventions_list_open();
|
||||
void window_editor_scenario_options_open();
|
||||
void window_editor_objective_options_open();
|
||||
|
||||
void window_view_clipping_open();
|
||||
void window_view_clipping_close();
|
||||
|
||||
void window_guest_list_init_vars_a();
|
||||
void window_guest_list_init_vars_b();
|
||||
void window_bubble_list_item(rct_window* w, sint32 item_position);
|
||||
|
||||
@@ -3654,6 +3654,12 @@ enum {
|
||||
STR_ENABLE_LIGHTING_EFFECTS = 6001,
|
||||
STR_ENABLE_LIGHTING_EFFECTS_TIP = 6002,
|
||||
|
||||
STR_VIEW_CLIPPING = 6003,
|
||||
STR_VIEW_CLIPPING_HEIGHT_ENABLE = 6004,
|
||||
STR_VIEW_CLIPPING_HEIGHT_ENABLE_TIP = 6005,
|
||||
STR_VIEW_CLIPPING_HEIGHT_VALUE = 6006,
|
||||
STR_VIEW_CLIPPING_HEIGHT_SCROLL_TIP = 6007,
|
||||
|
||||
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
||||
STR_COUNT = 32768
|
||||
};
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
// zax: globals for paint clipping height
|
||||
uint8 gClipHeight = 255;
|
||||
bool gClipHeightEnable = false;
|
||||
|
||||
const uint32 construction_markers[] = {
|
||||
COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_REMAP, // White
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
// zax: Global paint clipping height.
|
||||
extern uint8 gClipHeight;
|
||||
extern bool gClipHeightEnable;
|
||||
|
||||
typedef struct attached_paint_struct attached_paint_struct;
|
||||
typedef struct paint_struct paint_struct;
|
||||
|
||||
@@ -245,6 +245,7 @@ static rct_windowclass window_themes_tab_6_classes[] = {
|
||||
WC_MULTIPLAYER,
|
||||
WC_PLAYER,
|
||||
WC_CHAT,
|
||||
WC_VIEW_CLIPPING,
|
||||
};
|
||||
|
||||
static rct_windowclass window_themes_tab_7_classes[] = {
|
||||
|
||||
@@ -98,6 +98,7 @@ typedef enum {
|
||||
DDIDX_LAND_HEIGHTS = 10,
|
||||
DDIDX_TRACK_HEIGHTS = 11,
|
||||
DDIDX_PATH_HEIGHTS = 12,
|
||||
DDIDX_VIEW_CLIPPING = 13,
|
||||
} TOP_TOOLBAR_VIEW_MENU_DDIDX;
|
||||
|
||||
typedef enum {
|
||||
@@ -3044,6 +3045,7 @@ void top_toolbar_init_view_menu(rct_window* w, rct_widget* widget) {
|
||||
gDropdownItemsFormat[10] = STR_TOGGLE_OPTION;
|
||||
gDropdownItemsFormat[11] = STR_TOGGLE_OPTION;
|
||||
gDropdownItemsFormat[12] = STR_TOGGLE_OPTION;
|
||||
gDropdownItemsFormat[13] = STR_TOGGLE_OPTION;
|
||||
|
||||
gDropdownItemsArgs[0] = STR_UNDERGROUND_VIEW;
|
||||
gDropdownItemsArgs[1] = STR_REMOVE_BASE_LAND;
|
||||
@@ -3056,6 +3058,7 @@ void top_toolbar_init_view_menu(rct_window* w, rct_widget* widget) {
|
||||
gDropdownItemsArgs[10] = STR_HEIGHT_MARKS_ON_LAND;
|
||||
gDropdownItemsArgs[11] = STR_HEIGHT_MARKS_ON_RIDE_TRACKS;
|
||||
gDropdownItemsArgs[12] = STR_HEIGHT_MARKS_ON_PATHS;
|
||||
gDropdownItemsArgs[13] = STR_VIEW_CLIPPING;
|
||||
|
||||
window_dropdown_show_text(
|
||||
w->x + widget->left,
|
||||
@@ -3090,6 +3093,8 @@ void top_toolbar_init_view_menu(rct_window* w, rct_widget* widget) {
|
||||
dropdown_set_checked(11, true);
|
||||
if (mainViewport->flags & VIEWPORT_FLAG_PATH_HEIGHTS)
|
||||
dropdown_set_checked(12, true);
|
||||
if (mainViewport->flags & VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT)
|
||||
dropdown_set_checked(13, true);
|
||||
|
||||
gDropdownDefaultIndex = DDIDX_UNDERGROUND_INSIDE;
|
||||
}
|
||||
@@ -3136,6 +3141,14 @@ void top_toolbar_view_menu_dropdown(sint16 dropdownIndex)
|
||||
case DDIDX_PATH_HEIGHTS:
|
||||
w->viewport->flags ^= VIEWPORT_FLAG_PATH_HEIGHTS;
|
||||
break;
|
||||
case DDIDX_VIEW_CLIPPING:
|
||||
if ((w->viewport->flags & VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT) == 0) {
|
||||
window_view_clipping_open();
|
||||
}
|
||||
else {
|
||||
window_view_clipping_close();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user