src/aircraft.h
branchnoai
changeset 9574 698395509d12
parent 6585 7da94b26498a
child 9601 b499fdd106d5
--- a/src/aircraft.h	Sat Mar 31 12:36:57 2007 +0000
+++ b/src/aircraft.h	Sun Apr 08 14:46:55 2007 +0000
@@ -8,11 +8,12 @@
 #include "station_map.h"
 #include "vehicle.h"
 
+/** An aircraft can be one ot those types */
 enum AircraftSubType {
-	AIR_HELICOPTER = 0,
-	AIR_AIRCRAFT   = 2,
-	AIR_SHADOW     = 4,
-	AIR_ROTOR      = 6
+	AIR_HELICOPTER = 0, ///< an helicopter
+	AIR_AIRCRAFT   = 2, ///< an airplane
+	AIR_SHADOW     = 4, ///< shadow of the aircraft
+	AIR_ROTOR      = 6  ///< rotor of an helicopter
 };
 
 
@@ -30,13 +31,20 @@
 	return v->subtype <= AIR_AIRCRAFT;
 }
 
-
+/** Check if this aircraft is in a hangar
+ * @param v vehicle to check
+ * @return true if in hangar
+ */
 static inline bool IsAircraftInHangar(const Vehicle* v)
 {
 	assert(v->type == VEH_AIRCRAFT);
 	return v->vehstatus & VS_HIDDEN && IsHangarTile(v->tile);
 }
 
+/** Check if this aircraft is in a hangar and stopped
+ * @param v vehicle to check
+ * @return true if in hangar and stopped
+ */
 static inline bool IsAircraftInHangarStopped(const Vehicle* v)
 {
 	return IsAircraftInHangar(v) && v->vehstatus & VS_STOPPED;
@@ -56,13 +64,49 @@
 	return (apc->flags & (avi->subtype & AIR_CTOL ? AirportFTAClass::AIRPLANES : AirportFTAClass::HELICOPTERS)) != 0;
 }
 
-uint16 AircraftDefaultCargoCapacity(CargoID cid, const AircraftVehicleInfo*);
+/**
+ * Calculates cargo capacity based on an aircraft's passenger
+ * and mail capacities.
+ * @param cid Which cargo type to calculate a capacity for.
+ * @param avi Which engine to find a cargo capacity for.
+ * @return New cargo capacity value.
+ */
+uint16 AircraftDefaultCargoCapacity(CargoID cid, const AircraftVehicleInfo *avi);
 
+/**
+ * This is the Callback method after the construction attempt of an aircraft
+ * @param success indicates completion (or not) of the operation
+ * @param tile of depot where aircraft is built
+ * @param p1 unused
+ * @param p2 unused
+ */
 void CcBuildAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2);
+
+/**
+ * This is the Callback method after the cloning attempt of an aircraft
+ * @param success indicates completion (or not) of the operation
+ * @param tile unused
+ * @param p1 unused
+ * @param p2 unused
+ */
 void CcCloneAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2);
+
+/** Handle Aircraft specific tasks when a an Aircraft enters a hangar
+ * @param *v Vehicle that enters the hangar
+ */
 void HandleAircraftEnterHangar(Vehicle *v);
+
+/** Get the size of the sprite of an aircraft sprite heading west (used for lists)
+ * @param engine The engine to get the sprite from
+ * @param width The width of the sprite
+ * @param height The height of the sprite
+ */
 void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height);
 
+/**
+ * Updates the status of the Aircraft heading or in the station
+ * @param st Station been updated
+ */
 void UpdateAirplanesOnNewStation(const Station *st);
 
 #endif /* AIRCRAFT_H */