cp_campaign.h File Reference

Header file for single player campaign control. More...

#include "cp_rank.h"
#include "cp_save.h"
#include "cp_parse.h"
#include "cp_event.h"
#include "cp_ufopedia.h"
#include "cp_research.h"
#include "cp_radar.h"
#include "cp_aircraft.h"
#include "cp_base.h"
#include "cp_employee.h"
#include "cp_transfer.h"
#include "cp_nation.h"
#include "cp_installation.h"
#include "cp_produce.h"
#include "cp_uforecovery.h"
#include "cp_airfight.h"
#include "cp_messageoptions.h"
#include "cp_alienbase.h"
#include "cp_market.h"
#include "cp_statistics.h"
Include dependency graph for cp_campaign.h:

Go to the source code of this file.

Data Structures

struct  alienTeamGroup_s
 alien team group definition. More...
struct  alienTeamCategory_s
 alien team category definition More...
struct  mission_s
 mission definition More...
struct  battleParam_s
struct  missionResults_s
 Structure with mission info needed to create results summary at menu won. More...
struct  campaign_s
struct  salary_s
struct  ccs_s
 client campaign structure More...
struct  dateLong_s
 Human readable time information in the game. More...
struct  screenPoint_t

Defines

#define MAX_CAMPAIGNS   16
#define MAX_ASSEMBLIES   16
#define BYTES_NONE   0xFF
#define MapIsWater(color)   (color[0] == 0 && color[1] == 0 && color[2] == 64)
#define MapIsArctic(color)   (color[0] == 128 && color[1] == 255 && color[2] == 255)
#define MapIsDesert(color)   (color[0] == 255 && color[1] == 128 && color[2] == 0)
#define MapIsMountain(color)   (color[0] == 255 && color[1] == 0 && color[2] == 0)
#define MapIsTropical(color)   (color[0] == 128 && color[1] == 128 && color[2] == 255)
#define MapIsGrass(color)   (color[0] == 128 && color[1] == 255 && color[2] == 0)
#define MapIsWasted(color)   (color[0] == 128 && color[1] == 0 && color[2] == 128)
#define MapIsCold(color)   (color[0] == 0 && color[1] == 0 && color[2] == 255)
#define MapIsWestern(color)   (color[0] == 128 && color[1] == 255 && color[2] == 255)
#define MapIsEastern(color)   (color[0] == 255 && color[1] == 128 && color[2] == 0)
#define MapIsOriental(color)   (color[0] == 255 && color[1] == 0 && color[2] == 0)
#define MapIsAfrican(color)   (color[0] == 128 && color[1] == 128 && color[2] == 255)
#define MapIsUrban(color)   (color[0] == 128 && color[1] == 255 && color[2] == 255)
#define MapIsSuburban(color)   (color[0] == 255 && color[1] == 128 && color[2] == 0)
#define MapIsVillage(color)   (color[0] == 255 && color[1] == 0 && color[2] == 0)
#define MapIsRural(color)   (color[0] == 128 && color[1] == 128 && color[2] == 255)
#define MapIsNopopulation(color)   (color[0] == 128 && color[1] == 255 && color[2] == 0)
#define RASTER   2
#define HAPPINESS_SUBVERSION_LOSS   -0.15
#define HAPPINESS_ALIEN_MISSION_LOSS   -0.02
#define HAPPINESS_UFO_SALE_GAIN   0.02
#define HAPPINESS_UFO_SALE_LOSS   0.005
#define HAPPINESS_MAX_MISSION_IMPACT   0.07
#define MAX_ALIEN_GROUP_PER_CATEGORY   4
#define ALIENCATEGORY_MAX   8
#define BID_FACTOR   0.9
#define MAX_PROJECTILESONGEOSCAPE   32
#define HOURS_PER_ONE_INTEREST   22
 The amount of time (in hours) it takes for the interest to increase by 1. Is later affected by difficulty.
#define INITIAL_OVERALL_INTEREST   20
 Determines the interest interval for a single campaign.
#define FINAL_OVERALL_INTEREST   1000
#define DELAY_BETWEEN_MISSION_SPAWNING   4
 The length of a single mission spawn cycle.
#define MINIMUM_MISSIONS_PER_CYCLE   5
 The minimum and maximum amount of missions per mission cycle.
#define MAXIMUM_MISSIONS_PER_CYCLE   40
#define NON_OCCURRENCE_PROBABILITY   0.65
 The probability that any new alien mission will be a non-occurrence mission.
#define SALARY_AIRCRAFT_FACTOR   ccs.salaries[ccs.curCampaign->idx].aircraftFactor
#define SALARY_AIRCRAFT_DIVISOR   ccs.salaries[ccs.curCampaign->idx].aircraftDivisor
#define SALARY_BASE_UPKEEP   ccs.salaries[ccs.curCampaign->idx].baseUpkeep
#define SALARY_ADMIN_INITIAL   ccs.salaries[ccs.curCampaign->idx].adminInitial
#define SALARY_DEBT_INTEREST   ccs.salaries[ccs.curCampaign->idx].debtInterest

Typedefs

typedef enum mapType_s mapType_t
typedef enum
missionDetectionStatus_s 
missionDetectionStatus_t
 possible mission detection status
typedef enum interestCategory_s interestCategory_t
typedef enum missionStage_s missionStage_t
typedef struct alienTeamGroup_s alienTeamGroup_t
 alien team group definition.
typedef struct alienTeamCategory_s alienTeamCategory_t
 alien team category definition
typedef struct mission_s mission_t
 mission definition
typedef struct battleParam_s battleParam_t
typedef struct missionResults_s missionResults_t
 Structure with mission info needed to create results summary at menu won.
typedef struct campaign_s campaign_t
typedef struct salary_s salary_t
typedef enum mapAction_s mapAction_t
typedef struct ccs_s ccs_t
 client campaign structure
typedef struct dateLong_s dateLong_t
 Human readable time information in the game.

Enumerations

enum  mapType_s {
  MAPTYPE_TERRAIN, MAPTYPE_CULTURE, MAPTYPE_POPULATION, MAPTYPE_NATIONS,
  MAPTYPE_MAX
}
enum  missionDetectionStatus_s { MISDET_CANT_BE_DETECTED, MISDET_ALWAYS_DETECTED, MISDET_MAY_BE_DETECTED }
 

possible mission detection status

More...
enum  interestCategory_s {
  INTERESTCATEGORY_NONE, INTERESTCATEGORY_RECON, INTERESTCATEGORY_TERROR_ATTACK, INTERESTCATEGORY_BASE_ATTACK,
  INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_SUPPLY, INTERESTCATEGORY_XVI, INTERESTCATEGORY_INTERCEPT,
  INTERESTCATEGORY_HARVEST, INTERESTCATEGORY_ALIENBASE, INTERESTCATEGORY_RESCUE, INTERESTCATEGORY_MAX
}
enum  missionStage_s {
  STAGE_NOT_ACTIVE, STAGE_COME_FROM_ORBIT, STAGE_RECON_AIR, STAGE_MISSION_GOTO,
  STAGE_RECON_GROUND, STAGE_TERROR_MISSION, STAGE_BUILD_BASE, STAGE_BASE_ATTACK,
  STAGE_SUBVERT_GOV, STAGE_SUPPLY, STAGE_SPREAD_XVI, STAGE_INTERCEPT,
  STAGE_BASE_DISCOVERED, STAGE_HARVEST, STAGE_RETURN_TO_ORBIT, STAGE_OVER
}
enum  mapAction_s {
  MA_NONE, MA_NEWBASE, MA_NEWINSTALLATION, MA_INTERCEPT,
  MA_BASEATTACK, MA_UFORADAR
}

Functions

