UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
cp_component.h
Go to the documentation of this file.
1
5
6
/*
7
Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9
This program is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License
11
as published by the Free Software Foundation; either version 2
12
of the License, or (at your option) any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18
See the GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24
*/
25
26
#pragma once
27
28
#define MAX_ASSEMBLIES 16
29
#define MAX_COMP 32
30
#define COMP_ITEMCOUNT_SCALED -32768
31
35
typedef
struct
components_s {
36
char
assemblyId
[
MAX_VAR
];
37
const
objDef_t
*
assemblyItem
;
38
39
int
time
;
40
41
int
numItemtypes
;
42
const
objDef_t
*
items
[
MAX_COMP
];
43
int
itemAmount
[
MAX_COMP
];
44
int
itemAmount2
[
MAX_COMP
];
45
}
components_t
;
46
47
components_t
*
COMP_GetComponentsByID
(
const
char
*
id
);
48
void
COMP_ParseComponents
(
const
char
*
name
,
const
char
** text);
COMP_GetComponentsByID
components_t * COMP_GetComponentsByID(const char *id)
Returns components definition by ID.
Definition
cp_component.cpp:145
COMP_ParseComponents
void COMP_ParseComponents(const char *name, const char **text)
Parses one "components" entry in a .ufo file and writes it into the next free entry in xxxxxxxx (comp...
Definition
cp_component.cpp:50
MAX_COMP
#define MAX_COMP
Definition
cp_component.h:29
name
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition
r_gl.h:110
MAX_VAR
#define MAX_VAR
Definition
shared.h:36
components_t
The definition of a "components" entry (i.e. an assembly of several items) parsed from a ufo-file.
Definition
cp_component.h:35
components_t::time
int time
Definition
cp_component.h:39
components_t::numItemtypes
int numItemtypes
Definition
cp_component.h:41
components_t::items
const objDef_t * items[MAX_COMP]
Definition
cp_component.h:42
components_t::itemAmount2
int itemAmount2[MAX_COMP]
Definition
cp_component.h:44
components_t::assemblyId
char assemblyId[MAX_VAR]
Definition
cp_component.h:36
components_t::itemAmount
int itemAmount[MAX_COMP]
Definition
cp_component.h:43
components_t::assemblyItem
const objDef_t * assemblyItem
Definition
cp_component.h:37
objDef_t
Defines all attributes of objects used in the inventory.
Definition
inv_shared.h:264
src
client
cgame
campaign
cp_component.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0