Campaign statistics. More...
#include "../cl_shared.h"
#include "../ui/ui_data.h"
#include "cp_campaign.h"
#include "cp_xvi.h"
#include "save/save_statistics.h"
Go to the source code of this file.
Defines | |
#define | MAX_STATS_BUFFER 2048 |
Functions | |
void | CL_StatsUpdate_f (void) |
Shows the current stats from stats_t stats. | |
qboolean | STATS_SaveXML (mxml_node_t *parent) |
Save callback for savegames in XML Format. | |
qboolean | STATS_LoadXML (mxml_node_t *parent) |
Load callback for savegames in XML Format. | |
void | STATS_InitStartup (void) |
Campaign statistics.
Definition in file cp_statistics.c.
#define MAX_STATS_BUFFER 2048 |
Definition at line 32 of file cp_statistics.c.
Referenced by CL_StatsUpdate_f().
void CL_StatsUpdate_f | ( | void | ) |
Shows the current stats from stats_t stats.
Definition at line 36 of file cp_statistics.c.
References _, AIR_GetNextFromBase(), B_GetFoundedBaseByIDX(), stats_s::basesAttacked, stats_s::basesBuilt, ccs_s::campaignStats, ccs, employee_s::chr, Com_sprintf(), CP_GetAverageXVIRate(), CP_GetSalaryAdministrative(), CP_GetSalaryBaseEmployee(), CP_GetSalaryRankBonusEmployee(), CP_GetSalaryUpKeepBase(), CP_IsXVIResearched(), ccs_s::credits, ccs_s::curCampaign, E_GetEmployeeString(), E_GetNextHired(), i, ccs_s::installations, int(), MAX_BASES, MAX_EMPL, MAX_STATS_BUFFER, campaign_s::maxAllowedXVIRateUntilLost, stats_s::missionsLost, stats_s::missionsWon, base_s::name, nation_s::name, installation_s::name, NAT_GetFunding(), NAT_GetHappinessString(), ccs_s::nations, campaign_s::negativeCreditsUntilLost, ccs_s::numBases, ccs_s::numInstallations, ccs_s::numNations, pos, aircraft_s::price, Q_strcat(), chrScoreGlobal_s::rank, SALARY_AIRCRAFT_DIVISOR, SALARY_AIRCRAFT_FACTOR, SALARY_DEBT_INTEREST, character_s::score, TEXT_GENERIC, TEXT_STATS_BASES, TEXT_STATS_COSTS, TEXT_STATS_EMPLOYEES, TEXT_STATS_INSTALLATIONS, TEXT_STATS_MISSION, TEXT_STATS_NATIONS, employee_s::type, UI_RegisterText(), and va().
void STATS_InitStartup | ( | void | ) |
Definition at line 271 of file cp_statistics.c.
References Cmd_AddCommand().
Referenced by CP_InitStartup().
qboolean STATS_LoadXML | ( | mxml_node_t * | parent | ) |
Load callback for savegames in XML Format.
[in] | parent | XML Node structure, where we get the information from |
Definition at line 186 of file cp_statistics.c.
References AB_GetAlienBaseNumber(), stats_s::aircraftHad, stats_s::alienBasesBuilt, stats_s::basesAttacked, stats_s::basesBuilt, ccs_s::campaignStats, ccs, Com_Printf(), stats_s::interceptions, stats_s::killedAliens, stats_s::missions, stats_s::missionsLost, stats_s::missionsWon, stats_s::moneyBases, stats_s::moneyInterceptions, stats_s::moneyResearch, stats_s::moneyWeapons, mxml_GetInt(), mxml_GetNode(), mxmlDelete(), ccs_s::numAircraft, qfalse, qtrue, stats_s::rescuedCivilians, stats_s::researchedTechnologies, SAVE_STATS_AIRCRAFTHAD, SAVE_STATS_ALIENBASESBUILT, SAVE_STATS_BASESATTACKED, SAVE_STATS_BASESBUILT, SAVE_STATS_INTERCEPTIONS, SAVE_STATS_KILLEDALIENS, SAVE_STATS_MISSIONS, SAVE_STATS_MISSIONSLOST, SAVE_STATS_MISSIONSWON, SAVE_STATS_MONEYBASES, SAVE_STATS_MONEYINTERCEPTIONS, SAVE_STATS_MONEYRESEARCH, SAVE_STATS_MONEYWEAPONS, SAVE_STATS_RESCUEDCIVILIANS, SAVE_STATS_RESEARCHEDTECHNOLOGIES, SAVE_STATS_SOLDIERSLOST, SAVE_STATS_SOLDIERSNEW, SAVE_STATS_STATS, SAVE_STATS_UFOSDETECTED, SAVE_STATS_UFOSSTORED, stats_s::soldiersLost, stats_s::soldiersNew, stats_s::ufosDetected, stats_s::ufosStored, and US_StoredUFOCount().
Referenced by SAV_Init().
qboolean STATS_SaveXML | ( | mxml_node_t * | parent | ) |
Save callback for savegames in XML Format.
[out] | parent | XML Node structure, where we write the information to |
Definition at line 154 of file cp_statistics.c.
References stats_s::aircraftHad, stats_s::alienBasesBuilt, stats_s::basesAttacked, stats_s::basesBuilt, ccs_s::campaignStats, ccs, stats_s::interceptions, stats_s::killedAliens, stats_s::missions, stats_s::missionsLost, stats_s::missionsWon, stats_s::moneyBases, stats_s::moneyInterceptions, stats_s::moneyResearch, stats_s::moneyWeapons, mxml_AddIntValue(), mxml_AddNode(), qtrue, stats_s::rescuedCivilians, stats_s::researchedTechnologies, SAVE_STATS_AIRCRAFTHAD, SAVE_STATS_ALIENBASESBUILT, SAVE_STATS_BASESATTACKED, SAVE_STATS_BASESBUILT, SAVE_STATS_INTERCEPTIONS, SAVE_STATS_KILLEDALIENS, SAVE_STATS_MISSIONS, SAVE_STATS_MISSIONSLOST, SAVE_STATS_MISSIONSWON, SAVE_STATS_MONEYBASES, SAVE_STATS_MONEYINTERCEPTIONS, SAVE_STATS_MONEYRESEARCH, SAVE_STATS_MONEYWEAPONS, SAVE_STATS_RESCUEDCIVILIANS, SAVE_STATS_RESEARCHEDTECHNOLOGIES, SAVE_STATS_SOLDIERSLOST, SAVE_STATS_SOLDIERSNEW, SAVE_STATS_STATS, SAVE_STATS_UFOSDETECTED, SAVE_STATS_UFOSSTORED, stats_s::soldiersLost, stats_s::soldiersNew, stats_s::ufosDetected, and stats_s::ufosStored.
Referenced by SAV_Init().