mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-25 07:44:38 +01:00
Replace C-style function for HasQueueBanner()
This commit is contained in:
committed by
Michael Steenbeek
parent
37f59e17dc
commit
f9f233dbb1
@@ -404,7 +404,7 @@ static void sub_6A4101(
|
||||
}
|
||||
}
|
||||
|
||||
if (!footpath_element_has_queue_banner(tile_element))
|
||||
if (!tile_element->AsPath()->HasQueueBanner())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user