src/vehicle.h
changeset 8119 52b48108425a
parent 8108 b42a0e5c67ef
child 8123 ce31d2843a95
equal deleted inserted replaced
8118:fa5fe5491657 8119:52b48108425a
     9 #include "oldpool.h"
     9 #include "oldpool.h"
    10 #include "order.h"
    10 #include "order.h"
    11 #include "track_type.h"
    11 #include "track_type.h"
    12 #include "rail_type.h"
    12 #include "rail_type.h"
    13 #include "road_type.h"
    13 #include "road_type.h"
       
    14 #include "cargo_type.h"
    14 #include "window_type.h"
    15 #include "window_type.h"
    15 #include "cargopacket.h"
    16 #include "cargopacket.h"
    16 #include "texteff.hpp"
    17 #include "texteff.hpp"
    17 
    18 #include "command_type.h"
    18 /** The returned bits of VehicleEnterTile. */
       
    19 enum VehicleEnterTileStatus {
       
    20 	VETS_ENTERED_STATION  = 1, ///< The vehicle entered a station
       
    21 	VETS_ENTERED_WORMHOLE = 2, ///< The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/tunnel)
       
    22 	VETS_CANNOT_ENTER     = 3, ///< The vehicle cannot enter the tile
       
    23 
       
    24 	/**
       
    25 	 * Shift the VehicleEnterTileStatus this many bits
       
    26 	 * to the right to get the station ID when
       
    27 	 * VETS_ENTERED_STATION is set
       
    28 	 */
       
    29 	VETS_STATION_ID_OFFSET = 8,
       
    30 
       
    31 	/** Bit sets of the above specified bits */
       
    32 	VETSB_CONTINUE         = 0,                          ///< The vehicle can continue normally
       
    33 	VETSB_ENTERED_STATION  = 1 << VETS_ENTERED_STATION,  ///< The vehicle entered a station
       
    34 	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)
       
    35 	VETSB_CANNOT_ENTER     = 1 << VETS_CANNOT_ENTER,     ///< The vehicle cannot enter the tile
       
    36 };
       
    37 
    19 
    38 /** Road vehicle states */
    20 /** Road vehicle states */
    39 enum RoadVehicleStates {
    21 enum RoadVehicleStates {
    40 	/*
    22 	/*
    41 	 * Lower 4 bits are used for vehicle track direction. (Trackdirs)
    23 	 * Lower 4 bits are used for vehicle track direction. (Trackdirs)
   827 static inline uint32 GetCmdSendToDepot(const Vehicle *v)
   809 static inline uint32 GetCmdSendToDepot(const Vehicle *v)
   828 {
   810 {
   829 	return GetCmdSendToDepot(v->type);
   811 	return GetCmdSendToDepot(v->type);
   830 }
   812 }
   831 
   813 
       
   814 /* This one is not used anymore. */
       
   815 VARDEF VehicleID _vehicle_id_ctr_day;
       
   816 VARDEF Vehicle *_place_clicked_vehicle;
       
   817 
       
   818 
   832 #endif /* VEHICLE_H */
   819 #endif /* VEHICLE_H */