31#define MAX_AIRCRAFT 64
33#define LINE_MAXPTS (LINE_MAXSEG + 2)
36#define AIRCRAFT_REFUEL_FACTOR 16
39typedef struct mapline_s {
75#define MAX_AIRCRAFTSLOT 8
78typedef struct aircraftSlot_s {
99typedef enum aircraftStatus_s {
115typedef struct aircraft_s {
193#define AIR_Foreach(var) LIST_Foreach(ccs.aircraft, aircraft_t, var)
195#define AIR_IsAircraftOfBase(aircraft, base) ((aircraft)->homebase == (base) && (aircraft)->status != AIR_CRASHED)
202#define AIR_ForeachFromBase(var, base) \
204 if (!AIR_IsAircraftOfBase(var, (base))) continue; else
206#define AIR_IsUFO(aircraft) ((aircraft)->getUfoType() != UFO_NONE)
234void AIR_CampaignRun(
const struct campaign_s* campaign,
int dt,
bool updateRadarOverlay);
DateTime class definition.
Class describing a point of time.
void AIR_AssignInitial(aircraft_t *aircraft)
Assigns initial team of soldiers to aircraft.
void AIR_AircraftReturnToBase(aircraft_t *aircraft)
Calculates the way back to homebase for given aircraft and returns it.
itemWeight_t
different weight for aircraft items
bool AIR_CanIntercept(const aircraft_t *aircraft)
bool AIR_BaseHasAircraft(const struct base_s *base)
int AIR_BaseCountAircraft(const struct base_s *base)
Employee * AIR_GetPilot(const aircraft_t *aircraft)
Get pilot of an aircraft.
void AIR_DeleteAircraft(aircraft_t *aircraft)
Removes an aircraft from its base and the game.
bool AIR_Delete(struct base_s *base, aircraft_t *aircraft)
const char * AIR_AircraftStatusToName(const aircraft_t *aircraft)
Translates the aircraft status id to a translatable string.
void AIR_ParseAircraft(const char *name, const char **text, bool assignAircraftItems)
Parses all aircraft that are defined in our UFO-scripts.
bool AIR_AircraftHasEnoughFuel(const aircraft_t *aircraft, const vec2_t destination)
check if aircraft has enough fuel to go to destination, and then come back home
const char * AIR_CheckMoveIntoNewHomebase(const aircraft_t *aircraft, const struct base_s *base)
void AIR_CampaignRun(const struct campaign_s *campaign, int dt, bool updateRadarOverlay)
aircraft_t * AIR_GetAircraftFromBaseByIDXSafe(const struct base_s *base, int index)
void AII_CollectingItems(aircraft_t *aircraft, int won)
Collect items from the battlefield.
void AIR_RemovePilotFromAssignedAircraft(const struct base_s *base, const class Employee *pilot)
int AIR_GetOperationRange(const aircraft_t *aircraft)
Calculates the range an aircraft can fly on the geoscape.
void AIR_AircraftsNotifyUFORemoved(const aircraft_t *const ufo, bool destroyed)
Notify that a UFO has been removed.
bool AIR_SetPilot(aircraft_t *aircraft, class Employee *pilot)
Assign a pilot to an aircraft.
int AIR_GetAircraftWeaponRanges(const aircraftSlot_t *slot, int maxSlot, float *weaponRanges)
Get the all the unique weapon ranges of this aircraft.
aircraft_t * AIR_GetFirstFromBase(const struct base_s *base)
int AIR_GetRemainingRange(const aircraft_t *aircraft)
Calculates the remaining range the aircraft can fly.
bool AIR_AircraftHasEnoughFuelOneWay(const aircraft_t *aircraft, const vec2_t destination)
check if aircraft has enough fuel to go to destination
void AII_CollectItem(aircraft_t *aircraft, const objDef_t *item, int amount)
Add an item to aircraft inventory.
void AIR_AutoAddPilotToAircraft(const struct base_s *base, class Employee *pilot)
int AIR_AircraftMenuStatsValues(const int value, const int stat)
Some of the aircraft values needs special calculations when they are shown in the menus.
bool AIR_PilotSurvivedCrash(const aircraft_t *aircraft)
Determine if an aircraft's pilot survived a crash, based on his piloting skill (and a bit of randomne...
void AIR_DestroyAircraft(aircraft_t *aircraft, bool killPilot=true)
Removes an aircraft from its base and the game.
bool AIR_IsAircraftOnGeoscape(const aircraft_t *aircraft)
Checks whether given aircraft is on geoscape.
bool AIR_SendAircraftPursuingUFO(aircraft_t *aircraft, aircraft_t *ufo)
Make the specified aircraft purchasing a UFO.
const aircraft_t * AIR_IsEmployeeInAircraft(const class Employee *employee, const aircraft_t *aircraft)
bool AIR_RemoveEmployee(Employee *employee, aircraft_t *aircraft)
Removes a soldier from an aircraft.
void AIR_ResetAircraftTeam(aircraft_t *aircraft)
Resets team in given aircraft.
int AIR_GetTeamSize(const aircraft_t *aircraft)
Counts the number of soldiers in given aircraft.
bool AIR_ScriptSanityCheck(void)
Checks the parsed aircraft for errors.
aircraft_t * AIR_NewAircraft(struct base_s *base, const aircraft_t *aircraftTemplate)
bool AIR_SendAircraftToMission(aircraft_t *aircraft, struct mission_s *mission)
bool AIR_AddEmployee(Employee *employee, aircraft_t *aircraft)
Assigns a soldier to an aircraft.
void AIR_AircraftsUFODisappear(const aircraft_t *const ufo)
Notify that a UFO disappear from radars.
aircraft_t * AIR_Add(struct base_s *base, const aircraft_t *aircraftTemplate)
void AIR_MoveAircraftIntoNewHomebase(aircraft_t *aircraft, struct base_s *base)
const aircraft_t * AIR_GetAircraft(const char *name)
Searches the global array of aircraft types for a given aircraft.
void AIR_GetDestinationWhilePursuing(const aircraft_t *shooter, const aircraft_t *target, vec2_t dest)
Calculates the point where aircraft should go to intecept a moving target.
void AIR_InitStartup(void)
Init actions for aircraft-subsystem.
itemPos_t
different positions for aircraft items
aircraft_notifications_t
notification signals for aircraft events
void AIR_MoveEmployeeInventoryIntoStorage(const aircraft_t &aircraft, equipDef_t &equip)
Move all the equipment carried by the team on the aircraft into the given equipment.
bool AIR_AddToAircraftTeam(aircraft_t *aircraft, class Employee *employee)
Adds given employee to given aircraft.
bool AIR_IsAircraftInBase(const aircraft_t *aircraft)
Checks whether given aircraft is in its homebase.
const aircraft_t * AIR_GetAircraftSilent(const char *name)
Searches the global array of aircraft types for a given aircraft.
baseCapacities_t AIR_GetHangarCapacityType(const aircraft_t *aircraft)
Returns capacity type needed for an aircraft.
void AIR_AircraftsNotifyMissionRemoved(const struct mission_s *mission)
int AIR_CountInBaseByTemplate(const struct base_s *base, const aircraft_t *aircraftTemplate)
aircraft_t * AIR_AircraftGetFromIDX(int idx)
Returns aircraft for a given global index.
void AIR_Shutdown(void)
Closing actions for aircraft-subsystem.
bool AIR_IsInAircraftTeam(const aircraft_t *aircraft, const class Employee *employee)
bool AIR_AircraftMakeMove(int dt, aircraft_t *aircraft)
Moves given aircraft.
void AIR_RemoveEmployees(aircraft_t &aircraft)
Removes all soldiers from an aircraft.
baseCapacities_t
All possible capacities in base.
aircraftItemType_t
All different types of craft items.
QGL_EXTERN GLenum GLuint * dest
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
An aircraft with all it's data.
aircraftSlot_t weapons[MAX_AIRCRAFTSLOT]
struct aircraft_s * aircraftTarget
int ufoInterestOnGeoscape
class AlienCargo * alienCargo
struct mission_s * mission
class DateTime lastSpotted
class ItemCargo * itemCargo
void setUfoType(ufoType_t ufoT)
linkedList_t * missionTypes
ufoType_t getUfoType() const
aircraftSlot_t electronics[MAX_AIRCRAFTSLOT]
struct technology_s * tech
bool notifySent[MAX_AIR_NOTIFICATIONS]
const objDef_t * nextAmmo
struct installation_s * installation
struct aircraft_s * aircraft
const objDef_t * nextItem
A path on the map described by 2D points.
vec2_t point[LINE_MAXPTS]
Defines all attributes of objects used in the inventory.