1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 15:54:31 +01:00

Merge pull request #12976 from mwnciau/Refactor-TRACK_ELEM-enum

Refactor TRACK_ELEM_* enum
This commit is contained in:
Tulio Leao
2020-10-01 22:05:44 -03:00
committed by GitHub
149 changed files with 9181 additions and 9188 deletions

View File

@@ -266,7 +266,7 @@ static bool map_animation_invalidate_track_waterfall(const CoordsXYZ& loc)
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
continue;
if (tileElement->AsTrack()->GetTrackType() == TRACK_ELEM_WATERFALL)
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::Waterfall)
{
map_invalidate_tile_zoom1({ loc, loc.z + 14, loc.z + 46 });
return false;
@@ -295,7 +295,7 @@ static bool map_animation_invalidate_track_rapids(const CoordsXYZ& loc)
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
continue;
if (tileElement->AsTrack()->GetTrackType() == TRACK_ELEM_RAPIDS)
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::Rapids)
{
map_invalidate_tile_zoom1({ loc, loc.z + 14, loc.z + 18 });
return false;
@@ -324,7 +324,7 @@ static bool map_animation_invalidate_track_onridephoto(const CoordsXYZ& loc)
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
continue;
if (tileElement->AsTrack()->GetTrackType() == TRACK_ELEM_ON_RIDE_PHOTO)
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::OnRidePhoto)
{
map_invalidate_tile_zoom1({ loc, loc.z, tileElement->GetClearanceZ() });
if (game_is_paused())
@@ -365,7 +365,7 @@ static bool map_animation_invalidate_track_whirlpool(const CoordsXYZ& loc)
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
continue;
if (tileElement->AsTrack()->GetTrackType() == TRACK_ELEM_WHIRLPOOL)
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::Whirlpool)
{
map_invalidate_tile_zoom1({ loc, loc.z + 14, loc.z + 18 });
return false;
@@ -394,7 +394,7 @@ static bool map_animation_invalidate_track_spinningtunnel(const CoordsXYZ& loc)
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
continue;
if (tileElement->AsTrack()->GetTrackType() == TRACK_ELEM_SPINNING_TUNNEL)
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::SpinningTunnel)
{
map_invalidate_tile_zoom1({ loc, loc.z + 14, loc.z + 32 });
return false;
@@ -690,16 +690,16 @@ void AutoCreateMapAnimations()
auto track = el->AsTrack();
switch (track->GetTrackType())
{
case TRACK_ELEM_WATERFALL:
case TrackElemType::Waterfall:
map_animation_create(MAP_ANIMATION_TYPE_TRACK_WATERFALL, loc);
break;
case TRACK_ELEM_RAPIDS:
case TrackElemType::Rapids:
map_animation_create(MAP_ANIMATION_TYPE_TRACK_RAPIDS, loc);
break;
case TRACK_ELEM_WHIRLPOOL:
case TrackElemType::Whirlpool:
map_animation_create(MAP_ANIMATION_TYPE_TRACK_WHIRLPOOL, loc);
break;
case TRACK_ELEM_SPINNING_TUNNEL:
case TrackElemType::SpinningTunnel:
map_animation_create(MAP_ANIMATION_TYPE_TRACK_SPINNINGTUNNEL, loc);
break;
}