UFO: Alien Invasion
Loading...
Searching...
No Matches
aliencargo.h
Go to the documentation of this file.
1
5
6/*
7Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9This program is free software; you can redistribute it and/or
10modify it under the terms of the GNU General Public License
11as published by the Free Software Foundation; either version 2
12of the License, or (at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18See the GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23*/
24
25#pragma once
26
27#include "cp_cgame_callbacks.h"
28
32typedef struct alienCargo_s {
34 int alive;
35 int dead;
37
42 protected:
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};
int getAlive(void) const
Return number of all alive aliens in the cargo.
linkedList_t * cargo
Definition aliencargo.h:43
virtual bool add(const teamDef_t *team, int alive, int dead)
Add aliens to the cargo by teamDef.
linkedList_t * list(void) const
Returns a copy of the cargo list.
virtual ~AlienCargo(void)
Destroys AlienCargo with it's internal data.
bool load(xmlNode_t *root)
Load alien cargo from xml savegame.
bool save(xmlNode_t *root) const
Save alien cargo to xml savegame.
AlienCargo(void)
Creates and initializes AlienCargo object.
int getDead(void) const
Return number of all dead bodies in the cargo.
alien cargo entry
Definition aliencargo.h:32
const teamDef_t * teamDef
Definition aliencargo.h:33
#define xmlNode_t
Definition xml.h:24