cp_airfight.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_AIRFIGHT_H
00027 #define CLIENT_CL_AIRFIGHT_H
00028 
00029 #define BULLETS_PER_SHOT    1
00030 #define MAX_MULTIPLE_PROJECTILES    10
00031 
00037 #define AIRFIGHT_WEAPON_CAN_SHOOT 0
00038 #define AIRFIGHT_WEAPON_CAN_NOT_SHOOT_AT_THE_MOMENT -1
00039 #define AIRFIGHT_WEAPON_CAN_NEVER_SHOOT -2
00040 
00041 #define AIRFIGHT_BASE_CAN_T_FIRE -1
00042 
00044 typedef struct aircraftProjectile_s {
00045     const objDef_t *aircraftItem;       
00046     int idx;                
00047     vec3_t pos[MAX_MULTIPLE_PROJECTILES];   
00048     vec3_t projectedPos[MAX_MULTIPLE_PROJECTILES];  
00049     vec3_t oldDrawPos[MAX_MULTIPLE_PROJECTILES];    
00050     int numProjectiles;      
00051     qboolean hasMoved;       
00052     int numInterpolationPoints; 
00053     vec3_t idleTarget;      
00055     aircraft_t *attackingAircraft;  
00056     vec3_t attackerPos;     
00058     aircraft_t *aimedAircraft;  
00060     int time;               
00061     float angle;            
00062     qboolean bullets;       
00063     qboolean beam;          
00064 } aircraftProjectile_t;
00065 
00066 void AIRFIGHT_ExecuteActions(aircraft_t* air, aircraft_t* ufo);
00067 void AIRFIGHT_ActionsAfterAirfight(aircraft_t* shooter, aircraft_t* aircraft, qboolean phalanxWon);
00068 void AIRFIGHT_CampaignRunProjectiles(int dt);
00069 void AIRFIGHT_CampaignRunBaseDefence(int dt);
00070 int AIRFIGHT_CheckWeapon(const aircraftSlot_t *slot, float distance);
00071 int AIRFIGHT_ChooseWeapon(const aircraftSlot_t const *slot, int maxSlot, const vec3_t pos, const vec3_t targetPos);
00072 qboolean AIRFIGHT_BaseCanTargetUFO(const struct base_s *base, const aircraft_t *ufo);
00073 
00074 qboolean AIRFIGHT_SaveXML(mxml_node_t *parent);
00075 qboolean AIRFIGHT_LoadXML(mxml_node_t *parent);
00076 void AIRFIGHT_InitStartup(void);
00077 
00078 #endif /* CLIENT_CL_AIRFIGHT_H */

Generated by  doxygen 1.6.2