mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 06:23:04 +01:00
Create tile_element_get_ride_index()
This commit is contained in:
@@ -220,7 +220,7 @@ sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interact
|
||||
if (tile_element_get_type(tileElement) == TILE_ELEMENT_TYPE_PATH)
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
ride = get_ride(track_element_get_ride_index(tileElement));
|
||||
ride = get_ride(tile_element_get_ride_index(tileElement));
|
||||
if (ride->status != RIDE_STATUS_CLOSED)
|
||||
return info->type;
|
||||
|
||||
|
||||
@@ -4629,3 +4629,18 @@ uint16 check_max_allowable_land_rights_for_tile(uint8 x, uint8 y, uint8 base_z)
|
||||
|
||||
return destOwnership;
|
||||
}
|
||||
|
||||
uint8 tile_element_get_ride_index(const rct_tile_element * tileElement)
|
||||
{
|
||||
switch (tile_element_get_type(tileElement))
|
||||
{
|
||||
case TILE_ELEMENT_TYPE_TRACK:
|
||||
return track_element_get_ride_index(tileElement);
|
||||
case TILE_ELEMENT_TYPE_ENTRANCE:
|
||||
return tileElement->properties.entrance.ride_index;
|
||||
case TILE_ELEMENT_TYPE_PATH:
|
||||
return tileElement->properties.path.ride_index;
|
||||
default:
|
||||
return 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -545,6 +545,7 @@ void wall_element_set_secondary_colour(rct_tile_element * wallElement, uint8 sec
|
||||
|
||||
uint32 map_get_available_peep_spawn_index_list(uint32* peepSpawnIndexList);
|
||||
uint16 check_max_allowable_land_rights_for_tile(uint8 x, uint8 y, uint8 base_z);
|
||||
uint8 tile_element_get_ride_index(const rct_tile_element * tileElement);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user