Campaign XVI header. More...
Go to the source code of this file.
Functions | |
void | CP_XVIInit (void) |
void | CP_SpreadXVIAtPos (const vec2_t pos) |
Spread XVI at a given position. | |
qboolean | CP_IsXVIResearched (void) |
Returns true if the tech for the xvi event is already researched. If this tech is already researched the aliens will spread their XVI - but it does not mean that the Phalanx can also do anything against it or is even able to the map of XVI. | |
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. |
Campaign XVI header.
Definition in file cp_xvi.h.
int CP_GetAverageXVIRate | ( | void | ) |
Return the average XVI rate.
Definition at line 167 of file cp_xvi.c.
References ccs, i, ccs_s::nations, ccs_s::numNations, nation_s::stats, and nationInfo_s::xviInfection.
Referenced by CL_StatsUpdate_f(), CP_CheckLostCondition(), and CP_MissionChooseUFO().
qboolean CP_IsXVIResearched | ( | void | ) |
Returns true
if the tech for the xvi event is already researched. If this tech is already researched the aliens will spread their XVI - but it does not mean that the Phalanx can also do anything against it or is even able to the map of XVI.
Definition at line 209 of file cp_xvi.c.
References RS_IsResearched_ptr().
Referenced by CL_StatsUpdate_f(), CP_HarvestMissionIsSuccess(), CP_InterceptMissionIsSuccess(), CP_ReconMissionIsSuccess(), CP_ReduceXVIEverywhere(), CP_SpreadXVI(), CP_SpreadXVIAtPos(), and MAP_DrawMapMarkers().
void CP_ReduceXVIEverywhere | ( | void | ) |
Reduce XVI everywhere.
Definition at line 69 of file cp_xvi.c.
References ccs, CP_DecreaseXVILevelEverywhere(), CP_IsXVIResearched(), ccs_s::date, date_s::day, qtrue, XVI_DECREASE_DAYS, and xviNationInfectionNeedsUpdate.
Referenced by CL_CampaignRun().
void CP_SpreadXVI | ( | void | ) |
Spread XVI for each mission that needs to be daily spread.
Definition at line 187 of file cp_xvi.c.
References ccs, CP_IsXVIResearched(), CP_SpreadXVIAtPos(), linkedList_s::data, ccs_s::missions, linkedList_s::next, mission_s::pos, mission_s::stage, and STAGE_SPREAD_XVI.
Referenced by CL_CampaignRun().
void CP_SpreadXVIAtPos | ( | const vec2_t | pos | ) |
Spread XVI at a given position.
[in] | pos | Position where XVI should be spread. |
Definition at line 55 of file cp_xvi.c.
References CP_ChangeXVILevel(), CP_IsXVIResearched(), qtrue, XVI_FACTOR, and xviNationInfectionNeedsUpdate.
Referenced by CP_BuildBaseMissionIsSuccess(), CP_SpreadXVI(), and CP_SupplyMissionIsSuccess().
void CP_StartXVISpreading_f | ( | void | ) |
Start XVI spreading in campaign.
Definition at line 292 of file cp_xvi.c.
References ccs, CP_CreateNewMission(), ccs_s::curCampaign, campaign_s::difficulty, i, INTERESTCATEGORY_BUILDING, qfalse, qtrue, and ccs_s::XVIShowMap.
void CP_UpdateNationXVIInfection | ( | void | ) |
Update xviInfection value for each nation, using the XVI overlay.
Definition at line 87 of file cp_xvi.c.
References byte, ccs, CP_GetXVILevel(), CP_GetXVIMapDimensions(), f, nation_s::idx, MAP_GetColor(), MAP_GetNation(), MAPTYPE_NATIONS, MAX_NATIONS, ccs_s::nations, ccs_s::numNations, qfalse, nation_s::stats, torad, Vector2Set, VectorCompare, nationInfo_s::xviInfection, and xviNationInfectionNeedsUpdate.
Referenced by CL_CampaignRun().
void CP_UpdateXVIMapButton | ( | void | ) |
This will hide or show the geoscape button for handling the xvi overlay map.
Definition at line 317 of file cp_xvi.c.
References ccs, Cvar_SetValue(), and ccs_s::XVIShowMap.
Referenced by CL_CampaignRun(), and CP_LoadXML().
void CP_XVIInit | ( | void | ) |
Definition at line 214 of file cp_xvi.c.
References Com_Error(), ERR_DROP, RS_GetTechByID(), and XVI_EVENT_NAME.
Referenced by CP_CampaignInit().