(svn r16872) -Codechange: Add RoadVehicle::GetDisplayImageWidth and simplify DrawRoadVehImage.

This commit is contained in:
frosch
2009-07-18 12:34:19 +00:00
parent 543b86307f
commit f9e085f004
3 changed files with 27 additions and 29 deletions

View File

@@ -117,6 +117,7 @@ struct RoadVehicle : public SpecializedVehicle<RoadVehicle, VEH_ROAD> {
int GetDisplaySpeed() const { return this->cur_speed / 2; }
int GetDisplayMaxSpeed() const { return this->max_speed / 2; }
Money GetRunningCost() const { return RoadVehInfo(this->engine_type)->running_cost * GetPriceByIndex(RoadVehInfo(this->engine_type)->running_cost_class); }
int GetDisplayImageWidth(Point *offset = NULL) const;
bool IsInDepot() const { return this->state == RVSB_IN_DEPOT; }
bool IsStoppedInDepot() const;
bool Tick();