OpenTTD
effectvehicle_base.h
Go to the documentation of this file.
1 /* $Id: effectvehicle_base.h 23735 2012-01-03 20:26:05Z rubidium $ */
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 
36  bool Tick();
38 };
39 
44 #define FOR_ALL_EFFECTVEHICLES(var) FOR_ALL_VEHICLES_OF_TYPE(EffectVehicle, var)
45 
46 #endif /* EFFECTVEHICLE_BASE_H */
DirectionByte direction
facing
Definition: vehicle_base.h:271
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.
Direction
Defines the 8 directions on the map.
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:993
TransparencyOption GetTransparencyOption() const
Determines the transparency option affecting the effect.
void UpdateDeltaXY(Direction direction)
Updates the x and y offsets and the size of the sprite used for this vehicle.
bool Tick()
Calls the tick handler of the vehicle.
Base class for all vehicles.
Functions related to transparency.
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