UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
cp_rank.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 2002-2025 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
;
36
int
killedEnemies
;
37
int
killedOthers
;
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
);
CL_GetRankByIdx
rank_t * CL_GetRankByIdx(const int index)
Returns a rank at an index.
Definition
cp_rank.cpp:50
CL_GetRankIdx
int CL_GetRankIdx(const char *rankID)
Get the index of the given rankID in ccs.ranks array.
Definition
cp_rank.cpp:34
CL_ParseRanks
void CL_ParseRanks(const char *name, const char **text)
Parse medals and ranks defined in the medals.ufo file.
Definition
cp_rank.cpp:74
index
QGL_EXTERN GLuint index
Definition
r_gl.h:110
name
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition
r_gl.h:110
rank_t
Describes a rank that a recruit can gain.
Definition
cp_rank.h:29
rank_t::level
int level
Definition
cp_rank.h:40
rank_t::factor
float factor
Definition
cp_rank.h:38
rank_t::mind
int mind
Definition
cp_rank.h:35
rank_t::name
const char * name
Definition
cp_rank.h:31
rank_t::killedOthers
int killedOthers
Definition
cp_rank.h:37
rank_t::type
int type
Definition
cp_rank.h:34
rank_t::id
const char * id
Definition
cp_rank.h:30
rank_t::image
const char * image
Definition
cp_rank.h:33
rank_t::killedEnemies
int killedEnemies
Definition
cp_rank.h:36
rank_t::shortname
const char * shortname
Definition
cp_rank.h:32
src
client
cgame
campaign
cp_rank.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0