00001 #ifndef __JOYSTICK_H__ 00002 #define __JOYSTICK_H__ 00003 00004 #include <SDL/SDL.h> 00005 00006 #include "../../InputManager.h" 00007 #include "../../Input.h" 00008 00009 namespace NE 00010 { 00011 class SDL_Joy : public Input 00012 { 00013 private: 00014 SDL_Joystick* m_pJoy; 00015 InputManager::ArrowsDirection m_directions; 00016 InputManager::Buttons m_buttons; 00017 00018 void updateDirections(); 00019 void updateButtons(); 00020 00021 public: 00022 SDL_Joy(); 00023 ~SDL_Joy(); 00024 00025 NE::InputManager::ArrowsDirection getDirectionsPressed(void)const { return m_directions; } 00026 NE::InputManager::Buttons getButtonsState(void) { return m_buttons; }; 00027 bool needEscape(void); 00028 void update(void); 00029 }; 00030 } 00031 00070 #endif