Clang format

This commit is contained in:
duncanspumpkin 2019-08-13 20:57:36 +01:00
parent fb8c42f3c2
commit bc12618d46
8 changed files with 11 additions and 17 deletions

View File

@ -68,8 +68,7 @@ public:
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_CANT_BUILD_FOOTPATH_HERE, STR_OFF_EDGE_OF_MAP);
}
if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode)
&& !map_is_location_owned(_loc))
if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && !map_is_location_owned(_loc))
{
return MakeResult(GA_ERROR::DISALLOWED, STR_CANT_BUILD_FOOTPATH_HERE, STR_LAND_NOT_OWNED_BY_PARK);
}

View File

@ -69,8 +69,7 @@ public:
GA_ERROR::INVALID_PARAMETERS, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_OFF_EDGE_OF_MAP);
}
if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode)
&& !map_is_location_owned(_loc))
if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && !map_is_location_owned(_loc))
{
return MakeResult(GA_ERROR::DISALLOWED, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK);
}

View File

@ -92,8 +92,7 @@ private:
audio_play_sound_at_location(SoundId::PlaceItem, _coords.x, _coords.y, tile_element_height(_coords));
}
uint8_t minHeight = map_get_lowest_land_height(
validRange);
uint8_t minHeight = map_get_lowest_land_height(validRange);
for (int32_t y = validRange.GetTop(); y <= validRange.GetBottom(); y += 32)
{

View File

@ -72,8 +72,8 @@ public:
}
private:
GameActionResult::Ptr SmoothLandTile(int32_t direction, bool isExecuting, int32_t x, int32_t y, SurfaceElement* surfaceElement)
const
GameActionResult::Ptr SmoothLandTile(
int32_t direction, bool isExecuting, int32_t x, int32_t y, SurfaceElement* surfaceElement) const
{
int32_t targetBaseZ = surfaceElement->base_height;
int32_t slope = surfaceElement->GetSlope();

View File

@ -958,7 +958,8 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
continue;
}
const uint32_t surfaceSlope = viewport_surface_paint_setup_get_relative_slope(reinterpret_cast<TileElement*>(surfaceElement), rotation);
const uint32_t surfaceSlope = viewport_surface_paint_setup_get_relative_slope(
reinterpret_cast<TileElement*>(surfaceElement), rotation);
const uint8_t baseHeight = surfaceElement->base_height / 2;
const corner_height& ch = corner_heights[surfaceSlope];

View File

@ -6484,7 +6484,7 @@ bool loc_690FD0(Peep* peep, uint8_t* rideToView, uint8_t* rideSeatToView, TileEl
*/
static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, uint8_t* rideToView, uint8_t* rideSeatToView)
{
TileElement *tileElement;
TileElement* tileElement;
auto surfaceElement = map_get_surface_element_at({ peep->next_x, peep->next_y });

View File

@ -275,9 +275,7 @@ static uint8_t footpath_element_next_in_direction(TileCoordsXYZ loc, PathElement
*
* This is the recursive portion of footpath_element_destination_in_direction().
*/
static uint8_t footpath_element_dest_in_dir(
TileCoordsXYZ loc, uint8_t chosenDirection, ride_id_t* outRideIndex,
int32_t level)
static uint8_t footpath_element_dest_in_dir(TileCoordsXYZ loc, uint8_t chosenDirection, ride_id_t* outRideIndex, int32_t level)
{
TileElement* tileElement;
int32_t direction;

View File

@ -9917,8 +9917,7 @@ void vehicle_update_crossings(const rct_vehicle* vehicle)
while (true)
{
auto* pathElement = map_get_path_element_at(
{ xyElement.x / 32, xyElement.y / 32, xyElement.element->base_height });
auto* pathElement = map_get_path_element_at({ xyElement.x / 32, xyElement.y / 32, xyElement.element->base_height });
auto ride = get_ride(vehicle->ride);
// Many New Element parks have invisible rides hacked into the path.
@ -9993,8 +9992,7 @@ void vehicle_update_crossings(const rct_vehicle* vehicle)
}
}
auto* pathElement = map_get_path_element_at(
{ xyElement.x / 32, xyElement.y / 32, xyElement.element->base_height });
auto* pathElement = map_get_path_element_at({ xyElement.x / 32, xyElement.y / 32, xyElement.element->base_height });
if (pathElement)
{
pathElement->SetIsBlockedByVehicle(false);