File diff r1943:20262bf3cc4f → r1944:ed1b90ae1557
vehicle.h
Show inline comments
 
#ifndef VEHICLE_H
 
#define VEHICLE_H
 

	
 
#include "pool.h"
 
#include "order.h"
 
#include "rail.h"
 

	
 
enum {
 
	VEH_Train = 0x10,
 
	VEH_Road = 0x11,
 
	VEH_Ship = 0x12,
 
	VEH_Aircraft = 0x13,
 
	VEH_Special = 0x14,
 
	VEH_Disaster = 0x15,
 
} ;
 

	
 
enum VehStatus {
 
	VS_HIDDEN = 1,
 
@@ -331,25 +332,25 @@ typedef struct GetNewVehiclePosResult {
 

	
 
/**
 
 * Returns the Trackdir on which the vehicle is currently located.
 
 * Works for trains and ships.
 
 * Currently works only sortof for road vehicles, since they have a fuzzy
 
 * concept of being "on" a trackdir. Dunno really what it returns for a road
 
 * vehicle that is halfway a tile, never really understood that part. For road
 
 * vehicles that are at the beginning or end of the tile, should just return
 
 * the diagonal trackdir on which they are driving. I _think_.
 
 * For other vehicles types, or vehicles with no clear trackdir (such as those
 
 * in depots), returns 0xFF.
 
 */
 
byte GetVehicleTrackdir(const Vehicle* v);
 
Trackdir GetVehicleTrackdir(const Vehicle* v);
 

	
 
/* returns true if staying in the same tile */
 
bool GetNewVehiclePos(Vehicle *v, GetNewVehiclePosResult *gp);
 
byte GetDirectionTowards(Vehicle *v, int x, int y);
 

	
 
#define BEGIN_ENUM_WAGONS(v) do {
 
#define END_ENUM_WAGONS(v) } while ( (v=v->next) != NULL);
 

	
 
/* vehicle.c */
 
VARDEF SortStruct *_vehicle_sort;
 

	
 
extern MemoryPool _vehicle_pool;