int CP_GetSalaryBaseEmployee (employeeType_t type)
int CP_GetSalaryAdminEmployee (employeeType_t type)
int CP_GetSalaryRankBonusEmployee (employeeType_t type)
int CP_GetSalaryAdministrative (void)
int CP_GetSalaryUpKeepBase (const base_t *base)
void CP_ParseCharacterData (struct dbuffer *msg)
 Parses the character data which was send by G_MatchSendResults using G_SendCharacterData.
qboolean CP_CheckNextStageDestination (aircraft_t *ufo)
 Check if a stage mission is over when UFO reached destination.
void CP_InitStartup (void)
void CL_ResetSinglePlayerData (void)
 Will clear most of the parsed singleplayer data.
void CL_DateConvert (const date_t *date, byte *day, byte *month, short *year)
 Converts a number of days into the number of the current month and the current day in this month.
void CL_DateConvertLong (const date_t *date, dateLong_t *dateLong)
 Converts a date from the engine in a (longer) human-readable format.
int CL_DateCreateDay (const short years, const byte months, const byte days)
 Converts a number of years+months+days into an "day" integer as used in date_t.
int CL_DateCreateSeconds (byte hours, byte minutes, byte seconds)
 Converts a number of hours+minutes+seconds into an "sec" integer as used in date_t.
void CL_CampaignRun (void)
 Called every frame when we are in geoscape view.
void CP_EndCampaign (qboolean won)
 Function to handle the campaign end.
void CL_UpdateCredits (int credits)
 Sets credits and update mn_credits cvar.
aircraft_tAIR_NewAircraft (base_t *base, const char *name)
 Places a new aircraft in the given base.
const char * CL_SecondConvert (int second)
 Converts a number of second into a char to display.
void CL_ReadSinglePlayerData (void)
 Read the data for singleplayer campaigns.
void CP_GetRandomPosOnGeoscape (vec2_t pos, qboolean noWater)
 Determines a random position on geoscape.
qboolean CP_GetRandomPosOnGeoscapeWithParameters (vec2_t pos, const linkedList_t *terrainTypes, const linkedList_t *cultureTypes, const linkedList_t *populationTypes, const linkedList_t *nations)
 Determines a random position on geoscape that fulfills certain criteria given via parameters.
campaign_tCL_GetCampaign (const char *name)
 Returns the campaign pointer from global campaign array.
void CL_GameAutoGo (mission_t *mission)
 Handles the auto mission for none storyrelated missions.
void CP_InitMissionResults (qboolean won)
void CP_CampaignInit (campaign_t *campaign, qboolean load)
 Called at new game and load game.
void CP_CampaignExit (void)
qboolean CP_OnGeoscape (void)
int CP_CountMission (void)
 Count the number of mission created.
int CP_CountMissionActive (void)
 Count the number of mission created and active.
int CP_CountMissionOnGeoscape (void)
 Count the number of mission active and displayed on geoscape.
void CP_UpdateMissionVisibleOnGeoscape (void)
 Update all mission visible on geoscape (in base radar range).
int CP_TerrorMissionAvailableUFOs (const mission_t const *mission, ufoType_t *ufoTypes)
 Fill an array with available UFOs for Terror attack mission type.
qboolean AIR_SendAircraftToMission (aircraft_t *aircraft, mission_t *mission)
 Sends the specified aircraft to specified mission.
void AIR_AircraftsNotifyMissionRemoved (const mission_t *mission)
 Notify that a mission has been removed.
void CP_UFOProceedMission (aircraft_t *ufocraft)
 Make UFO proceed with its mission when the fight with another aircraft is over (and UFO survived).
qboolean CP_IsRunning (void)
 Checks whether a campaign mode game is running.
mission_tCP_CreateNewMission (interestCategory_t category, qboolean beginNow)
 Create a new mission of given category.
qboolean CP_ChooseMap (mission_t *mission, const vec2_t pos)
 Choose a map for given mission.
void CP_StartSelectedMission (void)
 Starts a selected mission.
void CL_HandleNationData (qboolean won, mission_t *mis)
 Updates each nation's happiness and mission win/loss stats. Should be called at the completion or expiration of every mission. The nation where the mission took place will be most affected, surrounding nations will be less affected.
void CP_CheckLostCondition (void)
 Checks whether the player has lost the campaign.
void CL_UpdateCharacterStats (const base_t *base, const aircraft_t *aircraft)
 Update employees stats after mission.

Variables

memPool_tcp_campaignPool
ccs_t ccs
const int DETECTION_INTERVAL
 delay between actions that must be executed independently of time scale
cvar_tcp_campaign
cvar_tcp_missiontest
cvar_tcp_start_employees

Detailed Description

Header file for single player campaign control.

Definition in file cp_campaign.h.


Define Documentation

#define ALIENCATEGORY_MAX   8

Definition at line 105 of file cp_campaign.h.

Referenced by CL_ParseAlienTeam().

#define BID_FACTOR   0.9

Definition at line 106 of file cp_campaign.h.

Referenced by BS_InitMarket().

#define BYTES_NONE   0xFF
Todo:
rename this after merging with savegame breakage branch and also change the value to -1

Definition at line 42 of file cp_campaign.h.

Referenced by CP_LoadMissionsXML(), and TR_LoadXML().

#define DELAY_BETWEEN_MISSION_SPAWNING   4

The length of a single mission spawn cycle.

Definition at line 123 of file cp_campaign.h.

Referenced by CP_InitializeSpawningDelay(), and CP_SpawnNewMissions().

#define FINAL_OVERALL_INTEREST   1000

Definition at line 118 of file cp_campaign.h.

Referenced by CP_SpawnNewMissions().

#define HAPPINESS_ALIEN_MISSION_LOSS   -0.02

Definition at line 97 of file cp_campaign.h.

Referenced by NAT_UpdateHappinessForAllNations().

#define HAPPINESS_MAX_MISSION_IMPACT   0.07

Definition at line 100 of file cp_campaign.h.

Referenced by CL_HandleNationData().

#define HAPPINESS_SUBVERSION_LOSS   -0.15

Definition at line 96 of file cp_campaign.h.

Referenced by CP_BuildBaseGovernmentLeave().

#define HAPPINESS_UFO_SALE_GAIN   0.02

Definition at line 98 of file cp_campaign.h.

Referenced by UR_DialogStartSell_f().

#define HAPPINESS_UFO_SALE_LOSS   0.005

Definition at line 99 of file cp_campaign.h.

Referenced by UR_DialogStartSell_f().

#define HOURS_PER_ONE_INTEREST   22

The amount of time (in hours) it takes for the interest to increase by 1. Is later affected by difficulty.

Definition at line 112 of file cp_campaign.h.

Referenced by CP_IncreaseAlienInterest().

#define INITIAL_OVERALL_INTEREST   20

Determines the interest interval for a single campaign.

Definition at line 117 of file cp_campaign.h.

Referenced by CL_ResetAlienInterest(), and CP_SpawnNewMissions().

#define MapIsAfrican ( color   )     (color[0] == 128 && color[1] == 128 && color[2] == 255)

Definition at line 82 of file cp_campaign.h.

Referenced by MAP_GetCultureType().

#define MapIsArctic ( color   )     (color[0] == 128 && color[1] == 255 && color[2] == 255)

Definition at line 70 of file cp_campaign.h.

Referenced by MAP_GetTerrainType().

#define MapIsCold ( color   )     (color[0] == 0 && color[1] == 0 && color[2] == 255)

Definition at line 76 of file cp_campaign.h.

Referenced by MAP_GetTerrainType().

#define MapIsDesert ( color   )     (color[0] == 255 && color[1] == 128 && color[2] == 0)

Definition at line 71 of file cp_campaign.h.

Referenced by MAP_GetTerrainType().

