mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 08:45:00 +01:00
Code style: Remove snakes from everything world apart from Map.h (#18273)
* Remove remaining snakes from world (outside of map) * Initial few desnaking of Map.h
This commit is contained in:
@@ -135,10 +135,10 @@ GameActions::Result FootpathPlaceAction::Execute() const
|
||||
// It is possible, let's remove walls between the old and new piece of path
|
||||
auto zLow = _loc.z;
|
||||
auto zHigh = zLow + PATH_CLEARANCE;
|
||||
wall_remove_intersecting_walls(
|
||||
WallRemoveIntersectingWalls(
|
||||
{ _loc, zLow, zHigh + ((_slope & TILE_ELEMENT_SURFACE_RAISED_CORNERS_MASK) ? 16 : 0) },
|
||||
DirectionReverse(_direction));
|
||||
wall_remove_intersecting_walls(
|
||||
WallRemoveIntersectingWalls(
|
||||
{ _loc.x - CoordsDirectionDelta[_direction].x, _loc.y - CoordsDirectionDelta[_direction].y, zLow, zHigh },
|
||||
_direction);
|
||||
}
|
||||
@@ -318,7 +318,7 @@ GameActions::Result FootpathPlaceAction::ElementInsertQuery(GameActions::Result
|
||||
GameActions::Status::Disallowed, STR_CANT_BUILD_FOOTPATH_HERE, STR_CANT_BUILD_THIS_UNDERWATER);
|
||||
}
|
||||
|
||||
auto surfaceElement = map_get_surface_element_at(_loc);
|
||||
auto surfaceElement = MapGetSurfaceElementAt(_loc);
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_NONE);
|
||||
@@ -381,7 +381,7 @@ GameActions::Result FootpathPlaceAction::ElementInsertExecute(GameActions::Resul
|
||||
const auto clearanceData = canBuild.GetData<ConstructClearResult>();
|
||||
gFootpathGroundFlags = clearanceData.GroundFlags;
|
||||
|
||||
auto surfaceElement = map_get_surface_element_at(_loc);
|
||||
auto surfaceElement = MapGetSurfaceElementAt(_loc);
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_NONE);
|
||||
@@ -489,8 +489,8 @@ void FootpathPlaceAction::RemoveIntersectingWalls(PathElement* pathElement) cons
|
||||
{
|
||||
auto direction = pathElement->GetSlopeDirection();
|
||||
int32_t z = pathElement->GetBaseZ();
|
||||
wall_remove_intersecting_walls({ _loc, z, z + (6 * COORDS_Z_STEP) }, DirectionReverse(direction));
|
||||
wall_remove_intersecting_walls({ _loc, z, z + (6 * COORDS_Z_STEP) }, direction);
|
||||
WallRemoveIntersectingWalls({ _loc, z, z + (6 * COORDS_Z_STEP) }, DirectionReverse(direction));
|
||||
WallRemoveIntersectingWalls({ _loc, z, z + (6 * COORDS_Z_STEP) }, direction);
|
||||
// Removing walls may have made the pointer invalid, so find it again
|
||||
auto tileElement = MapGetFootpathElement(CoordsXYZ(_loc, z));
|
||||
if (tileElement == nullptr)
|
||||
|
||||
Reference in New Issue
Block a user