cp_transfer.h

Go to the documentation of this file.
00001 
00006 /*
00007 Copyright (C) 2002-2010 UFO: Alien Invasion.
00008 
00009 This program is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU General Public License
00011 as published by the Free Software Foundation; either version 2
00012 of the License, or (at your option) any later version.
00013 
00014 This program is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00017 
00018 See the GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
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 /* CLIENT_CL_TRANSFER_H */

Generated by  doxygen 1.6.2