Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

InputEngine.h

00001 
00002 #ifndef __INPUTENGINE_H_
00003 #define __INPUTENGINE_H_
00004 /*
00005 Peon - Win32 Games Programming Library
00006 Copyright (C) 2002-2005 Erik Yuzwa
00007 
00008 This library is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU Library General Public
00010 License as published by the Free Software Foundation; either
00011 version 2 of the License, or (at your option) any later version.
00012 
00013 This library is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 Library General Public License for more details.
00017 
00018 You should have received a copy of the GNU Library General Public
00019 License along with this library; if not, write to the Free
00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 
00022 Erik Yuzwa
00023 peon AT wazooinc DOT com
00024 */
00025 
00026 #include "ISingleton.h"
00027 
00028 #define JOYSTICK_DEAD_ZONE 32768.0f
00029 
00030 
00031 namespace peon
00032 {
00039         class PEONMAIN_API InputEngine : public ISingleton<InputEngine>
00040         {
00041         protected:
00043                 SDL_Joystick*           m_pJoystick;
00044 
00046                 bool                        m_bJoystickConnected;
00047 
00048         public:
00052                 InputEngine();
00053 
00057                 ~InputEngine();
00058 
00074                 static InputEngine& getSingleton(void);
00090                 static InputEngine* getSingletonPtr(void);
00091 
00092 
00106                 bool loadEngine( IniConfigReader* pConfig );
00107 
00111                 void unloadEngine();
00112 
00117                 Sint16 getJoyXAxis();
00118 
00123                 Sint16 getJoyYAxis();
00124 
00125         };
00126 }
00127 
00128 #endif

Generated on Thu Dec 1 01:55:40 2005 for Peon by  doxygen 1.4.1