UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cp_statistics.cpp File Reference

Campaign statistics. More...

#include "../../cl_shared.h"
#include "../../ui/ui_dataids.h"
#include "cp_campaign.h"
#include "cp_xvi.h"
#include "save/save_statistics.h"

Go to the source code of this file.

Macros

#define MAX_STATS_BUFFER   2048
 

Functions

static void STATS_Update_f (void)
 Shows the current stats from stats_t stats. More...
 
static void STAT_GetExpenses_f (void)
 Console command for UI to gather expenses. More...
 
bool STATS_SaveXML (xmlNode_t *parent)
 Save callback for savegames in XML Format. More...
 
bool STATS_LoadXML (xmlNode_t *parent)
 Load callback for savegames in XML Format. More...
 
void STATS_InitStartup (void)
 
void STATS_ShutDown (void)
 

Variables

static const cmdList_t statisticsCallbacks []
 

Detailed Description

Campaign statistics.

Definition in file cp_statistics.cpp.

Macro Definition Documentation

#define MAX_STATS_BUFFER   2048

Definition at line 31 of file cp_statistics.cpp.

Referenced by STATS_Update_f().

Function Documentation

static void STAT_GetExpenses_f ( void  )
static
void STATS_InitStartup ( void  )

Definition at line 213 of file cp_statistics.cpp.

References cgi.

Referenced by CP_InitStartup().

void STATS_ShutDown ( void  )

Definition at line 218 of file cp_statistics.cpp.

References cgi.

Referenced by CP_Shutdown().

static void STATS_Update_f ( void  )
static

Shows the current stats from stats_t stats.

Todo:
This is very redundant with NAT_HandleBudget Investigate and clean up.

Definition at line 36 of file cp_statistics.cpp.

References _, ccs, cgi, CP_GetAverageXVIRate(), CP_IsXVIVisible(), ccs_s::curCampaign, MAX_STATS_BUFFER, campaign_s::maxAllowedXVIRateUntilLost, campaign_s::negativeCreditsUntilLost, OBJZERO, Q_strcat(), and TEXT_GENERIC.

Variable Documentation

const cmdList_t statisticsCallbacks[]
static
Initial value:
= {
{"stats_update", STATS_Update_f, "Update capaign statistics UI"},
{"stats_getexpenses", STAT_GetExpenses_f, "Gather expenses for the statistics UI"},
{nullptr, nullptr, nullptr}
}
static void STAT_GetExpenses_f(void)
Console command for UI to gather expenses.
static void STATS_Update_f(void)
Shows the current stats from stats_t stats.

Definition at line 206 of file cp_statistics.cpp.