Source code of Windows XP (NT5)
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.

81 lines
1.7 KiB

  1. sinclude(semdef.w)
  2. pushdef(_prediv,divnum)divert(-1)dnl Redirect output to /dev/null for now
  3. changecom(`|')
  4. |
  5. define(`_max', `ifelse($1>$2,1,$1,$2)')
  6. |
  7. define(`_CDefGenre', `[_THISDEVICE`.'Genre._THISGENRE]'
  8. `Genre=$2'
  9. `Name.Genre=$1'
  10. `Txt1=$3'
  11. `Txt2=$4')dnl
  12. |
  13. define(`_CDefAxs',`ifelse(eval(_GetINDEX>_THISAXS),1,,`_IniDef($1,$2,$3,$3,_THISDEVICE`'AXS$4,`_GetINDEX')')')
  14. define(`_CDefBtn',`ifelse(eval(_GetINDEX>_THISBTN),1,,`_IniDef($1,$2,$3,$3,_THISDEVICE`'BTN$4,`_GetINDEX')')')
  15. define(`_CDefPov',`ifelse(eval(_GetINDEX>_THISAXS),1,,`_IniDef($1,$2,$3,$3,_THISDEVICE`'POV$4,`_GetINDEX')')')
  16. |
  17. |
  18. define(`_IniDef', `$5=$6'
  19. `$5.Define=$1_$2'
  20. `$5.Text=$3'
  21. )
  22. |
  23. define(`_EndGenre', `DIAXIS=_max(_NAXS,_THISAXS)'
  24. `DIBUTTON=_max(_NBTN, _THISBTN)'
  25. `DIPOV=_max(_NPOV,_THISPOV)')
  26. |
  27. define(`_CDefine',)
  28. define(`_CComment',)
  29. define(`_Priority2', `;Priority2 Commands')
  30. define(`_EndFile', `[DirectInput]'
  31. `Version=0x800'
  32. `Devices=SwndrJolt, SwndrWheel'
  33. `NumGenres=_GENRE'
  34. )
  35. |
  36. define(`_DoDevice',`define(`_THISDEVICE',`$1')'dnl
  37. `define(`_THISAXS',`$2')'dnl
  38. `define(`_THISBTN',`$3')'dnl
  39. `define(`_THISPOV',`$4')'dnl
  40. `[$1]'
  41. `Control=forloop(`i',1,$2,`$1AXS`'i,')'
  42. `Control=forloop(`i',1,$3,`$1BTN`'i,')'
  43. `Control=forloop(`i',1,$4,`$1POV`'i,')'
  44. `forloop(`i',1,$2,`[$1AXS`'i]'
  45. `UsagePage=1'
  46. `Usage=eval(30+i)'
  47. `Image='
  48. `Overlay='
  49. `Offset='
  50. `Name='
  51. )'
  52. `forloop(`i',1,$3,`[$1BTN`'i]'
  53. `UsagePage=1'
  54. `Usage=eval(30+i)'
  55. `Image='
  56. `Overlay='
  57. `Offset='
  58. `Name='
  59. )'
  60. `forloop(`i',1,$4,`[$1POV`'i]'
  61. `UsagePage=1'
  62. `Usage=eval(30+i)'
  63. `Image='
  64. `Overlay='
  65. `Offset='
  66. `Name='
  67. )'
  68. )
  69. |
  70. changecom()
  71. divert(_prediv)popdef(`_prediv')dnl End of macro header file
  72. _DoDevice(SwndrJolt,4,10,1)
  73. sinclude(semantic.w)
  74. _DoDevice(SwndrWheel,3,6,0)
  75. sinclude(semantic.w)