UFO: Alien Invasion
Loading...
Searching...
No Matches
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"
Include dependency graph for cp_team_callbacks.cpp:

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.
static void CP_TEAM_SelectActorByUCN_f (void)
 Selects a soldier by his/her Unique Character Number on team UI.
static void CP_TEAM_DeEquipActor_f (void)
 Removes every item from a soldier.
static void CP_TEAM_FillEmployeeList_f (void)
 Fill the employee list for Soldier/Pilot assignment.
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_FillBDEFEmployeeList_f (void)
 Fill the employee list for Base defence mission.
static void CP_TEAM_ChangeSkin_f (void)
 Change the skin of a soldier.
void CP_TEAM_InitCallbacks (void)
 Function that registers team (UI) callbacks.
void CP_TEAM_ShutdownCallbacks (void)
 Function that unregisters team (UI) callbacks.

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

◆ CP_TEAM_AssignSoldierByUCN_f()

void CP_TEAM_AssignSoldierByUCN_f ( void )
static

◆ CP_TEAM_ChangeSkin_f()

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_t::bodySkin, cgi, Employee::chr, E_GetEmployeeFromChrUCN(), and Employee::isSoldier().

◆ CP_TEAM_DeEquipActor_f()

void CP_TEAM_DeEquipActor_f ( void )
static

◆ CP_TEAM_FillBDEFEmployeeList_f()

void CP_TEAM_FillBDEFEmployeeList_f ( void )
static

◆ CP_TEAM_FillEmployeeList_f()

◆ CP_TEAM_FillEquipSoldierList_f()

◆ CP_TEAM_InitCallbacks()

void CP_TEAM_InitCallbacks ( void )

Function that registers team (UI) callbacks.

Definition at line 383 of file cp_team_callbacks.cpp.

References cgi, and teamCallbacks.

Referenced by CP_AddCampaignCallbackCommands().

◆ CP_TEAM_SelectActorByUCN_f()

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, CP_SetEquipContainer(), E_GetEmployeeFromChrUCN(), and ERR_DROP.

◆ CP_TEAM_ShutdownCallbacks()

void CP_TEAM_ShutdownCallbacks ( void )

Function that unregisters team (UI) callbacks.

Definition at line 391 of file cp_team_callbacks.cpp.

References cgi, and teamCallbacks.

Referenced by CP_RemoveCampaignCallbackCommands().

Variable Documentation

◆ teamCallbacks

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_FillEquipSoldierList_f(void)
Fill the employee list for the in-base soldier equip screen and initialize the inventory.
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_AssignSoldierByUCN_f(void)
Adds or removes a soldier to/from an aircraft using his/her UCN as reference.
static void CP_TEAM_DeEquipActor_f(void)
Removes every item from a soldier.
static void CP_TEAM_ChangeSkin_f(void)
Change the skin of a soldier.

Definition at line 367 of file cp_team_callbacks.cpp.

Referenced by CP_TEAM_InitCallbacks(), and CP_TEAM_ShutdownCallbacks().