UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
cp_transfer.h
Go to the documentation of this file.
1
5
6
/*
7
Copyright (C) 2002-2025 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 {
34
base_t
*
destBase
;
35
base_t
*
srcBase
;
36
class
DateTime
event
;
37
38
int
antimatter
;
39
class
ItemCargo
*
itemCargo
;
40
class
AlienCargo
*
alienCargo
;
41
linkedList_t
*
employees
[
MAX_EMPL
];
42
linkedList_t
*
aircraft
;
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
);
DateTime.h
DateTime class definition.
AlienCargo
Alien cargo class.
Definition
aliencargo.h:41
DateTime
Class describing a point of time.
Definition
DateTime.h:31
ItemCargo
Item cargo class.
Definition
itemcargo.h:41
MAX_EMPL
@ MAX_EMPL
Definition
cp_employee.h:36
TR_InitStartup
void TR_InitStartup(void)
Defines commands and cvars for the Transfer menu(s).
Definition
cp_transfer.cpp:569
TR_TransferStart
transfer_t * TR_TransferStart(base_t *srcBase, transfer_t &transData)
Starts a transfer.
Definition
cp_transfer.cpp:159
TR_TransferRun
void TR_TransferRun(void)
Checks whether given transfer should be processed.
Definition
cp_transfer.cpp:300
TR_Shutdown
void TR_Shutdown(void)
Closing actions for transfer-subsystem.
Definition
cp_transfer.cpp:580
TR_NotifyAircraftRemoved
void TR_NotifyAircraftRemoved(const aircraft_t *aircraft)
Notify that an aircraft has been removed.
Definition
cp_transfer.cpp:285
aircraft_t
An aircraft with all it's data.
Definition
cp_aircraft.h:115
base_t
A base with all it's data.
Definition
cp_base.h:84
linkedList_t
Definition
list.h:30
transfer_t
Transfer information (they are being stored in ccs.transfers).
Definition
cp_transfer.h:33
transfer_t::hasItems
bool hasItems
Definition
cp_transfer.h:44
transfer_t::destBase
base_t * destBase
Definition
cp_transfer.h:34
transfer_t::antimatter
int antimatter
Definition
cp_transfer.h:38
transfer_t::aircraft
linkedList_t * aircraft
Definition
cp_transfer.h:42
transfer_t::alienCargo
class AlienCargo * alienCargo
Definition
cp_transfer.h:40
transfer_t::itemCargo
class ItemCargo * itemCargo
Definition
cp_transfer.h:39
transfer_t::employees
linkedList_t * employees[MAX_EMPL]
Definition
cp_transfer.h:41
transfer_t::hasEmployees
bool hasEmployees
Definition
cp_transfer.h:45
transfer_t::srcBase
base_t * srcBase
Definition
cp_transfer.h:35
transfer_t::event
class DateTime event
Definition
cp_transfer.h:36
src
client
cgame
campaign
cp_transfer.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0