X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=ABM2%2FEngine%2FInputTask.h;h=6f8cb43f1e36cc670e08ccde68f1308c20a2da28;hb=refs%2Fheads%2Flinux;hp=b81f80ab503c6349365d7985813fd66964b283ef;hpb=c100d6f67b06abb348319e277a66b6b7ab0c4bd5;p=matthijs%2FABM2.git diff --git a/ABM2/Engine/InputTask.h b/ABM2/Engine/InputTask.h index b81f80a..6f8cb43 100755 --- a/ABM2/Engine/InputTask.h +++ b/ABM2/Engine/InputTask.h @@ -10,6 +10,7 @@ #endif // _MSC_VER > 1000 #include "engine.h" +#include "Amaltheia/Input.h" #ifdef WIN32 #define DIRECTINPUT_VERSION 0x0800 #include @@ -24,17 +25,17 @@ public: bool Start(); void Update(); void Stop(); - - static BYTE keys[256], oldKeys[256]; + /* XXX: Yuck, static crapjes */ + static BYTE *keys, *oldKeys; //static CMMPointer > oldKeys; - //static int keyCount; + static int keyCount; static int dX,dY; static unsigned int buttons; static unsigned int oldButtons; - static bool inline curKey(int index) { return (keys[index] & 0x80) != 0; } - static bool inline oldKey(int index) { return (oldKeys[index] & 0x80) != 0; } + static bool inline curKey(int index) { return (keys[index]) != 0; } + static bool inline oldKey(int index) { return (oldKeys[index]) != 0; } //some helper functions to make certain things easier //static bool inline keyDown(int index) { return ( curKey(index))&&(!oldKey(index)); }