diff options
author | rubidium <rubidium@openttd.org> | 2007-02-13 10:26:53 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-02-13 10:26:53 +0000 |
commit | a419f4aedadc526377d24e30bfd967e29255498e (patch) | |
tree | a8d30d13565c6ebb15b7a0857e33c317d033e666 /src/vehicle.h | |
parent | eab6dd989821a2cacb96a94de0da789214f6e2b4 (diff) | |
download | openttd-a419f4aedadc526377d24e30bfd967e29255498e.tar.xz |
(svn r8698) -Codechange: enumify the returns of VehicleEnterTile
Diffstat (limited to 'src/vehicle.h')
-rw-r--r-- | src/vehicle.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vehicle.h b/src/vehicle.h index 9fa8837d9..7a2fe8780 100644 --- a/src/vehicle.h +++ b/src/vehicle.h @@ -7,6 +7,26 @@ #include "order.h" #include "rail.h" +/** The returned bits of VehicleEnterTile. */ +enum VehicleEnterTileStatus { + VETS_ENTERED_STATION = 1, ///< The vehicle entered a station + VETS_ENTERED_WORMHOLE = 2, ///< The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/tunnel) + VETS_CANNOT_ENTER = 3, ///< The vehicle cannot enter the tile + + /** + * Shift the VehicleEnterTileStatus this many bits + * to the right to get the station ID when + * VETS_ENTERED_STATION is set + */ + VETS_STATION_ID_OFFSET = 8, + + /** Bit sets of the above specified bits */ + VETSB_CONTINUE = 0, ///< The vehicle can continue normally + VETSB_ENTERED_STATION = 1 << VETS_ENTERED_STATION, ///< The vehicle entered a station + VETSB_ENTERED_WORMHOLE = 1 << VETS_ENTERED_WORMHOLE, ///< The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/tunnel) + VETSB_CANNOT_ENTER = 1 << VETS_CANNOT_ENTER, ///< The vehicle cannot enter the tile +}; + enum { VEH_Train, VEH_Road, |