OpenTTD Source: src/effectvehicle_base.h Source File

OpenTTD Source 12.2

effectvehicle_base.h
Go to the documentation of this file.
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
7
10 #ifndef EFFECTVEHICLE_BASE_H
11 #define EFFECTVEHICLE_BASE_H
12
13 #include "vehicle_base.h"
14 #include "transparency.h"
15
24 struct EffectVehicle FINAL : public SpecializedVehicle<EffectVehicle, VEH_EFFECT> {
25 uint16 animation_state;
26 byte animation_substate;
27
29 EffectVehicle() : SpecializedVehicleBase() {}
31 virtual ~EffectVehicle() {}
32
33 void UpdateDeltaXY();
34 bool Tick();
35 TransparencyOption GetTransparencyOption() const;
36 };
37
38 #endif /* EFFECTVEHICLE_BASE_H */
EffectVehicle::animation_state
uint16 animation_state
State primarily used to change the graphics/behaviour.
Definition: effectvehicle_base.h:25
EffectVehicle::Tick
bool Tick()
Calls the tick handler of the vehicle.
Definition: effectvehicle.cpp:643
vehicle_base.h
EffectVehicle::EffectVehicle
EffectVehicle()
We don't want GCC to zero our struct! It already is zeroed and has an index!
Definition: effectvehicle_base.h:29
SpecializedVehicle
Class defining several overloaded accessors so we don't have to cast vehicle types that often.
Definition: vehicle_base.h:1046
EffectVehicle::UpdateDeltaXY
void UpdateDeltaXY()
Updates the x and y offsets and the size of the sprite used for this vehicle.
Definition: effectvehicle.cpp:648
TransparencyOption
TransparencyOption
Transparency option bits: which position in _transparency_opt stands for which transparency.
Definition: transparency.h:22
transparency.h
EffectVehicle::~EffectVehicle
virtual ~EffectVehicle()
We want to 'destruct' the right class.
Definition: effectvehicle_base.h:31
EffectVehicle
A special vehicle is one of the following:
Definition: effectvehicle_base.h:24
EffectVehicle::GetTransparencyOption
TransparencyOption GetTransparencyOption() const
Determines the transparency option affecting the effect.
Definition: effectvehicle.cpp:661
EffectVehicle::animation_substate
byte animation_substate
Sub state to time the change of the graphics/behaviour.
Definition: effectvehicle_base.h:26