diff options
author | tron <tron@openttd.org> | 2006-03-12 17:42:04 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-12 17:42:04 +0000 |
commit | b05a98fdfa3db1171064aa59c401dcad1798b7ae (patch) | |
tree | 92107719a9ce6eb371c4b48b27ef13761bc42120 /roadveh_cmd.c | |
parent | 12d252d9bd7ffee83c4be5162cd506bda1070020 (diff) | |
download | openttd-b05a98fdfa3db1171064aa59c401dcad1798b7ae.tar.xz |
(svn r3832) Replace some magic numbers by (Diag)Direction enums
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 9bd462072..676ea0d9b 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -82,7 +82,7 @@ void DrawRoadVehEngine(int x, int y, EngineID engine, uint32 image_ormod) int spritenum = RoadVehInfo(engine)->image_index; if (is_custom_sprite(spritenum)) { - int sprite = GetCustomVehicleIcon(engine, 6); + int sprite = GetCustomVehicleIcon(engine, DIR_W); if (sprite != 0) { DrawSprite(sprite | image_ormod, x, y); @@ -286,9 +286,9 @@ typedef struct RoadFindDepotData { byte owner; } RoadFindDepotData; -static const byte _road_pf_directions[16] = { - 0, 1, 0, 1, 2, 1, 255, 255, - 2, 3, 3, 2, 3, 0, 255, 255, +static const DiagDirection _road_pf_directions[] = { + DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_SW, DIAGDIR_SE, 255, 255, + DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NW, DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NE, 255, 255 }; static bool EnumRoadSignalFindDepot(TileIndex tile, void* data, int track, uint length, byte* state) |