UFO: Alien Invasion
|
Single player campaign control. More...
#include "../../cl_shared.h"
#include "../../ui/ui_main.h"
#include "../cgame.h"
#include "cp_campaign.h"
#include "cp_capacity.h"
#include "cp_character.h"
#include "cp_overlay.h"
#include "cp_mapfightequip.h"
#include "cp_hospital.h"
#include "cp_hospital_callbacks.h"
#include "cp_base_callbacks.h"
#include "cp_basedefence_callbacks.h"
#include "cp_team.h"
#include "cp_team_callbacks.h"
#include "cp_popup.h"
#include "cp_geoscape.h"
#include "cp_ufo.h"
#include "cp_installation_callbacks.h"
#include "cp_alien_interest.h"
#include "cp_missions.h"
#include "cp_mission_triggers.h"
#include "cp_nation.h"
#include "cp_statistics.h"
#include "cp_time.h"
#include "cp_xvi.h"
#include "cp_fightequip_callbacks.h"
#include "cp_produce_callbacks.h"
#include "cp_transfer.h"
#include "cp_market_callbacks.h"
#include "cp_research_callbacks.h"
#include "cp_uforecovery.h"
#include "save/save_campaign.h"
#include "cp_auto_mission.h"
#include "missions/cp_mission_baseattack.h"
#include "missions/cp_mission_ufocarrier.h"
Go to the source code of this file.
Macros | |
#define | NATIONBELOWLIMITPERCENTAGE 0.5f |
Functions | |
bool | CP_IsRunning (void) |
Checks whether a campaign mode game is running. More... | |
void | CP_EndCampaign (bool won) |
Function to handle the campaign end. More... | |
void | CP_CheckLostCondition (const campaign_t *campaign) |
Checks whether the player has lost the campaign. More... | |
static void | CP_CheckMissionEnd (const campaign_t *campaign) |
Check for missions that have a timeout defined. More... | |
static void | CP_CampaignFunctionPeriodicCall (campaign_t *campaign, int dt, bool updateRadarOverlay) |
Functions that should be called with a minimum time lapse (will be called at least every DETECTION_INTERVAL) More... | |
bool | CP_OnGeoscape (void) |
Returns if we are currently on the Geoscape. More... | |
static void | CP_AdvanceTimeBySeconds (int seconds) |
Ensure that the day always matches the seconds. If the seconds per day limit is reached, the seconds are reset and the day is increased. More... | |
static bool | CP_IsBudgetDue (const dateLong_t *oldDate, const dateLong_t *date) |
void | CP_CampaignRun (campaign_t *campaign, float secondsSinceLastFrame) |
Called every frame when we are in geoscape view. More... | |
bool | CP_CheckCredits (int costs) |
Checks whether you have enough credits for something. More... | |
void | CP_UpdateCredits (int credits) |
Sets credits and update mn_credits cvar. More... | |
static bool | CP_LoadMapDefStatXML (xmlNode_t *parent) |
Load mapDef statistics. More... | |
bool | CP_LoadXML (xmlNode_t *parent) |
Load callback for savegames in XML Format. More... | |
static bool | CP_SaveMapDefStatXML (xmlNode_t *parent) |
Save mapDef statistics. More... | |
bool | CP_SaveXML (xmlNode_t *parent) |
Save callback for savegames in XML Format. More... | |
void | CP_StartSelectedMission (void) |
Starts a selected mission. More... | |
static void | CP_AddCampaignCallbackCommands (void) |
registers callback commands that are used by campaign More... | |
static void | CP_AddCampaignCommands (void) |
static void | CP_RemoveCampaignCallbackCommands (void) |
registers callback commands that are used by campaign More... | |
static void | CP_RemoveCampaignCommands (void) |
void | CP_CampaignInit (campaign_t *campaign, bool load) |
Called at new game and load game. More... | |
void | CP_Shutdown (void) |
Campaign closing actions. More... | |
campaign_t * | CP_GetCampaign (const char *name) |
Returns the campaign pointer from global campaign array. More... | |
void | CP_ResetCampaignData (void) |
Will clear most of the parsed singleplayer data. More... | |
int | CP_GetSalaryUpKeepBase (const salary_t *salary, const base_t *base) |
void | CP_InitStartup (void) |
Variables | |
memPool_t * | cp_campaignPool |
ccs_t | ccs |
cvar_t * | cp_missiontest |
const int | DETECTION_INTERVAL = (SECONDS_PER_HOUR / 2) |
delay between actions that must be executed independently of time scale More... | |
static const cmdList_t | game_commands [] |
Single player campaign control.
Definition in file cp_campaign.cpp.
#define NATIONBELOWLIMITPERCENTAGE 0.5f |
Definition at line 66 of file cp_campaign.cpp.
Referenced by CP_CheckLostCondition().
registers callback commands that are used by campaign
Definition at line 712 of file cp_campaign.cpp.
References AIM_InitCallbacks(), B_InitCallbacks(), BDEF_InitCallbacks(), BS_InitCallbacks(), CP_TEAM_InitCallbacks(), HOS_InitCallbacks(), INS_InitCallbacks(), PR_InitCallbacks(), and RS_InitCallbacks().
Referenced by CP_AddCampaignCommands().
Definition at line 725 of file cp_campaign.cpp.
References cgi, and CP_AddCampaignCallbackCommands().
Referenced by CP_CampaignInit().
Ensure that the day always matches the seconds. If the seconds per day limit is reached, the seconds are reset and the day is increased.
seconds | The seconds to add to the campaign date |
Definition at line 208 of file cp_campaign.cpp.
References ccs_s::date, date_s::day, date_s::sec, and SECONDS_PER_DAY.
Referenced by CP_CampaignRun().
|
static |
Functions that should be called with a minimum time lapse (will be called at least every DETECTION_INTERVAL)
[in] | campaign | The campaign data structure |
[in] | dt | Elapsed game seconds since last call. |
[in] | updateRadarOverlay | true if radar overlay should be updated (only for drawing purpose) |
Definition at line 176 of file cp_campaign.cpp.
References AB_UpdateStealthForAllBase(), AIR_CampaignRun(), AIRFIGHT_CampaignRunBaseDefence(), AIRFIGHT_CampaignRunProjectiles(), CP_CheckNewMissionDetectedOnGeoscape(), UFO_CampaignCheckEvents(), UFO_CampaignRunUFOs(), and UFO_UpdateAlienInterestForAllBasesAndInstallations().
Referenced by CP_CampaignRun().
void CP_CampaignInit | ( | campaign_t * | campaign, |
bool | load | ||
) |
Called at new game and load game.
[in] | load | true if we are loading game, false otherwise |
[in] | campaign | Pointer to campaign - it will be set to ccs.curCampaign here. |
< Initialise all data in the research tree.
Definition at line 765 of file cp_campaign.cpp.
References B_SelectBase(), BS_InitMarket(), cgi, CL_EventAddMail(), CL_PopupInit(), CP_AddCampaignCommands(), CP_GameTimeStop(), CP_InitializeSpawningDelay(), CP_InitializeXVIOverlay(), CP_ReadCampaignData(), CP_ScriptSanityCheck(), CP_UpdateCredits(), CP_UpdateTime(), CP_UpdateXVIMapButton(), CP_XVIInit(), campaign_s::credits, ccs_s::curCampaign, E_InitialEmployees(), GEO_Reset(), INT_ResetAlienInterest(), campaign_s::map, RS_InitTree(), and RS_MarkResearchable().
Referenced by CP_LoadXML(), and GAME_CP_Start_f().
void CP_CampaignRun | ( | campaign_t * | campaign, |
float | secondsSinceLastFrame | ||
) |
Called every frame when we are in geoscape view.
Definition at line 234 of file cp_campaign.cpp.
References AB_BaseSearchedByNations(), AII_RepairAircraft(), AII_UpdateInstallationDelay(), B_AtLeastOneExists, B_UpdateBuildingConstructions(), BDEF_AutoSelectTarget(), CAP_CheckOverflow(), CP_AdvanceTimeBySeconds(), CP_CampaignFunctionPeriodicCall(), CP_CampaignRunMarket(), CP_CheckBaseAttacks(), CP_CheckCampaignEvents(), CP_CheckLostCondition(), CP_CheckMissionEnd(), CP_DateConvertLong(), CP_IsBudgetDue(), CP_IsTimeStopped(), CP_ReduceXVIEverywhere(), CP_SpreadXVI(), CP_TriggerEvent(), CP_UpdateNationXVIInfection(), CP_UpdateTime(), CP_UpdateXVIMapButton(), ccs_s::date, dateLong_s::day, date_s::day, DETECTION_INTERVAL, ccs_s::frametime, ccs_s::gameTimeScale, HOS_HospitalRun(), i, INS_UpdateInstallationData(), int(), INT_IncreaseAlienInterest(), campaign_s::minhappiness, ccs_s::missionSpawnCallback, NAT_BackupMonthlyData(), NAT_HandleBudget(), NAT_UpdateHappinessForAllNations(), NEW_DAY, ccs_s::paid, PR_ProductionRun(), RS_ResearchRun(), date_s::sec, SECONDS_PER_HOUR, SECONDS_PER_MINUTE, timer, ccs_s::timer, TR_TransferRun(), UP_GetUnreadMails(), and UR_ProcessActive().
Referenced by GAME_CP_Frame(), and TEST_F().
bool CP_CheckCredits | ( | int | costs | ) |
Checks whether you have enough credits for something.
[in] | costs | costs to check |
Definition at line 356 of file cp_campaign.cpp.
References ccs_s::credits.
Referenced by B_BuildBuilding(), and B_BuildBuilding_f().
void CP_CheckLostCondition | ( | const campaign_t * | campaign | ) |
Checks whether the player has lost the campaign.
Definition at line 100 of file cp_campaign.cpp.
References _, B_AtLeastOneExists, campaign_s::basecost, cgi, CP_EndCampaign(), CP_GetAverageXVIRate(), ccs_s::credits, nationInfo_s::happiness, cvar_s::integer, campaign_s::maxAllowedXVIRateUntilLost, campaign_s::minhappiness, NAT_Foreach, NAT_GetCurrentMonthInfo(), NATIONBELOWLIMITPERCENTAGE, campaign_s::negativeCreditsUntilLost, ccs_s::numNations, and TEXT_STANDARD.
Referenced by CP_CampaignRun(), and CP_MissionEnd().
|
static |
Check for missions that have a timeout defined.
Definition at line 159 of file cp_campaign.cpp.
References CP_CheckMissionLimitedInTime(), CP_MissionStageEnd(), ccs_s::date, Date_LaterThan(), and MIS_Foreach.
Referenced by CP_CampaignRun().
void CP_EndCampaign | ( | bool | won | ) |
Function to handle the campaign end.
[in] | won | If the player won the game |
Definition at line 88 of file cp_campaign.cpp.
Referenced by CP_AttackUFOCarrier_f(), CP_CheckLostCondition(), and CP_EndGame_f().
campaign_t* CP_GetCampaign | ( | const char * | name | ) |
Returns the campaign pointer from global campaign array.
name | Name of the campaign |
Definition at line 860 of file cp_campaign.cpp.
References ccs_s::campaigns, cgi, i, campaign_s::id, ccs_s::numCampaigns, and Q_streq.
Referenced by CP_LoadXML(), CP_ParseCampaign(), GAME_CP_CampaignDescription_f(), GAME_CP_Start_f(), and GetCampaign().
Definition at line 915 of file cp_campaign.cpp.
References B_GetNextBuilding(), B_STATUS_CONSTRUCTION_FINISHED, B_STATUS_WORKING, salary_s::baseUpkeep, building_s::buildingStatus, and building_s::varCosts.
Referenced by NAT_HandleBudget(), and STAT_GetExpenses_f().
Definition at line 928 of file cp_campaign.cpp.
References AB_InitStartup(), AC_InitStartup(), AIR_InitStartup(), AIRFIGHT_InitStartup(), AM_InitStartup(), B_InitStartup(), cgi, CHAR_InitStartup(), CP_InitializeXVIOverlay(), cgame_import_s::CreatePool(), CVAR_DEVELOPER, cgame_import_s::Cvar_Get(), E_InitStartup(), GEO_InitStartup(), HOS_InitStartup(), INS_InitStartup(), INT_InitStartup(), MIS_InitStartup(), MS_MessageInit(), NAT_InitStartup(), RS_InitStartup(), SAV_Init(), STATS_InitStartup(), TR_InitStartup(), UFO_InitStartup(), UP_InitStartup(), and UR_InitStartup().
Referenced by GAME_CP_InitStartup().
|
inlinestatic |
true
if a month has passed Definition at line 220 of file cp_campaign.cpp.
References dateLong_s::month, and dateLong_s::year.
Referenced by CP_CampaignRun().
bool CP_IsRunning | ( | void | ) |
Checks whether a campaign mode game is running.
Definition at line 79 of file cp_campaign.cpp.
References ccs_s::curCampaign.
Referenced by CP_Shutdown(), GAME_CP_Frame(), GAME_CP_Start_f(), GEO_Draw(), SAV_GameContinue_f(), SAV_GameQuickSave_f(), and SAV_GameSaveAllowed().
|
static |
Load mapDef statistics.
[in] | parent | XML Node structure, where we get the information from |
Definition at line 381 of file cp_campaign.cpp.
References cgi, cgame_import_s::Com_GetMapDefinitionByID(), SAVE_CAMPAIGN_MAPDEF, SAVE_CAMPAIGN_MAPDEF_COUNT, SAVE_CAMPAIGN_MAPDEF_ID, mapDef_s::timesAlreadyUsed, cgame_import_s::XML_GetNextNode(), cgame_import_s::XML_GetNode(), cgame_import_s::XML_GetString(), and xmlNode_t.
Referenced by CP_LoadXML().
bool CP_LoadXML | ( | xmlNode_t * | parent | ) |
Load callback for savegames in XML Format.
[in] | parent | XML Node structure, where we get the information from |
Definition at line 408 of file cp_campaign.cpp.
References ccs_s::aliensKilled, cgi, ccs_s::civiliansKilled, CP_CampaignInit(), CP_GetCampaign(), CP_LoadMapDefStatXML(), CP_UpdateCredits(), ccs_s::date, date_s::day, DEBUG_CLIENT, GEO_Reset(), campaign_s::map, name, ccs_s::paid, radarOverlayWasSet, SAVE_CAMPAIGN_ALIENSKILLED, SAVE_CAMPAIGN_CAMPAIGN, SAVE_CAMPAIGN_CIVILIANSKILLED, SAVE_CAMPAIGN_CL_GEOSCAPE_OVERLAY, SAVE_CAMPAIGN_CREDITS, SAVE_CAMPAIGN_DATE, SAVE_CAMPAIGN_GEO_OVERLAY_NATION, SAVE_CAMPAIGN_GEO_OVERLAY_RADAR, SAVE_CAMPAIGN_GEO_OVERLAY_XVI, SAVE_CAMPAIGN_ID, SAVE_CAMPAIGN_MAP, SAVE_CAMPAIGN_MAPDEFSTAT, SAVE_CAMPAIGN_NEXTUNIQUECHARACTERNUMBER, SAVE_CAMPAIGN_PAID, SAVE_CAMPAIGN_RADAROVERLAYWASSET, SAVE_CAMPAIGN_XVISTARTED, date_s::sec, ccs_s::startXVI, cgame_import_s::XML_GetDate(), cgame_import_s::XML_GetNode(), cgame_import_s::XML_GetString(), and xmlNode_t.
Referenced by SAV_Init().
bool CP_OnGeoscape | ( | void | ) |
Returns if we are currently on the Geoscape.
Definition at line 198 of file cp_campaign.cpp.
References cgi, Q_streq, and cgame_import_s::UI_GetActiveWindowName().
Referenced by CP_AllowTimeScale(), CP_GameTimeStop(), and GAME_CP_Frame().
registers callback commands that are used by campaign
Definition at line 738 of file cp_campaign.cpp.
References AIM_ShutdownCallbacks(), B_ShutdownCallbacks(), BDEF_ShutdownCallbacks(), BS_ShutdownCallbacks(), CP_TEAM_ShutdownCallbacks(), HOS_ShutdownCallbacks(), INS_ShutdownCallbacks(), MSO_Shutdown(), PR_ShutdownCallbacks(), RS_ShutdownCallbacks(), and UP_Shutdown().
Referenced by CP_RemoveCampaignCommands().
Definition at line 753 of file cp_campaign.cpp.
References cgi, and CP_RemoveCampaignCallbackCommands().
Referenced by CP_Shutdown().
Will clear most of the parsed singleplayer data.
Definition at line 881 of file cp_campaign.cpp.
References AIR_Delete(), AIR_Foreach, B_Delete(), B_GetNext(), cgi, CP_FreeDynamicEventMail(), CP_SpawnNewMissions(), MapDef_ForeachSingleplayerCampaign, ccs_s::missionSpawnCallback, OBJZERO, RS_ResetTechs(), and mapDef_s::timesAlreadyUsed.
Referenced by GAME_CP_InitStartup(), GAME_CP_Shutdown(), CampaignTest::SetUp(), and CampaignTest::TearDownTestCase().
|
static |
Save mapDef statistics.
[out] | parent | XML Node structure, where we write the information to |
Definition at line 483 of file cp_campaign.cpp.
References cgi, mapDef_s::id, MapDef_ForeachSingleplayerCampaign, SAVE_CAMPAIGN_MAPDEF, SAVE_CAMPAIGN_MAPDEF_COUNT, SAVE_CAMPAIGN_MAPDEF_ID, mapDef_s::timesAlreadyUsed, cgame_import_s::XML_AddNode(), and xmlNode_t.
Referenced by CP_SaveXML().
bool CP_SaveXML | ( | xmlNode_t * | parent | ) |
Save callback for savegames in XML Format.
[out] | parent | XML Node structure, where we write the information to |
Definition at line 502 of file cp_campaign.cpp.
References ccs_s::aliensKilled, cgi, ccs_s::civiliansKilled, CP_IsXVIStarted, CP_SaveMapDefStatXML(), ccs_s::credits, ccs_s::curCampaign, ccs_s::date, date_s::day, campaign_s::id, ccs_s::paid, radarOverlayWasSet, SAVE_CAMPAIGN_ALIENSKILLED, SAVE_CAMPAIGN_CAMPAIGN, SAVE_CAMPAIGN_CIVILIANSKILLED, SAVE_CAMPAIGN_CREDITS, SAVE_CAMPAIGN_DATE, SAVE_CAMPAIGN_GEO_OVERLAY_NATION, SAVE_CAMPAIGN_GEO_OVERLAY_RADAR, SAVE_CAMPAIGN_GEO_OVERLAY_XVI, SAVE_CAMPAIGN_ID, SAVE_CAMPAIGN_MAP, SAVE_CAMPAIGN_MAPDEFSTAT, SAVE_CAMPAIGN_NEXTUNIQUECHARACTERNUMBER, SAVE_CAMPAIGN_PAID, SAVE_CAMPAIGN_RADAROVERLAYWASSET, SAVE_CAMPAIGN_XVISTARTED, date_s::sec, cgame_import_s::XML_AddNode(), and xmlNode_t.
Referenced by SAV_Init().
Campaign closing actions.
Definition at line 822 of file cp_campaign.cpp.
References AB_Shutdown(), AIR_Shutdown(), ccs_s::alienCategories, AM_Shutdown(), cgi, CHAR_Shutdown(), CP_IsRunning(), CP_RemoveCampaignCommands(), E_Shutdown(), alienTeamCategory_s::equipment, GEO_Shutdown(), i, INS_Shutdown(), INT_Shutdown(), MIS_Shutdown(), NAT_Shutdown(), ccs_s::numAlienCategories, STATS_ShutDown(), TR_Shutdown(), UFO_Shutdown(), and UR_Shutdown().
Referenced by GAME_CP_Shutdown().
Starts a selected mission.
Definition at line 540 of file cp_campaign.cpp.
References mission_s::active, AIR_GetTeamSize(), building_s::base, BATTLE_SetVars(), BATTLE_Start(), ccs_s::battleParameters, cgi, CP_CleanTempInventory(), CP_CleanupAircraftTeam(), CP_CreateBattleParameters(), ccs_s::eMission, GEO_GetMissionAircraft, GEO_GetSelectedMission, GEO_SetSelectedMission, aircraft_s::homebase, aircraft_s::mission, mission_s::missionResults, OBJZERO, and base_s::storage.
Referenced by GAME_CP_Results_f().
Sets credits and update mn_credits cvar.
[in] | credits | The new credits value Checks whether credits are bigger than MAX_CREDITS |
Definition at line 368 of file cp_campaign.cpp.
References _, cgi, ccs_s::credits, cgame_import_s::Cvar_Set(), and MAX_CREDITS.
Referenced by B_BaseInit_f(), B_BuildBase_f(), B_BuildBuilding(), B_BuildingDestroy(), B_SetUpFirstBase(), BS_BuyAircraft(), BS_BuyItem(), BS_BuyUGV(), BS_ProcessCraftItemSale(), BS_SellAircraft(), BS_SellItem(), BS_SellUGV(), CP_CampaignInit(), CP_LoadXML(), INS_BuildInstallation_f(), NAT_HandleBudget(), PR_FinishProduction(), CampaignTest::SetUp(), and UR_DialogStartSell_f().
ccs_t ccs |
Definition at line 62 of file cp_campaign.cpp.
Referenced by AB_BaseSearchedByNations(), AB_BuildBase(), AB_DestroyBase(), AB_GetAlienBaseNumber(), AB_LoadXML(), AB_Shutdown(), AII_CarriedItems(), AIR_Add(), AIR_Delete(), AIR_GetAircraftSilent(), AIR_LoadAircraftXML(), AIR_LoadXML(), AIR_NewAircraft(), AIR_ParseAircraft(), AIR_ScriptSanityCheck(), AIR_Shutdown(), AIRFIGHT_AddProjectile(), AIRFIGHT_BaseShoot(), AIRFIGHT_CampaignRunProjectiles(), AIRFIGHT_ExecuteActions(), AIRFIGHT_InstallationShoot(), AIRFIGHT_LoadXML(), AIRFIGHT_RemoveProjectile(), AIRFIGHT_RemoveProjectileAimingAircraft(), AIRFIGHT_SaveXML(), AIRFIGHT_UpdateProjectileForDestroyedAircraft(), AL_AddAliens(), AM_Go(), AM_Go_f(), B_BaseInit_f(), B_Build(), B_BuildBase_f(), B_BuildBuilding(), B_BuildFromTemplate(), B_BuildingDestroy(), B_BuildingScriptSanityCheck(), B_Destroy(), B_GetBaseByIDX(), B_GetBaseTemplate(), B_GetBuildingTemplateByType(), B_GetBuildingTemplateSilent(), B_GetConstructionTimeRemain(), B_GetCount(), B_GetNext(), B_GetNextBuilding(), B_InitCallbacks(), B_IsBuildingDestroyable(), B_ListBuildings_f(), B_LoadXML(), B_ParseBaseTemplate(), B_ParseBuildings(), B_SelectBase(), B_SellOrAddItems(), B_SetBaseTitle_f(), B_SetUpFirstBase(), B_UpdateBaseCapacities(), BATTLE_Start(), BS_Buy_f(), BS_BuyAircraft(), BS_BuyItem(), BS_BuyUGV(), BS_FillMarket_f(), BS_ProcessCraftItemSale(), BS_SellAircraft(), BS_SellItem(), BS_SellUGV(), BS_SetAutosell_f(), CHAR_UpdateStats(), CITY_GetById(), CITY_GetByPos(), CITY_Parse(), CL_EventAddMail(), CL_GetEventMail(), CL_GetRankByIdx(), CL_GetRankIdx(), CL_ParseCampaignEvents(), CL_ParseEventMails(), CL_ParseNations(), CL_ParseRanks(), COMP_GetComponentsByID(), COMP_ParseComponents(), CP_AllowTimeScale(), CP_AttackUFOCarrier_f(), CP_BaseAttackGoToBase(), CP_BaseAttackMissionLeave(), CP_BaseAttackStartMission(), CP_BasemissionIsSubvertingGovernmentMission(), CP_BeginRescueMission(), CP_BuildBaseSetUpBase(), CP_BuildBaseSubvertGovernment(), CP_CampaignRunMarket(), CP_ChangeNationHappiness_f(), CP_CheckCampaignEvents(), CP_CheckTriggerEvent(), CP_ChooseCity(), CP_CreateNewMission(), CP_EndRescueMission(), CP_GameTimeFast(), CP_GameTimeSlow(), CP_GameTimeStop(), CP_GetAverageXVIRate(), CP_GetEventsByID(), CP_HarvestMissionGo(), CP_HarvestMissionStart(), CP_InitializeSpawningDelay(), CP_InterceptAircraftMissionSet(), CP_InterceptAttackInstallation(), CP_InterceptNextStage(), CP_IsTimeStopped(), CP_LeaveRescueMission(), CP_MissionBegin(), CP_MissionEnd(), CP_MissionRemove(), CP_MissionStageEnd(), CP_ParseAlienTeam(), CP_ParseCampaign(), CP_ParseCampaignData(), CP_ParseEventTrigger(), CP_ParseResearchableCampaignStates(), CP_ParseResearchedCampaignItems(), CP_ReadCampaignData(), CP_ReconMissionAerial(), CP_ReconMissionGround(), CP_ReconMissionGroundGo(), CP_ReconMissionLeave(), CP_ReduceXVIEverywhere(), CP_SelectNewMissionType(), CP_SetAlienTeamByInterest(), CP_SetGameTime(), CP_SetMissionName(), CP_SpawnCrashSiteMission(), CP_SpawnNewMissions(), CP_StartXVISpreading_f(), CP_SupplySetStayAtBase(), CP_TerrorMissionGo(), CP_TerrorMissionStart(), CP_TriggerEvent(), CP_TriggerEventLoadXML(), CP_TriggerEventSaveXML(), CP_UFOCarrierMissionStart(), CP_UFOCarrierMissionUpdate(), CP_UpdateNationXVIInfection(), CP_UpdateTime(), CP_XVIMissionStart(), CreateBase(), CreateInstallation(), Date_IsDue(), E_CountByType(), E_CreateEmployee(), E_DeleteEmployee(), E_LoadXML(), E_Shutdown(), GAME_CP_CampaignDescription_f(), GAME_CP_Frame(), GAME_CP_GetCampaigns_f(), GAME_CP_GetEquipmentDefinition(), GAME_CP_GetTeamDef(), GAME_CP_InitMissionBriefing(), GAME_CP_Results(), GAME_CP_Results_f(), GAME_CP_TeamIsKnown(), GEO_Click(), GEO_Draw(), GEO_DrawMarkers(), GEO_IsNight(), GEO_NotifyUFORemoved(), GEO_ResetAction(), HOS_HealCharacter(), INS_Build(), INS_BuildInstallation_f(), INS_DestroyInstallation(), INS_FillTypes_f(), INS_FillUFOYardData_f(), INS_GetCount(), INS_GetInstallationTemplateByID(), INS_GetInstallationTemplateByType(), INS_LinkTechnologies(), INS_LoadXML(), INS_ParseInstallations(), INS_SelectInstallation(), INS_SelectType_f(), INS_SetInstallationTitle(), INS_Shutdown(), INS_UpdateInstallationData(), INT_ChangeIndividualInterest(), INT_IncreaseAlienInterest(), INT_LoadXML(), INT_ResetAlienInterest(), INT_SaveXML(), MIS_CreateAlienTeam(), MIS_LoadXML(), MIS_Shutdown(), MS_AddNewMessage(), MSO_InitList(), MSO_ParseCategory(), MSO_Toggle_f(), MSO_UpdateVisibleButtons(), NAT_GetRandom(), NAT_HandleBudget(), NAT_ScriptSanityCheck(), NAT_Shutdown(), PR_CalculateTotalFrames(), PR_CheckFrame(), PR_FinishProduction(), PR_GetPrice(), PR_UpdateProductionList(), RS_CheckRequirements(), RS_CountScientistsInBase(), RS_FillTechnologyList_f(), RS_GetTechByIDX(), RS_GetTechForItem(), RS_GetTechForTeam(), RS_GetTechWithMostScientists(), RS_InitTree(), RS_IsResearched_idx(), RS_IsValidTechIndex(), RS_MarkCollected(), RS_MarkOneResearchable(), RS_MarkResearchable(), RS_ParseTechnologies(), RS_RequiredLinksAssign(), RS_ResearchFinish(), RS_ResearchRun(), RS_SaveXML(), RS_ScriptSanityCheck(), RS_ShowActiveResearch_f(), Employee::salary(), SAV_GameSave(), CampaignTest::SetUp(), STAT_GetExpenses_f(), STATS_LoadXML(), STATS_SaveXML(), STATS_Update_f(), TEST_F(), TR_DestinationCapacityList_f(), TR_List_f(), TR_LoadXML(), TR_Shutdown(), TR_TransferEnd(), TR_TransferStart(), UFO_CampaignRunUFOs(), UFO_CreateFromTemplate(), UFO_DetectNewUFO(), UFO_GeoSelectUFO_f(), UFO_GetByIDX(), UFO_GetByType(), UFO_GetNext(), UFO_GetTemplate(), UFO_GetTemplateForGeoscape(), UFO_NotifyPhalanxAircraftRemoved(), UFO_RemoveFromGeoscape(), UFO_ShouldAppearOnGeoscape(), UP_Click_f(), UP_GenerateSummary(), UP_GetUnreadMails(), UP_MailClientClick_f(), UP_ParseChapter(), UP_SetAllMailsRead_f(), UP_SetMailHeader(), UR_DialogStartSell_f(), UR_DialogStartStore_f(), UR_ProcessActive(), UR_Shutdown(), US_LoadXML(), US_RemoveStoredUFO(), US_SelectStoredUfo_f(), US_StoredUFOCount(), US_StoreUFO(), and US_TransferUFO().
memPool_t* cp_campaignPool |
reset on every game restart
Definition at line 61 of file cp_campaign.cpp.
Referenced by AIR_LoadAircraftXML(), AIR_ParseAircraft(), AM_CreateUnitChr(), B_ParseBaseTemplate(), B_ParseBuildings(), CITY_Parse(), CL_EventAddMail(), CL_ParseCampaignEvents(), CL_ParseEventMails(), CL_ParseNations(), CL_ParseRanks(), CP_CreateBattleParameters(), CP_ParseAlienTeam(), CP_ParseEventTrigger(), CP_ParseResearchedCampaignItems(), CP_ParseSalary(), CP_UpdateNationXVIInfection(), INS_ParseInstallations(), MS_AddNewMessage(), MS_LoadXML(), MSO_ParseCategory(), RS_InitTree(), RS_ParseTechnologies(), SAV_GameLoad(), SAV_GameSave(), CampaignTest::SetUpTestCase(), and UP_ParseChapter().
cvar_t* cp_missiontest |
Definition at line 63 of file cp_campaign.cpp.
Referenced by CP_ChooseMap(), CP_GameTimeStop(), and CampaignTest::SetUpTestCase().
const int DETECTION_INTERVAL = (SECONDS_PER_HOUR / 2) |
delay between actions that must be executed independently of time scale
Definition at line 74 of file cp_campaign.cpp.
Referenced by AB_UpdateStealthForOneBase(), CP_CampaignRun(), CP_CheckNewMissionDetectedOnGeoscape(), RADAR_Initialise(), UFO_UpdateAlienInterestForOneBase(), and UFO_UpdateAlienInterestForOneInstallation().
|
static |
Definition at line 684 of file cp_campaign.cpp.