cl_team.h File Reference

#include "mxml/mxml_ufoai.h"
Include dependency graph for cl_team.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  customSkin_s

Defines

#define MAX_WHOLETEAM   32
#define MAX_TEAMDATASIZE   32768
#define MAX_CUSTOMSKIN   32

Typedefs

typedef struct customSkin_s customSkin_t

Functions

void CL_GenerateCharacter (character_t *chr, const char *teamDefName)
 Generates the skills and inventory for a character and for a 2x2 unit.
void CL_UpdateCharacterValues (const character_t *chr, const char *cvarPrefix)
qboolean CL_SaveCharacterXML (mxml_node_t *p, const character_t *chr)
 saves a character to a given xml node
qboolean CL_LoadCharacterXML (mxml_node_t *p, character_t *chr)
 Loads a character from a given xml node.
void CL_SaveInventoryXML (mxml_node_t *p, const inventory_t *i)
 Save callback for savegames in XML Format.
void CL_LoadInventoryXML (mxml_node_t *p, inventory_t *i)
 Load callback for savegames in XML Format.
void TEAM_InitStartup (void)
customSkin_tCom_AllocateCustomSkin (void)
 Allocate a skin from the cls structure.

Variables

chrList_t chrDisplayList
 List of currently displayed or equipeable characters.

Detailed Description

Definition in file cl_team.h.


Define Documentation

#define MAX_CUSTOMSKIN   32

Definition at line 32 of file cl_team.h.

#define MAX_TEAMDATASIZE   32768

Definition at line 31 of file cl_team.h.

#define MAX_WHOLETEAM   32

Definition at line 30 of file cl_team.h.


Typedef Documentation

typedef struct customSkin_s customSkin_t

Function Documentation

void CL_GenerateCharacter ( character_t chr,
const char *  teamDefName 
)

Generates the skills and inventory for a character and for a 2x2 unit.

Parameters:
[in] chr The employee to create character data for.
[in] teamDefName Which team to use for creation.

Definition at line 474 of file cl_team.c.

References ACTOR_HAND_NOT_SET, CHRSH_CharGenAbilitySkills(), CL_ActorSetShotSettings(), cls, Com_GetCharacterValues(), inventoryInterface_s::DestroyInventory, GAME_IsMultiplayer, character_s::i, client_static_s::i, client_static_s::nextUniqueCharacterNumber, and character_s::ucn.

Referenced by E_CreateEmployeeAtIndex(), and GAME_AppendTeamMember().

qboolean CL_LoadCharacterXML ( mxml_node_t p,
character_t chr 
)

Loads a character from a given xml node.

Parameters:
[in] p The node from which we should load the character.
[in] chr Pointer to the charcter we should load.

Definition at line 264 of file cl_team.c.

References chrScoreGlobal_s::assignedMissions, character_s::body, CL_LoadInventoryXML(), cls, Com_GetConstIntFromNamespace(), Com_GetTeamDefinitionByID(), Com_Printf(), Com_RegisterConstList(), Com_UnregisterConstList(), inventoryInterface_s::DestroyInventory, chrScoreGlobal_s::experience, character_s::fieldSize, character_s::gender, character_s::head, character_s::HP, character_s::i, client_static_s::i, chrScoreGlobal_s::initialSkills, chrScoreGlobal_s::kills, character_s::maxHP, character_s::morale, mxml_GetInt(), mxml_GetNextNode(), mxml_GetNode(), mxml_GetString(), character_s::name, character_s::path, Q_strncpyz(), qfalse, qtrue, chrScoreGlobal_s::rank, SAVE_CHARACTER_BODY, SAVE_CHARACTER_EXPERIENCE, SAVE_CHARACTER_FIELDSIZE, SAVE_CHARACTER_GENDER, SAVE_CHARACTER_HEAD, SAVE_CHARACTER_HP, SAVE_CHARACTER_INITSKILL, SAVE_CHARACTER_KILLED, SAVE_CHARACTER_KILLS, SAVE_CHARACTER_KILLTYPE, SAVE_CHARACTER_KILLTYPE_NAMESPACE, SAVE_CHARACTER_MAXHP, SAVE_CHARACTER_MORALE, SAVE_CHARACTER_NAME, SAVE_CHARACTER_PATH, SAVE_CHARACTER_SCORE_ASSIGNEDMISSIONS, SAVE_CHARACTER_SCORE_RANK, SAVE_CHARACTER_SCORES, SAVE_CHARACTER_SKILLIMPROVE, SAVE_CHARACTER_SKILLS, SAVE_CHARACTER_SKILLTYPE, SAVE_CHARACTER_SKILLTYPE_NAMESPACE, SAVE_CHARACTER_SKIN, SAVE_CHARACTER_STATE, SAVE_CHARACTER_STUN, SAVE_CHARACTER_STUNNED, SAVE_CHARACTER_TEAMDEF, SAVE_CHARACTER_UCN, SAVE_INVENTORY_INVENTORY, saveCharacterConstants, character_s::score, SKILL_NUM_TYPES, chrScoreGlobal_s::skills, character_s::skin, character_s::state, character_s::STUN, chrScoreGlobal_s::stuns, character_s::teamDef, type, and character_s::ucn.

