Header file for Transfer stuff. More...
Go to the source code of this file.
Data Structures | |
struct | transfer_s |
Transfer informations (they are being stored in ccs.transfers[MAX_TRANSFERS]. More... | |
struct | transferCargo_s |
Array of current cargo onboard. More... | |
Defines | |
#define | MAX_TRANSFERS 16 |
#define | TRANS_LIST_EMPTY_SLOT -1 |
Typedefs | |
typedef struct transfer_s | transfer_t |
Transfer informations (they are being stored in ccs.transfers[MAX_TRANSFERS]. | |
typedef struct transferCargo_s | transferCargo_t |
Array of current cargo onboard. | |
Enumerations | |
enum | { CARGO_TYPE_INVALID = 0, CARGO_TYPE_ITEM, CARGO_TYPE_EMPLOYEE, CARGO_TYPE_ALIEN_DEAD, CARGO_TYPE_ALIEN_ALIVE, CARGO_TYPE_AIRCRAFT, CARGO_TYPE_MAX } |
enum | { TRANS_ALIEN_ALIVE, TRANS_ALIEN_DEAD, TRANS_ALIEN_MAX } |
Functions | |
void | TR_TransferCheck (void) |
Checks whether given transfer should be processed. | |
void | TR_NotifyAircraftRemoved (const aircraft_t *aircraft) |
Notify that an aircraft has been removed. | |
void | TR_InitStartup (void) |
Defines commands and cvars for the Transfer menu(s). | |
void | TR_TransferStart (base_t *srcBase, struct transferData_s *transData) |
Starts a transfer. | |
void | TR_TransferAlienAfterMissionStart (const base_t *base, aircraft_t *transferAircraft) |
Starts alien bodies transfer between mission and base. | |
transfer_t * | TR_GetNext (transfer_t *lastTransfer) |
Iterates through transfers. |
Header file for Transfer stuff.
Definition in file cp_transfer.h.
#define MAX_TRANSFERS 16 |
Definition at line 29 of file cp_transfer.h.
Referenced by TR_TransferAlienAfterMissionStart(), and TR_TransferStart().
#define TRANS_LIST_EMPTY_SLOT -1 |
Definition at line 30 of file cp_transfer.h.
Referenced by TR_AircraftListSelect(), TR_CargoList(), TR_CargoListSelect_f(), TR_CheckAircraft(), TR_EmptyTransferCargo(), TR_Init_f(), TR_InitCallbacks(), TR_LoadXML(), TR_NotifyAircraftRemoved(), TR_SaveXML(), TR_TransferClose_f(), TR_TransferListClear_f(), TR_TransferStart(), and TR_TransferStart_f().
typedef struct transfer_s transfer_t |
Transfer informations (they are being stored in ccs.transfers[MAX_TRANSFERS].
typedef struct transferCargo_s transferCargo_t |
Array of current cargo onboard.
anonymous enum |
CARGO_TYPE_INVALID | |
CARGO_TYPE_ITEM | |
CARGO_TYPE_EMPLOYEE | |
CARGO_TYPE_ALIEN_DEAD | |
CARGO_TYPE_ALIEN_ALIVE | |
CARGO_TYPE_AIRCRAFT | |
CARGO_TYPE_MAX |
Definition at line 34 of file cp_transfer.h.
anonymous enum |
Definition at line 45 of file cp_transfer.h.
transfer_t* TR_GetNext | ( | transfer_t * | lastTransfer | ) |
Iterates through transfers.
[in] | lastTransfer | Pointer of the transfer to iterate from. call with NULL to get the first one. |
Definition at line 38 of file cp_transfer.c.
References ccs, ccs_s::numTransfers, and ccs_s::transfers.
Referenced by TR_NotifyAircraftRemoved(), TR_SaveXML(), and TR_TransferCheck().
void TR_InitStartup | ( | void | ) |
Defines commands and cvars for the Transfer menu(s).
Definition at line 756 of file cp_transfer.c.
References Cmd_AddCommand().
Referenced by CP_InitStartup().
void TR_NotifyAircraftRemoved | ( | const aircraft_t * | aircraft | ) |
Notify that an aircraft has been removed.
[in] | aircraft | Aircraft that was removed from the game |
Definition at line 418 of file cp_transfer.c.
References transfer_s::active, transfer_s::aircraftArray, ccs, transfer_s::hasAircraft, aircraft_s::idx, MAX_AIRCRAFT, ccs_s::numAircraft, REMOVE_ELEM_MEMSET, TR_GetNext(), and TRANS_LIST_EMPTY_SLOT.
Referenced by AIR_DeleteAircraft().
void TR_TransferAlienAfterMissionStart | ( | const base_t * | base, | |
aircraft_t * | transferAircraft | |||
) |
Starts alien bodies transfer between mission and base.
[in] | base | Pointer to the base to send the alien bodies. |
Definition at line 191 of file cp_transfer.c.
References _, transfer_s::active, AL_GetAircraftAlienCargo, AL_GetAircraftAlienCargoTypes, AL_SetAircraftAlienCargoTypes, transfer_s::alienAmount, base_s::alienscont, aliensTmp_s::amountAlive, aliensTmp_s::amountDead, B_GetFoundedBaseByIDX(), BREATHINGAPPARATUS_TECH, ccs, CHRSH_IsTeamDefAlien(), Com_DPrintf(), Com_Error(), Com_Printf(), Com_sprintf(), csi, ccs_s::date, date_s::day, DEBUG_CLIENT, transfer_s::destBase, ERR_DROP, transfer_s::event, GetDistanceOnGlobe(), transfer_s::hasAliens, transfer_s::hasItems, i, objDef_s::idx, base_s::idx, INVSH_GetItemByID(), transfer_s::itemAmount, MAX_TRANSFERS, MSG_TRANSFERFINISHED, MSO_CheckAddNewMessage(), base_s::name, NT_TRANSFER_ALIENBODIES_DEFERED, ccs_s::numAliensTD, ccs_s::numTransfers, aircraft_s::pos, base_s::pos, technology_s::provides, qfalse, qtrue, RS_GetTechByID(), RS_IsResearched_ptr(), date_s::sec, SECONDS_PER_DAY, transfer_s::srcBase, aliensTmp_s::teamDef, aliensCont_s::teamDef, csi_s::teamDef, TRANS_ALIEN_ALIVE, TRANS_ALIEN_DEAD, ccs_s::transfers, and UI_PopWindow().
Referenced by TR_TransferBaseListClick_f().
void TR_TransferCheck | ( | void | ) |
Checks whether given transfer should be processed.
Definition at line 438 of file cp_transfer.c.
References transfer_s::active, ccs, ccs_s::date, date_s::day, transfer_s::destBase, transfer_s::event, ccs_s::numTransfers, REMOVE_ELEM, date_s::sec, TR_GetNext(), TR_TransferEnd(), and ccs_s::transfers.
Referenced by CL_CampaignRun().
void TR_TransferStart | ( | base_t * | srcBase, | |
struct transferData_s * | transData | |||
) |
Starts a transfer.
[in] | srcBase | start transfer from this base |
[in] | transData | Container holds transfer details |
Definition at line 313 of file cp_transfer.c.
References transfer_s::active, AIR_AircraftGetFromIDX(), AIR_RemoveEmployees(), AIR_TRANSFER, transfer_s::aircraftArray, transfer_s::alienAmount, employee_s::baseHired, ccs, CHRSH_IsTeamDefAlien(), Com_DPrintf(), Com_Error(), Com_Printf(), csi, ccs_s::date, date_s::day, DEBUG_CLIENT, transfer_s::destBase, E_IsInBase(), E_ResetEmployee(), transfer_s::employeeArray, ERR_DROP, transfer_s::event, GetDistanceOnGlobe(), transfer_s::hasAircraft, transfer_s::hasAliens, transfer_s::hasEmployees, transfer_s::hasItems, i, transfer_s::itemAmount, MAX_EMPL, MAX_TRANSFERS, ccs_s::numAircraft, ccs_s::numAliensTD, ccs_s::numEmployees, csi_s::numODs, ccs_s::numTransfers, base_s::pos, PR_ProductionAllowed(), qtrue, RS_ResearchAllowed(), date_s::sec, SECONDS_PER_DAY, transfer_s::srcBase, aircraft_s::status, csi_s::teamDef, transferData_s::trAircraftsTmp, transferData_s::trAliensTmp, TRANS_ALIEN_ALIVE, TRANS_ALIEN_DEAD, TRANS_LIST_EMPTY_SLOT, employee_s::transfer, transferData_s::transferBase, ccs_s::transfers, transferData_s::trCargoCountTmp, transferData_s::trEmployeesTmp, and transferData_s::trItemsTmp.
Referenced by TR_TransferStart_f().