src/roadveh.h
changeset 10126 bed2d9d38577
parent 9323 9bc423363f6a
child 10293 b3ca071d6716
equal deleted inserted replaced
10125:64de1e83efa8 10126:bed2d9d38577
    45 }
    45 }
    46 
    46 
    47 
    47 
    48 void CcBuildRoadVeh(bool success, TileIndex tile, uint32 p1, uint32 p2);
    48 void CcBuildRoadVeh(bool success, TileIndex tile, uint32 p1, uint32 p2);
    49 
    49 
       
    50 byte GetRoadVehLength(const Vehicle *v);
       
    51 
       
    52 void RoadVehUpdateCache(Vehicle *v);
       
    53 
    50 
    54 
    51 /**
    55 /**
    52  * This class 'wraps' Vehicle; you do not actually instantiate this class.
    56  * This class 'wraps' Vehicle; you do not actually instantiate this class.
    53  * You create a Vehicle using AllocateVehicle, so it is added to the pool
    57  * You create a Vehicle using AllocateVehicle, so it is added to the pool
    54  * and you reinitialize that to a Train using:
    58  * and you reinitialize that to a Train using:
    75 	Money GetRunningCost() const { return RoadVehInfo(this->engine_type)->running_cost * GetPriceByIndex(RoadVehInfo(this->engine_type)->running_cost_class); }
    79 	Money GetRunningCost() const { return RoadVehInfo(this->engine_type)->running_cost * GetPriceByIndex(RoadVehInfo(this->engine_type)->running_cost_class); }
    76 	bool IsInDepot() const { return this->u.road.state == RVSB_IN_DEPOT; }
    80 	bool IsInDepot() const { return this->u.road.state == RVSB_IN_DEPOT; }
    77 	void Tick();
    81 	void Tick();
    78 	void OnNewDay();
    82 	void OnNewDay();
    79 	TileIndex GetOrderStationLocation(StationID station);
    83 	TileIndex GetOrderStationLocation(StationID station);
       
    84 	bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse);
    80 };
    85 };
    81 
    86 
    82 byte GetRoadVehLength(const Vehicle *v);
       
    83 
       
    84 void RoadVehUpdateCache(Vehicle *v);
       
    85 
       
    86 #endif /* ROADVEH_H */
    87 #endif /* ROADVEH_H */