summaryrefslogtreecommitdiff
path: root/src/roadveh.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-07-18 12:34:19 +0000
committerfrosch <frosch@openttd.org>2009-07-18 12:34:19 +0000
commite8c2992ae698e63c437807a15504999493b1060b (patch)
treeb49230ca1c6be6e2916b642db513591e96912454 /src/roadveh.h
parent36576371c05edf9a3498196d7ebdb8824a6910d1 (diff)
downloadopenttd-e8c2992ae698e63c437807a15504999493b1060b.tar.xz
(svn r16872) -Codechange: Add RoadVehicle::GetDisplayImageWidth and simplify DrawRoadVehImage.
Diffstat (limited to 'src/roadveh.h')
-rw-r--r--src/roadveh.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/roadveh.h b/src/roadveh.h
index 9945635aa..9f57d9ff3 100644
--- a/src/roadveh.h
+++ b/src/roadveh.h
@@ -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();