UFO: Alien Invasion
Loading...
Searching...
No Matches
cp_alien_interest.cpp File Reference

Alien interest values influence the campaign actions. More...

#include "../../cl_shared.h"
#include "cp_campaign.h"
#include "cp_alien_interest.h"
#include "save/save_interest.h"
Include dependency graph for cp_alien_interest.cpp:

Go to the source code of this file.

Functions

void INT_ResetAlienInterest (void)
 Initialize alien interest values and mission cycle.
void INT_ChangeIndividualInterest (float interestFactor, interestCategory_t category)
 Change individual interest value.
void INT_IncreaseAlienInterest (const campaign_t *campaign)
 Increase alien overall interest.
bool INT_SaveXML (xmlNode_t *parent)
 Save callback for savegames in XML Format.
bool INT_LoadXML (xmlNode_t *parent)
 Load callback for savegames in XML Format.
void INT_InitStartup (void)
 Init actions for alien interests-subsystem.
void INT_Shutdown (void)
 Closing actions for alien interests-subsystem.

Variables

static const cmdList_t debugInterestCmds []

Detailed Description

Alien interest values influence the campaign actions.

Definition in file cp_alien_interest.cpp.

Function Documentation

◆ INT_ChangeIndividualInterest()

◆ INT_IncreaseAlienInterest()

void INT_IncreaseAlienInterest ( const campaign_t * campaign)

Increase alien overall interest.

See also
CP_CampaignRun
Note
hourly called

Definition at line 92 of file cp_alien_interest.cpp.

References ccs, campaign_t::difficulty, and HOURS_PER_ONE_INTEREST.

Referenced by CP_CampaignRun().

◆ INT_InitStartup()

void INT_InitStartup ( void )

Init actions for alien interests-subsystem.

Definition at line 235 of file cp_alien_interest.cpp.

References cgi, and debugInterestCmds.

Referenced by CP_InitStartup().

◆ INT_LoadXML()

bool INT_LoadXML ( xmlNode_t * parent)

Load callback for savegames in XML Format.

Parameters
[in]parentXML Node structure, where we get the information from

Definition at line 130 of file cp_alien_interest.cpp.

References ccs, cgi, SAVE_INTERESTS, SAVE_INTERESTS_ID, SAVE_INTERESTS_INTEREST, SAVE_INTERESTS_LASTINCREASEDELAY, SAVE_INTERESTS_LASTMISSIONSPAWNEDDELAY, SAVE_INTERESTS_OVERALL, SAVE_INTERESTS_VAL, saveInterestConstants, and xmlNode_t.

Referenced by SAV_Init().

◆ INT_ResetAlienInterest()

void INT_ResetAlienInterest ( void )

Initialize alien interest values and mission cycle.

Note
Should be used when a new single player campaign starts
See also
CP_CampaignInit

Definition at line 36 of file cp_alien_interest.cpp.

References ccs, i, INTERESTCATEGORY_MAX, and INTERESTCATEGORY_RECON.

Referenced by CP_CampaignInit(), and TEST_F().

◆ INT_SaveXML()

bool INT_SaveXML ( xmlNode_t * parent)

Save callback for savegames in XML Format.

Parameters
[out]parentXML Node structure, where we write the information to

Definition at line 109 of file cp_alien_interest.cpp.

References ccs, cgi, i, INTERESTCATEGORY_MAX, SAVE_INTERESTCAT_NAMESPACE, SAVE_INTERESTS, SAVE_INTERESTS_ID, SAVE_INTERESTS_INTEREST, SAVE_INTERESTS_LASTINCREASEDELAY, SAVE_INTERESTS_LASTMISSIONSPAWNEDDELAY, SAVE_INTERESTS_OVERALL, SAVE_INTERESTS_VAL, saveInterestConstants, and xmlNode_t.

Referenced by SAV_Init().

◆ INT_Shutdown()

void INT_Shutdown ( void )

Closing actions for alien interests-subsystem.

Definition at line 243 of file cp_alien_interest.cpp.

References cgi, and debugInterestCmds.

Referenced by CP_Shutdown().

Variable Documentation

◆ debugInterestCmds

const cmdList_t debugInterestCmds[]
static
Initial value:
= {
{nullptr, nullptr, nullptr}
}

Definition at line 225 of file cp_alien_interest.cpp.

Referenced by INT_InitStartup(), and INT_Shutdown().