projects
/
matthijs
/
ABM2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Make InputTask use SDL.
[matthijs/ABM2.git]
/
ABM2
/
Engine
/
InputTask.h
diff --git
a/ABM2/Engine/InputTask.h
b/ABM2/Engine/InputTask.h
index e3363f6137fd0d791d33f76bc098587664135cf9..897e6608880c47c117a8c6ec3add2a8dd20deb22 100755
(executable)
--- a/
ABM2/Engine/InputTask.h
+++ b/
ABM2/Engine/InputTask.h
@@
-10,22
+10,24
@@
#endif // _MSC_VER > 1000
\r
\r
#include "engine.h"
\r
#endif // _MSC_VER > 1000
\r
\r
#include "engine.h"
\r
+#ifdef WIN32
\r
#define DIRECTINPUT_VERSION 0x0800
\r
#include <dinput.h>
\r
#define DIRECTINPUT_VERSION 0x0800
\r
#include <dinput.h>
\r
+#endif // WIN32
\r
\r
class CInputTask : public ITask
\r
{
\r
public:
\r
\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
\r
static int dX,dY;
\r
static unsigned int buttons;
\r
@@
-50,9
+52,11
@@
public:
//static bool inline mouseStillUp(int button) { return (!curMouse(button))&&(!oldMouse(button)); }
\r
\r
AUTO_SIZE;
\r
//static bool inline mouseStillUp(int button) { return (!curMouse(button))&&(!oldMouse(button)); }
\r
\r
AUTO_SIZE;
\r
+#ifdef WIN32
\r
private:
\r
LPDIRECTINPUT8 din; // the pointer to our DirectInput interface
\r
LPDIRECTINPUTDEVICE8 dinkeyboard; // the pointer to the keyboard device
\r
private:
\r
LPDIRECTINPUT8 din; // the pointer to our DirectInput interface
\r
LPDIRECTINPUTDEVICE8 dinkeyboard; // the pointer to the keyboard device
\r
+#endif
\r
};
\r
\r
#endif // !defined(AFX_KEYBOARDTASK_H__4953EF06_7C18_4433_B590_47E045E43576__INCLUDED_)
\r
};
\r
\r
#endif // !defined(AFX_KEYBOARDTASK_H__4953EF06_7C18_4433_B590_47E045E43576__INCLUDED_)
\r