(svn r12824) -Codechange: Standardise routines for drawing vehicle images, using correct types and less duplication.

This commit is contained in:
peter1138
2008-04-21 20:50:58 +00:00
parent f43661e790
commit a05e9b4c6b
9 changed files with 114 additions and 126 deletions

View File

@@ -296,7 +296,7 @@ struct Train : public Vehicle {
WindowClass GetVehicleListWindowClass() const { return WC_TRAINS_LIST; }
void PlayLeaveStationSound() const;
bool IsPrimaryVehicle() const { return IsFrontEngine(this); }
int GetImage(Direction direction) const;
SpriteID GetImage(Direction direction) const;
int GetDisplaySpeed() const { return this->u.rail.last_speed * 10 / 16; }
int GetDisplayMaxSpeed() const { return this->u.rail.cached_max_speed * 10 / 16; }
Money GetRunningCost() const;