equal
deleted
inserted
replaced
113 * Currently caches callback 36 max speed. |
113 * Currently caches callback 36 max speed. |
114 * @param v Vehicle |
114 * @param v Vehicle |
115 */ |
115 */ |
116 void UpdateAircraftCache(Vehicle *v); |
116 void UpdateAircraftCache(Vehicle *v); |
117 |
117 |
|
118 /** |
|
119 * This class 'wraps' Vehicle; you do not actually instantiate this class. |
|
120 * You create a Vehicle using AllocateVehicle, so it is added to the pool |
|
121 * and you reinitialize that to a Train using: |
|
122 * v = new (v) Aircraft(); |
|
123 * |
|
124 * As side-effect the vehicle type is set correctly. |
|
125 */ |
|
126 struct Aircraft : public Vehicle { |
|
127 /** Initializes the Vehicle to an aircraft */ |
|
128 Aircraft() { this->type = VEH_AIRCRAFT; } |
|
129 |
|
130 /** We want to 'destruct' the right class. */ |
|
131 virtual ~Aircraft() {} |
|
132 |
|
133 const char *GetTypeString() const { return "aircraft"; } |
|
134 void MarkDirty(); |
|
135 void UpdateDeltaXY(Direction direction); |
|
136 ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_AIRCRAFT_INC : EXPENSES_AIRCRAFT_RUN; } |
|
137 WindowClass GetVehicleListWindowClass() const { return WC_AIRCRAFT_LIST; } |
|
138 }; |
|
139 |
118 #endif /* AIRCRAFT_H */ |
140 #endif /* AIRCRAFT_H */ |