rendered paste bodyIndex: LibAlky/APIs/Windows/SConscript
===================================================================
--- LibAlky/APIs/Windows/SConscript (revision 63)
+++ LibAlky/APIs/Windows/SConscript (working copy)
@@ -18,5 +18,6 @@
'WinMM/SConscript',
'WSock32/SConscript',
'Kernel32/SConscript',
+ 'DInput/SConscript',
]
-)
\ No newline at end of file
+)
Index: LibAlky/APIs/Windows/DInput/DInput.c
===================================================================
--- LibAlky/APIs/Windows/DInput/DInput.c (revision 0)
+++ LibAlky/APIs/Windows/DInput/DInput.c (revision 0)
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2006 Falling Leaf Systems, LLC.
+ * Refer to LICENSE in the root directory.
+*/
+
+#include <APIs/Windows/DInput/DInput.h>
+
+#define NUMODULE_NAME "DInput"
+
+WINAPI HRESULT DirectInputCreateA(
+ DWORD dwVersion,
+ REFIID riidltf,
+ LPVOID* ppvOut,
+ LPUNKNOWN *punkOuter
+ ) {
+ NuLog("DInput::DirectInputCreateA");
+
+ NuAssert(punkOuter == NULL);
+
+ switch (dwVersion & 0xFF00) {
+ case 0x0800:
+ INIT_CLASS(DirectInput8, *ppvOut);
+ break;
+ default:
+ NuError("dwVersion is not a valid identifier");
+ }
+}
Index: LibAlky/APIs/Windows/DInput/Sconscript
===================================================================
--- LibAlky/APIs/Windows/DInput/Sconscript (revision 0)
+++ LibAlky/APIs/Windows/DInput/Sconscript (revision 0)
@@ -0,0 +1,8 @@
+# Copyright 2006 Falling Leaf Systems, LLC.
+# Refer to LICENSE in the root directory.
+
+from scons_util import *
+
+libs = []
+
+AlkyLib('dinput', ['Dinput.c' LIBS=libs]
\ No newline at end of file
Index: LibAlky/APIs/Windows/DInput/DInput.h
===================================================================
--- LibAlky/APIs/Windows/DInput/DInput.h (revision 0)
+++ LibAlky/APIs/Windows/DInput/DInput.h (revision 0)
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2006 Falling Leaf Systems, LLC.
+ * Refer to LICENSE in the root directory.
+ */
+
+#ifndef __APIS_WINDOWS_DINPUT_DINPUT_H__
+#define __APIS_WINDOWS_DINPUT_DINPUT_H__
+
+#include <APIs/Windows/Windows.h>
+#include <APIs/Windows/COM/COM.h>
+
+WINAPI HRESULT DirectInputCreateA(
+ DWORD dwVersion,
+ REFIID riidltf,
+ LPVOID* ppvOut,
+ LPUNKNOWN *punkOuter
+);
+
+CLASS(
+ IDirectInput8,
+ STRUCT(),
+ VTABLE(
+ CSTUB(IDirectInput8_ConfigureDevices),
+ CSTUB(IDirectInput8_CreateDevice),
+ CSTUB(IDirectInput8_EnumDevices),
+ CSTUB(IDirectInput8_EnumDevicesBySemantics),
+ CSTUB(IDirectInput8_FindDevice),
+ CSTUB(IDirectInput8_GetDeviceStatus),
+ CSTUB(IDirectInput8_Initialize),
+ CSTUB(IDirectInput8_RunControlPanel)
+ )
+);
+
+CLASS(
+ IDirectInputDevice8,
+ STRUCT(),
+ VTABLE(
+ CSTUB(IDirectInputDevice8_Acquire),
+ CSTUB(IDirectInputDevice8_Unacquire),
+ CSTUB(IDirectInputDevice8_BuildActionMap),
+ CSTUB(IDirectInputDevice8_GetImageInfo),
+ CSTUB(IDirectInputDevice8_SetActionMap),
+ CSTUB(IDirectInputDevice8_GetCapabilities),
+ CSTUB(IDirectInputDevice8_GetDeviceData),
+ CSTUB(IDirectInputDevice8_GetDeviceInfo),
+ CSTUB(IDirectInputDevice8_GetDeviceState),
+ CSTUB(IDirectInputDevice8_Poll),
+ CSTUB(IDirectInputDevice8_SetDataFormat),
+ CSTUB(IDirectInputDevice8_SetEventNotification),
+ CSTUB(IDirectInputDevice8_EnumObjects),
+ CSTUB(IDirectInputDevice8_GetObjectInfo),
+ CSTUB(IDirectInputDevice8_GetProperty),
+ CSTUB(IDirectInputDevice8_SetCooperativeLevel),
+ CSTUB(IDirectInputDevice8_SetProperty),
+ CSTUB(IDirectInputDevice8_CreateEffect),
+ CSTUB(IDirectInputDevice8_EnumCreatedEffectObjects),
+ CSTUB(IDirectInputDevice8_EnumEffects),
+ CSTUB(IDirectInputDevice8_EnumEffectsInFile),
+ CSTUB(IDirectInputDevice8_Escape),
+ CSTUB(IDirectInputDevice8_GetEffectInfo),
+ CSTUB(IDirectInputDevice8_GetForceFeedbackState),
+ CSTUB(IDirectInputDevice8_SendForceFeedbackState),
+ CSTUB(IDirectInputDevice8_WriteEffectToFile),
+ CSTUB(IDirectInputDevice8_Initialize),
+ CSTUB(IDirectInputDevice8_RunControlPanel),
+ CSTUB(IDirectInputDevice8_SendDeviceData)
+ )
+);
+
+CLASS(
+ IDirectInputEffect,
+ STRUCT(),
+ VTABLE(
+ CSTUB(IDirectInputEffect_GetEffectGuid),
+ CSTUB(IDirectInputEffect_GetEffectStatus),
+ CSTUB(IDirectInputEffect_GetParameters),
+ CSTUB(IDirectInputEffect_Download),
+ CSTUB(IDirectInputEffect_Initialize),
+ CSTUB(IDirectInputEffect_SetParameters),
+ CSTUB(IDirectInputEffect_Start),
+ CSTUB(IDirectInputEffect_Stop),
+ CSTUB(IDirectInputEffect_Unload),
+ CSTUB(IDirectInputEffect_Escape)
+ )
+);
+
+#endif