UFO: Alien Invasion
cp_transfer.h File Reference

Header file for Transfer stuff. More...

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

Go to the source code of this file.

Data Structures

struct  transfer_t
 Transfer information (they are being stored in ccs.transfers). More...
 

Macros

#define DEFAULT_TRANSFER_TIME   2.0f
 Default transfer time for cases with no source/dest base. More...
 
#define TR_Foreach(var)   LIST_Foreach(ccs.transfers, transfer_t, var)
 
#define TR_ForeachEmployee(var, transfer, employeeType)   LIST_Foreach(transfer->employees[employeeType], Employee, var)
 
#define TR_ForeachAircraft(var, transfer)   LIST_Foreach(transfer->aircraft, aircraft_t, var)
 

Functions

void TR_TransferRun (void)
 Checks whether given transfer should be processed. More...
 
void TR_NotifyAircraftRemoved (const aircraft_t *aircraft)
 Notify that an aircraft has been removed. More...
 
transfer_tTR_TransferStart (base_t *srcBase, transfer_t &transData)
 Starts a transfer. More...
 
void TR_InitStartup (void)
 Defines commands and cvars for the Transfer menu(s). More...
 
void TR_Shutdown (void)
 Closing actions for transfer-subsystem. More...
 

Detailed Description

Header file for Transfer stuff.

Definition in file cp_transfer.h.

Macro Definition Documentation

◆ DEFAULT_TRANSFER_TIME

#define DEFAULT_TRANSFER_TIME   2.0f

Default transfer time for cases with no source/dest base.

Definition at line 30 of file cp_transfer.h.

◆ TR_Foreach

#define TR_Foreach (   var)    LIST_Foreach(ccs.transfers, transfer_t, var)

Definition at line 48 of file cp_transfer.h.

◆ TR_ForeachAircraft

#define TR_ForeachAircraft (   var,
  transfer 
)    LIST_Foreach(transfer->aircraft, aircraft_t, var)

Definition at line 50 of file cp_transfer.h.

◆ TR_ForeachEmployee

#define TR_ForeachEmployee (   var,
  transfer,
  employeeType 
)    LIST_Foreach(transfer->employees[employeeType], Employee, var)

Definition at line 49 of file cp_transfer.h.

Function Documentation

◆ TR_InitStartup()

void TR_InitStartup ( void  )

Defines commands and cvars for the Transfer menu(s).

See also
UI_InitStartup

Definition at line 569 of file cp_transfer.cpp.

References cgi, and TR_InitCallbacks().

Referenced by CP_InitStartup().

◆ TR_NotifyAircraftRemoved()

void TR_NotifyAircraftRemoved ( const aircraft_t aircraft)

Notify that an aircraft has been removed.

Parameters
[in]aircraftAircraft that was removed from the game
See also
AIR_DeleteAircraft

Definition at line 285 of file cp_transfer.cpp.

References cgi, and TR_Foreach.

Referenced by AIR_DeleteAircraft().

◆ TR_Shutdown()

void TR_Shutdown ( void  )

Closing actions for transfer-subsystem.

Definition at line 580 of file cp_transfer.cpp.

References ccs, cgi, EMPL_SOLDIER, i, MAX_EMPL, TR_Foreach, TR_ShutdownCallbacks(), and ccs_t::transfers.

Referenced by CP_Shutdown().

◆ TR_TransferRun()

void TR_TransferRun ( void  )

Checks whether given transfer should be processed.

See also
CP_CampaignRun

Definition at line 300 of file cp_transfer.cpp.

References ccs, ccs_t::date, TR_Foreach, and TR_TransferEnd().

Referenced by CP_CampaignRun(), and TEST_F().

◆ TR_TransferStart()