mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 12:33:17 +01:00
Fix support drawing issue
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
#include "../../world/scenery.h"
|
||||
|
||||
// 6B8172:
|
||||
void scenery_multiple_paint_supports(uint8 direction, uint16 height, rct_map_element *mapElement, uint32 dword_F4387C, rct_scenery_entry *entry)
|
||||
void scenery_multiple_paint_supports(uint8 direction, uint16 height, rct_map_element *mapElement, uint32 dword_F4387C, rct_large_scenery_tile *tile)
|
||||
{
|
||||
if (!(entry->large_scenery.flags & 0x20)) {
|
||||
if (tile->var_7 & 0x20) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ void scenery_multiple_paint_supports(uint8 direction, uint16 height, rct_map_ele
|
||||
|
||||
int clearanceHeight = ceil2(mapElement->clearance_height * 8 + 15, 16);
|
||||
|
||||
if (entry->large_scenery.flags & 0x40) {
|
||||
if (tile->var_7 & 0x40) {
|
||||
paint_util_set_segment_support_height(SEGMENTS_ALL, clearanceHeight, 0x20);
|
||||
} else {
|
||||
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
|
||||
@@ -204,7 +204,7 @@ void scenery_multiple_paint(uint8 direction, uint16 height, rct_map_element *map
|
||||
boxlength.z = ah;
|
||||
sub_98197C(image_id, 0, 0, boxlength.x, boxlength.y, ah, height, boxoffset.x, boxoffset.y, boxoffset.z, get_current_rotation());
|
||||
if (entry->large_scenery.var_11 == 0xFF || direction == 1 || direction == 2) {
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, entry);
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, tile);
|
||||
return;
|
||||
}
|
||||
if (entry->large_scenery.flags & 0x4) {
|
||||
@@ -212,13 +212,13 @@ void scenery_multiple_paint(uint8 direction, uint16 height, rct_map_element *map
|
||||
if (entry->large_scenery.tiles[1].x_offset != (sint16)0xFFFF) {
|
||||
al = ((mapElement->properties.surface.terrain >> 2) - 1) & 3;
|
||||
if (al != direction) {
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, entry);
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, tile);
|
||||
return;
|
||||
}
|
||||
}
|
||||
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
|
||||
if (dpi->zoom_level > 1) {
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, entry);
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, tile);
|
||||
return;
|
||||
}
|
||||
// 6B8331:
|
||||
@@ -301,12 +301,12 @@ void scenery_multiple_paint(uint8 direction, uint16 height, rct_map_element *map
|
||||
}
|
||||
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
|
||||
if (dpi->zoom_level > 0) {
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, entry);
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, tile);
|
||||
return;
|
||||
}
|
||||
uint8 al = ((mapElement->properties.surface.terrain >> 2) - 1) & 3;
|
||||
if (al != direction) {
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, entry);
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, tile);
|
||||
return;
|
||||
}
|
||||
// Draw scrolling text:
|
||||
@@ -344,5 +344,5 @@ void scenery_multiple_paint(uint8 direction, uint16 height, rct_map_element *map
|
||||
uint16 scroll = (gCurrentTicks / 2) % string_width;
|
||||
sub_98199C(scrolling_text_setup(stringId, scroll, scrollMode), 0, 0, 1, 1, 21, height + 25, boxoffset.x, boxoffset.y, boxoffset.z, get_current_rotation());
|
||||
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, entry);
|
||||
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, tile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user