(svn r12862) -Codechange: reduce code duplication for VehicleType -> WindowClass lookup

This commit is contained in:
smatz
2008-04-24 09:55:20 +00:00
parent 48eda2b6ef
commit 9fc355fca5
11 changed files with 27 additions and 32 deletions

View File

@@ -71,7 +71,6 @@ struct RoadVehicle : public Vehicle {
void MarkDirty();
void UpdateDeltaXY(Direction direction);
ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_ROADVEH_INC : EXPENSES_ROADVEH_RUN; }
WindowClass GetVehicleListWindowClass() const { return WC_ROADVEH_LIST; }
bool IsPrimaryVehicle() const { return IsRoadVehFront(this); }
SpriteID GetImage(Direction direction) const;
int GetDisplaySpeed() const { return this->cur_speed * 10 / 32; }