Changeset - r6161:aea910fcd647
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-02-26 22:25:18
rubidium@openttd.org
(svn r8911) -Cleanup: fixup comments about the RoadVehicleStates and remove two unused enums.
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/vehicle.h
Show inline comments
 
@@ -22,46 +22,46 @@ enum VehicleEnterTileStatus {
 

	
 
	/** 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
 
};
 

	
 
/** Road vehicle states */
 
enum RoadVehicleStates {
 
	/*
 
	 * Lower 4 bits are used for vehicle track direction. (Trackdirs)
 
	 * When in a road stop (bit 5 set) these bits give the
 
	 * When in a road stop (bit 5 or bit 6 set) these bits give the
 
	 * track direction of the entry to the road stop.
 
	 * As the entry direction will always be a diagonal
 
	 * direction (X_NE, Y_SE, X_SW or Y_NW) only bits 0 and 3
 
	 * are needed to hold this direction. Bit 1 is then used to show
 
	 * that the vehicle is using the second road stop bay.
 
	 * Bit 2 is then used for drive-through stops to show the vehicle
 
	 * is stopping at this road stop.
 
	 */
 

	
 
	/* Numeric values */
 
	RVSB_IN_DEPOT                = 0xFE,                      ///< The vehicle is in a depot
 
	RVSB_WORMHOLE                = 0xFF,                      ///< The vehicle is in a tunnel and/or bridge
 

	
 
	/* Bit numbers */
 
	RVS_USING_SECOND_BAY         =    1,                      ///< Only used while in a road stop
 
	RVS_IS_STOPPING              =    2,                      ///< Only used for drive-through stops. Vehicle will stop here
 
	RVS_DRIVE_SIDE               =    4,                      ///< Only used when retrieving move data and for turning vehicles
 
	RVS_DRIVE_SIDE               =    4,                      ///< Only used when retrieving move data
 
	RVS_IN_ROAD_STOP             =    5,                      ///< The vehicle is in a road stop
 
	RVS_IN_DT_ROAD_STOP          =    6,                      ///< The vehicle is in a drive-through road stop
 

	
 
	/* Bit sets of the above specified bits */
 
	RVSB_USING_SECOND_BAY        = 1 << RVS_USING_SECOND_BAY, ///< Only used while in a road stop
 
	RVSB_DRIVE_SIDE              = 1 << RVS_DRIVE_SIDE,       ///< Only used when retrieving move data and for turning vehicles
 
	RVSB_IN_ROAD_STOP            = 1 << RVS_IN_ROAD_STOP,     ///< The vehicle is in a road stop
 
	RVSB_IN_ROAD_STOP_END        = RVSB_IN_ROAD_STOP + TRACKDIR_END,
 
	RVSB_IN_DT_ROAD_STOP         = 1 << RVS_IN_DT_ROAD_STOP,  ///< The vehicle is in a drive-through road stop
 
	RVSB_IN_DT_ROAD_STOP_END     = RVSB_IN_DT_ROAD_STOP + TRACKDIR_END,
 

	
 
	RVSB_TRACKDIR_MASK           = 0x0F,                      ///< The mask used to extract track dirs
 
	RVSB_ROAD_STOP_TRACKDIR_MASK = 0x09                       ///< Only bits 0 and 3 are used to encode the trackdir for road stops
 
};
 

	
 
enum {
 
	VEH_Train,
 
	VEH_Road,
0 comments (0 inline, 0 general)