File diff r2153:b45e3461c6c4 → r2154:83cf5a3d6634
vehicle.h
Show inline comments
 
@@ -414,50 +414,47 @@ static inline Order *GetVehicleOrder(con
 

	
 
/* Returns the last order of a vehicle, or NULL if it doesn't exists */
 
static inline Order *GetLastVehicleOrder(const Vehicle *v)
 
{
 
	Order *order = v->orders;
 

	
 
	if (order == NULL) return NULL;
 

	
 
	while (order->next != NULL)
 
		order = order->next;
 

	
 
	return order;
 
}
 

	
 
/* Get the first vehicle of a shared-list, so we only have to walk forwards */
 
static inline Vehicle *GetFirstVehicleFromSharedList(Vehicle *v)
 
{
 
	Vehicle *u = v;
 
	while (u->prev_shared != NULL)
 
		u = u->prev_shared;
 

	
 
	return u;
 
}
 

	
 
/* Validate functions for rail building */
 
static inline bool ValParamRailtype(uint32 rail) { return HASBIT(GetPlayer(_current_player)->avail_railtypes, rail);}
 

	
 
// NOSAVE: Can be regenerated by inspecting the vehicles.
 
VARDEF VehicleID _vehicle_position_hash[0x1000];
 

	
 
// NOSAVE: Return values from various commands.
 
VARDEF VehicleID _new_train_id;
 
VARDEF VehicleID _new_wagon_id;
 
VARDEF VehicleID _new_aircraft_id;
 
VARDEF VehicleID _new_ship_id;
 
VARDEF VehicleID _new_roadveh_id;
 
VARDEF uint16 _aircraft_refit_capacity;
 
VARDEF byte _cmd_build_rail_veh_score;
 
VARDEF byte _cmd_build_rail_veh_var1;
 

	
 
// for each player, for each vehicle type, keep a list of the vehicles.
 
//VARDEF Vehicle *_vehicle_arr[8][4];
 

	
 
#define INVALID_VEHICLE 0xFFFF
 

	
 
/* A lot of code calls for the invalidation of the status bar, which is widget 5.
 
 * Best is to have a virtual value for it when it needs to change again */
 
#define STATUS_BAR 5
 

	
 
#endif /* VEHICLE_H */