Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

648 lines
23 KiB

  1. /****************************************************************************
  2. MODULE: DX_MAP.HPP
  3. Tab settings: 5 9
  4. Copyright 1995, 1996, Microsoft Corporation, All Rights Reserved.
  5. PURPOSE: Mapper for converting SWForce FFD_ to DirectInput Force
  6. Author(s): Name:
  7. ---------- ----------------
  8. MEA Manolito E. Adan
  9. Revision History:
  10. -----------------
  11. Version Date Author Comments
  12. 1.0 14-Feb-97 MEA original
  13. ****************************************************************************/
  14. #ifndef _DX_MAP_SEEN
  15. #define _DX_MAP_SEEN
  16. #include <windows.h>
  17. #include "dinput.h"
  18. #include "dinputd.h"
  19. // Diagnostics Counters
  20. typedef struct _DIAG_COUNTER
  21. {
  22. ULONG m_NACKCounter; // For Debugging, how many NACKS
  23. ULONG m_LongMsgCounter; // How many SysEx messages
  24. ULONG m_ShortMsgCounter; // How many 3 byte Short messages
  25. ULONG m_RetryCounter; // Number of retries
  26. } DIAG_COUNTER, *PDIAG_COUNTER;
  27. //
  28. // --- Mapping from DX to SWForce FFD
  29. //
  30. typedef struct IDirectInputEffect *PSWEFFECT;
  31. typedef struct IDirectInputEffect **PPSWEFFECT;
  32. #define SW_NUMBER_OF_BUTTONS 9
  33. #define DNHANDLE USHORT // Download Effect Handle type
  34. #define PDNHANDLE DNHANDLE * // Pointer
  35. #define MIN_ANGLE 0
  36. #define MAX_ANGLE 36000
  37. #define MIN_FORCEOUTPUTRATE 1
  38. #define MIN_GAIN 1
  39. #define MAX_GAIN 10000
  40. #define MAX_FORCE 10000
  41. #define MIN_FORCE -10000
  42. #define MIN_TIME_PERIOD 1
  43. #define MAX_TIME_PERIOD 4294967296L // 4096 * 10^^6 usecs
  44. #define MAX_POSITION 10000
  45. #define MIN_POSITION -10000
  46. #define MAX_CONSTANT 10000
  47. #define MIN_CONSTANT -10000
  48. #define SCALE_GAIN 100 // DX is +/- 10000, SWForce in +/-100
  49. #define SCALE_TIME 1000 // DX is in microseconds, SWForce in msec
  50. #define SCALE_POSITION 100 // DX is +/- 10000, SWForce in +/- 100+
  51. #define SCALE_CONSTANTS 100 // DX is +/- 10000, SWForce in +/- 100+
  52. #define SCALE_DIRECTION 100 // DX is 0 to 35900, SWForce is 0 to 359
  53. //
  54. // --- Default Values
  55. //
  56. #define DEFAULT_OFFSET 0
  57. #define DEFAULT_ATTACK_LEVEL 0
  58. #define DEFAULT_ATTACK_TIME 0
  59. #define DEFAULT_SUSTAIN_LEVEL 10000
  60. #define DEFAULT_FADE_LEVEL 0
  61. #define DEFAULT_FADE_TIME 0
  62. // PlaybackEffect Command Modes
  63. #define PLAY_SUPERIMPOSE 0x01
  64. #define PLAY_SOLO 0x02
  65. #define PLAY_STORE 0x04 // Store only
  66. #define PLAY_UPDATE 0x08
  67. //reserved 0x10
  68. #define PLAY_LOOP 0x20
  69. #define PLAY_FOREVER 0x40
  70. #define PLAY_STOP 0x80
  71. #define PLAY_MODE_MASK 0xff
  72. #define DEV_SHUTDOWN DEV_RESET
  73. //
  74. // --- Effect Status
  75. //
  76. #define ES_HOST 0x00000001L // Effect is in HOST memory
  77. #define ES_DOWNLOADED 0x00000002L // Effect is downloaded
  78. #define ES_STOPPED 0x00000004L // Effect is stopped
  79. #define ES_PLAYING 0x00000008L // Effect is playing
  80. //
  81. // --- Axis Masks
  82. //
  83. #define X_AXIS 0x01
  84. #define Y_AXIS 0x02
  85. #define Z_AXIS 0x04
  86. #define ROT_X_AXIS 0x08
  87. #define ROT_Y_AXIS 0x10
  88. #define ROT_Z_AXIS 0x20
  89. //
  90. // --- Button Masks
  91. //
  92. #define BUTTON1_PLAY 0x00000001L // Trigger button (usually)
  93. #define BUTTON2_PLAY 0x00000002L
  94. #define BUTTON3_PLAY 0x00000004L
  95. #define BUTTON4_PLAY 0x00000008L
  96. #define BUTTON5_PLAY 0x00000010L
  97. #define BUTTON6_PLAY 0x00000020L
  98. #define BUTTON7_PLAY 0x00000040L
  99. #define BUTTON8_PLAY 0x00000080L
  100. #define BUTTON9_PLAY 0x00000100L
  101. #define BUTTON10_PLAY 0x00000200L
  102. #define BUTTON11_PLAY 0x00000400L
  103. #define BUTTON12_PLAY 0x00000800L
  104. #define BUTTON13_PLAY 0x00001000L
  105. #define BUTTON14_PLAY 0x00002000L
  106. #define BUTTON15_PLAY 0x00004000L
  107. #define BUTTON16_PLAY 0x00008000L // . . . 16th button
  108. //
  109. // --- Force Feedback Device State
  110. //
  111. typedef struct _SWDEVICESTATE {
  112. ULONG m_Bytes; // size of this structure
  113. ULONG m_ForceState; // DS_FORCE_ON || DS_FORCE_OFF || DS_SHUTDOWN
  114. ULONG m_EffectState; // DS_STOP_ALL || DS_CONTINUE || DS_PAUSE
  115. ULONG m_HOTS; // Hands On Throttle and Stick Status
  116. // 0 = Hands Off, 1 = Hands On
  117. ULONG m_BandWidth; // Percentage of CPU available 1 to 100%
  118. // Lower number indicates CPU is in trouble!
  119. ULONG m_ACBrickFault; // 0 = AC Brick OK, 1 = AC Brick Fault
  120. ULONG m_ResetDetect; // 1 = HW Reset Detected
  121. ULONG m_ShutdownDetect; // 1 = Shutdown detected
  122. ULONG m_CommMode; // 0 = Midi, 1-4 = Serial
  123. } SWDEVICESTATE, *PSWDEVICESTATE;
  124. #define MAX_SIZE_SNAME 64
  125. //
  126. //
  127. // --- Force Feedback Device Capabilities
  128. //
  129. typedef struct _FFDEVICEINFO {
  130. ULONG m_Bytes; // Size of this structure
  131. TCHAR m_ProductName[MAX_SIZE_SNAME]; // Device Name 64 chars
  132. TCHAR m_ManufacturerName[MAX_SIZE_SNAME]; // Manufacturer
  133. ULONG m_ProductVersion; // Device Product Version
  134. // HIWORD: MajorVersion,,MinorVersion
  135. // LOWORD: Build#
  136. ULONG m_DeviceDriverVersion; // Device Driver version
  137. // HIWORD: MajorVersion,,MinorVersion
  138. // LOWORD: Build#
  139. ULONG m_DeviceFirmwareVersion; // Device Driver version
  140. // HIWORD: MajorVersion,,MinorVersion
  141. // LOWORD: Build#
  142. ULONG m_Interface; // HIWORD: OUTPUT:HID_INTERFACE||VJOYD_INTERFACE
  143. // LOWORD: INPUT: HID_INTERFACE||VJOYD_INTERFACE
  144. ULONG m_MaxSampleRate; // Maximum Force output rate
  145. ULONG m_MaxMemory; // Max amount of RAM
  146. ULONG m_NumberOfSensors; // SENSOR_AXIS total in the device (INPUT)
  147. ULONG m_NumberOfAxes; // ACTUATOR_AXIS total in the device (OUTPUT)
  148. ULONG m_EffectsCaps; // Built-in Effects capability
  149. ULONG m_Reserved; //
  150. ULONG m_JoystickID; // VJOYD Joystick ID (0-based)
  151. ULONG m_ExtraInfo; // For future stuff
  152. } FFDEVICEINFO, *PFFDEVICEINFO;
  153. //
  154. // --- AXISCAPS Sensor or Actuator Axes capabilities
  155. //
  156. typedef struct _AXISCAPS {
  157. ULONG m_Bytes; // Size of this structure
  158. ULONG m_AxisMask; // Bit position for Actuator or Sensor Axes
  159. ULONG m_LogicalExtentMin; // Minimum logical extent
  160. ULONG m_LogicalExtentMax; // Maximum logical extent
  161. ULONG m_PhysicalExtentMin;// Minimum physical extent
  162. ULONG m_PhysicalExtentMax;// Maximum Physical extent
  163. ULONG m_Units; // HID style physical SI units
  164. ULONG m_Resolution; // Position increments per physical SI unit
  165. ULONG m_ServoLoopRate; // Loop rate in cycles/sec
  166. } AXISCAPS, *PAXISCAPS;
  167. typedef struct _FORCE {
  168. ULONG m_Bytes; // size of this structure
  169. ULONG m_AxisMask; // Bitmask for the axis
  170. LONG m_DirectionAngle2D; // From X-Axis = theta1
  171. LONG m_DirectionAngle3D; // From Z-Axis = (theta2, note: theta1+theta2)>= 90
  172. LONG m_ForceValue; // Actual force in +/- 100%
  173. } FORCE, *PFORCE;
  174. typedef struct _FORCECONTEXT {
  175. ULONG m_Bytes; // Size of this structure
  176. ULONG m_AxisMask; // Bitmask for the axis
  177. LONG m_Position; // Position along the Axis -32768 to +32767
  178. LONG m_Velocity; // Velocity in -32768 to +32767 units TBD
  179. LONG m_Acceleration; // Acceleration in -32768 to +32767 units TBD
  180. } FORCECONTEXT, *PFORCECONTEXT;
  181. // The following are Type Specific parameters structures
  182. //
  183. //
  184. //
  185. // -- an Effect structure
  186. //
  187. typedef struct _EFFECT {
  188. ULONG m_Bytes; // Size of this structure
  189. TCHAR m_Name[MAX_SIZE_SNAME];
  190. ULONG m_Type; // Major Effect type, e.g. EF_BEHAVIOR, etc..
  191. ULONG m_SubType; // Minor Effect type, e.g. SE_xxx,BE_xxx,UD_xxx
  192. ULONG m_AxisMask; // Bitmask for axis to send the effect,
  193. // If NULL, use value from Device Capabilities
  194. ULONG m_DirectionAngle2D; // From Y-Axis (cone) = theta1
  195. ULONG m_DirectionAngle3D; // From Z-Axis (cone) = theta2
  196. // note: theta1+theta2)>= 90
  197. ULONG m_Duration; // Duration in ms., 00 = infinite
  198. ULONG m_ForceOutputRate; // Sample Rate for Force Data output
  199. ULONG m_Gain; // Gain to apply, normally this is set
  200. // to 100. Gain is 1 to 100.
  201. ULONG m_ButtonPlayMask; // Mask to indicate which button to assign Effect
  202. } EFFECT, *PEFFECT;
  203. //
  204. // --- ENVELOPE
  205. //
  206. // Note: There are two types of Envelope control, using PERCENTAGE,
  207. // and using TIME.
  208. // PERCENTAGE defines Envelope using Percentage for the Attack,Sustain and Decay
  209. //
  210. // TIME Envelope type will require the time in 1 millisecond increment, and
  211. // m_StartAmp is the Amplitude to start the waveform, while m_EndAmp is used
  212. // to decay or end the waveform. m_SustainAmp is used to set Sustain amplitude
  213. //
  214. #define PERCENTAGE 0x00000000 // Envelope is in percentage values
  215. #define TIME 0x00000001 // Envelope is in 1 millisecond time increments
  216. //For PERCENTAGE Envelope, set the following as default:
  217. //m_Type = PERCENTAGE
  218. //
  219. // Note: Baseline is (m_MaxAmp + m_MinAmp)/2
  220. // m_StartAmp = 0
  221. // m_SustainAmp = Effect.m_MaxAmp - baseline -->>> (m_MaxAmp - m_MinAmp)/2
  222. // m_EndAmp = m_StartAmp;
  223. //
  224. //Valid Ranges:
  225. //PERCENTAGE mode:
  226. // m_Attack, m_Sustain, m_Decay = 1 to 100%, and must sum up to 100%
  227. //TIME mode:
  228. // m_Attack = 0 to 32,768 ms,
  229. // m_Sustain = 0 to 32,768 ms
  230. // m_Decay = 0 to 32,768 ms. (All are in 1 ms increments).
  231. //Note: For an infinite duration (value in m_Duration = 0), the Effect will
  232. // never decay and m_Decay is ignored.
  233. //
  234. // Envelopes are only valid for Synthesized Waveforms (SE_XXX) type
  235. //
  236. //
  237. typedef struct _ENVELOPE {
  238. ULONG m_Bytes; // Size of this structure
  239. ULONG m_Type; // PERCENTAGE || TIME
  240. ULONG m_Attack; // Rise time to Sustain Value
  241. // in % of Duration, or in msec Time
  242. ULONG m_Sustain; // Sustain time at Sustain Value in % Duration,
  243. // or in msec Time
  244. ULONG m_Decay; // Decay time to Minimum Value,
  245. // in % of Duration, or in msec Time
  246. ULONG m_StartAmp; // Amplitude to start the Envelope, from baseline
  247. ULONG m_EndAmp; // Amplitude to End the Envelope, from baseline
  248. ULONG m_SustainAmp; // Amplitude to Sustain the Envelope, from baseline
  249. } ENVELOPE, *PENVELOPE;
  250. //
  251. // --- EF_BEHAVIOR = {BE_SPRINGxx||BE_DAMPERxx||BE_INTERTIAxx||BE_FRICTIONxx
  252. // ||BE_WALL||BE_DELAY}
  253. // Note: Behavioral Effects do not have an Envelope.
  254. //
  255. typedef struct _BE_SPRING_PARAM {
  256. ULONG m_Bytes; // Size of this structure
  257. LONG m_Kconstant; // K constant
  258. LONG m_AxisCenter; // Center of the function
  259. } BE_SPRING_PARAM, *PBE_SPRING_PARAM;
  260. typedef struct _BE_SPRING_2D_PARAM {
  261. ULONG m_Bytes; // Size of this structure
  262. LONG m_XKconstant; // X_Axis K constant
  263. LONG m_XAxisCenter; // X_Axis Center
  264. LONG m_YKconstant; // Y_Axis K constant
  265. LONG m_YAxisCenter; // Y_Axis Center
  266. } BE_SPRING_2D_PARAM, *PBE_SPRING_2D_PARAM;
  267. typedef struct _BE_DAMPER_PARAM {
  268. ULONG m_Bytes; // Size of this structure
  269. LONG m_Bconstant; // B constant
  270. LONG m_V0; // Initial Velocity
  271. } BE_DAMPER_PARAM, *PBE_DAMPER_PARAM;
  272. typedef struct _BE_DAMPER_2D_PARAM {
  273. ULONG m_Bytes; // Size of this structure
  274. LONG m_XBconstant; // X_AXIS B constant
  275. LONG m_XV0; // X_AXIS Initial Velocity
  276. LONG m_YBconstant; // Y_Axis B constant
  277. LONG m_YV0; // Y_AXIS Initial Velocity
  278. } BE_DAMPER_2D_PARAM, *PBE_DAMPER_2D_PARAM;
  279. typedef struct _BE_INERTIA_PARAM {
  280. ULONG m_Bytes; // Size of this structure
  281. LONG m_Mconstant; // M constant
  282. LONG m_A0; // Initial Acceleration
  283. } BE_INERTIA_PARAM, *PBE_INERTIA_PARAM;
  284. typedef struct _BE_INERTIA_2D_PARAM {
  285. ULONG m_Bytes; // Size of this structure
  286. LONG m_XMconstant; // X_AXIS M constant
  287. LONG m_XA0; // X_AXIS Initial Acceleration
  288. LONG m_YMconstant; // Y_AXIS M constant
  289. LONG m_YA0; // Y_AXIS Initial Acceleration
  290. } BE_INERTIA_2D_PARAM, *PBE_INERTIA_2D_PARAM;
  291. typedef struct _BE_FRICTION_PARAM {
  292. ULONG m_Bytes; // Size of this structure
  293. LONG m_Fconstant; // F Friction constant
  294. } BE_FRICTION_PARAM, *PBE_FRICTION_PARAM;
  295. typedef struct _BE_FRICTION_2D_PARAM {
  296. ULONG m_Bytes; // Size of this structure
  297. LONG m_XFconstant; // X_AXIS F Friction constant
  298. LONG m_YFconstant; // Y_AXIS F Friction constant
  299. } BE_FRICTION_2D_PARAM, *PBE_FRICTION_2D_PARAM;
  300. //
  301. // --- WALL Effect
  302. //
  303. #define WALL_INNER 0 // Wall material:from center to Wall Distance
  304. #define WALL_OUTER 1 // Wall material:greater than Wall Distance
  305. typedef struct _BE_WALL_PARAM {
  306. ULONG m_Bytes; // Size of this structure
  307. ULONG m_WallType; // WALL_INNER or WALL_OUTER
  308. LONG m_WallConstant; // in +/- 10000%
  309. ULONG m_WallAngle; // 0 to 35900
  310. ULONG m_WallDistance; // Distance from Wall face normal to center. 0 to 100
  311. } BE_WALL_PARAM, *PBE_WALL_PARAM;
  312. //
  313. // --- DELAY Effect
  314. //
  315. // Use EFFECT.m_SubType = BE_DELAY
  316. // This has no type specific parameters.
  317. //
  318. //
  319. // --- EF_SYNTHESIZED = { SE_CONSTANT_FORCE||SE_SINE||SE_SQUARE||SE_RAMPUP
  320. // ||SE_RAMPDN||SE_TRIANGLE||SE_SAWTOOTH}
  321. typedef struct _SE_PARAM {
  322. ULONG m_Bytes; // size of this structure
  323. ULONG m_Freq; // Frequency in Hz units
  324. ULONG m_SampleRate; // Sample rate in Hz units
  325. LONG m_MaxAmp; // Maximum Amplitude in Force units
  326. LONG m_MinAmp; // Minimum Amplitude in Force units
  327. } SE_PARAM, *PSE_PARAM;
  328. //
  329. // --- EF_USER_DEFINED = { Waveform defined by the user }
  330. //
  331. // Subtype: UD_WAVEFORM
  332. typedef struct _UD_PARAM {
  333. ULONG m_Bytes; // Size of this structure
  334. ULONG m_NumVectors; // Number of entries in the Array
  335. LONG * m_pForceData; // Ptr to an array of LONG Force values.
  336. } UD_PARAM, *PUD_PARAM;
  337. //
  338. // { Process List defined by the user }
  339. // Subtype: PL_CONCATENATE || PL_SUPERIMPOSE
  340. //
  341. typedef struct _PL_PARAM {
  342. ULONG m_Bytes; // Size of this structure
  343. ULONG m_NumEffects; // # of Effects in list
  344. PPSWEFFECT m_pProcessList; // Ptr to a list of ISWEffect pointers
  345. } PL_PARAM, *PPL_PARAM;
  346. //
  347. // --- EF_ROM_EFFECT = { ROM Built-in Waveforms defined by the OEM }
  348. //
  349. // This has no type specific parameters.
  350. // Subtypes: See further below
  351. #define DEFAULT_ROM_EFFECT_GAIN 100 // Set dwGain to this for Default
  352. // ROM Effect gain
  353. #define DEFAULT_ROM_EFFECT_DURATION 1000 // Set dwDuration to this for Default
  354. // ROM Effect Duration
  355. #define DEFAULT_ROM_EFFECT_OUTPUTRATE 1000 // Set dwSampleRate to this for
  356. // Default ROM Effect output rate
  357. //
  358. // --- EF_VFX_EFFECT = { FRC file effects }
  359. //
  360. // Subtypes: none
  361. #define VFX_FILENAME 0L
  362. #define VFX_BUFFER 1L
  363. typedef struct _VFX_PARAM
  364. {
  365. ULONG m_Bytes; // Size of this structure
  366. ULONG m_PointerType; // VFX_FILENAME or VFX_BUFFER
  367. ULONG m_BufferSize; // number of bytes in buffer (if VFX_BUFFER)
  368. PVOID m_pFileNameOrBuffer; // file name to open
  369. } VFX_PARAM, *PVFX_PARAM;
  370. //
  371. // --- RTC Spring Effect Structure
  372. //
  373. typedef struct _RTCSPRING_PARAM{
  374. ULONG m_Bytes; // Size of this structure
  375. LONG m_XKConstant; // K Constant for X-axis
  376. LONG m_YKConstant; // " " for Y-axis
  377. LONG m_XAxisCenter; // RTC Spring center for X-axis
  378. LONG m_YAxisCenter; // " " " for Y-axis
  379. LONG m_XSaturation; // Saturation for X-axis
  380. LONG m_YSaturation; // " for Y-axis
  381. LONG m_XDeadBand; // Deadband for X-axis
  382. LONG m_YDeadBand; // " for Y-axis
  383. } RTCSPRING_PARAM, *PRTCSPRING_PARAM;
  384. //
  385. // --- Major Type: Effects categories
  386. //
  387. #define EF_BEHAVIOR 1L // Behavioral Effect, e.g. Spring, Damper, etc.
  388. #define EF_SYNTHESIZED 2L // Synthesized Effect, e.g. Sine, Square
  389. #define EF_USER_DEFINED 3L // User Defined Waveform
  390. #define EF_ROM_EFFECT 4L // ROM Built-in Waveforms defined by the OEM
  391. #define EF_VFX_EFFECT 5L // FRC file effects
  392. #define EF_RAW_FORCE 6L // For PutRawForce
  393. #define EF_RTC_SPRING 7L // Permanent RTC Spring
  394. //
  395. // --- Subtypes for EF_BEHAVIOR
  396. //
  397. #define BE_SPRING 1L
  398. #define BE_SPRING_2D 2L
  399. #define BE_DAMPER 3L
  400. #define BE_DAMPER_2D 4L
  401. #define BE_INERTIA 5L
  402. #define BE_INERTIA_2D 6L
  403. #define BE_FRICTION 7L
  404. #define BE_FRICTION_2D 8L
  405. #define BE_WALL 9L
  406. #define BE_DELAY 10L
  407. //
  408. // --- DXFF map
  409. //
  410. #define ID_SPRING (BE_SPRING + (EF_BEHAVIOR<<16))
  411. #define ID_DAMPER (BE_DAMPER + (EF_BEHAVIOR<<16))
  412. #define ID_INERTIA (BE_INERTIA + (EF_BEHAVIOR<<16))
  413. #define ID_FRICTION (BE_FRICTION + (EF_BEHAVIOR<<16))
  414. // --- SWForce extensions
  415. #define ID_SPRING_2D (BE_SPRING_2D + (EF_BEHAVIOR<<16))
  416. #define ID_DAMPER_2D (BE_DAMPER_2D + (EF_BEHAVIOR<<16))
  417. #define ID_INERTIA_2D (BE_INERTIA_2D + (EF_BEHAVIOR<<16))
  418. #define ID_FRICTION_2D (BE_FRICTION_2D + (EF_BEHAVIOR<<16))
  419. #define ID_WALL (BE_WALL + (EF_BEHAVIOR<<16))
  420. #define ID_DELAY (BE_DELAY + (EF_BEHAVIOR<<16))
  421. //
  422. // --- Subtypes for EF_SYNTHESIZE
  423. //
  424. #define SE_CONSTANT_FORCE 101L
  425. #define SE_SINE 102L
  426. #define SE_COSINE 103L
  427. #define SE_SQUARELOW 104L
  428. #define SE_SQUAREHIGH 105L
  429. #define SE_RAMPUP 106L
  430. #define SE_RAMPDOWN 107L
  431. #define SE_TRIANGLEUP 108L
  432. #define SE_TRIANGLEDOWN 109L
  433. #define SE_SAWTOOTHUP 110L
  434. #define SE_SAWTOOTHDOWN 111L
  435. //
  436. // --- DXFF map
  437. //
  438. #define ID_CONSTANTFORCE (SE_CONSTANTFORCE + (EF_SYNTHESIZED<<16))
  439. #define ID_RAMPFORCE (SE_RAMPUP + (EF_SYNTHESIZED<<16))
  440. #define ID_SQUARE (SE_SQUARELOW + (EF_SYNTHESIZED<<16))
  441. #define ID_SINE (SE_SINE + (EF_SYNTHESIZED<<16))
  442. #define ID_TRIANGLE (SE_TRIANGLEUP + (EF_SYNTHESIZED<<16))
  443. #define ID_SAWTOOTHUP (SE_SAWTOOTHUP + (EF_SYNTHESIZED<<16))
  444. #define ID_SAWTOOTHDOWN (SE_SAWTOOTHDOWN + (EF_SYNTHESIZED<<16))
  445. #define ID_RAMP (SE_RAMPUP + (EF_SYNTHESIZED<<16))
  446. //
  447. // --- SWForce extensions
  448. //
  449. #define ID_COSINE (SE_COSINE + (EF_SYNTHESIZED<<16))
  450. #define ID_SQUAREHIGH (SE_SQUAREHIGH + (EF_SYNTHESIZED<<16))
  451. #define ID_SQUARELOW (SE_SQUARELOW + (EF_SYNTHESIZED<<16))
  452. #define ID_RAMPUP (SE_RAMPUP + (EF_SYNTHESIZED<<16))
  453. #define ID_RAMPDOWN (SE_RAMPDOWN + (EF_SYNTHESIZED<<16))
  454. #define ID_TRIANGLEUP (SE_TRIANGLEUP + (EF_SYNTHESIZED<<16))
  455. #define ID_TRIANGLEDOWN (SE_TRIANGLEDOWN + (EF_SYNTHESIZED<<16))
  456. //
  457. // --- Subtypes for EF_USER_DEFINED
  458. //
  459. #define UD_WAVEFORM 201L
  460. #define PL_CONCATENATE 202L
  461. #define PL_SUPERIMPOSE 203L
  462. //
  463. // --- DXFF map
  464. //
  465. #define ID_CUSTOMFORCE (UD_WAVEFORM + (EF_USER_DEFINED<<16))
  466. //
  467. // --- SWForce extensions
  468. //
  469. #define ID_PL_CONCATENATE (PL_CONCATENATE + (EF_USER_DEFINED<<16))
  470. #define ID_PL_SUPERIMPOSE (PL_SUPERIMPOSE + (EF_USER_DEFINED<<16))
  471. //
  472. // --- Subtypes for EF_ROM_EFFECT
  473. // starts at 0x12D
  474. #define RE_ROMID_START 301L
  475. #define RE_ROMID1 (RE_ROMID_START )
  476. #define RE_ROMID2 (RE_ROMID_START + 1)
  477. #define RE_ROMID3 (RE_ROMID_START + 2)
  478. #define RE_ROMID4 (RE_ROMID_START + 3)
  479. #define RE_ROMID5 (RE_ROMID_START + 4)
  480. #define RE_ROMID6 (RE_ROMID_START + 5)
  481. #define RE_ROMID7 (RE_ROMID_START + 6)
  482. #define RE_ROMID8 (RE_ROMID_START + 7)
  483. #define RE_ROMID9 (RE_ROMID_START + 8)
  484. #define RE_ROMID10 (RE_ROMID_START + 9)
  485. #define RE_ROMID11 (RE_ROMID_START + 10)
  486. #define RE_ROMID12 (RE_ROMID_START + 11)
  487. #define RE_ROMID13 (RE_ROMID_START + 12)
  488. #define RE_ROMID14 (RE_ROMID_START + 13)
  489. #define RE_ROMID15 (RE_ROMID_START + 14)
  490. #define RE_ROMID16 (RE_ROMID_START + 15)
  491. #define RE_ROMID17 (RE_ROMID_START + 16)
  492. #define RE_ROMID18 (RE_ROMID_START + 17)
  493. #define RE_ROMID19 (RE_ROMID_START + 18)
  494. #define RE_ROMID20 (RE_ROMID_START + 19)
  495. #define RE_ROMID21 (RE_ROMID_START + 20)
  496. #define RE_ROMID22 (RE_ROMID_START + 21)
  497. #define RE_ROMID23 (RE_ROMID_START + 22)
  498. #define RE_ROMID24 (RE_ROMID_START + 23)
  499. #define RE_ROMID25 (RE_ROMID_START + 24)
  500. #define RE_ROMID26 (RE_ROMID_START + 25)
  501. #define RE_ROMID27 (RE_ROMID_START + 26)
  502. #define RE_ROMID28 (RE_ROMID_START + 27)
  503. #define RE_ROMID29 (RE_ROMID_START + 28)
  504. #define RE_ROMID30 (RE_ROMID_START + 29)
  505. #define RE_ROMID31 (RE_ROMID_START + 30)
  506. #define RE_ROMID32 (RE_ROMID_START + 31)
  507. #if 0
  508. #define RE_ROMID33 (RE_ROMID_START + 32)
  509. #define RE_ROMID34 (RE_ROMID_START + 33)
  510. #define RE_ROMID35 (RE_ROMID_START + 34)
  511. #define RE_ROMID36 (RE_ROMID_START + 35)
  512. #define RE_ROMID37 (RE_ROMID_START + 36)
  513. #define RE_ROMID38 (RE_ROMID_START + 37)
  514. #define RE_ROMID39 (RE_ROMID_START + 38)
  515. #define RE_ROMID40 (RE_ROMID_START + 39)
  516. #define RE_ROMID41 (RE_ROMID_START + 40)
  517. #define RE_ROMID42 (RE_ROMID_START + 41)
  518. #define RE_ROMID43 (RE_ROMID_START + 42)
  519. #define RE_ROMID44 (RE_ROMID_START + 43)
  520. #define RE_ROMID45 (RE_ROMID_START + 44)
  521. #define RE_ROMID46 (RE_ROMID_START + 45)
  522. #define RE_ROMID47 (RE_ROMID_START + 46)
  523. #define RE_ROMID48 (RE_ROMID_START + 47)
  524. #define RE_ROMID49 (RE_ROMID_START + 48)
  525. #define RE_ROMID50 (RE_ROMID_START + 49)
  526. #define RE_ROMID51 (RE_ROMID_START + 50)
  527. #define RE_ROMID52 (RE_ROMID_START + 51)
  528. #define RE_ROMID53 (RE_ROMID_START + 52)
  529. #define RE_ROMID54 (RE_ROMID_START + 53)
  530. #define RE_ROMID55 (RE_ROMID_START + 54)
  531. #define RE_ROMID56 (RE_ROMID_START + 55)
  532. #define RE_ROMID57 (RE_ROMID_START + 56)
  533. #define RE_ROMID58 (RE_ROMID_START + 57)
  534. #define RE_ROMID59 (RE_ROMID_START + 58)
  535. #define RE_ROMID60 (RE_ROMID_START + 59)
  536. #define RE_ROMID61 (RE_ROMID_START + 60)
  537. #define RE_ROMID62 (RE_ROMID_START + 61)
  538. #define RE_ROMID63 (RE_ROMID_START + 62)
  539. #define RE_ROMID64 (RE_ROMID_START + 63)
  540. #endif
  541. #define MAX_ROM_EFFECTS (RE_ROMID32 - RE_ROMID_START + 1)
  542. //
  543. // --- DXFF map
  544. //
  545. #define ID_RANDOM_NOISE (RE_ROMID1 + (EF_ROM_EFFECT<<16))
  546. #define ID_AIRCRAFT_CARRIER_TAKEOFF (RE_ROMID2 + (EF_ROM_EFFECT<<16))
  547. #define ID_BASKETBALL_DRIBBLE (RE_ROMID3 + (EF_ROM_EFFECT<<16))
  548. #define ID_CAR_ENGINE_IDLE (RE_ROMID4 + (EF_ROM_EFFECT<<16))
  549. #define ID_CHAINSAW_IDLE (RE_ROMID5 + (EF_ROM_EFFECT<<16))
  550. #define ID_CHAINSAW_IN_ACTION (RE_ROMID6 + (EF_ROM_EFFECT<<16))
  551. #define ID_DIESEL_ENGINE_IDLE (RE_ROMID7 + (EF_ROM_EFFECT<<16))
  552. #define ID_JUMP (RE_ROMID8 + (EF_ROM_EFFECT<<16))
  553. #define ID_LAND (RE_ROMID9 + (EF_ROM_EFFECT<<16))
  554. #define ID_MACHINEGUN (RE_ROMID10 + (EF_ROM_EFFECT<<16))
  555. #define ID_PUNCHED (RE_ROMID11 + (EF_ROM_EFFECT<<16))
  556. #define ID_ROCKET_LAUNCH (RE_ROMID12 + (EF_ROM_EFFECT<<16))
  557. #define ID_SECRET_DOOR (RE_ROMID13 + (EF_ROM_EFFECT<<16))
  558. #define ID_SWITCH_CLICK (RE_ROMID14 + (EF_ROM_EFFECT<<16))
  559. #define ID_WIND_GUST (RE_ROMID15 + (EF_ROM_EFFECT<<16))
  560. #define ID_WIND_SHEAR (RE_ROMID16 + (EF_ROM_EFFECT<<16))
  561. #define ID_PISTOL (RE_ROMID17 + (EF_ROM_EFFECT<<16))
  562. #define ID_SHOTGUN (RE_ROMID18 + (EF_ROM_EFFECT<<16))
  563. #define ID_LASER1 (RE_ROMID19 + (EF_ROM_EFFECT<<16))
  564. #define ID_LASER2 (RE_ROMID20 + (EF_ROM_EFFECT<<16))
  565. #define ID_LASER3 (RE_ROMID21 + (EF_ROM_EFFECT<<16))
  566. #define ID_LASER4 (RE_ROMID22 + (EF_ROM_EFFECT<<16))
  567. #define ID_LASER5 (RE_ROMID23 + (EF_ROM_EFFECT<<16))
  568. #define ID_LASER6 (RE_ROMID24 + (EF_ROM_EFFECT<<16))
  569. #define ID_OUT_OF_AMMO (RE_ROMID25 + (EF_ROM_EFFECT<<16))
  570. #define ID_LIGHTNING_GUN (RE_ROMID26 + (EF_ROM_EFFECT<<16))
  571. #define ID_MISSILE (RE_ROMID27 + (EF_ROM_EFFECT<<16))
  572. #define ID_GATLING_GUN (RE_ROMID28 + (EF_ROM_EFFECT<<16))
  573. #define ID_SHORT_PLASMA (RE_ROMID29 + (EF_ROM_EFFECT<<16))
  574. #define ID_PLASMA_CANNON1 (RE_ROMID30 + (EF_ROM_EFFECT<<16))
  575. #define ID_PLASMA_CANNON2 (RE_ROMID31 + (EF_ROM_EFFECT<<16))
  576. #define ID_CANNON (RE_ROMID32 + (EF_ROM_EFFECT<<16))
  577. //#define ID_FLAME_THROWER (RE_ROMID33 + (EF_ROM_EFFECT<<16))
  578. //#define ID_BOLT_ACTION_RIFLE (RE_ROMID34 + (EF_ROM_EFFECT<<16))
  579. //#define ID_CROSSBOW (RE_ROMID35 + (EF_ROM_EFFECT<<16))
  580. #endif // of ifdef _DX_MAP_SEEN