UFO: Alien Invasion
Doxygen documentation generating
cp_transfer.h
Go to the documentation of this file.
1 
6 /*
7 Copyright (C) 2002-2023 UFO: Alien Invasion.
8 
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 
18 See the GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 */
24 
25 #pragma once
26 
27 #include "../../DateTime.h"
28 
30 #define DEFAULT_TRANSFER_TIME 2.0f
31 
33 typedef struct transfer_s {
36  class DateTime event;
41  linkedList_t* employees[MAX_EMPL];
43 
44  bool hasItems;
45  bool hasEmployees;
46 } transfer_t;
47 
48 #define TR_Foreach(var) LIST_Foreach(ccs.transfers, transfer_t, var)
49 #define TR_ForeachEmployee(var, transfer, employeeType) LIST_Foreach(transfer->employees[employeeType], Employee, var)
50 #define TR_ForeachAircraft(var, transfer) LIST_Foreach(transfer->aircraft, aircraft_t, var)
51 
52 void TR_TransferRun(void);
53 void TR_NotifyAircraftRemoved(const aircraft_t* aircraft);
54 
55 transfer_t* TR_TransferStart(base_t* srcBase, transfer_t& transData);
56 
57 void TR_InitStartup(void);
58 void TR_Shutdown(void);
Transfer information (they are being stored in ccs.transfers).
Definition: cp_transfer.h:33
Class describing a point of time.
Definition: DateTime.h:30
void TR_InitStartup(void)
Defines commands and cvars for the Transfer menu(s).
class ItemCargo * itemCargo
Definition: cp_transfer.h:39
class AlienCargo * alienCargo
Definition: cp_transfer.h:40
A base with all it's data.
Definition: cp_base.h:84
transfer_t * TR_TransferStart(base_t *srcBase, transfer_t &transData)
Starts a transfer.
base_t * destBase
Definition: cp_transfer.h:34
void TR_NotifyAircraftRemoved(const aircraft_t *aircraft)
Notify that an aircraft has been removed.
Item cargo class.
Definition: itemcargo.h:41
base_t * srcBase
Definition: cp_transfer.h:35
linkedList_t * aircraft
Definition: cp_transfer.h:42
An aircraft with all it's data.
Definition: cp_aircraft.h:115
void TR_TransferRun(void)
Checks whether given transfer should be processed.
int antimatter
Definition: cp_transfer.h:38
void TR_Shutdown(void)
Closing actions for transfer-subsystem.
bool hasEmployees
Definition: cp_transfer.h:45
bool hasItems
Definition: cp_transfer.h:44
Alien cargo class.
Definition: aliencargo.h:41