forked from mirror/OpenTTD
Codechange: Use std::tuple for slope functions with two return values
This commit is contained in:
@@ -267,8 +267,8 @@ CommandCost CmdBuildObject(DoCommandFlag flags, TileIndex tile, ObjectType type,
|
||||
}
|
||||
|
||||
/* So, now the surface is checked... check the slope of said surface. */
|
||||
int allowed_z;
|
||||
if (GetTileSlope(tile, &allowed_z) != SLOPE_FLAT) allowed_z++;
|
||||
auto [slope, allowed_z] = GetTileSlopeZ(tile);
|
||||
if (slope != SLOPE_FLAT) allowed_z++;
|
||||
|
||||
for (TileIndex t : ta) {
|
||||
uint16_t callback = CALLBACK_FAILED;
|
||||
@@ -492,8 +492,7 @@ static void DrawTile_Object(TileInfo *ti)
|
||||
static int GetSlopePixelZ_Object(TileIndex tile, uint x, uint y, bool)
|
||||
{
|
||||
if (IsObjectType(tile, OBJECT_OWNED_LAND)) {
|
||||
int z;
|
||||
Slope tileh = GetTilePixelSlope(tile, &z);
|
||||
auto [tileh, z] = GetTilePixelSlope(tile);
|
||||
|
||||
return z + GetPartialPixelZ(x & 0xF, y & 0xF, tileh);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user