mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Change MapAnimations::MarkTileForInvalidation parameter to TileCoordsXY
This commit is contained in:
@@ -161,7 +161,7 @@ GameActions::Result BannerPlaceAction::Execute() const
|
||||
bannerElement->SetGhost(GetFlags() & GAME_COMMAND_FLAG_GHOST);
|
||||
|
||||
MapInvalidateTileFull(_loc);
|
||||
MapAnimations::MarkTileForInvalidation(_loc);
|
||||
MapAnimations::MarkTileForInvalidation(TileCoordsXY(_loc));
|
||||
|
||||
res.Cost = bannerEntry->price;
|
||||
return res;
|
||||
|
||||
@@ -314,7 +314,7 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const
|
||||
newSceneryElement->SetBannerIndex(banner->id);
|
||||
}
|
||||
|
||||
MapAnimations::MarkTileForInvalidation(curTile);
|
||||
MapAnimations::MarkTileForInvalidation(TileCoordsXY(curTile));
|
||||
MapInvalidateTileFull(curTile);
|
||||
|
||||
if (tile.index == 0)
|
||||
|
||||
@@ -186,7 +186,7 @@ GameActions::Result ParkEntrancePlaceAction::Execute() const
|
||||
|
||||
if (index == 0)
|
||||
{
|
||||
MapAnimations::MarkTileForInvalidation(entranceLoc);
|
||||
MapAnimations::MarkTileForInvalidation(TileCoordsXY(entranceLoc));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ GameActions::Result RideEntranceExitPlaceAction::Execute() const
|
||||
station.LastPeepInQueue = EntityId::GetNull();
|
||||
station.QueueLength = 0;
|
||||
|
||||
MapAnimations::MarkTileForInvalidation(_loc);
|
||||
MapAnimations::MarkTileForInvalidation(TileCoordsXY(_loc));
|
||||
}
|
||||
|
||||
FootpathQueueChainReset();
|
||||
|
||||
@@ -456,7 +456,7 @@ GameActions::Result SmallSceneryPlaceAction::Execute() const
|
||||
}
|
||||
else if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ANIMATED))
|
||||
{
|
||||
MapAnimations::MarkTileForInvalidation(_loc);
|
||||
MapAnimations::MarkTileForInvalidation(TileCoordsXY(_loc));
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
@@ -600,7 +600,7 @@ GameActions::Result TrackPlaceAction::Execute() const
|
||||
case TrackElemType::Whirlpool:
|
||||
[[fallthrough]];
|
||||
case TrackElemType::SpinningTunnel:
|
||||
MapAnimations::MarkTileForInvalidation(mapLoc);
|
||||
MapAnimations::MarkTileForInvalidation(TileCoordsXY(mapLoc));
|
||||
break;
|
||||
case TrackElemType::Brakes:
|
||||
[[fallthrough]];
|
||||
|
||||
@@ -399,7 +399,7 @@ GameActions::Result WallPlaceAction::Execute() const
|
||||
|
||||
wallElement->SetGhost(GetFlags() & GAME_COMMAND_FLAG_GHOST);
|
||||
|
||||
MapAnimations::MarkTileForInvalidation(targetLoc);
|
||||
MapAnimations::MarkTileForInvalidation(TileCoordsXY(targetLoc));
|
||||
MapInvalidateTileZoom1({ _loc, wallElement->GetBaseZ(), wallElement->GetBaseZ() + 72 });
|
||||
|
||||
res.Cost = wallEntry->price;
|
||||
|
||||
@@ -914,7 +914,7 @@ void FootpathChainRideQueue(
|
||||
lastPathElement->AsPath()->SetHasQueueBanner(true);
|
||||
lastPathElement->AsPath()->SetQueueBannerDirection(lastPathDirection); // set the ride sign direction
|
||||
|
||||
MapAnimations::MarkTileForInvalidation(lastPath);
|
||||
MapAnimations::MarkTileForInvalidation(TileCoordsXY(lastPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,12 +592,11 @@ static std::optional<UpdateType> IsElementAnimated(const TileElementBase& elemen
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
void MapAnimations::MarkTileForInvalidation(const CoordsXY coords)
|
||||
void MapAnimations::MarkTileForInvalidation(const TileCoordsXY coords)
|
||||
{
|
||||
const TileCoordsXY tileCoords(coords);
|
||||
if (!_mapAnimationsUpdate.contains(tileCoords))
|
||||
if (!_mapAnimationsUpdate.contains(coords))
|
||||
{
|
||||
_mapAnimationsInvalidate.insert(tileCoords);
|
||||
_mapAnimationsInvalidate.insert(coords);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -624,7 +623,7 @@ void MapAnimations::MarkAllTiles()
|
||||
switch (*isAnimated)
|
||||
{
|
||||
case UpdateType::invalidate:
|
||||
MarkTileForInvalidation(TileCoordsXY(it.x, it.y).ToCoordsXY());
|
||||
MarkTileForInvalidation(TileCoordsXY(it.x, it.y));
|
||||
break;
|
||||
case UpdateType::update:
|
||||
MarkTileForUpdate(TileCoordsXY(it.x, it.y));
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRCT2::MapAnimations
|
||||
landEdgeDoor,
|
||||
};
|
||||
|
||||
void MarkTileForInvalidation(const CoordsXY coords);
|
||||
void MarkTileForInvalidation(const TileCoordsXY coords);
|
||||
void MarkTileForUpdate(const TileCoordsXY coords);
|
||||
void CreateTemporary(const CoordsXYZ& coords, const TemporaryType type);
|
||||
void MarkAllTiles();
|
||||
|
||||
Reference in New Issue
Block a user