Translations update
[openttd/fttd.git] / src / effectvehicle_base.h
blob27da4200177fba151ee6fe87ce2b1feacd73ceaa
1 /* $Id$ */
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 */
10 /** @file effectvehicle_base.h Base class for all effect vehicles. */
12 #ifndef EFFECTVEHICLE_BASE_H
13 #define EFFECTVEHICLE_BASE_H
15 #include "vehicle_base.h"
16 #include "transparency.h"
18 /**
19 * A special vehicle is one of the following:
20 * - smoke
21 * - electric sparks for trains
22 * - explosions
23 * - bulldozer (road works)
24 * - bubbles (industry)
26 struct EffectVehicle FINAL : public SpecializedVehicle<EffectVehicle, VEH_EFFECT> {
27 uint16 animation_state; ///< State primarily used to change the graphics/behaviour.
28 byte animation_substate; ///< Sub state to time the change of the graphics/behaviour.
30 /** We don't want GCC to zero our struct! It already is zeroed and has an index! */
31 EffectVehicle() : SpecializedVehicleBase() {}
32 /** We want to 'destruct' the right class. */
33 virtual ~EffectVehicle() {}
35 void UpdateDeltaXY(Direction direction);
36 bool Tick();
37 TransparencyOption GetTransparencyOption() const;
40 /**
41 * Iterate over disaster vehicles.
42 * @param var The variable used to iterate over.
44 #define FOR_ALL_EFFECTVEHICLES(var) FOR_ALL_VEHICLES_OF_TYPE(EffectVehicle, var)
46 #endif /* EFFECTVEHICLE_BASE_H */