Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

BattleJets.h

Go to the documentation of this file.
00001 /*
00002 CS Senior Project 2003
00003 Team : Leftfield
00004 Project : ModernWarfare
00005 Members :
00006 - Russ Christensen              <rchriste@cs.utah.edu>
00007 - Todd Smith                    <tcsmith@cs.utah.edu>
00008 - Usit Duongsaa                 <duongsaa@cs.utah.edu>
00009 Copyright 2003 Russ Christensen, Usit Duongsaa, and Todd Smith. All rights reserved.
00010 
00011 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
00012 
00013 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 
00014 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 
00015 THIS SOFTWARE IS PROVIDED BY RUSS CHRISTENSEN, USIT DUONGSAA, AND TODD SMITH ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RUSS, USIT, TODD OR OTHER CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00016 */
00017 
00022 #ifndef INCLUDE_BATTLEJETS
00023 #define INCLUDE_BATTLEJETS
00024 
00025 #include "..\AEngine\AEngine.h"
00026 #include "BattleUnitData.h"
00027 #include "Globals.h"
00028 #include "BattleUnit.h"
00029 #include "BattleBullet.h"
00030 
00031 const int MAX_JETS              =               12;
00032 
00033 class BattleState;
00034 
00035 //------------------------------------------------------------------------------------
00036 namespace JetCommands
00037 {
00038         const int IDLE          =       0;
00039         const int BOMB          =       1;
00040         const int GUARD         =       2;
00041         const int RETURN        =       3;      
00042 }
00043 //------------------------------------------------------------------------------------
00044 class BattleJets
00045 {
00046 public:
00047         BattleJets() { *this=BattleJets(0,Colors::gray,'A',0); };
00048         BattleJets(int numJets, Vec3D color, char team, int cityID);
00049 
00050         void update();
00051         void render();
00052         void renderIcon(FLOAT y);               // render icon on RHS of screen at specified y coordinate
00053         int  getNumJets();
00054         bool isReadyForOrder();
00055         void orderToBomb( int targetGroup );
00056         void orderToGuard( Vec3D target );
00057         void orderToReturn();
00058         int  getCurrentCommand();
00059         void assignNewBombingTarget( int targetGroup ); 
00060         void assignNewGuardTarget( Vec3D target );
00061 
00062         void takeHit( BattleBullet &b );
00063 
00064         BattleState *BS;
00065 
00066 
00067         void    flyTo( Vec3D target );  // does 1 update loop of physics to move jets to target
00068         void fireAntiSurfaceMissiles();
00069         void fireAntiAirMissiles();
00070 
00071         char    m_team;
00072         Vec3D   m_color;
00073         int             m_totalHealth;                  // the total health of all jets in squadron
00074     int         m_numMissiles;                  // all missiles in the squadron
00075         int             m_delayTime;                    // time (in gameTicks) before they're available again
00076         Vec3D   m_target;
00077         int             m_cmdType;
00078         int             m_targetGroup;
00079         Vec3D   m_pos, m_dir;
00080         int             m_cityID;                               // the unique number of the city they are stationed (on overhead map)
00081 };
00082 //------------------------------------------------------------------------------------
00083 
00084 #endif

Generated on Wed Apr 23 05:50:14 2003 for Modern Warfare by doxygen1.3-rc2