(svn r27953) -Cleanup: Adjust other languages for r27952
[openttd.git] / src / disaster_vehicle.h
blob06fb36c1e30f276c70ece45ca0bae7e7b51f46bc
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 disaster_vehicle.h All disaster vehicles. */
12 #ifndef DISASTER_VEHICLE_H
13 #define DISASTER_VEHICLE_H
15 #include "vehicle_base.h"
17 /** Different sub types of disaster vehicles. */
18 enum DisasterSubType {
19 ST_ZEPPELINER, ///< Zeppelin, crashes at airports.
20 ST_ZEPPELINER_SHADOW, ///< Shadow of the zeppelin.
21 ST_SMALL_UFO, ///< Small UFO, tries to find a road vehicle to destroy.
22 ST_SMALL_UFO_SHADOW, ///< Shadow of small UFO
23 ST_AIRPLANE, ///< Airplane destroying an oil refinery
24 ST_AIRPLANE_SHADOW, ///< Shadow of airplane
25 ST_HELICOPTER, ///< Helicopter destroying a factory.
26 ST_HELICOPTER_SHADOW, ///< Shadow of helicopter.
27 ST_HELICOPTER_ROTORS, ///< Rotors of helicopter.
28 ST_BIG_UFO, ///< Big UFO, finds a piece of railroad to "park" on
29 ST_BIG_UFO_SHADOW, ///< Shadow of the big UFO
30 ST_BIG_UFO_DESTROYER, ///< Aircraft the will bomb the big UFO
31 ST_BIG_UFO_DESTROYER_SHADOW, ///< Shadow of the aircraft.
32 ST_SMALL_SUBMARINE, ///< Small submarine, pops up in the oceans but doesn't do anything
33 ST_BIG_SUBMARINE, ///< Big submarine, pops up in the oceans but doesn't do anything
36 /**
37 * Disasters, like submarines, skyrangers and their shadows, belong to this class.
39 struct DisasterVehicle FINAL : public SpecializedVehicle<DisasterVehicle, VEH_DISASTER> {
40 SpriteID image_override; ///< Override for the default disaster vehicle sprite.
41 VehicleID big_ufo_destroyer_target; ///< The big UFO that this destroyer is supposed to bomb.
42 byte flags; ///< Flags about the state of the vehicle, @see AirVehicleFlags
44 /** For use by saveload. */
45 DisasterVehicle() : SpecializedVehicleBase() {}
46 DisasterVehicle(int x, int y, Direction direction, DisasterSubType subtype, VehicleID big_ufo_destroyer_target = VEH_INVALID);
47 /** We want to 'destruct' the right class. */
48 virtual ~DisasterVehicle() {}
50 void UpdatePosition(int x, int y, int z);
51 void UpdateDeltaXY(Direction direction);
52 void UpdateImage();
53 bool Tick();
56 /**
57 * Iterate over disaster vehicles.
58 * @param var The variable used to iterate over.
60 #define FOR_ALL_DISASTERVEHICLES(var) FOR_ALL_VEHICLES_OF_TYPE(DisasterVehicle, var)
62 #endif /* DISASTER_VEHICLE_H */