summaryrefslogtreecommitdiff
path: root/viewport.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-12-02 19:41:35 +0000
committerDarkvater <darkvater@openttd.org>2005-12-02 19:41:35 +0000
commitbfeddf1db14e8579f784c28e9c3052cf48d98672 (patch)
tree590226389ccefbba803620167f0d048b960dd9cd /viewport.c
parent214ed794a1ae2099147383cba86febabd81d3868 (diff)
downloadopenttd-bfeddf1db14e8579f784c28e9c3052cf48d98672.tar.xz
(svn r3254) - Fix: graphical glitch with autorail tool on a certain tile-type.
- CodeChange: adhere the global variables in autorail.h to the coding style (eg. start with underscore).
Diffstat (limited to 'viewport.c')
-rw-r--r--viewport.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/viewport.c b/viewport.c
index 71737ba26..b8db7ac1b 100644
--- a/viewport.c
+++ b/viewport.c
@@ -614,7 +614,7 @@ static bool IsPartOfAutoLine(int px, int py)
}
// [direction][side]
-static const int AutorailType[6][2] = {
+static const int _AutorailType[6][2] = {
{ HT_DIR_X, HT_DIR_X },
{ HT_DIR_Y, HT_DIR_Y },
{ HT_DIR_HU, HT_DIR_HL },
@@ -661,7 +661,7 @@ static void DrawTileSelection(const TileInfo *ti)
// autorail highlight piece under cursor
uint type = _thd.drawstyle & 0xF;
assert(type <= 5);
- image = SPR_AUTORAIL_BASE + AutorailTilehSprite[ti->tileh][AutorailType[type][0]];
+ image = SPR_AUTORAIL_BASE + _AutorailTilehSprite[ti->tileh][_AutorailType[type][0]];
if (_thd.make_square_red) image |= PALETTE_SEL_TILE_RED;
DrawSelectionSprite(image, ti);
@@ -680,7 +680,7 @@ static void DrawTileSelection(const TileInfo *ti)
side = myabs(diffx - diffy);
}
- image = SPR_AUTORAIL_BASE + AutorailTilehSprite[ti->tileh][AutorailType[dir][side]];
+ image = SPR_AUTORAIL_BASE + _AutorailTilehSprite[ti->tileh][_AutorailType[dir][side]];
if (_thd.make_square_red) image |= PALETTE_SEL_TILE_RED;
DrawSelectionSprite(image, ti);
@@ -1843,7 +1843,7 @@ void SetTileSelectBigSize(int ox, int oy, int sx, int sy)
/* returns the best autorail highlight type from map coordinates */
static byte GetAutorailHT(int x, int y)
{
- return HT_RAIL | AutorailPiece[x & 0xF][y & 0xF];
+ return HT_RAIL | _AutorailPiece[x & 0xF][y & 0xF];
}
// called regular to update tile highlighting in all cases