UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cp_rank.h
Go to the documentation of this file.
1 
5 /*
6 Copyright (C) 2002-2020 UFO: Alien Invasion.
7 
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 
17 See the GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23 
24 #pragma once
25 
26 #define MAX_RANKS 32
27 
29 typedef struct rank_s {
30  const char* id;
31  const char* name;
32  const char* shortname;
33  const char* image;
34  int type;
35  int mind;
38  float factor;
40  int level;
41 } rank_t;
42 
43 void CL_ParseRanks(const char* name, const char** text);
44 int CL_GetRankIdx(const char* rankID);
45 rank_t* CL_GetRankByIdx(const int index);
int killedEnemies
Definition: cp_rank.h:36
const char * id
Definition: cp_rank.h:30
Describes a rank that a recruit can gain.
Definition: cp_rank.h:29
struct rank_s rank_t
Describes a rank that a recruit can gain.
int level
Definition: cp_rank.h:40
float factor
Definition: cp_rank.h:38
const char * shortname
Definition: cp_rank.h:32
rank_t * CL_GetRankByIdx(const int index)
Returns a rank at an index.
Definition: cp_rank.cpp:50
int killedOthers
Definition: cp_rank.h:37
int CL_GetRankIdx(const char *rankID)
Get the index of the given rankID in ccs.ranks array.
Definition: cp_rank.cpp:34
void CL_ParseRanks(const char *name, const char **text)
Parse medals and ranks defined in the medals.ufo file.
Definition: cp_rank.cpp:74
int type
Definition: cp_rank.h:34
const char * name
Definition: cp_rank.h:31
QGL_EXTERN GLuint index
Definition: r_gl.h:110
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition: r_gl.h:110
int mind
Definition: cp_rank.h:35
const char * image
Definition: cp_rank.h:33