mirror of https://github.com/OpenRCT2/OpenRCT2.git
Implement #4984: Add option to highlight vomit, litter and handymen
This commit is contained in:
parent
73e7fca86e
commit
95dfcea6bd
|
@ -4525,6 +4525,7 @@ STR_6215 :Construction
|
|||
STR_6216 :Operation
|
||||
STR_6217 :Ride / track availability
|
||||
STR_6218 :OpenRCT2 Official
|
||||
STR_6219 :Highlight vandalism and vomit
|
||||
|
||||
#############
|
||||
# Scenarios #
|
||||
|
@ -5452,4 +5453,4 @@ STR_NAME :Wooden Post Wall
|
|||
[ACWWF32]
|
||||
STR_NAME :Wooden Post Wall
|
||||
|
||||
## End OpenRCT2 Official
|
||||
## End OpenRCT2 Official
|
||||
|
|
|
@ -114,6 +114,7 @@ typedef enum {
|
|||
DDIDX_PATH_HEIGHTS = 12,
|
||||
// 13 is a separator
|
||||
DDIDX_VIEW_CLIPPING = 14,
|
||||
DDIDX_HIGHLIGHT_PATH_ISSUES = 15,
|
||||
|
||||
TOP_TOOLBAR_VIEW_MENU_COUNT
|
||||
} TOP_TOOLBAR_VIEW_MENU_DDIDX;
|
||||
|
@ -3174,6 +3175,7 @@ static void top_toolbar_init_view_menu(rct_window* w, rct_widget* widget) {
|
|||
gDropdownItemsFormat[12] = STR_TOGGLE_OPTION;
|
||||
gDropdownItemsFormat[13] = DROPDOWN_SEPARATOR;
|
||||
gDropdownItemsFormat[DDIDX_VIEW_CLIPPING] = STR_TOGGLE_OPTION;
|
||||
gDropdownItemsFormat[DDIDX_HIGHLIGHT_PATH_ISSUES] = STR_TOGGLE_OPTION;
|
||||
|
||||
gDropdownItemsArgs[0] = STR_UNDERGROUND_VIEW;
|
||||
gDropdownItemsArgs[1] = STR_REMOVE_BASE_LAND;
|
||||
|
@ -3187,6 +3189,7 @@ static void top_toolbar_init_view_menu(rct_window* w, rct_widget* widget) {
|
|||
gDropdownItemsArgs[11] = STR_HEIGHT_MARKS_ON_RIDE_TRACKS;
|
||||
gDropdownItemsArgs[12] = STR_HEIGHT_MARKS_ON_PATHS;
|
||||
gDropdownItemsArgs[DDIDX_VIEW_CLIPPING] = STR_VIEW_CLIPPING_MENU;
|
||||
gDropdownItemsArgs[DDIDX_HIGHLIGHT_PATH_ISSUES] = STR_HIGHLIGHT_PATH_ISSUES_MENU;
|
||||
|
||||
window_dropdown_show_text(
|
||||
w->x + widget->left,
|
||||
|
@ -3223,6 +3226,8 @@ static void top_toolbar_init_view_menu(rct_window* w, rct_widget* widget) {
|
|||
dropdown_set_checked(12, true);
|
||||
if (mainViewport->flags & VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT)
|
||||
dropdown_set_checked(DDIDX_VIEW_CLIPPING, true);
|
||||
if (mainViewport->flags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
dropdown_set_checked(DDIDX_HIGHLIGHT_PATH_ISSUES, true);
|
||||
|
||||
gDropdownDefaultIndex = DDIDX_UNDERGROUND_INSIDE;
|
||||
}
|
||||
|
@ -3277,6 +3282,9 @@ static void top_toolbar_view_menu_dropdown(sint16 dropdownIndex)
|
|||
w->viewport->flags ^= VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT;
|
||||
}
|
||||
break;
|
||||
case DDIDX_HIGHLIGHT_PATH_ISSUES:
|
||||
w->viewport->flags ^= VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "../world/Climate.h"
|
||||
#include "Drawing.h"
|
||||
#include "../config/Config.h"
|
||||
#include "../interface/Viewport.h"
|
||||
|
||||
#include "IDrawingEngine.h"
|
||||
#include "Rain.h"
|
||||
|
@ -177,7 +178,7 @@ void DrawRain(rct_drawpixelinfo * dpi, IRainDrawer * rainDrawer)
|
|||
{
|
||||
// Get rain draw function and draw rain
|
||||
uint32 rainType = gClimateCurrent.RainLevel;
|
||||
if (rainType != RAIN_LEVEL_NONE && !gTrackDesignSaveMode)
|
||||
if (rainType != RAIN_LEVEL_NONE && !gTrackDesignSaveMode && !(gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
{
|
||||
DrawRainAnimation(dpi, rainDrawer, rainType);
|
||||
}
|
||||
|
|
|
@ -903,7 +903,8 @@ static void viewport_paint_column(rct_drawpixelinfo * dpi, uint32 viewFlags)
|
|||
|
||||
if (gConfigGeneral.render_weather_gloom &&
|
||||
!gTrackDesignSaveMode &&
|
||||
!(viewFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES)
|
||||
!(viewFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES) &&
|
||||
!(viewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
) {
|
||||
viewport_paint_weather_gloom(dpi);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ enum {
|
|||
VIEWPORT_FLAG_15 = (1 << 15),
|
||||
VIEWPORT_FLAG_SEETHROUGH_PATHS = (1 << 16),
|
||||
VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT = (1 << 17),
|
||||
VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES = (1 << 18),
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
|
@ -3876,6 +3876,8 @@ enum {
|
|||
|
||||
STR_OBJECT_FILTER_OPENRCT2_OFFICIAL = 6218,
|
||||
|
||||
STR_HIGHLIGHT_PATH_ISSUES_MENU = 6219,
|
||||
|
||||
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
||||
STR_COUNT = 32768
|
||||
};
|
||||
|
|
|
@ -37,7 +37,12 @@ void sprite_paint_setup(paint_session * session, const uint16 eax, const uint16
|
|||
|
||||
if (gTrackDesignSaveMode) return;
|
||||
|
||||
if (gCurrentViewportFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES) return;
|
||||
if (gCurrentViewportFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool highlightPathIssues = (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES);
|
||||
|
||||
dpi = session->Unk140E9A8;
|
||||
if (dpi->zoom_level > 2) return;
|
||||
|
@ -46,6 +51,22 @@ void sprite_paint_setup(paint_session * session, const uint16 eax, const uint16
|
|||
for (rct_sprite* spr = get_sprite(sprite_idx); sprite_idx != SPRITE_INDEX_NULL; sprite_idx = spr->unknown.next_in_quadrant) {
|
||||
spr = get_sprite(sprite_idx);
|
||||
|
||||
if (highlightPathIssues)
|
||||
{
|
||||
if (spr->unknown.sprite_identifier == SPRITE_IDENTIFIER_PEEP)
|
||||
{
|
||||
rct_peep * peep = (rct_peep*)spr;
|
||||
if (!(peep->type == PEEP_TYPE_STAFF && peep->staff_type == STAFF_TYPE_HANDYMAN))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (spr->unknown.sprite_identifier != SPRITE_IDENTIFIER_LITTER)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Only paint sprites that are below the clip height.
|
||||
// Here converting from land/path/etc height scale to pixel height scale.
|
||||
// Note: peeps/scenery on slopes will be above the base
|
||||
|
|
|
@ -44,7 +44,7 @@ void banner_paint(paint_session * session, uint8 direction, sint32 height, rct_t
|
|||
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_BANNER;
|
||||
|
||||
if (dpi->zoom_level > 1 || gTrackDesignSaveMode) return;
|
||||
if (dpi->zoom_level > 1 || gTrackDesignSaveMode || (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) return;
|
||||
|
||||
height -= 16;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ static void ride_entrance_exit_paint(paint_session * session, uint8 direction, s
|
|||
|
||||
uint8 is_exit = tile_element->properties.entrance.type == ENTRANCE_TYPE_RIDE_EXIT;
|
||||
|
||||
if (gTrackDesignSaveMode) {
|
||||
if (gTrackDesignSaveMode || (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) {
|
||||
if (tile_element->properties.entrance.ride_index != gTrackDesignSaveRideIndex)
|
||||
return;
|
||||
}
|
||||
|
@ -98,6 +98,7 @@ static void ride_entrance_exit_paint(paint_session * session, uint8 direction, s
|
|||
else{
|
||||
image_id |= style->sprite_index + direction;
|
||||
}
|
||||
|
||||
// Format modified to stop repeated code
|
||||
|
||||
// Each entrance is split into 2 images for drawing
|
||||
|
@ -186,7 +187,7 @@ static void ride_entrance_exit_paint(paint_session * session, uint8 direction, s
|
|||
* rct2: 0x006658ED
|
||||
*/
|
||||
static void park_entrance_paint(paint_session * session, uint8 direction, sint32 height, rct_tile_element* tile_element){
|
||||
if (gTrackDesignSaveMode)
|
||||
if (gTrackDesignSaveMode || (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
return;
|
||||
|
||||
#ifdef __ENABLE_LIGHTFX__
|
||||
|
|
|
@ -165,7 +165,7 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, rct_ti
|
|||
paint_util_set_general_support_height(session, height, 0x20);
|
||||
|
||||
uint32 dword_141F710 = 0;
|
||||
if (gTrackDesignSaveMode) {
|
||||
if (gTrackDesignSaveMode || (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) {
|
||||
if (!track_design_save_contains_tile_element(tile_element)) {
|
||||
dword_141F710 = 0x21700000;
|
||||
}
|
||||
|
|
|
@ -187,6 +187,10 @@ static constexpr const boundbox s98E3C4[] = {
|
|||
*/
|
||||
void large_scenery_paint(paint_session * session, uint8 direction, uint16 height, rct_tile_element * tileElement)
|
||||
{
|
||||
if (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
{
|
||||
return;
|
||||
}
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_LARGE_SCENERY;
|
||||
uint32 sequenceNum = scenery_large_get_sequence(tileElement);
|
||||
rct_scenery_entry *entry = get_large_scenery_entry(scenery_large_get_type(tileElement));
|
||||
|
|
|
@ -603,6 +603,12 @@ static void sub_6A3F61(paint_session * session, rct_tile_element * tile_element,
|
|||
if (dpi->zoom_level <= 1) {
|
||||
if (!gTrackDesignSaveMode) {
|
||||
if (footpath_element_has_path_scenery(tile_element)) {
|
||||
if ((gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) &&
|
||||
!(tile_element->flags & TILE_ELEMENT_FLAG_BROKEN))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_FOOTPATH_ITEM;
|
||||
if (sceneryImageFlags != 0) {
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
@ -697,6 +703,11 @@ void path_paint(paint_session * session, uint8 direction, uint16 height, rct_til
|
|||
}
|
||||
}
|
||||
|
||||
if (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
{
|
||||
imageFlags = 0x21700000;
|
||||
}
|
||||
|
||||
if (footpath_element_path_scenery_is_ghost(tile_element)) {
|
||||
sceneryImageFlags = CONSTRUCTION_MARKER;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,10 @@ static constexpr const LocationXY16 lengths[] = {
|
|||
* rct2: 0x006DFF47
|
||||
*/
|
||||
void scenery_paint(paint_session * session, uint8 direction, sint32 height, rct_tile_element* tileElement) {
|
||||
if (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//RCT2_CALLPROC_X(0x6DFF47, 0, 0, direction, height, (sint32)tileElement, 0, 0); return;
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_SCENERY;
|
||||
LocationXYZ16 boxlength;
|
||||
|
|
|
@ -1352,7 +1352,7 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, rct_
|
|||
const uint16 localHeight = height + 16;
|
||||
const uint16 waterHeight = map_get_water_height(tileElement) * 16;
|
||||
|
||||
if (!gTrackDesignSaveMode)
|
||||
if (!gTrackDesignSaveMode && !(gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
{
|
||||
session->Unk141E9DC = waterHeight;
|
||||
|
||||
|
|
|
@ -2143,7 +2143,8 @@ void track_paint(paint_session * session, uint8 direction, sint32 height, rct_ti
|
|||
|
||||
rct_drawpixelinfo * dpi = session->Unk140E9A8;
|
||||
|
||||
if (!gTrackDesignSaveMode || rideIndex == gTrackDesignSaveRideIndex)
|
||||
if ((!gTrackDesignSaveMode || rideIndex == gTrackDesignSaveRideIndex) &&
|
||||
!(gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES))
|
||||
{
|
||||
sint32 trackType = track_element_get_type(tileElement);
|
||||
sint32 trackSequence = tile_element_get_track_sequence(tileElement);
|
||||
|
|
Loading…
Reference in New Issue