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