OpenTTD
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 
34 };
35 
39 struct DisasterVehicle FINAL : public SpecializedVehicle<DisasterVehicle, VEH_DISASTER> {
42  byte flags;
43 
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 */
Shadow of the aircraft.
Airplane destroying an oil refinery.
Shadow of the big UFO.
DirectionByte direction
facing
Definition: vehicle_base.h:271
Non-existing type of vehicle.
Definition: vehicle_type.h:35
void UpdateDeltaXY(Direction direction)
Updates the x and y offsets and the size of the sprite used for this vehicle.
Small submarine, pops up in the oceans but doesn&#39;t do anything.
virtual ~DisasterVehicle()
We want to &#39;destruct&#39; the right class.
Direction
Defines the 8 directions on the map.
Small UFO, tries to find a road vehicle to destroy.
byte subtype
subtype (Filled with values from #EffectVehicles/#TrainSubTypes/#AircraftSubTypes) ...
Definition: vehicle_base.h:327
Big UFO, finds a piece of railroad to "park" on.
Class defining several overloaded accessors so we don&#39;t have to cast vehicle types that often...
Definition: vehicle_base.h:993
Shadow of small UFO.
uint32 VehicleID
The type all our vehicle IDs have.
Definition: vehicle_type.h:18
Rotors of helicopter.
DisasterVehicle()
For use by saveload.
SpriteID image_override
Override for the default disaster vehicle sprite.
Aircraft the will bomb the big UFO.
Helicopter destroying a factory.
void UpdatePosition()
Update the position of the vehicle.
Definition: vehicle.cpp:1547
VehicleID big_ufo_destroyer_target
The big UFO that this destroyer is supposed to bomb.
byte flags
Flags about the state of the vehicle,.
Base class for all vehicles.
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
Definition: gfx_type.h:19
Shadow of the zeppelin.
Disasters, like submarines, skyrangers and their shadows, belong to this class.
Zeppelin, crashes at airports.
Big submarine, pops up in the oceans but doesn&#39;t do anything.
Shadow of helicopter.
Shadow of airplane.
DisasterSubType
Different sub types of disaster vehicles.
bool Tick()
Calls the tick handler of the vehicle.