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.
This commit is contained in:
zaxcav 2016-10-21 09:46:59 +02:00
parent 0620321fb2
commit c3aabede64
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -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;