InputDeviceJoystick.h

Go to the documentation of this file.
00001 
00005 /* Copyright © 2009 James Legg.
00006     This program 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 3 of the License, or
00009     (at your option) any later version.
00010 */
00011 #ifndef INPUT_DEVICE_JOYSTICK_H_
00012 #define INPUT_DEVICE_JOYSTICK_H_
00013 
00014 #include "InputDevice.h"
00015 #include <SDL.h>
00016 
00017 namespace Engine
00018 {
00019 
00026 class InputDeviceJoystick : public Engine::InputDevice
00027 {
00028 public:
00031     InputDeviceJoystick(int index);
00032     ~InputDeviceJoystick();
00033     int get_acceleration();
00034     int get_slide();
00035     int get_steering();
00036     void poll();
00037 private:
00039     int joystick_index;
00040     SDL_Joystick *sdl_joystick_handle;
00041     int steering, acceleration, slide;
00042     bool slide_left_down, slide_right_down;
00043 };
00044 
00045 }
00046 
00047 #endif /*INPUT_DEVICE_JOYSTICK_H_*/

Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:12 2010 by Doxygen version 1.4.7 for Racer version svn335.