|
UFO: Alien Invasion
|
cgame team management headers. More...
#include "../../common/xml.h"

Go to the source code of this file.
Macros | |
| #define | NO_TEAM_SLOT_LOADED -1 |
Functions | |
| bool | GAME_TeamGetFreeFilename (char *filename, size_t size) |
| Searches a free team filename. | |
| bool | GAME_GetTeamFileName (unsigned int index, char *filename, size_t filenameLength) |
| Get the filename for the xth team in the file system. | |
| void | GAME_SaveTeam_f (void) |
| Stores a team in a specified teamslot. | |
| void | GAME_LoadTeam_f (void) |
| Loads the selected teamslot. | |
| void | GAME_TeamSlotComments_f (void) |
| Reads the comments from team files. | |
| void | GAME_TeamDelete_f (void) |
| Removes a user created team. | |
| void | GAME_SaveTeamState_f (void) |
| Will remove those actors that should not be used in the team. | |
| void | GAME_ToggleActorForTeam_f (void) |
| This will activate/deactivate the actor for the team. | |
| void | GAME_AutoTeam_f (void) |
| void | GAME_AutoTeam (const char *equipmentDefinitionID, int teamMembers) |
| void | GAME_UpdateTeamMenuParameters_f (void) |
| Displays actor info and equipment and unused items in proper (filter) category. | |
| void | GAME_ActorSelect_f (void) |
| bool | GAME_LoadDefaultTeam (bool force) |
| bool | GAME_SaveCharacter (xmlNode_t *p, const character_t *chr) |
| saves a character to a given xml node | |
| bool | GAME_LoadCharacter (xmlNode_t *p, character_t *chr) |
| Loads a character from a given xml node. | |
cgame team management headers.
Definition in file cl_game_team.h.
| #define NO_TEAM_SLOT_LOADED -1 |
Definition at line 30 of file cl_game_team.h.
Referenced by GAME_AutoTeam(), GAME_LoadDefaultTeam(), and GAME_LoadTeam_f().
Definition at line 528 of file cl_game_team.cpp.
References chrDisplayList, CID_EQUIP, CL_UpdateCharacterValues(), Cmd_Argc(), Cmd_Argv(), Com_Printf(), character_t::inv, LIST_Foreach, Inventory::setContainer(), and ui_inventory.
Referenced by GAME_InitStartup().
Definition at line 59 of file cl_game_team.cpp.
References cls, GAME_GenerateTeam(), GAME_GetTeamDef(), INV_GetEquipmentDefinitionByID(), and NO_TEAM_SLOT_LOADED.
Referenced by GAME_AutoTeam_f(), and GAME_GetImportData().
Definition at line 68 of file cl_game_team.cpp.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), GAME_AutoTeam(), GAME_GetCharacterArraySize(), and GAME_UpdateActiveTeamList().
Referenced by GAME_InitStartup().
| bool GAME_GetTeamFileName | ( | unsigned int | index, |
| char * | filename, | ||
| size_t | filenameLength ) |
Get the filename for the xth team in the file system.
| [in] | index | The index of the team we are looking for in the filesystem |
| [out] | filename | The filename of the team. This value is only set or valid if this function returned true. |
| [in] | filenameLength | The length of the filename buffer. |
true if the filename for the given index was found, false otherwise (e.g. invalid index) Definition at line 410 of file cl_game_team.cpp.
References Com_DPrintf(), Com_sprintf(), DEBUG_CLIENT, FS_BuildFileList(), FS_NextFileFromFileList(), GAME_GetRelativeSavePath(), index, and MAX_OSPATH.
Referenced by GAME_LoadDefaultTeam(), and GAME_LoadTeam_f().
| bool GAME_LoadCharacter | ( | xmlNode_t * | p, |
| character_t * | chr ) |
Loads a character from a given xml node.
| [in] | p | The node from which we should load the character. |
| [in] | chr | Pointer to the character we should load. |
Definition at line 782 of file cl_game_team.cpp.
References chrScoreGlobal_t::assignedMissions, character_t::body, character_t::bodySkin, teamDef_t::bodyTemplate, CHRSH_CharGetBody(), CHRSH_CharGetHead(), CL_GetActorSkinCount(), cls, Com_GetCharacterModel(), Com_GetConstIntFromNamespace(), Com_GetTeamDefinitionByID(), Com_Printf(), Com_RegisterConstList(), Com_UnregisterConstList(), implant_t::def, chrScoreGlobal_t::experience, character_t::fieldSize, GAME_GetChrMaxLoad(), GAME_LoadInventory(), character_t::gender, character_t::head, character_t::headSkin, character_t::HP, BodyData::id(), character_t::implants, chrScoreGlobal_t::initialSkills, implant_t::installedTime, character_t::inv, INVSH_GetImplantByID(), chrScoreGlobal_t::kills, character_t::maxHP, character_t::morale, character_t::name, NONE, BodyData::numBodyParts(), character_t::path, Q_streq, Q_strncpyz(), R_ModelExists(), chrScoreGlobal_t::rank, implant_t::removedTime, SAVE_CHARACTER_BDOY_SKIN, SAVE_CHARACTER_BODY, SAVE_CHARACTER_EXPERIENCE, SAVE_CHARACTER_FIELDSIZE, SAVE_CHARACTER_GENDER, SAVE_CHARACTER_HEAD, SAVE_CHARACTER_HEAD_SKIN, SAVE_CHARACTER_HP, SAVE_CHARACTER_IMPLANT, SAVE_CHARACTER_IMPLANT_IMPLANT, SAVE_CHARACTER_IMPLANT_INSTALLEDTIME, SAVE_CHARACTER_IMPLANT_REMOVETIME, SAVE_CHARACTER_IMPLANTS, SAVE_CHARACTER_INITSKILL, SAVE_CHARACTER_INJURIES, 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_STATE, SAVE_CHARACTER_STUN, SAVE_CHARACTER_STUNNED, SAVE_CHARACTER_TEAMDEF, SAVE_CHARACTER_UCN, SAVE_CHARACTER_WOUND, SAVE_CHARACTER_WOUNDEDPART, SAVE_CHARACTER_WOUNDSEVERITY, SAVE_CHARACTER_WOUNDTYPE, SAVE_INVENTORY_INVENTORY, saveCharacterConstants, character_t::score, SKILL_NUM_TYPES, chrScoreGlobal_t::skills, character_t::state, character_t::STUN, chrScoreGlobal_t::stuns, character_t::teamDef, woundInfo_t::treatmentLevel, type, character_t::ucn, character_t::wounds, XML_GetInt(), XML_GetNextNode(), XML_GetNode(), XML_GetString(), and xmlNode_t.
Referenced by cgame_import_t::bool(), GAME_GetImportData(), and GAME_LoadTeamInfo().
| bool GAME_LoadDefaultTeam | ( | bool | force | ) |
Definition at line 436 of file cl_game_team.cpp.
References cls, GAME_GetTeamFileName(), GAME_IsTeamEmpty(), GAME_LoadTeam(), MAX_OSPATH, and NO_TEAM_SLOT_LOADED.
Referenced by cgame_import_t::bool(), and GAME_GetImportData().
Loads the selected teamslot.
Definition at line 458 of file cl_game_team.cpp.
References cls, Cmd_Argc(), Cmd_Argv(), Com_Printf(), GAME_GetTeamFileName(), GAME_IsTeamEmpty(), GAME_LoadTeam(), index, MAX_OSPATH, and NO_TEAM_SLOT_LOADED.
Referenced by GAME_InitStartup().
| bool GAME_SaveCharacter | ( | xmlNode_t * | p, |
| const character_t * | chr ) |
saves a character to a given xml node
| [in] | p | The node to which we should save the character |
| [in] | chr | The character we should save |
Definition at line 691 of file cl_game_team.cpp.
References chrScoreGlobal_t::assignedMissions, character_t::body, character_t::bodySkin, teamDef_t::bodyTemplate, Com_GetConstVariable(), Com_RegisterConstList(), Com_UnregisterConstList(), implant_t::def, chrScoreGlobal_t::experience, character_t::fieldSize, GAME_SaveInventory(), character_t::gender, character_t::head, character_t::headSkin, character_t::HP, i, BodyData::id(), implantDef_t::id, teamDef_t::id, character_t::implants, chrScoreGlobal_t::initialSkills, implant_t::installedTime, character_t::inv, KILLED_NUM_TYPES, chrScoreGlobal_t::kills, lengthof, character_t::maxHP, character_t::morale, character_t::name, BodyData::numBodyParts(), character_t::path, chrScoreGlobal_t::rank, implant_t::removedTime, SAVE_CHARACTER_BDOY_SKIN, SAVE_CHARACTER_BODY, SAVE_CHARACTER_EXPERIENCE, SAVE_CHARACTER_FIELDSIZE, SAVE_CHARACTER_GENDER, SAVE_CHARACTER_HEAD, SAVE_CHARACTER_HEAD_SKIN, SAVE_CHARACTER_HP, SAVE_CHARACTER_IMPLANT, SAVE_CHARACTER_IMPLANT_IMPLANT, SAVE_CHARACTER_IMPLANT_INSTALLEDTIME, SAVE_CHARACTER_IMPLANT_REMOVETIME, SAVE_CHARACTER_IMPLANTS, SAVE_CHARACTER_INITSKILL, SAVE_CHARACTER_INJURIES, 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_STATE, SAVE_CHARACTER_STUN, SAVE_CHARACTER_STUNNED, SAVE_CHARACTER_TEAMDEF, SAVE_CHARACTER_UCN, SAVE_CHARACTER_WOUND, SAVE_CHARACTER_WOUNDEDPART, SAVE_CHARACTER_WOUNDSEVERITY, SAVE_INVENTORY_INVENTORY, saveCharacterConstants, character_t::score, SKILL_NUM_TYPES, chrScoreGlobal_t::skills, character_t::state, character_t::STUN, chrScoreGlobal_t::stuns, character_t::teamDef, woundInfo_t::treatmentLevel, character_t::ucn, character_t::wounds, XML_AddInt(), XML_AddIntValue(), XML_AddNode(), XML_AddString(), and xmlNode_t.
Referenced by cgame_import_t::bool(), GAME_GetImportData(), and GAME_SaveTeamInfo().
Stores a team in a specified teamslot.
Definition at line 293 of file cl_game_team.cpp.
References _, chrDisplayList, Cmd_Argc(), Cmd_Argv(), Com_Printf(), GAME_SaveTeam(), GAME_TeamGetFreeFilename(), LIST_IsEmpty(), MAX_OSPATH, name, Q_strnull(), and UI_Popup().
Referenced by GAME_InitStartup().
Will remove those actors that should not be used in the team.
Definition at line 112 of file cl_game_team.cpp.
References characterActive, chrDisplayList, i, LIST_Foreach, and LIST_Remove().
Referenced by GAME_InitStartup().
Removes a user created team.
Definition at line 124 of file cl_game_team.cpp.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), FS_RemoveFile(), GAME_GetAbsoluteSavePath(), MAX_OSPATH, and Q_strcat().
Referenced by GAME_InitStartup().
| bool GAME_TeamGetFreeFilename | ( | char * | filename, |
| size_t | size ) |
Searches a free team filename.
| [out] | filename | The team filename that can be used. |
| [in] | size | The size of the filename buffer. |
true if a valid team name was found, false otherwise. In the latter case, don't use anything from the filename buffer Definition at line 276 of file cl_game_team.cpp.
References Com_sprintf(), FS_CheckFile(), GAME_GetRelativeSavePath(), and MAX_OSPATH.
Referenced by GAME_SaveTeam_f().
Reads the comments from team files.
Definition at line 141 of file cl_game_team.cpp.
References Com_Printf(), f, FILE_READ, FS_BuildFileList(), FS_FileExists(), FS_NextFileFromFileList(), FS_OpenFile(), FS_Read(), GAME_GetAbsoluteSavePath(), GAME_GetRelativeSavePath(), i, LittleLong, MAX_OSPATH, teamSaveFileHeader_t::name, Q_strcat(), Q_strncpyz(), teamSaveFileHeader_t::soldiercount, TEAM_SAVE_FILE_VERSION, UI_ExecuteConfunc(), va(), and teamSaveFileHeader_t::version.
Referenced by GAME_InitStartup().
This will activate/deactivate the actor for the team.
Definition at line 83 of file cl_game_team.cpp.
References characterActive, chrDisplayList, Cmd_Argc(), Cmd_Argv(), Com_Printf(), i, and LIST_Foreach.
Referenced by GAME_InitStartup().
Displays actor info and equipment and unused items in proper (filter) category.
Definition at line 511 of file cl_game_team.cpp.
References characterActive, chrDisplayList, Cvar_Set(), GAME_GetEquipment(), i, LIST_Foreach, TEXT_STANDARD, UI_ExecuteConfunc(), and UI_ResetData().
Referenced by GAME_InitStartup().