27 #include "../../DateTime.h" 31 #define MAX_AIRCRAFT 64 32 #define LINE_MAXSEG 64 33 #define LINE_MAXPTS (LINE_MAXSEG + 2) 36 #define AIRCRAFT_REFUEL_FACTOR 16 39 typedef struct mapline_s {
75 #define MAX_AIRCRAFTSLOT 8 78 typedef struct aircraftSlot_s {
99 typedef enum aircraftStatus_s {
115 typedef 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) 234 void AIR_CampaignRun(
const struct campaign_s* campaign,
int dt,
bool updateRadarOverlay);
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.
struct aircraft_s * aircraft
Class describing a point of time.
aircraft_t * AIR_Add(struct base_s *base, const aircraft_t *aircraftTemplate)
baseCapacities_t AIR_GetHangarCapacityType(const aircraft_t *aircraft)
Returns capacity type needed for an aircraft.
A path on the map described by 2D points.
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...
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.
void AIR_AutoAddPilotToAircraft(const struct base_s *base, class Employee *pilot)
void AIR_AircraftsNotifyMissionRemoved(const struct mission_s *mission)
bool AIR_AddEmployee(Employee *employee, aircraft_t *aircraft)
Assigns a soldier to an aircraft.
void AIR_DeleteAircraft(aircraft_t *aircraft)
Removes an aircraft from its base and the game.
int ufoInterestOnGeoscape
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.
const objDef_t * nextAmmo
class AlienCargo * alienCargo
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)
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.
bool AIR_IsInAircraftTeam(const aircraft_t *aircraft, const class Employee *employee)
bool AIR_ScriptSanityCheck(void)
Checks the parsed aircraft for errors.
struct installation_s * installation
QGL_EXTERN GLenum GLuint * dest
void setUfoType(ufoType_t ufoT)
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)
ufoType_t getUfoType() const
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)
void AIR_MoveAircraftIntoNewHomebase(aircraft_t *aircraft, struct base_s *base)
baseCapacities_t
All possible capacities in base.
An aircraft with all it's data.
struct technology_s * tech
void AIR_ResetAircraftTeam(aircraft_t *aircraft)
Resets team in given aircraft.
struct mission_s * mission
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...
bool AIR_Delete(struct base_s *base, aircraft_t *aircraft)
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)
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.
Defines all attributes of objects used in the inventory.
linkedList_t * missionTypes
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.
struct aircraft_s * aircraftTarget
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)
void AIR_CampaignRun(const struct campaign_s *campaign, int dt, bool updateRadarOverlay)
const aircraft_t * AIR_IsEmployeeInAircraft(const class Employee *employee, const aircraft_t *aircraft)
bool AIR_BaseHasAircraft(const struct base_s *base)
const objDef_t * nextItem
class ItemCargo * itemCargo
itemWeight_t
different weight for aircraft items
aircraft_notifications_t
notification signals for aircraft events