OpenTTD
effectvehicle_base.h
Go to the documentation of this file.
1 /* $Id$ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8  */
9 
12 #ifndef EFFECTVEHICLE_BASE_H
13 #define EFFECTVEHICLE_BASE_H
14 
15 #include "vehicle_base.h"
16 #include "transparency.h"
17 
26 struct EffectVehicle FINAL : public SpecializedVehicle<EffectVehicle, VEH_EFFECT> {
27  uint16 animation_state;
29 
33  virtual ~EffectVehicle() {}
34 
35  void UpdateDeltaXY();
36  bool Tick();
38 };
39 
44 #define FOR_ALL_EFFECTVEHICLES(var) FOR_ALL_VEHICLES_OF_TYPE(EffectVehicle, var)
45 
46 #endif /* EFFECTVEHICLE_BASE_H */
byte animation_substate
Sub state to time the change of the graphics/behaviour.
A special vehicle is one of the following:
virtual ~EffectVehicle()
We want to &#39;destruct&#39; the right class.
EffectVehicle()
We don&#39;t want GCC to zero our struct! It already is zeroed and has an index!
Class defining several overloaded accessors so we don&#39;t have to cast vehicle types that often...
Definition: vehicle_base.h:994
TransparencyOption GetTransparencyOption() const
Determines the transparency option affecting the effect.
bool Tick()
Calls the tick handler of the vehicle.
Base class for all vehicles.
Functions related to transparency.
void UpdateDeltaXY()
Updates the x and y offsets and the size of the sprite used for this vehicle.
uint16 animation_state
State primarily used to change the graphics/behaviour.
TransparencyOption
Transparency option bits: which position in _transparency_opt stands for which transparency.
Definition: transparency.h:24