TapestryEngine

A 2D Platformer Game Engine
Log | Files | Refs

9374246f56835bbd670f9d0876a968d1e50b250d.svn-base (405B)


      1 #ifndef INPUT_H
      2 #define INPUT_H
      3 
      4 #include "Utils.h"
      5 #include "Event.h"
      6 
      7 struct KeyboardState
      8 {
      9 	bool mQ;
     10 	bool mW;
     11 	bool mE;
     12 	bool mLEFT;
     13 	bool mRIGHT;
     14 	bool mUP;
     15 	bool mDOWN;
     16 };
     17 
     18 class Control
     19 {
     20 public:
     21 
     22 	Control();
     23 
     24 	bool SendKeyEvent(int KeyID, int KeyState);
     25 
     26 	void ProcessKeyboard();
     27 
     28 	EventFeed mFeed;
     29 
     30 protected:
     31 
     32 	//KeyboardState mkeys;
     33 
     34 	const Uint8* mKeyState;
     35 	Uint8 mLastState[512];
     36 };
     37 
     38 #endif