Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

/Users/blackie/Documents/myRepository/phobosengine-vc2005/phobosengine/phobosengine/InputSystem.h

Go to the documentation of this file.
00001 
00002 
00003 #ifndef INPUTSYSTEM_H
00004 #define INPUTSYSTEM_H
00005 
00006 
00007 namespace pge {
00008 
00009 
00010         class InputSystem {
00011         public:
00012 
00013                 //************************************************************************
00014                 //
00015                 // Data structures
00016                 //
00017                 //************************************************************************
00018                 enum InputAction {
00019                         Forward, Backward, Up, Down, SlideLeft, SlideRight, TurnLeft, TurnRight, TurnUp, TurnDown
00020                 };
00021 
00022 
00023                 //************************************************************************
00024                 //
00025                 // Destructor
00026                 //
00027                 //************************************************************************
00028                 ~InputSystem(void);
00029 
00030 
00031                 //************************************************************************
00032                 //
00033                 // Functions
00034                 //
00035                 //************************************************************************
00036                 static InputSystem* getInstance(void);
00037                 void timer(unsigned int delay);
00038                 void keyDown(int key);
00039                 void keyUp(int key);
00040                 void mouseMotion(unsigned int delay, int x, int y);
00041                 void mousePress(int button, int x, int y);
00042                 void mouseRelease(int button, int x, int y);
00043 
00044 
00045         private:
00046                 //************************************************************************
00047                 //
00048                 // Constructor
00049                 //
00050                 //************************************************************************
00051                 InputSystem(void);
00052 
00053 
00054                 //************************************************************************
00055                 //
00056                 // Variables
00057                 //
00058                 //************************************************************************
00059                 // Keyboard mapping to actions
00060                 int m_keyTurnLeft;
00061                 int m_keyTurnRight;
00062                 int m_keySlideLeft;
00063                 int m_keySlideRight;
00064                 int m_keyForward;
00065                 int m_keyBackward;
00066                 int m_keyUp;
00067                 int m_keyDown;
00068                 int m_keyRun;
00069                 int m_keyJump;
00070                 int m_keyCrouch;
00071                 int m_keyFire;
00072 
00073                 // Keyboard active check
00074                 bool m_turnLeft;
00075                 bool m_turnRight;
00076                 bool m_slideLeft;
00077                 bool m_slideRight;
00078                 bool m_forward;
00079                 bool m_backward;
00080                 bool m_up;
00081                 bool m_down;
00082                 bool m_run;
00083                 bool m_jump;
00084                 bool m_crouch;
00085                 bool m_fire;
00086         };
00087 };
00088 
00089 #endif

Generated on Mon Oct 16 12:08:10 2006 for Phobosengine by doxygen 1.3.4