X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=ABM2%2FEngine%2FInputTask.h;h=6f8cb43f1e36cc670e08ccde68f1308c20a2da28;hb=9712243130639ad13f421415171df4e5fc1e4773;hp=337cd55f9916f53876f603ea56423bc7f10c8d77;hpb=357a451150c18b27f99cecd5f9d13be1ae5a9fdf;p=matthijs%2FABM2.git diff --git a/ABM2/Engine/InputTask.h b/ABM2/Engine/InputTask.h index 337cd55..6f8cb43 100755 --- a/ABM2/Engine/InputTask.h +++ b/ABM2/Engine/InputTask.h @@ -10,37 +10,32 @@ #endif // _MSC_VER > 1000 #include "engine.h" +#include "Amaltheia/Input.h" #ifdef WIN32 #define DIRECTINPUT_VERSION 0x0800 #include #endif // WIN32 - -#ifndef WIN32 -/* HACK to make this compile */ -#define BYTE unsigned char -#endif // !WIN32 - class CInputTask : public ITask { public: - CInputTask(); + CInputTask(CKernel* kernel); virtual ~CInputTask(); 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)); }