Referenced by E_LoadXML(), and MP_LoadTeamMultiplayerInfo().

void CL_LoadInventoryXML ( mxml_node_t p,
inventory_t i 
)

Load callback for savegames in XML Format.

Parameters:
[in] p XML Node structure, where we load the information from
[out] i Pointerto the inventory
See also:
CL_SaveInventoryXML
CL_LoadItemXML
I_AddToInventory

Definition at line 454 of file cl_team.c.

References inventoryInterface_s::AddToInventory, CL_LoadItemXML(), cls, Com_Printf(), client_static_s::i, objDef_s::id, INVDEF, mxml_GetNextNode(), mxml_GetNode(), SAVE_INVENTORY_ITEM, and item_s::t.

Referenced by CL_LoadCharacterXML().

qboolean CL_SaveCharacterXML ( mxml_node_t p,
const character_t chr 
)

saves a character to a given xml node

Parameters:
[in] p The node to which we should save the character
[in] chr The charcter we should save

Definition at line 192 of file cl_team.c.

References chrScoreGlobal_s::assignedMissions, character_s::body, CL_SaveInventoryXML(), Com_GetConstVariable(), Com_RegisterConstList(), Com_UnregisterConstList(), chrScoreGlobal_s::experience, character_s::fieldSize, character_s::gender, character_s::head, character_s::HP, character_s::i, teamDef_s::id, chrScoreGlobal_s::initialSkills, KILLED_NUM_TYPES, chrScoreGlobal_s::kills, character_s::maxHP, character_s::morale, mxml_AddInt(), mxml_AddIntValue(), mxml_AddNode(), mxml_AddString(), character_s::name, character_s::path, qtrue, chrScoreGlobal_s::rank, SAVE_CHARACTER_BODY, SAVE_CHARACTER_EXPERIENCE, SAVE_CHARACTER_FIELDSIZE, SAVE_CHARACTER_GENDER, SAVE_CHARACTER_HEAD, SAVE_CHARACTER_HP, SAVE_CHARACTER_INITSKILL, SAVE_CHARACTER_KILLED, SAVE_CHARACTER_KILLS, SAVE_CHARACTER_KILLTYPE, SAVE_CHARACTER_KILLTYPE_NAMESPACE, SAVE_CHARACTER_MAXHP, SAVE_CHARACTER_MORALE, SAVE_CHARACTER_NAME, SAVE_CHARACTER_PATH, SAVE_CHARACTER_SCORE_ASSIGNEDMISSIONS, SAVE_CHARACTER_SCORE_RANK, SAVE_CHARACTER_SCORES, SAVE_CHARACTER_SKILLIMPROVE, SAVE_CHARACTER_SKILLS, SAVE_CHARACTER_SKILLTYPE, SAVE_CHARACTER_SKILLTYPE_NAMESPACE, SAVE_CHARACTER_SKIN, SAVE_CHARACTER_STATE, SAVE_CHARACTER_STUN, SAVE_CHARACTER_STUNNED, SAVE_CHARACTER_TEAMDEF, SAVE_CHARACTER_UCN, SAVE_INVENTORY_INVENTORY, saveCharacterConstants, character_s::score, SKILL_NUM_TYPES, chrScoreGlobal_s::skills, character_s::skin, character_s::state, character_s::STUN, chrScoreGlobal_s::stuns, character_s::teamDef, and character_s::ucn.

Referenced by E_SaveXML(), and MP_SaveTeamMultiplayerInfo().

void CL_SaveInventoryXML ( mxml_node_t p,
const inventory_t i 
)

Save callback for savegames in XML Format.

Parameters:
[out] p XML Node structure, where we write the information to
[in] i Pointerto the inventory to save
See also:
CL_SaveItemXML
CL_LoadInventoryXML

Definition at line 385 of file cl_team.c.

References inventory_s::c, CL_SaveItemXML(), csi, INVDEF, invList_s::item, mxml_AddNode(), invList_s::next, csi_s::numIDs, SAVE_INVENTORY_ITEM, invList_s::x, and invList_s::y.

Referenced by CL_SaveCharacterXML().

void CL_UpdateCharacterValues ( const character_t chr,
const char *  cvarPrefix 
)
customSkin_t* Com_AllocateCustomSkin ( void   ) 

Allocate a skin from the cls structure.

Returns:
A customskin structure, only idx is initialized

Definition at line 46 of file cl_team.c.

References cls, client_static_s::customSkins, customSkin_s::idx, lengthof, client_static_s::numCustomSkins, and Sys_Error().

Referenced by CL_ParseCustomSkin().

void TEAM_InitStartup ( void   ) 

Definition at line 585 of file cl_team.c.

References CL_ChangeSkin_f(), CL_ChangeSkinForWholeTeam_f(), CL_InitSkin_f(), and Cmd_AddCommand().

Referenced by CL_InitLocal().


Variable Documentation


Generated by  doxygen 1.6.2