summaryrefslogtreecommitdiff
path: root/viewport.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-06-24 12:38:35 +0000
committertron <tron@openttd.org>2005-06-24 12:38:35 +0000
commit3154e7148d00f0203760aefbc6f8a5bd210cc30c (patch)
tree17004bd894946da466a10e50a86ff66225cf8896 /viewport.c
parent3448729ff36ca9e91d91c256d9a5381ba901230b (diff)
downloadopenttd-3154e7148d00f0203760aefbc6f8a5bd210cc30c.tar.xz
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
Diffstat (limited to 'viewport.c')
-rw-r--r--viewport.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/viewport.c b/viewport.c
index 210370122..45615dee4 100644
--- a/viewport.c
+++ b/viewport.c
@@ -549,10 +549,10 @@ void *AddStringToDraw(int x, int y, StringID string, uint32 params_1, uint32 par
#ifdef DEBUG_TILE_PUSH
static int _num_push;
-static uint _pushed_tile[200];
+static TileIndex _pushed_tile[200];
static int _pushed_track[200];
-static uint _stored_tile[200];
+static TileIndex _stored_tile[200];
static int _stored_track[200];
static int _num_stored;
@@ -564,7 +564,7 @@ void dbg_store_path(void)
MarkWholeScreenDirty();
}
-void dbg_push_tile(uint tile, int track)
+void dbg_push_tile(TileIndex tile, int track)
{
_pushed_tile[_num_push] = tile;
_pushed_track[_num_push++] = track;
@@ -684,7 +684,7 @@ static void DrawTileSelection(const TileInfo *ti)
} else if (IsPartOfAutoLine(ti->x, ti->y)) { // autorail highlighting long line
int dir = _thd.drawstyle & ~0xF0;
- uint start = TILE_FROM_XY(_thd.selstart.x, _thd.selstart.y);
+ TileIndex start = TILE_FROM_XY(_thd.selstart.x, _thd.selstart.y);
int diffx, diffy;
int side;
@@ -1698,10 +1698,8 @@ static bool CheckClickOnWaypoint(ViewPort *vp, int x, int y)
static void CheckClickOnLandscape(ViewPort *vp, int x, int y)
{
Point pt = TranslateXYToTileCoord(vp,x,y);
- if (pt.x != -1) {
- uint tile = TILE_FROM_XY(pt.x, pt.y);
- ClickTile(tile);
- }
+
+ if (pt.x != -1) ClickTile(TILE_FROM_XY(pt.x, pt.y));
}
void HandleClickOnTrain(Vehicle *v);
@@ -1942,7 +1940,7 @@ void UpdateTileSelection(void)
}
// highlighting tiles while only going over them with the mouse
-void VpStartPlaceSizing(uint tile, int user)
+void VpStartPlaceSizing(TileIndex tile, int user)
{
_thd.userdata = user;
_thd.selend.x = TileX(tile) * 16;