mirror of https://github.com/OpenTTD/OpenTTD
(svn r4269) We don't use GNU indentation style
parent
4e743232de
commit
2ecfed2fad
16
water_cmd.c
16
water_cmd.c
|
@ -281,8 +281,8 @@ static int32 ClearTile_Water(TileIndex tile, byte flags)
|
||||||
|
|
||||||
if (flags & DC_EXEC) DoClearSquare(tile);
|
if (flags & DC_EXEC) DoClearSquare(tile);
|
||||||
return _price.clear_water;
|
return _price.clear_water;
|
||||||
case WATER_COAST:
|
|
||||||
{
|
case WATER_COAST: {
|
||||||
uint slope = GetTileSlope(tile, NULL);
|
uint slope = GetTileSlope(tile, NULL);
|
||||||
|
|
||||||
// Make sure no vehicle is on the tile
|
// Make sure no vehicle is on the tile
|
||||||
|
@ -301,8 +301,8 @@ static int32 ClearTile_Water(TileIndex tile, byte flags)
|
||||||
return _price.purchase_land;
|
return _price.purchase_land;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case WATER_LOCK:
|
|
||||||
{
|
case WATER_LOCK: {
|
||||||
static const TileIndexDiffC _shiplift_tomiddle_offs[] = {
|
static const TileIndexDiffC _shiplift_tomiddle_offs[] = {
|
||||||
{ 0, 0}, {0, 0}, { 0, 0}, {0, 0}, // middle
|
{ 0, 0}, {0, 0}, { 0, 0}, {0, 0}, // middle
|
||||||
{-1, 0}, {0, 1}, { 1, 0}, {0, -1}, // lower
|
{-1, 0}, {0, 1}, { 1, 0}, {0, -1}, // lower
|
||||||
|
@ -314,14 +314,16 @@ static int32 ClearTile_Water(TileIndex tile, byte flags)
|
||||||
// move to the middle tile..
|
// move to the middle tile..
|
||||||
return RemoveShiplift(tile + ToTileIndexDiff(_shiplift_tomiddle_offs[GetSection(tile)]), flags);
|
return RemoveShiplift(tile + ToTileIndexDiff(_shiplift_tomiddle_offs[GetSection(tile)]), flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
case WATER_DEPOT:
|
case WATER_DEPOT:
|
||||||
if (flags & DC_AUTO) return_cmd_error(STR_2004_BUILDING_MUST_BE_DEMOLISHED);
|
if (flags & DC_AUTO) return_cmd_error(STR_2004_BUILDING_MUST_BE_DEMOLISHED);
|
||||||
|
|
||||||
return RemoveShipDepot(tile, flags);
|
return RemoveShipDepot(tile, flags);
|
||||||
default: NOT_REACHED();
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0; // useless but silences warning
|
default:
|
||||||
|
NOT_REACHED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// return true if a tile is a water tile.
|
// return true if a tile is a water tile.
|
||||||
|
|
Loading…
Reference in New Issue