#define MapIsEastern ( color   )     (color[0] == 255 && color[1] == 128 && color[2] == 0)

Definition at line 80 of file cp_campaign.h.

Referenced by MAP_GetCultureType().

#define MapIsGrass ( color   )     (color[0] == 128 && color[1] == 255 && color[2] == 0)

Definition at line 74 of file cp_campaign.h.

#define MapIsMountain ( color   )     (color[0] == 255 && color[1] == 0 && color[2] == 0)

Definition at line 72 of file cp_campaign.h.

Referenced by MAP_GetTerrainType().

#define MapIsNopopulation ( color   )     (color[0] == 128 && color[1] == 255 && color[2] == 0)

Definition at line 89 of file cp_campaign.h.

Referenced by MAP_GetCivilianNumberByPosition(), and MAP_GetPopulationType().

#define MapIsOriental ( color   )     (color[0] == 255 && color[1] == 0 && color[2] == 0)

Definition at line 81 of file cp_campaign.h.

Referenced by MAP_GetCultureType().

#define MapIsRural ( color   )     (color[0] == 128 && color[1] == 128 && color[2] == 255)

Definition at line 88 of file cp_campaign.h.

Referenced by MAP_GetCivilianNumberByPosition(), and MAP_GetPopulationType().

#define MapIsSuburban ( color   )     (color[0] == 255 && color[1] == 128 && color[2] == 0)

Definition at line 86 of file cp_campaign.h.

Referenced by MAP_GetCivilianNumberByPosition(), and MAP_GetPopulationType().

#define MapIsTropical ( color   )     (color[0] == 128 && color[1] == 128 && color[2] == 255)

Definition at line 73 of file cp_campaign.h.

Referenced by MAP_GetTerrainType().

#define MapIsUrban ( color   )     (color[0] == 128 && color[1] == 255 && color[2] == 255)

Definition at line 85 of file cp_campaign.h.

Referenced by MAP_GetCivilianNumberByPosition(), and MAP_GetPopulationType().

#define MapIsVillage ( color   )     (color[0] == 255 && color[1] == 0 && color[2] == 0)

Definition at line 87 of file cp_campaign.h.

Referenced by MAP_GetCivilianNumberByPosition(), and MAP_GetPopulationType().

#define MapIsWasted ( color   )     (color[0] == 128 && color[1] == 0 && color[2] == 128)

Definition at line 75 of file cp_campaign.h.

Referenced by MAP_GetTerrainType().

#define MapIsWater ( color   )     (color[0] == 0 && color[1] == 0 && color[2] == 64)
#define MapIsWestern ( color   )     (color[0] == 128 && color[1] == 255 && color[2] == 255)

Definition at line 79 of file cp_campaign.h.

Referenced by MAP_GetCultureType().

#define MAX_ALIEN_GROUP_PER_CATEGORY   4

Definition at line 103 of file cp_campaign.h.

Referenced by CL_ParseAlienTeam().

#define MAX_ASSEMBLIES   16

Definition at line 39 of file cp_campaign.h.

Referenced by CL_ParseComponents().

#define MAX_CAMPAIGNS   16
Todo:
remove this once the uiNode_t usage is cleaned up

Definition at line 37 of file cp_campaign.h.

Referenced by CL_ParseCampaign(), and CL_ParseCampaignEvents().

#define MAX_PROJECTILESONGEOSCAPE   32

Definition at line 107 of file cp_campaign.h.

Referenced by AIRFIGHT_AddProjectile(), and AIRFIGHT_LoadXML().

#define MAXIMUM_MISSIONS_PER_CYCLE   40

Definition at line 130 of file cp_campaign.h.

Referenced by CP_SpawnNewMissions().

#define MINIMUM_MISSIONS_PER_CYCLE   5

The minimum and maximum amount of missions per mission cycle.

Note:
some of the missions can be non-occurrence missions.

Definition at line 129 of file cp_campaign.h.

Referenced by CP_SpawnNewMissions().

#define NON_OCCURRENCE_PROBABILITY   0.65

The probability that any new alien mission will be a non-occurrence mission.

Definition at line 135 of file cp_campaign.h.

Referenced by CP_SpawnNewMissions().

#define RASTER   2

Definition at line 93 of file cp_campaign.h.

Referenced by CP_GetRandomPosOnGeoscapeWithParameters().

#define SALARY_ADMIN_INITIAL   ccs.salaries[ccs.curCampaign->idx].adminInitial

Definition at line 339 of file cp_campaign.h.

Referenced by CP_GetSalaryAdministrative().

#define SALARY_AIRCRAFT_DIVISOR   ccs.salaries[ccs.curCampaign->idx].aircraftDivisor

Definition at line 337 of file cp_campaign.h.

Referenced by CL_StatsUpdate_f(), and CP_NationHandleBudget().

#define SALARY_AIRCRAFT_FACTOR   ccs.salaries[ccs.curCampaign->idx].aircraftFactor

Definition at line 336 of file cp_campaign.h.

Referenced by CL_StatsUpdate_f(), and CP_NationHandleBudget().

#define SALARY_BASE_UPKEEP   ccs.salaries[ccs.curCampaign->idx].baseUpkeep

Definition at line 338 of file cp_campaign.h.

Referenced by CP_GetSalaryUpKeepBase().

#define SALARY_DEBT_INTEREST   ccs.salaries[ccs.curCampaign->idx].debtInterest

Definition at line 340 of file cp_campaign.h.

Referenced by CL_StatsUpdate_f(), and CP_NationHandleBudget().


Typedef Documentation

alien team category definition

Note:
This is the definition of all groups of aliens that can be used for a mission category
See also:
alienTeamGroup_s

alien team group definition.

Note:
This is the definition of one groups of aliens (several races) that can be used on the same map.
See also:
alienTeamCategory_s
typedef struct battleParam_s battleParam_t

battlescape parameters that were used

typedef struct campaign_s campaign_t

campaign definition

typedef struct ccs_s ccs_t

client campaign structure

See also:
csi_t
typedef struct dateLong_s dateLong_t

Human readable time information in the game.

Note:
Use this on runtime - please avoid for structs that get saved.
See also:
date_t For storage & network transmitting (engine only).
CL_DateConvertLong

possible campaign interest categories: type of missions that aliens can undertake

typedef enum mapAction_s mapAction_t

possible geoscape actions

typedef enum mapType_s mapType_t

possible map types

typedef struct mission_s mission_t

mission definition

Note:
A mission is different from a map: a mission is the whole set of actions aliens will carry. For example, coming with a UFO on earth, land, explore earth, and leave with UFO

possible mission detection status

Structure with mission info needed to create results summary at menu won.

possible stage for campaign missions (i.e. possible actions for UFO)

typedef struct salary_s salary_t

salary values for a campaign


Enumeration Type Documentation

possible campaign interest categories: type of missions that aliens can undertake

Enumerator:
INTERESTCATEGORY_NONE 

No mission

INTERESTCATEGORY_RECON 

Aerial recon mission or ground mission (UFO may or not land)

INTERESTCATEGORY_TERROR_ATTACK 

Terror attack

INTERESTCATEGORY_BASE_ATTACK 

Alien attack a phalanx base

INTERESTCATEGORY_BUILDING 

Alien build a new base or subverse governments

INTERESTCATEGORY_SUPPLY 

Alien supply one of their bases

INTERESTCATEGORY_XVI 

Alien try to spread XVI

INTERESTCATEGORY_INTERCEPT 

Alien try to intercept PHALANX aircraft

INTERESTCATEGORY_HARVEST 

Alien try to harvest

INTERESTCATEGORY_ALIENBASE 

Alien base already built on earth

Note:
This is not a mission alien can undertake, but the result of INTERESTCATEGORY_BUILDING
INTERESTCATEGORY_RESCUE 
INTERESTCATEGORY_MAX 

