30 #define MAX_AIRCRAFT 64
31 #define LINE_MAXSEG 64
32 #define LINE_MAXPTS (LINE_MAXSEG + 2)
35 #define AIRCRAFT_REFUEL_FACTOR 16
74 #define MAX_AIRCRAFTSLOT 8
192 #define AIR_Foreach(var) LIST_Foreach(ccs.aircraft, aircraft_t, var)
194 #define AIR_IsAircraftOfBase(aircraft, base) ((aircraft)->homebase == (base) && (aircraft)->status != AIR_CRASHED)
201 #define AIR_ForeachFromBase(var, base) \
203 if (!AIR_IsAircraftOfBase(var, (base))) continue; else
205 #define AIR_IsUFO(aircraft) ((aircraft)->getUfoType() != UFO_NONE)
const objDef_t * nextItem
bool AIR_AircraftHasEnoughFuelOneWay(const aircraft_t *aircraft, const vec2_t destination)
check if aircraft has enough fuel to go to destination
int AIR_GetOperationRange(const aircraft_t *aircraft)
Calculates the range an aircraft can fly on the geoscape.
bool notifySent[MAX_AIR_NOTIFICATIONS]
struct installation_s * installation
A installation with all it's data.
aircraft_t * AIR_Add(struct base_s *base, const aircraft_t *aircraftTemplate)
Adds a new aircraft from a given aircraft template to the base and sets the homebase for the new airc...
baseCapacities_t AIR_GetHangarCapacityType(const aircraft_t *aircraft)
Returns capacity type needed for an aircraft.
void AIR_AircraftsUFODisappear(const aircraft_t *const ufo)
Notify that a UFO disappear from radars.
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_AircraftHasEnoughFuel(const aircraft_t *aircraft, const vec2_t destination)
check if aircraft has enough fuel to go to destination, and then come back home
int AIR_AircraftMenuStatsValues(const int value, const int stat)
Some of the aircraft values needs special calculations when they are shown in the menus...
ufoType_t getUfoType() const
aircraft_t * AIR_GetFirstFromBase(const struct base_s *base)
bool AIR_IsAircraftOnGeoscape(const aircraft_t *aircraft)
Checks whether given aircraft is on geoscape.
Employee * AIR_GetPilot(const aircraft_t *aircraft)
Get pilot of an aircraft.
bool AIR_RemoveEmployee(Employee *employee, aircraft_t *aircraft)
Removes a soldier from an aircraft.
aircraft_t * AIR_AircraftGetFromIDX(int idx)
Returns aircraft for a given global index.
void AIR_Shutdown(void)
Closing actions for aircraft-subsystem.
aircraft_t * AIR_GetAircraftFromBaseByIDXSafe(const struct base_s *base, int index)
int AIR_GetRemainingRange(const aircraft_t *aircraft)
Calculates the remaining range the aircraft can fly.
Defines all attributes of objects used in the inventory.
struct mission_s * mission
void AIR_AutoAddPilotToAircraft(const struct base_s *base, class Employee *pilot)
A base with all it's data.
class ItemCargo * itemCargo
void AIR_AircraftsNotifyMissionRemoved(const struct mission_s *mission)
bool AIR_AddEmployee(Employee *employee, aircraft_t *aircraft)
Assigns a soldier to an aircraft.
linkedList_t * missionTypes
void AIR_DeleteAircraft(aircraft_t *aircraft)
Removes an aircraft from its base and the game.
struct technology_s * tech
void setUfoType(ufoType_t ufoT)
void AIR_AssignInitial(aircraft_t *aircraft)
Assigns initial team of soldiers to aircraft.
void AIR_InitStartup(void)
Init actions for aircraft-subsystem.
void AII_CollectItem(aircraft_t *aircraft, const objDef_t *item, int amount)
Add an item to aircraft inventory.
const aircraft_t * AIR_GetAircraft(const char *name)
Searches the global array of aircraft types for a given aircraft.
void AII_CollectingItems(aircraft_t *aircraft, int won)
Collect items from the battlefield.
int AIR_GetTeamSize(const aircraft_t *aircraft)
Counts the number of soldiers in given aircraft.
void AIR_AircraftsNotifyUFORemoved(const aircraft_t *const ufo, bool destroyed)
Notify that a UFO has been removed.
const char * AIR_CheckMoveIntoNewHomebase(const aircraft_t *aircraft, const struct base_s *base)
void AIR_RemoveEmployees(aircraft_t &aircraft)
Removes all soldiers from an aircraft.
struct aircraft_s * aircraftTarget
This is the technology parsed from research.ufo.
int ufoInterestOnGeoscape
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.
int AIR_BaseCountAircraft(const struct base_s *base)
Engine-side time information in the game.
bool AIR_SendAircraftPursuingUFO(aircraft_t *aircraft, aircraft_t *ufo)
Make the specified aircraft purchasing a UFO.
bool AIR_AircraftMakeMove(int dt, aircraft_t *aircraft)
Moves given aircraft.
aircraftSlot_t weapons[MAX_AIRCRAFTSLOT]
bool AIR_IsInAircraftTeam(const aircraft_t *aircraft, const class Employee *employee)
bool AIR_ScriptSanityCheck(void)
Checks the parsed aircraft for errors.
QGL_EXTERN GLenum GLuint * dest
void AIR_AircraftReturnToBase(aircraft_t *aircraft)
Calculates the way back to homebase for given aircraft and returns it.
aircraft_t * AIR_NewAircraft(struct base_s *base, const aircraft_t *aircraftTemplate)
Places a new aircraft in the given base.
int AIR_GetAircraftWeaponRanges(const aircraftSlot_t *slot, int maxSlot, float *weaponRanges)
Get the all the unique weapon ranges of this aircraft.
bool AIR_CanIntercept(const aircraft_t *aircraft)
enum aircraftStatus_s aircraftStatus_t
struct aircraft_s aircraft_t
An aircraft with all it's data.
void AIR_MoveAircraftIntoNewHomebase(aircraft_t *aircraft, struct base_s *base)
Moves a given aircraft to a new base (also the employees and inventory)
const objDef_t * nextAmmo
baseCapacities_t
All possible capacities in base.
vec2_t point[LINE_MAXPTS]
void AIR_ResetAircraftTeam(aircraft_t *aircraft)
Resets team in given aircraft.
void AIR_RemovePilotFromAssignedAircraft(const struct base_s *base, const class Employee *pilot)
void AIR_DestroyAircraft(aircraft_t *aircraft, bool killPilot=true)
Removes an aircraft from its base and the game.
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...
struct mapline_s mapline_t
A path on the map described by 2D points.
bool AIR_Delete(struct base_s *base, aircraft_t *aircraft)
Will remove the given aircraft from the base.
bool AIR_IsAircraftInBase(const aircraft_t *aircraft)
Checks whether given aircraft is in its homebase.
bool AIR_SendAircraftToMission(aircraft_t *aircraft, struct mission_s *mission)
Sends the specified aircraft to specified mission.
aircraftItemType_t
All different types of craft items.
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
bool AIR_SetPilot(aircraft_t *aircraft, class Employee *pilot)
Assign a pilot to an aircraft.
const char * AIR_AircraftStatusToName(const aircraft_t *aircraft)
Translates the aircraft status id to a translatable string.
bool AIR_AddToAircraftTeam(aircraft_t *aircraft, class Employee *employee)
Adds given employee to given aircraft.
const aircraft_t * AIR_GetAircraftSilent(const char *name)
Searches the global array of aircraft types for a given aircraft.
An aircraft with all it's data.
class AlienCargo * alienCargo
void AIR_ParseAircraft(const char *name, const char **text, bool assignAircraftItems)
Parses all aircraft that are defined in our UFO-scripts.
itemPos_t
different positions for aircraft items
int AIR_CountInBaseByTemplate(const struct base_s *base, const aircraft_t *aircraftTemplate)
struct aircraft_s * aircraft
void AIR_CampaignRun(const struct campaign_s *campaign, int dt, bool updateRadarOverlay)
A path on the map described by 2D points.
const aircraft_t * AIR_IsEmployeeInAircraft(const class Employee *employee, const aircraft_t *aircraft)
aircraftSlot_t electronics[MAX_AIRCRAFTSLOT]
bool AIR_BaseHasAircraft(const struct base_s *base)
struct aircraftSlot_s aircraftSlot_t
slot of aircraft
itemWeight_t
different weight for aircraft items
aircraft_notifications_t
notification signals for aircraft events