summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2011-01-21 15:48:52 +0000
committersmatz <smatz@openttd.org>2011-01-21 15:48:52 +0000
commit4432f7799d5f24070d6979242dd0107edf42ede0 (patch)
tree43c4faebbb99bc2ddb2f6233ddcca4e42bddf4d2 /src
parent6dc24cf6431be66432d53f33d92ef5abbc80f88c (diff)
downloadopenttd-4432f7799d5f24070d6979242dd0107edf42ede0.tar.xz
(svn r21877) -Codechange: move definition of HALF_TILE_SIZE to tile_type.h
Diffstat (limited to 'src')
-rw-r--r--src/ground_vehicle.hpp1
-rw-r--r--src/tile_type.h3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp
index 0a17ea209..0e22b144b 100644
--- a/src/ground_vehicle.hpp
+++ b/src/ground_vehicle.hpp
@@ -125,7 +125,6 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
* direction it is sloped, we get the 'z' at the center of
* the tile (middle_z) and the edge of the tile (old_z),
* which we then can compare. */
- static const int HALF_TILE_SIZE = TILE_SIZE / 2;
static const int INV_TILE_SIZE_MASK = ~(TILE_SIZE - 1);
byte middle_z = GetSlopeZ((this->x_pos & INV_TILE_SIZE_MASK) | HALF_TILE_SIZE, (this->y_pos & INV_TILE_SIZE_MASK) | HALF_TILE_SIZE);
diff --git a/src/tile_type.h b/src/tile_type.h
index a939e030a..b43b0e6b5 100644
--- a/src/tile_type.h
+++ b/src/tile_type.h
@@ -13,7 +13,8 @@
#define TILE_TYPE_H
static const uint TILE_SIZE = 16; ///< Tiles are 16x16 "units" in size
-static const uint TILE_UNIT_MASK = TILE_SIZE - 1; ///< for masking in/out the inner-tile units.
+static const uint HALF_TILE_SIZE = TILE_SIZE / 2; ///< Half of tile size, to get centre of a tile.
+static const uint TILE_UNIT_MASK = TILE_SIZE - 1; ///< For masking in/out the inner-tile units.
static const uint TILE_PIXELS = 32; ///< a tile is 32x32 pixels
static const uint TILE_HEIGHT = 8; ///< The standard height-difference between tiles on two levels is 8 (z-diff 8)