mirror of https://github.com/OpenTTD/OpenTTD
(svn r9545) -Documentation: Some corrections to previous doxygen work
parent
e2cd1fedf7
commit
d58f9ef7b4
|
@ -8,11 +8,12 @@
|
||||||
#include "station_map.h"
|
#include "station_map.h"
|
||||||
#include "vehicle.h"
|
#include "vehicle.h"
|
||||||
|
|
||||||
|
/* An aircraft can be one ot those types */
|
||||||
enum AircraftSubType {
|
enum AircraftSubType {
|
||||||
AIR_HELICOPTER = 0,
|
AIR_HELICOPTER = 0, ///< an helicopter
|
||||||
AIR_AIRCRAFT = 2,
|
AIR_AIRCRAFT = 2, ///< an airplace
|
||||||
AIR_SHADOW = 4,
|
AIR_SHADOW = 4, ///< shadow of the aircraft
|
||||||
AIR_ROTOR = 6
|
AIR_ROTOR = 6 ///< rotor of an helicopter
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,13 +31,20 @@ static inline bool IsNormalAircraft(const Vehicle *v)
|
||||||
return v->subtype <= AIR_AIRCRAFT;
|
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)
|
static inline bool IsAircraftInHangar(const Vehicle* v)
|
||||||
{
|
{
|
||||||
assert(v->type == VEH_AIRCRAFT);
|
assert(v->type == VEH_AIRCRAFT);
|
||||||
return v->vehstatus & VS_HIDDEN && IsHangarTile(v->tile);
|
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)
|
static inline bool IsAircraftInHangarStopped(const Vehicle* v)
|
||||||
{
|
{
|
||||||
return IsAircraftInHangar(v) && v->vehstatus & VS_STOPPED;
|
return IsAircraftInHangar(v) && v->vehstatus & VS_STOPPED;
|
||||||
|
@ -56,11 +64,28 @@ static inline bool IsAircraftBuildableAtStation(EngineID engine, TileIndex tile)
|
||||||
return (apc->flags & (avi->subtype & AIR_CTOL ? AirportFTAClass::AIRPLANES : AirportFTAClass::HELICOPTERS)) != 0;
|
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*);
|
||||||
|
|
||||||
void CcBuildAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
void CcBuildAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
||||||
void CcCloneAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
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);
|
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);
|
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height);
|
||||||
|
|
||||||
void UpdateAirplanesOnNewStation(const Station *st);
|
void UpdateAirplanesOnNewStation(const Station *st);
|
||||||
|
|
|
@ -174,8 +174,8 @@ void DrawAircraftEngine(int x, int y, EngineID engine, SpriteID pal)
|
||||||
|
|
||||||
/** Get the size of the sprite of an aircraft sprite heading west (used for lists)
|
/** 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 engine The engine to get the sprite from
|
||||||
* @param &width The width of the sprite
|
* @param width The width of the sprite
|
||||||
* @param &height The height of the sprite
|
* @param height The height of the sprite
|
||||||
*/
|
*/
|
||||||
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height)
|
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height)
|
||||||
{
|
{
|
||||||
|
@ -207,7 +207,7 @@ static int32 EstimateAircraftCost(const AircraftVehicleInfo *avi)
|
||||||
* Calculates cargo capacity based on an aircraft's passenger
|
* Calculates cargo capacity based on an aircraft's passenger
|
||||||
* and mail capacities.
|
* and mail capacities.
|
||||||
* @param cid Which cargo type to calculate a capacity for.
|
* @param cid Which cargo type to calculate a capacity for.
|
||||||
* @param engine Which engine to find a cargo capacity for.
|
* @param avi Which engine to find a cargo capacity for.
|
||||||
* @return New cargo capacity value.
|
* @return New cargo capacity value.
|
||||||
*/
|
*/
|
||||||
uint16 AircraftDefaultCargoCapacity(CargoID cid, const AircraftVehicleInfo *avi)
|
uint16 AircraftDefaultCargoCapacity(CargoID cid, const AircraftVehicleInfo *avi)
|
||||||
|
@ -1913,9 +1913,9 @@ static bool AirportHasBlock(Vehicle *v, const AirportFTA *current_pos, const Air
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ...
|
* "reserve" a block for the plane
|
||||||
* @param v airplane that requires the operation
|
* @param v airplane that requires the operation
|
||||||
* @param currentpos of the vehicle in the list of blocks
|
* @param current_pos of the vehicle in the list of blocks
|
||||||
* @param apc airport on which block is requsted to be set
|
* @param apc airport on which block is requsted to be set
|
||||||
* @returns true on success. Eg, next block was free and we have occupied it
|
* @returns true on success. Eg, next block was free and we have occupied it
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/** @file newgfr_config.cpp */
|
/** @file newgrf_config.cpp */
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "openttd.h"
|
#include "openttd.h"
|
||||||
|
|
Loading…
Reference in New Issue