cp_transfer.h
Go to the documentation of this file.00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef CLIENT_CL_TRANSFER_H
00027 #define CLIENT_CL_TRANSFER_H
00028
00029 #define MAX_TRANSFERS 16
00030 #define TRANS_LIST_EMPTY_SLOT -1
00031
00032 struct transferData_s;
00033
00034 enum {
00035 CARGO_TYPE_INVALID = 0,
00036 CARGO_TYPE_ITEM,
00037 CARGO_TYPE_EMPLOYEE,
00038 CARGO_TYPE_ALIEN_DEAD,
00039 CARGO_TYPE_ALIEN_ALIVE,
00040 CARGO_TYPE_AIRCRAFT,
00041
00042 CARGO_TYPE_MAX
00043 };
00044
00045 enum {
00046 TRANS_ALIEN_ALIVE,
00047 TRANS_ALIEN_DEAD,
00048
00049 TRANS_ALIEN_MAX
00050 };
00051
00053 typedef struct transfer_s {
00054 qboolean active;
00055 base_t *destBase;
00056 base_t *srcBase;
00057 date_t event;
00059 int itemAmount[MAX_OBJDEFS];
00060 int alienAmount[MAX_TEAMDEFS][TRANS_ALIEN_MAX];
00061 struct employee_s *employeeArray[MAX_EMPL][MAX_EMPLOYEES];
00062 int aircraftArray[MAX_AIRCRAFT];
00064 qboolean hasItems;
00065 qboolean hasEmployees;
00066 qboolean hasAliens;
00067 qboolean hasAircraft;
00068 } transfer_t;
00069
00071 typedef struct transferCargo_s {
00072 int type;
00073 int itemidx;
00074 } transferCargo_t;
00075
00076 void TR_TransferCheck(void);
00077 void TR_NotifyAircraftRemoved(const aircraft_t *aircraft);
00078
00079 void TR_InitStartup(void);
00080
00081 void TR_TransferStart(base_t *srcBase, struct transferData_s *transData);
00082 void TR_TransferAlienAfterMissionStart(const base_t *base, aircraft_t *transferAircraft);
00083
00084 transfer_t* TR_GetNext(transfer_t *lastTransfer);
00085
00086 #endif