TankKeyboardControlUtil.h

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////////////
00002 //    Scorched3D (c) 2000-2009
00003 //
00004 //    This file is part of Scorched3D.
00005 //
00006 //    Scorched3D is free software; you can redistribute it and/or modify
00007 //    it under the terms of the GNU General Public License as published by
00008 //    the Free Software Foundation; either version 2 of the License, or
00009 //    (at your option) any later version.
00010 //
00011 //    Scorched3D is distributed in the hope that it will be useful,
00012 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //    GNU General Public License for more details.
00015 //
00016 //    You should have received a copy of the GNU General Public License
00017 //    along with Scorched3D; if not, write to the Free Software
00018 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 ////////////////////////////////////////////////////////////////////////////////
00020 
00021 #if !defined(AFX_TankKeyboardControlUtil_H__F71C91A5_B74D_4109_8F7B_ACD471025C28__INCLUDED_)
00022 #define AFX_TankKeyboardControlUtil_H__F71C91A5_B74D_4109_8F7B_ACD471025C28__INCLUDED_
00023 
00024 class Tank;
00025 class VirtualSoundSource;
00026 class TankKeyboardControlUtil
00027 {
00028 public:
00029         static void keyboardCheck(Tank *tank,
00030                 const unsigned state, 
00031                 float frameTime, char *buffer, unsigned int keyState);
00032         static void endPlayMove(Tank *tank);
00033 
00034         // Tank move methods and tank defense methods
00035         //
00036         // The tankAI and its derived classes call these methods to perform
00037         // the actions associated with the method name.
00038         // Humans can only be on a client machine so we
00039         // don't need to check if we are on the server etc..
00040         static void fireShot(Tank *tank);
00041         static void skipShot(Tank *tank);
00042         static void resign(Tank *tank);
00043         static void parachutesUpDown(Tank *tank, unsigned int paraId=0);
00044         static void shieldsUpDown(Tank *tank, unsigned int shieldId=0);
00045         static void useBattery(Tank *tank, unsigned int batteryId);
00046 
00047 protected:
00048         static void movePower(Tank *tank, char *buffer, unsigned int keyState, float frameTime);
00049         static void moveUpDown(Tank *tank, char *buffer, unsigned int keyState, float frameTime);
00050         static void moveLeftRight(Tank *tank, char *buffer, unsigned int keyState, float frameTime);
00051         static void leftRightHUD(Tank *tank);
00052         static void upDownHUD(Tank *tank);
00053         static void powerHUD(Tank *tank);
00054         static void autoAim(Tank *tank);
00055         static void prevWeapon(Tank *tank);
00056         static void nextWeapon(Tank *tank);
00057 
00058         static VirtualSoundSource *elevateSound_;
00059         static VirtualSoundSource *rotateSound_;
00060         static VirtualSoundSource *startSound_;
00061         static VirtualSoundSource *powerSound_;
00062 
00063 private:
00064         TankKeyboardControlUtil();
00065         virtual ~TankKeyboardControlUtil();
00066 };
00067 
00068 #endif // !defined(AFX_TankKeyboardControlUtil_H__F71C91A5_B74D_4109_8F7B_ACD471025C28__INCLUDED_)

Generated on Mon Feb 16 15:14:47 2009 for Scorched3D by  doxygen 1.5.3