Definition at line 155 of file cp_campaign.h.

possible geoscape actions

Enumerator:
MA_NONE 
MA_NEWBASE 

build a new base

MA_NEWINSTALLATION 

build a new installation

MA_INTERCEPT 

intercept

MA_BASEATTACK 

base attacking

MA_UFORADAR 

ufos are in our radar

Definition at line 349 of file cp_campaign.h.

enum mapType_s

possible map types

Enumerator:
MAPTYPE_TERRAIN 
MAPTYPE_CULTURE 
MAPTYPE_POPULATION 
MAPTYPE_NATIONS 
MAPTYPE_MAX 

Definition at line 138 of file cp_campaign.h.

possible mission detection status

Enumerator:
MISDET_CANT_BE_DETECTED 

Mission can't be seen on geoscape

MISDET_ALWAYS_DETECTED 

Mission is seen on geoscape, whatever it's position

MISDET_MAY_BE_DETECTED 

Mission may be seen on geoscape, if a probability test is done

Definition at line 148 of file cp_campaign.h.

possible stage for campaign missions (i.e. possible actions for UFO)

Enumerator:
STAGE_NOT_ACTIVE 

mission did not begin yet

STAGE_COME_FROM_ORBIT 

UFO is arriving

STAGE_RECON_AIR 

Aerial Recon

STAGE_MISSION_GOTO 

Going to a new position

STAGE_RECON_GROUND 

Ground Recon

STAGE_TERROR_MISSION 

Terror mission

STAGE_BUILD_BASE 

Building a base

STAGE_BASE_ATTACK 

Base attack

STAGE_SUBVERT_GOV 

Subvert government

STAGE_SUPPLY 

Supply already existing base

STAGE_SPREAD_XVI 

Spreading XVI Virus

STAGE_INTERCEPT 

UFO attacks any encountered PHALANX aircraft or attack an installation

STAGE_BASE_DISCOVERED 

PHALANX discovered the base

STAGE_HARVEST 

Harvesting

STAGE_RETURN_TO_ORBIT 

UFO is going back to base

STAGE_OVER 

Mission is over

Definition at line 174 of file cp_campaign.h.


Function Documentation

void AIR_AircraftsNotifyMissionRemoved ( const mission_t *const   mission  ) 

Notify that a mission has been removed.

Parameters:
[in] mission Pointer to the mission that has been removed.

Definition at line 1810 of file cp_aircraft.c.

References AIR_AircraftReturnToBase(), AIR_GetNextFromBase(), AIR_MISSION, B_GetFoundedBaseByIDX(), ccs, aircraft_s::mission, ccs_s::numBases, and aircraft_s::status.

Referenced by CP_MissionRemoveFromGeoscape().

aircraft_t* AIR_NewAircraft ( base_t base,
const char *  name 
)
qboolean AIR_SendAircraftToMission ( aircraft_t aircraft,
mission_t mission 
)

Sends the specified aircraft to specified mission.

Parameters:
[in] aircraft Pointer to aircraft to send to mission.
[in] mission Pointer to given mission.
Returns:
qtrue if sending an aircraft to specified mission is possible.

Definition at line 1350 of file cp_aircraft.c.

References _, mission_s::active, AII_ReloadAircraftWeapons(), AIR_AircraftHasEnoughFuel(), AIR_GetTeamSize(), AIR_IsAircraftInBase(), AIR_MISSION, BASE_UNDER_ATTACK, base_s::baseStatus, ccs, aircraft_s::homebase, ccs_s::interceptAircraft, MAP_MapCalcLine(), aircraft_s::mission, MS_AddNewMessage(), MSG_STANDARD, aircraft_s::point, aircraft_s::pos, mission_s::pos, qfalse, qtrue, aircraft_s::route, aircraft_s::status, aircraft_s::time, UI_Popup(), and UI_PushWindow().

Referenced by CL_PopupAircraftClick_f(), and CL_PopupInterceptClick_f().

void CL_CampaignRun ( void   ) 
void CL_DateConvert ( const date_t date,
byte day,
byte month,
short *  year 
)

Converts a number of days into the number of the current month and the current day in this month.

Note:
The seconds from "date" are ignored here.
The function always starts calculation from Jan. and also catches new years.
Parameters:
[in] date Contains the number of days to be converted.
[out] day The day in the month above.
[out] month The month. [1-12]
[out] year The year.

< Return month in range [1-12]

Definition at line 494 of file cp_campaign.c.

References byte, date_s::day, DAYS_PER_YEAR, i, monthLength, and MONTHS_PER_YEAR.

Referenced by CL_DateConvertLong().

void CL_DateConvertLong ( const date_t date,
dateLong_t dateLong 
)

Converts a date from the engine in a (longer) human-readable format.

Parameters:
[in] date Contains the date to be converted.
[out] dateLong The converted date.

Todo:
Make this conversion a function as well (DateConvertSeconds?) See also CL_SecondConvert

Definition at line 571 of file cp_campaign.c.

References CL_DateConvert(), dateLong_s::day, dateLong_s::hour, dateLong_s::min, dateLong_s::month, dateLong_s::sec, date_s::sec, SECONDS_PER_HOUR, and dateLong_s::year.

Referenced by CL_CampaignRun(), CL_EventAddMail_f(), CL_UpdateTime(), MS_TimestampedText(), SAV_GameSave(), UP_OpenMail_f(), and UP_SetMailHeader().

int CL_DateCreateDay ( const short  years,
const byte  months,
const byte  days 
)

Converts a number of years+months+days into an "day" integer as used in date_t.

Parameters:
[in] years The number of years to sum up.
[in] months The number of months to sum up [1-12]
[in] days The number of days to sum up.
Returns:
The total number of days.

Definition at line 526 of file cp_campaign.c.

References DAYS_PER_YEAR, i, and monthLength.

int CL_DateCreateSeconds ( byte  hours,
byte  minutes,
byte  seconds 
)

Converts a number of hours+minutes+seconds into an "sec" integer as used in date_t.

Parameters:
[in] hours The number of hours to sum up.
[in] minutes The number of minutes to sum up.
[in] seconds The number of seconds to sum up.
Returns:
The total number of seconds.

Definition at line 550 of file cp_campaign.c.

References SECONDS_PER_HOUR.

void CL_GameAutoGo ( mission_t mission  ) 
campaign_t* CL_GetCampaign ( const char *  name  ) 

Returns the campaign pointer from global campaign array.

Parameters:
name Name of the campaign
Returns:
campaign_t pointer to campaign with name or NULL if not found

Definition at line 1576 of file cp_campaign.c.

References ccs_s::campaigns, Com_Printf(), campaign_s::id, and ccs_s::numCampaigns.

Referenced by CL_ParseResearchableCampaignStates(), CL_ParseResearchedCampaignItems(), CP_LoadXML(), and GAME_CP_Start_f().

void CL_HandleNationData ( qboolean  won,
mission_t mis 
)

Updates each nation's happiness and mission win/loss stats. Should be called at the completion or expiration of every mission. The nation where the mission took place will be most affected, surrounding nations will be less affected.

Todo:
Scoring should eventually be expanded to include such elements as infected humans and mission objectives other than xenocide.

Todo:
HACK: This should be handled properly, i.e. civilians should only factor into the scoring if the mission objective is actually to save civilians.
Todo:
The score for aliens is always negative or zero currently, but this should be dependent on the mission objective. In a mission that has a special objective, the amount of killed aliens should only serve to increase the score, not reduce the penalty.

Definition at line 396 of file cp_campaign.c.

