2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-04-20 11:12:07 +00:00
|
|
|
/** @file effectvehicle_base.h Base class for all effect vehicles. */
|
|
|
|
|
|
|
|
#ifndef EFFECTVEHICLE_BASE_H
|
|
|
|
#define EFFECTVEHICLE_BASE_H
|
|
|
|
|
|
|
|
#include "vehicle_base.h"
|
2012-01-03 20:26:05 +00:00
|
|
|
#include "transparency.h"
|
2008-04-20 11:12:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A special vehicle is one of the following:
|
|
|
|
* - smoke
|
|
|
|
* - electric sparks for trains
|
|
|
|
* - explosions
|
|
|
|
* - bulldozer (road works)
|
|
|
|
* - bubbles (industry)
|
|
|
|
*/
|
2011-12-18 17:17:18 +00:00
|
|
|
struct EffectVehicle FINAL : public SpecializedVehicle<EffectVehicle, VEH_EFFECT> {
|
2011-01-31 20:27:33 +00:00
|
|
|
uint16 animation_state; ///< State primarily used to change the graphics/behaviour.
|
|
|
|
byte animation_substate; ///< Sub state to time the change of the graphics/behaviour.
|
2009-05-22 18:56:25 +00:00
|
|
|
|
2009-06-02 19:12:28 +00:00
|
|
|
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
|
2011-01-21 14:43:38 +00:00
|
|
|
EffectVehicle() : SpecializedVehicleBase() {}
|
2008-04-20 11:12:07 +00:00
|
|
|
/** We want to 'destruct' the right class. */
|
|
|
|
virtual ~EffectVehicle() {}
|
|
|
|
|
2018-05-22 17:43:34 +00:00
|
|
|
void UpdateDeltaXY();
|
2009-05-22 13:53:14 +00:00
|
|
|
bool Tick();
|
2011-05-28 09:46:37 +00:00
|
|
|
TransparencyOption GetTransparencyOption() const;
|
2008-04-20 11:12:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* EFFECTVEHICLE_BASE_H */
|