|
UFO: Alien Invasion
|

Go to the source code of this file.
Data Structures | |
| struct | alienBase_t |
| Alien Base. More... | |
Macros | |
| #define | AB_Foreach(var) |
| #define | AB_Exists() |
Functions | |
| alienBase_t * | AB_GetByIDX (int baseIDX) |
| Get Alien Base per Idx. | |
| void | AB_SetAlienBasePosition (vec2_t pos) |
| Set new base position. | |
| alienBase_t * | AB_BuildBase (const vec2_t pos) |
| Build a new alien base. | |
| void | AB_DestroyBase (alienBase_t *base) |
| Destroy an alien base. | |
| void | AB_UpdateStealthForAllBase (void) |
| Update stealth value of every base for every aircraft. | |
| void | AB_BaseSearchedByNations (void) |
| Nations help in searching alien base. | |
| bool | AB_CheckSupplyMissionPossible (void) |
| Check if a supply mission is possible. | |
| alienBase_t * | AB_ChooseBaseToSupply (void) |
| Choose Alien Base that should be supplied. | |
| void | AB_SupplyBase (alienBase_t *base, bool decreaseStealth) |
| Supply a base. | |
| int | AB_GetAlienBaseNumber (void) |
| Check number of alien bases. | |
| void | CP_SpawnAlienBaseMission (alienBase_t *alienBase) |
| Spawn a new alien base mission after it has been discovered. | |
| void | AB_InitStartup (void) |
| Init actions for alienbase-subsystem. | |
| void | AB_Shutdown (void) |
| Closing actions for alienbase-subsystem. | |
| #define AB_Exists | ( | ) |
Definition at line 39 of file cp_alienbase.h.
Referenced by AB_CheckSupplyMissionPossible(), AB_DestroyBase(), AB_SetAlienBasePosition(), TEST_F(), and TEST_F().
| #define AB_Foreach | ( | var | ) |
Definition at line 36 of file cp_alienbase.h.
Referenced by AB_BaseSearchedByNations(), AB_ChooseBaseToSupply(), AB_GetByIDX(), AB_SaveXML(), AB_SetAlienBasePosition(), and AB_UpdateStealthForAllBase().
Nations help in searching alien base.
daysPerWeek day < delay (in days) between base stealth update
< base probability, will be modified below
< xviInfection value of nation that will divide probability to find alien base by 2
Definition at line 238 of file cp_alienbase.cpp.
References AB_Foreach, ccs, CP_SpawnAlienBaseMission(), GEO_GetNation(), NAT_GetCurrentMonthInfo(), and nationInfo_t::xviInfection.
Referenced by CP_CampaignRun(), and TEST_F().
| alienBase_t * AB_BuildBase | ( | const vec2_t | pos | ) |
Build a new alien base.
| [in] | pos | Position of the new base. |
< How hard PHALANX will find the base
Definition at line 90 of file cp_alienbase.cpp.
References ccs, alienBase_t::idx, LIST_Add(), OBJZERO, alienBase_t::pos, alienBase_t::stealth, and Vector2Copy.
Referenced by CP_BuildBaseSetUpBase(), TEST_F(), and TEST_F().
| bool AB_CheckSupplyMissionPossible | ( | void | ) |
Check if a supply mission is possible.
Definition at line 274 of file cp_alienbase.cpp.
References AB_Exists.
Referenced by CP_SupplyGoToBase(), CP_SupplyMissionCreate(), and CP_SupplySetStayAtBase().
| alienBase_t * AB_ChooseBaseToSupply | ( | void | ) |
Choose Alien Base that should be supplied.
Definition at line 283 of file cp_alienbase.cpp.
References AB_Foreach, AB_GetAlienBaseNumber(), cgi, and i.
Referenced by CP_SupplyGoToBase().
| void AB_DestroyBase | ( | alienBase_t * | base | ) |
Destroy an alien base.
| [in] | base | Pointer to the alien base. |
Definition at line 107 of file cp_alienbase.cpp.
References AB_Exists, ccs, cgi, and INTERESTCATEGORY_SUPPLY.
Referenced by CP_BuildBaseMissionBaseDestroyed().
Check number of alien bases.
Definition at line 323 of file cp_alienbase.cpp.
Referenced by AB_ChooseBaseToSupply(), CP_ReconMissionIsSuccess(), CP_SpawnNewMissions(), TEST_F(), and TEST_F().
| alienBase_t * AB_GetByIDX | ( | int | baseIDX | ) |
Get Alien Base per Idx.
| [in] | baseIDX | The unique IDX of the alien Base. |
Definition at line 123 of file cp_alienbase.cpp.
References AB_Foreach.
Referenced by MIS_LoadXML().
Init actions for alienbase-subsystem.
Definition at line 423 of file cp_alienbase.cpp.
References cgi, and debugAlienBaseCmds.
Referenced by CP_InitStartup().
Set new base position.
| [out] | pos | Position of the new base. |
maxLoopPosition random positions, and select among those the one that is the farthest from every other alien bases. This is intended to get a rather uniform distribution of alien bases, while still keeping a random base localisation. < distance between current selected alien base
< Number of random position among which the final one will be selected
Definition at line 41 of file cp_alienbase.cpp.
References AB_Exists, AB_Foreach, CP_GetRandomPosOnGeoscape(), GEO_PositionCloseToBase(), GetDistanceOnGlobe(), and Vector2Copy.
Referenced by CP_BuildBaseGoToBase().
Closing actions for alienbase-subsystem.
Definition at line 431 of file cp_alienbase.cpp.
References ccs, cgi, and debugAlienBaseCmds.
Referenced by CP_Shutdown().
| void AB_SupplyBase | ( | alienBase_t * | base, |
| bool | decreaseStealth ) |
Supply a base.
| [in] | base | Pointer to the supplied base. |
| [in] | decreaseStealth | If the stealth level of the base should be decreased. |
< How much stealth is reduced because Supply UFO was seen
Definition at line 308 of file cp_alienbase.cpp.
References alienBase_t::stealth, and alienBase_t::supply.
Referenced by CP_SupplySetStayAtBase().
Update stealth value of every base for every aircraft.
DETECTION_INTERVAL Definition at line 218 of file cp_alienbase.cpp.
References AB_Foreach, AB_UpdateStealthForOneBase(), AIR_ForeachFromBase, AIR_IsAircraftOnGeoscape(), and B_GetNext().
Referenced by CP_CampaignFunctionPeriodicCall().
| void CP_SpawnAlienBaseMission | ( | alienBase_t * | alienBase | ) |
Spawn a new alien base mission after it has been discovered.
Definition at line 135 of file cp_alienbase.cpp.
References mission_t::missionData_t::alienBase, ALIENBASE_DISCOVERED, cgi, CP_CreateNewMission(), CP_MissionAddToGeoscape(), CP_MissionDisableTimeLimit(), CP_TriggerEvent(), mission_t::data, ERR_FATAL, INTERESTCATEGORY_ALIENBASE, mission_t::mapDef, MAPDEF_ALIENBASE, MIS_Foreach, alienBase_t::pos, mission_t::pos, mission_t::posAssigned, mission_t::stage, STAGE_BASE_DISCOVERED, and Vector2Copy.
Referenced by AB_BaseSearchedByNations(), and AB_UpdateStealthForOneBase().