References missionResults_s::aliensKilled, missionResults_s::aliensStunned, missionResults_s::aliensSurvived, ccs_s::battleParameters, ccs_s::campaignStats, missionResults_s::civiliansKilled, missionResults_s::civiliansKilledFriendlyFire, missionResults_s::civiliansSurvived, Com_DPrintf(), DEBUG_CLIENT, nationInfo_s::happiness, HAPPINESS_MAX_MISSION_IMPACT, i, nation_s::id, mission_s::id, ccs_s::missionResults, stats_s::missionsLost, stats_s::missionsWon, NAT_SetHappiness(), battleParam_s::nation, ccs_s::nations, ccs_s::numNations, and nation_s::stats.

Referenced by CL_GameAutoGo(), and CP_MissionEnd().

void CL_ReadSinglePlayerData ( void   ) 
void CL_ResetSinglePlayerData ( void   ) 

Will clear most of the parsed singleplayer data.

See also:
INV_InitInventory
CL_ReadSinglePlayerData

Todo:
subsystems should have Init/Shutdown functions like callbacks have and do these cleanups for themselves
Note:
Most of them has InitStartup but not working like the callback init/shutdown ones in pair
Todo:
this isn't working per per-base, as get next from base won't give every available craft (not every craft must be in a base). Maybe we should use the tags for the memory allocation for linked list (like we do for the game shared object already, too)

Definition at line 1597 of file cp_campaign.c.

References aircraft_s::acTeam, AIR_GetNextFromBase(), base_s::aircraft, ccs_s::alienBases, ccs_s::alienCategories, ccs_s::alienTeams, B_GetBaseByIDX(), CHRSH_IsTeamDefAlien(), ccs_s::cities, CL_FreeDynamicEventMail(), cls, Com_GetMapDefByIDX(), cp_messageStack, csi, E_ResetEmployees(), alienTeamCategory_s::equipment, LIST_Delete(), Mem_FreePool, ccs_s::missions, ccs_s::numAlienCategories, ccs_s::numAliensTD, ccs_s::numBases, client_static_s::numMDs, csi_s::numTeamDefs, RS_ResetTechs(), ccs_s::storedUFOs, td, csi_s::teamDef, and mapDef_s::timesAlreadyUsed.

Referenced by GAME_CP_InitStartup(), and GAME_CP_Shutdown().

const char* CL_SecondConvert ( int  second  ) 

Converts a number of second into a char to display.

Parameters:
[in] second Number of second.
Todo:
Abstract the code into an extra function (DateConvertSeconds?) see also CL_DateConvertLong

Definition at line 474 of file cp_campaign.c.

References Com_sprintf(), and SECONDS_PER_HOUR.

Referenced by CL_DisplayPopupInterceptMission(), and MAP_GetAircraftText().

void CL_UpdateCharacterStats ( const base_t base,
const aircraft_t aircraft 
)

Update employees stats after mission.

Parameters:
[in] base The base where the team lives.
[in] aircraft The aircraft used for the mission.
Note:
Soldier promotion is being done here.

Todo:
use chrScore_t to determine negative influence on soldier here, like killing too many civilians and teammates can lead to unhire and disband such soldier, or maybe rank degradation.

Definition at line 1250 of file cp_campaign.c.

References _, AIR_IsEmployeeInAircraft(), chrScoreGlobal_s::assignedMissions, employee_s::chr, cl, CL_GetRankByIdx(), CL_ShouldUpdateSoldierRank(), Com_DPrintf(), Com_sprintf(), cp_messageBuffer, DEBUG_CLIENT, E_GetNextFromBase(), EMPL_SOLDIER, aircraft_s::homebase, character_s::HP, MS_AddNewMessage(), MSG_PROMOTION, rank_s::name, character_s::name, base_s::name, ccs_s::numRanks, qfalse, chrScoreGlobal_s::rank, and character_s::score.

Referenced by CP_MissionEnd().

void CL_UpdateCredits ( int  credits  ) 
void CP_CampaignExit ( void   ) 
void CP_CampaignInit ( campaign_t campaign,
qboolean  load 
)

Called at new game and load game.

Parameters:
[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.

Todo:
this should be called in this function for new campaigns too but as researched items not yet set, it can't. It's called in B_SetUpFirstBase for new campaigns

Definition at line 1492 of file cp_campaign.c.

References ccs_s::angles, B_SelectBase(), BS_InitMarket(), ccs_s::center, CL_GameTimeStop(), CL_PopupInit(), CL_ResetAlienInterest(), CL_ScriptSanityCheck(), CL_UpdateCredits(), CL_UpdateTime(), Cmd_ExecuteString(), CP_AddCampaignCommands(), CP_InitializeSpawningDelay(), CP_InitializeXVIOverlay(), CP_InitOverlay(), CP_XVIInit(), campaign_s::credits, ccs_s::curCampaign, Cvar_SetValue(), campaign_s::date, ccs_s::date, date_s::day, GLOBE_ROTATE, MAP_Init(), PR_ProductionInit(), qtrue, RS_InitTree(), date_s::sec, SECONDS_PER_DAY, UI_InitStack(), ccs_s::XVIShowMap, YAW, and ccs_s::zoom.

Referenced by CP_LoadXML(), and GAME_CP_Start_f().

void CP_CheckLostCondition ( void   ) 

Checks whether the player has lost the campaign.

Todo:
Should we make the campaign lost when a player loses all his bases? until he has set up a base again, the aliens might have invaded the whole world ;) - i mean, removing the credits check here.

Definition at line 324 of file cp_campaign.c.

References _, campaign_s::basecost, CP_EndCampaign(), CP_GetAverageXVIRate(), ccs_s::credits, ccs_s::curCampaign, Cvar_SetValue(), nationInfo_s::happiness, cvar_s::integer, campaign_s::maxAllowedXVIRateUntilLost, campaign_s::minhappiness, ccs_s::nations, campaign_s::negativeCreditsUntilLost, ccs_s::numBases, ccs_s::numNations, qfalse, qtrue, nation_s::stats, TEXT_STANDARD, and UI_RegisterText().

Referenced by CL_CampaignRun(), CL_GameAutoGo(), and CP_MissionEnd().

qboolean CP_CheckNextStageDestination ( aircraft_t ufocraft  ) 

Check if a stage mission is over when UFO reached destination.

