cp_rank.h File Reference

This graph shows which files directly or indirectly include this file:

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_tCL_GetRankByIdx (const int index)
 Returns a rank at an index.

Detailed Description

Definition in file cp_rank.h.


Define Documentation

#define MAX_RANKS   32

Definition at line 28 of file cp_rank.h.

Referenced by CL_ParseRanks().


Typedef Documentation

typedef struct rank_s rank_t

Describes a rank that a recruit can gain.


Function Documentation

rank_t* CL_GetRankByIdx ( const int  index  ) 

Returns a rank at an index.

Parameters:
[in] index Index of rank in ccs.ranks
Returns:
NULL on invalid index
pointer to the rank definition otherwise

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.

Parameters:
[in] rankID Script id of the rank
Returns:
-1 if no rank with rankID found

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 
)

Generated by  doxygen 1.6.2