|
UFO: Alien Invasion
|
Alien cargo class. More...
#include <aliencargo.h>


Public Member Functions | |
| virtual bool | add (const teamDef_t *team, int alive, int dead) |
| Add aliens to the cargo by teamDef. | |
| virtual bool | add (const char *teamId, int alive, int dead) |
| Add aliens to the cargo by team Id. | |
| int | getAlive (const teamDef_t *team) const |
| Return number of alive aliens of a type in the cargo. | |
| int | getDead (const teamDef_t *team) const |
| Return number of dead alien bodies of a type in the cargo. | |
| int | getAlive (void) const |
| Return number of all alive aliens in the cargo. | |
| int | getDead (void) const |
| Return number of all dead bodies in the cargo. | |
| linkedList_t * | list (void) const |
| Returns a copy of the cargo list. | |
| 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. | |
| AlienCargo (AlienCargo &alienCargo) | |
| Creates and initializes AlienCargo object from another one. | |
| virtual | ~AlienCargo (void) |
| Destroys AlienCargo with it's internal data. | |
Protected Attributes | |
| linkedList_t * | cargo |
| int | sumAlive |
| int | sumDead |
Alien cargo class.
Definition at line 41 of file aliencargo.h.
| AlienCargo::AlienCargo | ( | void | ) |
Creates and initializes AlienCargo object.
Definition at line 206 of file aliencargo.cpp.
References cargo, sumAlive, and sumDead.
Referenced by AlienCargo().
| AlienCargo::AlienCargo | ( | AlienCargo & | alienCargo | ) |
Creates and initializes AlienCargo object from another one.
| [in] | alienCargo | Other object to make copy of |
Definition at line 214 of file aliencargo.cpp.
References AlienCargo(), cargo, cgi, list(), LIST_Foreach, sumAlive, and sumDead.
|
virtual |
Destroys AlienCargo with it's internal data.
Definition at line 230 of file aliencargo.cpp.
Add aliens to the cargo by team Id.
| [in] | teamId | Scripted Id of an alien Team |
| [in] | alive | Number of alive aliens |
| [in] | dead | Number of dead aliens |
Reimplemented in AlienContainment.
Definition at line 86 of file aliencargo.cpp.
Add aliens to the cargo by teamDef.
| [in] | team | Pointer to the alien Team Definition |
| [in] | alive | Number of alive aliens |
| [in] | dead | Number of dead aliens |
Reimplemented in AlienContainment.
Definition at line 38 of file aliencargo.cpp.
References cargo, cgi, LIST_Foreach, sumAlive, and sumDead.
Referenced by add(), AlienContainment::add(), AL_AddAliens(), AL_AddAlienTypeToAircraftCargo(), and load().
Return number of alive aliens of a type in the cargo.
| [in] | team | Pointer to the alien Team Definition entry |
Definition at line 100 of file aliencargo.cpp.
References cargo, and LIST_Foreach.
Referenced by AL_CountAll(), RS_RequirementsMet(), TR_Add_f(), and TR_FillAliens().
Return number of all alive aliens in the cargo.
Definition at line 133 of file aliencargo.cpp.
References sumAlive.
Referenced by AlienContainment::add().
Return number of dead alien bodies of a type in the cargo.
| [in] | team | Pointer to the alien Team Definition entry |
Definition at line 117 of file aliencargo.cpp.
References cargo, and LIST_Foreach.
Referenced by RS_RequirementsMet(), TR_Add_f(), and TR_FillAliens().
Return number of all dead bodies in the cargo.
Definition at line 141 of file aliencargo.cpp.
References sumDead.
Referenced by AlienContainment::add().
| linkedList_t * AlienCargo::list | ( | void | ) | const |
Returns a copy of the cargo list.
Definition at line 150 of file aliencargo.cpp.
References cargo, cgi, and LIST_Foreach.
Referenced by AC_Init_f(), AC_KillAll_f(), AC_KillExceeding_f(), AC_KillOne_f(), AL_AddAliens(), AlienCargo(), TR_EmptyTransferCargo(), TR_FillAliens(), and TR_TransferStart().
| bool AlienCargo::load | ( | xmlNode_t * | root | ) |
Load alien cargo from xml savegame.
| [in] | root | Root xml node to load data from |
Definition at line 167 of file aliencargo.cpp.
References add(), cgi, SAVE_ALIENCARGO_ALIVE, SAVE_ALIENCARGO_DEAD, SAVE_ALIENCARGO_ITEM, SAVE_ALIENCARGO_TEAMDEFID, and xmlNode_t.
Referenced by AIR_LoadAircraftXML(), B_LoadXML(), and TR_LoadXML().
| bool AlienCargo::save | ( | xmlNode_t * | root | ) | const |
Save alien cargo to xml savegame.
| [out] | root | Root xml node to save data under |
Definition at line 188 of file aliencargo.cpp.
References cargo, cgi, LIST_Foreach, SAVE_ALIENCARGO_ALIVE, SAVE_ALIENCARGO_DEAD, SAVE_ALIENCARGO_ITEM, SAVE_ALIENCARGO_TEAMDEFID, and xmlNode_t.
Referenced by AIR_SaveAircraftXML(), and B_SaveXML().
|
protected |
internal linkedlist of teams and amounts
Definition at line 43 of file aliencargo.h.
Referenced by add(), AlienCargo(), AlienCargo(), getAlive(), getDead(), list(), save(), and ~AlienCargo().
|
protected |
cache of number of alive aliens of all kinds in the cargo
Definition at line 44 of file aliencargo.h.
Referenced by add(), AlienCargo(), AlienCargo(), and getAlive().
|
protected |
cache of number of dead bodies of all kinds in the cargo
Definition at line 45 of file aliencargo.h.
Referenced by add(), AlienCargo(), AlienCargo(), and getDead().