diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index f56718fd41..6e95dd3b12 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -404,7 +404,7 @@ static void sub_6A4101( } } - if (!footpath_element_has_queue_banner(tile_element)) + if (!tile_element->AsPath()->HasQueueBanner()) { return; } diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index a10ffa6abf..deb1f217ba 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -1987,9 +1987,9 @@ void PathElement::SetIsQueue(bool isQueue) type |= FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE; } -bool footpath_element_has_queue_banner(const rct_tile_element* tileElement) +bool PathElement::HasQueueBanner() const { - return (tileElement->properties.path.type & FOOTPATH_PROPERTIES_FLAG_HAS_QUEUE_BANNER) != 0; + return (entryIndex & FOOTPATH_PROPERTIES_FLAG_HAS_QUEUE_BANNER) != 0; } bool footpath_element_is_wide(const rct_tile_element* tileElement) diff --git a/src/openrct2/world/Footpath.h b/src/openrct2/world/Footpath.h index 8061c1eb4e..3826fcfd3c 100644 --- a/src/openrct2/world/Footpath.h +++ b/src/openrct2/world/Footpath.h @@ -155,7 +155,6 @@ bool footpath_is_blocked_by_vehicle(const TileCoordsXYZ& position); int32_t footpath_is_connected_to_map_edge(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t flags); uint8_t footpath_element_get_slope_direction(const rct_tile_element* tileElement); -bool footpath_element_has_queue_banner(const rct_tile_element* tileElement); bool footpath_element_is_wide(const rct_tile_element* tileElement); uint8_t footpath_element_get_type(const rct_tile_element* tileElement); void footpath_element_set_type(rct_tile_element* tileElement, uint8_t type); diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index bac8289399..bc0b7aa8a7 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -145,7 +145,7 @@ static bool map_animation_invalidate_queue_banner(int32_t x, int32_t y, int32_t continue; if (!(tileElement->flags & 1)) continue; - if (!footpath_element_has_queue_banner(tileElement)) + if (!tileElement->AsPath()->HasQueueBanner()) continue; int32_t direction = (footpath_element_get_direction(tileElement) + get_current_rotation()) & 3; diff --git a/src/openrct2/world/TileElement.h b/src/openrct2/world/TileElement.h index cc213a74f7..86ed9f697b 100644 --- a/src/openrct2/world/TileElement.h +++ b/src/openrct2/world/TileElement.h @@ -187,9 +187,9 @@ assert_struct_size(SurfaceElement, 8); struct PathElement : TileElementBase { private: - uint8_t entryIndex; // 4 0xF0 Path type, 0x08 Ride sign, 0x04 Set when path is diagonal, 0x03 Rotation - uint8_t additions; // 5 - uint8_t edges; // 6 + uint8_t entryIndex; // 4 0xF0 Path type, 0x08 Ride sign, 0x04 Set when path is diagonal, 0x03 Rotation + uint8_t additions; // 5 + uint8_t edges; // 6 union { uint8_t additionStatus; // 7 @@ -197,12 +197,13 @@ private: }; public: - bool IsQueue() const; - void SetIsQueue(bool isQueue); - bool IsSloped() const; void SetSloped(bool isSloped); - + + bool IsQueue() const; + void SetIsQueue(bool isQueue); + bool HasQueueBanner() const; + uint8_t GetRCT1PathType() const; }; assert_struct_size(PathElement, 8);