Go to the source code of this file.
Data Structures | |
struct | rank_s |
Describes a rank that a recruit can gain. More... | |
Defines | |
#define | MAX_RANKS 32 |
Typedefs | |
typedef struct rank_s | rank_t |
Describes a rank that a recruit can gain. | |
Functions | |
void | CL_ParseRanks (const char *name, const char **text) |
Parse medals and ranks defined in the medals.ufo file. | |
int | CL_GetRankIdx (const char *rankID) |
Get the index of the given rankID in ccs.ranks array. | |
rank_t * | CL_GetRankByIdx (const int index) |
Returns a rank at an index. |
Definition in file cp_rank.h.
#define MAX_RANKS 32 |
Definition at line 28 of file cp_rank.h.
Referenced by CL_ParseRanks().
rank_t* CL_GetRankByIdx | ( | const int | index | ) |
Returns a rank at an index.
[in] | index | Index of rank in ccs.ranks |
Definition at line 53 of file cp_rank.c.
References ccs, ccs_s::numRanks, and ccs_s::ranks.
Referenced by CL_UpdateCharacterStats(), CP_GetWinProbabilty(), GAME_CP_CharacterCvars(), HOS_UpdateMenu(), TR_CargoList(), TR_CheckEmployee(), and TR_TransferSelect().
int CL_GetRankIdx | ( | const char * | rankID | ) |
Get the index of the given rankID in ccs.ranks array.
[in] | rankID | Script id of the rank |
Definition at line 35 of file cp_rank.c.
References ccs, i, rank_s::id, ccs_s::numRanks, and ccs_s::ranks.
Referenced by E_CreateEmployeeAtIndex().
void CL_ParseRanks | ( | const char * | name, | |
const char ** | text | |||
) |
Parse medals and ranks defined in the medals.ufo file.
Definition at line 76 of file cp_rank.c.
References ccs, Com_EParse(), Com_EParseValue(), Com_Error(), Com_Parse(), Com_Printf(), cp_campaignPool, E_GetEmployeeType(), ERR_DROP, i, rank_s::id, MAX_RANKS, Mem_PoolStrDup, Mem_PoolStrDupTo, rank_s::name, ccs_s::numRanks, value_s::ofs, Q_strncpyz(), ccs_s::ranks, rank_s::shortname, value_s::size, value_s::string, rank_s::type, value_s::type, and V_CLIENT_HUNK_STRING.
Referenced by CL_ParseScriptFirst().