Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed | ?url?

  1. /****************************************************************************
  2.  *
  3.  *  Copyright (C) 1996-2000 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       dinput.h
  6.  *  Content:    DirectInput include file
  7.  *
  8.  ****************************************************************************/
  9.  
  10. #ifndef __DINPUT_INCLUDED__
  11. #define __DINPUT_INCLUDED__
  12.  
  13. #ifndef DIJ_RINGZERO
  14.  
  15. #ifdef _WIN32
  16. #define COM_NO_WINDOWS_H
  17. #include <objbase.h>
  18. #endif
  19.  
  20. #endif /* DIJ_RINGZERO */
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26.  
  27.  
  28.  
  29.  
  30. /*
  31.  *  To build applications for older versions of DirectInput
  32.  *
  33.  *  #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ]
  34.  *
  35.  *  before #include <dinput.h>.  By default, #include <dinput.h>
  36.  *  will produce a DirectX 8-compatible header file.
  37.  *
  38.  */
  39.  
  40. #define DIRECTINPUT_HEADER_VERSION  0x0800
  41. #ifndef DIRECTINPUT_VERSION
  42. #define DIRECTINPUT_VERSION         DIRECTINPUT_HEADER_VERSION
  43. #pragma message(__FILE__ ": DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800")
  44. #endif
  45.  
  46. #ifndef DIJ_RINGZERO
  47.  
  48. /****************************************************************************
  49.  *
  50.  *      Class IDs
  51.  *
  52.  ****************************************************************************/
  53.  
  54. DEFINE_GUID(CLSID_DirectInput,       0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  55. DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  56.  
  57. DEFINE_GUID(CLSID_DirectInput8,      0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  58. DEFINE_GUID(CLSID_DirectInputDevice8,0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  59.  
  60. /****************************************************************************
  61.  *
  62.  *      Interfaces
  63.  *
  64.  ****************************************************************************/
  65.  
  66. DEFINE_GUID(IID_IDirectInputA,     0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  67. DEFINE_GUID(IID_IDirectInputW,     0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  68. DEFINE_GUID(IID_IDirectInput2A,    0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  69. DEFINE_GUID(IID_IDirectInput2W,    0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  70. DEFINE_GUID(IID_IDirectInput7A,    0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  71. DEFINE_GUID(IID_IDirectInput7W,    0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  72. DEFINE_GUID(IID_IDirectInput8A,    0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
  73. DEFINE_GUID(IID_IDirectInput8W,    0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
  74. DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  75. DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  76. DEFINE_GUID(IID_IDirectInputDevice2A,0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  77. DEFINE_GUID(IID_IDirectInputDevice2W,0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  78. DEFINE_GUID(IID_IDirectInputDevice7A,0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  79. DEFINE_GUID(IID_IDirectInputDevice7W,0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
  80. DEFINE_GUID(IID_IDirectInputDevice8A,0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
  81. DEFINE_GUID(IID_IDirectInputDevice8W,0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
  82. DEFINE_GUID(IID_IDirectInputEffect,  0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  83.  
  84. /****************************************************************************
  85.  *
  86.  *      Predefined object types
  87.  *
  88.  ****************************************************************************/
  89.  
  90. DEFINE_GUID(GUID_XAxis,   0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  91. DEFINE_GUID(GUID_YAxis,   0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  92. DEFINE_GUID(GUID_ZAxis,   0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  93. DEFINE_GUID(GUID_RxAxis,  0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  94. DEFINE_GUID(GUID_RyAxis,  0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  95. DEFINE_GUID(GUID_RzAxis,  0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  96. DEFINE_GUID(GUID_Slider,  0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  97.  
  98. DEFINE_GUID(GUID_Button,  0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  99. DEFINE_GUID(GUID_Key,     0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  100.  
  101. DEFINE_GUID(GUID_POV,     0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  102.  
  103. DEFINE_GUID(GUID_Unknown, 0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  104.  
  105. /****************************************************************************
  106.  *
  107.  *      Predefined product GUIDs
  108.  *
  109.  ****************************************************************************/
  110.  
  111. DEFINE_GUID(GUID_SysMouse,   0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  112. DEFINE_GUID(GUID_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  113. DEFINE_GUID(GUID_Joystick   ,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  114. DEFINE_GUID(GUID_SysMouseEm, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  115. DEFINE_GUID(GUID_SysMouseEm2,0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  116. DEFINE_GUID(GUID_SysKeyboardEm, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  117. DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  118.  
  119. /****************************************************************************
  120.  *
  121.  *      Predefined force feedback effects
  122.  *
  123.  ****************************************************************************/
  124.  
  125. DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  126. DEFINE_GUID(GUID_RampForce,     0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  127. DEFINE_GUID(GUID_Square,        0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  128. DEFINE_GUID(GUID_Sine,          0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  129. DEFINE_GUID(GUID_Triangle,      0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  130. DEFINE_GUID(GUID_SawtoothUp,    0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  131. DEFINE_GUID(GUID_SawtoothDown,  0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  132. DEFINE_GUID(GUID_Spring,        0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  133. DEFINE_GUID(GUID_Damper,        0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  134. DEFINE_GUID(GUID_Inertia,       0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  135. DEFINE_GUID(GUID_Friction,      0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  136. DEFINE_GUID(GUID_CustomForce,   0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  137.  
  138. #endif /* DIJ_RINGZERO */
  139.  
  140. /****************************************************************************
  141.  *
  142.  *      Interfaces and Structures...
  143.  *
  144.  ****************************************************************************/
  145.  
  146. #if(DIRECTINPUT_VERSION >= 0x0500)
  147.  
  148. /****************************************************************************
  149.  *
  150.  *      IDirectInputEffect
  151.  *
  152.  ****************************************************************************/
  153.  
  154. #define DIEFT_ALL                   0x00000000
  155.  
  156. #define DIEFT_CONSTANTFORCE         0x00000001
  157. #define DIEFT_RAMPFORCE             0x00000002
  158. #define DIEFT_PERIODIC              0x00000003
  159. #define DIEFT_CONDITION             0x00000004
  160. #define DIEFT_CUSTOMFORCE           0x00000005
  161. #define DIEFT_HARDWARE              0x000000FF
  162. #define DIEFT_FFATTACK              0x00000200
  163. #define DIEFT_FFFADE                0x00000400
  164. #define DIEFT_SATURATION            0x00000800
  165. #define DIEFT_POSNEGCOEFFICIENTS    0x00001000
  166. #define DIEFT_POSNEGSATURATION      0x00002000
  167. #define DIEFT_DEADBAND              0x00004000
  168. #define DIEFT_STARTDELAY            0x00008000
  169. #define DIEFT_GETTYPE(n)            LOBYTE(n)
  170.  
  171. #define DI_DEGREES                  100
  172. #define DI_FFNOMINALMAX             10000
  173. #define DI_SECONDS                  1000000
  174.  
  175. typedef struct DICONSTANTFORCE {
  176.     LONG  lMagnitude;
  177. } DICONSTANTFORCE, *LPDICONSTANTFORCE;
  178. typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
  179.  
  180. typedef struct DIRAMPFORCE {
  181.     LONG  lStart;
  182.     LONG  lEnd;
  183. } DIRAMPFORCE, *LPDIRAMPFORCE;
  184. typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
  185.  
  186. typedef struct DIPERIODIC {
  187.     DWORD dwMagnitude;
  188.     LONG  lOffset;
  189.     DWORD dwPhase;
  190.     DWORD dwPeriod;
  191. } DIPERIODIC, *LPDIPERIODIC;
  192. typedef const DIPERIODIC *LPCDIPERIODIC;
  193.  
  194. typedef struct DICONDITION {
  195.     LONG  lOffset;
  196.     LONG  lPositiveCoefficient;
  197.     LONG  lNegativeCoefficient;
  198.     DWORD dwPositiveSaturation;
  199.     DWORD dwNegativeSaturation;
  200.     LONG  lDeadBand;
  201. } DICONDITION, *LPDICONDITION;
  202. typedef const DICONDITION *LPCDICONDITION;
  203.  
  204. typedef struct DICUSTOMFORCE {
  205.     DWORD cChannels;
  206.     DWORD dwSamplePeriod;
  207.     DWORD cSamples;
  208.     LPLONG rglForceData;
  209. } DICUSTOMFORCE, *LPDICUSTOMFORCE;
  210. typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
  211.  
  212.  
  213. typedef struct DIENVELOPE {
  214.     DWORD dwSize;                   /* sizeof(DIENVELOPE)   */
  215.     DWORD dwAttackLevel;
  216.     DWORD dwAttackTime;             /* Microseconds         */
  217.     DWORD dwFadeLevel;
  218.     DWORD dwFadeTime;               /* Microseconds         */
  219. } DIENVELOPE, *LPDIENVELOPE;
  220. typedef const DIENVELOPE *LPCDIENVELOPE;
  221.  
  222.  
  223. /* This structure is defined for DirectX 5.0 compatibility */
  224. typedef struct DIEFFECT_DX5 {
  225.     DWORD dwSize;                   /* sizeof(DIEFFECT_DX5) */
  226.     DWORD dwFlags;                  /* DIEFF_*              */
  227.     DWORD dwDuration;               /* Microseconds         */
  228.     DWORD dwSamplePeriod;           /* Microseconds         */
  229.     DWORD dwGain;
  230.     DWORD dwTriggerButton;          /* or DIEB_NOTRIGGER    */
  231.     DWORD dwTriggerRepeatInterval;  /* Microseconds         */
  232.     DWORD cAxes;                    /* Number of axes       */
  233.     LPDWORD rgdwAxes;               /* Array of axes        */
  234.     LPLONG rglDirection;            /* Array of directions  */
  235.     LPDIENVELOPE lpEnvelope;        /* Optional             */
  236.     DWORD cbTypeSpecificParams;     /* Size of params       */
  237.     LPVOID lpvTypeSpecificParams;   /* Pointer to params    */
  238. } DIEFFECT_DX5, *LPDIEFFECT_DX5;
  239. typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
  240.  
  241. typedef struct DIEFFECT {
  242.     DWORD dwSize;                   /* sizeof(DIEFFECT)     */
  243.     DWORD dwFlags;                  /* DIEFF_*              */
  244.     DWORD dwDuration;               /* Microseconds         */
  245.     DWORD dwSamplePeriod;           /* Microseconds         */
  246.     DWORD dwGain;
  247.     DWORD dwTriggerButton;          /* or DIEB_NOTRIGGER    */
  248.     DWORD dwTriggerRepeatInterval;  /* Microseconds         */
  249.     DWORD cAxes;                    /* Number of axes       */
  250.     LPDWORD rgdwAxes;               /* Array of axes        */
  251.     LPLONG rglDirection;            /* Array of directions  */
  252.     LPDIENVELOPE lpEnvelope;        /* Optional             */
  253.     DWORD cbTypeSpecificParams;     /* Size of params       */
  254.     LPVOID lpvTypeSpecificParams;   /* Pointer to params    */
  255. #if(DIRECTINPUT_VERSION >= 0x0600)
  256.     DWORD  dwStartDelay;            /* Microseconds         */
  257. #endif /* DIRECTINPUT_VERSION >= 0x0600 */
  258. } DIEFFECT, *LPDIEFFECT;
  259. typedef DIEFFECT DIEFFECT_DX6;
  260. typedef LPDIEFFECT LPDIEFFECT_DX6;
  261. typedef const DIEFFECT *LPCDIEFFECT;
  262.  
  263.  
  264. #if(DIRECTINPUT_VERSION >= 0x0700)
  265. #ifndef DIJ_RINGZERO
  266. typedef struct DIFILEEFFECT{
  267.     DWORD       dwSize;
  268.     GUID        GuidEffect;
  269.     LPCDIEFFECT lpDiEffect;
  270.     CHAR        szFriendlyName[MAX_PATH];
  271. }DIFILEEFFECT, *LPDIFILEEFFECT;
  272. typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
  273. typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
  274. #endif /* DIJ_RINGZERO */
  275. #endif /* DIRECTINPUT_VERSION >= 0x0700 */
  276.  
  277. #define DIEFF_OBJECTIDS             0x00000001
  278. #define DIEFF_OBJECTOFFSETS         0x00000002
  279. #define DIEFF_CARTESIAN             0x00000010
  280. #define DIEFF_POLAR                 0x00000020
  281. #define DIEFF_SPHERICAL             0x00000040
  282.  
  283. #define DIEP_DURATION               0x00000001
  284. #define DIEP_SAMPLEPERIOD           0x00000002
  285. #define DIEP_GAIN                   0x00000004
  286. #define DIEP_TRIGGERBUTTON          0x00000008
  287. #define DIEP_TRIGGERREPEATINTERVAL  0x00000010
  288. #define DIEP_AXES                   0x00000020
  289. #define DIEP_DIRECTION              0x00000040
  290. #define DIEP_ENVELOPE               0x00000080
  291. #define DIEP_TYPESPECIFICPARAMS     0x00000100
  292. #if(DIRECTINPUT_VERSION >= 0x0600)
  293. #define DIEP_STARTDELAY             0x00000200
  294. #define DIEP_ALLPARAMS_DX5          0x000001FF
  295. #define DIEP_ALLPARAMS              0x000003FF
  296. #else /* DIRECTINPUT_VERSION < 0x0600 */
  297. #define DIEP_ALLPARAMS              0x000001FF
  298. #endif /* DIRECTINPUT_VERSION < 0x0600 */
  299. #define DIEP_START                  0x20000000
  300. #define DIEP_NORESTART              0x40000000
  301. #define DIEP_NODOWNLOAD             0x80000000
  302. #define DIEB_NOTRIGGER              0xFFFFFFFF
  303.  
  304. #define DIES_SOLO                   0x00000001
  305. #define DIES_NODOWNLOAD             0x80000000
  306.  
  307. #define DIEGES_PLAYING              0x00000001
  308. #define DIEGES_EMULATED             0x00000002
  309.  
  310. typedef struct DIEFFESCAPE {
  311.     DWORD   dwSize;
  312.     DWORD   dwCommand;
  313.     LPVOID  lpvInBuffer;
  314.     DWORD   cbInBuffer;
  315.     LPVOID  lpvOutBuffer;
  316.     DWORD   cbOutBuffer;
  317. } DIEFFESCAPE, *LPDIEFFESCAPE;
  318.  
  319. #ifndef DIJ_RINGZERO
  320.  
  321. #undef INTERFACE
  322. #define INTERFACE IDirectInputEffect
  323.  
  324. DECLARE_INTERFACE_(IDirectInputEffect, IUnknown)
  325. {
  326.     /*** IUnknown methods ***/
  327.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  328.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  329.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  330.  
  331.     /*** IDirectInputEffect methods ***/
  332.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  333.     STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
  334.     STDMETHOD(GetParameters)(THIS_ LPDIEFFECT,DWORD) PURE;
  335.     STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT,DWORD) PURE;
  336.     STDMETHOD(Start)(THIS_ DWORD,DWORD) PURE;
  337.     STDMETHOD(Stop)(THIS) PURE;
  338.     STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
  339.     STDMETHOD(Download)(THIS) PURE;
  340.     STDMETHOD(Unload)(THIS) PURE;
  341.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  342. };
  343.  
  344. typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
  345.  
  346. #if !defined(__cplusplus) || defined(CINTERFACE)
  347. #define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  348. #define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
  349. #define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
  350. #define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  351. #define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
  352. #define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
  353. #define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
  354. #define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
  355. #define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
  356. #define IDirectInputEffect_GetEffectStatus(p,a) (p)->lpVtbl->GetEffectStatus(p,a)
  357. #define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
  358. #define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
  359. #define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  360. #else
  361. #define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  362. #define IDirectInputEffect_AddRef(p) (p)->AddRef()
  363. #define IDirectInputEffect_Release(p) (p)->Release()
  364. #define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  365. #define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a)
  366. #define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b)
  367. #define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b)
  368. #define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b)
  369. #define IDirectInputEffect_Stop(p) (p)->Stop()
  370. #define IDirectInputEffect_GetEffectStatus(p,a) (p)->GetEffectStatus(a)
  371. #define IDirectInputEffect_Download(p) (p)->Download()
  372. #define IDirectInputEffect_Unload(p) (p)->Unload()
  373. #define IDirectInputEffect_Escape(p,a) (p)->Escape(a)
  374. #endif
  375.  
  376. #endif /* DIJ_RINGZERO */
  377.  
  378. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  379.  
  380. /****************************************************************************
  381.  *
  382.  *      IDirectInputDevice
  383.  *
  384.  ****************************************************************************/
  385.  
  386. #if DIRECTINPUT_VERSION <= 0x700
  387. #define DIDEVTYPE_DEVICE        1
  388. #define DIDEVTYPE_MOUSE         2
  389. #define DIDEVTYPE_KEYBOARD      3
  390. #define DIDEVTYPE_JOYSTICK      4
  391.  
  392. #else
  393. #define DI8DEVCLASS_ALL             0
  394. #define DI8DEVCLASS_DEVICE          1
  395. #define DI8DEVCLASS_POINTER         2
  396. #define DI8DEVCLASS_KEYBOARD        3
  397. #define DI8DEVCLASS_GAMECTRL        4
  398.  
  399. #define DI8DEVTYPE_DEVICE           0x11
  400. #define DI8DEVTYPE_MOUSE            0x12
  401. #define DI8DEVTYPE_KEYBOARD         0x13
  402. #define DI8DEVTYPE_JOYSTICK         0x14
  403. #define DI8DEVTYPE_GAMEPAD          0x15
  404. #define DI8DEVTYPE_DRIVING          0x16
  405. #define DI8DEVTYPE_FLIGHT           0x17
  406. #define DI8DEVTYPE_1STPERSON        0x18
  407. #define DI8DEVTYPE_DEVICECTRL       0x19
  408. #define DI8DEVTYPE_SCREENPOINTER    0x1A
  409. #define DI8DEVTYPE_REMOTE           0x1B
  410. #define DI8DEVTYPE_SUPPLEMENTAL     0x1C
  411. #endif /* DIRECTINPUT_VERSION <= 0x700 */
  412.  
  413. #define DIDEVTYPE_HID           0x00010000
  414.  
  415. #if DIRECTINPUT_VERSION <= 0x700
  416. #define DIDEVTYPEMOUSE_UNKNOWN          1
  417. #define DIDEVTYPEMOUSE_TRADITIONAL      2
  418. #define DIDEVTYPEMOUSE_FINGERSTICK      3
  419. #define DIDEVTYPEMOUSE_TOUCHPAD         4
  420. #define DIDEVTYPEMOUSE_TRACKBALL        5
  421.  
  422. #define DIDEVTYPEKEYBOARD_UNKNOWN       0
  423. #define DIDEVTYPEKEYBOARD_PCXT          1
  424. #define DIDEVTYPEKEYBOARD_OLIVETTI      2
  425. #define DIDEVTYPEKEYBOARD_PCAT          3
  426. #define DIDEVTYPEKEYBOARD_PCENH         4
  427. #define DIDEVTYPEKEYBOARD_NOKIA1050     5
  428. #define DIDEVTYPEKEYBOARD_NOKIA9140     6
  429. #define DIDEVTYPEKEYBOARD_NEC98         7
  430. #define DIDEVTYPEKEYBOARD_NEC98LAPTOP   8
  431. #define DIDEVTYPEKEYBOARD_NEC98106      9
  432. #define DIDEVTYPEKEYBOARD_JAPAN106     10
  433. #define DIDEVTYPEKEYBOARD_JAPANAX      11
  434. #define DIDEVTYPEKEYBOARD_J3100        12
  435.  
  436. #define DIDEVTYPEJOYSTICK_UNKNOWN       1
  437. #define DIDEVTYPEJOYSTICK_TRADITIONAL   2
  438. #define DIDEVTYPEJOYSTICK_FLIGHTSTICK   3
  439. #define DIDEVTYPEJOYSTICK_GAMEPAD       4
  440. #define DIDEVTYPEJOYSTICK_RUDDER        5
  441. #define DIDEVTYPEJOYSTICK_WHEEL         6
  442. #define DIDEVTYPEJOYSTICK_HEADTRACKER   7
  443.  
  444. #else
  445. #define DI8DEVTYPEMOUSE_UNKNOWN                     1
  446. #define DI8DEVTYPEMOUSE_TRADITIONAL                 2
  447. #define DI8DEVTYPEMOUSE_FINGERSTICK                 3
  448. #define DI8DEVTYPEMOUSE_TOUCHPAD                    4
  449. #define DI8DEVTYPEMOUSE_TRACKBALL                   5
  450. #define DI8DEVTYPEMOUSE_ABSOLUTE                    6
  451.  
  452. #define DI8DEVTYPEKEYBOARD_UNKNOWN                  0
  453. #define DI8DEVTYPEKEYBOARD_PCXT                     1
  454. #define DI8DEVTYPEKEYBOARD_OLIVETTI                 2
  455. #define DI8DEVTYPEKEYBOARD_PCAT                     3
  456. #define DI8DEVTYPEKEYBOARD_PCENH                    4
  457. #define DI8DEVTYPEKEYBOARD_NOKIA1050                5
  458. #define DI8DEVTYPEKEYBOARD_NOKIA9140                6
  459. #define DI8DEVTYPEKEYBOARD_NEC98                    7
  460. #define DI8DEVTYPEKEYBOARD_NEC98LAPTOP              8
  461. #define DI8DEVTYPEKEYBOARD_NEC98106                 9
  462. #define DI8DEVTYPEKEYBOARD_JAPAN106                10
  463. #define DI8DEVTYPEKEYBOARD_JAPANAX                 11
  464. #define DI8DEVTYPEKEYBOARD_J3100                   12
  465.  
  466. #define DI8DEVTYPE_LIMITEDGAMESUBTYPE               1
  467.  
  468. #define DI8DEVTYPEJOYSTICK_LIMITED                  DI8DEVTYPE_LIMITEDGAMESUBTYPE
  469. #define DI8DEVTYPEJOYSTICK_STANDARD                 2
  470.  
  471. #define DI8DEVTYPEGAMEPAD_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE
  472. #define DI8DEVTYPEGAMEPAD_STANDARD                  2
  473. #define DI8DEVTYPEGAMEPAD_TILT                      3
  474.  
  475. #define DI8DEVTYPEDRIVING_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE
  476. #define DI8DEVTYPEDRIVING_COMBINEDPEDALS            2
  477. #define DI8DEVTYPEDRIVING_DUALPEDALS                3
  478. #define DI8DEVTYPEDRIVING_THREEPEDALS               4
  479. #define DI8DEVTYPEDRIVING_HANDHELD                  5
  480.  
  481. #define DI8DEVTYPEFLIGHT_LIMITED                    DI8DEVTYPE_LIMITEDGAMESUBTYPE
  482. #define DI8DEVTYPEFLIGHT_STICK                      2
  483. #define DI8DEVTYPEFLIGHT_YOKE                       3
  484. #define DI8DEVTYPEFLIGHT_RC                         4
  485.  
  486. #define DI8DEVTYPE1STPERSON_LIMITED                 DI8DEVTYPE_LIMITEDGAMESUBTYPE
  487. #define DI8DEVTYPE1STPERSON_UNKNOWN                 2
  488. #define DI8DEVTYPE1STPERSON_SIXDOF                  3
  489. #define DI8DEVTYPE1STPERSON_SHOOTER                 4
  490.  
  491. #define DI8DEVTYPESCREENPTR_UNKNOWN                 2
  492. #define DI8DEVTYPESCREENPTR_LIGHTGUN                3
  493. #define DI8DEVTYPESCREENPTR_LIGHTPEN                4
  494. #define DI8DEVTYPESCREENPTR_TOUCH                   5
  495.  
  496. #define DI8DEVTYPEREMOTE_UNKNOWN                    2
  497.  
  498. #define DI8DEVTYPEDEVICECTRL_UNKNOWN                2
  499. #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION         3
  500. #define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
  501.  
  502. #define DI8DEVTYPESUPPLEMENTAL_UNKNOWN              2
  503. #define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER    3
  504. #define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER          4
  505. #define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER          5
  506. #define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE       6
  507. #define DI8DEVTYPESUPPLEMENTAL_SHIFTER              7
  508. #define DI8DEVTYPESUPPLEMENTAL_THROTTLE             8
  509. #define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE        9
  510. #define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS      10
  511. #define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS          11
  512. #define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS         12
  513. #define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS        13
  514. #endif /* DIRECTINPUT_VERSION <= 0x700 */
  515.  
  516. #define GET_DIDEVICE_TYPE(dwDevType)    LOBYTE(dwDevType)
  517. #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
  518.  
  519. #if(DIRECTINPUT_VERSION >= 0x0500)
  520. /* This structure is defined for DirectX 3.0 compatibility */
  521. typedef struct DIDEVCAPS_DX3 {
  522.     DWORD   dwSize;
  523.     DWORD   dwFlags;
  524.     DWORD   dwDevType;
  525.     DWORD   dwAxes;
  526.     DWORD   dwButtons;
  527.     DWORD   dwPOVs;
  528. } DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
  529. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  530.  
  531. typedef struct DIDEVCAPS {
  532.     DWORD   dwSize;
  533.     DWORD   dwFlags;
  534.     DWORD   dwDevType;
  535.     DWORD   dwAxes;
  536.     DWORD   dwButtons;
  537.     DWORD   dwPOVs;
  538. #if(DIRECTINPUT_VERSION >= 0x0500)
  539.     DWORD   dwFFSamplePeriod;
  540.     DWORD   dwFFMinTimeResolution;
  541.     DWORD   dwFirmwareRevision;
  542.     DWORD   dwHardwareRevision;
  543.     DWORD   dwFFDriverVersion;
  544. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  545. } DIDEVCAPS, *LPDIDEVCAPS;
  546.  
  547. #define DIDC_ATTACHED           0x00000001
  548. #define DIDC_POLLEDDEVICE       0x00000002
  549. #define DIDC_EMULATED           0x00000004
  550. #define DIDC_POLLEDDATAFORMAT   0x00000008
  551. #if(DIRECTINPUT_VERSION >= 0x0500)
  552. #define DIDC_FORCEFEEDBACK      0x00000100
  553. #define DIDC_FFATTACK           0x00000200
  554. #define DIDC_FFFADE             0x00000400
  555. #define DIDC_SATURATION         0x00000800
  556. #define DIDC_POSNEGCOEFFICIENTS 0x00001000
  557. #define DIDC_POSNEGSATURATION   0x00002000
  558. #define DIDC_DEADBAND           0x00004000
  559. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  560. #define DIDC_STARTDELAY         0x00008000
  561. #if(DIRECTINPUT_VERSION >= 0x050a)
  562. #define DIDC_ALIAS              0x00010000
  563. #define DIDC_PHANTOM            0x00020000
  564. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  565. #if(DIRECTINPUT_VERSION >= 0x0800)
  566. #define DIDC_HIDDEN             0x00040000
  567. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  568.  
  569. #define DIDFT_ALL           0x00000000
  570.  
  571. #define DIDFT_RELAXIS       0x00000001
  572. #define DIDFT_ABSAXIS       0x00000002
  573. #define DIDFT_AXIS          0x00000003
  574.  
  575. #define DIDFT_PSHBUTTON     0x00000004
  576. #define DIDFT_TGLBUTTON     0x00000008
  577. #define DIDFT_BUTTON        0x0000000C
  578.  
  579. #define DIDFT_POV           0x00000010
  580. #define DIDFT_COLLECTION    0x00000040
  581. #define DIDFT_NODATA        0x00000080
  582.  
  583. #define DIDFT_ANYINSTANCE   0x00FFFF00
  584. #define DIDFT_INSTANCEMASK  DIDFT_ANYINSTANCE
  585. #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
  586. #define DIDFT_GETTYPE(n)     LOBYTE(n)
  587. #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
  588. #define DIDFT_FFACTUATOR        0x01000000
  589. #define DIDFT_FFEFFECTTRIGGER   0x02000000
  590. #if(DIRECTINPUT_VERSION >= 0x050a)
  591. #define DIDFT_OUTPUT            0x10000000
  592. #define DIDFT_VENDORDEFINED     0x04000000
  593. #define DIDFT_ALIAS             0x08000000
  594. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  595.  
  596. #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
  597. #define DIDFT_NOCOLLECTION      0x00FFFF00
  598.  
  599. #ifndef DIJ_RINGZERO
  600.  
  601. typedef struct _DIOBJECTDATAFORMAT {
  602.     const GUID *pguid;
  603.     DWORD   dwOfs;
  604.     DWORD   dwType;
  605.     DWORD   dwFlags;
  606. } DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
  607. typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
  608.  
  609. typedef struct _DIDATAFORMAT {
  610.     DWORD   dwSize;
  611.     DWORD   dwObjSize;
  612.     DWORD   dwFlags;
  613.     DWORD   dwDataSize;
  614.     DWORD   dwNumObjs;
  615.     LPDIOBJECTDATAFORMAT rgodf;
  616. } DIDATAFORMAT, *LPDIDATAFORMAT;
  617. typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
  618.  
  619. #define DIDF_ABSAXIS            0x00000001
  620. #define DIDF_RELAXIS            0x00000002
  621.  
  622. #ifdef __cplusplus
  623. extern "C" {
  624. #endif
  625. extern const DIDATAFORMAT c_dfDIMouse;
  626.  
  627. #if(DIRECTINPUT_VERSION >= 0x0700)
  628. extern const DIDATAFORMAT c_dfDIMouse2;
  629. #endif /* DIRECTINPUT_VERSION >= 0x0700 */
  630.  
  631. extern const DIDATAFORMAT c_dfDIKeyboard;
  632.  
  633. #if(DIRECTINPUT_VERSION >= 0x0500)
  634. extern const DIDATAFORMAT c_dfDIJoystick;
  635. extern const DIDATAFORMAT c_dfDIJoystick2;
  636. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  637.  
  638. #ifdef __cplusplus
  639. };
  640. #endif
  641.  
  642.  
  643. #if DIRECTINPUT_VERSION > 0x0700
  644.  
  645. typedef struct _DIACTIONA {
  646.                 UINT_PTR    uAppData;
  647.                 DWORD       dwSemantic;
  648.     OPTIONAL    DWORD       dwFlags;
  649.     OPTIONAL    union {
  650.                     LPCSTR      lptszActionName;
  651.                     UINT        uResIdString;
  652.                 };
  653.     OPTIONAL    GUID        guidInstance;
  654.     OPTIONAL    DWORD       dwObjID;
  655.     OPTIONAL    DWORD       dwHow;
  656. } DIACTIONA, *LPDIACTIONA ;
  657. typedef struct _DIACTIONW {
  658.                 UINT_PTR    uAppData;
  659.                 DWORD       dwSemantic;
  660.     OPTIONAL    DWORD       dwFlags;
  661.     OPTIONAL    union {
  662.                     LPCWSTR     lptszActionName;
  663.                     UINT        uResIdString;
  664.                 };
  665.     OPTIONAL    GUID        guidInstance;
  666.     OPTIONAL    DWORD       dwObjID;
  667.     OPTIONAL    DWORD       dwHow;
  668. } DIACTIONW, *LPDIACTIONW ;
  669. #ifdef UNICODE
  670. typedef DIACTIONW DIACTION;
  671. typedef LPDIACTIONW LPDIACTION;
  672. #else
  673. typedef DIACTIONA DIACTION;
  674. typedef LPDIACTIONA LPDIACTION;
  675. #endif // UNICODE
  676.  
  677. typedef const DIACTIONA *LPCDIACTIONA;
  678. typedef const DIACTIONW *LPCDIACTIONW;
  679. #ifdef UNICODE
  680. typedef DIACTIONW DIACTION;
  681. typedef LPCDIACTIONW LPCDIACTION;
  682. #else
  683. typedef DIACTIONA DIACTION;
  684. typedef LPCDIACTIONA LPCDIACTION;
  685. #endif // UNICODE
  686. typedef const DIACTION *LPCDIACTION;
  687.  
  688.  
  689. #define DIA_FORCEFEEDBACK       0x00000001
  690. #define DIA_APPMAPPED           0x00000002
  691. #define DIA_APPNOMAP            0x00000004
  692. #define DIA_NORANGE             0x00000008
  693. #define DIA_APPFIXED            0x00000010
  694.  
  695. #define DIAH_UNMAPPED           0x00000000
  696. #define DIAH_USERCONFIG         0x00000001
  697. #define DIAH_APPREQUESTED       0x00000002
  698. #define DIAH_HWAPP              0x00000004
  699. #define DIAH_HWDEFAULT          0x00000008
  700. #define DIAH_DEFAULT            0x00000020
  701. #define DIAH_ERROR              0x80000000
  702.  
  703. typedef struct _DIACTIONFORMATA {
  704.                 DWORD       dwSize;
  705.                 DWORD       dwActionSize;
  706.                 DWORD       dwDataSize;
  707.                 DWORD       dwNumActions;
  708.                 LPDIACTIONA rgoAction;
  709.                 GUID        guidActionMap;
  710.                 DWORD       dwGenre;
  711.                 DWORD       dwBufferSize;
  712.     OPTIONAL    LONG        lAxisMin;
  713.     OPTIONAL    LONG        lAxisMax;
  714.     OPTIONAL    HINSTANCE   hInstString;
  715.                 FILETIME    ftTimeStamp;
  716.                 DWORD       dwCRC;
  717.                 CHAR        tszActionMap[MAX_PATH];
  718. } DIACTIONFORMATA, *LPDIACTIONFORMATA;
  719. typedef struct _DIACTIONFORMATW {
  720.                 DWORD       dwSize;
  721.                 DWORD       dwActionSize;
  722.                 DWORD       dwDataSize;
  723.                 DWORD       dwNumActions;
  724.                 LPDIACTIONW rgoAction;
  725.                 GUID        guidActionMap;
  726.                 DWORD       dwGenre;
  727.                 DWORD       dwBufferSize;
  728.     OPTIONAL    LONG        lAxisMin;
  729.     OPTIONAL    LONG        lAxisMax;
  730.     OPTIONAL    HINSTANCE   hInstString;
  731.                 FILETIME    ftTimeStamp;
  732.                 DWORD       dwCRC;
  733.                 WCHAR       tszActionMap[MAX_PATH];
  734. } DIACTIONFORMATW, *LPDIACTIONFORMATW;
  735. #ifdef UNICODE
  736. typedef DIACTIONFORMATW DIACTIONFORMAT;
  737. typedef LPDIACTIONFORMATW LPDIACTIONFORMAT;
  738. #else
  739. typedef DIACTIONFORMATA DIACTIONFORMAT;
  740. typedef LPDIACTIONFORMATA LPDIACTIONFORMAT;
  741. #endif // UNICODE
  742. typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
  743. typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
  744. #ifdef UNICODE
  745. typedef DIACTIONFORMATW DIACTIONFORMAT;
  746. typedef LPCDIACTIONFORMATW LPCDIACTIONFORMAT;
  747. #else
  748. typedef DIACTIONFORMATA DIACTIONFORMAT;
  749. typedef LPCDIACTIONFORMATA LPCDIACTIONFORMAT;
  750. #endif // UNICODE
  751. typedef const DIACTIONFORMAT *LPCDIACTIONFORMAT;
  752.  
  753. #define DIAFTS_NEWDEVICELOW     0xFFFFFFFF
  754. #define DIAFTS_NEWDEVICEHIGH    0xFFFFFFFF
  755. #define DIAFTS_UNUSEDDEVICELOW  0x00000000
  756. #define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
  757.  
  758. #define DIDBAM_DEFAULT          0x00000000
  759. #define DIDBAM_PRESERVE         0x00000001
  760. #define DIDBAM_INITIALIZE       0x00000002
  761. #define DIDBAM_HWDEFAULTS       0x00000004
  762.  
  763. #define DIDSAM_DEFAULT          0x00000000
  764. #define DIDSAM_NOUSER           0x00000001
  765. #define DIDSAM_FORCESAVE        0x00000002
  766.  
  767. #define DICD_DEFAULT            0x00000000
  768. #define DICD_EDIT               0x00000001
  769.  
  770. /*
  771.  * The following definition is normally defined in d3dtypes.h
  772.  */
  773. #ifndef D3DCOLOR_DEFINED
  774. typedef DWORD D3DCOLOR;
  775. #define D3DCOLOR_DEFINED
  776. #endif
  777.  
  778. typedef struct _DICOLORSET{
  779.     DWORD dwSize;
  780.     D3DCOLOR cTextFore;
  781.     D3DCOLOR cTextHighlight;
  782.     D3DCOLOR cCalloutLine;
  783.     D3DCOLOR cCalloutHighlight;
  784.     D3DCOLOR cBorder;
  785.     D3DCOLOR cControlFill;
  786.     D3DCOLOR cHighlightFill;
  787.     D3DCOLOR cAreaFill;
  788. } DICOLORSET, *LPDICOLORSET;
  789. typedef const DICOLORSET *LPCDICOLORSET;
  790.  
  791.  
  792. typedef struct _DICONFIGUREDEVICESPARAMSA{
  793.      DWORD             dwSize;
  794.      DWORD             dwcUsers;
  795.      LPSTR             lptszUserNames;
  796.      DWORD             dwcFormats;
  797.      LPDIACTIONFORMATA lprgFormats;
  798.      HWND              hwnd;
  799.      DICOLORSET        dics;
  800.      IUnknown FAR *    lpUnkDDSTarget;
  801. } DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
  802. typedef struct _DICONFIGUREDEVICESPARAMSW{
  803.      DWORD             dwSize;
  804.      DWORD             dwcUsers;
  805.      LPWSTR            lptszUserNames;
  806.      DWORD             dwcFormats;
  807.      LPDIACTIONFORMATW lprgFormats;
  808.      HWND              hwnd;
  809.      DICOLORSET        dics;
  810.      IUnknown FAR *    lpUnkDDSTarget;
  811. } DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
  812. #ifdef UNICODE
  813. typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
  814. typedef LPDICONFIGUREDEVICESPARAMSW LPDICONFIGUREDEVICESPARAMS;
  815. #else
  816. typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
  817. typedef LPDICONFIGUREDEVICESPARAMSA LPDICONFIGUREDEVICESPARAMS;
  818. #endif // UNICODE
  819. typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
  820. typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
  821. #ifdef UNICODE
  822. typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
  823. typedef LPCDICONFIGUREDEVICESPARAMSW LPCDICONFIGUREDEVICESPARAMS;
  824. #else
  825. typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
  826. typedef LPCDICONFIGUREDEVICESPARAMSA LPCDICONFIGUREDEVICESPARAMS;
  827. #endif // UNICODE
  828. typedef const DICONFIGUREDEVICESPARAMS *LPCDICONFIGUREDEVICESPARAMS;
  829.  
  830.  
  831. #define DIDIFT_CONFIGURATION    0x00000001
  832. #define DIDIFT_OVERLAY          0x00000002
  833.  
  834. #define DIDAL_CENTERED      0x00000000
  835. #define DIDAL_LEFTALIGNED   0x00000001
  836. #define DIDAL_RIGHTALIGNED  0x00000002
  837. #define DIDAL_MIDDLE        0x00000000
  838. #define DIDAL_TOPALIGNED    0x00000004
  839. #define DIDAL_BOTTOMALIGNED 0x00000008
  840.  
  841. typedef struct _DIDEVICEIMAGEINFOA {
  842.     CHAR        tszImagePath[MAX_PATH];
  843.     DWORD       dwFlags;
  844.     // These are valid if DIDIFT_OVERLAY is present in dwFlags.
  845.     DWORD       dwViewID;      
  846.     RECT        rcOverlay;            
  847.     DWORD       dwObjID;
  848.     DWORD       dwcValidPts;
  849.     POINT       rgptCalloutLine[5];  
  850.     RECT        rcCalloutRect;  
  851.     DWORD       dwTextAlign;    
  852. } DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
  853. typedef struct _DIDEVICEIMAGEINFOW {
  854.     WCHAR       tszImagePath[MAX_PATH];
  855.     DWORD       dwFlags;
  856.     // These are valid if DIDIFT_OVERLAY is present in dwFlags.
  857.     DWORD       dwViewID;      
  858.     RECT        rcOverlay;            
  859.     DWORD       dwObjID;
  860.     DWORD       dwcValidPts;
  861.     POINT       rgptCalloutLine[5];  
  862.     RECT        rcCalloutRect;  
  863.     DWORD       dwTextAlign;    
  864. } DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
  865. #ifdef UNICODE
  866. typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO;
  867. typedef LPDIDEVICEIMAGEINFOW LPDIDEVICEIMAGEINFO;
  868. #else
  869. typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO;
  870. typedef LPDIDEVICEIMAGEINFOA LPDIDEVICEIMAGEINFO;
  871. #endif // UNICODE
  872. typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
  873. typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
  874. #ifdef UNICODE
  875. typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO;
  876. typedef LPCDIDEVICEIMAGEINFOW LPCDIDEVICEIMAGEINFO;
  877. #else
  878. typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO;
  879. typedef LPCDIDEVICEIMAGEINFOA LPCDIDEVICEIMAGEINFO;
  880. #endif // UNICODE
  881. typedef const DIDEVICEIMAGEINFO *LPCDIDEVICEIMAGEINFO;
  882.  
  883. typedef struct _DIDEVICEIMAGEINFOHEADERA {
  884.     DWORD       dwSize;
  885.     DWORD       dwSizeImageInfo;
  886.     DWORD       dwcViews;
  887.     DWORD       dwcButtons;
  888.     DWORD       dwcAxes;
  889.     DWORD       dwcPOVs;
  890.     DWORD       dwBufferSize;
  891.     DWORD       dwBufferUsed;
  892.     LPDIDEVICEIMAGEINFOA lprgImageInfoArray;
  893. } DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
  894. typedef struct _DIDEVICEIMAGEINFOHEADERW {
  895.     DWORD       dwSize;
  896.     DWORD       dwSizeImageInfo;
  897.     DWORD       dwcViews;
  898.     DWORD       dwcButtons;
  899.     DWORD       dwcAxes;
  900.     DWORD       dwcPOVs;
  901.     DWORD       dwBufferSize;
  902.     DWORD       dwBufferUsed;
  903.     LPDIDEVICEIMAGEINFOW lprgImageInfoArray;
  904. } DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
  905. #ifdef UNICODE
  906. typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER;
  907. typedef LPDIDEVICEIMAGEINFOHEADERW LPDIDEVICEIMAGEINFOHEADER;
  908. #else
  909. typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER;
  910. typedef LPDIDEVICEIMAGEINFOHEADERA LPDIDEVICEIMAGEINFOHEADER;
  911. #endif // UNICODE
  912. typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
  913. typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
  914. #ifdef UNICODE
  915. typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER;
  916. typedef LPCDIDEVICEIMAGEINFOHEADERW LPCDIDEVICEIMAGEINFOHEADER;
  917. #else
  918. typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER;
  919. typedef LPCDIDEVICEIMAGEINFOHEADERA LPCDIDEVICEIMAGEINFOHEADER;
  920. #endif // UNICODE
  921. typedef const DIDEVICEIMAGEINFOHEADER *LPCDIDEVICEIMAGEINFOHEADER;
  922.  
  923. #endif /* DIRECTINPUT_VERSION > 0x0700 */
  924.  
  925. #if(DIRECTINPUT_VERSION >= 0x0500)
  926. /* These structures are defined for DirectX 3.0 compatibility */
  927.  
  928. typedef struct DIDEVICEOBJECTINSTANCE_DX3A {
  929.     DWORD   dwSize;
  930.     GUID    guidType;
  931.     DWORD   dwOfs;
  932.     DWORD   dwType;
  933.     DWORD   dwFlags;
  934.     CHAR    tszName[MAX_PATH];
  935. } DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;
  936. typedef struct DIDEVICEOBJECTINSTANCE_DX3W {
  937.     DWORD   dwSize;
  938.     GUID    guidType;
  939.     DWORD   dwOfs;
  940.     DWORD   dwType;
  941.     DWORD   dwFlags;
  942.     WCHAR   tszName[MAX_PATH];
  943. } DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;
  944. #ifdef UNICODE
  945. typedef DIDEVICEOBJECTINSTANCE_DX3W DIDEVICEOBJECTINSTANCE_DX3;
  946. typedef LPDIDEVICEOBJECTINSTANCE_DX3W LPDIDEVICEOBJECTINSTANCE_DX3;
  947. #else
  948. typedef DIDEVICEOBJECTINSTANCE_DX3A DIDEVICEOBJECTINSTANCE_DX3;
  949. typedef LPDIDEVICEOBJECTINSTANCE_DX3A LPDIDEVICEOBJECTINSTANCE_DX3;
  950. #endif // UNICODE
  951. typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;
  952. typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;
  953. typedef const DIDEVICEOBJECTINSTANCE_DX3  *LPCDIDEVICEOBJECTINSTANCE_DX3;
  954. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  955.  
  956. typedef struct DIDEVICEOBJECTINSTANCEA {
  957.     DWORD   dwSize;
  958.     GUID    guidType;
  959.     DWORD   dwOfs;
  960.     DWORD   dwType;
  961.     DWORD   dwFlags;
  962.     CHAR    tszName[MAX_PATH];
  963. #if(DIRECTINPUT_VERSION >= 0x0500)
  964.     DWORD   dwFFMaxForce;
  965.     DWORD   dwFFForceResolution;
  966.     WORD    wCollectionNumber;
  967.     WORD    wDesignatorIndex;
  968.     WORD    wUsagePage;
  969.     WORD    wUsage;
  970.     DWORD   dwDimension;
  971.     WORD    wExponent;
  972.     WORD    wReportId;
  973. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  974. } DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
  975. typedef struct DIDEVICEOBJECTINSTANCEW {
  976.     DWORD   dwSize;
  977.     GUID    guidType;
  978.     DWORD   dwOfs;
  979.     DWORD   dwType;
  980.     DWORD   dwFlags;
  981.     WCHAR   tszName[MAX_PATH];
  982. #if(DIRECTINPUT_VERSION >= 0x0500)
  983.     DWORD   dwFFMaxForce;
  984.     DWORD   dwFFForceResolution;
  985.     WORD    wCollectionNumber;
  986.     WORD    wDesignatorIndex;
  987.     WORD    wUsagePage;
  988.     WORD    wUsage;
  989.     DWORD   dwDimension;
  990.     WORD    wExponent;
  991.     WORD    wReportId;
  992. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  993. } DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
  994. #ifdef UNICODE
  995. typedef DIDEVICEOBJECTINSTANCEW DIDEVICEOBJECTINSTANCE;
  996. typedef LPDIDEVICEOBJECTINSTANCEW LPDIDEVICEOBJECTINSTANCE;
  997. #else
  998. typedef DIDEVICEOBJECTINSTANCEA DIDEVICEOBJECTINSTANCE;
  999. typedef LPDIDEVICEOBJECTINSTANCEA LPDIDEVICEOBJECTINSTANCE;
  1000. #endif // UNICODE
  1001. typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
  1002. typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
  1003. typedef const DIDEVICEOBJECTINSTANCE  *LPCDIDEVICEOBJECTINSTANCE;
  1004.  
  1005. typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA, LPVOID);
  1006. typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW, LPVOID);
  1007. #ifdef UNICODE
  1008. #define LPDIENUMDEVICEOBJECTSCALLBACK  LPDIENUMDEVICEOBJECTSCALLBACKW
  1009. #else
  1010. #define LPDIENUMDEVICEOBJECTSCALLBACK  LPDIENUMDEVICEOBJECTSCALLBACKA
  1011. #endif // !UNICODE
  1012.  
  1013. #if(DIRECTINPUT_VERSION >= 0x0500)
  1014. #define DIDOI_FFACTUATOR        0x00000001
  1015. #define DIDOI_FFEFFECTTRIGGER   0x00000002
  1016. #define DIDOI_POLLED            0x00008000
  1017. #define DIDOI_ASPECTPOSITION    0x00000100
  1018. #define DIDOI_ASPECTVELOCITY    0x00000200
  1019. #define DIDOI_ASPECTACCEL       0x00000300
  1020. #define DIDOI_ASPECTFORCE       0x00000400
  1021. #define DIDOI_ASPECTMASK        0x00000F00
  1022. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  1023. #if(DIRECTINPUT_VERSION >= 0x050a)
  1024. #define DIDOI_GUIDISUSAGE       0x00010000
  1025. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  1026.  
  1027. typedef struct DIPROPHEADER {
  1028.     DWORD   dwSize;
  1029.     DWORD   dwHeaderSize;
  1030.     DWORD   dwObj;
  1031.     DWORD   dwHow;
  1032. } DIPROPHEADER, *LPDIPROPHEADER;
  1033. typedef const DIPROPHEADER *LPCDIPROPHEADER;
  1034.  
  1035. #define DIPH_DEVICE             0
  1036. #define DIPH_BYOFFSET           1
  1037. #define DIPH_BYID               2
  1038. #if(DIRECTINPUT_VERSION >= 0x050a)
  1039. #define DIPH_BYUSAGE            3
  1040. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  1041.  
  1042. #if(DIRECTINPUT_VERSION >= 0x050a)
  1043. #define DIMAKEUSAGEDWORD(UsagePage, Usage) \
  1044.                                 (DWORD)MAKELONG(Usage, UsagePage)
  1045. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  1046.  
  1047. typedef struct DIPROPDWORD {
  1048.     DIPROPHEADER diph;
  1049.     DWORD   dwData;
  1050. } DIPROPDWORD, *LPDIPROPDWORD;
  1051. typedef const DIPROPDWORD *LPCDIPROPDWORD;
  1052.  
  1053. #if(DIRECTINPUT_VERSION >= 0x0800)
  1054. typedef struct DIPROPPOINTER {
  1055.     DIPROPHEADER diph;
  1056.     UINT_PTR uData;
  1057. } DIPROPPOINTER, *LPDIPROPPOINTER;
  1058. typedef const DIPROPPOINTER *LPCDIPROPPOINTER;
  1059. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  1060.  
  1061. typedef struct DIPROPRANGE {
  1062.     DIPROPHEADER diph;
  1063.     LONG    lMin;
  1064.     LONG    lMax;
  1065. } DIPROPRANGE, *LPDIPROPRANGE;
  1066. typedef const DIPROPRANGE *LPCDIPROPRANGE;
  1067.  
  1068. #define DIPROPRANGE_NOMIN       ((LONG)0x80000000)
  1069. #define DIPROPRANGE_NOMAX       ((LONG)0x7FFFFFFF)
  1070.  
  1071. #if(DIRECTINPUT_VERSION >= 0x050a)
  1072. typedef struct DIPROPCAL {
  1073.     DIPROPHEADER diph;
  1074.     LONG    lMin;
  1075.     LONG    lCenter;
  1076.     LONG    lMax;
  1077. } DIPROPCAL, *LPDIPROPCAL;
  1078. typedef const DIPROPCAL *LPCDIPROPCAL;
  1079.  
  1080. typedef struct DIPROPCALPOV {
  1081.     DIPROPHEADER diph;
  1082.     LONG   lMin[5];
  1083.     LONG   lMax[5];
  1084. } DIPROPCALPOV, *LPDIPROPCALPOV;
  1085. typedef const DIPROPCALPOV *LPCDIPROPCALPOV;
  1086.  
  1087. typedef struct DIPROPGUIDANDPATH {
  1088.     DIPROPHEADER diph;
  1089.     GUID    guidClass;
  1090.     WCHAR   wszPath[MAX_PATH];
  1091. } DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
  1092. typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
  1093.  
  1094. typedef struct DIPROPSTRING {
  1095.     DIPROPHEADER diph;
  1096.     WCHAR   wsz[MAX_PATH];
  1097. } DIPROPSTRING, *LPDIPROPSTRING;
  1098. typedef const DIPROPSTRING *LPCDIPROPSTRING;
  1099.  
  1100. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  1101.  
  1102. #if(DIRECTINPUT_VERSION >= 0x0800)
  1103. #define MAXCPOINTSNUM          8
  1104.  
  1105. typedef struct _CPOINT
  1106. {
  1107.     LONG  lP;     // raw value
  1108.     DWORD dwLog;  // logical_value / max_logical_value * 10000
  1109. } CPOINT, *PCPOINT;
  1110.  
  1111. typedef struct DIPROPCPOINTS {
  1112.     DIPROPHEADER diph;
  1113.     DWORD  dwCPointsNum;
  1114.     CPOINT cp[MAXCPOINTSNUM];
  1115. } DIPROPCPOINTS, *LPDIPROPCPOINTS;
  1116. typedef const DIPROPCPOINTS *LPCDIPROPCPOINTS;
  1117. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  1118.  
  1119.  
  1120. #ifdef __cplusplus
  1121. #define MAKEDIPROP(prop)    (*(const GUID *)(prop))
  1122. #else
  1123. #define MAKEDIPROP(prop)    ((REFGUID)(prop))
  1124. #endif
  1125.  
  1126. #define DIPROP_BUFFERSIZE       MAKEDIPROP(1)
  1127.  
  1128. #define DIPROP_AXISMODE         MAKEDIPROP(2)
  1129.  
  1130. #define DIPROPAXISMODE_ABS      0
  1131. #define DIPROPAXISMODE_REL      1
  1132.  
  1133. #define DIPROP_GRANULARITY      MAKEDIPROP(3)
  1134.  
  1135. #define DIPROP_RANGE            MAKEDIPROP(4)
  1136.  
  1137. #define DIPROP_DEADZONE         MAKEDIPROP(5)
  1138.  
  1139. #define DIPROP_SATURATION       MAKEDIPROP(6)
  1140.  
  1141. #define DIPROP_FFGAIN           MAKEDIPROP(7)
  1142.  
  1143. #define DIPROP_FFLOAD           MAKEDIPROP(8)
  1144.  
  1145. #define DIPROP_AUTOCENTER       MAKEDIPROP(9)
  1146.  
  1147. #define DIPROPAUTOCENTER_OFF    0
  1148. #define DIPROPAUTOCENTER_ON     1
  1149.  
  1150. #define DIPROP_CALIBRATIONMODE  MAKEDIPROP(10)
  1151.  
  1152. #define DIPROPCALIBRATIONMODE_COOKED    0
  1153. #define DIPROPCALIBRATIONMODE_RAW       1
  1154.  
  1155. #if(DIRECTINPUT_VERSION >= 0x050a)
  1156. #define DIPROP_CALIBRATION      MAKEDIPROP(11)
  1157.  
  1158. #define DIPROP_GUIDANDPATH      MAKEDIPROP(12)
  1159.  
  1160. #define DIPROP_INSTANCENAME     MAKEDIPROP(13)
  1161.  
  1162. #define DIPROP_PRODUCTNAME      MAKEDIPROP(14)
  1163. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  1164.  
  1165. #if(DIRECTINPUT_VERSION >= 0x05b2)
  1166. #define DIPROP_JOYSTICKID       MAKEDIPROP(15)
  1167.  
  1168. #define DIPROP_GETPORTDISPLAYNAME       MAKEDIPROP(16)
  1169.  
  1170. #endif /* DIRECTINPUT_VERSION >= 0x05b2 */
  1171.  
  1172. #if(DIRECTINPUT_VERSION >= 0x0700)
  1173. #define DIPROP_PHYSICALRANGE            MAKEDIPROP(18)
  1174.  
  1175. #define DIPROP_LOGICALRANGE             MAKEDIPROP(19)
  1176. #endif /* DIRECTINPUT_VERSION >= 0x0700 */
  1177.  
  1178. #if(DIRECTINPUT_VERSION >= 0x0800)
  1179. #define DIPROP_KEYNAME                     MAKEDIPROP(20)
  1180.  
  1181. #define DIPROP_CPOINTS                 MAKEDIPROP(21)
  1182.  
  1183. #define DIPROP_APPDATA       MAKEDIPROP(22)
  1184.  
  1185. #define DIPROP_SCANCODE      MAKEDIPROP(23)
  1186.  
  1187. #define DIPROP_VIDPID           MAKEDIPROP(24)
  1188.  
  1189. #define DIPROP_USERNAME         MAKEDIPROP(25)
  1190.  
  1191. #define DIPROP_TYPENAME         MAKEDIPROP(26)
  1192. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  1193.  
  1194.  
  1195. typedef struct DIDEVICEOBJECTDATA_DX3 {
  1196.     DWORD       dwOfs;
  1197.     DWORD       dwData;
  1198.     DWORD       dwTimeStamp;
  1199.     DWORD       dwSequence;
  1200. } DIDEVICEOBJECTDATA_DX3, *LPDIDEVICEOBJECTDATA_DX3;
  1201. typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX;
  1202.  
  1203. typedef struct DIDEVICEOBJECTDATA {
  1204.     DWORD       dwOfs;
  1205.     DWORD       dwData;
  1206.     DWORD       dwTimeStamp;
  1207.     DWORD       dwSequence;
  1208. #if(DIRECTINPUT_VERSION >= 0x0800)
  1209.     UINT_PTR    uAppData;
  1210. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  1211. } DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
  1212. typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
  1213.  
  1214. #define DIGDD_PEEK          0x00000001
  1215.  
  1216. #define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) \
  1217.                         ((int)((dwSequence1) - (dwSequence2)) cmp 0)
  1218. #define DISCL_EXCLUSIVE     0x00000001
  1219. #define DISCL_NONEXCLUSIVE  0x00000002
  1220. #define DISCL_FOREGROUND    0x00000004
  1221. #define DISCL_BACKGROUND    0x00000008
  1222. #define DISCL_NOWINKEY      0x00000010
  1223.  
  1224. #if(DIRECTINPUT_VERSION >= 0x0500)
  1225. /* These structures are defined for DirectX 3.0 compatibility */
  1226.  
  1227. typedef struct DIDEVICEINSTANCE_DX3A {
  1228.     DWORD   dwSize;
  1229.     GUID    guidInstance;
  1230.     GUID    guidProduct;
  1231.     DWORD   dwDevType;
  1232.     CHAR    tszInstanceName[MAX_PATH];
  1233.     CHAR    tszProductName[MAX_PATH];
  1234. } DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;
  1235. typedef struct DIDEVICEINSTANCE_DX3W {
  1236.     DWORD   dwSize;
  1237.     GUID    guidInstance;
  1238.     GUID    guidProduct;
  1239.     DWORD   dwDevType;
  1240.     WCHAR   tszInstanceName[MAX_PATH];
  1241.     WCHAR   tszProductName[MAX_PATH];
  1242. } DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;
  1243. #ifdef UNICODE
  1244. typedef DIDEVICEINSTANCE_DX3W DIDEVICEINSTANCE_DX3;
  1245. typedef LPDIDEVICEINSTANCE_DX3W LPDIDEVICEINSTANCE_DX3;
  1246. #else
  1247. typedef DIDEVICEINSTANCE_DX3A DIDEVICEINSTANCE_DX3;
  1248. typedef LPDIDEVICEINSTANCE_DX3A LPDIDEVICEINSTANCE_DX3;
  1249. #endif // UNICODE
  1250. typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;
  1251. typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;
  1252. typedef const DIDEVICEINSTANCE_DX3  *LPCDIDEVICEINSTANCE_DX3;
  1253. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  1254.  
  1255. typedef struct DIDEVICEINSTANCEA {
  1256.     DWORD   dwSize;
  1257.     GUID    guidInstance;
  1258.     GUID    guidProduct;
  1259.     DWORD   dwDevType;
  1260.     CHAR    tszInstanceName[MAX_PATH];
  1261.     CHAR    tszProductName[MAX_PATH];
  1262. #if(DIRECTINPUT_VERSION >= 0x0500)
  1263.     GUID    guidFFDriver;
  1264.     WORD    wUsagePage;
  1265.     WORD    wUsage;
  1266. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  1267. } DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
  1268. typedef struct DIDEVICEINSTANCEW {
  1269.     DWORD   dwSize;
  1270.     GUID    guidInstance;
  1271.     GUID    guidProduct;
  1272.     DWORD   dwDevType;
  1273.     WCHAR   tszInstanceName[MAX_PATH];
  1274.     WCHAR   tszProductName[MAX_PATH];
  1275. #if(DIRECTINPUT_VERSION >= 0x0500)
  1276.     GUID    guidFFDriver;
  1277.     WORD    wUsagePage;
  1278.     WORD    wUsage;
  1279. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  1280. } DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
  1281. #ifdef UNICODE
  1282. typedef DIDEVICEINSTANCEW DIDEVICEINSTANCE;
  1283. typedef LPDIDEVICEINSTANCEW LPDIDEVICEINSTANCE;
  1284. #else
  1285. typedef DIDEVICEINSTANCEA DIDEVICEINSTANCE;
  1286. typedef LPDIDEVICEINSTANCEA LPDIDEVICEINSTANCE;
  1287. #endif // UNICODE
  1288.  
  1289. typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
  1290. typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
  1291. #ifdef UNICODE
  1292. typedef DIDEVICEINSTANCEW DIDEVICEINSTANCE;
  1293. typedef LPCDIDEVICEINSTANCEW LPCDIDEVICEINSTANCE;
  1294. #else
  1295. typedef DIDEVICEINSTANCEA DIDEVICEINSTANCE;
  1296. typedef LPCDIDEVICEINSTANCEA LPCDIDEVICEINSTANCE;
  1297. #endif // UNICODE
  1298. typedef const DIDEVICEINSTANCE  *LPCDIDEVICEINSTANCE;
  1299.  
  1300. #undef INTERFACE
  1301. #define INTERFACE IDirectInputDeviceW
  1302.  
  1303. DECLARE_INTERFACE_(IDirectInputDeviceW, IUnknown)
  1304. {
  1305.     /*** IUnknown methods ***/
  1306.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1307.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1308.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1309.  
  1310.     /*** IDirectInputDeviceW methods ***/
  1311.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1312.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
  1313.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1314.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1315.     STDMETHOD(Acquire)(THIS) PURE;
  1316.     STDMETHOD(Unacquire)(THIS) PURE;
  1317.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1318.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1319.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1320.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1321.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1322.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
  1323.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
  1324.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1325.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1326. };
  1327.  
  1328. typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;
  1329.  
  1330. #undef INTERFACE
  1331. #define INTERFACE IDirectInputDeviceA
  1332.  
  1333. DECLARE_INTERFACE_(IDirectInputDeviceA, IUnknown)
  1334. {
  1335.     /*** IUnknown methods ***/
  1336.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1337.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1338.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1339.  
  1340.     /*** IDirectInputDeviceA methods ***/
  1341.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1342.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
  1343.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1344.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1345.     STDMETHOD(Acquire)(THIS) PURE;
  1346.     STDMETHOD(Unacquire)(THIS) PURE;
  1347.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1348.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1349.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1350.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1351.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1352.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
  1353.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
  1354.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1355.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1356. };
  1357.  
  1358. typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;
  1359.  
  1360. #ifdef UNICODE
  1361. #define IID_IDirectInputDevice IID_IDirectInputDeviceW
  1362. #define IDirectInputDevice IDirectInputDeviceW
  1363. #define IDirectInputDeviceVtbl IDirectInputDeviceWVtbl
  1364. #else
  1365. #define IID_IDirectInputDevice IID_IDirectInputDeviceA
  1366. #define IDirectInputDevice IDirectInputDeviceA
  1367. #define IDirectInputDeviceVtbl IDirectInputDeviceAVtbl
  1368. #endif
  1369. typedef struct IDirectInputDevice *LPDIRECTINPUTDEVICE;
  1370.  
  1371. #if !defined(__cplusplus) || defined(CINTERFACE)
  1372. #define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1373. #define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
  1374. #define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
  1375. #define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1376. #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1377. #define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1378. #define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1379. #define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
  1380. #define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1381. #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1382. #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1383. #define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1384. #define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1385. #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1386. #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1387. #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1388. #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1389. #define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1390. #else
  1391. #define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1392. #define IDirectInputDevice_AddRef(p) (p)->AddRef()
  1393. #define IDirectInputDevice_Release(p) (p)->Release()
  1394. #define IDirectInputDevice_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1395. #define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1396. #define IDirectInputDevice_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1397. #define IDirectInputDevice_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1398. #define IDirectInputDevice_Acquire(p) (p)->Acquire()
  1399. #define IDirectInputDevice_Unacquire(p) (p)->Unacquire()
  1400. #define IDirectInputDevice_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1401. #define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1402. #define IDirectInputDevice_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1403. #define IDirectInputDevice_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1404. #define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1405. #define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1406. #define IDirectInputDevice_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1407. #define IDirectInputDevice_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1408. #define IDirectInputDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1409. #endif
  1410.  
  1411. #endif /* DIJ_RINGZERO */
  1412.  
  1413.  
  1414. #if(DIRECTINPUT_VERSION >= 0x0500)
  1415.  
  1416. #define DISFFC_RESET            0x00000001
  1417. #define DISFFC_STOPALL          0x00000002
  1418. #define DISFFC_PAUSE            0x00000004
  1419. #define DISFFC_CONTINUE         0x00000008
  1420. #define DISFFC_SETACTUATORSON   0x00000010
  1421. #define DISFFC_SETACTUATORSOFF  0x00000020
  1422.  
  1423. #define DIGFFS_EMPTY            0x00000001
  1424. #define DIGFFS_STOPPED          0x00000002
  1425. #define DIGFFS_PAUSED           0x00000004
  1426. #define DIGFFS_ACTUATORSON      0x00000010
  1427. #define DIGFFS_ACTUATORSOFF     0x00000020
  1428. #define DIGFFS_POWERON          0x00000040
  1429. #define DIGFFS_POWEROFF         0x00000080
  1430. #define DIGFFS_SAFETYSWITCHON   0x00000100
  1431. #define DIGFFS_SAFETYSWITCHOFF  0x00000200
  1432. #define DIGFFS_USERFFSWITCHON   0x00000400
  1433. #define DIGFFS_USERFFSWITCHOFF  0x00000800
  1434. #define DIGFFS_DEVICELOST       0x80000000
  1435.  
  1436. #ifndef DIJ_RINGZERO
  1437.  
  1438. typedef struct DIEFFECTINFOA {
  1439.     DWORD   dwSize;
  1440.     GUID    guid;
  1441.     DWORD   dwEffType;
  1442.     DWORD   dwStaticParams;
  1443.     DWORD   dwDynamicParams;
  1444.     CHAR    tszName[MAX_PATH];
  1445. } DIEFFECTINFOA, *LPDIEFFECTINFOA;
  1446. typedef struct DIEFFECTINFOW {
  1447.     DWORD   dwSize;
  1448.     GUID    guid;
  1449.     DWORD   dwEffType;
  1450.     DWORD   dwStaticParams;
  1451.     DWORD   dwDynamicParams;
  1452.     WCHAR   tszName[MAX_PATH];
  1453. } DIEFFECTINFOW, *LPDIEFFECTINFOW;
  1454. #ifdef UNICODE
  1455. typedef DIEFFECTINFOW DIEFFECTINFO;
  1456. typedef LPDIEFFECTINFOW LPDIEFFECTINFO;
  1457. #else
  1458. typedef DIEFFECTINFOA DIEFFECTINFO;
  1459. typedef LPDIEFFECTINFOA LPDIEFFECTINFO;
  1460. #endif // UNICODE
  1461. typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
  1462. typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
  1463. typedef const DIEFFECTINFO  *LPCDIEFFECTINFO;
  1464.  
  1465. #define DISDD_CONTINUE          0x00000001
  1466.  
  1467. typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
  1468. typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
  1469. #ifdef UNICODE
  1470. #define LPDIENUMEFFECTSCALLBACK  LPDIENUMEFFECTSCALLBACKW
  1471. #else
  1472. #define LPDIENUMEFFECTSCALLBACK  LPDIENUMEFFECTSCALLBACKA
  1473. #endif // !UNICODE
  1474. typedef BOOL (FAR PASCAL * LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
  1475.  
  1476. #undef INTERFACE
  1477. #define INTERFACE IDirectInputDevice2W
  1478.  
  1479. DECLARE_INTERFACE_(IDirectInputDevice2W, IDirectInputDeviceW)
  1480. {
  1481.     /*** IUnknown methods ***/
  1482.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1483.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1484.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1485.  
  1486.     /*** IDirectInputDeviceW methods ***/
  1487.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1488.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
  1489.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1490.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1491.     STDMETHOD(Acquire)(THIS) PURE;
  1492.     STDMETHOD(Unacquire)(THIS) PURE;
  1493.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1494.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1495.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1496.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1497.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1498.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
  1499.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
  1500.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1501.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1502.  
  1503.     /*** IDirectInputDevice2W methods ***/
  1504.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1505.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
  1506.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
  1507.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1508.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1509.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1510.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1511.     STDMETHOD(Poll)(THIS) PURE;
  1512.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1513. };
  1514.  
  1515. typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;
  1516.  
  1517. #undef INTERFACE
  1518. #define INTERFACE IDirectInputDevice2A
  1519.  
  1520. DECLARE_INTERFACE_(IDirectInputDevice2A, IDirectInputDeviceA)
  1521. {
  1522.     /*** IUnknown methods ***/
  1523.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1524.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1525.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1526.  
  1527.     /*** IDirectInputDeviceA methods ***/
  1528.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1529.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
  1530.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1531.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1532.     STDMETHOD(Acquire)(THIS) PURE;
  1533.     STDMETHOD(Unacquire)(THIS) PURE;
  1534.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1535.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1536.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1537.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1538.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1539.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
  1540.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
  1541.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1542.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1543.  
  1544.     /*** IDirectInputDevice2A methods ***/
  1545.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1546.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
  1547.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
  1548.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1549.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1550.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1551.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1552.     STDMETHOD(Poll)(THIS) PURE;
  1553.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1554. };
  1555.  
  1556. typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;
  1557.  
  1558. #ifdef UNICODE
  1559. #define IID_IDirectInputDevice2 IID_IDirectInputDevice2W
  1560. #define IDirectInputDevice2 IDirectInputDevice2W
  1561. #define IDirectInputDevice2Vtbl IDirectInputDevice2WVtbl
  1562. #else
  1563. #define IID_IDirectInputDevice2 IID_IDirectInputDevice2A
  1564. #define IDirectInputDevice2 IDirectInputDevice2A
  1565. #define IDirectInputDevice2Vtbl IDirectInputDevice2AVtbl
  1566. #endif
  1567. typedef struct IDirectInputDevice2 *LPDIRECTINPUTDEVICE2;
  1568.  
  1569. #if !defined(__cplusplus) || defined(CINTERFACE)
  1570. #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1571. #define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1572. #define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
  1573. #define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1574. #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1575. #define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1576. #define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1577. #define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
  1578. #define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1579. #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1580. #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1581. #define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1582. #define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1583. #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1584. #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1585. #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1586. #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1587. #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1588. #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
  1589. #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
  1590. #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
  1591. #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
  1592. #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
  1593. #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
  1594. #define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  1595. #define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
  1596. #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
  1597. #else
  1598. #define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1599. #define IDirectInputDevice2_AddRef(p) (p)->AddRef()
  1600. #define IDirectInputDevice2_Release(p) (p)->Release()
  1601. #define IDirectInputDevice2_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1602. #define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1603. #define IDirectInputDevice2_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1604. #define IDirectInputDevice2_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1605. #define IDirectInputDevice2_Acquire(p) (p)->Acquire()
  1606. #define IDirectInputDevice2_Unacquire(p) (p)->Unacquire()
  1607. #define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1608. #define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1609. #define IDirectInputDevice2_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1610. #define IDirectInputDevice2_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1611. #define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1612. #define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1613. #define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1614. #define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1615. #define IDirectInputDevice2_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1616. #define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
  1617. #define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
  1618. #define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
  1619. #define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
  1620. #define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
  1621. #define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
  1622. #define IDirectInputDevice2_Escape(p,a) (p)->Escape(a)
  1623. #define IDirectInputDevice2_Poll(p) (p)->Poll()
  1624. #define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
  1625. #endif
  1626.  
  1627. #endif /* DIJ_RINGZERO */
  1628.  
  1629. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  1630.  
  1631. #if(DIRECTINPUT_VERSION >= 0x0700)
  1632. #define DIFEF_DEFAULT               0x00000000
  1633. #define DIFEF_INCLUDENONSTANDARD    0x00000001
  1634. #define DIFEF_MODIFYIFNEEDED            0x00000010
  1635.  
  1636. #ifndef DIJ_RINGZERO
  1637.  
  1638. #undef INTERFACE
  1639. #define INTERFACE IDirectInputDevice7W
  1640.  
  1641. DECLARE_INTERFACE_(IDirectInputDevice7W, IDirectInputDevice2W)
  1642. {
  1643.     /*** IUnknown methods ***/
  1644.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1645.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1646.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1647.  
  1648.     /*** IDirectInputDevice2W methods ***/
  1649.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1650.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
  1651.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1652.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1653.     STDMETHOD(Acquire)(THIS) PURE;
  1654.     STDMETHOD(Unacquire)(THIS) PURE;
  1655.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1656.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1657.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1658.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1659.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1660.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
  1661.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
  1662.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1663.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1664.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1665.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
  1666.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
  1667.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1668.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1669.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1670.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1671.     STDMETHOD(Poll)(THIS) PURE;
  1672.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1673.  
  1674.     /*** IDirectInputDevice7W methods ***/
  1675.     STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
  1676.     STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
  1677. };
  1678.  
  1679. typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W;
  1680.  
  1681. #undef INTERFACE
  1682. #define INTERFACE IDirectInputDevice7A
  1683.  
  1684. DECLARE_INTERFACE_(IDirectInputDevice7A, IDirectInputDevice2A)
  1685. {
  1686.     /*** IUnknown methods ***/
  1687.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1688.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1689.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1690.  
  1691.     /*** IDirectInputDevice2A methods ***/
  1692.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1693.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
  1694.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1695.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1696.     STDMETHOD(Acquire)(THIS) PURE;
  1697.     STDMETHOD(Unacquire)(THIS) PURE;
  1698.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1699.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1700.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1701.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1702.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1703.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
  1704.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
  1705.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1706.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1707.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1708.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
  1709.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
  1710.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1711.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1712.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1713.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1714.     STDMETHOD(Poll)(THIS) PURE;
  1715.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1716.  
  1717.     /*** IDirectInputDevice7A methods ***/
  1718.     STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
  1719.     STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
  1720. };
  1721.  
  1722. typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A;
  1723.  
  1724. #ifdef UNICODE
  1725. #define IID_IDirectInputDevice7 IID_IDirectInputDevice7W
  1726. #define IDirectInputDevice7 IDirectInputDevice7W
  1727. #define IDirectInputDevice7Vtbl IDirectInputDevice7WVtbl
  1728. #else
  1729. #define IID_IDirectInputDevice7 IID_IDirectInputDevice7A
  1730. #define IDirectInputDevice7 IDirectInputDevice7A
  1731. #define IDirectInputDevice7Vtbl IDirectInputDevice7AVtbl
  1732. #endif
  1733. typedef struct IDirectInputDevice7 *LPDIRECTINPUTDEVICE7;
  1734.  
  1735. #if !defined(__cplusplus) || defined(CINTERFACE)
  1736. #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1737. #define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1738. #define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p)
  1739. #define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1740. #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1741. #define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1742. #define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1743. #define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p)
  1744. #define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1745. #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1746. #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1747. #define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1748. #define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1749. #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1750. #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1751. #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1752. #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1753. #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1754. #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
  1755. #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
  1756. #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
  1757. #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
  1758. #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
  1759. #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
  1760. #define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  1761. #define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p)
  1762. #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
  1763. #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
  1764. #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
  1765. #else
  1766. #define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1767. #define IDirectInputDevice7_AddRef(p) (p)->AddRef()
  1768. #define IDirectInputDevice7_Release(p) (p)->Release()
  1769. #define IDirectInputDevice7_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1770. #define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1771. #define IDirectInputDevice7_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1772. #define IDirectInputDevice7_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1773. #define IDirectInputDevice7_Acquire(p) (p)->Acquire()
  1774. #define IDirectInputDevice7_Unacquire(p) (p)->Unacquire()
  1775. #define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1776. #define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1777. #define IDirectInputDevice7_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1778. #define IDirectInputDevice7_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1779. #define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1780. #define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1781. #define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1782. #define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1783. #define IDirectInputDevice7_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1784. #define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
  1785. #define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
  1786. #define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
  1787. #define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
  1788. #define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
  1789. #define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
  1790. #define IDirectInputDevice7_Escape(p,a) (p)->Escape(a)
  1791. #define IDirectInputDevice7_Poll(p) (p)->Poll()
  1792. #define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
  1793. #define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
  1794. #define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
  1795. #endif
  1796.  
  1797. #endif /* DIJ_RINGZERO */
  1798.  
  1799. #endif /* DIRECTINPUT_VERSION >= 0x0700 */
  1800.  
  1801. #if(DIRECTINPUT_VERSION >= 0x0800)
  1802.  
  1803. #ifndef DIJ_RINGZERO
  1804.  
  1805. #undef INTERFACE
  1806. #define INTERFACE IDirectInputDevice8W
  1807.  
  1808. DECLARE_INTERFACE_(IDirectInputDevice8W, IUnknown)
  1809. {
  1810.     /*** IUnknown methods ***/
  1811.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1812.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1813.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1814.  
  1815.     /*** IDirectInputDevice8W methods ***/
  1816.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1817.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
  1818.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1819.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1820.     STDMETHOD(Acquire)(THIS) PURE;
  1821.     STDMETHOD(Unacquire)(THIS) PURE;
  1822.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1823.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1824.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1825.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1826.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1827.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
  1828.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
  1829.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1830.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1831.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1832.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
  1833.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
  1834.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1835.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1836.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1837.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1838.     STDMETHOD(Poll)(THIS) PURE;
  1839.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1840.     STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
  1841.     STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
  1842.     STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW,LPCWSTR,DWORD) PURE;
  1843.     STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW,LPCWSTR,DWORD) PURE;
  1844.     STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW) PURE;
  1845. };
  1846.  
  1847. typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W;
  1848.  
  1849. #undef INTERFACE
  1850. #define INTERFACE IDirectInputDevice8A
  1851.  
  1852. DECLARE_INTERFACE_(IDirectInputDevice8A, IUnknown)
  1853. {
  1854.     /*** IUnknown methods ***/
  1855.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1856.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1857.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1858.  
  1859.     /*** IDirectInputDevice8A methods ***/
  1860.     STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
  1861.     STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
  1862.     STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
  1863.     STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
  1864.     STDMETHOD(Acquire)(THIS) PURE;
  1865.     STDMETHOD(Unacquire)(THIS) PURE;
  1866.     STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
  1867.     STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1868.     STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
  1869.     STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
  1870.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  1871.     STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
  1872.     STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
  1873.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  1874.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
  1875.     STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
  1876.     STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
  1877.     STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
  1878.     STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
  1879.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
  1880.     STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
  1881.     STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
  1882.     STDMETHOD(Poll)(THIS) PURE;
  1883.     STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
  1884.     STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
  1885.     STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
  1886.     STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA,LPCSTR,DWORD) PURE;
  1887.     STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA,LPCSTR,DWORD) PURE;
  1888.     STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA) PURE;
  1889. };
  1890.  
  1891. typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A;
  1892.  
  1893. #ifdef UNICODE
  1894. #define IID_IDirectInputDevice8 IID_IDirectInputDevice8W
  1895. #define IDirectInputDevice8 IDirectInputDevice8W
  1896. #define IDirectInputDevice8Vtbl IDirectInputDevice8WVtbl
  1897. #else
  1898. #define IID_IDirectInputDevice8 IID_IDirectInputDevice8A
  1899. #define IDirectInputDevice8 IDirectInputDevice8A
  1900. #define IDirectInputDevice8Vtbl IDirectInputDevice8AVtbl
  1901. #endif
  1902. typedef struct IDirectInputDevice8 *LPDIRECTINPUTDEVICE8;
  1903.  
  1904. #if !defined(__cplusplus) || defined(CINTERFACE)
  1905. #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1906. #define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p)
  1907. #define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p)
  1908. #define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
  1909. #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
  1910. #define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
  1911. #define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
  1912. #define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p)
  1913. #define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  1914. #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
  1915. #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
  1916. #define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
  1917. #define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
  1918. #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  1919. #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
  1920. #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
  1921. #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  1922. #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1923. #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
  1924. #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
  1925. #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
  1926. #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
  1927. #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
  1928. #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
  1929. #define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a)
  1930. #define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p)
  1931. #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
  1932. #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
  1933. #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
  1934. #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
  1935. #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c)
  1936. #define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a)
  1937. #else
  1938. #define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1939. #define IDirectInputDevice8_AddRef(p) (p)->AddRef()
  1940. #define IDirectInputDevice8_Release(p) (p)->Release()
  1941. #define IDirectInputDevice8_GetCapabilities(p,a) (p)->GetCapabilities(a)
  1942. #define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
  1943. #define IDirectInputDevice8_GetProperty(p,a,b) (p)->GetProperty(a,b)
  1944. #define IDirectInputDevice8_SetProperty(p,a,b) (p)->SetProperty(a,b)
  1945. #define IDirectInputDevice8_Acquire(p) (p)->Acquire()
  1946. #define IDirectInputDevice8_Unacquire(p) (p)->Unacquire()
  1947. #define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
  1948. #define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
  1949. #define IDirectInputDevice8_SetDataFormat(p,a) (p)->SetDataFormat(a)
  1950. #define IDirectInputDevice8_SetEventNotification(p,a) (p)->SetEventNotification(a)
  1951. #define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  1952. #define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
  1953. #define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
  1954. #define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  1955. #define IDirectInputDevice8_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1956. #define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
  1957. #define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
  1958. #define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
  1959. #define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
  1960. #define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
  1961. #define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
  1962. #define IDirectInputDevice8_Escape(p,a) (p)->Escape(a)
  1963. #define IDirectInputDevice8_Poll(p) (p)->Poll()
  1964. #define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
  1965. #define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
  1966. #define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
  1967. #define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)
  1968. #define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->SetActionMap(a,b,c)
  1969. #define IDirectInputDevice8_GetImageInfo(p,a) (p)->GetImageInfo(a)
  1970. #endif
  1971.  
  1972. #endif /* DIJ_RINGZERO */
  1973.  
  1974. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  1975.  
  1976. /****************************************************************************
  1977.  *
  1978.  *      Mouse
  1979.  *
  1980.  ****************************************************************************/
  1981.  
  1982. #ifndef DIJ_RINGZERO
  1983.  
  1984. typedef struct _DIMOUSESTATE {
  1985.     LONG    lX;
  1986.     LONG    lY;
  1987.     LONG    lZ;
  1988.     BYTE    rgbButtons[4];
  1989. } DIMOUSESTATE, *LPDIMOUSESTATE;
  1990.  
  1991. #if DIRECTINPUT_VERSION >= 0x0700
  1992. typedef struct _DIMOUSESTATE2 {
  1993.     LONG    lX;
  1994.     LONG    lY;
  1995.     LONG    lZ;
  1996.     BYTE    rgbButtons[8];
  1997. } DIMOUSESTATE2, *LPDIMOUSESTATE2;
  1998. #endif
  1999.  
  2000.  
  2001. #define DIMOFS_X        FIELD_OFFSET(DIMOUSESTATE, lX)
  2002. #define DIMOFS_Y        FIELD_OFFSET(DIMOUSESTATE, lY)
  2003. #define DIMOFS_Z        FIELD_OFFSET(DIMOUSESTATE, lZ)
  2004. #define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
  2005. #define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
  2006. #define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
  2007. #define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
  2008. #if (DIRECTINPUT_VERSION >= 0x0700)
  2009. #define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
  2010. #define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
  2011. #define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
  2012. #define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
  2013. #endif
  2014. #endif /* DIJ_RINGZERO */
  2015.  
  2016. /****************************************************************************
  2017.  *
  2018.  *      Keyboard
  2019.  *
  2020.  ****************************************************************************/
  2021.  
  2022. #ifndef DIJ_RINGZERO
  2023.  
  2024. /****************************************************************************
  2025.  *
  2026.  *      DirectInput keyboard scan codes
  2027.  *
  2028.  ****************************************************************************/
  2029. #define DIK_ESCAPE          0x01
  2030. #define DIK_1               0x02
  2031. #define DIK_2               0x03
  2032. #define DIK_3               0x04
  2033. #define DIK_4               0x05
  2034. #define DIK_5               0x06
  2035. #define DIK_6               0x07
  2036. #define DIK_7               0x08
  2037. #define DIK_8               0x09
  2038. #define DIK_9               0x0A
  2039. #define DIK_0               0x0B
  2040. #define DIK_MINUS           0x0C    /* - on main keyboard */
  2041. #define DIK_EQUALS          0x0D
  2042. #define DIK_BACK            0x0E    /* backspace */
  2043. #define DIK_TAB             0x0F
  2044. #define DIK_Q               0x10
  2045. #define DIK_W               0x11
  2046. #define DIK_E               0x12
  2047. #define DIK_R               0x13
  2048. #define DIK_T               0x14
  2049. #define DIK_Y               0x15
  2050. #define DIK_U               0x16
  2051. #define DIK_I               0x17
  2052. #define DIK_O               0x18
  2053. #define DIK_P               0x19
  2054. #define DIK_LBRACKET        0x1A
  2055. #define DIK_RBRACKET        0x1B
  2056. #define DIK_RETURN          0x1C    /* Enter on main keyboard */
  2057. #define DIK_LCONTROL        0x1D
  2058. #define DIK_A               0x1E
  2059. #define DIK_S               0x1F
  2060. #define DIK_D               0x20
  2061. #define DIK_F               0x21
  2062. #define DIK_G               0x22
  2063. #define DIK_H               0x23
  2064. #define DIK_J               0x24
  2065. #define DIK_K               0x25
  2066. #define DIK_L               0x26
  2067. #define DIK_SEMICOLON       0x27
  2068. #define DIK_APOSTROPHE      0x28
  2069. #define DIK_GRAVE           0x29    /* accent grave */
  2070. #define DIK_LSHIFT          0x2A
  2071. #define DIK_BACKSLASH       0x2B
  2072. #define DIK_Z               0x2C
  2073. #define DIK_X               0x2D
  2074. #define DIK_C               0x2E
  2075. #define DIK_V               0x2F
  2076. #define DIK_B               0x30
  2077. #define DIK_N               0x31
  2078. #define DIK_M               0x32
  2079. #define DIK_COMMA           0x33
  2080. #define DIK_PERIOD          0x34    /* . on main keyboard */
  2081. #define DIK_SLASH           0x35    /* / on main keyboard */
  2082. #define DIK_RSHIFT          0x36
  2083. #define DIK_MULTIPLY        0x37    /* * on numeric keypad */
  2084. #define DIK_LMENU           0x38    /* left Alt */
  2085. #define DIK_SPACE           0x39
  2086. #define DIK_CAPITAL         0x3A
  2087. #define DIK_F1              0x3B
  2088. #define DIK_F2              0x3C
  2089. #define DIK_F3              0x3D
  2090. #define DIK_F4              0x3E
  2091. #define DIK_F5              0x3F
  2092. #define DIK_F6              0x40
  2093. #define DIK_F7              0x41
  2094. #define DIK_F8              0x42
  2095. #define DIK_F9              0x43
  2096. #define DIK_F10             0x44
  2097. #define DIK_NUMLOCK         0x45
  2098. #define DIK_SCROLL          0x46    /* Scroll Lock */
  2099. #define DIK_NUMPAD7         0x47
  2100. #define DIK_NUMPAD8         0x48
  2101. #define DIK_NUMPAD9         0x49
  2102. #define DIK_SUBTRACT        0x4A    /* - on numeric keypad */
  2103. #define DIK_NUMPAD4         0x4B
  2104. #define DIK_NUMPAD5         0x4C
  2105. #define DIK_NUMPAD6         0x4D
  2106. #define DIK_ADD             0x4E    /* + on numeric keypad */
  2107. #define DIK_NUMPAD1         0x4F
  2108. #define DIK_NUMPAD2         0x50
  2109. #define DIK_NUMPAD3         0x51
  2110. #define DIK_NUMPAD0         0x52
  2111. #define DIK_DECIMAL         0x53    /* . on numeric keypad */
  2112. #define DIK_OEM_102         0x56    /* <> or \| on RT 102-key keyboard (Non-U.S.) */
  2113. #define DIK_F11             0x57
  2114. #define DIK_F12             0x58
  2115. #define DIK_F13             0x64    /*                     (NEC PC98) */
  2116. #define DIK_F14             0x65    /*                     (NEC PC98) */
  2117. #define DIK_F15             0x66    /*                     (NEC PC98) */
  2118. #define DIK_KANA            0x70    /* (Japanese keyboard)            */
  2119. #define DIK_ABNT_C1         0x73    /* /? on Brazilian keyboard */
  2120. #define DIK_CONVERT         0x79    /* (Japanese keyboard)            */
  2121. #define DIK_NOCONVERT       0x7B    /* (Japanese keyboard)            */
  2122. #define DIK_YEN             0x7D    /* (Japanese keyboard)            */
  2123. #define DIK_ABNT_C2         0x7E    /* Numpad . on Brazilian keyboard */
  2124. #define DIK_NUMPADEQUALS    0x8D    /* = on numeric keypad (NEC PC98) */
  2125. #define DIK_PREVTRACK       0x90    /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
  2126. #define DIK_AT              0x91    /*                     (NEC PC98) */
  2127. #define DIK_COLON           0x92    /*                     (NEC PC98) */
  2128. #define DIK_UNDERLINE       0x93    /*                     (NEC PC98) */
  2129. #define DIK_KANJI           0x94    /* (Japanese keyboard)            */
  2130. #define DIK_STOP            0x95    /*                     (NEC PC98) */
  2131. #define DIK_AX              0x96    /*                     (Japan AX) */
  2132. #define DIK_UNLABELED       0x97    /*                        (J3100) */
  2133. #define DIK_NEXTTRACK       0x99    /* Next Track */
  2134. #define DIK_NUMPADENTER     0x9C    /* Enter on numeric keypad */
  2135. #define DIK_RCONTROL        0x9D
  2136. #define DIK_MUTE            0xA0    /* Mute */
  2137. #define DIK_CALCULATOR      0xA1    /* Calculator */
  2138. #define DIK_PLAYPAUSE       0xA2    /* Play / Pause */
  2139. #define DIK_MEDIASTOP       0xA4    /* Media Stop */
  2140. #define DIK_VOLUMEDOWN      0xAE    /* Volume - */
  2141. #define DIK_VOLUMEUP        0xB0    /* Volume + */
  2142. #define DIK_WEBHOME         0xB2    /* Web home */
  2143. #define DIK_NUMPADCOMMA     0xB3    /* , on numeric keypad (NEC PC98) */
  2144. #define DIK_DIVIDE          0xB5    /* / on numeric keypad */
  2145. #define DIK_SYSRQ           0xB7
  2146. #define DIK_RMENU           0xB8    /* right Alt */
  2147. #define DIK_PAUSE           0xC5    /* Pause */
  2148. #define DIK_HOME            0xC7    /* Home on arrow keypad */
  2149. #define DIK_UP              0xC8    /* UpArrow on arrow keypad */
  2150. #define DIK_PRIOR           0xC9    /* PgUp on arrow keypad */
  2151. #define DIK_LEFT            0xCB    /* LeftArrow on arrow keypad */
  2152. #define DIK_RIGHT           0xCD    /* RightArrow on arrow keypad */
  2153. #define DIK_END             0xCF    /* End on arrow keypad */
  2154. #define DIK_DOWN            0xD0    /* DownArrow on arrow keypad */
  2155. #define DIK_NEXT            0xD1    /* PgDn on arrow keypad */
  2156. #define DIK_INSERT          0xD2    /* Insert on arrow keypad */
  2157. #define DIK_DELETE          0xD3    /* Delete on arrow keypad */
  2158. #define DIK_LWIN            0xDB    /* Left Windows key */
  2159. #define DIK_RWIN            0xDC    /* Right Windows key */
  2160. #define DIK_APPS            0xDD    /* AppMenu key */
  2161. #define DIK_POWER           0xDE    /* System Power */
  2162. #define DIK_SLEEP           0xDF    /* System Sleep */
  2163. #define DIK_WAKE            0xE3    /* System Wake */
  2164. #define DIK_WEBSEARCH       0xE5    /* Web Search */
  2165. #define DIK_WEBFAVORITES    0xE6    /* Web Favorites */
  2166. #define DIK_WEBREFRESH      0xE7    /* Web Refresh */
  2167. #define DIK_WEBSTOP         0xE8    /* Web Stop */
  2168. #define DIK_WEBFORWARD      0xE9    /* Web Forward */
  2169. #define DIK_WEBBACK         0xEA    /* Web Back */
  2170. #define DIK_MYCOMPUTER      0xEB    /* My Computer */
  2171. #define DIK_MAIL            0xEC    /* Mail */
  2172. #define DIK_MEDIASELECT     0xED    /* Media Select */
  2173.  
  2174. /*
  2175.  *  Alternate names for keys, to facilitate transition from DOS.
  2176.  */
  2177. #define DIK_BACKSPACE       DIK_BACK            /* backspace */
  2178. #define DIK_NUMPADSTAR      DIK_MULTIPLY        /* * on numeric keypad */
  2179. #define DIK_LALT            DIK_LMENU           /* left Alt */
  2180. #define DIK_CAPSLOCK        DIK_CAPITAL         /* CapsLock */
  2181. #define DIK_NUMPADMINUS     DIK_SUBTRACT        /* - on numeric keypad */
  2182. #define DIK_NUMPADPLUS      DIK_ADD             /* + on numeric keypad */
  2183. #define DIK_NUMPADPERIOD    DIK_DECIMAL         /* . on numeric keypad */
  2184. #define DIK_NUMPADSLASH     DIK_DIVIDE          /* / on numeric keypad */
  2185. #define DIK_RALT            DIK_RMENU           /* right Alt */
  2186. #define DIK_UPARROW         DIK_UP              /* UpArrow on arrow keypad */
  2187. #define DIK_PGUP            DIK_PRIOR           /* PgUp on arrow keypad */
  2188. #define DIK_LEFTARROW       DIK_LEFT            /* LeftArrow on arrow keypad */
  2189. #define DIK_RIGHTARROW      DIK_RIGHT           /* RightArrow on arrow keypad */
  2190. #define DIK_DOWNARROW       DIK_DOWN            /* DownArrow on arrow keypad */
  2191. #define DIK_PGDN            DIK_NEXT            /* PgDn on arrow keypad */
  2192.  
  2193. /*
  2194.  *  Alternate names for keys originally not used on US keyboards.
  2195.  */
  2196. #define DIK_CIRCUMFLEX      DIK_PREVTRACK       /* Japanese keyboard */
  2197.  
  2198. #endif /* DIJ_RINGZERO */
  2199.  
  2200. /****************************************************************************
  2201.  *
  2202.  *      Joystick
  2203.  *
  2204.  ****************************************************************************/
  2205.  
  2206. #ifndef DIJ_RINGZERO
  2207.  
  2208. typedef struct DIJOYSTATE {
  2209.     LONG    lX;                     /* x-axis position              */
  2210.     LONG    lY;                     /* y-axis position              */
  2211.     LONG    lZ;                     /* z-axis position              */
  2212.     LONG    lRx;                    /* x-axis rotation              */
  2213.     LONG    lRy;                    /* y-axis rotation              */
  2214.     LONG    lRz;                    /* z-axis rotation              */
  2215.     LONG    rglSlider[2];           /* extra axes positions         */
  2216.     DWORD   rgdwPOV[4];             /* POV directions               */
  2217.     BYTE    rgbButtons[32];         /* 32 buttons                   */
  2218. } DIJOYSTATE, *LPDIJOYSTATE;
  2219.  
  2220. typedef struct DIJOYSTATE2 {
  2221.     LONG    lX;                     /* x-axis position              */
  2222.     LONG    lY;                     /* y-axis position              */
  2223.     LONG    lZ;                     /* z-axis position              */
  2224.     LONG    lRx;                    /* x-axis rotation              */
  2225.     LONG    lRy;                    /* y-axis rotation              */
  2226.     LONG    lRz;                    /* z-axis rotation              */
  2227.     LONG    rglSlider[2];           /* extra axes positions         */
  2228.     DWORD   rgdwPOV[4];             /* POV directions               */
  2229.     BYTE    rgbButtons[128];        /* 128 buttons                  */
  2230.     LONG    lVX;                    /* x-axis velocity              */
  2231.     LONG    lVY;                    /* y-axis velocity              */
  2232.     LONG    lVZ;                    /* z-axis velocity              */
  2233.     LONG    lVRx;                   /* x-axis angular velocity      */
  2234.     LONG    lVRy;                   /* y-axis angular velocity      */
  2235.     LONG    lVRz;                   /* z-axis angular velocity      */
  2236.     LONG    rglVSlider[2];          /* extra axes velocities        */
  2237.     LONG    lAX;                    /* x-axis acceleration          */
  2238.     LONG    lAY;                    /* y-axis acceleration          */
  2239.     LONG    lAZ;                    /* z-axis acceleration          */
  2240.     LONG    lARx;                   /* x-axis angular acceleration  */
  2241.     LONG    lARy;                   /* y-axis angular acceleration  */
  2242.     LONG    lARz;                   /* z-axis angular acceleration  */
  2243.     LONG    rglASlider[2];          /* extra axes accelerations     */
  2244.     LONG    lFX;                    /* x-axis force                 */
  2245.     LONG    lFY;                    /* y-axis force                 */
  2246.     LONG    lFZ;                    /* z-axis force                 */
  2247.     LONG    lFRx;                   /* x-axis torque                */
  2248.     LONG    lFRy;                   /* y-axis torque                */
  2249.     LONG    lFRz;                   /* z-axis torque                */
  2250.     LONG    rglFSlider[2];          /* extra axes forces            */
  2251. } DIJOYSTATE2, *LPDIJOYSTATE2;
  2252.  
  2253. #define DIJOFS_X            FIELD_OFFSET(DIJOYSTATE, lX)
  2254. #define DIJOFS_Y            FIELD_OFFSET(DIJOYSTATE, lY)
  2255. #define DIJOFS_Z            FIELD_OFFSET(DIJOYSTATE, lZ)
  2256. #define DIJOFS_RX           FIELD_OFFSET(DIJOYSTATE, lRx)
  2257. #define DIJOFS_RY           FIELD_OFFSET(DIJOYSTATE, lRy)
  2258. #define DIJOFS_RZ           FIELD_OFFSET(DIJOYSTATE, lRz)
  2259. #define DIJOFS_SLIDER(n)   (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
  2260.                                                         (n) * sizeof(LONG))
  2261. #define DIJOFS_POV(n)      (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
  2262.                                                         (n) * sizeof(DWORD))
  2263. #define DIJOFS_BUTTON(n)   (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
  2264. #define DIJOFS_BUTTON0      DIJOFS_BUTTON(0)
  2265. #define DIJOFS_BUTTON1      DIJOFS_BUTTON(1)
  2266. #define DIJOFS_BUTTON2      DIJOFS_BUTTON(2)
  2267. #define DIJOFS_BUTTON3      DIJOFS_BUTTON(3)
  2268. #define DIJOFS_BUTTON4      DIJOFS_BUTTON(4)
  2269. #define DIJOFS_BUTTON5      DIJOFS_BUTTON(5)
  2270. #define DIJOFS_BUTTON6      DIJOFS_BUTTON(6)
  2271. #define DIJOFS_BUTTON7      DIJOFS_BUTTON(7)
  2272. #define DIJOFS_BUTTON8      DIJOFS_BUTTON(8)
  2273. #define DIJOFS_BUTTON9      DIJOFS_BUTTON(9)
  2274. #define DIJOFS_BUTTON10     DIJOFS_BUTTON(10)
  2275. #define DIJOFS_BUTTON11     DIJOFS_BUTTON(11)
  2276. #define DIJOFS_BUTTON12     DIJOFS_BUTTON(12)
  2277. #define DIJOFS_BUTTON13     DIJOFS_BUTTON(13)
  2278. #define DIJOFS_BUTTON14     DIJOFS_BUTTON(14)
  2279. #define DIJOFS_BUTTON15     DIJOFS_BUTTON(15)
  2280. #define DIJOFS_BUTTON16     DIJOFS_BUTTON(16)
  2281. #define DIJOFS_BUTTON17     DIJOFS_BUTTON(17)
  2282. #define DIJOFS_BUTTON18     DIJOFS_BUTTON(18)
  2283. #define DIJOFS_BUTTON19     DIJOFS_BUTTON(19)
  2284. #define DIJOFS_BUTTON20     DIJOFS_BUTTON(20)
  2285. #define DIJOFS_BUTTON21     DIJOFS_BUTTON(21)
  2286. #define DIJOFS_BUTTON22     DIJOFS_BUTTON(22)
  2287. #define DIJOFS_BUTTON23     DIJOFS_BUTTON(23)
  2288. #define DIJOFS_BUTTON24     DIJOFS_BUTTON(24)
  2289. #define DIJOFS_BUTTON25     DIJOFS_BUTTON(25)
  2290. #define DIJOFS_BUTTON26     DIJOFS_BUTTON(26)
  2291. #define DIJOFS_BUTTON27     DIJOFS_BUTTON(27)
  2292. #define DIJOFS_BUTTON28     DIJOFS_BUTTON(28)
  2293. #define DIJOFS_BUTTON29     DIJOFS_BUTTON(29)
  2294. #define DIJOFS_BUTTON30     DIJOFS_BUTTON(30)
  2295. #define DIJOFS_BUTTON31     DIJOFS_BUTTON(31)
  2296.  
  2297.  
  2298. #endif /* DIJ_RINGZERO */
  2299.  
  2300. /****************************************************************************
  2301.  *
  2302.  *  IDirectInput
  2303.  *
  2304.  ****************************************************************************/
  2305.  
  2306. #ifndef DIJ_RINGZERO
  2307.  
  2308. #define DIENUM_STOP             0
  2309. #define DIENUM_CONTINUE         1
  2310.  
  2311. typedef BOOL (FAR PASCAL * LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA, LPVOID);
  2312. typedef BOOL (FAR PASCAL * LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW, LPVOID);
  2313. #ifdef UNICODE
  2314. #define LPDIENUMDEVICESCALLBACK  LPDIENUMDEVICESCALLBACKW
  2315. #else
  2316. #define LPDIENUMDEVICESCALLBACK  LPDIENUMDEVICESCALLBACKA
  2317. #endif // !UNICODE
  2318. typedef BOOL (FAR PASCAL * LPDICONFIGUREDEVICESCALLBACK)(IUnknown FAR *, LPVOID);
  2319.  
  2320. #define DIEDFL_ALLDEVICES       0x00000000
  2321. #define DIEDFL_ATTACHEDONLY     0x00000001
  2322. #if(DIRECTINPUT_VERSION >= 0x0500)
  2323. #define DIEDFL_FORCEFEEDBACK    0x00000100
  2324. #endif /* DIRECTINPUT_VERSION >= 0x0500 */
  2325. #if(DIRECTINPUT_VERSION >= 0x050a)
  2326. #define DIEDFL_INCLUDEALIASES   0x00010000
  2327. #define DIEDFL_INCLUDEPHANTOMS  0x00020000
  2328. #endif /* DIRECTINPUT_VERSION >= 0x050a */
  2329. #if(DIRECTINPUT_VERSION >= 0x0800)
  2330. #define DIEDFL_INCLUDEHIDDEN    0x00040000
  2331. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  2332.  
  2333.  
  2334. #if(DIRECTINPUT_VERSION >= 0x0800)
  2335. typedef BOOL (FAR PASCAL * LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA, LPDIRECTINPUTDEVICE8A, DWORD, DWORD, LPVOID);
  2336. typedef BOOL (FAR PASCAL * LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW, LPDIRECTINPUTDEVICE8W, DWORD, DWORD, LPVOID);
  2337. #ifdef UNICODE
  2338. #define LPDIENUMDEVICESBYSEMANTICSCB  LPDIENUMDEVICESBYSEMANTICSCBW
  2339. #else
  2340. #define LPDIENUMDEVICESBYSEMANTICSCB  LPDIENUMDEVICESBYSEMANTICSCBA
  2341. #endif // !UNICODE
  2342. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  2343.  
  2344. #if(DIRECTINPUT_VERSION >= 0x0800)
  2345. #define DIEDBS_MAPPEDPRI1         0x00000001
  2346. #define DIEDBS_MAPPEDPRI2         0x00000002
  2347. #define DIEDBS_RECENTDEVICE       0x00000010
  2348. #define DIEDBS_NEWDEVICE          0x00000020
  2349. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  2350.  
  2351. #if(DIRECTINPUT_VERSION >= 0x0800)
  2352. #define DIEDBSFL_ATTACHEDONLY       0x00000000
  2353. #define DIEDBSFL_THISUSER           0x00000010
  2354. #define DIEDBSFL_FORCEFEEDBACK      DIEDFL_FORCEFEEDBACK
  2355. #define DIEDBSFL_AVAILABLEDEVICES   0x00001000
  2356. #define DIEDBSFL_MULTIMICEKEYBOARDS 0x00002000
  2357. #define DIEDBSFL_NONGAMINGDEVICES   0x00004000
  2358. #define DIEDBSFL_VALID              0x00007110
  2359. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  2360.  
  2361. #undef INTERFACE
  2362. #define INTERFACE IDirectInputW
  2363.  
  2364. DECLARE_INTERFACE_(IDirectInputW, IUnknown)
  2365. {
  2366.     /*** IUnknown methods ***/
  2367.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  2368.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2369.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  2370.  
  2371.     /*** IDirectInputW methods ***/
  2372.     STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
  2373.     STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
  2374.     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
  2375.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  2376.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
  2377. };
  2378.  
  2379. typedef struct IDirectInputW *LPDIRECTINPUTW;
  2380.  
  2381. #undef INTERFACE
  2382. #define INTERFACE IDirectInputA
  2383.  
  2384. DECLARE_INTERFACE_(IDirectInputA, IUnknown)
  2385. {
  2386.     /*** IUnknown methods ***/
  2387.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  2388.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2389.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  2390.  
  2391.     /*** IDirectInputA methods ***/
  2392.     STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
  2393.     STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
  2394.     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
  2395.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  2396.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
  2397. };
  2398.  
  2399. typedef struct IDirectInputA *LPDIRECTINPUTA;
  2400.  
  2401. #ifdef UNICODE
  2402. #define IID_IDirectInput IID_IDirectInputW
  2403. #define IDirectInput IDirectInputW
  2404. #define IDirectInputVtbl IDirectInputWVtbl
  2405. #else
  2406. #define IID_IDirectInput IID_IDirectInputA
  2407. #define IDirectInput IDirectInputA
  2408. #define IDirectInputVtbl IDirectInputAVtbl
  2409. #endif
  2410. typedef struct IDirectInput *LPDIRECTINPUT;
  2411.  
  2412. #if !defined(__cplusplus) || defined(CINTERFACE)
  2413. #define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2414. #define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
  2415. #define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
  2416. #define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  2417. #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
  2418. #define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
  2419. #define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  2420. #define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2421. #else
  2422. #define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2423. #define IDirectInput_AddRef(p) (p)->AddRef()
  2424. #define IDirectInput_Release(p) (p)->Release()
  2425. #define IDirectInput_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  2426. #define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
  2427. #define IDirectInput_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
  2428. #define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  2429. #define IDirectInput_Initialize(p,a,b) (p)->Initialize(a,b)
  2430. #endif
  2431.  
  2432. #undef INTERFACE
  2433. #define INTERFACE IDirectInput2W
  2434.  
  2435. DECLARE_INTERFACE_(IDirectInput2W, IDirectInputW)
  2436. {
  2437.     /*** IUnknown methods ***/
  2438.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  2439.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2440.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  2441.  
  2442.     /*** IDirectInputW methods ***/
  2443.     STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
  2444.     STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
  2445.     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
  2446.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  2447.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
  2448.  
  2449.     /*** IDirectInput2W methods ***/
  2450.     STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
  2451. };
  2452.  
  2453. typedef struct IDirectInput2W *LPDIRECTINPUT2W;
  2454.  
  2455. #undef INTERFACE
  2456. #define INTERFACE IDirectInput2A
  2457.  
  2458. DECLARE_INTERFACE_(IDirectInput2A, IDirectInputA)
  2459. {
  2460.     /*** IUnknown methods ***/
  2461.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  2462.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2463.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  2464.  
  2465.     /*** IDirectInputA methods ***/
  2466.     STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
  2467.     STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
  2468.     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
  2469.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  2470.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
  2471.  
  2472.     /*** IDirectInput2A methods ***/
  2473.     STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
  2474. };
  2475.  
  2476. typedef struct IDirectInput2A *LPDIRECTINPUT2A;
  2477.  
  2478. #ifdef UNICODE
  2479. #define IID_IDirectInput2 IID_IDirectInput2W
  2480. #define IDirectInput2 IDirectInput2W
  2481. #define IDirectInput2Vtbl IDirectInput2WVtbl
  2482. #else
  2483. #define IID_IDirectInput2 IID_IDirectInput2A
  2484. #define IDirectInput2 IDirectInput2A
  2485. #define IDirectInput2Vtbl IDirectInput2AVtbl
  2486. #endif
  2487. typedef struct IDirectInput2 *LPDIRECTINPUT2;
  2488.  
  2489. #if !defined(__cplusplus) || defined(CINTERFACE)
  2490. #define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2491. #define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
  2492. #define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
  2493. #define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  2494. #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
  2495. #define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
  2496. #define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  2497. #define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2498. #define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
  2499. #else
  2500. #define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2501. #define IDirectInput2_AddRef(p) (p)->AddRef()
  2502. #define IDirectInput2_Release(p) (p)->Release()
  2503. #define IDirectInput2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  2504. #define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
  2505. #define IDirectInput2_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
  2506. #define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  2507. #define IDirectInput2_Initialize(p,a,b) (p)->Initialize(a,b)
  2508. #define IDirectInput2_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
  2509. #endif
  2510.  
  2511.  
  2512. #undef INTERFACE
  2513. #define INTERFACE IDirectInput7W
  2514.  
  2515. DECLARE_INTERFACE_(IDirectInput7W, IDirectInput2W)
  2516. {
  2517.     /*** IUnknown methods ***/
  2518.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  2519.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2520.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  2521.  
  2522.     /*** IDirectInput2W methods ***/
  2523.     STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
  2524.     STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
  2525.     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
  2526.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  2527.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
  2528.     STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
  2529.  
  2530.     /*** IDirectInput7W methods ***/
  2531.     STDMETHOD(CreateDeviceEx)(THIS_ REFGUID,REFIID,LPVOID *,LPUNKNOWN) PURE;
  2532. };
  2533.  
  2534. typedef struct IDirectInput7W *LPDIRECTINPUT7W;
  2535.  
  2536. #undef INTERFACE
  2537. #define INTERFACE IDirectInput7A
  2538.  
  2539. DECLARE_INTERFACE_(IDirectInput7A, IDirectInput2A)
  2540. {
  2541.     /*** IUnknown methods ***/
  2542.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  2543.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2544.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  2545.  
  2546.     /*** IDirectInput2A methods ***/
  2547.     STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
  2548.     STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
  2549.     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
  2550.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  2551.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
  2552.     STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
  2553.  
  2554.     /*** IDirectInput7A methods ***/
  2555.     STDMETHOD(CreateDeviceEx)(THIS_ REFGUID,REFIID,LPVOID *,LPUNKNOWN) PURE;
  2556. };
  2557.  
  2558. typedef struct IDirectInput7A *LPDIRECTINPUT7A;
  2559.  
  2560. #ifdef UNICODE
  2561. #define IID_IDirectInput7 IID_IDirectInput7W
  2562. #define IDirectInput7 IDirectInput7W
  2563. #define IDirectInput7Vtbl IDirectInput7WVtbl
  2564. #else
  2565. #define IID_IDirectInput7 IID_IDirectInput7A
  2566. #define IDirectInput7 IDirectInput7A
  2567. #define IDirectInput7Vtbl IDirectInput7AVtbl
  2568. #endif
  2569. typedef struct IDirectInput7 *LPDIRECTINPUT7;
  2570.  
  2571. #if !defined(__cplusplus) || defined(CINTERFACE)
  2572. #define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2573. #define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p)
  2574. #define IDirectInput7_Release(p) (p)->lpVtbl->Release(p)
  2575. #define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  2576. #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
  2577. #define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
  2578. #define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  2579. #define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2580. #define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
  2581. #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
  2582. #else
  2583. #define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2584. #define IDirectInput7_AddRef(p) (p)->AddRef()
  2585. #define IDirectInput7_Release(p) (p)->Release()
  2586. #define IDirectInput7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  2587. #define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
  2588. #define IDirectInput7_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
  2589. #define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  2590. #define IDirectInput7_Initialize(p,a,b) (p)->Initialize(a,b)
  2591. #define IDirectInput7_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
  2592. #define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d)
  2593. #endif
  2594.  
  2595. #if(DIRECTINPUT_VERSION >= 0x0800)
  2596. #undef INTERFACE
  2597. #define INTERFACE IDirectInput8W
  2598.  
  2599. DECLARE_INTERFACE_(IDirectInput8W, IUnknown)
  2600. {
  2601.     /*** IUnknown methods ***/
  2602.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  2603.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2604.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  2605.  
  2606.     /*** IDirectInput8W methods ***/
  2607.     STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICE8W *,LPUNKNOWN) PURE;
  2608.     STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
  2609.     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
  2610.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  2611.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
  2612.     STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
  2613.     STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR,LPDIACTIONFORMATW,LPDIENUMDEVICESBYSEMANTICSCBW,LPVOID,DWORD) PURE;
  2614.     STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK,LPDICONFIGUREDEVICESPARAMSW,DWORD,LPVOID) PURE;
  2615. };
  2616.  
  2617. typedef struct IDirectInput8W *LPDIRECTINPUT8W;
  2618.  
  2619. #undef INTERFACE
  2620. #define INTERFACE IDirectInput8A
  2621.  
  2622. DECLARE_INTERFACE_(IDirectInput8A, IUnknown)
  2623. {
  2624.     /*** IUnknown methods ***/
  2625.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  2626.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  2627.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  2628.  
  2629.     /*** IDirectInput8A methods ***/
  2630.     STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICE8A *,LPUNKNOWN) PURE;
  2631.     STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
  2632.     STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
  2633.     STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
  2634.     STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
  2635.     STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
  2636.     STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR,LPDIACTIONFORMATA,LPDIENUMDEVICESBYSEMANTICSCBA,LPVOID,DWORD) PURE;
  2637.     STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK,LPDICONFIGUREDEVICESPARAMSA,DWORD,LPVOID) PURE;
  2638. };
  2639.  
  2640. typedef struct IDirectInput8A *LPDIRECTINPUT8A;
  2641.  
  2642. #ifdef UNICODE
  2643. #define IID_IDirectInput8 IID_IDirectInput8W
  2644. #define IDirectInput8 IDirectInput8W
  2645. #define IDirectInput8Vtbl IDirectInput8WVtbl
  2646. #else
  2647. #define IID_IDirectInput8 IID_IDirectInput8A
  2648. #define IDirectInput8 IDirectInput8A
  2649. #define IDirectInput8Vtbl IDirectInput8AVtbl
  2650. #endif
  2651. typedef struct IDirectInput8 *LPDIRECTINPUT8;
  2652.  
  2653. #if !defined(__cplusplus) || defined(CINTERFACE)
  2654. #define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  2655. #define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p)
  2656. #define IDirectInput8_Release(p) (p)->lpVtbl->Release(p)
  2657. #define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  2658. #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
  2659. #define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
  2660. #define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
  2661. #define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  2662. #define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
  2663. #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
  2664. #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
  2665. #else
  2666. #define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  2667. #define IDirectInput8_AddRef(p) (p)->AddRef()
  2668. #define IDirectInput8_Release(p) (p)->Release()
  2669. #define IDirectInput8_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  2670. #define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
  2671. #define IDirectInput8_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
  2672. #define IDirectInput8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
  2673. #define IDirectInput8_Initialize(p,a,b) (p)->Initialize(a,b)
  2674. #define IDirectInput8_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
  2675. #define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e)
  2676. #define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d)
  2677. #endif
  2678. #endif /* DIRECTINPUT_VERSION >= 0x0800 */
  2679.  
  2680. #if DIRECTINPUT_VERSION > 0x0700
  2681.  
  2682. extern HRESULT WINAPI DirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID *ppvOut, LPUNKNOWN punkOuter);
  2683.  
  2684. #else
  2685. extern HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter);
  2686. extern HRESULT WINAPI DirectInputCreateW(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTW *ppDI, LPUNKNOWN punkOuter);
  2687. #ifdef UNICODE
  2688. #define DirectInputCreate  DirectInputCreateW
  2689. #else
  2690. #define DirectInputCreate  DirectInputCreateA
  2691. #endif // !UNICODE
  2692.  
  2693. extern HRESULT WINAPI DirectInputCreateEx(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID *ppvOut, LPUNKNOWN punkOuter);
  2694.  
  2695. #endif /* DIRECTINPUT_VERSION > 0x700 */
  2696.  
  2697. #endif /* DIJ_RINGZERO */
  2698.  
  2699.  
  2700. /****************************************************************************
  2701.  *
  2702.  *  Return Codes
  2703.  *
  2704.  ****************************************************************************/
  2705.  
  2706. /*
  2707.  *  The operation completed successfully.
  2708.  */
  2709. #define DI_OK                           S_OK
  2710.  
  2711. /*
  2712.  *  The device exists but is not currently attached.
  2713.  */
  2714. #define DI_NOTATTACHED                  S_FALSE
  2715.  
  2716. /*
  2717.  *  The device buffer overflowed.  Some input was lost.
  2718.  */
  2719. #define DI_BUFFEROVERFLOW               S_FALSE
  2720.  
  2721. /*
  2722.  *  The change in device properties had no effect.
  2723.  */
  2724. #define DI_PROPNOEFFECT                 S_FALSE
  2725.  
  2726. /*
  2727.  *  The operation had no effect.
  2728.  */
  2729. #define DI_NOEFFECT                     S_FALSE
  2730.  
  2731. /*
  2732.  *  The device is a polled device.  As a result, device buffering
  2733.  *  will not collect any data and event notifications will not be
  2734.  *  signalled until GetDeviceState is called.
  2735.  */
  2736. #define DI_POLLEDDEVICE                 ((HRESULT)0x00000002L)
  2737.  
  2738. /*
  2739.  *  The parameters of the effect were successfully updated by
  2740.  *  IDirectInputEffect::SetParameters, but the effect was not
  2741.  *  downloaded because the device is not exclusively acquired
  2742.  *  or because the DIEP_NODOWNLOAD flag was passed.
  2743.  */
  2744. #define DI_DOWNLOADSKIPPED              ((HRESULT)0x00000003L)
  2745.  
  2746. /*
  2747.  *  The parameters of the effect were successfully updated by
  2748.  *  IDirectInputEffect::SetParameters, but in order to change
  2749.  *  the parameters, the effect needed to be restarted.
  2750.  */
  2751. #define DI_EFFECTRESTARTED              ((HRESULT)0x00000004L)
  2752.  
  2753. /*
  2754.  *  The parameters of the effect were successfully updated by
  2755.  *  IDirectInputEffect::SetParameters, but some of them were
  2756.  *  beyond the capabilities of the device and were truncated.
  2757.  */
  2758. #define DI_TRUNCATED                    ((HRESULT)0x00000008L)
  2759.  
  2760. /*
  2761.  *  The settings have been successfully applied but could not be
  2762.  *  persisted.
  2763.  */
  2764. #define DI_SETTINGSNOTSAVED                             ((HRESULT)0x0000000BL)
  2765.  
  2766. /*
  2767.  *  Equal to DI_EFFECTRESTARTED | DI_TRUNCATED.
  2768.  */
  2769. #define DI_TRUNCATEDANDRESTARTED        ((HRESULT)0x0000000CL)
  2770.  
  2771. /*
  2772.  *  A SUCCESS code indicating that settings cannot be modified.
  2773.  */
  2774. #define DI_WRITEPROTECT                 ((HRESULT)0x00000013L)
  2775.  
  2776. /*
  2777.  *  The application requires a newer version of DirectInput.
  2778.  */
  2779. #define DIERR_OLDDIRECTINPUTVERSION     \
  2780.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
  2781.  
  2782. /*
  2783.  *  The application was written for an unsupported prerelease version
  2784.  *  of DirectInput.
  2785.  */
  2786. #define DIERR_BETADIRECTINPUTVERSION    \
  2787.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
  2788.  
  2789. /*
  2790.  *  The object could not be created due to an incompatible driver version
  2791.  *  or mismatched or incomplete driver components.
  2792.  */
  2793. #define DIERR_BADDRIVERVER              \
  2794.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
  2795.  
  2796. /*
  2797.  * The device or device instance or effect is not registered with DirectInput.
  2798.  */
  2799. #define DIERR_DEVICENOTREG              REGDB_E_CLASSNOTREG
  2800.  
  2801. /*
  2802.  * The requested object does not exist.
  2803.  */
  2804. #define DIERR_NOTFOUND                  \
  2805.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
  2806.  
  2807. /*
  2808.  * The requested object does not exist.
  2809.  */
  2810. #define DIERR_OBJECTNOTFOUND            \
  2811.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
  2812.  
  2813. /*
  2814.  * An invalid parameter was passed to the returning function,
  2815.  * or the object was not in a state that admitted the function
  2816.  * to be called.
  2817.  */
  2818. #define DIERR_INVALIDPARAM              E_INVALIDARG
  2819.  
  2820. /*
  2821.  * The specified interface is not supported by the object
  2822.  */
  2823. #define DIERR_NOINTERFACE               E_NOINTERFACE
  2824.  
  2825. /*
  2826.  * An undetermined error occured inside the DInput subsystem
  2827.  */
  2828. #define DIERR_GENERIC                   E_FAIL
  2829.  
  2830. /*
  2831.  * The DInput subsystem couldn't allocate sufficient memory to complete the
  2832.  * caller's request.
  2833.  */
  2834. #define DIERR_OUTOFMEMORY               E_OUTOFMEMORY
  2835.  
  2836. /*
  2837.  * The function called is not supported at this time
  2838.  */
  2839. #define DIERR_UNSUPPORTED               E_NOTIMPL
  2840.  
  2841. /*
  2842.  * This object has not been initialized
  2843.  */
  2844. #define DIERR_NOTINITIALIZED            \
  2845.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
  2846.  
  2847. /*
  2848.  * This object is already initialized
  2849.  */
  2850. #define DIERR_ALREADYINITIALIZED        \
  2851.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
  2852.  
  2853. /*
  2854.  * This object does not support aggregation
  2855.  */
  2856. #define DIERR_NOAGGREGATION             CLASS_E_NOAGGREGATION
  2857.  
  2858. /*
  2859.  * Another app has a higher priority level, preventing this call from
  2860.  * succeeding.
  2861.  */
  2862. #define DIERR_OTHERAPPHASPRIO           E_ACCESSDENIED
  2863.  
  2864. /*
  2865.  * Access to the device has been lost.  It must be re-acquired.
  2866.  */
  2867. #define DIERR_INPUTLOST                 \
  2868.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
  2869.  
  2870. /*
  2871.  * The operation cannot be performed while the device is acquired.
  2872.  */
  2873. #define DIERR_ACQUIRED                  \
  2874.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
  2875.  
  2876. /*
  2877.  * The operation cannot be performed unless the device is acquired.
  2878.  */
  2879. #define DIERR_NOTACQUIRED               \
  2880.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
  2881.  
  2882. /*
  2883.  * The specified property cannot be changed.
  2884.  */
  2885. #define DIERR_READONLY                  E_ACCESSDENIED
  2886.  
  2887. /*
  2888.  * The device already has an event notification associated with it.
  2889.  */
  2890. #define DIERR_HANDLEEXISTS              E_ACCESSDENIED
  2891.  
  2892. /*
  2893.  * Data is not yet available.
  2894.  */
  2895. #ifndef E_PENDING
  2896. #define E_PENDING                       0x8000000AL
  2897. #endif
  2898.  
  2899. /*
  2900.  * Unable to IDirectInputJoyConfig_Acquire because the user
  2901.  * does not have sufficient privileges to change the joystick
  2902.  * configuration.
  2903.  */
  2904. #define DIERR_INSUFFICIENTPRIVS         0x80040200L
  2905.  
  2906. /*
  2907.  * The device is full.
  2908.  */
  2909. #define DIERR_DEVICEFULL                0x80040201L
  2910.  
  2911. /*
  2912.  * Not all the requested information fit into the buffer.
  2913.  */
  2914. #define DIERR_MOREDATA                  0x80040202L
  2915.  
  2916. /*
  2917.  * The effect is not downloaded.
  2918.  */
  2919. #define DIERR_NOTDOWNLOADED             0x80040203L
  2920.  
  2921. /*
  2922.  *  The device cannot be reinitialized because there are still effects
  2923.  *  attached to it.
  2924.  */
  2925. #define DIERR_HASEFFECTS                0x80040204L
  2926.  
  2927. /*
  2928.  *  The operation cannot be performed unless the device is acquired
  2929.  *  in DISCL_EXCLUSIVE mode.
  2930.  */
  2931. #define DIERR_NOTEXCLUSIVEACQUIRED      0x80040205L
  2932.  
  2933. /*
  2934.  *  The effect could not be downloaded because essential information
  2935.  *  is missing.  For example, no axes have been associated with the
  2936.  *  effect, or no type-specific information has been created.
  2937.  */
  2938. #define DIERR_INCOMPLETEEFFECT          0x80040206L
  2939.  
  2940. /*
  2941.  *  Attempted to read buffered device data from a device that is
  2942.  *  not buffered.
  2943.  */
  2944. #define DIERR_NOTBUFFERED               0x80040207L
  2945.  
  2946. /*
  2947.  *  An attempt was made to modify parameters of an effect while it is
  2948.  *  playing.  Not all hardware devices support altering the parameters
  2949.  *  of an effect while it is playing.
  2950.  */
  2951. #define DIERR_EFFECTPLAYING             0x80040208L
  2952.  
  2953. /*
  2954.  *  The operation could not be completed because the device is not
  2955.  *  plugged in.
  2956.  */
  2957. #define DIERR_UNPLUGGED                 0x80040209L
  2958.  
  2959. /*
  2960.  *  SendDeviceData failed because more information was requested
  2961.  *  to be sent than can be sent to the device.  Some devices have
  2962.  *  restrictions on how much data can be sent to them.  (For example,
  2963.  *  there might be a limit on the number of buttons that can be
  2964.  *  pressed at once.)
  2965.  */
  2966. #define DIERR_REPORTFULL                0x8004020AL
  2967.  
  2968.  
  2969. /*
  2970.  *  A mapper file function failed because reading or writing the user or IHV
  2971.  *  settings file failed.
  2972.  */
  2973. #define DIERR_MAPFILEFAIL               0x8004020BL
  2974.  
  2975.  
  2976. /*--- DINPUT Mapper Definitions: New for Dx8         ---*/
  2977.  
  2978.  
  2979. /*--- Keyboard
  2980.       Physical Keyboard Device       ---*/
  2981.  
  2982. #define DIKEYBOARD_ESCAPE                       0x81000401
  2983. #define DIKEYBOARD_1                            0x81000402
  2984. #define DIKEYBOARD_2                            0x81000403
  2985. #define DIKEYBOARD_3                            0x81000404
  2986. #define DIKEYBOARD_4                            0x81000405
  2987. #define DIKEYBOARD_5                            0x81000406
  2988. #define DIKEYBOARD_6                            0x81000407
  2989. #define DIKEYBOARD_7                            0x81000408
  2990. #define DIKEYBOARD_8                            0x81000409
  2991. #define DIKEYBOARD_9                            0x8100040A
  2992. #define DIKEYBOARD_0                            0x8100040B
  2993. #define DIKEYBOARD_MINUS                        0x8100040C    /* - on main keyboard */
  2994. #define DIKEYBOARD_EQUALS                       0x8100040D
  2995. #define DIKEYBOARD_BACK                         0x8100040E    /* backspace */
  2996. #define DIKEYBOARD_TAB                          0x8100040F
  2997. #define DIKEYBOARD_Q                            0x81000410
  2998. #define DIKEYBOARD_W                            0x81000411
  2999. #define DIKEYBOARD_E                            0x81000412
  3000. #define DIKEYBOARD_R                            0x81000413
  3001. #define DIKEYBOARD_T                            0x81000414
  3002. #define DIKEYBOARD_Y                            0x81000415
  3003. #define DIKEYBOARD_U                            0x81000416
  3004. #define DIKEYBOARD_I                            0x81000417
  3005. #define DIKEYBOARD_O                            0x81000418
  3006. #define DIKEYBOARD_P                            0x81000419
  3007. #define DIKEYBOARD_LBRACKET                     0x8100041A
  3008. #define DIKEYBOARD_RBRACKET                     0x8100041B
  3009. #define DIKEYBOARD_RETURN                       0x8100041C    /* Enter on main keyboard */
  3010. #define DIKEYBOARD_LCONTROL                     0x8100041D
  3011. #define DIKEYBOARD_A                            0x8100041E
  3012. #define DIKEYBOARD_S                            0x8100041F
  3013. #define DIKEYBOARD_D                            0x81000420
  3014. #define DIKEYBOARD_F                            0x81000421
  3015. #define DIKEYBOARD_G                            0x81000422
  3016. #define DIKEYBOARD_H                            0x81000423
  3017. #define DIKEYBOARD_J                            0x81000424
  3018. #define DIKEYBOARD_K                            0x81000425
  3019. #define DIKEYBOARD_L                            0x81000426
  3020. #define DIKEYBOARD_SEMICOLON                    0x81000427
  3021. #define DIKEYBOARD_APOSTROPHE                   0x81000428
  3022. #define DIKEYBOARD_GRAVE                        0x81000429    /* accent grave */
  3023. #define DIKEYBOARD_LSHIFT                       0x8100042A
  3024. #define DIKEYBOARD_BACKSLASH                    0x8100042B
  3025. #define DIKEYBOARD_Z                            0x8100042C
  3026. #define DIKEYBOARD_X                            0x8100042D
  3027. #define DIKEYBOARD_C                            0x8100042E
  3028. #define DIKEYBOARD_V                            0x8100042F
  3029. #define DIKEYBOARD_B                            0x81000430
  3030. #define DIKEYBOARD_N                            0x81000431
  3031. #define DIKEYBOARD_M                            0x81000432
  3032. #define DIKEYBOARD_COMMA                        0x81000433
  3033. #define DIKEYBOARD_PERIOD                       0x81000434    /* . on main keyboard */
  3034. #define DIKEYBOARD_SLASH                        0x81000435    /* / on main keyboard */
  3035. #define DIKEYBOARD_RSHIFT                       0x81000436
  3036. #define DIKEYBOARD_MULTIPLY                     0x81000437    /* * on numeric keypad */
  3037. #define DIKEYBOARD_LMENU                        0x81000438    /* left Alt */
  3038. #define DIKEYBOARD_SPACE                        0x81000439
  3039. #define DIKEYBOARD_CAPITAL                      0x8100043A
  3040. #define DIKEYBOARD_F1                           0x8100043B
  3041. #define DIKEYBOARD_F2                           0x8100043C
  3042. #define DIKEYBOARD_F3                           0x8100043D
  3043. #define DIKEYBOARD_F4                           0x8100043E
  3044. #define DIKEYBOARD_F5                           0x8100043F
  3045. #define DIKEYBOARD_F6                           0x81000440
  3046. #define DIKEYBOARD_F7                           0x81000441
  3047. #define DIKEYBOARD_F8                           0x81000442
  3048. #define DIKEYBOARD_F9                           0x81000443
  3049. #define DIKEYBOARD_F10                          0x81000444
  3050. #define DIKEYBOARD_NUMLOCK                      0x81000445
  3051. #define DIKEYBOARD_SCROLL                       0x81000446    /* Scroll Lock */
  3052. #define DIKEYBOARD_NUMPAD7                      0x81000447
  3053. #define DIKEYBOARD_NUMPAD8                      0x81000448
  3054. #define DIKEYBOARD_NUMPAD9                      0x81000449
  3055. #define DIKEYBOARD_SUBTRACT                     0x8100044A    /* - on numeric keypad */
  3056. #define DIKEYBOARD_NUMPAD4                      0x8100044B
  3057. #define DIKEYBOARD_NUMPAD5                      0x8100044C
  3058. #define DIKEYBOARD_NUMPAD6                      0x8100044D
  3059. #define DIKEYBOARD_ADD                          0x8100044E    /* + on numeric keypad */
  3060. #define DIKEYBOARD_NUMPAD1                      0x8100044F
  3061. #define DIKEYBOARD_NUMPAD2                      0x81000450
  3062. #define DIKEYBOARD_NUMPAD3                      0x81000451
  3063. #define DIKEYBOARD_NUMPAD0                      0x81000452
  3064. #define DIKEYBOARD_DECIMAL                      0x81000453    /* . on numeric keypad */
  3065. #define DIKEYBOARD_OEM_102                      0x81000456    /* <> or \| on RT 102-key keyboard (Non-U.S.) */
  3066. #define DIKEYBOARD_F11                          0x81000457
  3067. #define DIKEYBOARD_F12                          0x81000458
  3068. #define DIKEYBOARD_F13                          0x81000464    /*                     (NEC PC98) */
  3069. #define DIKEYBOARD_F14                          0x81000465    /*                     (NEC PC98) */
  3070. #define DIKEYBOARD_F15                          0x81000466    /*                     (NEC PC98) */
  3071. #define DIKEYBOARD_KANA                         0x81000470    /* (Japanese keyboard)            */
  3072. #define DIKEYBOARD_ABNT_C1                      0x81000473    /* /? on Brazilian keyboard */
  3073. #define DIKEYBOARD_CONVERT                      0x81000479    /* (Japanese keyboard)            */
  3074. #define DIKEYBOARD_NOCONVERT                    0x8100047B    /* (Japanese keyboard)            */
  3075. #define DIKEYBOARD_YEN                          0x8100047D    /* (Japanese keyboard)            */
  3076. #define DIKEYBOARD_ABNT_C2                      0x8100047E    /* Numpad . on Brazilian keyboard */
  3077. #define DIKEYBOARD_NUMPADEQUALS                 0x8100048D    /* = on numeric keypad (NEC PC98) */
  3078. #define DIKEYBOARD_PREVTRACK                    0x81000490    /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
  3079. #define DIKEYBOARD_AT                           0x81000491    /*                     (NEC PC98) */
  3080. #define DIKEYBOARD_COLON                        0x81000492    /*                     (NEC PC98) */
  3081. #define DIKEYBOARD_UNDERLINE                    0x81000493    /*                     (NEC PC98) */
  3082. #define DIKEYBOARD_KANJI                        0x81000494    /* (Japanese keyboard)            */
  3083. #define DIKEYBOARD_STOP                         0x81000495    /*                     (NEC PC98) */
  3084. #define DIKEYBOARD_AX                           0x81000496    /*                     (Japan AX) */
  3085. #define DIKEYBOARD_UNLABELED                    0x81000497    /*                        (J3100) */
  3086. #define DIKEYBOARD_NEXTTRACK                    0x81000499    /* Next Track */
  3087. #define DIKEYBOARD_NUMPADENTER                  0x8100049C    /* Enter on numeric keypad */
  3088. #define DIKEYBOARD_RCONTROL                     0x8100049D
  3089. #define DIKEYBOARD_MUTE                         0x810004A0    /* Mute */
  3090. #define DIKEYBOARD_CALCULATOR                   0x810004A1    /* Calculator */
  3091. #define DIKEYBOARD_PLAYPAUSE                    0x810004A2    /* Play / Pause */
  3092. #define DIKEYBOARD_MEDIASTOP                    0x810004A4    /* Media Stop */
  3093. #define DIKEYBOARD_VOLUMEDOWN                   0x810004AE    /* Volume - */
  3094. #define DIKEYBOARD_VOLUMEUP                     0x810004B0    /* Volume + */
  3095. #define DIKEYBOARD_WEBHOME                      0x810004B2    /* Web home */
  3096. #define DIKEYBOARD_NUMPADCOMMA                  0x810004B3    /* , on numeric keypad (NEC PC98) */
  3097. #define DIKEYBOARD_DIVIDE                       0x810004B5    /* / on numeric keypad */
  3098. #define DIKEYBOARD_SYSRQ                        0x810004B7
  3099. #define DIKEYBOARD_RMENU                        0x810004B8    /* right Alt */
  3100. #define DIKEYBOARD_PAUSE                        0x810004C5    /* Pause */
  3101. #define DIKEYBOARD_HOME                         0x810004C7    /* Home on arrow keypad */
  3102. #define DIKEYBOARD_UP                           0x810004C8    /* UpArrow on arrow keypad */
  3103. #define DIKEYBOARD_PRIOR                        0x810004C9    /* PgUp on arrow keypad */
  3104. #define DIKEYBOARD_LEFT                         0x810004CB    /* LeftArrow on arrow keypad */
  3105. #define DIKEYBOARD_RIGHT                        0x810004CD    /* RightArrow on arrow keypad */
  3106. #define DIKEYBOARD_END                          0x810004CF    /* End on arrow keypad */
  3107. #define DIKEYBOARD_DOWN                         0x810004D0    /* DownArrow on arrow keypad */
  3108. #define DIKEYBOARD_NEXT                         0x810004D1    /* PgDn on arrow keypad */
  3109. #define DIKEYBOARD_INSERT                       0x810004D2    /* Insert on arrow keypad */
  3110. #define DIKEYBOARD_DELETE                       0x810004D3    /* Delete on arrow keypad */
  3111. #define DIKEYBOARD_LWIN                         0x810004DB    /* Left Windows key */
  3112. #define DIKEYBOARD_RWIN                         0x810004DC    /* Right Windows key */
  3113. #define DIKEYBOARD_APPS                         0x810004DD    /* AppMenu key */
  3114. #define DIKEYBOARD_POWER                        0x810004DE    /* System Power */
  3115. #define DIKEYBOARD_SLEEP                        0x810004DF    /* System Sleep */
  3116. #define DIKEYBOARD_WAKE                         0x810004E3    /* System Wake */
  3117. #define DIKEYBOARD_WEBSEARCH                    0x810004E5    /* Web Search */
  3118. #define DIKEYBOARD_WEBFAVORITES                 0x810004E6    /* Web Favorites */
  3119. #define DIKEYBOARD_WEBREFRESH                   0x810004E7    /* Web Refresh */
  3120. #define DIKEYBOARD_WEBSTOP                      0x810004E8    /* Web Stop */
  3121. #define DIKEYBOARD_WEBFORWARD                   0x810004E9    /* Web Forward */
  3122. #define DIKEYBOARD_WEBBACK                      0x810004EA    /* Web Back */
  3123. #define DIKEYBOARD_MYCOMPUTER                   0x810004EB    /* My Computer */
  3124. #define DIKEYBOARD_MAIL                         0x810004EC    /* Mail */
  3125. #define DIKEYBOARD_MEDIASELECT                  0x810004ED    /* Media Select */
  3126.  
  3127.  
  3128. /*--- MOUSE
  3129.       Physical Mouse Device             ---*/
  3130.  
  3131. #define DIMOUSE_XAXISAB                         (0x82000200 |DIMOFS_X ) /* X Axis-absolute: Some mice natively report absolute coordinates  */
  3132. #define DIMOUSE_YAXISAB                         (0x82000200 |DIMOFS_Y ) /* Y Axis-absolute: Some mice natively report absolute coordinates */
  3133. #define DIMOUSE_XAXIS                           (0x82000300 |DIMOFS_X ) /* X Axis */
  3134. #define DIMOUSE_YAXIS                           (0x82000300 |DIMOFS_Y ) /* Y Axis */
  3135. #define DIMOUSE_WHEEL                           (0x82000300 |DIMOFS_Z ) /* Z Axis */
  3136. #define DIMOUSE_BUTTON0                         (0x82000400 |DIMOFS_BUTTON0) /* Button 0 */
  3137. #define DIMOUSE_BUTTON1                         (0x82000400 |DIMOFS_BUTTON1) /* Button 1 */
  3138. #define DIMOUSE_BUTTON2                         (0x82000400 |DIMOFS_BUTTON2) /* Button 2 */
  3139. #define DIMOUSE_BUTTON3                         (0x82000400 |DIMOFS_BUTTON3) /* Button 3 */
  3140. #define DIMOUSE_BUTTON4                         (0x82000400 |DIMOFS_BUTTON4) /* Button 4 */
  3141. #define DIMOUSE_BUTTON5                         (0x82000400 |DIMOFS_BUTTON5) /* Button 5 */
  3142. #define DIMOUSE_BUTTON6                         (0x82000400 |DIMOFS_BUTTON6) /* Button 6 */
  3143. #define DIMOUSE_BUTTON7                         (0x82000400 |DIMOFS_BUTTON7) /* Button 7 */
  3144.  
  3145.  
  3146. /*--- VOICE
  3147.       Physical Dplay Voice Device       ---*/
  3148.  
  3149. #define DIVOICE_CHANNEL1                        0x83000401
  3150. #define DIVOICE_CHANNEL2                        0x83000402
  3151. #define DIVOICE_CHANNEL3                        0x83000403
  3152. #define DIVOICE_CHANNEL4                        0x83000404
  3153. #define DIVOICE_CHANNEL5                        0x83000405
  3154. #define DIVOICE_CHANNEL6                        0x83000406
  3155. #define DIVOICE_CHANNEL7                        0x83000407
  3156. #define DIVOICE_CHANNEL8                        0x83000408
  3157. #define DIVOICE_TEAM                            0x83000409
  3158. #define DIVOICE_ALL                             0x8300040A
  3159. #define DIVOICE_RECORDMUTE                      0x8300040B
  3160. #define DIVOICE_PLAYBACKMUTE                    0x8300040C
  3161. #define DIVOICE_TRANSMIT                        0x8300040D
  3162.  
  3163. #define DIVOICE_VOICECOMMAND                    0x83000410
  3164.  
  3165.  
  3166. /*--- Driving Simulator - Racing
  3167.       Vehicle control is primary objective  ---*/
  3168. #define DIVIRTUAL_DRIVING_RACE                  0x01000000
  3169. #define DIAXIS_DRIVINGR_STEER                   0x01008A01 /* Steering */
  3170. #define DIAXIS_DRIVINGR_ACCELERATE              0x01039202 /* Accelerate */
  3171. #define DIAXIS_DRIVINGR_BRAKE                   0x01041203 /* Brake-Axis */
  3172. #define DIBUTTON_DRIVINGR_SHIFTUP               0x01000C01 /* Shift to next higher gear */
  3173. #define DIBUTTON_DRIVINGR_SHIFTDOWN             0x01000C02 /* Shift to next lower gear */
  3174. #define DIBUTTON_DRIVINGR_VIEW                  0x01001C03 /* Cycle through view options */
  3175. #define DIBUTTON_DRIVINGR_MENU                  0x010004FD /* Show menu options */
  3176. /*--- Priority 2 controls                            ---*/
  3177.  
  3178. #define DIAXIS_DRIVINGR_ACCEL_AND_BRAKE         0x01014A04 /* Some devices combine accelerate and brake in a single axis */
  3179. #define DIHATSWITCH_DRIVINGR_GLANCE             0x01004601 /* Look around */
  3180. #define DIBUTTON_DRIVINGR_BRAKE                 0x01004C04 /* Brake-button */
  3181. #define DIBUTTON_DRIVINGR_DASHBOARD             0x01004405 /* Select next dashboard option */
  3182. #define DIBUTTON_DRIVINGR_AIDS                  0x01004406 /* Driver correction aids */
  3183. #define DIBUTTON_DRIVINGR_MAP                   0x01004407 /* Display Driving Map */
  3184. #define DIBUTTON_DRIVINGR_BOOST                 0x01004408 /* Turbo Boost */
  3185. #define DIBUTTON_DRIVINGR_PIT                   0x01004409 /* Pit stop notification */
  3186. #define DIBUTTON_DRIVINGR_ACCELERATE_LINK       0x0103D4E0 /* Fallback Accelerate button */
  3187. #define DIBUTTON_DRIVINGR_STEER_LEFT_LINK       0x0100CCE4 /* Fallback Steer Left button */
  3188. #define DIBUTTON_DRIVINGR_STEER_RIGHT_LINK      0x0100CCEC /* Fallback Steer Right button */
  3189. #define DIBUTTON_DRIVINGR_GLANCE_LEFT_LINK      0x0107C4E4 /* Fallback Glance Left button */
  3190. #define DIBUTTON_DRIVINGR_GLANCE_RIGHT_LINK     0x0107C4EC /* Fallback Glance Right button */
  3191. #define DIBUTTON_DRIVINGR_DEVICE                0x010044FE /* Show input device and controls */
  3192. #define DIBUTTON_DRIVINGR_PAUSE                 0x010044FC /* Start / Pause / Restart game */
  3193.  
  3194. /*--- Driving Simulator - Combat
  3195.       Combat from within a vehicle is primary objective  ---*/
  3196. #define DIVIRTUAL_DRIVING_COMBAT                0x02000000
  3197. #define DIAXIS_DRIVINGC_STEER                   0x02008A01 /* Steering  */
  3198. #define DIAXIS_DRIVINGC_ACCELERATE              0x02039202 /* Accelerate */
  3199. #define DIAXIS_DRIVINGC_BRAKE                   0x02041203 /* Brake-axis */
  3200. #define DIBUTTON_DRIVINGC_FIRE                  0x02000C01 /* Fire */
  3201. #define DIBUTTON_DRIVINGC_WEAPONS               0x02000C02 /* Select next weapon */
  3202. #define DIBUTTON_DRIVINGC_TARGET                0x02000C03 /* Select next available target */
  3203. #define DIBUTTON_DRIVINGC_MENU                  0x020004FD /* Show menu options */
  3204. /*--- Priority 2 controls                            ---*/
  3205.  
  3206. #define DIAXIS_DRIVINGC_ACCEL_AND_BRAKE         0x02014A04 /* Some devices combine accelerate and brake in a single axis */
  3207. #define DIHATSWITCH_DRIVINGC_GLANCE             0x02004601 /* Look around */
  3208. #define DIBUTTON_DRIVINGC_SHIFTUP               0x02004C04 /* Shift to next higher gear */
  3209. #define DIBUTTON_DRIVINGC_SHIFTDOWN             0x02004C05 /* Shift to next lower gear */
  3210. #define DIBUTTON_DRIVINGC_DASHBOARD             0x02004406 /* Select next dashboard option */
  3211. #define DIBUTTON_DRIVINGC_AIDS                  0x02004407 /* Driver correction aids */
  3212. #define DIBUTTON_DRIVINGC_BRAKE                 0x02004C08 /* Brake-button */
  3213. #define DIBUTTON_DRIVINGC_FIRESECONDARY         0x02004C09 /* Alternative fire button */
  3214. #define DIBUTTON_DRIVINGC_ACCELERATE_LINK       0x0203D4E0 /* Fallback Accelerate button */
  3215. #define DIBUTTON_DRIVINGC_STEER_LEFT_LINK       0x0200CCE4 /* Fallback Steer Left button */
  3216. #define DIBUTTON_DRIVINGC_STEER_RIGHT_LINK      0x0200CCEC /* Fallback Steer Right button */
  3217. #define DIBUTTON_DRIVINGC_GLANCE_LEFT_LINK      0x0207C4E4 /* Fallback Glance Left button */
  3218. #define DIBUTTON_DRIVINGC_GLANCE_RIGHT_LINK     0x0207C4EC /* Fallback Glance Right button */
  3219. #define DIBUTTON_DRIVINGC_DEVICE                0x020044FE /* Show input device and controls */
  3220. #define DIBUTTON_DRIVINGC_PAUSE                 0x020044FC /* Start / Pause / Restart game */
  3221.  
  3222. /*--- Driving Simulator - Tank
  3223.       Combat from withing a tank is primary objective  ---*/
  3224. #define DIVIRTUAL_DRIVING_TANK                  0x03000000
  3225. #define DIAXIS_DRIVINGT_STEER                   0x03008A01 /* Turn tank left / right */
  3226. #define DIAXIS_DRIVINGT_BARREL                  0x03010202 /* Raise / lower barrel */
  3227. #define DIAXIS_DRIVINGT_ACCELERATE              0x03039203 /* Accelerate */
  3228. #define DIAXIS_DRIVINGT_ROTATE                  0x03020204 /* Turn barrel left / right */
  3229. #define DIBUTTON_DRIVINGT_FIRE                  0x03000C01 /* Fire */
  3230. #define DIBUTTON_DRIVINGT_WEAPONS               0x03000C02 /* Select next weapon */
  3231. #define DIBUTTON_DRIVINGT_TARGET                0x03000C03 /* Selects next available target */
  3232. #define DIBUTTON_DRIVINGT_MENU                  0x030004FD /* Show menu options */
  3233. /*--- Priority 2 controls                            ---*/
  3234.  
  3235. #define DIHATSWITCH_DRIVINGT_GLANCE             0x03004601 /* Look around */
  3236. #define DIAXIS_DRIVINGT_BRAKE                   0x03045205 /* Brake-axis */
  3237. #define DIAXIS_DRIVINGT_ACCEL_AND_BRAKE         0x03014A06 /* Some devices combine accelerate and brake in a single axis */
  3238. #define DIBUTTON_DRIVINGT_VIEW                  0x03005C04 /* Cycle through view options */
  3239. #define DIBUTTON_DRIVINGT_DASHBOARD             0x03005C05 /* Select next dashboard option */
  3240. #define DIBUTTON_DRIVINGT_BRAKE                 0x03004C06 /* Brake-button */
  3241. #define DIBUTTON_DRIVINGT_FIRESECONDARY         0x03004C07 /* Alternative fire button */
  3242. #define DIBUTTON_DRIVINGT_ACCELERATE_LINK       0x0303D4E0 /* Fallback Accelerate button */
  3243. #define DIBUTTON_DRIVINGT_STEER_LEFT_LINK       0x0300CCE4 /* Fallback Steer Left button */
  3244. #define DIBUTTON_DRIVINGT_STEER_RIGHT_LINK      0x0300CCEC /* Fallback Steer Right button */
  3245. #define DIBUTTON_DRIVINGT_BARREL_UP_LINK        0x030144E0 /* Fallback Barrel up button */
  3246. #define DIBUTTON_DRIVINGT_BARREL_DOWN_LINK      0x030144E8 /* Fallback Barrel down button */
  3247. #define DIBUTTON_DRIVINGT_ROTATE_LEFT_LINK      0x030244E4 /* Fallback Rotate left button */
  3248. #define DIBUTTON_DRIVINGT_ROTATE_RIGHT_LINK     0x030244EC /* Fallback Rotate right button */
  3249. #define DIBUTTON_DRIVINGT_GLANCE_LEFT_LINK      0x0307C4E4 /* Fallback Glance Left button */
  3250. #define DIBUTTON_DRIVINGT_GLANCE_RIGHT_LINK     0x0307C4EC /* Fallback Glance Right button */
  3251. #define DIBUTTON_DRIVINGT_DEVICE                0x030044FE /* Show input device and controls */
  3252. #define DIBUTTON_DRIVINGT_PAUSE                 0x030044FC /* Start / Pause / Restart game */
  3253.  
  3254. /*--- Flight Simulator - Civilian
  3255.       Plane control is the primary objective  ---*/
  3256. #define DIVIRTUAL_FLYING_CIVILIAN               0x04000000
  3257. #define DIAXIS_FLYINGC_BANK                     0x04008A01 /* Roll ship left / right */
  3258. #define DIAXIS_FLYINGC_PITCH                    0x04010A02 /* Nose up / down */
  3259. #define DIAXIS_FLYINGC_THROTTLE                 0x04039203 /* Throttle */
  3260. #define DIBUTTON_FLYINGC_VIEW                   0x04002401 /* Cycle through view options */
  3261. #define DIBUTTON_FLYINGC_DISPLAY                0x04002402 /* Select next dashboard / heads up display option */
  3262. #define DIBUTTON_FLYINGC_GEAR                   0x04002C03 /* Gear up / down */
  3263. #define DIBUTTON_FLYINGC_MENU                   0x040004FD /* Show menu options */
  3264. /*--- Priority 2 controls                            ---*/
  3265.  
  3266. #define DIHATSWITCH_FLYINGC_GLANCE              0x04004601 /* Look around */
  3267. #define DIAXIS_FLYINGC_BRAKE                    0x04046A04 /* Apply Brake */
  3268. #define DIAXIS_FLYINGC_RUDDER                   0x04025205 /* Yaw ship left/right */
  3269. #define DIAXIS_FLYINGC_FLAPS                    0x04055A06 /* Flaps */
  3270. #define DIBUTTON_FLYINGC_FLAPSUP                0x04006404 /* Increment stepping up until fully retracted */
  3271. #define DIBUTTON_FLYINGC_FLAPSDOWN              0x04006405 /* Decrement stepping down until fully extended */
  3272. #define DIBUTTON_FLYINGC_BRAKE_LINK             0x04046CE0 /* Fallback brake button */
  3273. #define DIBUTTON_FLYINGC_FASTER_LINK            0x0403D4E0 /* Fallback throttle up button */
  3274. #define DIBUTTON_FLYINGC_SLOWER_LINK            0x0403D4E8 /* Fallback throttle down button */
  3275. #define DIBUTTON_FLYINGC_GLANCE_LEFT_LINK       0x0407C4E4 /* Fallback Glance Left button */
  3276. #define DIBUTTON_FLYINGC_GLANCE_RIGHT_LINK      0x0407C4EC /* Fallback Glance Right button */
  3277. #define DIBUTTON_FLYINGC_GLANCE_UP_LINK         0x0407C4E0 /* Fallback Glance Up button */
  3278. #define DIBUTTON_FLYINGC_GLANCE_DOWN_LINK       0x0407C4E8 /* Fallback Glance Down button */
  3279. #define DIBUTTON_FLYINGC_DEVICE                 0x040044FE /* Show input device and controls */
  3280. #define DIBUTTON_FLYINGC_PAUSE                  0x040044FC /* Start / Pause / Restart game */
  3281.  
  3282. /*--- Flight Simulator - Military
  3283.       Aerial combat is the primary objective  ---*/
  3284. #define DIVIRTUAL_FLYING_MILITARY               0x05000000
  3285. #define DIAXIS_FLYINGM_BANK                     0x05008A01 /* Bank - Roll ship left / right */
  3286. #define DIAXIS_FLYINGM_PITCH                    0x05010A02 /* Pitch - Nose up / down */
  3287. #define DIAXIS_FLYINGM_THROTTLE                 0x05039203 /* Throttle - faster / slower */
  3288. #define DIBUTTON_FLYINGM_FIRE                   0x05000C01 /* Fire */
  3289. #define DIBUTTON_FLYINGM_WEAPONS                0x05000C02 /* Select next weapon */
  3290. #define DIBUTTON_FLYINGM_TARGET                 0x05000C03 /* Selects next available target */
  3291. #define DIBUTTON_FLYINGM_MENU                   0x050004FD /* Show menu options */
  3292. /*--- Priority 2 controls                            ---*/
  3293.  
  3294. #define DIHATSWITCH_FLYINGM_GLANCE              0x05004601 /* Look around */
  3295. #define DIBUTTON_FLYINGM_COUNTER                0x05005C04 /* Activate counter measures */
  3296. #define DIAXIS_FLYINGM_RUDDER                   0x05024A04 /* Rudder - Yaw ship left/right */
  3297. #define DIAXIS_FLYINGM_BRAKE                    0x05046205 /* Brake-axis */
  3298. #define DIBUTTON_FLYINGM_VIEW                   0x05006405 /* Cycle through view options */
  3299. #define DIBUTTON_FLYINGM_DISPLAY                0x05006406 /* Select next dashboard option */
  3300. #define DIAXIS_FLYINGM_FLAPS                    0x05055206 /* Flaps */
  3301. #define DIBUTTON_FLYINGM_FLAPSUP                0x05005407 /* Increment stepping up until fully retracted */
  3302. #define DIBUTTON_FLYINGM_FLAPSDOWN              0x05005408 /* Decrement stepping down until fully extended */
  3303. #define DIBUTTON_FLYINGM_FIRESECONDARY          0x05004C09 /* Alternative fire button */
  3304. #define DIBUTTON_FLYINGM_GEAR                   0x0500640A /* Gear up / down */
  3305. #define DIBUTTON_FLYINGM_BRAKE_LINK             0x050464E0 /* Fallback brake button */
  3306. #define DIBUTTON_FLYINGM_FASTER_LINK            0x0503D4E0 /* Fallback throttle up button */
  3307. #define DIBUTTON_FLYINGM_SLOWER_LINK            0x0503D4E8 /* Fallback throttle down button */
  3308. #define DIBUTTON_FLYINGM_GLANCE_LEFT_LINK       0x0507C4E4 /* Fallback Glance Left button */
  3309. #define DIBUTTON_FLYINGM_GLANCE_RIGHT_LINK      0x0507C4EC /* Fallback Glance Right button */
  3310. #define DIBUTTON_FLYINGM_GLANCE_UP_LINK         0x0507C4E0 /* Fallback Glance Up button */
  3311. #define DIBUTTON_FLYINGM_GLANCE_DOWN_LINK       0x0507C4E8 /* Fallback Glance Down button */
  3312. #define DIBUTTON_FLYINGM_DEVICE                 0x050044FE /* Show input device and controls */
  3313. #define DIBUTTON_FLYINGM_PAUSE                  0x050044FC /* Start / Pause / Restart game */
  3314.  
  3315. /*--- Flight Simulator - Combat Helicopter
  3316.       Combat from helicopter is primary objective  ---*/
  3317. #define DIVIRTUAL_FLYING_HELICOPTER             0x06000000
  3318. #define DIAXIS_FLYINGH_BANK                     0x06008A01 /* Bank - Roll ship left / right */
  3319. #define DIAXIS_FLYINGH_PITCH                    0x06010A02 /* Pitch - Nose up / down */
  3320. #define DIAXIS_FLYINGH_COLLECTIVE               0x06018A03 /* Collective - Blade pitch/power */
  3321. #define DIBUTTON_FLYINGH_FIRE                   0x06001401 /* Fire */
  3322. #define DIBUTTON_FLYINGH_WEAPONS                0x06001402 /* Select next weapon */
  3323. #define DIBUTTON_FLYINGH_TARGET                 0x06001403 /* Selects next available target */
  3324. #define DIBUTTON_FLYINGH_MENU                   0x060004FD /* Show menu options */
  3325. /*--- Priority 2 controls                            ---*/
  3326.  
  3327. #define DIHATSWITCH_FLYINGH_GLANCE              0x06004601 /* Look around */
  3328. #define DIAXIS_FLYINGH_TORQUE                   0x06025A04 /* Torque - Rotate ship around left / right axis */
  3329. #define DIAXIS_FLYINGH_THROTTLE                 0x0603DA05 /* Throttle */
  3330. #define DIBUTTON_FLYINGH_COUNTER                0x06005404 /* Activate counter measures */
  3331. #define DIBUTTON_FLYINGH_VIEW                   0x06006405 /* Cycle through view options */
  3332. #define DIBUTTON_FLYINGH_GEAR                   0x06006406 /* Gear up / down */
  3333. #define DIBUTTON_FLYINGH_FIRESECONDARY          0x06004C07 /* Alternative fire button */
  3334. #define DIBUTTON_FLYINGH_FASTER_LINK            0x0603DCE0 /* Fallback throttle up button */
  3335. #define DIBUTTON_FLYINGH_SLOWER_LINK            0x0603DCE8 /* Fallback throttle down button */
  3336. #define DIBUTTON_FLYINGH_GLANCE_LEFT_LINK       0x0607C4E4 /* Fallback Glance Left button */
  3337. #define DIBUTTON_FLYINGH_GLANCE_RIGHT_LINK      0x0607C4EC /* Fallback Glance Right button */
  3338. #define DIBUTTON_FLYINGH_GLANCE_UP_LINK         0x0607C4E0 /* Fallback Glance Up button */
  3339. #define DIBUTTON_FLYINGH_GLANCE_DOWN_LINK       0x0607C4E8 /* Fallback Glance Down button */
  3340. #define DIBUTTON_FLYINGH_DEVICE                 0x060044FE /* Show input device and controls */
  3341. #define DIBUTTON_FLYINGH_PAUSE                  0x060044FC /* Start / Pause / Restart game */
  3342.  
  3343. /*--- Space Simulator - Combat
  3344.       Space Simulator with weapons  ---*/
  3345. #define DIVIRTUAL_SPACESIM                      0x07000000
  3346. #define DIAXIS_SPACESIM_LATERAL                 0x07008201 /* Move ship left / right */
  3347. #define DIAXIS_SPACESIM_MOVE                    0x07010202 /* Move ship forward/backward */
  3348. #define DIAXIS_SPACESIM_THROTTLE                0x07038203 /* Throttle - Engine speed */
  3349. #define DIBUTTON_SPACESIM_FIRE                  0x07000401 /* Fire */
  3350. #define DIBUTTON_SPACESIM_WEAPONS               0x07000402 /* Select next weapon */
  3351. #define DIBUTTON_SPACESIM_TARGET                0x07000403 /* Selects next available target */
  3352. #define DIBUTTON_SPACESIM_MENU                  0x070004FD /* Show menu options */
  3353. /*--- Priority 2 controls                            ---*/
  3354.  
  3355. #define DIHATSWITCH_SPACESIM_GLANCE             0x07004601 /* Look around */
  3356. #define DIAXIS_SPACESIM_CLIMB                   0x0701C204 /* Climb - Pitch ship up/down */
  3357. #define DIAXIS_SPACESIM_ROTATE                  0x07024205 /* Rotate - Turn ship left/right */
  3358. #define DIBUTTON_SPACESIM_VIEW                  0x07004404 /* Cycle through view options */
  3359. #define DIBUTTON_SPACESIM_DISPLAY               0x07004405 /* Select next dashboard / heads up display option */
  3360. #define DIBUTTON_SPACESIM_RAISE                 0x07004406 /* Raise ship while maintaining current pitch */
  3361. #define DIBUTTON_SPACESIM_LOWER                 0x07004407 /* Lower ship while maintaining current pitch */
  3362. #define DIBUTTON_SPACESIM_GEAR                  0x07004408 /* Gear up / down */
  3363. #define DIBUTTON_SPACESIM_FIRESECONDARY         0x07004409 /* Alternative fire button */
  3364. #define DIBUTTON_SPACESIM_LEFT_LINK             0x0700C4E4 /* Fallback move left button */
  3365. #define DIBUTTON_SPACESIM_RIGHT_LINK            0x0700C4EC /* Fallback move right button */
  3366. #define DIBUTTON_SPACESIM_FORWARD_LINK          0x070144E0 /* Fallback move forward button */
  3367. #define DIBUTTON_SPACESIM_BACKWARD_LINK         0x070144E8 /* Fallback move backwards button */
  3368. #define DIBUTTON_SPACESIM_FASTER_LINK           0x0703C4E0 /* Fallback throttle up button */
  3369. #define DIBUTTON_SPACESIM_SLOWER_LINK           0x0703C4E8 /* Fallback throttle down button */
  3370. #define DIBUTTON_SPACESIM_TURN_LEFT_LINK        0x070244E4 /* Fallback turn left button */
  3371. #define DIBUTTON_SPACESIM_TURN_RIGHT_LINK       0x070244EC /* Fallback turn right button */
  3372. #define DIBUTTON_SPACESIM_GLANCE_LEFT_LINK      0x0707C4E4 /* Fallback Glance Left button */
  3373. #define DIBUTTON_SPACESIM_GLANCE_RIGHT_LINK     0x0707C4EC /* Fallback Glance Right button */
  3374. #define DIBUTTON_SPACESIM_GLANCE_UP_LINK        0x0707C4E0 /* Fallback Glance Up button */
  3375. #define DIBUTTON_SPACESIM_GLANCE_DOWN_LINK      0x0707C4E8 /* Fallback Glance Down button */
  3376. #define DIBUTTON_SPACESIM_DEVICE                0x070044FE /* Show input device and controls */
  3377. #define DIBUTTON_SPACESIM_PAUSE                 0x070044FC /* Start / Pause / Restart game */
  3378.  
  3379. /*--- Fighting - First Person
  3380.       Hand to Hand combat is primary objective  ---*/
  3381. #define DIVIRTUAL_FIGHTING_HAND2HAND            0x08000000
  3382. #define DIAXIS_FIGHTINGH_LATERAL                0x08008201 /* Sidestep left/right */
  3383. #define DIAXIS_FIGHTINGH_MOVE                   0x08010202 /* Move forward/backward */
  3384. #define DIBUTTON_FIGHTINGH_PUNCH                0x08000401 /* Punch */
  3385. #define DIBUTTON_FIGHTINGH_KICK                 0x08000402 /* Kick */
  3386. #define DIBUTTON_FIGHTINGH_BLOCK                0x08000403 /* Block */
  3387. #define DIBUTTON_FIGHTINGH_CROUCH               0x08000404 /* Crouch */
  3388. #define DIBUTTON_FIGHTINGH_JUMP                 0x08000405 /* Jump */
  3389. #define DIBUTTON_FIGHTINGH_SPECIAL1             0x08000406 /* Apply first special move */
  3390. #define DIBUTTON_FIGHTINGH_SPECIAL2             0x08000407 /* Apply second special move */
  3391. #define DIBUTTON_FIGHTINGH_MENU                 0x080004FD /* Show menu options */
  3392. /*--- Priority 2 controls                            ---*/
  3393.  
  3394. #define DIBUTTON_FIGHTINGH_SELECT               0x08004408 /* Select special move */
  3395. #define DIHATSWITCH_FIGHTINGH_SLIDE             0x08004601 /* Look around */
  3396. #define DIBUTTON_FIGHTINGH_DISPLAY              0x08004409 /* Shows next on-screen display option */
  3397. #define DIAXIS_FIGHTINGH_ROTATE                 0x08024203 /* Rotate - Turn body left/right */
  3398. #define DIBUTTON_FIGHTINGH_DODGE                0x0800440A /* Dodge */
  3399. #define DIBUTTON_FIGHTINGH_LEFT_LINK            0x0800C4E4 /* Fallback left sidestep button */
  3400. #define DIBUTTON_FIGHTINGH_RIGHT_LINK           0x0800C4EC /* Fallback right sidestep button */
  3401. #define DIBUTTON_FIGHTINGH_FORWARD_LINK         0x080144E0 /* Fallback forward button */
  3402. #define DIBUTTON_FIGHTINGH_BACKWARD_LINK        0x080144E8 /* Fallback backward button */
  3403. #define DIBUTTON_FIGHTINGH_DEVICE               0x080044FE /* Show input device and controls */
  3404. #define DIBUTTON_FIGHTINGH_PAUSE                0x080044FC /* Start / Pause / Restart game */
  3405.  
  3406. /*--- Fighting - First Person Shooting
  3407.       Navigation and combat are primary objectives  ---*/
  3408. #define DIVIRTUAL_FIGHTING_FPS                  0x09000000
  3409. #define DIAXIS_FPS_ROTATE                       0x09008201 /* Rotate character left/right */
  3410. #define DIAXIS_FPS_MOVE                         0x09010202 /* Move forward/backward */
  3411. #define DIBUTTON_FPS_FIRE                       0x09000401 /* Fire */
  3412. #define DIBUTTON_FPS_WEAPONS                    0x09000402 /* Select next weapon */
  3413. #define DIBUTTON_FPS_APPLY                      0x09000403 /* Use item */
  3414. #define DIBUTTON_FPS_SELECT                     0x09000404 /* Select next inventory item */
  3415. #define DIBUTTON_FPS_CROUCH                     0x09000405 /* Crouch/ climb down/ swim down */
  3416. #define DIBUTTON_FPS_JUMP                       0x09000406 /* Jump/ climb up/ swim up */
  3417. #define DIAXIS_FPS_LOOKUPDOWN                   0x09018203 /* Look up / down  */
  3418. #define DIBUTTON_FPS_STRAFE                     0x09000407 /* Enable strafing while active */
  3419. #define DIBUTTON_FPS_MENU                       0x090004FD /* Show menu options */
  3420. /*--- Priority 2 controls                            ---*/
  3421.  
  3422. #define DIHATSWITCH_FPS_GLANCE                  0x09004601 /* Look around */
  3423. #define DIBUTTON_FPS_DISPLAY                    0x09004408 /* Shows next on-screen display option/ map */
  3424. #define DIAXIS_FPS_SIDESTEP                     0x09024204 /* Sidestep */
  3425. #define DIBUTTON_FPS_DODGE                      0x09004409 /* Dodge */
  3426. #define DIBUTTON_FPS_GLANCEL                    0x0900440A /* Glance Left */
  3427. #define DIBUTTON_FPS_GLANCER                    0x0900440B /* Glance Right */
  3428. #define DIBUTTON_FPS_FIRESECONDARY              0x0900440C /* Alternative fire button */
  3429. #define DIBUTTON_FPS_ROTATE_LEFT_LINK           0x0900C4E4 /* Fallback rotate left button */
  3430. #define DIBUTTON_FPS_ROTATE_RIGHT_LINK          0x0900C4EC /* Fallback rotate right button */
  3431. #define DIBUTTON_FPS_FORWARD_LINK               0x090144E0 /* Fallback forward button */
  3432. #define DIBUTTON_FPS_BACKWARD_LINK              0x090144E8 /* Fallback backward button */
  3433. #define DIBUTTON_FPS_GLANCE_UP_LINK             0x0901C4E0 /* Fallback look up button */
  3434. #define DIBUTTON_FPS_GLANCE_DOWN_LINK           0x0901C4E8 /* Fallback look down button */
  3435. #define DIBUTTON_FPS_STEP_LEFT_LINK             0x090244E4 /* Fallback step left button */
  3436. #define DIBUTTON_FPS_STEP_RIGHT_LINK            0x090244EC /* Fallback step right button */
  3437. #define DIBUTTON_FPS_DEVICE                     0x090044FE /* Show input device and controls */
  3438. #define DIBUTTON_FPS_PAUSE                      0x090044FC /* Start / Pause / Restart game */
  3439.  
  3440. /*--- Fighting - Third Person action
  3441.       Perspective of camera is behind the main character  ---*/
  3442. #define DIVIRTUAL_FIGHTING_THIRDPERSON          0x0A000000
  3443. #define DIAXIS_TPS_TURN                         0x0A020201 /* Turn left/right */
  3444. #define DIAXIS_TPS_MOVE                         0x0A010202 /* Move forward/backward */
  3445. #define DIBUTTON_TPS_RUN                        0x0A000401 /* Run or walk toggle switch */
  3446. #define DIBUTTON_TPS_ACTION                     0x0A000402 /* Action Button */
  3447. #define DIBUTTON_TPS_SELECT                     0x0A000403 /* Select next weapon */
  3448. #define DIBUTTON_TPS_USE                        0x0A000404 /* Use inventory item currently selected */
  3449. #define DIBUTTON_TPS_JUMP                       0x0A000405 /* Character Jumps */
  3450. #define DIBUTTON_TPS_MENU                       0x0A0004FD /* Show menu options */
  3451. /*--- Priority 2 controls                            ---*/
  3452.  
  3453. #define DIHATSWITCH_TPS_GLANCE                  0x0A004601 /* Look around */
  3454. #define DIBUTTON_TPS_VIEW                       0x0A004406 /* Select camera view */
  3455. #define DIBUTTON_TPS_STEPLEFT                   0x0A004407 /* Character takes a left step */
  3456. #define DIBUTTON_TPS_STEPRIGHT                  0x0A004408 /* Character takes a right step */
  3457. #define DIAXIS_TPS_STEP                         0x0A00C203 /* Character steps left/right */
  3458. #define DIBUTTON_TPS_DODGE                      0x0A004409 /* Character dodges or ducks */
  3459. #define DIBUTTON_TPS_INVENTORY                  0x0A00440A /* Cycle through inventory */
  3460. #define DIBUTTON_TPS_TURN_LEFT_LINK             0x0A0244E4 /* Fallback turn left button */
  3461. #define DIBUTTON_TPS_TURN_RIGHT_LINK            0x0A0244EC /* Fallback turn right button */
  3462. #define DIBUTTON_TPS_FORWARD_LINK               0x0A0144E0 /* Fallback forward button */
  3463. #define DIBUTTON_TPS_BACKWARD_LINK              0x0A0144E8 /* Fallback backward button */
  3464. #define DIBUTTON_TPS_GLANCE_UP_LINK             0x0A07C4E0 /* Fallback look up button */
  3465. #define DIBUTTON_TPS_GLANCE_DOWN_LINK           0x0A07C4E8 /* Fallback look down button */
  3466. #define DIBUTTON_TPS_GLANCE_LEFT_LINK           0x0A07C4E4 /* Fallback glance up button */
  3467. #define DIBUTTON_TPS_GLANCE_RIGHT_LINK          0x0A07C4EC /* Fallback glance right button */
  3468. #define DIBUTTON_TPS_DEVICE                     0x0A0044FE /* Show input device and controls */
  3469. #define DIBUTTON_TPS_PAUSE                      0x0A0044FC /* Start / Pause / Restart game */
  3470.  
  3471. /*--- Strategy - Role Playing
  3472.       Navigation and problem solving are primary actions  ---*/
  3473. #define DIVIRTUAL_STRATEGY_ROLEPLAYING          0x0B000000
  3474. #define DIAXIS_STRATEGYR_LATERAL                0x0B008201 /* sidestep - left/right */
  3475. #define DIAXIS_STRATEGYR_MOVE                   0x0B010202 /* move forward/backward */
  3476. #define DIBUTTON_STRATEGYR_GET                  0x0B000401 /* Acquire item */
  3477. #define DIBUTTON_STRATEGYR_APPLY                0x0B000402 /* Use selected item */
  3478. #define DIBUTTON_STRATEGYR_SELECT               0x0B000403 /* Select nextitem */
  3479. #define DIBUTTON_STRATEGYR_ATTACK               0x0B000404 /* Attack */
  3480. #define DIBUTTON_STRATEGYR_CAST                 0x0B000405 /* Cast Spell */
  3481. #define DIBUTTON_STRATEGYR_CROUCH               0x0B000406 /* Crouch */
  3482. #define DIBUTTON_STRATEGYR_JUMP                 0x0B000407 /* Jump */
  3483. #define DIBUTTON_STRATEGYR_MENU                 0x0B0004FD /* Show menu options */
  3484. /*--- Priority 2 controls                            ---*/
  3485.  
  3486. #define DIHATSWITCH_STRATEGYR_GLANCE            0x0B004601 /* Look around */
  3487. #define DIBUTTON_STRATEGYR_MAP                  0x0B004408 /* Cycle through map options */
  3488. #define DIBUTTON_STRATEGYR_DISPLAY              0x0B004409 /* Shows next on-screen display option */
  3489. #define DIAXIS_STRATEGYR_ROTATE                 0x0B024203 /* Turn body left/right */
  3490. #define DIBUTTON_STRATEGYR_LEFT_LINK            0x0B00C4E4 /* Fallback sidestep left button */
  3491. #define DIBUTTON_STRATEGYR_RIGHT_LINK           0x0B00C4EC /* Fallback sidestep right button */
  3492. #define DIBUTTON_STRATEGYR_FORWARD_LINK         0x0B0144E0 /* Fallback move forward button */
  3493. #define DIBUTTON_STRATEGYR_BACK_LINK            0x0B0144E8 /* Fallback move backward button */
  3494. #define DIBUTTON_STRATEGYR_ROTATE_LEFT_LINK     0x0B0244E4 /* Fallback turn body left button */
  3495. #define DIBUTTON_STRATEGYR_ROTATE_RIGHT_LINK    0x0B0244EC /* Fallback turn body right button */
  3496. #define DIBUTTON_STRATEGYR_DEVICE               0x0B0044FE /* Show input device and controls */
  3497. #define DIBUTTON_STRATEGYR_PAUSE                0x0B0044FC /* Start / Pause / Restart game */
  3498.  
  3499. /*--- Strategy - Turn based
  3500.       Navigation and problem solving are primary actions  ---*/
  3501. #define DIVIRTUAL_STRATEGY_TURN                 0x0C000000
  3502. #define DIAXIS_STRATEGYT_LATERAL                0x0C008201 /* Sidestep left/right */
  3503. #define DIAXIS_STRATEGYT_MOVE                   0x0C010202 /* Move forward/backwards */
  3504. #define DIBUTTON_STRATEGYT_SELECT               0x0C000401 /* Select unit or object */
  3505. #define DIBUTTON_STRATEGYT_INSTRUCT             0x0C000402 /* Cycle through instructions */
  3506. #define DIBUTTON_STRATEGYT_APPLY                0x0C000403 /* Apply selected instruction */
  3507. #define DIBUTTON_STRATEGYT_TEAM                 0x0C000404 /* Select next team / cycle through all */
  3508. #define DIBUTTON_STRATEGYT_TURN                 0x0C000405 /* Indicate turn over */
  3509. #define DIBUTTON_STRATEGYT_MENU                 0x0C0004FD /* Show menu options */
  3510. /*--- Priority 2 controls                            ---*/
  3511.  
  3512. #define DIBUTTON_STRATEGYT_ZOOM                 0x0C004406 /* Zoom - in / out */
  3513. #define DIBUTTON_STRATEGYT_MAP                  0x0C004407 /* cycle through map options */
  3514. #define DIBUTTON_STRATEGYT_DISPLAY              0x0C004408 /* shows next on-screen display options */
  3515. #define DIBUTTON_STRATEGYT_LEFT_LINK            0x0C00C4E4 /* Fallback sidestep left button */
  3516. #define DIBUTTON_STRATEGYT_RIGHT_LINK           0x0C00C4EC /* Fallback sidestep right button */
  3517. #define DIBUTTON_STRATEGYT_FORWARD_LINK         0x0C0144E0 /* Fallback move forward button */
  3518. #define DIBUTTON_STRATEGYT_BACK_LINK            0x0C0144E8 /* Fallback move back button */
  3519. #define DIBUTTON_STRATEGYT_DEVICE               0x0C0044FE /* Show input device and controls */
  3520. #define DIBUTTON_STRATEGYT_PAUSE                0x0C0044FC /* Start / Pause / Restart game */
  3521.  
  3522. /*--- Sports - Hunting
  3523.       Hunting                ---*/
  3524. #define DIVIRTUAL_SPORTS_HUNTING                0x0D000000
  3525. #define DIAXIS_HUNTING_LATERAL                  0x0D008201 /* sidestep left/right */
  3526. #define DIAXIS_HUNTING_MOVE                     0x0D010202 /* move forward/backwards */
  3527. #define DIBUTTON_HUNTING_FIRE                   0x0D000401 /* Fire selected weapon */
  3528. #define DIBUTTON_HUNTING_AIM                    0x0D000402 /* Select aim/move */
  3529. #define DIBUTTON_HUNTING_WEAPON                 0x0D000403 /* Select next weapon */
  3530. #define DIBUTTON_HUNTING_BINOCULAR              0x0D000404 /* Look through Binoculars */
  3531. #define DIBUTTON_HUNTING_CALL                   0x0D000405 /* Make animal call */
  3532. #define DIBUTTON_HUNTING_MAP                    0x0D000406 /* View Map */
  3533. #define DIBUTTON_HUNTING_SPECIAL                0x0D000407 /* Special game operation */
  3534. #define DIBUTTON_HUNTING_MENU                   0x0D0004FD /* Show menu options */
  3535. /*--- Priority 2 controls                            ---*/
  3536.  
  3537. #define DIHATSWITCH_HUNTING_GLANCE              0x0D004601 /* Look around */
  3538. #define DIBUTTON_HUNTING_DISPLAY                0x0D004408 /* show next on-screen display option */
  3539. #define DIAXIS_HUNTING_ROTATE                   0x0D024203 /* Turn body left/right */
  3540. #define DIBUTTON_HUNTING_CROUCH                 0x0D004409 /* Crouch/ Climb / Swim down */
  3541. #define DIBUTTON_HUNTING_JUMP                   0x0D00440A /* Jump/ Climb up / Swim up */
  3542. #define DIBUTTON_HUNTING_FIRESECONDARY          0x0D00440B /* Alternative fire button */
  3543. #define DIBUTTON_HUNTING_LEFT_LINK              0x0D00C4E4 /* Fallback sidestep left button */
  3544. #define DIBUTTON_HUNTING_RIGHT_LINK             0x0D00C4EC /* Fallback sidestep right button */
  3545. #define DIBUTTON_HUNTING_FORWARD_LINK           0x0D0144E0 /* Fallback move forward button */
  3546. #define DIBUTTON_HUNTING_BACK_LINK              0x0D0144E8 /* Fallback move back button */
  3547. #define DIBUTTON_HUNTING_ROTATE_LEFT_LINK       0x0D0244E4 /* Fallback turn body left button */
  3548. #define DIBUTTON_HUNTING_ROTATE_RIGHT_LINK      0x0D0244EC /* Fallback turn body right button */
  3549. #define DIBUTTON_HUNTING_DEVICE                 0x0D0044FE /* Show input device and controls */
  3550. #define DIBUTTON_HUNTING_PAUSE                  0x0D0044FC /* Start / Pause / Restart game */
  3551.  
  3552. /*--- Sports - Fishing
  3553.       Catching Fish is primary objective   ---*/
  3554. #define DIVIRTUAL_SPORTS_FISHING                0x0E000000
  3555. #define DIAXIS_FISHING_LATERAL                  0x0E008201 /* sidestep left/right */
  3556. #define DIAXIS_FISHING_MOVE                     0x0E010202 /* move forward/backwards */
  3557. #define DIBUTTON_FISHING_CAST                   0x0E000401 /* Cast line */
  3558. #define DIBUTTON_FISHING_TYPE                   0x0E000402 /* Select cast type */
  3559. #define DIBUTTON_FISHING_BINOCULAR              0x0E000403 /* Look through Binocular */
  3560. #define DIBUTTON_FISHING_BAIT                   0x0E000404 /* Select type of Bait */
  3561. #define DIBUTTON_FISHING_MAP                    0x0E000405 /* View Map */
  3562. #define DIBUTTON_FISHING_MENU                   0x0E0004FD /* Show menu options */
  3563. /*--- Priority 2 controls                            ---*/
  3564.  
  3565. #define DIHATSWITCH_FISHING_GLANCE              0x0E004601 /* Look around */
  3566. #define DIBUTTON_FISHING_DISPLAY                0x0E004406 /* Show next on-screen display option */
  3567. #define DIAXIS_FISHING_ROTATE                   0x0E024203 /* Turn character left / right */
  3568. #define DIBUTTON_FISHING_CROUCH                 0x0E004407 /* Crouch/ Climb / Swim down */
  3569. #define DIBUTTON_FISHING_JUMP                   0x0E004408 /* Jump/ Climb up / Swim up */
  3570. #define DIBUTTON_FISHING_LEFT_LINK              0x0E00C4E4 /* Fallback sidestep left button */
  3571. #define DIBUTTON_FISHING_RIGHT_LINK             0x0E00C4EC /* Fallback sidestep right button */
  3572. #define DIBUTTON_FISHING_FORWARD_LINK           0x0E0144E0 /* Fallback move forward button */
  3573. #define DIBUTTON_FISHING_BACK_LINK              0x0E0144E8 /* Fallback move back button */
  3574. #define DIBUTTON_FISHING_ROTATE_LEFT_LINK       0x0E0244E4 /* Fallback turn body left button */
  3575. #define DIBUTTON_FISHING_ROTATE_RIGHT_LINK      0x0E0244EC /* Fallback turn body right button */
  3576. #define DIBUTTON_FISHING_DEVICE                 0x0E0044FE /* Show input device and controls */
  3577. #define DIBUTTON_FISHING_PAUSE                  0x0E0044FC /* Start / Pause / Restart game */
  3578.  
  3579. /*--- Sports - Baseball - Batting
  3580.       Batter control is primary objective  ---*/
  3581. #define DIVIRTUAL_SPORTS_BASEBALL_BAT           0x0F000000
  3582. #define DIAXIS_BASEBALLB_LATERAL                0x0F008201 /* Aim left / right */
  3583. #define DIAXIS_BASEBALLB_MOVE                   0x0F010202 /* Aim up / down */
  3584. #define DIBUTTON_BASEBALLB_SELECT               0x0F000401 /* cycle through swing options */
  3585. #define DIBUTTON_BASEBALLB_NORMAL               0x0F000402 /* normal swing */
  3586. #define DIBUTTON_BASEBALLB_POWER                0x0F000403 /* swing for the fence */
  3587. #define DIBUTTON_BASEBALLB_BUNT                 0x0F000404 /* bunt */
  3588. #define DIBUTTON_BASEBALLB_STEAL                0x0F000405 /* Base runner attempts to steal a base */
  3589. #define DIBUTTON_BASEBALLB_BURST                0x0F000406 /* Base runner invokes burst of speed */
  3590. #define DIBUTTON_BASEBALLB_SLIDE                0x0F000407 /* Base runner slides into base */
  3591. #define DIBUTTON_BASEBALLB_CONTACT              0x0F000408 /* Contact swing */
  3592. #define DIBUTTON_BASEBALLB_MENU                 0x0F0004FD /* Show menu options */
  3593. /*--- Priority 2 controls                            ---*/
  3594.  
  3595. #define DIBUTTON_BASEBALLB_NOSTEAL              0x0F004409 /* Base runner goes back to a base */
  3596. #define DIBUTTON_BASEBALLB_BOX                  0x0F00440A /* Enter or exit batting box */
  3597. #define DIBUTTON_BASEBALLB_LEFT_LINK            0x0F00C4E4 /* Fallback sidestep left button */
  3598. #define DIBUTTON_BASEBALLB_RIGHT_LINK           0x0F00C4EC /* Fallback sidestep right button */
  3599. #define DIBUTTON_BASEBALLB_FORWARD_LINK         0x0F0144E0 /* Fallback move forward button */
  3600. #define DIBUTTON_BASEBALLB_BACK_LINK            0x0F0144E8 /* Fallback move back button */
  3601. #define DIBUTTON_BASEBALLB_DEVICE               0x0F0044FE /* Show input device and controls */
  3602. #define DIBUTTON_BASEBALLB_PAUSE                0x0F0044FC /* Start / Pause / Restart game */
  3603.  
  3604. /*--- Sports - Baseball - Pitching
  3605.       Pitcher control is primary objective   ---*/
  3606. #define DIVIRTUAL_SPORTS_BASEBALL_PITCH         0x10000000
  3607. #define DIAXIS_BASEBALLP_LATERAL                0x10008201 /* Aim left / right */
  3608. #define DIAXIS_BASEBALLP_MOVE                   0x10010202 /* Aim up / down */
  3609. #define DIBUTTON_BASEBALLP_SELECT               0x10000401 /* cycle through pitch selections */
  3610. #define DIBUTTON_BASEBALLP_PITCH                0x10000402 /* throw pitch */
  3611. #define DIBUTTON_BASEBALLP_BASE                 0x10000403 /* select base to throw to */
  3612. #define DIBUTTON_BASEBALLP_THROW                0x10000404 /* throw to base */
  3613. #define DIBUTTON_BASEBALLP_FAKE                 0x10000405 /* Fake a throw to a base */
  3614. #define DIBUTTON_BASEBALLP_MENU                 0x100004FD /* Show menu options */
  3615. /*--- Priority 2 controls                            ---*/
  3616.  
  3617. #define DIBUTTON_BASEBALLP_WALK                 0x10004406 /* Throw intentional walk / pitch out */
  3618. #define DIBUTTON_BASEBALLP_LOOK                 0x10004407 /* Look at runners on bases */
  3619. #define DIBUTTON_BASEBALLP_LEFT_LINK            0x1000C4E4 /* Fallback sidestep left button */
  3620. #define DIBUTTON_BASEBALLP_RIGHT_LINK           0x1000C4EC /* Fallback sidestep right button */
  3621. #define DIBUTTON_BASEBALLP_FORWARD_LINK         0x100144E0 /* Fallback move forward button */
  3622. #define DIBUTTON_BASEBALLP_BACK_LINK            0x100144E8 /* Fallback move back button */
  3623. #define DIBUTTON_BASEBALLP_DEVICE               0x100044FE /* Show input device and controls */
  3624. #define DIBUTTON_BASEBALLP_PAUSE                0x100044FC /* Start / Pause / Restart game */
  3625.  
  3626. /*--- Sports - Baseball - Fielding
  3627.       Fielder control is primary objective  ---*/
  3628. #define DIVIRTUAL_SPORTS_BASEBALL_FIELD         0x11000000
  3629. #define DIAXIS_BASEBALLF_LATERAL                0x11008201 /* Aim left / right */
  3630. #define DIAXIS_BASEBALLF_MOVE                   0x11010202 /* Aim up / down */
  3631. #define DIBUTTON_BASEBALLF_NEAREST              0x11000401 /* Switch to fielder nearest to the ball */
  3632. #define DIBUTTON_BASEBALLF_THROW1               0x11000402 /* Make conservative throw */
  3633. #define DIBUTTON_BASEBALLF_THROW2               0x11000403 /* Make aggressive throw */
  3634. #define DIBUTTON_BASEBALLF_BURST                0x11000404 /* Invoke burst of speed */
  3635. #define DIBUTTON_BASEBALLF_JUMP                 0x11000405 /* Jump to catch ball */
  3636. #define DIBUTTON_BASEBALLF_DIVE                 0x11000406 /* Dive to catch ball */
  3637. #define DIBUTTON_BASEBALLF_MENU                 0x110004FD /* Show menu options */
  3638. /*--- Priority 2 controls                            ---*/
  3639.  
  3640. #define DIBUTTON_BASEBALLF_SHIFTIN              0x11004407 /* Shift the infield positioning */
  3641. #define DIBUTTON_BASEBALLF_SHIFTOUT             0x11004408 /* Shift the outfield positioning */
  3642. #define DIBUTTON_BASEBALLF_AIM_LEFT_LINK        0x1100C4E4 /* Fallback aim left button */
  3643. #define DIBUTTON_BASEBALLF_AIM_RIGHT_LINK       0x1100C4EC /* Fallback aim right button */
  3644. #define DIBUTTON_BASEBALLF_FORWARD_LINK         0x110144E0 /* Fallback move forward button */
  3645. #define DIBUTTON_BASEBALLF_BACK_LINK            0x110144E8 /* Fallback move back button */
  3646. #define DIBUTTON_BASEBALLF_DEVICE               0x110044FE /* Show input device and controls */
  3647. #define DIBUTTON_BASEBALLF_PAUSE                0x110044FC /* Start / Pause / Restart game */
  3648.  
  3649. /*--- Sports - Basketball - Offense
  3650.       Offense  ---*/
  3651. #define DIVIRTUAL_SPORTS_BASKETBALL_OFFENSE     0x12000000
  3652. #define DIAXIS_BBALLO_LATERAL                   0x12008201 /* left / right */
  3653. #define DIAXIS_BBALLO_MOVE                      0x12010202 /* up / down */
  3654. #define DIBUTTON_BBALLO_SHOOT                   0x12000401 /* shoot basket */
  3655. #define DIBUTTON_BBALLO_DUNK                    0x12000402 /* dunk basket */
  3656. #define DIBUTTON_BBALLO_PASS                    0x12000403 /* throw pass */
  3657. #define DIBUTTON_BBALLO_FAKE                    0x12000404 /* fake shot or pass */
  3658. #define DIBUTTON_BBALLO_SPECIAL                 0x12000405 /* apply special move */
  3659. #define DIBUTTON_BBALLO_PLAYER                  0x12000406 /* select next player */
  3660. #define DIBUTTON_BBALLO_BURST                   0x12000407 /* invoke burst */
  3661. #define DIBUTTON_BBALLO_CALL                    0x12000408 /* call for ball / pass to me */
  3662. #define DIBUTTON_BBALLO_MENU                    0x120004FD /* Show menu options */
  3663. /*--- Priority 2 controls                            ---*/
  3664.  
  3665. #define DIHATSWITCH_BBALLO_GLANCE               0x12004601 /* scroll view */
  3666. #define DIBUTTON_BBALLO_SCREEN                  0x12004409 /* Call for screen */
  3667. #define DIBUTTON_BBALLO_PLAY                    0x1200440A /* Call for specific offensive play */
  3668. #define DIBUTTON_BBALLO_JAB                     0x1200440B /* Initiate fake drive to basket */
  3669. #define DIBUTTON_BBALLO_POST                    0x1200440C /* Perform post move */
  3670. #define DIBUTTON_BBALLO_TIMEOUT                 0x1200440D /* Time Out */
  3671. #define DIBUTTON_BBALLO_SUBSTITUTE              0x1200440E /* substitute one player for another */
  3672. #define DIBUTTON_BBALLO_LEFT_LINK               0x1200C4E4 /* Fallback sidestep left button */
  3673. #define DIBUTTON_BBALLO_RIGHT_LINK              0x1200C4EC /* Fallback sidestep right button */
  3674. #define DIBUTTON_BBALLO_FORWARD_LINK            0x120144E0 /* Fallback move forward button */
  3675. #define DIBUTTON_BBALLO_BACK_LINK               0x120144E8 /* Fallback move back button */
  3676. #define DIBUTTON_BBALLO_DEVICE                  0x120044FE /* Show input device and controls */
  3677. #define DIBUTTON_BBALLO_PAUSE                   0x120044FC /* Start / Pause / Restart game */
  3678.  
  3679. /*--- Sports - Basketball - Defense
  3680.       Defense  ---*/
  3681. #define DIVIRTUAL_SPORTS_BASKETBALL_DEFENSE     0x13000000
  3682. #define DIAXIS_BBALLD_LATERAL                   0x13008201 /* left / right */
  3683. #define DIAXIS_BBALLD_MOVE                      0x13010202 /* up / down */
  3684. #define DIBUTTON_BBALLD_JUMP                    0x13000401 /* jump to block shot */
  3685. #define DIBUTTON_BBALLD_STEAL                   0x13000402 /* attempt to steal ball */
  3686. #define DIBUTTON_BBALLD_FAKE                    0x13000403 /* fake block or steal */
  3687. #define DIBUTTON_BBALLD_SPECIAL                 0x13000404 /* apply special move */
  3688. #define DIBUTTON_BBALLD_PLAYER                  0x13000405 /* select next player */
  3689. #define DIBUTTON_BBALLD_BURST                   0x13000406 /* invoke burst */
  3690. #define DIBUTTON_BBALLD_PLAY                    0x13000407 /* call for specific defensive play */
  3691. #define DIBUTTON_BBALLD_MENU                    0x130004FD /* Show menu options */
  3692. /*--- Priority 2 controls                            ---*/
  3693.  
  3694. #define DIHATSWITCH_BBALLD_GLANCE               0x13004601 /* scroll view */
  3695. #define DIBUTTON_BBALLD_TIMEOUT                 0x13004408 /* Time Out */
  3696. #define DIBUTTON_BBALLD_SUBSTITUTE              0x13004409 /* substitute one player for another */
  3697. #define DIBUTTON_BBALLD_LEFT_LINK               0x1300C4E4 /* Fallback sidestep left button */
  3698. #define DIBUTTON_BBALLD_RIGHT_LINK              0x1300C4EC /* Fallback sidestep right button */
  3699. #define DIBUTTON_BBALLD_FORWARD_LINK            0x130144E0 /* Fallback move forward button */
  3700. #define DIBUTTON_BBALLD_BACK_LINK               0x130144E8 /* Fallback move back button */
  3701. #define DIBUTTON_BBALLD_DEVICE                  0x130044FE /* Show input device and controls */
  3702. #define DIBUTTON_BBALLD_PAUSE                   0x130044FC /* Start / Pause / Restart game */
  3703.  
  3704. /*--- Sports - Football - Play
  3705.       Play selection  ---*/
  3706. #define DIVIRTUAL_SPORTS_FOOTBALL_FIELD         0x14000000
  3707. #define DIBUTTON_FOOTBALLP_PLAY                 0x14000401 /* cycle through available plays */
  3708. #define DIBUTTON_FOOTBALLP_SELECT               0x14000402 /* select play */
  3709. #define DIBUTTON_FOOTBALLP_HELP                 0x14000403 /* Bring up pop-up help */
  3710. #define DIBUTTON_FOOTBALLP_MENU                 0x140004FD /* Show menu options */
  3711. /*--- Priority 2 controls                            ---*/
  3712.  
  3713. #define DIBUTTON_FOOTBALLP_DEVICE               0x140044FE /* Show input device and controls */
  3714. #define DIBUTTON_FOOTBALLP_PAUSE                0x140044FC /* Start / Pause / Restart game */
  3715.  
  3716. /*--- Sports - Football - QB
  3717.       Offense: Quarterback / Kicker  ---*/
  3718. #define DIVIRTUAL_SPORTS_FOOTBALL_QBCK          0x15000000
  3719. #define DIAXIS_FOOTBALLQ_LATERAL                0x15008201 /* Move / Aim: left / right */
  3720. #define DIAXIS_FOOTBALLQ_MOVE                   0x15010202 /* Move / Aim: up / down */
  3721. #define DIBUTTON_FOOTBALLQ_SELECT               0x15000401 /* Select */
  3722. #define DIBUTTON_FOOTBALLQ_SNAP                 0x15000402 /* snap ball - start play */
  3723. #define DIBUTTON_FOOTBALLQ_JUMP                 0x15000403 /* jump over defender */
  3724. #define DIBUTTON_FOOTBALLQ_SLIDE                0x15000404 /* Dive/Slide */
  3725. #define DIBUTTON_FOOTBALLQ_PASS                 0x15000405 /* throws pass to receiver */
  3726. #define DIBUTTON_FOOTBALLQ_FAKE                 0x15000406 /* pump fake pass or fake kick */
  3727. #define DIBUTTON_FOOTBALLQ_MENU                 0x150004FD /* Show menu options */
  3728. /*--- Priority 2 controls                            ---*/
  3729.  
  3730. #define DIBUTTON_FOOTBALLQ_FAKESNAP             0x15004407 /* Fake snap  */
  3731. #define DIBUTTON_FOOTBALLQ_MOTION               0x15004408 /* Send receivers in motion */
  3732. #define DIBUTTON_FOOTBALLQ_AUDIBLE              0x15004409 /* Change offensive play at line of scrimmage */
  3733. #define DIBUTTON_FOOTBALLQ_LEFT_LINK            0x1500C4E4 /* Fallback sidestep left button */
  3734. #define DIBUTTON_FOOTBALLQ_RIGHT_LINK           0x1500C4EC /* Fallback sidestep right button */
  3735. #define DIBUTTON_FOOTBALLQ_FORWARD_LINK         0x150144E0 /* Fallback move forward button */
  3736. #define DIBUTTON_FOOTBALLQ_BACK_LINK            0x150144E8 /* Fallback move back button */
  3737. #define DIBUTTON_FOOTBALLQ_DEVICE               0x150044FE /* Show input device and controls */
  3738. #define DIBUTTON_FOOTBALLQ_PAUSE                0x150044FC /* Start / Pause / Restart game */
  3739.  
  3740. /*--- Sports - Football - Offense
  3741.       Offense - Runner  ---*/
  3742. #define DIVIRTUAL_SPORTS_FOOTBALL_OFFENSE       0x16000000
  3743. #define DIAXIS_FOOTBALLO_LATERAL                0x16008201 /* Move / Aim: left / right */
  3744. #define DIAXIS_FOOTBALLO_MOVE                   0x16010202 /* Move / Aim: up / down */
  3745. #define DIBUTTON_FOOTBALLO_JUMP                 0x16000401 /* jump or hurdle over defender */
  3746. #define DIBUTTON_FOOTBALLO_LEFTARM              0x16000402 /* holds out left arm */
  3747. #define DIBUTTON_FOOTBALLO_RIGHTARM             0x16000403 /* holds out right arm */
  3748. #define DIBUTTON_FOOTBALLO_THROW                0x16000404 /* throw pass or lateral ball to another runner */
  3749. #define DIBUTTON_FOOTBALLO_SPIN                 0x16000405 /* Spin to avoid defenders */
  3750. #define DIBUTTON_FOOTBALLO_MENU                 0x160004FD /* Show menu options */
  3751. /*--- Priority 2 controls                            ---*/
  3752.  
  3753. #define DIBUTTON_FOOTBALLO_JUKE                 0x16004406 /* Use special move to avoid defenders */
  3754. #define DIBUTTON_FOOTBALLO_SHOULDER             0x16004407 /* Lower shoulder to run over defenders */
  3755. #define DIBUTTON_FOOTBALLO_TURBO                0x16004408 /* Speed burst past defenders */
  3756. #define DIBUTTON_FOOTBALLO_DIVE                 0x16004409 /* Dive over defenders */
  3757. #define DIBUTTON_FOOTBALLO_ZOOM                 0x1600440A /* Zoom view in / out */
  3758. #define DIBUTTON_FOOTBALLO_SUBSTITUTE           0x1600440B /* substitute one player for another */
  3759. #define DIBUTTON_FOOTBALLO_LEFT_LINK            0x1600C4E4 /* Fallback sidestep left button */
  3760. #define DIBUTTON_FOOTBALLO_RIGHT_LINK           0x1600C4EC /* Fallback sidestep right button */
  3761. #define DIBUTTON_FOOTBALLO_FORWARD_LINK         0x160144E0 /* Fallback move forward button */
  3762. #define DIBUTTON_FOOTBALLO_BACK_LINK            0x160144E8 /* Fallback move back button */
  3763. #define DIBUTTON_FOOTBALLO_DEVICE               0x160044FE /* Show input device and controls */
  3764. #define DIBUTTON_FOOTBALLO_PAUSE                0x160044FC /* Start / Pause / Restart game */
  3765.  
  3766. /*--- Sports - Football - Defense
  3767.       Defense     ---*/
  3768. #define DIVIRTUAL_SPORTS_FOOTBALL_DEFENSE       0x17000000
  3769. #define DIAXIS_FOOTBALLD_LATERAL                0x17008201 /* Move / Aim: left / right */
  3770. #define DIAXIS_FOOTBALLD_MOVE                   0x17010202 /* Move / Aim: up / down */
  3771. #define DIBUTTON_FOOTBALLD_PLAY                 0x17000401 /* cycle through available plays */
  3772. #define DIBUTTON_FOOTBALLD_SELECT               0x17000402 /* select player closest to the ball */
  3773. #define DIBUTTON_FOOTBALLD_JUMP                 0x17000403 /* jump to intercept or block */
  3774. #define DIBUTTON_FOOTBALLD_TACKLE               0x17000404 /* tackler runner */
  3775. #define DIBUTTON_FOOTBALLD_FAKE                 0x17000405 /* hold down to fake tackle or intercept */
  3776. #define DIBUTTON_FOOTBALLD_SUPERTACKLE          0x17000406 /* Initiate special tackle */
  3777. #define DIBUTTON_FOOTBALLD_MENU                 0x170004FD /* Show menu options */
  3778. /*--- Priority 2 controls                            ---*/
  3779.  
  3780. #define DIBUTTON_FOOTBALLD_SPIN                 0x17004407 /* Spin to beat offensive line */
  3781. #define DIBUTTON_FOOTBALLD_SWIM                 0x17004408 /* Swim to beat the offensive line */
  3782. #define DIBUTTON_FOOTBALLD_BULLRUSH             0x17004409 /* Bull rush the offensive line */
  3783. #define DIBUTTON_FOOTBALLD_RIP                  0x1700440A /* Rip the offensive line */
  3784. #define DIBUTTON_FOOTBALLD_AUDIBLE              0x1700440B /* Change defensive play at the line of scrimmage */
  3785. #define DIBUTTON_FOOTBALLD_ZOOM                 0x1700440C /* Zoom view in / out */
  3786. #define DIBUTTON_FOOTBALLD_SUBSTITUTE           0x1700440D /* substitute one player for another */
  3787. #define DIBUTTON_FOOTBALLD_LEFT_LINK            0x1700C4E4 /* Fallback sidestep left button */
  3788. #define DIBUTTON_FOOTBALLD_RIGHT_LINK           0x1700C4EC /* Fallback sidestep right button */
  3789. #define DIBUTTON_FOOTBALLD_FORWARD_LINK         0x170144E0 /* Fallback move forward button */
  3790. #define DIBUTTON_FOOTBALLD_BACK_LINK            0x170144E8 /* Fallback move back button */
  3791. #define DIBUTTON_FOOTBALLD_DEVICE               0x170044FE /* Show input device and controls */
  3792. #define DIBUTTON_FOOTBALLD_PAUSE                0x170044FC /* Start / Pause / Restart game */
  3793.  
  3794. /*--- Sports - Golf
  3795.                                 ---*/
  3796. #define DIVIRTUAL_SPORTS_GOLF                   0x18000000
  3797. #define DIAXIS_GOLF_LATERAL                     0x18008201 /* Move / Aim: left / right */
  3798. #define DIAXIS_GOLF_MOVE                        0x18010202 /* Move / Aim: up / down */
  3799. #define DIBUTTON_GOLF_SWING                     0x18000401 /* swing club */
  3800. #define DIBUTTON_GOLF_SELECT                    0x18000402 /* cycle between: club / swing strength / ball arc / ball spin */
  3801. #define DIBUTTON_GOLF_UP                        0x18000403 /* increase selection */
  3802. #define DIBUTTON_GOLF_DOWN                      0x18000404 /* decrease selection */
  3803. #define DIBUTTON_GOLF_TERRAIN                   0x18000405 /* shows terrain detail */
  3804. #define DIBUTTON_GOLF_FLYBY                     0x18000406 /* view the hole via a flyby */
  3805. #define DIBUTTON_GOLF_MENU                      0x180004FD /* Show menu options */
  3806. /*--- Priority 2 controls                            ---*/
  3807.  
  3808. #define DIHATSWITCH_GOLF_SCROLL                 0x18004601 /* scroll view */
  3809. #define DIBUTTON_GOLF_ZOOM                      0x18004407 /* Zoom view in / out */
  3810. #define DIBUTTON_GOLF_TIMEOUT                   0x18004408 /* Call for time out */
  3811. #define DIBUTTON_GOLF_SUBSTITUTE                0x18004409 /* substitute one player for another */
  3812. #define DIBUTTON_GOLF_LEFT_LINK                 0x1800C4E4 /* Fallback sidestep left button */
  3813. #define DIBUTTON_GOLF_RIGHT_LINK                0x1800C4EC /* Fallback sidestep right button */
  3814. #define DIBUTTON_GOLF_FORWARD_LINK              0x180144E0 /* Fallback move forward button */
  3815. #define DIBUTTON_GOLF_BACK_LINK                 0x180144E8 /* Fallback move back button */
  3816. #define DIBUTTON_GOLF_DEVICE                    0x180044FE /* Show input device and controls */
  3817. #define DIBUTTON_GOLF_PAUSE                     0x180044FC /* Start / Pause / Restart game */
  3818.  
  3819. /*--- Sports - Hockey - Offense
  3820.       Offense       ---*/
  3821. #define DIVIRTUAL_SPORTS_HOCKEY_OFFENSE         0x19000000
  3822. #define DIAXIS_HOCKEYO_LATERAL                  0x19008201 /* Move / Aim: left / right */
  3823. #define DIAXIS_HOCKEYO_MOVE                     0x19010202 /* Move / Aim: up / down */
  3824. #define DIBUTTON_HOCKEYO_SHOOT                  0x19000401 /* Shoot */
  3825. #define DIBUTTON_HOCKEYO_PASS                   0x19000402 /* pass the puck */
  3826. #define DIBUTTON_HOCKEYO_BURST                  0x19000403 /* invoke speed burst */
  3827. #define DIBUTTON_HOCKEYO_SPECIAL                0x19000404 /* invoke special move */
  3828. #define DIBUTTON_HOCKEYO_FAKE                   0x19000405 /* hold down to fake pass or kick */
  3829. #define DIBUTTON_HOCKEYO_MENU                   0x190004FD /* Show menu options */
  3830. /*--- Priority 2 controls                            ---*/
  3831.  
  3832. #define DIHATSWITCH_HOCKEYO_SCROLL              0x19004601 /* scroll view */
  3833. #define DIBUTTON_HOCKEYO_ZOOM                   0x19004406 /* Zoom view in / out */
  3834. #define DIBUTTON_HOCKEYO_STRATEGY               0x19004407 /* Invoke coaching menu for strategy help */
  3835. #define DIBUTTON_HOCKEYO_TIMEOUT                0x19004408 /* Call for time out */
  3836. #define DIBUTTON_HOCKEYO_SUBSTITUTE             0x19004409 /* substitute one player for another */
  3837. #define DIBUTTON_HOCKEYO_LEFT_LINK              0x1900C4E4 /* Fallback sidestep left button */
  3838. #define DIBUTTON_HOCKEYO_RIGHT_LINK             0x1900C4EC /* Fallback sidestep right button */
  3839. #define DIBUTTON_HOCKEYO_FORWARD_LINK           0x190144E0 /* Fallback move forward button */
  3840. #define DIBUTTON_HOCKEYO_BACK_LINK              0x190144E8 /* Fallback move back button */
  3841. #define DIBUTTON_HOCKEYO_DEVICE                 0x190044FE /* Show input device and controls */
  3842. #define DIBUTTON_HOCKEYO_PAUSE                  0x190044FC /* Start / Pause / Restart game */
  3843.  
  3844. /*--- Sports - Hockey - Defense
  3845.       Defense       ---*/
  3846. #define DIVIRTUAL_SPORTS_HOCKEY_DEFENSE         0x1A000000
  3847. #define DIAXIS_HOCKEYD_LATERAL                  0x1A008201 /* Move / Aim: left / right */
  3848. #define DIAXIS_HOCKEYD_MOVE                     0x1A010202 /* Move / Aim: up / down */
  3849. #define DIBUTTON_HOCKEYD_PLAYER                 0x1A000401 /* control player closest to the puck */
  3850. #define DIBUTTON_HOCKEYD_STEAL                  0x1A000402 /* attempt steal */
  3851. #define DIBUTTON_HOCKEYD_BURST                  0x1A000403 /* speed burst or body check */
  3852. #define DIBUTTON_HOCKEYD_BLOCK                  0x1A000404 /* block puck */
  3853. #define DIBUTTON_HOCKEYD_FAKE                   0x1A000405 /* hold down to fake tackle or intercept */
  3854. #define DIBUTTON_HOCKEYD_MENU                   0x1A0004FD /* Show menu options */
  3855. /*--- Priority 2 controls                            ---*/
  3856.  
  3857. #define DIHATSWITCH_HOCKEYD_SCROLL              0x1A004601 /* scroll view */
  3858. #define DIBUTTON_HOCKEYD_ZOOM                   0x1A004406 /* Zoom view in / out */
  3859. #define DIBUTTON_HOCKEYD_STRATEGY               0x1A004407 /* Invoke coaching menu for strategy help */
  3860. #define DIBUTTON_HOCKEYD_TIMEOUT                0x1A004408 /* Call for time out */
  3861. #define DIBUTTON_HOCKEYD_SUBSTITUTE             0x1A004409 /* substitute one player for another */
  3862. #define DIBUTTON_HOCKEYD_LEFT_LINK              0x1A00C4E4 /* Fallback sidestep left button */
  3863. #define DIBUTTON_HOCKEYD_RIGHT_LINK             0x1A00C4EC /* Fallback sidestep right button */
  3864. #define DIBUTTON_HOCKEYD_FORWARD_LINK           0x1A0144E0 /* Fallback move forward button */
  3865. #define DIBUTTON_HOCKEYD_BACK_LINK              0x1A0144E8 /* Fallback move back button */
  3866. #define DIBUTTON_HOCKEYD_DEVICE                 0x1A0044FE /* Show input device and controls */
  3867. #define DIBUTTON_HOCKEYD_PAUSE                  0x1A0044FC /* Start / Pause / Restart game */
  3868.  
  3869. /*--- Sports - Hockey - Goalie
  3870.       Goal tending  ---*/
  3871. #define DIVIRTUAL_SPORTS_HOCKEY_GOALIE          0x1B000000
  3872. #define DIAXIS_HOCKEYG_LATERAL                  0x1B008201 /* Move / Aim: left / right */
  3873. #define DIAXIS_HOCKEYG_MOVE                     0x1B010202 /* Move / Aim: up / down */
  3874. #define DIBUTTON_HOCKEYG_PASS                   0x1B000401 /* pass puck */
  3875. #define DIBUTTON_HOCKEYG_POKE                   0x1B000402 /* poke / check / hack */
  3876. #define DIBUTTON_HOCKEYG_STEAL                  0x1B000403 /* attempt steal */
  3877. #define DIBUTTON_HOCKEYG_BLOCK                  0x1B000404 /* block puck */
  3878. #define DIBUTTON_HOCKEYG_MENU                   0x1B0004FD /* Show menu options */
  3879. /*--- Priority 2 controls                            ---*/
  3880.  
  3881. #define DIHATSWITCH_HOCKEYG_SCROLL              0x1B004601 /* scroll view */
  3882. #define DIBUTTON_HOCKEYG_ZOOM                   0x1B004405 /* Zoom view in / out */
  3883. #define DIBUTTON_HOCKEYG_STRATEGY               0x1B004406 /* Invoke coaching menu for strategy help */
  3884. #define DIBUTTON_HOCKEYG_TIMEOUT                0x1B004407 /* Call for time out */
  3885. #define DIBUTTON_HOCKEYG_SUBSTITUTE             0x1B004408 /* substitute one player for another */
  3886. #define DIBUTTON_HOCKEYG_LEFT_LINK              0x1B00C4E4 /* Fallback sidestep left button */
  3887. #define DIBUTTON_HOCKEYG_RIGHT_LINK             0x1B00C4EC /* Fallback sidestep right button */
  3888. #define DIBUTTON_HOCKEYG_FORWARD_LINK           0x1B0144E0 /* Fallback move forward button */
  3889. #define DIBUTTON_HOCKEYG_BACK_LINK              0x1B0144E8 /* Fallback move back button */
  3890. #define DIBUTTON_HOCKEYG_DEVICE                 0x1B0044FE /* Show input device and controls */
  3891. #define DIBUTTON_HOCKEYG_PAUSE                  0x1B0044FC /* Start / Pause / Restart game */
  3892.  
  3893. /*--- Sports - Mountain Biking
  3894.                      ---*/
  3895. #define DIVIRTUAL_SPORTS_BIKING_MOUNTAIN        0x1C000000
  3896. #define DIAXIS_BIKINGM_TURN                     0x1C008201 /* left / right */
  3897. #define DIAXIS_BIKINGM_PEDAL                    0x1C010202 /* Pedal faster / slower / brake */
  3898. #define DIBUTTON_BIKINGM_JUMP                   0x1C000401 /* jump over obstacle */
  3899. #define DIBUTTON_BIKINGM_CAMERA                 0x1C000402 /* switch camera view */
  3900. #define DIBUTTON_BIKINGM_SPECIAL1               0x1C000403 /* perform first special move */
  3901. #define DIBUTTON_BIKINGM_SELECT                 0x1C000404 /* Select */
  3902. #define DIBUTTON_BIKINGM_SPECIAL2               0x1C000405 /* perform second special move */
  3903. #define DIBUTTON_BIKINGM_MENU                   0x1C0004FD /* Show menu options */
  3904. /*--- Priority 2 controls                            ---*/
  3905.  
  3906. #define DIHATSWITCH_BIKINGM_SCROLL              0x1C004601 /* scroll view */
  3907. #define DIBUTTON_BIKINGM_ZOOM                   0x1C004406 /* Zoom view in / out */
  3908. #define DIAXIS_BIKINGM_BRAKE                    0x1C044203 /* Brake axis  */
  3909. #define DIBUTTON_BIKINGM_LEFT_LINK              0x1C00C4E4 /* Fallback turn left button */
  3910. #define DIBUTTON_BIKINGM_RIGHT_LINK             0x1C00C4EC /* Fallback turn right button */
  3911. #define DIBUTTON_BIKINGM_FASTER_LINK            0x1C0144E0 /* Fallback pedal faster button */
  3912. #define DIBUTTON_BIKINGM_SLOWER_LINK            0x1C0144E8 /* Fallback pedal slower button */
  3913. #define DIBUTTON_BIKINGM_BRAKE_BUTTON_LINK      0x1C0444E8 /* Fallback brake button */
  3914. #define DIBUTTON_BIKINGM_DEVICE                 0x1C0044FE /* Show input device and controls */
  3915. #define DIBUTTON_BIKINGM_PAUSE                  0x1C0044FC /* Start / Pause / Restart game */
  3916.  
  3917. /*--- Sports: Skiing / Snowboarding / Skateboarding
  3918.         ---*/
  3919. #define DIVIRTUAL_SPORTS_SKIING                 0x1D000000
  3920. #define DIAXIS_SKIING_TURN                      0x1D008201 /* left / right */
  3921. #define DIAXIS_SKIING_SPEED                     0x1D010202 /* faster / slower */
  3922. #define DIBUTTON_SKIING_JUMP                    0x1D000401 /* Jump */
  3923. #define DIBUTTON_SKIING_CROUCH                  0x1D000402 /* crouch down */
  3924. #define DIBUTTON_SKIING_CAMERA                  0x1D000403 /* switch camera view */
  3925. #define DIBUTTON_SKIING_SPECIAL1                0x1D000404 /* perform first special move */
  3926. #define DIBUTTON_SKIING_SELECT                  0x1D000405 /* Select */
  3927. #define DIBUTTON_SKIING_SPECIAL2                0x1D000406 /* perform second special move */
  3928. #define DIBUTTON_SKIING_MENU                    0x1D0004FD /* Show menu options */
  3929. /*--- Priority 2 controls                            ---*/
  3930.  
  3931. #define DIHATSWITCH_SKIING_GLANCE               0x1D004601 /* scroll view */
  3932. #define DIBUTTON_SKIING_ZOOM                    0x1D004407 /* Zoom view in / out */
  3933. #define DIBUTTON_SKIING_LEFT_LINK               0x1D00C4E4 /* Fallback turn left button */
  3934. #define DIBUTTON_SKIING_RIGHT_LINK              0x1D00C4EC /* Fallback turn right button */
  3935. #define DIBUTTON_SKIING_FASTER_LINK             0x1D0144E0 /* Fallback increase speed button */
  3936. #define DIBUTTON_SKIING_SLOWER_LINK             0x1D0144E8 /* Fallback decrease speed button */
  3937. #define DIBUTTON_SKIING_DEVICE                  0x1D0044FE /* Show input device and controls */
  3938. #define DIBUTTON_SKIING_PAUSE                   0x1D0044FC /* Start / Pause / Restart game */
  3939.  
  3940. /*--- Sports - Soccer - Offense
  3941.       Offense       ---*/
  3942. #define DIVIRTUAL_SPORTS_SOCCER_OFFENSE         0x1E000000
  3943. #define DIAXIS_SOCCERO_LATERAL                  0x1E008201 /* Move / Aim: left / right */
  3944. #define DIAXIS_SOCCERO_MOVE                     0x1E010202 /* Move / Aim: up / down */
  3945. #define DIAXIS_SOCCERO_BEND                     0x1E018203 /* Bend to soccer shot/pass */
  3946. #define DIBUTTON_SOCCERO_SHOOT                  0x1E000401 /* Shoot the ball */
  3947. #define DIBUTTON_SOCCERO_PASS                   0x1E000402 /* Pass  */
  3948. #define DIBUTTON_SOCCERO_FAKE                   0x1E000403 /* Fake */
  3949. #define DIBUTTON_SOCCERO_PLAYER                 0x1E000404 /* Select next player */
  3950. #define DIBUTTON_SOCCERO_SPECIAL1               0x1E000405 /* Apply special move */
  3951. #define DIBUTTON_SOCCERO_SELECT                 0x1E000406 /* Select special move */
  3952. #define DIBUTTON_SOCCERO_MENU                   0x1E0004FD /* Show menu options */
  3953. /*--- Priority 2 controls                            ---*/
  3954.  
  3955. #define DIHATSWITCH_SOCCERO_GLANCE              0x1E004601 /* scroll view */
  3956. #define DIBUTTON_SOCCERO_SUBSTITUTE             0x1E004407 /* Substitute one player for another */
  3957. #define DIBUTTON_SOCCERO_SHOOTLOW               0x1E004408 /* Shoot the ball low */
  3958. #define DIBUTTON_SOCCERO_SHOOTHIGH              0x1E004409 /* Shoot the ball high */
  3959. #define DIBUTTON_SOCCERO_PASSTHRU               0x1E00440A /* Make a thru pass */
  3960. #define DIBUTTON_SOCCERO_SPRINT                 0x1E00440B /* Sprint / turbo boost */
  3961. #define DIBUTTON_SOCCERO_CONTROL                0x1E00440C /* Obtain control of the ball */
  3962. #define DIBUTTON_SOCCERO_HEAD                   0x1E00440D /* Attempt to head the ball */
  3963. #define DIBUTTON_SOCCERO_LEFT_LINK              0x1E00C4E4 /* Fallback sidestep left button */
  3964. #define DIBUTTON_SOCCERO_RIGHT_LINK             0x1E00C4EC /* Fallback sidestep right button */
  3965. #define DIBUTTON_SOCCERO_FORWARD_LINK           0x1E0144E0 /* Fallback move forward button */
  3966. #define DIBUTTON_SOCCERO_BACK_LINK              0x1E0144E8 /* Fallback move back button */
  3967. #define DIBUTTON_SOCCERO_DEVICE                 0x1E0044FE /* Show input device and controls */
  3968. #define DIBUTTON_SOCCERO_PAUSE                  0x1E0044FC /* Start / Pause / Restart game */
  3969.  
  3970. /*--- Sports - Soccer - Defense
  3971.       Defense       ---*/
  3972. #define DIVIRTUAL_SPORTS_SOCCER_DEFENSE         0x1F000000
  3973. #define DIAXIS_SOCCERD_LATERAL                  0x1F008201 /* Move / Aim: left / right */
  3974. #define DIAXIS_SOCCERD_MOVE                     0x1F010202 /* Move / Aim: up / down */
  3975. #define DIBUTTON_SOCCERD_BLOCK                  0x1F000401 /* Attempt to block shot */
  3976. #define DIBUTTON_SOCCERD_STEAL                  0x1F000402 /* Attempt to steal ball */
  3977. #define DIBUTTON_SOCCERD_FAKE                   0x1F000403 /* Fake a block or a steal */
  3978. #define DIBUTTON_SOCCERD_PLAYER                 0x1F000404 /* Select next player */
  3979. #define DIBUTTON_SOCCERD_SPECIAL                0x1F000405 /* Apply special move */
  3980. #define DIBUTTON_SOCCERD_SELECT                 0x1F000406 /* Select special move */
  3981. #define DIBUTTON_SOCCERD_SLIDE                  0x1F000407 /* Attempt a slide tackle */
  3982. #define DIBUTTON_SOCCERD_MENU                   0x1F0004FD /* Show menu options */
  3983. /*--- Priority 2 controls                            ---*/
  3984.  
  3985. #define DIHATSWITCH_SOCCERD_GLANCE              0x1F004601 /* scroll view */
  3986. #define DIBUTTON_SOCCERD_FOUL                   0x1F004408 /* Initiate a foul / hard-foul */
  3987. #define DIBUTTON_SOCCERD_HEAD                   0x1F004409 /* Attempt a Header */
  3988. #define DIBUTTON_SOCCERD_CLEAR                  0x1F00440A /* Attempt to clear the ball down the field */
  3989. #define DIBUTTON_SOCCERD_GOALIECHARGE           0x1F00440B /* Make the goalie charge out of the box */
  3990. #define DIBUTTON_SOCCERD_SUBSTITUTE             0x1F00440C /* Substitute one player for another */
  3991. #define DIBUTTON_SOCCERD_LEFT_LINK              0x1F00C4E4 /* Fallback sidestep left button */
  3992. #define DIBUTTON_SOCCERD_RIGHT_LINK             0x1F00C4EC /* Fallback sidestep right button */
  3993. #define DIBUTTON_SOCCERD_FORWARD_LINK           0x1F0144E0 /* Fallback move forward button */
  3994. #define DIBUTTON_SOCCERD_BACK_LINK              0x1F0144E8 /* Fallback move back button */
  3995. #define DIBUTTON_SOCCERD_DEVICE                 0x1F0044FE /* Show input device and controls */
  3996. #define DIBUTTON_SOCCERD_PAUSE                  0x1F0044FC /* Start / Pause / Restart game */
  3997.  
  3998. /*--- Sports - Racquet
  3999.       Tennis - Table-Tennis - Squash   ---*/
  4000. #define DIVIRTUAL_SPORTS_RACQUET                0x20000000
  4001. #define DIAXIS_RACQUET_LATERAL                  0x20008201 /* Move / Aim: left / right */
  4002. #define DIAXIS_RACQUET_MOVE                     0x20010202 /* Move / Aim: up / down */
  4003. #define DIBUTTON_RACQUET_SWING                  0x20000401 /* Swing racquet */
  4004. #define DIBUTTON_RACQUET_BACKSWING              0x20000402 /* Swing backhand */
  4005. #define DIBUTTON_RACQUET_SMASH                  0x20000403 /* Smash shot */
  4006. #define DIBUTTON_RACQUET_SPECIAL                0x20000404 /* Special shot */
  4007. #define DIBUTTON_RACQUET_SELECT                 0x20000405 /* Select special shot */
  4008. #define DIBUTTON_RACQUET_MENU                   0x200004FD /* Show menu options */
  4009. /*--- Priority 2 controls                            ---*/
  4010.  
  4011. #define DIHATSWITCH_RACQUET_GLANCE              0x20004601 /* scroll view */
  4012. #define DIBUTTON_RACQUET_TIMEOUT                0x20004406 /* Call for time out */
  4013. #define DIBUTTON_RACQUET_SUBSTITUTE             0x20004407 /* Substitute one player for another */
  4014. #define DIBUTTON_RACQUET_LEFT_LINK              0x2000C4E4 /* Fallback sidestep left button */
  4015. #define DIBUTTON_RACQUET_RIGHT_LINK             0x2000C4EC /* Fallback sidestep right button */
  4016. #define DIBUTTON_RACQUET_FORWARD_LINK           0x200144E0 /* Fallback move forward button */
  4017. #define DIBUTTON_RACQUET_BACK_LINK              0x200144E8 /* Fallback move back button */
  4018. #define DIBUTTON_RACQUET_DEVICE                 0x200044FE /* Show input device and controls */
  4019. #define DIBUTTON_RACQUET_PAUSE                  0x200044FC /* Start / Pause / Restart game */
  4020.  
  4021. /*--- Arcade- 2D
  4022.       Side to Side movement        ---*/
  4023. #define DIVIRTUAL_ARCADE_SIDE2SIDE              0x21000000
  4024. #define DIAXIS_ARCADES_LATERAL                  0x21008201 /* left / right */
  4025. #define DIAXIS_ARCADES_MOVE                     0x21010202 /* up / down */
  4026. #define DIBUTTON_ARCADES_THROW                  0x21000401 /* throw object */
  4027. #define DIBUTTON_ARCADES_CARRY                  0x21000402 /* carry object */
  4028. #define DIBUTTON_ARCADES_ATTACK                 0x21000403 /* attack */
  4029. #define DIBUTTON_ARCADES_SPECIAL                0x21000404 /* apply special move */
  4030. #define DIBUTTON_ARCADES_SELECT                 0x21000405 /* select special move */
  4031. #define DIBUTTON_ARCADES_MENU                   0x210004FD /* Show menu options */
  4032. /*--- Priority 2 controls                            ---*/
  4033.  
  4034. #define DIHATSWITCH_ARCADES_VIEW                0x21004601 /* scroll view left / right / up / down */
  4035. #define DIBUTTON_ARCADES_LEFT_LINK              0x2100C4E4 /* Fallback sidestep left button */
  4036. #define DIBUTTON_ARCADES_RIGHT_LINK             0x2100C4EC /* Fallback sidestep right button */
  4037. #define DIBUTTON_ARCADES_FORWARD_LINK           0x210144E0 /* Fallback move forward button */
  4038. #define DIBUTTON_ARCADES_BACK_LINK              0x210144E8 /* Fallback move back button */
  4039. #define DIBUTTON_ARCADES_VIEW_UP_LINK           0x2107C4E0 /* Fallback scroll view up button */
  4040. #define DIBUTTON_ARCADES_VIEW_DOWN_LINK         0x2107C4E8 /* Fallback scroll view down button */
  4041. #define DIBUTTON_ARCADES_VIEW_LEFT_LINK         0x2107C4E4 /* Fallback scroll view left button */
  4042. #define DIBUTTON_ARCADES_VIEW_RIGHT_LINK        0x2107C4EC /* Fallback scroll view right button */
  4043. #define DIBUTTON_ARCADES_DEVICE                 0x210044FE /* Show input device and controls */
  4044. #define DIBUTTON_ARCADES_PAUSE                  0x210044FC /* Start / Pause / Restart game */
  4045.  
  4046. /*--- Arcade - Platform Game
  4047.       Character moves around on screen  ---*/
  4048. #define DIVIRTUAL_ARCADE_PLATFORM               0x22000000
  4049. #define DIAXIS_ARCADEP_LATERAL                  0x22008201 /* Left / right */
  4050. #define DIAXIS_ARCADEP_MOVE                     0x22010202 /* Up / down */
  4051. #define DIBUTTON_ARCADEP_JUMP                   0x22000401 /* Jump */
  4052. #define DIBUTTON_ARCADEP_FIRE                   0x22000402 /* Fire */
  4053. #define DIBUTTON_ARCADEP_CROUCH                 0x22000403 /* Crouch */
  4054. #define DIBUTTON_ARCADEP_SPECIAL                0x22000404 /* Apply special move */
  4055. #define DIBUTTON_ARCADEP_SELECT                 0x22000405 /* Select special move */
  4056. #define DIBUTTON_ARCADEP_MENU                   0x220004FD /* Show menu options */
  4057. /*--- Priority 2 controls                            ---*/
  4058.  
  4059. #define DIHATSWITCH_ARCADEP_VIEW                0x22004601 /* Scroll view */
  4060. #define DIBUTTON_ARCADEP_FIRESECONDARY          0x22004406 /* Alternative fire button */
  4061. #define DIBUTTON_ARCADEP_LEFT_LINK              0x2200C4E4 /* Fallback sidestep left button */
  4062. #define DIBUTTON_ARCADEP_RIGHT_LINK             0x2200C4EC /* Fallback sidestep right button */
  4063. #define DIBUTTON_ARCADEP_FORWARD_LINK           0x220144E0 /* Fallback move forward button */
  4064. #define DIBUTTON_ARCADEP_BACK_LINK              0x220144E8 /* Fallback move back button */
  4065. #define DIBUTTON_ARCADEP_VIEW_UP_LINK           0x2207C4E0 /* Fallback scroll view up button */
  4066. #define DIBUTTON_ARCADEP_VIEW_DOWN_LINK         0x2207C4E8 /* Fallback scroll view down button */
  4067. #define DIBUTTON_ARCADEP_VIEW_LEFT_LINK         0x2207C4E4 /* Fallback scroll view left button */
  4068. #define DIBUTTON_ARCADEP_VIEW_RIGHT_LINK        0x2207C4EC /* Fallback scroll view right button */
  4069. #define DIBUTTON_ARCADEP_DEVICE                 0x220044FE /* Show input device and controls */
  4070. #define DIBUTTON_ARCADEP_PAUSE                  0x220044FC /* Start / Pause / Restart game */
  4071.  
  4072. /*--- CAD - 2D Object Control
  4073.       Controls to select and move objects in 2D  ---*/
  4074. #define DIVIRTUAL_CAD_2DCONTROL                 0x23000000
  4075. #define DIAXIS_2DCONTROL_LATERAL                0x23008201 /* Move view left / right */
  4076. #define DIAXIS_2DCONTROL_MOVE                   0x23010202 /* Move view up / down */
  4077. #define DIAXIS_2DCONTROL_INOUT                  0x23018203 /* Zoom - in / out */
  4078. #define DIBUTTON_2DCONTROL_SELECT               0x23000401 /* Select Object */
  4079. #define DIBUTTON_2DCONTROL_SPECIAL1             0x23000402 /* Do first special operation */
  4080. #define DIBUTTON_2DCONTROL_SPECIAL              0x23000403 /* Select special operation */
  4081. #define DIBUTTON_2DCONTROL_SPECIAL2             0x23000404 /* Do second special operation */
  4082. #define DIBUTTON_2DCONTROL_MENU                 0x230004FD /* Show menu options */
  4083. /*--- Priority 2 controls                            ---*/
  4084.  
  4085. #define DIHATSWITCH_2DCONTROL_HATSWITCH         0x23004601 /* Hat switch */
  4086. #define DIAXIS_2DCONTROL_ROTATEZ                0x23024204 /* Rotate view clockwise / counterclockwise */
  4087. #define DIBUTTON_2DCONTROL_DISPLAY              0x23004405 /* Shows next on-screen display options */
  4088. #define DIBUTTON_2DCONTROL_DEVICE               0x230044FE /* Show input device and controls */
  4089. #define DIBUTTON_2DCONTROL_PAUSE                0x230044FC /* Start / Pause / Restart game */
  4090.  
  4091. /*--- CAD - 3D object control
  4092.       Controls to select and move objects within a 3D environment  ---*/
  4093. #define DIVIRTUAL_CAD_3DCONTROL                 0x24000000
  4094. #define DIAXIS_3DCONTROL_LATERAL                0x24008201 /* Move view left / right */
  4095. #define DIAXIS_3DCONTROL_MOVE                   0x24010202 /* Move view up / down */
  4096. #define DIAXIS_3DCONTROL_INOUT                  0x24018203 /* Zoom - in / out */
  4097. #define DIBUTTON_3DCONTROL_SELECT               0x24000401 /* Select Object */
  4098. #define DIBUTTON_3DCONTROL_SPECIAL1             0x24000402 /* Do first special operation */
  4099. #define DIBUTTON_3DCONTROL_SPECIAL              0x24000403 /* Select special operation */
  4100. #define DIBUTTON_3DCONTROL_SPECIAL2             0x24000404 /* Do second special operation */
  4101. #define DIBUTTON_3DCONTROL_MENU                 0x240004FD /* Show menu options */
  4102. /*--- Priority 2 controls                            ---*/
  4103.  
  4104. #define DIHATSWITCH_3DCONTROL_HATSWITCH         0x24004601 /* Hat switch */
  4105. #define DIAXIS_3DCONTROL_ROTATEX                0x24034204 /* Rotate view forward or up / backward or down */
  4106. #define DIAXIS_3DCONTROL_ROTATEY                0x2402C205 /* Rotate view clockwise / counterclockwise */
  4107. #define DIAXIS_3DCONTROL_ROTATEZ                0x24024206 /* Rotate view left / right */
  4108. #define DIBUTTON_3DCONTROL_DISPLAY              0x24004405 /* Show next on-screen display options */
  4109. #define DIBUTTON_3DCONTROL_DEVICE               0x240044FE /* Show input device and controls */
  4110. #define DIBUTTON_3DCONTROL_PAUSE                0x240044FC /* Start / Pause / Restart game */
  4111.  
  4112. /*--- CAD - 3D Navigation - Fly through
  4113.       Controls for 3D modeling  ---*/
  4114. #define DIVIRTUAL_CAD_FLYBY                     0x25000000
  4115. #define DIAXIS_CADF_LATERAL                     0x25008201 /* move view left / right */
  4116. #define DIAXIS_CADF_MOVE                        0x25010202 /* move view up / down */
  4117. #define DIAXIS_CADF_INOUT                       0x25018203 /* in / out */
  4118. #define DIBUTTON_CADF_SELECT                    0x25000401 /* Select Object */
  4119. #define DIBUTTON_CADF_SPECIAL1                  0x25000402 /* do first special operation */
  4120. #define DIBUTTON_CADF_SPECIAL                   0x25000403 /* Select special operation */
  4121. #define DIBUTTON_CADF_SPECIAL2                  0x25000404 /* do second special operation */
  4122. #define DIBUTTON_CADF_MENU                      0x250004FD /* Show menu options */
  4123. /*--- Priority 2 controls                            ---*/
  4124.  
  4125. #define DIHATSWITCH_CADF_HATSWITCH              0x25004601 /* Hat switch */
  4126. #define DIAXIS_CADF_ROTATEX                     0x25034204 /* Rotate view forward or up / backward or down */
  4127. #define DIAXIS_CADF_ROTATEY                     0x2502C205 /* Rotate view clockwise / counterclockwise */
  4128. #define DIAXIS_CADF_ROTATEZ                     0x25024206 /* Rotate view left / right */
  4129. #define DIBUTTON_CADF_DISPLAY                   0x25004405 /* shows next on-screen display options */
  4130. #define DIBUTTON_CADF_DEVICE                    0x250044FE /* Show input device and controls */
  4131. #define DIBUTTON_CADF_PAUSE                     0x250044FC /* Start / Pause / Restart game */
  4132.  
  4133. /*--- CAD - 3D Model Control
  4134.       Controls for 3D modeling  ---*/
  4135. #define DIVIRTUAL_CAD_MODEL                     0x26000000
  4136. #define DIAXIS_CADM_LATERAL                     0x26008201 /* move view left / right */
  4137. #define DIAXIS_CADM_MOVE                        0x26010202 /* move view up / down */
  4138. #define DIAXIS_CADM_INOUT                       0x26018203 /* in / out */
  4139. #define DIBUTTON_CADM_SELECT                    0x26000401 /* Select Object */
  4140. #define DIBUTTON_CADM_SPECIAL1                  0x26000402 /* do first special operation */
  4141. #define DIBUTTON_CADM_SPECIAL                   0x26000403 /* Select special operation */
  4142. #define DIBUTTON_CADM_SPECIAL2                  0x26000404 /* do second special operation */
  4143. #define DIBUTTON_CADM_MENU                      0x260004FD /* Show menu options */
  4144. /*--- Priority 2 controls                            ---*/
  4145.  
  4146. #define DIHATSWITCH_CADM_HATSWITCH              0x26004601 /* Hat switch */
  4147. #define DIAXIS_CADM_ROTATEX                     0x26034204 /* Rotate view forward or up / backward or down */
  4148. #define DIAXIS_CADM_ROTATEY                     0x2602C205 /* Rotate view clockwise / counterclockwise */
  4149. #define DIAXIS_CADM_ROTATEZ                     0x26024206 /* Rotate view left / right */
  4150. #define DIBUTTON_CADM_DISPLAY                   0x26004405 /* shows next on-screen display options */
  4151. #define DIBUTTON_CADM_DEVICE                    0x260044FE /* Show input device and controls */
  4152. #define DIBUTTON_CADM_PAUSE                     0x260044FC /* Start / Pause / Restart game */
  4153.  
  4154. /*--- Control - Media Equipment
  4155.       Remote        ---*/
  4156. #define DIVIRTUAL_REMOTE_CONTROL                0x27000000
  4157. #define DIAXIS_REMOTE_SLIDER                    0x27050201 /* Slider for adjustment: volume / color / bass / etc */
  4158. #define DIBUTTON_REMOTE_MUTE                    0x27000401 /* Set volume on current device to zero */
  4159. #define DIBUTTON_REMOTE_SELECT                  0x27000402 /* Next/previous: channel/ track / chapter / picture / station */
  4160. #define DIBUTTON_REMOTE_PLAY                    0x27002403 /* Start or pause entertainment on current device */
  4161. #define DIBUTTON_REMOTE_CUE                     0x27002404 /* Move through current media */
  4162. #define DIBUTTON_REMOTE_REVIEW                  0x27002405 /* Move through current media */
  4163. #define DIBUTTON_REMOTE_CHANGE                  0x27002406 /* Select next device */
  4164. #define DIBUTTON_REMOTE_RECORD                  0x27002407 /* Start recording the current media */
  4165. #define DIBUTTON_REMOTE_MENU                    0x270004FD /* Show menu options */
  4166. /*--- Priority 2 controls                            ---*/
  4167.  
  4168. #define DIAXIS_REMOTE_SLIDER2                   0x27054202 /* Slider for adjustment: volume */
  4169. #define DIBUTTON_REMOTE_TV                      0x27005C08 /* Select TV */
  4170. #define DIBUTTON_REMOTE_CABLE                   0x27005C09 /* Select cable box */
  4171. #define DIBUTTON_REMOTE_CD                      0x27005C0A /* Select CD player */
  4172. #define DIBUTTON_REMOTE_VCR                     0x27005C0B /* Select VCR */
  4173. #define DIBUTTON_REMOTE_TUNER                   0x27005C0C /* Select tuner */
  4174. #define DIBUTTON_REMOTE_DVD                     0x27005C0D /* Select DVD player */
  4175. #define DIBUTTON_REMOTE_ADJUST                  0x27005C0E /* Enter device adjustment menu */
  4176. #define DIBUTTON_REMOTE_DIGIT0                  0x2700540F /* Digit 0 */
  4177. #define DIBUTTON_REMOTE_DIGIT1                  0x27005410 /* Digit 1 */
  4178. #define DIBUTTON_REMOTE_DIGIT2                  0x27005411 /* Digit 2 */
  4179. #define DIBUTTON_REMOTE_DIGIT3                  0x27005412 /* Digit 3 */
  4180. #define DIBUTTON_REMOTE_DIGIT4                  0x27005413 /* Digit 4 */
  4181. #define DIBUTTON_REMOTE_DIGIT5                  0x27005414 /* Digit 5 */
  4182. #define DIBUTTON_REMOTE_DIGIT6                  0x27005415 /* Digit 6 */
  4183. #define DIBUTTON_REMOTE_DIGIT7                  0x27005416 /* Digit 7 */
  4184. #define DIBUTTON_REMOTE_DIGIT8                  0x27005417 /* Digit 8 */
  4185. #define DIBUTTON_REMOTE_DIGIT9                  0x27005418 /* Digit 9 */
  4186. #define DIBUTTON_REMOTE_DEVICE                  0x270044FE /* Show input device and controls */
  4187. #define DIBUTTON_REMOTE_PAUSE                   0x270044FC /* Start / Pause / Restart game */
  4188.  
  4189. /*--- Control- Web
  4190.       Help or Browser            ---*/
  4191. #define DIVIRTUAL_BROWSER_CONTROL               0x28000000
  4192. #define DIAXIS_BROWSER_LATERAL                  0x28008201 /* Move on screen pointer */
  4193. #define DIAXIS_BROWSER_MOVE                     0x28010202 /* Move on screen pointer */
  4194. #define DIBUTTON_BROWSER_SELECT                 0x28000401 /* Select current item */
  4195. #define DIAXIS_BROWSER_VIEW                     0x28018203 /* Move view up/down */
  4196. #define DIBUTTON_BROWSER_REFRESH                0x28000402 /* Refresh */
  4197. #define DIBUTTON_BROWSER_MENU                   0x280004FD /* Show menu options */
  4198. /*--- Priority 2 controls                            ---*/
  4199.  
  4200. #define DIBUTTON_BROWSER_SEARCH                 0x28004403 /* Use search tool */
  4201. #define DIBUTTON_BROWSER_STOP                   0x28004404 /* Cease current update */
  4202. #define DIBUTTON_BROWSER_HOME                   0x28004405 /* Go directly to "home" location */
  4203. #define DIBUTTON_BROWSER_FAVORITES              0x28004406 /* Mark current site as favorite */
  4204. #define DIBUTTON_BROWSER_NEXT                   0x28004407 /* Select Next page */
  4205. #define DIBUTTON_BROWSER_PREVIOUS               0x28004408 /* Select Previous page */
  4206. #define DIBUTTON_BROWSER_HISTORY                0x28004409 /* Show/Hide History */
  4207. #define DIBUTTON_BROWSER_PRINT                  0x2800440A /* Print current page */
  4208. #define DIBUTTON_BROWSER_DEVICE                 0x280044FE /* Show input device and controls */
  4209. #define DIBUTTON_BROWSER_PAUSE                  0x280044FC /* Start / Pause / Restart game */
  4210.  
  4211. /*--- Driving Simulator - Giant Walking Robot
  4212.       Walking tank with weapons  ---*/
  4213. #define DIVIRTUAL_DRIVING_MECHA                 0x29000000
  4214. #define DIAXIS_MECHA_STEER                      0x29008201 /* Turns mecha left/right */
  4215. #define DIAXIS_MECHA_TORSO                      0x29010202 /* Tilts torso forward/backward */
  4216. #define DIAXIS_MECHA_ROTATE                     0x29020203 /* Turns torso left/right */
  4217. #define DIAXIS_MECHA_THROTTLE                   0x29038204 /* Engine Speed */
  4218. #define DIBUTTON_MECHA_FIRE                     0x29000401 /* Fire */
  4219. #define DIBUTTON_MECHA_WEAPONS                  0x29000402 /* Select next weapon group */
  4220. #define DIBUTTON_MECHA_TARGET                   0x29000403 /* Select closest enemy available target */
  4221. #define DIBUTTON_MECHA_REVERSE                  0x29000404 /* Toggles throttle in/out of reverse */
  4222. #define DIBUTTON_MECHA_ZOOM                     0x29000405 /* Zoom in/out targeting reticule */
  4223. #define DIBUTTON_MECHA_JUMP                     0x29000406 /* Fires jump jets */
  4224. #define DIBUTTON_MECHA_MENU                     0x290004FD /* Show menu options */
  4225. /*--- Priority 2 controls                            ---*/
  4226.  
  4227. #define DIBUTTON_MECHA_CENTER                   0x29004407 /* Center torso to legs */
  4228. #define DIHATSWITCH_MECHA_GLANCE                0x29004601 /* Look around */
  4229. #define DIBUTTON_MECHA_VIEW                     0x29004408 /* Cycle through view options */
  4230. #define DIBUTTON_MECHA_FIRESECONDARY            0x29004409 /* Alternative fire button */
  4231. #define DIBUTTON_MECHA_LEFT_LINK                0x2900C4E4 /* Fallback steer left button */
  4232. #define DIBUTTON_MECHA_RIGHT_LINK               0x2900C4EC /* Fallback steer right button */
  4233. #define DIBUTTON_MECHA_FORWARD_LINK             0x290144E0 /* Fallback tilt torso forward button */
  4234. #define DIBUTTON_MECHA_BACK_LINK                0x290144E8 /* Fallback tilt toroso backward button */
  4235. #define DIBUTTON_MECHA_ROTATE_LEFT_LINK         0x290244E4 /* Fallback rotate toroso right button */
  4236. #define DIBUTTON_MECHA_ROTATE_RIGHT_LINK        0x290244EC /* Fallback rotate torso left button */
  4237. #define DIBUTTON_MECHA_FASTER_LINK              0x2903C4E0 /* Fallback increase engine speed */
  4238. #define DIBUTTON_MECHA_SLOWER_LINK              0x2903C4E8 /* Fallback decrease engine speed */
  4239. #define DIBUTTON_MECHA_DEVICE                   0x290044FE /* Show input device and controls */
  4240. #define DIBUTTON_MECHA_PAUSE                    0x290044FC /* Start / Pause / Restart game */
  4241.  
  4242. /*
  4243.  *  "ANY" semantics can be used as a last resort to get mappings for actions
  4244.  *  that match nothing in the chosen virtual genre.  These semantics will be
  4245.  *  mapped at a lower priority that virtual genre semantics.  Also, hardware
  4246.  *  vendors will not be able to provide sensible mappings for these unless
  4247.  *  they provide application specific mappings.
  4248.  */
  4249. #define DIAXIS_ANY_X_1                          0xFF00C201
  4250. #define DIAXIS_ANY_X_2                          0xFF00C202
  4251. #define DIAXIS_ANY_Y_1                          0xFF014201
  4252. #define DIAXIS_ANY_Y_2                          0xFF014202
  4253. #define DIAXIS_ANY_Z_1                          0xFF01C201
  4254. #define DIAXIS_ANY_Z_2                          0xFF01C202
  4255. #define DIAXIS_ANY_R_1                          0xFF024201
  4256. #define DIAXIS_ANY_R_2                          0xFF024202
  4257. #define DIAXIS_ANY_U_1                          0xFF02C201
  4258. #define DIAXIS_ANY_U_2                          0xFF02C202
  4259. #define DIAXIS_ANY_V_1                          0xFF034201
  4260. #define DIAXIS_ANY_V_2                          0xFF034202
  4261. #define DIAXIS_ANY_A_1                          0xFF03C201
  4262. #define DIAXIS_ANY_A_2                          0xFF03C202
  4263. #define DIAXIS_ANY_B_1                          0xFF044201
  4264. #define DIAXIS_ANY_B_2                          0xFF044202
  4265. #define DIAXIS_ANY_C_1                          0xFF04C201
  4266. #define DIAXIS_ANY_C_2                          0xFF04C202
  4267. #define DIAXIS_ANY_S_1                          0xFF054201
  4268. #define DIAXIS_ANY_S_2                          0xFF054202
  4269.  
  4270. #define DIAXIS_ANY_1                            0xFF004201
  4271. #define DIAXIS_ANY_2                            0xFF004202
  4272. #define DIAXIS_ANY_3                            0xFF004203
  4273. #define DIAXIS_ANY_4                            0xFF004204
  4274.  
  4275. #define DIPOV_ANY_1                             0xFF004601
  4276. #define DIPOV_ANY_2                             0xFF004602
  4277. #define DIPOV_ANY_3                             0xFF004603
  4278. #define DIPOV_ANY_4                             0xFF004604
  4279.  
  4280. #define DIBUTTON_ANY(instance)                  ( 0xFF004400 | instance )
  4281.  
  4282.  
  4283. #ifdef __cplusplus
  4284. };
  4285. #endif
  4286.  
  4287. #endif  /* __DINPUT_INCLUDED__ */
  4288.  
  4289. /****************************************************************************
  4290.  *
  4291.  *  Definitions for non-IDirectInput (VJoyD) features defined more recently
  4292.  *  than the current sdk files
  4293.  *
  4294.  ****************************************************************************/
  4295.  
  4296. #ifdef _INC_MMSYSTEM
  4297. #ifndef MMNOJOY
  4298.  
  4299. #ifndef __VJOYDX_INCLUDED__
  4300. #define __VJOYDX_INCLUDED__
  4301.  
  4302. #ifdef __cplusplus
  4303. extern "C" {
  4304. #endif
  4305.  
  4306. /*
  4307.  * Flag to indicate that the dwReserved2 field of the JOYINFOEX structure
  4308.  * contains mini-driver specific data to be passed by VJoyD to the mini-
  4309.  * driver instead of doing a poll.
  4310.  */
  4311. #define JOY_PASSDRIVERDATA          0x10000000l
  4312.  
  4313. /*
  4314.  * Informs the joystick driver that the configuration has been changed
  4315.  * and should be reloaded from the registery.
  4316.  * dwFlags is reserved and should be set to zero
  4317.  */
  4318. WINMMAPI MMRESULT WINAPI joyConfigChanged( DWORD dwFlags );
  4319.  
  4320.  
  4321. /*
  4322.  * Hardware Setting indicating that the device is a headtracker
  4323.  */
  4324. #define JOY_HWS_ISHEADTRACKER       0x02000000l
  4325.  
  4326. /*
  4327.  * Hardware Setting indicating that the VxD is used to replace
  4328.  * the standard analog polling
  4329.  */
  4330. #define JOY_HWS_ISGAMEPORTDRIVER    0x04000000l
  4331.  
  4332. /*
  4333.  * Hardware Setting indicating that the driver needs a standard
  4334.  * gameport in order to communicate with the device.
  4335.  */
  4336. #define JOY_HWS_ISANALOGPORTDRIVER  0x08000000l
  4337.  
  4338. /*
  4339.  * Hardware Setting indicating that VJoyD should not load this
  4340.  * driver, it will be loaded externally and will register with
  4341.  * VJoyD of it's own accord.
  4342.  */
  4343. #define JOY_HWS_AUTOLOAD            0x10000000l
  4344.  
  4345. /*
  4346.  * Hardware Setting indicating that the driver acquires any
  4347.  * resources needed without needing a devnode through VJoyD.
  4348.  */
  4349. #define JOY_HWS_NODEVNODE           0x20000000l
  4350.  
  4351.  
  4352. /*
  4353.  * Hardware Setting indicating that the device is a gameport bus
  4354.  */
  4355. #define JOY_HWS_ISGAMEPORTBUS       0x80000000l
  4356. #define JOY_HWS_GAMEPORTBUSBUSY     0x00000001l
  4357.  
  4358. /*
  4359.  * Usage Setting indicating that the settings are volatile and
  4360.  * should be removed if still present on a reboot.
  4361.  */
  4362. #define JOY_US_VOLATILE             0x00000008L
  4363.  
  4364. #ifdef __cplusplus
  4365. };
  4366. #endif
  4367.  
  4368. #endif  /* __VJOYDX_INCLUDED__ */
  4369.  
  4370. #endif  /* not MMNOJOY */
  4371. #endif  /* _INC_MMSYSTEM */
  4372.  
  4373. /****************************************************************************
  4374.  *
  4375.  *  Definitions for non-IDirectInput (VJoyD) features defined more recently
  4376.  *  than the current ddk files
  4377.  *
  4378.  ****************************************************************************/
  4379.  
  4380. #ifndef DIJ_RINGZERO
  4381.  
  4382. #ifdef _INC_MMDDK
  4383. #ifndef MMNOJOYDEV
  4384.  
  4385. #ifndef __VJOYDXD_INCLUDED__
  4386. #define __VJOYDXD_INCLUDED__
  4387. /*
  4388.  * Poll type in which the do_other field of the JOYOEMPOLLDATA
  4389.  * structure contains mini-driver specific data passed from an app.
  4390.  */
  4391. #define JOY_OEMPOLL_PASSDRIVERDATA  7
  4392.  
  4393. #endif  /* __VJOYDXD_INCLUDED__ */
  4394.  
  4395. #endif  /* not MMNOJOYDEV */
  4396. #endif  /* _INC_MMDDK */
  4397.  
  4398. #endif /* DIJ_RINGZERO */
  4399.  
  4400.