UFO: Alien Invasion
Loading...
Searching...
No Matches
cp_xvi.h File Reference

Campaign XVI header. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CP_IsXVIStarted()

Functions

void CP_XVIInit (void)
void CP_SpreadXVIAtPos (const vec2_t pos)
 Spread XVI at a given position.
bool CP_IsXVIVisible (void)
 Returns true if the XVI effect should be visible to the player.
void CP_SpreadXVI (void)
 Spread XVI for each mission that needs to be daily spread.
void CP_ReduceXVIEverywhere (void)
 Reduce XVI everywhere.
void CP_UpdateNationXVIInfection (void)
 Update xviInfection value for each nation, using the XVI overlay.
int CP_GetAverageXVIRate (void)
 Return the average XVI rate.
void CP_UpdateXVIMapButton (void)
 This will hide or show the geoscape button for handling the xvi overlay map.
void CP_StartXVISpreading_f (void)
 Start XVI spreading in campaign.

Detailed Description

Campaign XVI header.

Definition in file cp_xvi.h.

Macro Definition Documentation

◆ CP_IsXVIStarted

Function Documentation

◆ CP_GetAverageXVIRate()

int CP_GetAverageXVIRate ( void )

Return the average XVI rate.

Note
XVI = eXtraterrestial Viral Infection

Definition at line 163 of file cp_xvi.cpp.

References ccs, CP_GetAverageXVIRate(), NAT_Foreach, NAT_GetCurrentMonthInfo(), ccs_t::numNations, and nationInfo_t::xviInfection.

Referenced by CP_CheckLostCondition(), CP_CheckTriggerEvent(), CP_GetAverageXVIRate(), MIS_IsSpawnedFromGround(), and STATS_Update_f().

◆ CP_IsXVIVisible()

bool CP_IsXVIVisible ( void )

Returns true if the XVI effect should be visible to the player.

Definition at line 196 of file cp_xvi.cpp.

References CP_IsXVIVisible(), RS_IsResearched_ptr(), and rsAlienXVI.

Referenced by CP_IsXVIVisible(), CP_UpdateXVIMapButton(), GEO_DrawMarkers(), and STATS_Update_f().

◆ CP_ReduceXVIEverywhere()

void CP_ReduceXVIEverywhere ( void )

◆ CP_SpreadXVI()

void CP_SpreadXVI ( void )

Spread XVI for each mission that needs to be daily spread.

Note
Daily called

Definition at line 181 of file cp_xvi.cpp.

References CP_IsXVIStarted, CP_SpreadXVI(), CP_SpreadXVIAtPos(), MIS_Foreach, and STAGE_SPREAD_XVI.

Referenced by CP_CampaignRun(), and CP_SpreadXVI().

◆ CP_SpreadXVIAtPos()

void CP_SpreadXVIAtPos ( const vec2_t pos)

Spread XVI at a given position.

Parameters
[in]posPosition where XVI should be spread.

Definition at line 56 of file cp_xvi.cpp.

References CP_ChangeXVILevel(), CP_IsXVIStarted, CP_SpreadXVIAtPos(), XVI_FACTOR, and xviNationInfectionNeedsUpdate.

Referenced by CP_BuildBaseMissionIsSuccess(), CP_SpreadXVI(), CP_SpreadXVIAtPos(), and CP_SupplyMissionIsSuccess().

◆ CP_StartXVISpreading_f()

void CP_StartXVISpreading_f ( void )

Start XVI spreading in campaign.

Note
This is called when 'a new twist' technology is discovered.

Definition at line 276 of file cp_xvi.cpp.

References ccs, CP_CreateNewMission(), CP_StartXVISpreading_f(), ccs_t::curCampaign, campaign_t::difficulty, i, INTERESTCATEGORY_BUILDING, and ccs_t::startXVI.

Referenced by CP_StartXVISpreading_f().

◆ CP_UpdateNationXVIInfection()

void CP_UpdateNationXVIInfection ( void )

Update xviInfection value for each nation, using the XVI overlay.

Note
should be executed after all daily event that could change XVI overlay

Definition at line 88 of file cp_xvi.cpp.

References ccs, cgi, cp_campaignPool, CP_GetXVILevel(), CP_GetXVIMapDimensions(), CP_UpdateNationXVIInfection(), GEO_GetColor(), GEO_GetNation(), nation_t::idx, MAPTYPE_NATIONS, Mem_PoolAllocTypeN, NAT_Foreach, ccs_t::numNations, OBJZERO, torad, Vector2Set, VectorCompare, and xviNationInfectionNeedsUpdate.

Referenced by CP_CampaignRun(), and CP_UpdateNationXVIInfection().

◆ CP_UpdateXVIMapButton()

void CP_UpdateXVIMapButton ( void )

This will hide or show the geoscape button for handling the xvi overlay map.

Definition at line 298 of file cp_xvi.cpp.

References cgi, CP_IsXVIVisible(), and CP_UpdateXVIMapButton().

Referenced by CP_CampaignInit(), CP_CampaignRun(), CP_UpdateXVIMapButton(), and SAV_GameActionsAfterLoad().

◆ CP_XVIInit()

void CP_XVIInit ( void )

Definition at line 201 of file cp_xvi.cpp.

References cgi, CP_XVIInit(), ERR_DROP, RS_GetTechByID(), rsAlienXVI, and XVI_EVENT_NAME.

Referenced by CP_CampaignInit(), and CP_XVIInit().