projects
/
matthijs
/
ABM2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Remove WITH_SDL ifdef.
[matthijs/ABM2.git]
/
ABM2
/
Engine
/
InputTask.h
diff --git
a/ABM2/Engine/InputTask.h
b/ABM2/Engine/InputTask.h
index 0fea22b5de820387d7f91fbbfaca98a925dd653d..6f8cb43f1e36cc670e08ccde68f1308c20a2da28 100755
(executable)
--- a/
ABM2/Engine/InputTask.h
+++ b/
ABM2/Engine/InputTask.h
@@
-10,6
+10,7
@@
#endif // _MSC_VER > 1000
\r
\r
#include "engine.h"
\r
#endif // _MSC_VER > 1000
\r
\r
#include "engine.h"
\r
+#include "Amaltheia/Input.h"
\r
#ifdef WIN32
\r
#define DIRECTINPUT_VERSION 0x0800
\r
#include <dinput.h>
\r
#ifdef WIN32
\r
#define DIRECTINPUT_VERSION 0x0800
\r
#include <dinput.h>
\r
@@
-18,23
+19,23
@@
class CInputTask : public ITask
\r
{
\r
public:
\r
class CInputTask : public ITask
\r
{
\r
public:
\r
- CInputTask();
\r
+ CInputTask(
CKernel* kernel
);
\r
virtual ~CInputTask();
\r
\r
bool Start();
\r
void Update();
\r
void Stop();
\r
virtual ~CInputTask();
\r
\r
bool Start();
\r
void Update();
\r
void Stop();
\r
-
\r
- static BYTE
keys[256], oldKeys[256]
;
\r
+ /* XXX: Yuck, static crapjes */
\r
+ static BYTE
*keys, *oldKeys
;
\r
//static CMMPointer<CMMDynamicBlob<unsigned char> > oldKeys;
\r
//static CMMPointer<CMMDynamicBlob<unsigned char> > oldKeys;
\r
-
//
static int keyCount;
\r
+ static int keyCount;
\r
\r
static int dX,dY;
\r
static unsigned int buttons;
\r
static unsigned int oldButtons;
\r
\r
\r
static int dX,dY;
\r
static unsigned int buttons;
\r
static unsigned int oldButtons;
\r
\r
- static bool inline curKey(int index) { return (keys[index]
& 0x80
) != 0; }
\r
- static bool inline oldKey(int index) { return (oldKeys[index]
& 0x80
) != 0; }
\r
+ static bool inline curKey(int index) { return (keys[index]) != 0; }
\r
+ static bool inline oldKey(int index) { return (oldKeys[index]) != 0; }
\r
\r
//some helper functions to make certain things easier
\r
//static bool inline keyDown(int index) { return ( curKey(index))&&(!oldKey(index)); }
\r
\r
//some helper functions to make certain things easier
\r
//static bool inline keyDown(int index) { return ( curKey(index))&&(!oldKey(index)); }
\r