home *** CD-ROM | disk | FTP | other *** search
/ Beginning Direct3D Game Programming / Direct3D.iso / directx / dxf / include / dinput.h < prev    next >
C/C++ Source or Header  |  2000-10-20  |  226KB  |  4,388 lines

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