OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

disaster_vehicle.h
Go to the documentation of this file.
1 /* $Id: disaster_vehicle.h 26872 2014-09-21 11:12:42Z 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 DISASTER_VEHICLE_H
13 #define DISASTER_VEHICLE_H
14
15 #include "vehicle_base.h"
16
18 enum DisasterSubType {
19 ST_ZEPPELINER,
20 ST_ZEPPELINER_SHADOW,
21 ST_SMALL_UFO,
22 ST_SMALL_UFO_SHADOW,
23 ST_AIRPLANE,
24 ST_AIRPLANE_SHADOW,
25 ST_HELICOPTER,
26 ST_HELICOPTER_SHADOW,
27 ST_HELICOPTER_ROTORS,
28 ST_BIG_UFO,
29 ST_BIG_UFO_SHADOW,
30 ST_BIG_UFO_DESTROYER,
31 ST_BIG_UFO_DESTROYER_SHADOW,
32 ST_SMALL_SUBMARINE,
33 ST_BIG_SUBMARINE,
34 };
35
39 struct DisasterVehicle FINAL : public SpecializedVehicle<DisasterVehicle, VEH_DISASTER> {
40 SpriteID image_override;
41 VehicleID big_ufo_destroyer_target;
42 byte flags;
43
45 DisasterVehicle() : SpecializedVehicleBase() {}
46 DisasterVehicle(int x, int y, Direction direction, DisasterSubType subtype, VehicleID big_ufo_destroyer_target = VEH_INVALID);
48 virtual ~DisasterVehicle() {}
49
50 void UpdatePosition(int x, int y, int z);
51 void UpdateDeltaXY(Direction direction);
52 void UpdateImage();
53 bool Tick();
54 };
55
60 #define FOR_ALL_DISASTERVEHICLES(var) FOR_ALL_VEHICLES_OF_TYPE(DisasterVehicle, var)
61
62 #endif /* DISASTER_VEHICLE_H */