UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
aliencargo.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
#pragma once
26
27
#include "
cp_cgame_callbacks.h
"
28
32
typedef
struct
alienCargo_s {
33
const
teamDef_t
*
teamDef
;
34
int
alive
;
35
int
dead
;
36
}
alienCargo_t
;
37
41
class
AlienCargo
{
42
protected
:
43
linkedList_t
*
cargo
;
44
int
sumAlive
;
45
int
sumDead
;
46
public
:
47
virtual
bool
add
(
const
teamDef_t
* team,
int
alive,
int
dead);
48
virtual
bool
add
(
const
char
* teamId,
int
alive,
int
dead);
49
50
int
getAlive
(
const
teamDef_t
* team)
const
;
51
int
getDead
(
const
teamDef_t
* team)
const
;
52
int
getAlive
(
void
)
const
;
53
int
getDead
(
void
)
const
;
54
55
linkedList_t
*
list
(
void
)
const
;
56
57
bool
load
(
xmlNode_t
* root);
58
bool
save
(
xmlNode_t
* root)
const
;
59
60
AlienCargo
(
void
);
61
AlienCargo
(
AlienCargo
& alienCargo);
62
virtual
~AlienCargo
(
void
);
63
};
AlienCargo::getAlive
int getAlive(void) const
Return number of all alive aliens in the cargo.
Definition
aliencargo.cpp:133
AlienCargo::cargo
linkedList_t * cargo
Definition
aliencargo.h:43
AlienCargo::add
virtual bool add(const teamDef_t *team, int alive, int dead)
Add aliens to the cargo by teamDef.
Definition
aliencargo.cpp:38
AlienCargo::list
linkedList_t * list(void) const
Returns a copy of the cargo list.
Definition
aliencargo.cpp:150
AlienCargo::sumAlive
int sumAlive
Definition
aliencargo.h:44
AlienCargo::~AlienCargo
virtual ~AlienCargo(void)
Destroys AlienCargo with it's internal data.
Definition
aliencargo.cpp:230
AlienCargo::load
bool load(xmlNode_t *root)
Load alien cargo from xml savegame.
Definition
aliencargo.cpp:167
AlienCargo::save
bool save(xmlNode_t *root) const
Save alien cargo to xml savegame.
Definition
aliencargo.cpp:188
AlienCargo::sumDead
int sumDead
Definition
aliencargo.h:45
AlienCargo::AlienCargo
AlienCargo(void)
Creates and initializes AlienCargo object.
Definition
aliencargo.cpp:206
AlienCargo::getDead
int getDead(void) const
Return number of all dead bodies in the cargo.
Definition
aliencargo.cpp:141
cp_cgame_callbacks.h
alienCargo_t
alien cargo entry
Definition
aliencargo.h:32
alienCargo_t::teamDef
const teamDef_t * teamDef
Definition
aliencargo.h:33
alienCargo_t::dead
int dead
Definition
aliencargo.h:35
alienCargo_t::alive
int alive
Definition
aliencargo.h:34
linkedList_t
Definition
list.h:30
teamDef_t
Definition
chr_shared.h:307
xmlNode_t
#define xmlNode_t
Definition
xml.h:24
src
client
cgame
campaign
aliencargo.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0