Changeset - r18256:4d7d2550ba08
[Not reviewed]
master
0 7 0
rubidium - 13 years ago 2011-11-04 10:31:46
rubidium@openttd.org
(svn r23102) -Codechange: remove the remaining pointless multiplications by TILE_HEIGHT
7 files changed with 8 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/clear_cmd.cpp
Show inline comments
 
@@ -231,7 +231,7 @@ static void TileLoop_Clear(TileIndex til
 
	/* If the tile is at any edge flood it to prevent maps without water. */
 
	if (_settings_game.construction.freeform_edges && DistanceFromEdge(tile) == 1) {
 
		uint z;
 
		Slope slope = GetTilePixelSlope(tile, &z);
 
		Slope slope = GetTileSlope(tile, &z);
 
		if (z == 0 && slope == SLOPE_FLAT) {
 
			DoFloodTile(tile);
 
			MarkTileDirtyByTile(tile);
src/dock_gui.cpp
Show inline comments
 
@@ -60,7 +60,7 @@ void CcBuildCanal(const CommandCost &res
 
static TileIndex GetOtherAqueductEnd(TileIndex tile_from, TileIndex *tile_to = NULL)
 
{
 
	uint z;
 
	DiagDirection dir = GetInclinedSlopeDirection(GetTilePixelSlope(tile_from, &z));
 
	DiagDirection dir = GetInclinedSlopeDirection(GetTileSlope(tile_from, &z));
 

	
 
	/* If the direction isn't right, just return the next tile so the command
 
	 * complains about the wrong slope instead of the ends not matching up.
 
@@ -79,7 +79,7 @@ static TileIndex GetOtherAqueductEnd(Til
 

	
 
		if (length > max_length) break;
 

	
 
		if (GetTileMaxPixelZ(endtile) > z) {
 
		if (GetTileMaxZ(endtile) > z) {
 
			if (tile_to != NULL) *tile_to = endtile;
 
			break;
 
		}
src/elrail.cpp
Show inline comments
 
@@ -376,7 +376,7 @@ static void DrawCatenaryRailway(const Ti
 
			foundation = GetBridgeFoundation(tileh[TS_NEIGHBOUR], DiagDirToAxis(GetTunnelBridgeDirection(neighbour)));
 
		}
 

	
 
		ApplyPixelFoundationToSlope(foundation, &tileh[TS_NEIGHBOUR]);
 
		ApplyFoundationToSlope(foundation, &tileh[TS_NEIGHBOUR]);
 

	
 
		/* Half tile slopes coincide only with horizontal/vertical track.
 
		 * Faking a flat slope results in the correct sprites on positions. */
src/industry_cmd.cpp
Show inline comments
 
@@ -1262,7 +1262,7 @@ static CommandCost CheckNewIndustry_Lumb
 
 */
 
static CommandCost CheckNewIndustry_BubbleGen(TileIndex tile)
 
{
 
	if (GetTilePixelZ(tile) > TILE_HEIGHT * 4) {
 
	if (GetTileZ(tile) > 4) {
 
		return_cmd_error(STR_ERROR_CAN_ONLY_BE_BUILT_IN_LOW_AREAS);
 
	}
 
	return CommandCost();
src/misc_gui.cpp
Show inline comments
 
@@ -221,7 +221,7 @@ public:
 
		snprintf(tmp, lengthof(tmp), "0x%.4X", tile);
 
		SetDParam(0, TileX(tile));
 
		SetDParam(1, TileY(tile));
 
		SetDParam(2, GetTilePixelZ(tile) / TILE_HEIGHT);
 
		SetDParam(2, GetTileZ(tile));
 
		SetDParamStr(3, tmp);
 
		GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_LANDINFO_COORDS, lastof(this->landinfo_data[line_nr]));
 
		line_nr++;
src/newgrf_canal.cpp
Show inline comments
 
@@ -48,7 +48,7 @@ static uint32 CanalGetVariable(const Res
 
	switch (variable) {
 
		/* Height of tile */
 
		case 0x80: {
 
			uint z = GetTilePixelZ(tile) / TILE_HEIGHT;
 
			uint z = GetTileZ(tile);
 
			/* Return consistent height within locks */
 
			if (IsTileType(tile, MP_WATER) && IsLock(tile) && GetLockPart(tile) == LOCK_PART_UPPER) z--;
 
			return z;
src/rail_cmd.cpp
Show inline comments
 
@@ -676,7 +676,7 @@ bool FloodHalftile(TileIndex t)
 
		}
 
	} else {
 
		/* Make shore on steep slopes and 'three-corners-raised'-slopes. */
 
		if (ApplyPixelFoundationToSlope(GetRailFoundation(tileh, rail_bits), &tileh) == 0) {
 
		if (ApplyFoundationToSlope(GetRailFoundation(tileh, rail_bits), &tileh) == 0) {
 
			if (IsSteepSlope(tileh) || IsSlopeWithThreeCornersRaised(tileh)) {
 
				flooded = true;
 
				SetRailGroundType(t, RAIL_GROUND_WATER);
0 comments (0 inline, 0 general)