From c3aabede6453b995aa962fec7d4c54a9dfbd03a1 Mon Sep 17 00:00:00 2001 From: zaxcav Date: Fri, 21 Oct 2016 09:46:59 +0200 Subject: [PATCH] Initial prototype of paint clipping. Paint clipping is a possible future feature to assist players building in cluttered areas of a park by controlling which map elements and sprites are rendered, providing a clearer view for construction, inspection, etc. Only clip height is supported in this prototype. Map elements are clipped according to the map element base height (meaning *all* scenery on that map element is currently clipped with it). Sprites are clipped according to their z value being within the "sprite volume" of any non-clipped map element (which means below clip height + 2). Control is only provided through the console in this prototype - use the command: set paint_clip_height _value_ To turn clipping off use the command: set paint_clip_height 255 Clip heights are limited to multiples of two to coincide with the native heights of map elements. Command "get paint_clip_height" prints the clip height as a raw value as well as the equivalent height in ft and m as used when displaying heights in-game. At this time only painting of the main viewport is affected. There is no change to any input control handling. --- src/openrct2/paint/paint.c | 3 +-- src/openrct2/paint/paint.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/openrct2/paint/paint.c b/src/openrct2/paint/paint.c index efee14c7d6..b92ea5d8b6 100644 --- a/src/openrct2/paint/paint.c +++ b/src/openrct2/paint/paint.c @@ -24,8 +24,7 @@ #include "supports.h" // zax: globals for paint clipping height -uint8 gClipHeight = 128; // Default to middle value -bool gClipHeightEnable = false; +uint8 gClipHeight = 255; const uint32 construction_markers[] = { COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_REMAP, // White diff --git a/src/openrct2/paint/paint.h b/src/openrct2/paint/paint.h index 5ecada6a8a..2475b70d69 100644 --- a/src/openrct2/paint/paint.h +++ b/src/openrct2/paint/paint.h @@ -25,7 +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;