UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cp_team_callbacks.cpp File Reference

Menu related callback functions for the team menu. More...

#include "../../cl_shared.h"
#include "../../cl_team.h"
#include "../../cgame/cl_game_team.h"
#include "../../ui/ui_dataids.h"
#include "cp_campaign.h"
#include "cp_team.h"
#include "cp_team_callbacks.h"
#include "cp_hospital.h"

Go to the source code of this file.

Functions

static void CP_TEAM_AssignSoldierByUCN_f (void)
 Adds or removes a soldier to/from an aircraft using his/her UCN as reference. More...
 
static void CP_TEAM_SelectActorByUCN_f (void)
 Selects a soldier by his/her Unique Character Number on team UI. More...
 
static void CP_TEAM_DeEquipActor_f (void)
 Removes every item from a soldier. More...
 
static void CP_TEAM_FillEmployeeList_f (void)
 Fill the employee list for Soldier/Pilot assignment. More...
 
static void CP_TEAM_FillEquipSoldierList_f (void)
 Fill the employee list for the in-base soldier equip screen and initialize the inventory. More...
 
static void CP_TEAM_FillBDEFEmployeeList_f (void)
 Fill the employee list for Base defence mission. More...
 
static void CP_TEAM_ChangeSkin_f (void)
 Change the skin of a soldier. More...
 
void CP_TEAM_InitCallbacks (void)
 Function that registers team (UI) callbacks. More...
 
void CP_TEAM_ShutdownCallbacks (void)
 Function that unregisters team (UI) callbacks. More...
 

Variables

static const cmdList_t teamCallbacks []
 

Detailed Description

Menu related callback functions for the team menu.

Definition in file cp_team_callbacks.cpp.

Function Documentation

static void CP_TEAM_AssignSoldierByUCN_f ( void  )
static
static void CP_TEAM_ChangeSkin_f ( void  )
static

Change the skin of a soldier.

Definition at line 348 of file cp_team_callbacks.cpp.

References character_s::bodySkin, cgi, cgame_import_s::chr, cgame_import_s::Cmd_Argv(), and E_GetEmployeeFromChrUCN().

static void CP_TEAM_DeEquipActor_f ( void  )
static
static void CP_TEAM_FillBDEFEmployeeList_f ( void  )
static
void CP_TEAM_InitCallbacks ( void  )

Function that registers team (UI) callbacks.

Definition at line 383 of file cp_team_callbacks.cpp.

References cgi.

Referenced by CP_AddCampaignCallbackCommands().

static void CP_TEAM_SelectActorByUCN_f ( void  )
static

Selects a soldier by his/her Unique Character Number on team UI.

Definition at line 80 of file cp_team_callbacks.cpp.

References B_GetCurrentSelectedBase(), cgi, Employee::chr, cgame_import_s::Cmd_Argv(), CP_SetEquipContainer(), E_GetEmployeeFromChrUCN(), and ERR_DROP.

void CP_TEAM_ShutdownCallbacks ( void  )

Function that unregisters team (UI) callbacks.

Definition at line 391 of file cp_team_callbacks.cpp.

References cgi.

Referenced by CP_RemoveCampaignCallbackCommands().

Variable Documentation

const cmdList_t teamCallbacks[]
static
Initial value:
= {
{"ui_team_select_ucn", CP_TEAM_SelectActorByUCN_f, "Select a soldier in the team menu by his/her UCN"},
{"ui_team_assign_ucn", CP_TEAM_AssignSoldierByUCN_f, "Add/remove soldier to the aircraft"},
{"ui_team_fill", CP_TEAM_FillEmployeeList_f, "Fill the Team assignment UI with employee"},
{"ui_team_fillbdef", CP_TEAM_FillBDEFEmployeeList_f, "Fill the Team assignment UI with employee for base defence"},
{"ui_team_fillequip", CP_TEAM_FillEquipSoldierList_f, "Fill the employee list for the in-base soldier equip screen and initialize the inventory"},
{"ui_team_deequip", CP_TEAM_DeEquipActor_f, "De-equip soldier"},
{"ui_team_changeskin", CP_TEAM_ChangeSkin_f, "Change the skin of a soldier"},
{nullptr, nullptr, nullptr}
}
static void CP_TEAM_FillEmployeeList_f(void)
Fill the employee list for Soldier/Pilot assignment.
static void CP_TEAM_AssignSoldierByUCN_f(void)
Adds or removes a soldier to/from an aircraft using his/her UCN as reference.
static void CP_TEAM_ChangeSkin_f(void)
Change the skin of a soldier.
static void CP_TEAM_SelectActorByUCN_f(void)
Selects a soldier by his/her Unique Character Number on team UI.
static void CP_TEAM_FillBDEFEmployeeList_f(void)
Fill the employee list for Base defence mission.
static void CP_TEAM_FillEquipSoldierList_f(void)
Fill the employee list for the in-base soldier equip screen and initialize the inventory.
static void CP_TEAM_DeEquipActor_f(void)
Removes every item from a soldier.

Definition at line 367 of file cp_team_callbacks.cpp.