mirror of https://github.com/OpenRCT2/OpenRCT2.git
parent
d17c435c0e
commit
87a80ac956
|
@ -40,7 +40,7 @@ enum {
|
|||
VIEWPORT_FLAG_INVISIBLE_SPRITES = (1 << 14),
|
||||
VIEWPORT_FLAG_15 = (1 << 15),
|
||||
VIEWPORT_FLAG_SEETHROUGH_PATHS = (1 << 16),
|
||||
VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT = (1 << 17) // zax
|
||||
VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT = (1 << 17)
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
|
@ -319,7 +319,7 @@ static void sub_68B3FB(sint32 x, sint32 y)
|
|||
imageColourFlats = 0b111011 << 19 | 0x40000000;
|
||||
}
|
||||
|
||||
// Only draw supports above the clipping height.
|
||||
// Only draw supports below the clipping height.
|
||||
if ((gCurrentViewportFlags & VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT) && (segmentHeight > gClipHeight)) continue;
|
||||
|
||||
sint32 xOffset = sy * 10;
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#include "sprite/sprite.h"
|
||||
#include "supports.h"
|
||||
|
||||
// zax: globals for paint clipping height
|
||||
uint8 gClipHeight = 255;
|
||||
// Global for paint clipping height
|
||||
uint8 gClipHeight = 128; // Default to middle value
|
||||
|
||||
const uint32 construction_markers[] = {
|
||||
COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_REMAP, // White
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "../interface/colour.h"
|
||||
#include "../drawing/drawing.h"
|
||||
|
||||
// zax: Global paint clipping height.
|
||||
// Global for paint clipping height.
|
||||
extern uint8 gClipHeight;
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "../../ride/ride_data.h"
|
||||
#include "../../interface/viewport.h"
|
||||
#include "../../ride/vehicle_paint.h"
|
||||
#include "../../localisation/localisation.h" // zax
|
||||
#include "../../localisation/localisation.h"
|
||||
|
||||
/**
|
||||
* Paint Quadrant
|
||||
|
@ -47,9 +47,11 @@ void sprite_paint_setup(const uint16 eax, const uint16 ecx) {
|
|||
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);
|
||||
|
||||
// zax: Only paint sprites that are below the clip height.
|
||||
// Only paint sprites that are below the clip height.
|
||||
// Here converting from land/path/etc height scale to pixel height scale.
|
||||
if ((gCurrentViewportFlags & VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT) && (spr->unknown.z >= ((gClipHeight+2) * 8))) continue;
|
||||
// Note: peeps/scenery on slopes will be above the base
|
||||
// height of the slope element, and consequently clipped.
|
||||
if ((gCurrentViewportFlags & VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT) && (spr->unknown.z > (gClipHeight * 8) )) continue;
|
||||
|
||||
dpi = unk_140E9A8;
|
||||
|
||||
|
|
Loading…
Reference in New Issue