* Ifdef away most of InputTask to make it compile.
authorMatthijs Kooijman <m.kooijman@student.utwente.nl>
Mon, 11 Jun 2007 08:04:53 +0000 (10:04 +0200)
committerMatthijs Kooijman <m.kooijman@student.utwente.nl>
Mon, 11 Jun 2007 08:04:53 +0000 (10:04 +0200)
ABM2/Engine/InputTask.cpp
ABM2/Makefile

index 5fd261d151838afb7fa26a202be31a679e9e0e68..ed50c7705cb96f6af003cfcc55cf6f4069b9c103 100755 (executable)
@@ -11,7 +11,7 @@
 #pragma comment (lib, "dinput8.lib")\r
 #pragma comment (lib, "dxguid.lib")\r
 \r
-#endif WIN32\r
+#endif // WIN32\r
 \r
 //////////////////////////////////////////////////////////////////////\r
 // Construction/Destruction\r
@@ -27,9 +27,9 @@ int CInputTask::dY=0;
 unsigned int CInputTask::buttons=0;\r
 unsigned int CInputTask::oldButtons=0;\r
 \r
-#ifdef WIN32\r
 CInputTask::CInputTask()\r
 {\r
+#ifdef WIN32\r
        din = NULL;\r
        dinkeyboard = NULL;\r
        memset(keys, 0, 256);\r
@@ -47,21 +47,26 @@ CInputTask::CInputTask()
 \r
        // set the control you will have over the keyboard\r
        dinkeyboard->SetCooperativeLevel(hWnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);\r
+#endif // WIN32\r
 }\r
 \r
 CInputTask::~CInputTask()\r
 {\r
+#ifdef WIN32\r
        if (dinkeyboard != NULL) \r
        {\r
                dinkeyboard->Unacquire();\r
                dinkeyboard->Release();\r
        }\r
        if (din != NULL) din->Release();\r
+#endif // WIN32\r
 }\r
 \r
 bool CInputTask::Start()\r
 {\r
+#ifdef WIN32\r
        dinkeyboard->Acquire();\r
+#endif // WIN32\r
 \r
 \r
 //     keys=SDL_GetKeyState(&keyCount);\r
@@ -73,10 +78,12 @@ bool CInputTask::Start()
 \r
 void CInputTask::Update()\r
 {\r
+#ifdef WIN32\r
        dinkeyboard->Acquire();\r
        memcpy(oldKeys, keys, 256*sizeof(BYTE));\r
        dinkeyboard->GetDeviceState(256, (LPVOID)keys);\r
 \r
+#endif // WIN32\r
 //     SDL_PumpEvents();\r
 //     oldButtons=buttons;\r
 //     buttons=SDL_GetRelativeMouseState(&dX,&dY);\r
@@ -91,4 +98,3 @@ void CInputTask::Stop()
        memset(keys, 0, 256);\r
        memset(oldKeys, 0, 256);\r
 }\r
-#endif // WIN32\r
index d420363c5765a59b3842b0bd7cec7e247c8f84e2..b3c5f6e3fcc7cd997411bdae5e0c0d1e8131334d 100644 (file)
@@ -1,5 +1,5 @@
 CFLAGS:=-I.
-OBJS:=main.o Engine/Log.o SchemeReader.o Engine/Settings.o Engine/mmanager.o Engine/Kernel.o Engine/ProfileLogHandler.o Engine/VideoUpdate.o Engine/GlobalTimer.o Engine/SoundTask.o Engine/profiler.o Playground.o
+OBJS:=main.o Engine/Log.o SchemeReader.o Engine/Settings.o Engine/mmanager.o Engine/Kernel.o Engine/ProfileLogHandler.o Engine/VideoUpdate.o Engine/GlobalTimer.o Engine/SoundTask.o Engine/profiler.o Playground.o Engine/InputTask.o
 
 all: $(OBJS)