Parameters:
[in] ufocraft Pointer to the ufo that reached destination.
See also:
UFO_CampaignRunUFOs
Returns:
True if UFO is removed from global array (and therefore pointer ufocraft can't be used anymore).

Definition at line 1288 of file cp_missions.c.

References CP_MissionStageEnd(), aircraft_s::mission, qfalse, qtrue, mission_s::stage, STAGE_COME_FROM_ORBIT, STAGE_MISSION_GOTO, and STAGE_RETURN_TO_ORBIT.

Referenced by UFO_CampaignRunUFOs().

qboolean CP_ChooseMap ( mission_t mission,
const vec2_t  pos 
)

Choose a map for given mission.

Parameters:
[in,out] mission Pointer to the mission where a new map should be added
[in] pos position of the mission (NULL if the position will be chosen afterwards)
[in] ufoCrashed true if the ufo is crashed
Returns:
qfalse if could not set mission

< Total number of maps fulfilling mission conditions.

< Number of maps fulfilling mission conditions and that appeared less often during game.

Definition at line 201 of file cp_campaign.c.

References mission_s::category, cls, Com_DPrintf(), Com_Error(), Com_GetMapDefByIDX(), Com_GetMapDefinitionByID(), Com_Printf(), Com_UFOTypeToShortName(), CP_MapIsSelectable(), mission_s::crashed, DEBUG_CLIENT, ERR_DROP, i, mapDef_s::id, cvar_s::integer, INTERESTCATEGORY_RESCUE, MAP_GetColor(), mission_s::mapDef, MapIsWater, MAPTYPE_TERRAIN, client_static_s::numMDs, qfalse, qtrue, mapDef_s::timesAlreadyUsed, mission_s::ufo, and aircraft_s::ufotype.

Referenced by CP_HarvestMissionGo(), CP_ReconMissionGroundGo(), CP_SpawnCrashSiteMission(), CP_SpawnRescueMission(), and CP_TerrorMissionGo().

int CP_CountMission ( void   ) 

Count the number of mission created.

Returns:
Number of created mission
See also:
CP_CountMissionActive
CP_CountMissionOnGeoscape

Definition at line 562 of file cp_missions.c.

References ccs, Com_Printf(), linkedList_s::data, ccs_s::missions, linkedList_s::next, mission_s::stage, and STAGE_OVER.

Referenced by CP_MissionRemove().

int CP_CountMissionActive ( void   ) 

Count the number of mission created and active.

Returns:
Number of active mission
See also:
CP_CountMission
CP_CountMissionOnGeoscape

Definition at line 593 of file cp_missions.c.

References ccs, Com_DPrintf(), linkedList_s::data, DEBUG_CLIENT, ccs_s::missions, linkedList_s::next, mission_s::stage, STAGE_NOT_ACTIVE, and STAGE_OVER.

int CP_CountMissionOnGeoscape ( void   ) 

Count the number of mission active and displayed on geoscape.

Returns:
Number of active mission visible on geoscape
See also:
CP_CountMission
CP_CountMissionActive

Definition at line 618 of file cp_missions.c.

References ccs, linkedList_s::data, ccs_s::missions, linkedList_s::next, mission_s::onGeoscape, mission_s::stage, STAGE_NOT_ACTIVE, and STAGE_OVER.

Referenced by MAP_GetGeoscapeAngle().

mission_t* CP_CreateNewMission ( interestCategory_t  category,
qboolean  beginNow 
)
void CP_EndCampaign ( qboolean  won  ) 

Function to handle the campaign end.

Definition at line 309 of file cp_campaign.c.

References Cmd_ExecuteString(), Com_Drop(), qtrue, and UI_InitStack().

Referenced by CP_CheckLostCondition(), and CP_EndGame_f().

void CP_GetRandomPosOnGeoscape ( vec2_t  pos,
qboolean  noWater 
)

Determines a random position on geoscape.

Parameters:
[out] pos The position that will be overwritten. pos[0] is within -180, +180. pos[1] within -90, +90.
[in] noWater True if the position should not be on water
See also:
CP_GetRandomPosOnGeoscapeWithParameters
Note:
The random positions should be roughly uniform thanks to the non-uniform distribution used.
This function always returns a value.

Definition at line 1692 of file cp_campaign.c.

References Com_DPrintf(), DEBUG_CLIENT, f, frand(), MAP_GetColor(), MapIsWater, MAPTYPE_TERRAIN, and todeg.

Referenced by AB_SetAlienBasePosition(), UFO_SetRandomDest(), and UFO_SetRandomPos().

qboolean CP_GetRandomPosOnGeoscapeWithParameters ( vec2_t  pos,
const linkedList_t terrainTypes,
const linkedList_t cultureTypes,
const linkedList_t populationTypes,
const linkedList_t nations 
)

Determines a random position on geoscape that fulfills certain criteria given via parameters.

Parameters:
[out] pos The position that will be overwritten with the random point fulfilling the criteria. pos[0] is within -180, +180. pos[1] within -90, +90.
[in] terrainTypes A linkedList_t containing a list of strings determining the acceptable terrain types (e.g. "grass") May be NULL.
[in] cultureTypes A linkedList_t containing a list of strings determining the acceptable culture types (e.g. "western") May be NULL.
[in] populationTypes A linkedList_t containing a list of strings determining the acceptable population types (e.g. "suburban") May be NULL.
[in] nations A linkedList_t containing a list of strings determining the acceptable nations (e.g. "asia"). May be NULL
Returns:
true if a location was found, otherwise false
Note:
There may be no position fitting the parameters. The higher RASTER, the lower the probability to find a position.
See also:
LIST_AddString
LIST_Delete
Note:
When all parameters are NULL, the algorithm assumes that it does not need to include "water" terrains when determining a random position
You should rather use CP_GetRandomPosOnGeoscape if there are no parameters (except water) to choose a random position

Todo:
  • cache the counted hits
Todo:
add EQUAL_EPSILON here?

Definition at line 1716 of file cp_campaign.c.

References Com_DPrintf(), DEBUG_CLIENT, frand(), MAP_PositionFitsTCPNTypes(), qfalse, qtrue, RASTER, todeg, and Vector2Set.

Referenced by CP_HarvestMissionGo(), and CP_ReconMissionGroundGo().

int CP_GetSalaryAdminEmployee ( employeeType_t  type  ) 
int CP_GetSalaryAdministrative ( void   ) 
int CP_GetSalaryBaseEmployee ( employeeType_t  type  ) 
int CP_GetSalaryRankBonusEmployee ( employeeType_t  type  ) 
int CP_GetSalaryUpKeepBase ( const base_t base  ) 
void CP_InitMissionResults ( qboolean  won  ) 
void CP_InitStartup ( void   ) 
qboolean CP_IsRunning ( void   ) 

Checks whether a campaign mode game is running.

Definition at line 146 of file cp_campaign.c.

References ccs_s::curCampaign.

Referenced by CL_CampaignRun(), CP_CampaignExit(), SAV_GameContinue_f(), SAV_GameQuickSave_f(), SAV_GameReadGameComments_f(), SAV_GameSave(), SAV_GameSave_f(), and UI_MapNodeDraw().

qboolean CP_OnGeoscape ( void   ) 

Definition at line 604 of file cp_campaign.c.

References UI_GetActiveWindowName().

Referenced by CL_AllowTimeScale(), CL_CampaignRun(), and CL_GameTimeStop().

void CP_ParseCharacterData ( struct dbuffer msg  ) 

Parses the character data which was send by G_MatchSendResults using G_SendCharacterData.

Parameters:
[in] msg The network buffer message. If this is NULL the character is updated, if this is not NULL the data is stored in a temp buffer because the player can choose to retry the mission and we have to catch this situation to not update the character data in this case.
See also:
G_SendCharacterData
GAME_SendCurrentTeamSpawningInfo
E_Save

Scores

See also:
inv_shared.h:chrScoreGlobal_t

Definition at line 82 of file cp_campaign.c.

References chrScoreGlobal_s::assignedMissions, byte, updateCharacter_t::chrscore, Com_Error(), Com_Printf(), linkedList_s::data, E_GetEmployeeFromChrUCN(), ERR_DROP, chrScoreGlobal_s::experience, updateCharacter_t::HP, character_s::HP, i, KILLED_NUM_TYPES, chrScoreGlobal_s::kills, LIST_Add(), LIST_Delete(), character_s::maxHP, updateCharacter_t::morale, character_s::morale, NET_ReadByte(), NET_ReadLong(), NET_ReadShort(), linkedList_s::next, character_s::score, SKILL_NUM_TYPES, chrScoreGlobal_s::skills, updateCharacter_t::STUN, character_s::STUN, chrScoreGlobal_s::stuns, and updateCharacter_t::ucn.

Referenced by CP_MissionEnd(), and GAME_CP_Results().

void CP_StartSelectedMission ( void   ) 
int CP_TerrorMissionAvailableUFOs ( const mission_t const *  mission,
ufoType_t ufoTypes 
)

Fill an array with available UFOs for Terror attack mission type.

Parameters:
[in] mission Pointer to the mission we are currently creating (may be NULL if we want to know what UFO types will be needed during the whole game).
[out] ufoTypes Array of ufoType_t that may be used for this mission.
Note:
Terror attack mission -- Stage 0
Returns:
number of elements written in ufoTypes

<

Todo:
Add Battleship when maps will be available

Definition at line 179 of file cp_mission_terror.c.

References UFO_BOMBER, UFO_CORRUPTER, UFO_HARVESTER, and UFO_ShouldAppearOnGeoscape().

Referenced by CP_MissionChooseUFO(), and NAT_ScriptSanityCheck().

void CP_UFOProceedMission ( aircraft_t ufo  ) 
void CP_UpdateMissionVisibleOnGeoscape ( void   ) 

Update all mission visible on geoscape (in base radar range).

Note:
you can't see a mission with aircraft radar.
See also:
CP_CheckMissionAddToGeoscape

Definition at line 859 of file cp_missions.c.

References ccs, CP_CheckMissionVisibleOnGeoscape(), CP_MissionAddToGeoscape(), CP_MissionRemoveFromGeoscape(), linkedList_s::data, MISDET_ALWAYS_DETECTED, MISDET_CANT_BE_DETECTED, ccs_s::missions, linkedList_s::next, mission_s::onGeoscape, and qfalse.

Referenced by RADAR_UpdateBaseRadarCoverage_f(), and RADAR_UpdateInstallationRadarCoverage().


Variable Documentation

Definition at line 59 of file cp_campaign.c.

Referenced by AB_BaseSearchedByNations(), AB_BuildBase(), AB_DestroyBase(), AB_GetAlienBaseNumber(), AB_GetNext(), AB_LoadXML(), AC_AlienClick(), AC_InitCallbacks(), AC_KillAll(), AC_KillOne_f(), AC_LoadXML(), AC_SaveXML(), AC_UpdateMenu(), AII_CarriedItems(), AII_CollectingItems(), AIM_AircraftEquipMenuClick_f(), AIR_Add(), AIR_AircraftGetFromIDX(), AIR_AircraftsNotifyMissionRemoved(), AIR_Delete(), AIR_GetAircraftSilent(), AIR_IsEmployeeInAircraft(), AIR_LoadAircraftXML(), AIR_LoadXML(), AIR_Move(), AIR_NewAircraft(), AIR_ParseAircraft(), AIR_PostLoadInitMissions(), AIR_RemoveEmployee(), AIR_SaveAircraftXML(), AIR_ScriptSanityCheck(), AIR_SendAircraftPursuingUFO(), AIR_SendAircraftToMission(), AIRFIGHT_AddProjectile(), AIRFIGHT_BaseShoot(), AIRFIGHT_CampaignRunProjectiles(), AIRFIGHT_ExecuteActions(), AIRFIGHT_InstallationShoot(), AIRFIGHT_LoadXML(), AIRFIGHT_RemoveProjectile(), AIRFIGHT_RemoveProjectileAimingAircraft(), AIRFIGHT_SaveXML(), AIRFIGHT_UpdateProjectileForDestroyedAircraft(), AL_AddAliens(), AL_CountAll(), AL_CountInBase(), AL_FillInContainment(), AL_RemoveAliens(), B_BaseInit_f(), B_BaseResetStatus(), B_BuildBase_f(), B_BuildFromTemplate(), B_BuildingClick_f(), B_BuildingDestroy(), B_BuildingInit(), B_BuildingOpenAfterClick(), B_CheckBuildingConstruction(), B_CheckBuildingStatusForMenu_f(), B_CheckCredits(), B_ConstructBuilding(), B_Destroy(), B_GetBaseByIDX(), B_GetBaseTemplate(), B_GetBuildingTemplate(), B_GetFoundedBaseCount(), B_GetInstallationLimit(), B_GetNextBuilding(), B_InitCallbacks(), B_InitialEquipment(), B_LoadXML(), B_MarkBuildingDestroy(), B_MoveAircraftOnGeoscapeToOtherBases(), B_NextBase_f(), B_ParseBaseTemplate(), B_ParseBuildings(), B_PrevBase_f(), B_ResetBuildingCurrent(), B_SaveXML(), B_ScriptSanityCheck(), B_SelectBase(), B_SellOrAddItems(), B_SetBaseTitle_f(), B_SetBuildingByClick(), B_SetUpBase(), B_SetUpFirstBase(), B_UpdateBaseCapacities(), B_UpdateBaseCount(), B_UpdateBaseData(), BaseSummary_Init(), BaseSummary_SelectBase_f(), BDEF_AddBattery_f(), BDEF_AutoSelectTarget(), BDEF_AutoTarget(), BDEF_RemoveBattery_f(), BS_AddAircraftToMarket(), BS_AddItemToMarket(), BS_Autosell_f(), BS_BuyAircraft_f(), BS_BuyItem_f(), BS_BuyType(), BS_CheckAndDoBuyItem(), BS_GetAircraftBuyingPrice(), BS_GetAircraftOnMarket(), BS_GetAircraftSellingPrice(), BS_GetItemBuyingPrice(), BS_GetItemSellingPrice(), BS_GetMinMaxValueByItemID(), BS_InitMarket(), BS_LoadXML(), BS_MarketScroll_f(), BS_ProcessCraftItemSale(), BS_RemoveAircraftFromMarket(), BS_RemoveItemFromMarket(), BS_SaveXML(), BS_SellAircraft_f(), BS_SellItem_f(), CL_AllowTimeScale(), CL_CampaignRunMarket(), CL_ChangeIndividualInterest(), CL_CleanTempInventory(), CL_DisplayPopupAircraft(), CL_DisplayPopupInterceptMission(), CL_DisplayPopupInterceptUFO(), CL_EventAddMail_f(), CL_GameTimeFast(), CL_GameTimeSlow(), CL_GameTimeStop(), CL_GetComponentsByID(), CL_GetComponentsByItem(), CL_GetEventMail(), CL_GetRankByIdx(), CL_GetRankIdx(), CL_IsTimeStopped(), CL_NationDrawStats(), CL_NationSelect_f(), CL_NationsMaxFunding(), CL_NationStatsUpdate_f(), CL_ParseAlienTeam(), CL_ParseCampaign(), CL_ParseCampaignEvents(), CL_ParseCities(), CL_ParseComponents(), CL_ParseEventMails(), CL_ParseNations(), CL_ParseRanks(), CL_ParseResearchableCampaignStates(), CL_ParseResearchedCampaignItems(), CL_ParseSalary(), CL_PopupChangeHomebase_f(), CL_PopupInterceptBaseClick_f(), CL_ReadSinglePlayerData(), CL_ResetAlienInterest(), CL_SetGameTime(), CL_StatsUpdate_f(), CL_UpdateTime(), CP_BaseAttackChooseBase(), CP_BaseAttackGoToBase(), CP_BaseAttackMissionDestroyBase(), CP_BaseAttackMissionIsFailure(), CP_BaseAttackMissionLeave(), CP_BaseAttackStartMission(), CP_BuildBaseSetUpBase(), CP_BuildBaseSubvertGovernment(), CP_ChangeNationHappiness_f(), CP_CheckBaseAttacks_f(), CP_CheckCampaignEvents(), CP_CheckNewMissionDetectedOnGeoscape(), CP_ChooseCity(), CP_ChooseNation(), CP_CountMission(), CP_CountMissionActive(), CP_CountMissionOnGeoscape(), CP_CreateAlienTeam(), CP_CreateBattleParameters(), CP_CreateCivilianTeam(), CP_CreateNewMission(), CP_GetAverageXVIRate(), CP_GetEventsByID(), CP_GetMissionByIDSilent(), CP_HarvestMissionGo(), CP_HarvestMissionStart(), CP_IncreaseAlienInterest(), CP_InitializeSpawningDelay(), CP_InterceptAircraftMissionSet(), CP_InterceptAttackInstallation(), CP_InterceptMissionSet(), CP_InterceptNextStage(), CP_IsAlienEquipmentSelectable(), CP_LoadInterestsXML(), CP_LoadMissionsXML(), CP_MissionBegin(), CP_MissionEnd(), CP_MissionNotifyBaseDestroyed(), CP_MissionNotifyInstallationDestroyed(), CP_MissionRemove(), CP_MissionStageEnd(), CP_NationBackupMonthlyData(), CP_NationHandleBudget(), CP_NationStatsClick_f(), CP_ReconMissionAerial(), CP_ReconMissionGround(), CP_ReconMissionGroundGo(), CP_ReconMissionLeave(), CP_ReduceXVIEverywhere(), CP_SaveInterestsXML(), CP_SaveMissionsXML(), CP_SelectNewMissionType(), CP_SetAlienEquipmentByInterest(), CP_SetAlienTeamByInterest(), CP_SetMissionName(), CP_SetMissionVars(), CP_SpawnCrashSiteMission(), CP_SpawnNewMissions(), CP_SpawnRescueMission(), CP_SpreadXVI(), CP_StartMissionMap(), CP_StartXVISpreading_f(), CP_SupplySetStayAtBase(), CP_TerrorInCity(), CP_TerrorMissionGo(), CP_TerrorMissionStart(), CP_UFORemoveFromGeoscape(), CP_UpdateMissionVisibleOnGeoscape(), CP_UpdateNationXVIInfection(), CP_UpdateXVIMapButton(), CP_XVIMissionStart(), E_CreateEmployeeAtIndex(), E_DeleteAllEmployees(), E_DeleteEmployee(), E_DeleteEmployeesExceedingCapacity(), E_GetNext(), E_GetUnhiredEmployee(), E_HireForBuilding(), E_InitialEmployees(), E_LoadXML(), E_RandomNation(), E_RefreshUnhiredEmployeeGlobalList(), E_ResetEmployees(), GAME_CP_CampaignListClick_f(), GAME_CP_GetCampaigns_f(), GAME_CP_GetEquipmentDefinition(), GAME_CP_GetTeam(), GAME_CP_MissionAutoCheck_f(), GAME_CP_MissionAutoGo_f(), GAME_CP_Results(), GAME_CP_Results_f(), GAME_CP_Spawn(), GAME_CP_TeamIsKnown(), INS_BuildInstallation_f(), INS_DestroyInstallation(), INS_GetFirstUFOYard(), INS_GetFirstUnfoundedInstallation(), INS_GetInstallationByIDX(), INS_GetInstallationTemplateFromInstallationID(), INS_InitCallbacks(), INS_InitStartup(), INS_LoadXML(), INS_ParseInstallations(), INS_SaveXML(), INS_SelectInstallation(), INS_SelectInstallation_f(), INS_SetInstallationTitle(), INS_SetUpInstallation(), INS_UpdateInstallationData(), MAP3D_ScreenToMap(), MAP3D_SmoothRotate(), MAP_3DMapToScreen(), MAP_Draw3DMarkerIfVisible(), MAP_DrawAircraftHealthBar(), MAP_DrawMap(), MAP_DrawMapMarkers(), MAP_DrawMapOneMission(), MAP_DrawMapOnePhalanxAircraft(), MAP_GetGeoscapeAngle(), MAP_GetMissionByIDX(), MAP_GetNation(), MAP_GetUFOAngle(), MAP_Init(), MAP_IsNight(), MAP_MapClick(), MAP_MapDrawLine(), MAP_MapToScreen(), MAP_MultiSelectExecuteAction_f(), MAP_NotifyAircraftRemoved(), MAP_NotifyMissionRemoved(), MAP_NotifyUFODisappear(), MAP_NotifyUFORemoved(), MAP_ResetAction(), MAP_ScreenToMap(), MAP_Scroll_f(), MAP_SelectAircraft(), MAP_SelectMission(), MAP_SelectUFO(), MAP_SetOverlay(), MAP_SmoothTranslate(), MAP_StartCenter(), MAP_UpdateGeoscapeDock(), MAP_Zoom_f(), MS_AddNewMessageSound(), MSO_InitList(), MSO_ParseCategories(), MSO_Toggle_f(), MSO_UpdateVisibleButtons(), NAT_GetNationByID(), NAT_GetNationByIDX(), NAT_SaveXML(), NAT_ScriptSanityCheck(), NAT_SetHappiness(), NAT_UpdateHappinessForAllNations(), PR_DecreaseProduction(), PR_EmptyQueue(), PR_LoadXML(), PR_ProductionBase(), PR_ProductionDown_f(), PR_ProductionFrame(), PR_ProductionIncrease_f(), PR_ProductionListClick_f(), PR_ProductionListRightClick_f(), PR_ProductionQueueBase(), PR_ProductionRollBottom_f(), PR_ProductionRun(), PR_ProductionStop_f(), PR_ProductionType_f(), PR_ProductionUp_f(), PR_QueueNext(), PR_SaveXML(), PR_UpdateProductionList(), RADAR_SetRadarAfterLoading(), RS_CountScientistsInBase(), RS_GetTechByIDX(), RS_GetTechForItem(), RS_GetTechWithMostScientists(), RS_InitGUIData(), RS_InitTree(), RS_IsResearched_idx(), RS_IsValidTechIndex(), RS_MarkCollected(), RS_MarkOneResearchable(), RS_MarkResearchable(), RS_MarkStoryLineEventResearched(), RS_ParseTechnologies(), RS_RequiredLinksAssign(), RS_ResearchFinish(), RS_ResearchRun(), RS_SaveXML(), RS_ScriptSanityCheck(), SAV_GameSave(), STATS_LoadXML(), STATS_SaveXML(), TR_CargoList(), TR_CargoListSelect_f(), TR_CheckAircraft(), TR_CheckAlien(), TR_CheckEmployee(), TR_EmptyTransferCargo(), TR_GetNext(), TR_Init_f(), TR_InitBaseList(), TR_LoadXML(), TR_NotifyAircraftRemoved(), TR_SaveXML(), TR_TransferAlienAfterMissionStart(), TR_TransferAliensFromMission_f(), TR_TransferCheck(), TR_TransferListClear_f(), TR_TransferListSelect_f(), TR_TransferSelect(), TR_TransferStart(), UFO_AddToGeoscape(), UFO_CampaignCheckEvents(), UFO_CampaignRunUFOs(), UFO_DetectNewUFO(), UFO_GetByIDX(), UFO_GetByType(), UFO_MissionResultToString(), UFO_NotifyPhalanxAircraftRemoved(), UFO_RemoveFromGeoscape(), UFO_ShouldAppearOnGeoscape(), UFO_UpdateAlienInterestForAllBasesAndInstallations(), UI_BaseMapNodeClick(), UI_BaseMapNodeDraw(), UI_MapNodeCapturedMouseMove(), UI_MapNodeZoom(), UP_Click_f(), UP_GenerateSummary(), UP_GetUnreadMails(), UP_ParseChapters(), UP_SetAllMailsRead_f(), UP_SetMailHeader(), UR_DialogFillNations(), UR_DialogGetCurrentNationIndex(), UR_DialogInit_f(), UR_DialogInitSell_f(), UR_DialogInitStore_f(), UR_DialogSelectSellNation_f(), UR_DialogStartSell_f(), UR_DialogStartStore_f(), UR_ProcessActive(), UR_SortNations(), US_GetNext(), US_LoadXML(), US_RemoveStoredUFO(), US_StoredUFOCount(), and US_StoreUFO().

Definition at line 62 of file cp_campaign.c.

Referenced by CL_GameTimeStop().

Definition at line 61 of file cp_campaign.c.

Referenced by GAME_CP_InitStartup().

const int DETECTION_INTERVAL

Generated by  doxygen 1.6.2