summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-13 10:46:45 +0000
committerrubidium <rubidium@openttd.org>2007-02-13 10:46:45 +0000
commit4ec7eb2201286f8fd76ef86b80b2678b049420c3 (patch)
tree9da972ad5dab80f2ee926e33793e6075fa72a3f3 /src/vehicle.cpp
parentaf3001b988b3e6e209f327dc944a5fc67da4f652 (diff)
downloadopenttd-4ec7eb2201286f8fd76ef86b80b2678b049420c3.tar.xz
(svn r8701) -Codechange: replace magic numbers with enums for u.rail.track.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 5f6fe6a52..2ab6c11e1 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2316,7 +2316,7 @@ void BuildDepotVehicleList(byte type, TileIndex tile, Vehicle ***engine_list, ui
switch (type) {
case VEH_Train:
FOR_ALL_VEHICLES(v) {
- if (v->tile == tile && v->type == VEH_Train && v->u.rail.track == 0x80) {
+ if (v->tile == tile && v->type == VEH_Train && v->u.rail.track == TRACK_BIT_DEPOT) {
if (IsFrontEngine(v)) {
if (engine_list == NULL) continue;
if (*engine_count == *engine_list_length) ExtendVehicleListSize((const Vehicle***)engine_list, engine_list_length, 25);
@@ -2529,7 +2529,7 @@ void VehicleEnterDepot(Vehicle *v)
case VEH_Ship:
InvalidateWindowClasses(WC_SHIPS_LIST);
- v->u.ship.state = TRACK_BIT_SPECIAL;
+ v->u.ship.state = TRACK_BIT_DEPOT;
RecalcShipStuff(v);
break;
@@ -2737,10 +2737,10 @@ Trackdir GetVehicleTrackdir(const Vehicle* v)
switch (v->type) {
case VEH_Train:
- if (v->u.rail.track == 0x80) /* We'll assume the train is facing outwards */
+ if (v->u.rail.track == TRACK_BIT_DEPOT) /* We'll assume the train is facing outwards */
return DiagdirToDiagTrackdir(GetRailDepotDirection(v->tile)); /* Train in depot */
- if (v->u.rail.track == 0x40) /* train in tunnel, so just use his direction and assume a diagonal track */
+ if (v->u.rail.track == TRACK_BIT_WORMHOLE) /* train in tunnel, so just use his direction and assume a diagonal track */
return DiagdirToDiagTrackdir(DirToDiagDir(v->direction));
return TrackDirectionToTrackdir(FindFirstTrack(v->u.rail.track), v->direction);