DirectInput.pas
上传用户:ctlcnc
上传日期:2021-12-10
资源大小:4933k
文件大小:319k
源码类别:

2D图形编程

开发平台:

Delphi

  1.   {$EXTERNALSYM DIAXIS_FLYINGC_BRAKE}
  2.   DIAXIS_FLYINGC_RUDDER                   = $04025205; (* Yaw ship left/right *)
  3.   {$EXTERNALSYM DIAXIS_FLYINGC_RUDDER}
  4.   DIAXIS_FLYINGC_FLAPS                    = $04055A06; (* Flaps *)
  5.   {$EXTERNALSYM DIAXIS_FLYINGC_FLAPS}
  6.   DIBUTTON_FLYINGC_FLAPSUP                = $04006404; (* Increment stepping up until fully retracted *)
  7.   {$EXTERNALSYM DIBUTTON_FLYINGC_FLAPSUP}
  8.   DIBUTTON_FLYINGC_FLAPSDOWN              = $04006405; (* Decrement stepping down until fully extended *)
  9.   {$EXTERNALSYM DIBUTTON_FLYINGC_FLAPSDOWN}
  10.   DIBUTTON_FLYINGC_BRAKE_LINK             = $04046CE0; (* Fallback brake button *)
  11.   {$EXTERNALSYM DIBUTTON_FLYINGC_BRAKE_LINK}
  12.   DIBUTTON_FLYINGC_FASTER_LINK            = $0403D4E0; (* Fallback throttle up button *)
  13.   {$EXTERNALSYM DIBUTTON_FLYINGC_FASTER_LINK}
  14.   DIBUTTON_FLYINGC_SLOWER_LINK            = $0403D4E8; (* Fallback throttle down button *)
  15.   {$EXTERNALSYM DIBUTTON_FLYINGC_SLOWER_LINK}
  16.   DIBUTTON_FLYINGC_GLANCE_LEFT_LINK       = $0407C4E4; (* Fallback Glance Left button *)
  17.   {$EXTERNALSYM DIBUTTON_FLYINGC_GLANCE_LEFT_LINK}
  18.   DIBUTTON_FLYINGC_GLANCE_RIGHT_LINK      = $0407C4EC; (* Fallback Glance Right button *)
  19.   {$EXTERNALSYM DIBUTTON_FLYINGC_GLANCE_RIGHT_LINK}
  20.   DIBUTTON_FLYINGC_GLANCE_UP_LINK         = $0407C4E0; (* Fallback Glance Up button *)
  21.   {$EXTERNALSYM DIBUTTON_FLYINGC_GLANCE_UP_LINK}
  22.   DIBUTTON_FLYINGC_GLANCE_DOWN_LINK       = $0407C4E8; (* Fallback Glance Down button *)
  23.   {$EXTERNALSYM DIBUTTON_FLYINGC_GLANCE_DOWN_LINK}
  24.   DIBUTTON_FLYINGC_DEVICE                 = $040044FE; (* Show input device and controls *)
  25.   {$EXTERNALSYM DIBUTTON_FLYINGC_DEVICE}
  26.   DIBUTTON_FLYINGC_PAUSE                  = $040044FC; (* Start / Pause / Restart game *)
  27.   {$EXTERNALSYM DIBUTTON_FLYINGC_PAUSE}
  28. (*--- Flight Simulator - Military
  29.       Aerial combat is the primary objective  ---*)
  30.   DIVIRTUAL_FLYING_MILITARY               = $05000000;
  31.   {$EXTERNALSYM DIVIRTUAL_FLYING_MILITARY}
  32.   DIAXIS_FLYINGM_BANK                     = $05008A01; (* Bank - Roll ship left / right *)
  33.   {$EXTERNALSYM DIAXIS_FLYINGM_BANK}
  34.   DIAXIS_FLYINGM_PITCH                    = $05010A02; (* Pitch - Nose up / down *)
  35.   {$EXTERNALSYM DIAXIS_FLYINGM_PITCH}
  36.   DIAXIS_FLYINGM_THROTTLE                 = $05039203; (* Throttle - faster / slower *)
  37.   {$EXTERNALSYM DIAXIS_FLYINGM_THROTTLE}
  38.   DIBUTTON_FLYINGM_FIRE                   = $05000C01; (* Fire *)
  39.   {$EXTERNALSYM DIBUTTON_FLYINGM_FIRE}
  40.   DIBUTTON_FLYINGM_WEAPONS                = $05000C02; (* Select next weapon *)
  41.   {$EXTERNALSYM DIBUTTON_FLYINGM_WEAPONS}
  42.   DIBUTTON_FLYINGM_TARGET                 = $05000C03; (* Selects next available target *)
  43.   {$EXTERNALSYM DIBUTTON_FLYINGM_TARGET}
  44.   DIBUTTON_FLYINGM_MENU                   = $050004FD; (* Show menu options *)
  45.   {$EXTERNALSYM DIBUTTON_FLYINGM_MENU}
  46. (*--- Priority 2 controls                            ---*)
  47.   DIHATSWITCH_FLYINGM_GLANCE              = $05004601; (* Look around *)
  48.   {$EXTERNALSYM DIHATSWITCH_FLYINGM_GLANCE}
  49.   DIBUTTON_FLYINGM_COUNTER                = $05005C04; (* Activate counter measures *)
  50.   {$EXTERNALSYM DIBUTTON_FLYINGM_COUNTER}
  51.   DIAXIS_FLYINGM_RUDDER                   = $05024A04; (* Rudder - Yaw ship left/right *)
  52.   {$EXTERNALSYM DIAXIS_FLYINGM_RUDDER}
  53.   DIAXIS_FLYINGM_BRAKE                    = $05046205; (* Brake-axis *)
  54.   {$EXTERNALSYM DIAXIS_FLYINGM_BRAKE}
  55.   DIBUTTON_FLYINGM_VIEW                   = $05006405; (* Cycle through view options *)
  56.   {$EXTERNALSYM DIBUTTON_FLYINGM_VIEW}
  57.   DIBUTTON_FLYINGM_DISPLAY                = $05006406; (* Select next dashboard option *)
  58.   {$EXTERNALSYM DIBUTTON_FLYINGM_DISPLAY}
  59.   DIAXIS_FLYINGM_FLAPS                    = $05055206; (* Flaps *)
  60.   {$EXTERNALSYM DIAXIS_FLYINGM_FLAPS}
  61.   DIBUTTON_FLYINGM_FLAPSUP                = $05005407; (* Increment stepping up until fully retracted *)
  62.   {$EXTERNALSYM DIBUTTON_FLYINGM_FLAPSUP}
  63.   DIBUTTON_FLYINGM_FLAPSDOWN              = $05005408; (* Decrement stepping down until fully extended *)
  64.   {$EXTERNALSYM DIBUTTON_FLYINGM_FLAPSDOWN}
  65.   DIBUTTON_FLYINGM_FIRESECONDARY          = $05004C09; (* Alternative fire button *)
  66.   {$EXTERNALSYM DIBUTTON_FLYINGM_FIRESECONDARY}
  67.   DIBUTTON_FLYINGM_GEAR                   = $0500640A; (* Gear up / down *)
  68.   {$EXTERNALSYM DIBUTTON_FLYINGM_GEAR}
  69.   DIBUTTON_FLYINGM_BRAKE_LINK             = $050464E0; (* Fallback brake button *)
  70.   {$EXTERNALSYM DIBUTTON_FLYINGM_BRAKE_LINK}
  71.   DIBUTTON_FLYINGM_FASTER_LINK            = $0503D4E0; (* Fallback throttle up button *)
  72.   {$EXTERNALSYM DIBUTTON_FLYINGM_FASTER_LINK}
  73.   DIBUTTON_FLYINGM_SLOWER_LINK            = $0503D4E8; (* Fallback throttle down button *)
  74.   {$EXTERNALSYM DIBUTTON_FLYINGM_SLOWER_LINK}
  75.   DIBUTTON_FLYINGM_GLANCE_LEFT_LINK       = $0507C4E4; (* Fallback Glance Left button *)
  76.   {$EXTERNALSYM DIBUTTON_FLYINGM_GLANCE_LEFT_LINK}
  77.   DIBUTTON_FLYINGM_GLANCE_RIGHT_LINK      = $0507C4EC; (* Fallback Glance Right button *)
  78.   {$EXTERNALSYM DIBUTTON_FLYINGM_GLANCE_RIGHT_LINK}
  79.   DIBUTTON_FLYINGM_GLANCE_UP_LINK         = $0507C4E0; (* Fallback Glance Up button *)
  80.   {$EXTERNALSYM DIBUTTON_FLYINGM_GLANCE_UP_LINK}
  81.   DIBUTTON_FLYINGM_GLANCE_DOWN_LINK       = $0507C4E8; (* Fallback Glance Down button *)
  82.   {$EXTERNALSYM DIBUTTON_FLYINGM_GLANCE_DOWN_LINK}
  83.   DIBUTTON_FLYINGM_DEVICE                 = $050044FE; (* Show input device and controls *)
  84.   {$EXTERNALSYM DIBUTTON_FLYINGM_DEVICE}
  85.   DIBUTTON_FLYINGM_PAUSE                  = $050044FC; (* Start / Pause / Restart game *)
  86.   {$EXTERNALSYM DIBUTTON_FLYINGM_PAUSE}
  87. (*--- Flight Simulator - Combat Helicopter
  88.       Combat from helicopter is primary objective  ---*)
  89.   DIVIRTUAL_FLYING_HELICOPTER             = $06000000;
  90.   {$EXTERNALSYM DIVIRTUAL_FLYING_HELICOPTER}
  91.   DIAXIS_FLYINGH_BANK                     = $06008A01; (* Bank - Roll ship left / right *)
  92.   {$EXTERNALSYM DIAXIS_FLYINGH_BANK}
  93.   DIAXIS_FLYINGH_PITCH                    = $06010A02; (* Pitch - Nose up / down *)
  94.   {$EXTERNALSYM DIAXIS_FLYINGH_PITCH}
  95.   DIAXIS_FLYINGH_COLLECTIVE               = $06018A03; (* Collective - Blade pitch/power *)
  96.   {$EXTERNALSYM DIAXIS_FLYINGH_COLLECTIVE}
  97.   DIBUTTON_FLYINGH_FIRE                   = $06001401; (* Fire *)
  98.   {$EXTERNALSYM DIBUTTON_FLYINGH_FIRE}
  99.   DIBUTTON_FLYINGH_WEAPONS                = $06001402; (* Select next weapon *)
  100.   {$EXTERNALSYM DIBUTTON_FLYINGH_WEAPONS}
  101.   DIBUTTON_FLYINGH_TARGET                 = $06001403; (* Selects next available target *)
  102.   {$EXTERNALSYM DIBUTTON_FLYINGH_TARGET}
  103.   DIBUTTON_FLYINGH_MENU                   = $060004FD; (* Show menu options *)
  104.   {$EXTERNALSYM DIBUTTON_FLYINGH_MENU}
  105. (*--- Priority 2 controls                            ---*)
  106.   DIHATSWITCH_FLYINGH_GLANCE              = $06004601; (* Look around *)
  107.   {$EXTERNALSYM DIHATSWITCH_FLYINGH_GLANCE}
  108.   DIAXIS_FLYINGH_TORQUE                   = $06025A04; (* Torque - Rotate ship around left / right axis *)
  109.   {$EXTERNALSYM DIAXIS_FLYINGH_TORQUE}
  110.   DIAXIS_FLYINGH_THROTTLE                 = $0603DA05; (* Throttle *)
  111.   {$EXTERNALSYM DIAXIS_FLYINGH_THROTTLE}
  112.   DIBUTTON_FLYINGH_COUNTER                = $06005404; (* Activate counter measures *)
  113.   {$EXTERNALSYM DIBUTTON_FLYINGH_COUNTER}
  114.   DIBUTTON_FLYINGH_VIEW                   = $06006405; (* Cycle through view options *)
  115.   {$EXTERNALSYM DIBUTTON_FLYINGH_VIEW}
  116.   DIBUTTON_FLYINGH_GEAR                   = $06006406; (* Gear up / down *)
  117.   {$EXTERNALSYM DIBUTTON_FLYINGH_GEAR}
  118.   DIBUTTON_FLYINGH_FIRESECONDARY          = $06004C07; (* Alternative fire button *)
  119.   {$EXTERNALSYM DIBUTTON_FLYINGH_FIRESECONDARY}
  120.   DIBUTTON_FLYINGH_FASTER_LINK            = $0603DCE0; (* Fallback throttle up button *)
  121.   {$EXTERNALSYM DIBUTTON_FLYINGH_FASTER_LINK}
  122.   DIBUTTON_FLYINGH_SLOWER_LINK            = $0603DCE8; (* Fallback throttle down button *)
  123.   {$EXTERNALSYM DIBUTTON_FLYINGH_SLOWER_LINK}
  124.   DIBUTTON_FLYINGH_GLANCE_LEFT_LINK       = $0607C4E4; (* Fallback Glance Left button *)
  125.   {$EXTERNALSYM DIBUTTON_FLYINGH_GLANCE_LEFT_LINK}
  126.   DIBUTTON_FLYINGH_GLANCE_RIGHT_LINK      = $0607C4EC; (* Fallback Glance Right button *)
  127.   {$EXTERNALSYM DIBUTTON_FLYINGH_GLANCE_RIGHT_LINK}
  128.   DIBUTTON_FLYINGH_GLANCE_UP_LINK         = $0607C4E0; (* Fallback Glance Up button *)
  129.   {$EXTERNALSYM DIBUTTON_FLYINGH_GLANCE_UP_LINK}
  130.   DIBUTTON_FLYINGH_GLANCE_DOWN_LINK       = $0607C4E8; (* Fallback Glance Down button *)
  131.   {$EXTERNALSYM DIBUTTON_FLYINGH_GLANCE_DOWN_LINK}
  132.   DIBUTTON_FLYINGH_DEVICE                 = $060044FE; (* Show input device and controls *)
  133.   {$EXTERNALSYM DIBUTTON_FLYINGH_DEVICE}
  134.   DIBUTTON_FLYINGH_PAUSE                  = $060044FC; (* Start / Pause / Restart game *)
  135.   {$EXTERNALSYM DIBUTTON_FLYINGH_PAUSE}
  136. (*--- Space Simulator - Combat
  137.       Space Simulator with weapons  ---*)
  138.   DIVIRTUAL_SPACESIM                      = $07000000;
  139.   {$EXTERNALSYM DIVIRTUAL_SPACESIM}
  140.   DIAXIS_SPACESIM_LATERAL                 = $07008201; (* Move ship left / right *)
  141.   {$EXTERNALSYM DIAXIS_SPACESIM_LATERAL}
  142.   DIAXIS_SPACESIM_MOVE                    = $07010202; (* Move ship forward/backward *)
  143.   {$EXTERNALSYM DIAXIS_SPACESIM_MOVE}
  144.   DIAXIS_SPACESIM_THROTTLE                = $07038203; (* Throttle - Engine speed *)
  145.   {$EXTERNALSYM DIAXIS_SPACESIM_THROTTLE}
  146.   DIBUTTON_SPACESIM_FIRE                  = $07000401; (* Fire *)
  147.   {$EXTERNALSYM DIBUTTON_SPACESIM_FIRE}
  148.   DIBUTTON_SPACESIM_WEAPONS               = $07000402; (* Select next weapon *)
  149.   {$EXTERNALSYM DIBUTTON_SPACESIM_WEAPONS}
  150.   DIBUTTON_SPACESIM_TARGET                = $07000403; (* Selects next available target *)
  151.   {$EXTERNALSYM DIBUTTON_SPACESIM_TARGET}
  152.   DIBUTTON_SPACESIM_MENU                  = $070004FD; (* Show menu options *)
  153.   {$EXTERNALSYM DIBUTTON_SPACESIM_MENU}
  154. (*--- Priority 2 controls                            ---*)
  155.   DIHATSWITCH_SPACESIM_GLANCE             = $07004601; (* Look around *)
  156.   {$EXTERNALSYM DIHATSWITCH_SPACESIM_GLANCE}
  157.   DIAXIS_SPACESIM_CLIMB                   = $0701C204; (* Climb - Pitch ship up/down *)
  158.   {$EXTERNALSYM DIAXIS_SPACESIM_CLIMB}
  159.   DIAXIS_SPACESIM_ROTATE                  = $07024205; (* Rotate - Turn ship left/right *)
  160.   {$EXTERNALSYM DIAXIS_SPACESIM_ROTATE}
  161.   DIBUTTON_SPACESIM_VIEW                  = $07004404; (* Cycle through view options *)
  162.   {$EXTERNALSYM DIBUTTON_SPACESIM_VIEW}
  163.   DIBUTTON_SPACESIM_DISPLAY               = $07004405; (* Select next dashboard / heads up display option *)
  164.   {$EXTERNALSYM DIBUTTON_SPACESIM_DISPLAY}
  165.   DIBUTTON_SPACESIM_RAISE                 = $07004406; (* Raise ship while maintaining current pitch *)
  166.   {$EXTERNALSYM DIBUTTON_SPACESIM_RAISE}
  167.   DIBUTTON_SPACESIM_LOWER                 = $07004407; (* Lower ship while maintaining current pitch *)
  168.   {$EXTERNALSYM DIBUTTON_SPACESIM_LOWER}
  169.   DIBUTTON_SPACESIM_GEAR                  = $07004408; (* Gear up / down *)
  170.   {$EXTERNALSYM DIBUTTON_SPACESIM_GEAR}
  171.   DIBUTTON_SPACESIM_FIRESECONDARY         = $07004409; (* Alternative fire button *)
  172.   {$EXTERNALSYM DIBUTTON_SPACESIM_FIRESECONDARY}
  173.   DIBUTTON_SPACESIM_LEFT_LINK             = $0700C4E4; (* Fallback move left button *)
  174.   {$EXTERNALSYM DIBUTTON_SPACESIM_LEFT_LINK}
  175.   DIBUTTON_SPACESIM_RIGHT_LINK            = $0700C4EC; (* Fallback move right button *)
  176.   {$EXTERNALSYM DIBUTTON_SPACESIM_RIGHT_LINK}
  177.   DIBUTTON_SPACESIM_FORWARD_LINK          = $070144E0; (* Fallback move forward button *)
  178.   {$EXTERNALSYM DIBUTTON_SPACESIM_FORWARD_LINK}
  179.   DIBUTTON_SPACESIM_BACKWARD_LINK         = $070144E8; (* Fallback move backwards button *)
  180.   {$EXTERNALSYM DIBUTTON_SPACESIM_BACKWARD_LINK}
  181.   DIBUTTON_SPACESIM_FASTER_LINK           = $0703C4E0; (* Fallback throttle up button *)
  182.   {$EXTERNALSYM DIBUTTON_SPACESIM_FASTER_LINK}
  183.   DIBUTTON_SPACESIM_SLOWER_LINK           = $0703C4E8; (* Fallback throttle down button *)
  184.   {$EXTERNALSYM DIBUTTON_SPACESIM_SLOWER_LINK}
  185.   DIBUTTON_SPACESIM_TURN_LEFT_LINK        = $070244E4; (* Fallback turn left button *)
  186.   {$EXTERNALSYM DIBUTTON_SPACESIM_TURN_LEFT_LINK}
  187.   DIBUTTON_SPACESIM_TURN_RIGHT_LINK       = $070244EC; (* Fallback turn right button *)
  188.   {$EXTERNALSYM DIBUTTON_SPACESIM_TURN_RIGHT_LINK}
  189.   DIBUTTON_SPACESIM_GLANCE_LEFT_LINK      = $0707C4E4; (* Fallback Glance Left button *)
  190.   {$EXTERNALSYM DIBUTTON_SPACESIM_GLANCE_LEFT_LINK}
  191.   DIBUTTON_SPACESIM_GLANCE_RIGHT_LINK     = $0707C4EC; (* Fallback Glance Right button *)
  192.   {$EXTERNALSYM DIBUTTON_SPACESIM_GLANCE_RIGHT_LINK}
  193.   DIBUTTON_SPACESIM_GLANCE_UP_LINK        = $0707C4E0; (* Fallback Glance Up button *)
  194.   {$EXTERNALSYM DIBUTTON_SPACESIM_GLANCE_UP_LINK}
  195.   DIBUTTON_SPACESIM_GLANCE_DOWN_LINK      = $0707C4E8; (* Fallback Glance Down button *)
  196.   {$EXTERNALSYM DIBUTTON_SPACESIM_GLANCE_DOWN_LINK}
  197.   DIBUTTON_SPACESIM_DEVICE                = $070044FE; (* Show input device and controls *)
  198.   {$EXTERNALSYM DIBUTTON_SPACESIM_DEVICE}
  199.   DIBUTTON_SPACESIM_PAUSE                 = $070044FC; (* Start / Pause / Restart game *)
  200.   {$EXTERNALSYM DIBUTTON_SPACESIM_PAUSE}
  201. (*--- Fighting - First Person
  202.       Hand to Hand combat is primary objective  ---*)
  203.   DIVIRTUAL_FIGHTING_HAND2HAND            = $08000000;
  204.   {$EXTERNALSYM DIVIRTUAL_FIGHTING_HAND2HAND}
  205.   DIAXIS_FIGHTINGH_LATERAL                = $08008201; (* Sidestep left/right *)
  206.   {$EXTERNALSYM DIAXIS_FIGHTINGH_LATERAL}
  207.   DIAXIS_FIGHTINGH_MOVE                   = $08010202; (* Move forward/backward *)
  208.   {$EXTERNALSYM DIAXIS_FIGHTINGH_MOVE}
  209.   DIBUTTON_FIGHTINGH_PUNCH                = $08000401; (* Punch *)
  210.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_PUNCH}
  211.   DIBUTTON_FIGHTINGH_KICK                 = $08000402; (* Kick *)
  212.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_KICK}
  213.   DIBUTTON_FIGHTINGH_BLOCK                = $08000403; (* Block *)
  214.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_BLOCK}
  215.   DIBUTTON_FIGHTINGH_CROUCH               = $08000404; (* Crouch *)
  216.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_CROUCH}
  217.   DIBUTTON_FIGHTINGH_JUMP                 = $08000405; (* Jump *)
  218.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_JUMP}
  219.   DIBUTTON_FIGHTINGH_SPECIAL1             = $08000406; (* Apply first special move *)
  220.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_SPECIAL1}
  221.   DIBUTTON_FIGHTINGH_SPECIAL2             = $08000407; (* Apply second special move *)
  222.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_SPECIAL2}
  223.   DIBUTTON_FIGHTINGH_MENU                 = $080004FD; (* Show menu options *)
  224.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_MENU}
  225. (*--- Priority 2 controls                            ---*)
  226.   DIBUTTON_FIGHTINGH_SELECT               = $08004408; (* Select special move *)
  227.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_SELECT}
  228.   DIHATSWITCH_FIGHTINGH_SLIDE             = $08004601; (* Look around *)
  229.   {$EXTERNALSYM DIHATSWITCH_FIGHTINGH_SLIDE}
  230.   DIBUTTON_FIGHTINGH_DISPLAY              = $08004409; (* Shows next on-screen display option *)
  231.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_DISPLAY}
  232.   DIAXIS_FIGHTINGH_ROTATE                 = $08024203; (* Rotate - Turn body left/right *)
  233.   {$EXTERNALSYM DIAXIS_FIGHTINGH_ROTATE}
  234.   DIBUTTON_FIGHTINGH_DODGE                = $0800440A; (* Dodge *)
  235.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_DODGE}
  236.   DIBUTTON_FIGHTINGH_LEFT_LINK            = $0800C4E4; (* Fallback left sidestep button *)
  237.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_LEFT_LINK}
  238.   DIBUTTON_FIGHTINGH_RIGHT_LINK           = $0800C4EC; (* Fallback right sidestep button *)
  239.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_RIGHT_LINK}
  240.   DIBUTTON_FIGHTINGH_FORWARD_LINK         = $080144E0; (* Fallback forward button *)
  241.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_FORWARD_LINK}
  242.   DIBUTTON_FIGHTINGH_BACKWARD_LINK        = $080144E8; (* Fallback backward button *)
  243.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_BACKWARD_LINK}
  244.   DIBUTTON_FIGHTINGH_DEVICE               = $080044FE; (* Show input device and controls *)
  245.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_DEVICE}
  246.   DIBUTTON_FIGHTINGH_PAUSE                = $080044FC; (* Start / Pause / Restart game *)
  247.   {$EXTERNALSYM DIBUTTON_FIGHTINGH_PAUSE}
  248. (*--- Fighting - First Person Shooting
  249.       Navigation and combat are primary objectives  ---*)
  250.   DIVIRTUAL_FIGHTING_FPS                  = $09000000;
  251.   {$EXTERNALSYM DIVIRTUAL_FIGHTING_FPS}
  252.   DIAXIS_FPS_ROTATE                       = $09008201; (* Rotate character left/right *)
  253.   {$EXTERNALSYM DIAXIS_FPS_ROTATE}
  254.   DIAXIS_FPS_MOVE                         = $09010202; (* Move forward/backward *)
  255.   {$EXTERNALSYM DIAXIS_FPS_MOVE}
  256.   DIBUTTON_FPS_FIRE                       = $09000401; (* Fire *)
  257.   {$EXTERNALSYM DIBUTTON_FPS_FIRE}
  258.   DIBUTTON_FPS_WEAPONS                    = $09000402; (* Select next weapon *)
  259.   {$EXTERNALSYM DIBUTTON_FPS_WEAPONS}
  260.   DIBUTTON_FPS_APPLY                      = $09000403; (* Use item *)
  261.   {$EXTERNALSYM DIBUTTON_FPS_APPLY}
  262.   DIBUTTON_FPS_SELECT                     = $09000404; (* Select next inventory item *)
  263.   {$EXTERNALSYM DIBUTTON_FPS_SELECT}
  264.   DIBUTTON_FPS_CROUCH                     = $09000405; (* Crouch/ climb down/ swim down *)
  265.   {$EXTERNALSYM DIBUTTON_FPS_CROUCH}
  266.   DIBUTTON_FPS_JUMP                       = $09000406; (* Jump/ climb up/ swim up *)
  267.   {$EXTERNALSYM DIBUTTON_FPS_JUMP}
  268.   DIAXIS_FPS_LOOKUPDOWN                   = $09018203; (* Look up / down  *)
  269.   {$EXTERNALSYM DIAXIS_FPS_LOOKUPDOWN}
  270.   DIBUTTON_FPS_STRAFE                     = $09000407; (* Enable strafing while active *)
  271.   {$EXTERNALSYM DIBUTTON_FPS_STRAFE}
  272.   DIBUTTON_FPS_MENU                       = $090004FD; (* Show menu options *)
  273.   {$EXTERNALSYM DIBUTTON_FPS_MENU}
  274. (*--- Priority 2 controls                            ---*)
  275.   DIHATSWITCH_FPS_GLANCE                  = $09004601; (* Look around *)
  276.   {$EXTERNALSYM DIHATSWITCH_FPS_GLANCE}
  277.   DIBUTTON_FPS_DISPLAY                    = $09004408; (* Shows next on-screen display option/ map *)
  278.   {$EXTERNALSYM DIBUTTON_FPS_DISPLAY}
  279.   DIAXIS_FPS_SIDESTEP                     = $09024204; (* Sidestep *)
  280.   {$EXTERNALSYM DIAXIS_FPS_SIDESTEP}
  281.   DIBUTTON_FPS_DODGE                      = $09004409; (* Dodge *)
  282.   {$EXTERNALSYM DIBUTTON_FPS_DODGE}
  283.   DIBUTTON_FPS_GLANCEL                    = $0900440A; (* Glance Left *)
  284.   {$EXTERNALSYM DIBUTTON_FPS_GLANCEL}
  285.   DIBUTTON_FPS_GLANCER                    = $0900440B; (* Glance Right *)
  286.   {$EXTERNALSYM DIBUTTON_FPS_GLANCER}
  287.   DIBUTTON_FPS_FIRESECONDARY              = $0900440C; (* Alternative fire button *)
  288.   {$EXTERNALSYM DIBUTTON_FPS_FIRESECONDARY}
  289.   DIBUTTON_FPS_ROTATE_LEFT_LINK           = $0900C4E4; (* Fallback rotate left button *)
  290.   {$EXTERNALSYM DIBUTTON_FPS_ROTATE_LEFT_LINK}
  291.   DIBUTTON_FPS_ROTATE_RIGHT_LINK          = $0900C4EC; (* Fallback rotate right button *)
  292.   {$EXTERNALSYM DIBUTTON_FPS_ROTATE_RIGHT_LINK}
  293.   DIBUTTON_FPS_FORWARD_LINK               = $090144E0; (* Fallback forward button *)
  294.   {$EXTERNALSYM DIBUTTON_FPS_FORWARD_LINK}
  295.   DIBUTTON_FPS_BACKWARD_LINK              = $090144E8; (* Fallback backward button *)
  296.   {$EXTERNALSYM DIBUTTON_FPS_BACKWARD_LINK}
  297.   DIBUTTON_FPS_GLANCE_UP_LINK             = $0901C4E0; (* Fallback look up button *)
  298.   {$EXTERNALSYM DIBUTTON_FPS_GLANCE_UP_LINK}
  299.   DIBUTTON_FPS_GLANCE_DOWN_LINK           = $0901C4E8; (* Fallback look down button *)
  300.   {$EXTERNALSYM DIBUTTON_FPS_GLANCE_DOWN_LINK}
  301.   DIBUTTON_FPS_STEP_LEFT_LINK             = $090244E4; (* Fallback step left button *)
  302.   {$EXTERNALSYM DIBUTTON_FPS_STEP_LEFT_LINK}
  303.   DIBUTTON_FPS_STEP_RIGHT_LINK            = $090244EC; (* Fallback step right button *)
  304.   {$EXTERNALSYM DIBUTTON_FPS_STEP_RIGHT_LINK}
  305.   DIBUTTON_FPS_DEVICE                     = $090044FE; (* Show input device and controls *)
  306.   {$EXTERNALSYM DIBUTTON_FPS_DEVICE}
  307.   DIBUTTON_FPS_PAUSE                      = $090044FC; (* Start / Pause / Restart game *)
  308.   {$EXTERNALSYM DIBUTTON_FPS_PAUSE}
  309. (*--- Fighting - Third Person action
  310.       Perspective of camera is behind the main character  ---*)
  311.   DIVIRTUAL_FIGHTING_THIRDPERSON          = $0A000000;
  312.   {$EXTERNALSYM DIVIRTUAL_FIGHTING_THIRDPERSON}
  313.   DIAXIS_TPS_TURN                         = $0A020201; (* Turn left/right *)
  314.   {$EXTERNALSYM DIAXIS_TPS_TURN}
  315.   DIAXIS_TPS_MOVE                         = $0A010202; (* Move forward/backward *)
  316.   {$EXTERNALSYM DIAXIS_TPS_MOVE}
  317.   DIBUTTON_TPS_RUN                        = $0A000401; (* Run or walk toggle switch *)
  318.   {$EXTERNALSYM DIBUTTON_TPS_RUN}
  319.   DIBUTTON_TPS_ACTION                     = $0A000402; (* Action Button *)
  320.   {$EXTERNALSYM DIBUTTON_TPS_ACTION}
  321.   DIBUTTON_TPS_SELECT                     = $0A000403; (* Select next weapon *)
  322.   {$EXTERNALSYM DIBUTTON_TPS_SELECT}
  323.   DIBUTTON_TPS_USE                        = $0A000404; (* Use inventory item currently selected *)
  324.   {$EXTERNALSYM DIBUTTON_TPS_USE}
  325.   DIBUTTON_TPS_JUMP                       = $0A000405; (* Character Jumps *)
  326.   {$EXTERNALSYM DIBUTTON_TPS_JUMP}
  327.   DIBUTTON_TPS_MENU                       = $0A0004FD; (* Show menu options *)
  328.   {$EXTERNALSYM DIBUTTON_TPS_MENU}
  329. (*--- Priority 2 controls                            ---*)
  330.   DIHATSWITCH_TPS_GLANCE                  = $0A004601; (* Look around *)
  331.   {$EXTERNALSYM DIHATSWITCH_TPS_GLANCE}
  332.   DIBUTTON_TPS_VIEW                       = $0A004406; (* Select camera view *)
  333.   {$EXTERNALSYM DIBUTTON_TPS_VIEW}
  334.   DIBUTTON_TPS_STEPLEFT                   = $0A004407; (* Character takes a left step *)
  335.   {$EXTERNALSYM DIBUTTON_TPS_STEPLEFT}
  336.   DIBUTTON_TPS_STEPRIGHT                  = $0A004408; (* Character takes a right step *)
  337.   {$EXTERNALSYM DIBUTTON_TPS_STEPRIGHT}
  338.   DIAXIS_TPS_STEP                         = $0A00C203; (* Character steps left/right *)
  339.   {$EXTERNALSYM DIAXIS_TPS_STEP}
  340.   DIBUTTON_TPS_DODGE                      = $0A004409; (* Character dodges or ducks *)
  341.   {$EXTERNALSYM DIBUTTON_TPS_DODGE}
  342.   DIBUTTON_TPS_INVENTORY                  = $0A00440A; (* Cycle through inventory *)
  343.   {$EXTERNALSYM DIBUTTON_TPS_INVENTORY}
  344.   DIBUTTON_TPS_TURN_LEFT_LINK             = $0A0244E4; (* Fallback turn left button *)
  345.   {$EXTERNALSYM DIBUTTON_TPS_TURN_LEFT_LINK}
  346.   DIBUTTON_TPS_TURN_RIGHT_LINK            = $0A0244EC; (* Fallback turn right button *)
  347.   {$EXTERNALSYM DIBUTTON_TPS_TURN_RIGHT_LINK}
  348.   DIBUTTON_TPS_FORWARD_LINK               = $0A0144E0; (* Fallback forward button *)
  349.   {$EXTERNALSYM DIBUTTON_TPS_FORWARD_LINK}
  350.   DIBUTTON_TPS_BACKWARD_LINK              = $0A0144E8; (* Fallback backward button *)
  351.   {$EXTERNALSYM DIBUTTON_TPS_BACKWARD_LINK}
  352.   DIBUTTON_TPS_GLANCE_UP_LINK             = $0A07C4E0; (* Fallback look up button *)
  353.   {$EXTERNALSYM DIBUTTON_TPS_GLANCE_UP_LINK}
  354.   DIBUTTON_TPS_GLANCE_DOWN_LINK           = $0A07C4E8; (* Fallback look down button *)
  355.   {$EXTERNALSYM DIBUTTON_TPS_GLANCE_DOWN_LINK}
  356.   DIBUTTON_TPS_GLANCE_LEFT_LINK           = $0A07C4E4; (* Fallback glance up button *)
  357.   {$EXTERNALSYM DIBUTTON_TPS_GLANCE_LEFT_LINK}
  358.   DIBUTTON_TPS_GLANCE_RIGHT_LINK          = $0A07C4EC; (* Fallback glance right button *)
  359.   {$EXTERNALSYM DIBUTTON_TPS_GLANCE_RIGHT_LINK}
  360.   DIBUTTON_TPS_DEVICE                     = $0A0044FE; (* Show input device and controls *)
  361.   {$EXTERNALSYM DIBUTTON_TPS_DEVICE}
  362.   DIBUTTON_TPS_PAUSE                      = $0A0044FC; (* Start / Pause / Restart game *)
  363.   {$EXTERNALSYM DIBUTTON_TPS_PAUSE}
  364. (*--- Strategy - Role Playing
  365.       Navigation and problem solving are primary actions  ---*)
  366.   DIVIRTUAL_STRATEGY_ROLEPLAYING          = $0B000000;
  367.   {$EXTERNALSYM DIVIRTUAL_STRATEGY_ROLEPLAYING}
  368.   DIAXIS_STRATEGYR_LATERAL                = $0B008201; (* sidestep - left/right *)
  369.   {$EXTERNALSYM DIAXIS_STRATEGYR_LATERAL}
  370.   DIAXIS_STRATEGYR_MOVE                   = $0B010202; (* move forward/backward *)
  371.   {$EXTERNALSYM DIAXIS_STRATEGYR_MOVE}
  372.   DIBUTTON_STRATEGYR_GET                  = $0B000401; (* Acquire item *)
  373.   {$EXTERNALSYM DIBUTTON_STRATEGYR_GET}
  374.   DIBUTTON_STRATEGYR_APPLY                = $0B000402; (* Use selected item *)
  375.   {$EXTERNALSYM DIBUTTON_STRATEGYR_APPLY}
  376.   DIBUTTON_STRATEGYR_SELECT               = $0B000403; (* Select nextitem *)
  377.   {$EXTERNALSYM DIBUTTON_STRATEGYR_SELECT}
  378.   DIBUTTON_STRATEGYR_ATTACK               = $0B000404; (* Attack *)
  379.   {$EXTERNALSYM DIBUTTON_STRATEGYR_ATTACK}
  380.   DIBUTTON_STRATEGYR_CAST                 = $0B000405; (* Cast Spell *)
  381.   {$EXTERNALSYM DIBUTTON_STRATEGYR_CAST}
  382.   DIBUTTON_STRATEGYR_CROUCH               = $0B000406; (* Crouch *)
  383.   {$EXTERNALSYM DIBUTTON_STRATEGYR_CROUCH}
  384.   DIBUTTON_STRATEGYR_JUMP                 = $0B000407; (* Jump *)
  385.   {$EXTERNALSYM DIBUTTON_STRATEGYR_JUMP}
  386.   DIBUTTON_STRATEGYR_MENU                 = $0B0004FD; (* Show menu options *)
  387.   {$EXTERNALSYM DIBUTTON_STRATEGYR_MENU}
  388. (*--- Priority 2 controls                            ---*)
  389.   DIHATSWITCH_STRATEGYR_GLANCE            = $0B004601; (* Look around *)
  390.   {$EXTERNALSYM DIHATSWITCH_STRATEGYR_GLANCE}
  391.   DIBUTTON_STRATEGYR_MAP                  = $0B004408; (* Cycle through map options *)
  392.   {$EXTERNALSYM DIBUTTON_STRATEGYR_MAP}
  393.   DIBUTTON_STRATEGYR_DISPLAY              = $0B004409; (* Shows next on-screen display option *)
  394.   {$EXTERNALSYM DIBUTTON_STRATEGYR_DISPLAY}
  395.   DIAXIS_STRATEGYR_ROTATE                 = $0B024203; (* Turn body left/right *)
  396.   {$EXTERNALSYM DIAXIS_STRATEGYR_ROTATE}
  397.   DIBUTTON_STRATEGYR_LEFT_LINK            = $0B00C4E4; (* Fallback sidestep left button *)
  398.   {$EXTERNALSYM DIBUTTON_STRATEGYR_LEFT_LINK}
  399.   DIBUTTON_STRATEGYR_RIGHT_LINK           = $0B00C4EC; (* Fallback sidestep right button *)
  400.   {$EXTERNALSYM DIBUTTON_STRATEGYR_RIGHT_LINK}
  401.   DIBUTTON_STRATEGYR_FORWARD_LINK         = $0B0144E0; (* Fallback move forward button *)
  402.   {$EXTERNALSYM DIBUTTON_STRATEGYR_FORWARD_LINK}
  403.   DIBUTTON_STRATEGYR_BACK_LINK            = $0B0144E8; (* Fallback move backward button *)
  404.   {$EXTERNALSYM DIBUTTON_STRATEGYR_BACK_LINK}
  405.   DIBUTTON_STRATEGYR_ROTATE_LEFT_LINK     = $0B0244E4; (* Fallback turn body left button *)
  406.   {$EXTERNALSYM DIBUTTON_STRATEGYR_ROTATE_LEFT_LINK}
  407.   DIBUTTON_STRATEGYR_ROTATE_RIGHT_LINK    = $0B0244EC; (* Fallback turn body right button *)
  408.   {$EXTERNALSYM DIBUTTON_STRATEGYR_ROTATE_RIGHT_LINK}
  409.   DIBUTTON_STRATEGYR_DEVICE               = $0B0044FE; (* Show input device and controls *)
  410.   {$EXTERNALSYM DIBUTTON_STRATEGYR_DEVICE}
  411.   DIBUTTON_STRATEGYR_PAUSE                = $0B0044FC; (* Start / Pause / Restart game *)
  412.   {$EXTERNALSYM DIBUTTON_STRATEGYR_PAUSE}
  413. (*--- Strategy - Turn based
  414.       Navigation and problem solving are primary actions  ---*)
  415.   DIVIRTUAL_STRATEGY_TURN                 = $0C000000;
  416.   {$EXTERNALSYM DIVIRTUAL_STRATEGY_TURN}
  417.   DIAXIS_STRATEGYT_LATERAL                = $0C008201; (* Sidestep left/right *)
  418.   {$EXTERNALSYM DIAXIS_STRATEGYT_LATERAL}
  419.   DIAXIS_STRATEGYT_MOVE                   = $0C010202; (* Move forward/backwards *)
  420.   {$EXTERNALSYM DIAXIS_STRATEGYT_MOVE}
  421.   DIBUTTON_STRATEGYT_SELECT               = $0C000401; (* Select unit or object *)
  422.   {$EXTERNALSYM DIBUTTON_STRATEGYT_SELECT}
  423.   DIBUTTON_STRATEGYT_INSTRUCT             = $0C000402; (* Cycle through instructions *)
  424.   {$EXTERNALSYM DIBUTTON_STRATEGYT_INSTRUCT}
  425.   DIBUTTON_STRATEGYT_APPLY                = $0C000403; (* Apply selected instruction *)
  426.   {$EXTERNALSYM DIBUTTON_STRATEGYT_APPLY}
  427.   DIBUTTON_STRATEGYT_TEAM                 = $0C000404; (* Select next team / cycle through all *)
  428.   {$EXTERNALSYM DIBUTTON_STRATEGYT_TEAM}
  429.   DIBUTTON_STRATEGYT_TURN                 = $0C000405; (* Indicate turn over *)
  430.   {$EXTERNALSYM DIBUTTON_STRATEGYT_TURN}
  431.   DIBUTTON_STRATEGYT_MENU                 = $0C0004FD; (* Show menu options *)
  432.   {$EXTERNALSYM DIBUTTON_STRATEGYT_MENU}
  433. (*--- Priority 2 controls                            ---*)
  434.   DIBUTTON_STRATEGYT_ZOOM                 = $0C004406; (* Zoom - in / out *)
  435.   {$EXTERNALSYM DIBUTTON_STRATEGYT_ZOOM}
  436.   DIBUTTON_STRATEGYT_MAP                  = $0C004407; (* cycle through map options *)
  437.   {$EXTERNALSYM DIBUTTON_STRATEGYT_MAP}
  438.   DIBUTTON_STRATEGYT_DISPLAY              = $0C004408; (* shows next on-screen display options *)
  439.   {$EXTERNALSYM DIBUTTON_STRATEGYT_DISPLAY}
  440.   DIBUTTON_STRATEGYT_LEFT_LINK            = $0C00C4E4; (* Fallback sidestep left button *)
  441.   {$EXTERNALSYM DIBUTTON_STRATEGYT_LEFT_LINK}
  442.   DIBUTTON_STRATEGYT_RIGHT_LINK           = $0C00C4EC; (* Fallback sidestep right button *)
  443.   {$EXTERNALSYM DIBUTTON_STRATEGYT_RIGHT_LINK}
  444.   DIBUTTON_STRATEGYT_FORWARD_LINK         = $0C0144E0; (* Fallback move forward button *)
  445.   {$EXTERNALSYM DIBUTTON_STRATEGYT_FORWARD_LINK}
  446.   DIBUTTON_STRATEGYT_BACK_LINK            = $0C0144E8; (* Fallback move back button *)
  447.   {$EXTERNALSYM DIBUTTON_STRATEGYT_BACK_LINK}
  448.   DIBUTTON_STRATEGYT_DEVICE               = $0C0044FE; (* Show input device and controls *)
  449.   {$EXTERNALSYM DIBUTTON_STRATEGYT_DEVICE}
  450.   DIBUTTON_STRATEGYT_PAUSE                = $0C0044FC; (* Start / Pause / Restart game *)
  451.   {$EXTERNALSYM DIBUTTON_STRATEGYT_PAUSE}
  452. (*--- Sports - Hunting
  453.       Hunting                ---*)
  454.   DIVIRTUAL_SPORTS_HUNTING                = $0D000000;
  455.   {$EXTERNALSYM DIVIRTUAL_SPORTS_HUNTING}
  456.   DIAXIS_HUNTING_LATERAL                  = $0D008201; (* sidestep left/right *)
  457.   {$EXTERNALSYM DIAXIS_HUNTING_LATERAL}
  458.   DIAXIS_HUNTING_MOVE                     = $0D010202; (* move forward/backwards *)
  459.   {$EXTERNALSYM DIAXIS_HUNTING_MOVE}
  460.   DIBUTTON_HUNTING_FIRE                   = $0D000401; (* Fire selected weapon *)
  461.   {$EXTERNALSYM DIBUTTON_HUNTING_FIRE}
  462.   DIBUTTON_HUNTING_AIM                    = $0D000402; (* Select aim/move *)
  463.   {$EXTERNALSYM DIBUTTON_HUNTING_AIM}
  464.   DIBUTTON_HUNTING_WEAPON                 = $0D000403; (* Select next weapon *)
  465.   {$EXTERNALSYM DIBUTTON_HUNTING_WEAPON}
  466.   DIBUTTON_HUNTING_BINOCULAR              = $0D000404; (* Look through Binoculars *)
  467.   {$EXTERNALSYM DIBUTTON_HUNTING_BINOCULAR}
  468.   DIBUTTON_HUNTING_CALL                   = $0D000405; (* Make animal call *)
  469.   {$EXTERNALSYM DIBUTTON_HUNTING_CALL}
  470.   DIBUTTON_HUNTING_MAP                    = $0D000406; (* View Map *)
  471.   {$EXTERNALSYM DIBUTTON_HUNTING_MAP}
  472.   DIBUTTON_HUNTING_SPECIAL                = $0D000407; (* Special game operation *)
  473.   {$EXTERNALSYM DIBUTTON_HUNTING_SPECIAL}
  474.   DIBUTTON_HUNTING_MENU                   = $0D0004FD; (* Show menu options *)
  475.   {$EXTERNALSYM DIBUTTON_HUNTING_MENU}
  476. (*--- Priority 2 controls                            ---*)
  477.   DIHATSWITCH_HUNTING_GLANCE              = $0D004601; (* Look around *)
  478.   {$EXTERNALSYM DIHATSWITCH_HUNTING_GLANCE}
  479.   DIBUTTON_HUNTING_DISPLAY                = $0D004408; (* show next on-screen display option *)
  480.   {$EXTERNALSYM DIBUTTON_HUNTING_DISPLAY}
  481.   DIAXIS_HUNTING_ROTATE                   = $0D024203; (* Turn body left/right *)
  482.   {$EXTERNALSYM DIAXIS_HUNTING_ROTATE}
  483.   DIBUTTON_HUNTING_CROUCH                 = $0D004409; (* Crouch/ Climb / Swim down *)
  484.   {$EXTERNALSYM DIBUTTON_HUNTING_CROUCH}
  485.   DIBUTTON_HUNTING_JUMP                   = $0D00440A; (* Jump/ Climb up / Swim up *)
  486.   {$EXTERNALSYM DIBUTTON_HUNTING_JUMP}
  487.   DIBUTTON_HUNTING_FIRESECONDARY          = $0D00440B; (* Alternative fire button *)
  488.   {$EXTERNALSYM DIBUTTON_HUNTING_FIRESECONDARY}
  489.   DIBUTTON_HUNTING_LEFT_LINK              = $0D00C4E4; (* Fallback sidestep left button *)
  490.   {$EXTERNALSYM DIBUTTON_HUNTING_LEFT_LINK}
  491.   DIBUTTON_HUNTING_RIGHT_LINK             = $0D00C4EC; (* Fallback sidestep right button *)
  492.   {$EXTERNALSYM DIBUTTON_HUNTING_RIGHT_LINK}
  493.   DIBUTTON_HUNTING_FORWARD_LINK           = $0D0144E0; (* Fallback move forward button *)
  494.   {$EXTERNALSYM DIBUTTON_HUNTING_FORWARD_LINK}
  495.   DIBUTTON_HUNTING_BACK_LINK              = $0D0144E8; (* Fallback move back button *)
  496.   {$EXTERNALSYM DIBUTTON_HUNTING_BACK_LINK}
  497.   DIBUTTON_HUNTING_ROTATE_LEFT_LINK       = $0D0244E4; (* Fallback turn body left button *)
  498.   {$EXTERNALSYM DIBUTTON_HUNTING_ROTATE_LEFT_LINK}
  499.   DIBUTTON_HUNTING_ROTATE_RIGHT_LINK      = $0D0244EC; (* Fallback turn body right button *)
  500.   {$EXTERNALSYM DIBUTTON_HUNTING_ROTATE_RIGHT_LINK}
  501.   DIBUTTON_HUNTING_DEVICE                 = $0D0044FE; (* Show input device and controls *)
  502.   {$EXTERNALSYM DIBUTTON_HUNTING_DEVICE}
  503.   DIBUTTON_HUNTING_PAUSE                  = $0D0044FC; (* Start / Pause / Restart game *)
  504.   {$EXTERNALSYM DIBUTTON_HUNTING_PAUSE}
  505. (*--- Sports - Fishing
  506.       Catching Fish is primary objective   ---*)
  507.   DIVIRTUAL_SPORTS_FISHING                = $0E000000;
  508.   {$EXTERNALSYM DIVIRTUAL_SPORTS_FISHING}
  509.   DIAXIS_FISHING_LATERAL                  = $0E008201; (* sidestep left/right *)
  510.   {$EXTERNALSYM DIAXIS_FISHING_LATERAL}
  511.   DIAXIS_FISHING_MOVE                     = $0E010202; (* move forward/backwards *)
  512.   {$EXTERNALSYM DIAXIS_FISHING_MOVE}
  513.   DIBUTTON_FISHING_CAST                   = $0E000401; (* Cast line *)
  514.   {$EXTERNALSYM DIBUTTON_FISHING_CAST}
  515.   DIBUTTON_FISHING_TYPE                   = $0E000402; (* Select cast type *)
  516.   {$EXTERNALSYM DIBUTTON_FISHING_TYPE}
  517.   DIBUTTON_FISHING_BINOCULAR              = $0E000403; (* Look through Binocular *)
  518.   {$EXTERNALSYM DIBUTTON_FISHING_BINOCULAR}
  519.   DIBUTTON_FISHING_BAIT                   = $0E000404; (* Select type of Bait *)
  520.   {$EXTERNALSYM DIBUTTON_FISHING_BAIT}
  521.   DIBUTTON_FISHING_MAP                    = $0E000405; (* View Map *)
  522.   {$EXTERNALSYM DIBUTTON_FISHING_MAP}
  523.   DIBUTTON_FISHING_MENU                   = $0E0004FD; (* Show menu options *)
  524.   {$EXTERNALSYM DIBUTTON_FISHING_MENU}
  525. (*--- Priority 2 controls                            ---*)
  526.   DIHATSWITCH_FISHING_GLANCE              = $0E004601; (* Look around *)
  527.   {$EXTERNALSYM DIHATSWITCH_FISHING_GLANCE}
  528.   DIBUTTON_FISHING_DISPLAY                = $0E004406; (* Show next on-screen display option *)
  529.   {$EXTERNALSYM DIBUTTON_FISHING_DISPLAY}
  530.   DIAXIS_FISHING_ROTATE                   = $0E024203; (* Turn character left / right *)
  531.   {$EXTERNALSYM DIAXIS_FISHING_ROTATE}
  532.   DIBUTTON_FISHING_CROUCH                 = $0E004407; (* Crouch/ Climb / Swim down *)
  533.   {$EXTERNALSYM DIBUTTON_FISHING_CROUCH}
  534.   DIBUTTON_FISHING_JUMP                   = $0E004408; (* Jump/ Climb up / Swim up *)
  535.   {$EXTERNALSYM DIBUTTON_FISHING_JUMP}
  536.   DIBUTTON_FISHING_LEFT_LINK              = $0E00C4E4; (* Fallback sidestep left button *)
  537.   {$EXTERNALSYM DIBUTTON_FISHING_LEFT_LINK}
  538.   DIBUTTON_FISHING_RIGHT_LINK             = $0E00C4EC; (* Fallback sidestep right button *)
  539.   {$EXTERNALSYM DIBUTTON_FISHING_RIGHT_LINK}
  540.   DIBUTTON_FISHING_FORWARD_LINK           = $0E0144E0; (* Fallback move forward button *)
  541.   {$EXTERNALSYM DIBUTTON_FISHING_FORWARD_LINK}
  542.   DIBUTTON_FISHING_BACK_LINK              = $0E0144E8; (* Fallback move back button *)
  543.   {$EXTERNALSYM DIBUTTON_FISHING_BACK_LINK}
  544.   DIBUTTON_FISHING_ROTATE_LEFT_LINK       = $0E0244E4; (* Fallback turn body left button *)
  545.   {$EXTERNALSYM DIBUTTON_FISHING_ROTATE_LEFT_LINK}
  546.   DIBUTTON_FISHING_ROTATE_RIGHT_LINK      = $0E0244EC; (* Fallback turn body right button *)
  547.   {$EXTERNALSYM DIBUTTON_FISHING_ROTATE_RIGHT_LINK}
  548.   DIBUTTON_FISHING_DEVICE                 = $0E0044FE; (* Show input device and controls *)
  549.   {$EXTERNALSYM DIBUTTON_FISHING_DEVICE}
  550.   DIBUTTON_FISHING_PAUSE                  = $0E0044FC; (* Start / Pause / Restart game *)
  551.   {$EXTERNALSYM DIBUTTON_FISHING_PAUSE}
  552. (*--- Sports - Baseball - Batting
  553.       Batter control is primary objective  ---*)
  554.   DIVIRTUAL_SPORTS_BASEBALL_BAT           = $0F000000;
  555.   {$EXTERNALSYM DIVIRTUAL_SPORTS_BASEBALL_BAT}
  556.   DIAXIS_BASEBALLB_LATERAL                = $0F008201; (* Aim left / right *)
  557.   {$EXTERNALSYM DIAXIS_BASEBALLB_LATERAL}
  558.   DIAXIS_BASEBALLB_MOVE                   = $0F010202; (* Aim up / down *)
  559.   {$EXTERNALSYM DIAXIS_BASEBALLB_MOVE}
  560.   DIBUTTON_BASEBALLB_SELECT               = $0F000401; (* cycle through swing options *)
  561.   {$EXTERNALSYM DIBUTTON_BASEBALLB_SELECT}
  562.   DIBUTTON_BASEBALLB_NORMAL               = $0F000402; (* normal swing *)
  563.   {$EXTERNALSYM DIBUTTON_BASEBALLB_NORMAL}
  564.   DIBUTTON_BASEBALLB_POWER                = $0F000403; (* swing for the fence *)
  565.   {$EXTERNALSYM DIBUTTON_BASEBALLB_POWER}
  566.   DIBUTTON_BASEBALLB_BUNT                 = $0F000404; (* bunt *)
  567.   {$EXTERNALSYM DIBUTTON_BASEBALLB_BUNT}
  568.   DIBUTTON_BASEBALLB_STEAL                = $0F000405; (* Base runner attempts to steal a base *)
  569.   {$EXTERNALSYM DIBUTTON_BASEBALLB_STEAL}
  570.   DIBUTTON_BASEBALLB_BURST                = $0F000406; (* Base runner invokes burst of speed *)
  571.   {$EXTERNALSYM DIBUTTON_BASEBALLB_BURST}
  572.   DIBUTTON_BASEBALLB_SLIDE                = $0F000407; (* Base runner slides into base *)
  573.   {$EXTERNALSYM DIBUTTON_BASEBALLB_SLIDE}
  574.   DIBUTTON_BASEBALLB_CONTACT              = $0F000408; (* Contact swing *)
  575.   {$EXTERNALSYM DIBUTTON_BASEBALLB_CONTACT}
  576.   DIBUTTON_BASEBALLB_MENU                 = $0F0004FD; (* Show menu options *)
  577.   {$EXTERNALSYM DIBUTTON_BASEBALLB_MENU}
  578. (*--- Priority 2 controls                            ---*)
  579.   DIBUTTON_BASEBALLB_NOSTEAL              = $0F004409; (* Base runner goes back to a base *)
  580.   {$EXTERNALSYM DIBUTTON_BASEBALLB_NOSTEAL}
  581.   DIBUTTON_BASEBALLB_BOX                  = $0F00440A; (* Enter or exit batting box *)
  582.   {$EXTERNALSYM DIBUTTON_BASEBALLB_BOX}
  583.   DIBUTTON_BASEBALLB_LEFT_LINK            = $0F00C4E4; (* Fallback sidestep left button *)
  584.   {$EXTERNALSYM DIBUTTON_BASEBALLB_LEFT_LINK}
  585.   DIBUTTON_BASEBALLB_RIGHT_LINK           = $0F00C4EC; (* Fallback sidestep right button *)
  586.   {$EXTERNALSYM DIBUTTON_BASEBALLB_RIGHT_LINK}
  587.   DIBUTTON_BASEBALLB_FORWARD_LINK         = $0F0144E0; (* Fallback move forward button *)
  588.   {$EXTERNALSYM DIBUTTON_BASEBALLB_FORWARD_LINK}
  589.   DIBUTTON_BASEBALLB_BACK_LINK            = $0F0144E8; (* Fallback move back button *)
  590.   {$EXTERNALSYM DIBUTTON_BASEBALLB_BACK_LINK}
  591.   DIBUTTON_BASEBALLB_DEVICE               = $0F0044FE; (* Show input device and controls *)
  592.   {$EXTERNALSYM DIBUTTON_BASEBALLB_DEVICE}
  593.   DIBUTTON_BASEBALLB_PAUSE                = $0F0044FC; (* Start / Pause / Restart game *)
  594.   {$EXTERNALSYM DIBUTTON_BASEBALLB_PAUSE}
  595. (*--- Sports - Baseball - Pitching
  596.       Pitcher control is primary objective   ---*)
  597.   DIVIRTUAL_SPORTS_BASEBALL_PITCH         = $10000000;
  598.   {$EXTERNALSYM DIVIRTUAL_SPORTS_BASEBALL_PITCH}
  599.   DIAXIS_BASEBALLP_LATERAL                = $10008201; (* Aim left / right *)
  600.   {$EXTERNALSYM DIAXIS_BASEBALLP_LATERAL}
  601.   DIAXIS_BASEBALLP_MOVE                   = $10010202; (* Aim up / down *)
  602.   {$EXTERNALSYM DIAXIS_BASEBALLP_MOVE}
  603.   DIBUTTON_BASEBALLP_SELECT               = $10000401; (* cycle through pitch selections *)
  604.   {$EXTERNALSYM DIBUTTON_BASEBALLP_SELECT}
  605.   DIBUTTON_BASEBALLP_PITCH                = $10000402; (* throw pitch *)
  606.   {$EXTERNALSYM DIBUTTON_BASEBALLP_PITCH}
  607.   DIBUTTON_BASEBALLP_BASE                 = $10000403; (* select base to throw to *)
  608.   {$EXTERNALSYM DIBUTTON_BASEBALLP_BASE}
  609.   DIBUTTON_BASEBALLP_THROW                = $10000404; (* throw to base *)
  610.   {$EXTERNALSYM DIBUTTON_BASEBALLP_THROW}
  611.   DIBUTTON_BASEBALLP_FAKE                 = $10000405; (* Fake a throw to a base *)
  612.   {$EXTERNALSYM DIBUTTON_BASEBALLP_FAKE}
  613.   DIBUTTON_BASEBALLP_MENU                 = $100004FD; (* Show menu options *)
  614.   {$EXTERNALSYM DIBUTTON_BASEBALLP_MENU}
  615. (*--- Priority 2 controls                            ---*)
  616.   DIBUTTON_BASEBALLP_WALK                 = $10004406; (* Throw intentional walk / pitch out *)
  617.   {$EXTERNALSYM DIBUTTON_BASEBALLP_WALK}
  618.   DIBUTTON_BASEBALLP_LOOK                 = $10004407; (* Look at runners on bases *)
  619.   {$EXTERNALSYM DIBUTTON_BASEBALLP_LOOK}
  620.   DIBUTTON_BASEBALLP_LEFT_LINK            = $1000C4E4; (* Fallback sidestep left button *)
  621.   {$EXTERNALSYM DIBUTTON_BASEBALLP_LEFT_LINK}
  622.   DIBUTTON_BASEBALLP_RIGHT_LINK           = $1000C4EC; (* Fallback sidestep right button *)
  623.   {$EXTERNALSYM DIBUTTON_BASEBALLP_RIGHT_LINK}
  624.   DIBUTTON_BASEBALLP_FORWARD_LINK         = $100144E0; (* Fallback move forward button *)
  625.   {$EXTERNALSYM DIBUTTON_BASEBALLP_FORWARD_LINK}
  626.   DIBUTTON_BASEBALLP_BACK_LINK            = $100144E8; (* Fallback move back button *)
  627.   {$EXTERNALSYM DIBUTTON_BASEBALLP_BACK_LINK}
  628.   DIBUTTON_BASEBALLP_DEVICE               = $100044FE; (* Show input device and controls *)
  629.   {$EXTERNALSYM DIBUTTON_BASEBALLP_DEVICE}
  630.   DIBUTTON_BASEBALLP_PAUSE                = $100044FC; (* Start / Pause / Restart game *)
  631.   {$EXTERNALSYM DIBUTTON_BASEBALLP_PAUSE}
  632. (*--- Sports - Baseball - Fielding
  633.       Fielder control is primary objective  ---*)
  634.   DIVIRTUAL_SPORTS_BASEBALL_FIELD         = $11000000;
  635.   {$EXTERNALSYM DIVIRTUAL_SPORTS_BASEBALL_FIELD}
  636.   DIAXIS_BASEBALLF_LATERAL                = $11008201; (* Aim left / right *)
  637.   {$EXTERNALSYM DIAXIS_BASEBALLF_LATERAL}
  638.   DIAXIS_BASEBALLF_MOVE                   = $11010202; (* Aim up / down *)
  639.   {$EXTERNALSYM DIAXIS_BASEBALLF_MOVE}
  640.   DIBUTTON_BASEBALLF_NEAREST              = $11000401; (* Switch to fielder nearest to the ball *)
  641.   {$EXTERNALSYM DIBUTTON_BASEBALLF_NEAREST}
  642.   DIBUTTON_BASEBALLF_THROW1               = $11000402; (* Make conservative throw *)
  643.   {$EXTERNALSYM DIBUTTON_BASEBALLF_THROW1}
  644.   DIBUTTON_BASEBALLF_THROW2               = $11000403; (* Make aggressive throw *)
  645.   {$EXTERNALSYM DIBUTTON_BASEBALLF_THROW2}
  646.   DIBUTTON_BASEBALLF_BURST                = $11000404; (* Invoke burst of speed *)
  647.   {$EXTERNALSYM DIBUTTON_BASEBALLF_BURST}
  648.   DIBUTTON_BASEBALLF_JUMP                 = $11000405; (* Jump to catch ball *)
  649.   {$EXTERNALSYM DIBUTTON_BASEBALLF_JUMP}
  650.   DIBUTTON_BASEBALLF_DIVE                 = $11000406; (* Dive to catch ball *)
  651.   {$EXTERNALSYM DIBUTTON_BASEBALLF_DIVE}
  652.   DIBUTTON_BASEBALLF_MENU                 = $110004FD; (* Show menu options *)
  653.   {$EXTERNALSYM DIBUTTON_BASEBALLF_MENU}
  654. (*--- Priority 2 controls                            ---*)
  655.   DIBUTTON_BASEBALLF_SHIFTIN              = $11004407; (* Shift the infield positioning *)
  656.   {$EXTERNALSYM DIBUTTON_BASEBALLF_SHIFTIN}
  657.   DIBUTTON_BASEBALLF_SHIFTOUT             = $11004408; (* Shift the outfield positioning *)
  658.   {$EXTERNALSYM DIBUTTON_BASEBALLF_SHIFTOUT}
  659.   DIBUTTON_BASEBALLF_AIM_LEFT_LINK        = $1100C4E4; (* Fallback aim left button *)
  660.   {$EXTERNALSYM DIBUTTON_BASEBALLF_AIM_LEFT_LINK}
  661.   DIBUTTON_BASEBALLF_AIM_RIGHT_LINK       = $1100C4EC; (* Fallback aim right button *)
  662.   {$EXTERNALSYM DIBUTTON_BASEBALLF_AIM_RIGHT_LINK}
  663.   DIBUTTON_BASEBALLF_FORWARD_LINK         = $110144E0; (* Fallback move forward button *)
  664.   {$EXTERNALSYM DIBUTTON_BASEBALLF_FORWARD_LINK}
  665.   DIBUTTON_BASEBALLF_BACK_LINK            = $110144E8; (* Fallback move back button *)
  666.   {$EXTERNALSYM DIBUTTON_BASEBALLF_BACK_LINK}
  667.   DIBUTTON_BASEBALLF_DEVICE               = $110044FE; (* Show input device and controls *)
  668.   {$EXTERNALSYM DIBUTTON_BASEBALLF_DEVICE}
  669.   DIBUTTON_BASEBALLF_PAUSE                = $110044FC; (* Start / Pause / Restart game *)
  670.   {$EXTERNALSYM DIBUTTON_BASEBALLF_PAUSE}
  671. (*--- Sports - Basketball - Offense
  672.       Offense  ---*)
  673.   DIVIRTUAL_SPORTS_BASKETBALL_OFFENSE     = $12000000;
  674.   {$EXTERNALSYM DIVIRTUAL_SPORTS_BASKETBALL_OFFENSE}
  675.   DIAXIS_BBALLO_LATERAL                   = $12008201; (* left / right *)
  676.   {$EXTERNALSYM DIAXIS_BBALLO_LATERAL}
  677.   DIAXIS_BBALLO_MOVE                      = $12010202; (* up / down *)
  678.   {$EXTERNALSYM DIAXIS_BBALLO_MOVE}
  679.   DIBUTTON_BBALLO_SHOOT                   = $12000401; (* shoot basket *)
  680.   {$EXTERNALSYM DIBUTTON_BBALLO_SHOOT}
  681.   DIBUTTON_BBALLO_DUNK                    = $12000402; (* dunk basket *)
  682.   {$EXTERNALSYM DIBUTTON_BBALLO_DUNK}
  683.   DIBUTTON_BBALLO_PASS                    = $12000403; (* throw pass *)
  684.   {$EXTERNALSYM DIBUTTON_BBALLO_PASS}
  685.   DIBUTTON_BBALLO_FAKE                    = $12000404; (* fake shot or pass *)
  686.   {$EXTERNALSYM DIBUTTON_BBALLO_FAKE}
  687.   DIBUTTON_BBALLO_SPECIAL                 = $12000405; (* apply special move *)
  688.   {$EXTERNALSYM DIBUTTON_BBALLO_SPECIAL}
  689.   DIBUTTON_BBALLO_PLAYER                  = $12000406; (* select next player *)
  690.   {$EXTERNALSYM DIBUTTON_BBALLO_PLAYER}
  691.   DIBUTTON_BBALLO_BURST                   = $12000407; (* invoke burst *)
  692.   {$EXTERNALSYM DIBUTTON_BBALLO_BURST}
  693.   DIBUTTON_BBALLO_CALL                    = $12000408; (* call for ball / pass to me *)
  694.   {$EXTERNALSYM DIBUTTON_BBALLO_CALL}
  695.   DIBUTTON_BBALLO_MENU                    = $120004FD; (* Show menu options *)
  696.   {$EXTERNALSYM DIBUTTON_BBALLO_MENU}
  697. (*--- Priority 2 controls                            ---*)
  698.   DIHATSWITCH_BBALLO_GLANCE               = $12004601; (* scroll view *)
  699.   {$EXTERNALSYM DIHATSWITCH_BBALLO_GLANCE}
  700.   DIBUTTON_BBALLO_SCREEN                  = $12004409; (* Call for screen *)
  701.   {$EXTERNALSYM DIBUTTON_BBALLO_SCREEN}
  702.   DIBUTTON_BBALLO_PLAY                    = $1200440A; (* Call for specific offensive play *)
  703.   {$EXTERNALSYM DIBUTTON_BBALLO_PLAY}
  704.   DIBUTTON_BBALLO_JAB                     = $1200440B; (* Initiate fake drive to basket *)
  705.   {$EXTERNALSYM DIBUTTON_BBALLO_JAB}
  706.   DIBUTTON_BBALLO_POST                    = $1200440C; (* Perform post move *)
  707.   {$EXTERNALSYM DIBUTTON_BBALLO_POST}
  708.   DIBUTTON_BBALLO_TIMEOUT                 = $1200440D; (* Time Out *)
  709.   {$EXTERNALSYM DIBUTTON_BBALLO_TIMEOUT}
  710.   DIBUTTON_BBALLO_SUBSTITUTE              = $1200440E; (* substitute one player for another *)
  711.   {$EXTERNALSYM DIBUTTON_BBALLO_SUBSTITUTE}
  712.   DIBUTTON_BBALLO_LEFT_LINK               = $1200C4E4; (* Fallback sidestep left button *)
  713.   {$EXTERNALSYM DIBUTTON_BBALLO_LEFT_LINK}
  714.   DIBUTTON_BBALLO_RIGHT_LINK              = $1200C4EC; (* Fallback sidestep right button *)
  715.   {$EXTERNALSYM DIBUTTON_BBALLO_RIGHT_LINK}
  716.   DIBUTTON_BBALLO_FORWARD_LINK            = $120144E0; (* Fallback move forward button *)
  717.   {$EXTERNALSYM DIBUTTON_BBALLO_FORWARD_LINK}
  718.   DIBUTTON_BBALLO_BACK_LINK               = $120144E8; (* Fallback move back button *)
  719.   {$EXTERNALSYM DIBUTTON_BBALLO_BACK_LINK}
  720.   DIBUTTON_BBALLO_DEVICE                  = $120044FE; (* Show input device and controls *)
  721.   {$EXTERNALSYM DIBUTTON_BBALLO_DEVICE}
  722.   DIBUTTON_BBALLO_PAUSE                   = $120044FC; (* Start / Pause / Restart game *)
  723.   {$EXTERNALSYM DIBUTTON_BBALLO_PAUSE}
  724. (*--- Sports - Basketball - Defense
  725.       Defense  ---*)
  726.   DIVIRTUAL_SPORTS_BASKETBALL_DEFENSE     = $13000000;
  727.   {$EXTERNALSYM DIVIRTUAL_SPORTS_BASKETBALL_DEFENSE}
  728.   DIAXIS_BBALLD_LATERAL                   = $13008201; (* left / right *)
  729.   {$EXTERNALSYM DIAXIS_BBALLD_LATERAL}
  730.   DIAXIS_BBALLD_MOVE                      = $13010202; (* up / down *)
  731.   {$EXTERNALSYM DIAXIS_BBALLD_MOVE}
  732.   DIBUTTON_BBALLD_JUMP                    = $13000401; (* jump to block shot *)
  733.   {$EXTERNALSYM DIBUTTON_BBALLD_JUMP}
  734.   DIBUTTON_BBALLD_STEAL                   = $13000402; (* attempt to steal ball *)
  735.   {$EXTERNALSYM DIBUTTON_BBALLD_STEAL}
  736.   DIBUTTON_BBALLD_FAKE                    = $13000403; (* fake block or steal *)
  737.   {$EXTERNALSYM DIBUTTON_BBALLD_FAKE}
  738.   DIBUTTON_BBALLD_SPECIAL                 = $13000404; (* apply special move *)
  739.   {$EXTERNALSYM DIBUTTON_BBALLD_SPECIAL}
  740.   DIBUTTON_BBALLD_PLAYER                  = $13000405; (* select next player *)
  741.   {$EXTERNALSYM DIBUTTON_BBALLD_PLAYER}
  742.   DIBUTTON_BBALLD_BURST                   = $13000406; (* invoke burst *)
  743.   {$EXTERNALSYM DIBUTTON_BBALLD_BURST}
  744.   DIBUTTON_BBALLD_PLAY                    = $13000407; (* call for specific defensive play *)
  745.   {$EXTERNALSYM DIBUTTON_BBALLD_PLAY}
  746.   DIBUTTON_BBALLD_MENU                    = $130004FD; (* Show menu options *)
  747.   {$EXTERNALSYM DIBUTTON_BBALLD_MENU}
  748. (*--- Priority 2 controls                            ---*)
  749.   DIHATSWITCH_BBALLD_GLANCE               = $13004601; (* scroll view *)
  750.   {$EXTERNALSYM DIHATSWITCH_BBALLD_GLANCE}
  751.   DIBUTTON_BBALLD_TIMEOUT                 = $13004408; (* Time Out *)
  752.   {$EXTERNALSYM DIBUTTON_BBALLD_TIMEOUT}
  753.   DIBUTTON_BBALLD_SUBSTITUTE              = $13004409; (* substitute one player for another *)
  754.   {$EXTERNALSYM DIBUTTON_BBALLD_SUBSTITUTE}
  755.   DIBUTTON_BBALLD_LEFT_LINK               = $1300C4E4; (* Fallback sidestep left button *)
  756.   {$EXTERNALSYM DIBUTTON_BBALLD_LEFT_LINK}
  757.   DIBUTTON_BBALLD_RIGHT_LINK              = $1300C4EC; (* Fallback sidestep right button *)
  758.   {$EXTERNALSYM DIBUTTON_BBALLD_RIGHT_LINK}
  759.   DIBUTTON_BBALLD_FORWARD_LINK            = $130144E0; (* Fallback move forward button *)
  760.   {$EXTERNALSYM DIBUTTON_BBALLD_FORWARD_LINK}
  761.   DIBUTTON_BBALLD_BACK_LINK               = $130144E8; (* Fallback move back button *)
  762.   {$EXTERNALSYM DIBUTTON_BBALLD_BACK_LINK}
  763.   DIBUTTON_BBALLD_DEVICE                  = $130044FE; (* Show input device and controls *)
  764.   {$EXTERNALSYM DIBUTTON_BBALLD_DEVICE}
  765.   DIBUTTON_BBALLD_PAUSE                   = $130044FC; (* Start / Pause / Restart game *)
  766.   {$EXTERNALSYM DIBUTTON_BBALLD_PAUSE}
  767. (*--- Sports - Football - Play
  768.       Play selection  ---*)
  769.   DIVIRTUAL_SPORTS_FOOTBALL_FIELD         = $14000000;
  770.   {$EXTERNALSYM DIVIRTUAL_SPORTS_FOOTBALL_FIELD}
  771.   DIBUTTON_FOOTBALLP_PLAY                 = $14000401; (* cycle through available plays *)
  772.   {$EXTERNALSYM DIBUTTON_FOOTBALLP_PLAY}
  773.   DIBUTTON_FOOTBALLP_SELECT               = $14000402; (* select play *)
  774.   {$EXTERNALSYM DIBUTTON_FOOTBALLP_SELECT}
  775.   DIBUTTON_FOOTBALLP_HELP                 = $14000403; (* Bring up pop-up help *)
  776.   {$EXTERNALSYM DIBUTTON_FOOTBALLP_HELP}
  777.   DIBUTTON_FOOTBALLP_MENU                 = $140004FD; (* Show menu options *)
  778.   {$EXTERNALSYM DIBUTTON_FOOTBALLP_MENU}
  779. (*--- Priority 2 controls                            ---*)
  780.   DIBUTTON_FOOTBALLP_DEVICE               = $140044FE; (* Show input device and controls *)
  781.   {$EXTERNALSYM DIBUTTON_FOOTBALLP_DEVICE}
  782.   DIBUTTON_FOOTBALLP_PAUSE                = $140044FC; (* Start / Pause / Restart game *)
  783.   {$EXTERNALSYM DIBUTTON_FOOTBALLP_PAUSE}
  784. (*--- Sports - Football - QB
  785.       Offense: Quarterback / Kicker  ---*)
  786.   DIVIRTUAL_SPORTS_FOOTBALL_QBCK          = $15000000;
  787.   {$EXTERNALSYM DIVIRTUAL_SPORTS_FOOTBALL_QBCK}
  788.   DIAXIS_FOOTBALLQ_LATERAL                = $15008201; (* Move / Aim: left / right *)
  789.   {$EXTERNALSYM DIAXIS_FOOTBALLQ_LATERAL}
  790.   DIAXIS_FOOTBALLQ_MOVE                   = $15010202; (* Move / Aim: up / down *)
  791.   {$EXTERNALSYM DIAXIS_FOOTBALLQ_MOVE}
  792.   DIBUTTON_FOOTBALLQ_SELECT               = $15000401; (* Select *)
  793.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_SELECT}
  794.   DIBUTTON_FOOTBALLQ_SNAP                 = $15000402; (* snap ball - start play *)
  795.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_SNAP}
  796.   DIBUTTON_FOOTBALLQ_JUMP                 = $15000403; (* jump over defender *)
  797.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_JUMP}
  798.   DIBUTTON_FOOTBALLQ_SLIDE                = $15000404; (* Dive/Slide *)
  799.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_SLIDE}
  800.   DIBUTTON_FOOTBALLQ_PASS                 = $15000405; (* throws pass to receiver *)
  801.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_PASS}
  802.   DIBUTTON_FOOTBALLQ_FAKE                 = $15000406; (* pump fake pass or fake kick *)
  803.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_FAKE}
  804.   DIBUTTON_FOOTBALLQ_MENU                 = $150004FD; (* Show menu options *)
  805.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_MENU}
  806. (*--- Priority 2 controls                            ---*)
  807.   DIBUTTON_FOOTBALLQ_FAKESNAP             = $15004407; (* Fake snap  *)
  808.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_FAKESNAP}
  809.   DIBUTTON_FOOTBALLQ_MOTION               = $15004408; (* Send receivers in motion *)
  810.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_MOTION}
  811.   DIBUTTON_FOOTBALLQ_AUDIBLE              = $15004409; (* Change offensive play at line of scrimmage *)
  812.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_AUDIBLE}
  813.   DIBUTTON_FOOTBALLQ_LEFT_LINK            = $1500C4E4; (* Fallback sidestep left button *)
  814.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_LEFT_LINK}
  815.   DIBUTTON_FOOTBALLQ_RIGHT_LINK           = $1500C4EC; (* Fallback sidestep right button *)
  816.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_RIGHT_LINK}
  817.   DIBUTTON_FOOTBALLQ_FORWARD_LINK         = $150144E0; (* Fallback move forward button *)
  818.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_FORWARD_LINK}
  819.   DIBUTTON_FOOTBALLQ_BACK_LINK            = $150144E8; (* Fallback move back button *)
  820.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_BACK_LINK}
  821.   DIBUTTON_FOOTBALLQ_DEVICE               = $150044FE; (* Show input device and controls *)
  822.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_DEVICE}
  823.   DIBUTTON_FOOTBALLQ_PAUSE                = $150044FC; (* Start / Pause / Restart game *)
  824.   {$EXTERNALSYM DIBUTTON_FOOTBALLQ_PAUSE}
  825. (*--- Sports - Football - Offense
  826.       Offense - Runner  ---*)
  827.   DIVIRTUAL_SPORTS_FOOTBALL_OFFENSE       = $16000000;
  828.   {$EXTERNALSYM DIVIRTUAL_SPORTS_FOOTBALL_OFFENSE}
  829.   DIAXIS_FOOTBALLO_LATERAL                = $16008201; (* Move / Aim: left / right *)
  830.   {$EXTERNALSYM DIAXIS_FOOTBALLO_LATERAL}
  831.   DIAXIS_FOOTBALLO_MOVE                   = $16010202; (* Move / Aim: up / down *)
  832.   {$EXTERNALSYM DIAXIS_FOOTBALLO_MOVE}
  833.   DIBUTTON_FOOTBALLO_JUMP                 = $16000401; (* jump or hurdle over defender *)
  834.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_JUMP}
  835.   DIBUTTON_FOOTBALLO_LEFTARM              = $16000402; (* holds out left arm *)
  836.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_LEFTARM}
  837.   DIBUTTON_FOOTBALLO_RIGHTARM             = $16000403; (* holds out right arm *)
  838.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_RIGHTARM}
  839.   DIBUTTON_FOOTBALLO_THROW                = $16000404; (* throw pass or lateral ball to another runner *)
  840.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_THROW}
  841.   DIBUTTON_FOOTBALLO_SPIN                 = $16000405; (* Spin to avoid defenders *)
  842.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_SPIN}
  843.   DIBUTTON_FOOTBALLO_MENU                 = $160004FD; (* Show menu options *)
  844.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_MENU}
  845. (*--- Priority 2 controls                            ---*)
  846.   DIBUTTON_FOOTBALLO_JUKE                 = $16004406; (* Use special move to avoid defenders *)
  847.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_JUKE}
  848.   DIBUTTON_FOOTBALLO_SHOULDER             = $16004407; (* Lower shoulder to run over defenders *)
  849.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_SHOULDER}
  850.   DIBUTTON_FOOTBALLO_TURBO                = $16004408; (* Speed burst past defenders *)
  851.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_TURBO}
  852.   DIBUTTON_FOOTBALLO_DIVE                 = $16004409; (* Dive over defenders *)
  853.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_DIVE}
  854.   DIBUTTON_FOOTBALLO_ZOOM                 = $1600440A; (* Zoom view in / out *)
  855.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_ZOOM}
  856.   DIBUTTON_FOOTBALLO_SUBSTITUTE           = $1600440B; (* substitute one player for another *)
  857.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_SUBSTITUTE}
  858.   DIBUTTON_FOOTBALLO_LEFT_LINK            = $1600C4E4; (* Fallback sidestep left button *)
  859.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_LEFT_LINK}
  860.   DIBUTTON_FOOTBALLO_RIGHT_LINK           = $1600C4EC; (* Fallback sidestep right button *)
  861.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_RIGHT_LINK}
  862.   DIBUTTON_FOOTBALLO_FORWARD_LINK         = $160144E0; (* Fallback move forward button *)
  863.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_FORWARD_LINK}
  864.   DIBUTTON_FOOTBALLO_BACK_LINK            = $160144E8; (* Fallback move back button *)
  865.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_BACK_LINK}
  866.   DIBUTTON_FOOTBALLO_DEVICE               = $160044FE; (* Show input device and controls *)
  867.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_DEVICE}
  868.   DIBUTTON_FOOTBALLO_PAUSE                = $160044FC; (* Start / Pause / Restart game *)
  869.   {$EXTERNALSYM DIBUTTON_FOOTBALLO_PAUSE}
  870. (*--- Sports - Football - Defense
  871.       Defense     ---*)
  872.   DIVIRTUAL_SPORTS_FOOTBALL_DEFENSE       = $17000000;
  873.   {$EXTERNALSYM DIVIRTUAL_SPORTS_FOOTBALL_DEFENSE}
  874.   DIAXIS_FOOTBALLD_LATERAL                = $17008201; (* Move / Aim: left / right *)
  875.   {$EXTERNALSYM DIAXIS_FOOTBALLD_LATERAL}
  876.   DIAXIS_FOOTBALLD_MOVE                   = $17010202; (* Move / Aim: up / down *)
  877.   {$EXTERNALSYM DIAXIS_FOOTBALLD_MOVE}
  878.   DIBUTTON_FOOTBALLD_PLAY                 = $17000401; (* cycle through available plays *)
  879.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_PLAY}
  880.   DIBUTTON_FOOTBALLD_SELECT               = $17000402; (* select player closest to the ball *)
  881.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_SELECT}
  882.   DIBUTTON_FOOTBALLD_JUMP                 = $17000403; (* jump to intercept or block *)
  883.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_JUMP}
  884.   DIBUTTON_FOOTBALLD_TACKLE               = $17000404; (* tackler runner *)
  885.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_TACKLE}
  886.   DIBUTTON_FOOTBALLD_FAKE                 = $17000405; (* hold down to fake tackle or intercept *)
  887.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_FAKE}
  888.   DIBUTTON_FOOTBALLD_SUPERTACKLE          = $17000406; (* Initiate special tackle *)
  889.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_SUPERTACKLE}
  890.   DIBUTTON_FOOTBALLD_MENU                 = $170004FD; (* Show menu options *)
  891.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_MENU}
  892. (*--- Priority 2 controls                            ---*)
  893.   DIBUTTON_FOOTBALLD_SPIN                 = $17004407; (* Spin to beat offensive line *)
  894.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_SPIN}
  895.   DIBUTTON_FOOTBALLD_SWIM                 = $17004408; (* Swim to beat the offensive line *)
  896.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_SWIM}
  897.   DIBUTTON_FOOTBALLD_BULLRUSH             = $17004409; (* Bull rush the offensive line *)
  898.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_BULLRUSH}
  899.   DIBUTTON_FOOTBALLD_RIP                  = $1700440A; (* Rip the offensive line *)
  900.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_RIP}
  901.   DIBUTTON_FOOTBALLD_AUDIBLE              = $1700440B; (* Change defensive play at the line of scrimmage *)
  902.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_AUDIBLE}
  903.   DIBUTTON_FOOTBALLD_ZOOM                 = $1700440C; (* Zoom view in / out *)
  904.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_ZOOM}
  905.   DIBUTTON_FOOTBALLD_SUBSTITUTE           = $1700440D; (* substitute one player for another *)
  906.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_SUBSTITUTE}
  907.   DIBUTTON_FOOTBALLD_LEFT_LINK            = $1700C4E4; (* Fallback sidestep left button *)
  908.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_LEFT_LINK}
  909.   DIBUTTON_FOOTBALLD_RIGHT_LINK           = $1700C4EC; (* Fallback sidestep right button *)
  910.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_RIGHT_LINK}
  911.   DIBUTTON_FOOTBALLD_FORWARD_LINK         = $170144E0; (* Fallback move forward button *)
  912.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_FORWARD_LINK}
  913.   DIBUTTON_FOOTBALLD_BACK_LINK            = $170144E8; (* Fallback move back button *)
  914.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_BACK_LINK}
  915.   DIBUTTON_FOOTBALLD_DEVICE               = $170044FE; (* Show input device and controls *)
  916.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_DEVICE}
  917.   DIBUTTON_FOOTBALLD_PAUSE                = $170044FC; (* Start / Pause / Restart game *)
  918.   {$EXTERNALSYM DIBUTTON_FOOTBALLD_PAUSE}
  919. (*--- Sports - Golf
  920.                                 ---*)
  921.   DIVIRTUAL_SPORTS_GOLF                   = $18000000;
  922.   {$EXTERNALSYM DIVIRTUAL_SPORTS_GOLF}
  923.   DIAXIS_GOLF_LATERAL                     = $18008201; (* Move / Aim: left / right *)
  924.   {$EXTERNALSYM DIAXIS_GOLF_LATERAL}
  925.   DIAXIS_GOLF_MOVE                        = $18010202; (* Move / Aim: up / down *)
  926.   {$EXTERNALSYM DIAXIS_GOLF_MOVE}
  927.   DIBUTTON_GOLF_SWING                     = $18000401; (* swing club *)
  928.   {$EXTERNALSYM DIBUTTON_GOLF_SWING}
  929.   DIBUTTON_GOLF_SELECT                    = $18000402; (* cycle between: club / swing strength / ball arc / ball spin *)
  930.   {$EXTERNALSYM DIBUTTON_GOLF_SELECT}
  931.   DIBUTTON_GOLF_UP                        = $18000403; (* increase selection *)
  932.   {$EXTERNALSYM DIBUTTON_GOLF_UP}
  933.   DIBUTTON_GOLF_DOWN                      = $18000404; (* decrease selection *)
  934.   {$EXTERNALSYM DIBUTTON_GOLF_DOWN}
  935.   DIBUTTON_GOLF_TERRAIN                   = $18000405; (* shows terrain detail *)
  936.   {$EXTERNALSYM DIBUTTON_GOLF_TERRAIN}
  937.   DIBUTTON_GOLF_FLYBY                     = $18000406; (* view the hole via a flyby *)
  938.   {$EXTERNALSYM DIBUTTON_GOLF_FLYBY}
  939.   DIBUTTON_GOLF_MENU                      = $180004FD; (* Show menu options *)
  940.   {$EXTERNALSYM DIBUTTON_GOLF_MENU}
  941. (*--- Priority 2 controls                            ---*)
  942.   DIHATSWITCH_GOLF_SCROLL                 = $18004601; (* scroll view *)
  943.   {$EXTERNALSYM DIHATSWITCH_GOLF_SCROLL}
  944.   DIBUTTON_GOLF_ZOOM                      = $18004407; (* Zoom view in / out *)
  945.   {$EXTERNALSYM DIBUTTON_GOLF_ZOOM}
  946.   DIBUTTON_GOLF_TIMEOUT                   = $18004408; (* Call for time out *)
  947.   {$EXTERNALSYM DIBUTTON_GOLF_TIMEOUT}
  948.   DIBUTTON_GOLF_SUBSTITUTE                = $18004409; (* substitute one player for another *)
  949.   {$EXTERNALSYM DIBUTTON_GOLF_SUBSTITUTE}
  950.   DIBUTTON_GOLF_LEFT_LINK                 = $1800C4E4; (* Fallback sidestep left button *)
  951.   {$EXTERNALSYM DIBUTTON_GOLF_LEFT_LINK}
  952.   DIBUTTON_GOLF_RIGHT_LINK                = $1800C4EC; (* Fallback sidestep right button *)
  953.   {$EXTERNALSYM DIBUTTON_GOLF_RIGHT_LINK}
  954.   DIBUTTON_GOLF_FORWARD_LINK              = $180144E0; (* Fallback move forward button *)
  955.   {$EXTERNALSYM DIBUTTON_GOLF_FORWARD_LINK}
  956.   DIBUTTON_GOLF_BACK_LINK                 = $180144E8; (* Fallback move back button *)
  957.   {$EXTERNALSYM DIBUTTON_GOLF_BACK_LINK}
  958.   DIBUTTON_GOLF_DEVICE                    = $180044FE; (* Show input device and controls *)
  959.   {$EXTERNALSYM DIBUTTON_GOLF_DEVICE}
  960.   DIBUTTON_GOLF_PAUSE                     = $180044FC; (* Start / Pause / Restart game *)
  961.   {$EXTERNALSYM DIBUTTON_GOLF_PAUSE}
  962. (*--- Sports - Hockey - Offense
  963.       Offense       ---*)
  964.   DIVIRTUAL_SPORTS_HOCKEY_OFFENSE         = $19000000;
  965.   {$EXTERNALSYM DIVIRTUAL_SPORTS_HOCKEY_OFFENSE}
  966.   DIAXIS_HOCKEYO_LATERAL                  = $19008201; (* Move / Aim: left / right *)
  967.   {$EXTERNALSYM DIAXIS_HOCKEYO_LATERAL}
  968.   DIAXIS_HOCKEYO_MOVE                     = $19010202; (* Move / Aim: up / down *)
  969.   {$EXTERNALSYM DIAXIS_HOCKEYO_MOVE}
  970.   DIBUTTON_HOCKEYO_SHOOT                  = $19000401; (* Shoot *)
  971.   {$EXTERNALSYM DIBUTTON_HOCKEYO_SHOOT}
  972.   DIBUTTON_HOCKEYO_PASS                   = $19000402; (* pass the puck *)
  973.   {$EXTERNALSYM DIBUTTON_HOCKEYO_PASS}
  974.   DIBUTTON_HOCKEYO_BURST                  = $19000403; (* invoke speed burst *)
  975.   {$EXTERNALSYM DIBUTTON_HOCKEYO_BURST}
  976.   DIBUTTON_HOCKEYO_SPECIAL                = $19000404; (* invoke special move *)
  977.   {$EXTERNALSYM DIBUTTON_HOCKEYO_SPECIAL}
  978.   DIBUTTON_HOCKEYO_FAKE                   = $19000405; (* hold down to fake pass or kick *)
  979.   {$EXTERNALSYM DIBUTTON_HOCKEYO_FAKE}
  980.   DIBUTTON_HOCKEYO_MENU                   = $190004FD; (* Show menu options *)
  981.   {$EXTERNALSYM DIBUTTON_HOCKEYO_MENU}
  982. (*--- Priority 2 controls                            ---*)
  983.   DIHATSWITCH_HOCKEYO_SCROLL              = $19004601; (* scroll view *)
  984.   {$EXTERNALSYM DIHATSWITCH_HOCKEYO_SCROLL}
  985.   DIBUTTON_HOCKEYO_ZOOM                   = $19004406; (* Zoom view in / out *)
  986.   {$EXTERNALSYM DIBUTTON_HOCKEYO_ZOOM}
  987.   DIBUTTON_HOCKEYO_STRATEGY               = $19004407; (* Invoke coaching menu for strategy help *)
  988.   {$EXTERNALSYM DIBUTTON_HOCKEYO_STRATEGY}
  989.   DIBUTTON_HOCKEYO_TIMEOUT                = $19004408; (* Call for time out *)
  990.   {$EXTERNALSYM DIBUTTON_HOCKEYO_TIMEOUT}
  991.   DIBUTTON_HOCKEYO_SUBSTITUTE             = $19004409; (* substitute one player for another *)
  992.   {$EXTERNALSYM DIBUTTON_HOCKEYO_SUBSTITUTE}
  993.   DIBUTTON_HOCKEYO_LEFT_LINK              = $1900C4E4; (* Fallback sidestep left button *)
  994.   {$EXTERNALSYM DIBUTTON_HOCKEYO_LEFT_LINK}
  995.   DIBUTTON_HOCKEYO_RIGHT_LINK             = $1900C4EC; (* Fallback sidestep right button *)
  996.   {$EXTERNALSYM DIBUTTON_HOCKEYO_RIGHT_LINK}
  997.   DIBUTTON_HOCKEYO_FORWARD_LINK           = $190144E0; (* Fallback move forward button *)
  998.   {$EXTERNALSYM DIBUTTON_HOCKEYO_FORWARD_LINK}
  999.   DIBUTTON_HOCKEYO_BACK_LINK              = $190144E8; (* Fallback move back button *)
  1000.   {$EXTERNALSYM DIBUTTON_HOCKEYO_BACK_LINK}
  1001.   DIBUTTON_HOCKEYO_DEVICE                 = $190044FE; (* Show input device and controls *)
  1002.   {$EXTERNALSYM DIBUTTON_HOCKEYO_DEVICE}
  1003.   DIBUTTON_HOCKEYO_PAUSE                  = $190044FC; (* Start / Pause / Restart game *)
  1004.   {$EXTERNALSYM DIBUTTON_HOCKEYO_PAUSE}
  1005. (*--- Sports - Hockey - Defense
  1006.       Defense       ---*)
  1007.   DIVIRTUAL_SPORTS_HOCKEY_DEFENSE         = $1A000000;
  1008.   {$EXTERNALSYM DIVIRTUAL_SPORTS_HOCKEY_DEFENSE}
  1009.   DIAXIS_HOCKEYD_LATERAL                  = $1A008201; (* Move / Aim: left / right *)
  1010.   {$EXTERNALSYM DIAXIS_HOCKEYD_LATERAL}
  1011.   DIAXIS_HOCKEYD_MOVE                     = $1A010202; (* Move / Aim: up / down *)
  1012.   {$EXTERNALSYM DIAXIS_HOCKEYD_MOVE}
  1013.   DIBUTTON_HOCKEYD_PLAYER                 = $1A000401; (* control player closest to the puck *)
  1014.   {$EXTERNALSYM DIBUTTON_HOCKEYD_PLAYER}
  1015.   DIBUTTON_HOCKEYD_STEAL                  = $1A000402; (* attempt steal *)
  1016.   {$EXTERNALSYM DIBUTTON_HOCKEYD_STEAL}
  1017.   DIBUTTON_HOCKEYD_BURST                  = $1A000403; (* speed burst or body check *)
  1018.   {$EXTERNALSYM DIBUTTON_HOCKEYD_BURST}
  1019.   DIBUTTON_HOCKEYD_BLOCK                  = $1A000404; (* block puck *)
  1020.   {$EXTERNALSYM DIBUTTON_HOCKEYD_BLOCK}
  1021.   DIBUTTON_HOCKEYD_FAKE                   = $1A000405; (* hold down to fake tackle or intercept *)
  1022.   {$EXTERNALSYM DIBUTTON_HOCKEYD_FAKE}
  1023.   DIBUTTON_HOCKEYD_MENU                   = $1A0004FD; (* Show menu options *)
  1024.   {$EXTERNALSYM DIBUTTON_HOCKEYD_MENU}
  1025. (*--- Priority 2 controls                            ---*)
  1026.   DIHATSWITCH_HOCKEYD_SCROLL              = $1A004601; (* scroll view *)
  1027.   {$EXTERNALSYM DIHATSWITCH_HOCKEYD_SCROLL}
  1028.   DIBUTTON_HOCKEYD_ZOOM                   = $1A004406; (* Zoom view in / out *)
  1029.   {$EXTERNALSYM DIBUTTON_HOCKEYD_ZOOM}
  1030.   DIBUTTON_HOCKEYD_STRATEGY               = $1A004407; (* Invoke coaching menu for strategy help *)
  1031.   {$EXTERNALSYM DIBUTTON_HOCKEYD_STRATEGY}
  1032.   DIBUTTON_HOCKEYD_TIMEOUT                = $1A004408; (* Call for time out *)
  1033.   {$EXTERNALSYM DIBUTTON_HOCKEYD_TIMEOUT}
  1034.   DIBUTTON_HOCKEYD_SUBSTITUTE             = $1A004409; (* substitute one player for another *)
  1035.   {$EXTERNALSYM DIBUTTON_HOCKEYD_SUBSTITUTE}
  1036.   DIBUTTON_HOCKEYD_LEFT_LINK              = $1A00C4E4; (* Fallback sidestep left button *)
  1037.   {$EXTERNALSYM DIBUTTON_HOCKEYD_LEFT_LINK}
  1038.   DIBUTTON_HOCKEYD_RIGHT_LINK             = $1A00C4EC; (* Fallback sidestep right button *)
  1039.   {$EXTERNALSYM DIBUTTON_HOCKEYD_RIGHT_LINK}
  1040.   DIBUTTON_HOCKEYD_FORWARD_LINK           = $1A0144E0; (* Fallback move forward button *)
  1041.   {$EXTERNALSYM DIBUTTON_HOCKEYD_FORWARD_LINK}
  1042.   DIBUTTON_HOCKEYD_BACK_LINK              = $1A0144E8; (* Fallback move back button *)
  1043.   {$EXTERNALSYM DIBUTTON_HOCKEYD_BACK_LINK}
  1044.   DIBUTTON_HOCKEYD_DEVICE                 = $1A0044FE; (* Show input device and controls *)
  1045.   {$EXTERNALSYM DIBUTTON_HOCKEYD_DEVICE}
  1046.   DIBUTTON_HOCKEYD_PAUSE                  = $1A0044FC; (* Start / Pause / Restart game *)
  1047.   {$EXTERNALSYM DIBUTTON_HOCKEYD_PAUSE}
  1048. (*--- Sports - Hockey - Goalie
  1049.       Goal tending  ---*)
  1050.   DIVIRTUAL_SPORTS_HOCKEY_GOALIE          = $1B000000;
  1051.   {$EXTERNALSYM DIVIRTUAL_SPORTS_HOCKEY_GOALIE}
  1052.   DIAXIS_HOCKEYG_LATERAL                  = $1B008201; (* Move / Aim: left / right *)
  1053.   {$EXTERNALSYM DIAXIS_HOCKEYG_LATERAL}
  1054.   DIAXIS_HOCKEYG_MOVE                     = $1B010202; (* Move / Aim: up / down *)
  1055.   {$EXTERNALSYM DIAXIS_HOCKEYG_MOVE}
  1056.   DIBUTTON_HOCKEYG_PASS                   = $1B000401; (* pass puck *)
  1057.   {$EXTERNALSYM DIBUTTON_HOCKEYG_PASS}
  1058.   DIBUTTON_HOCKEYG_POKE                   = $1B000402; (* poke / check / hack *)
  1059.   {$EXTERNALSYM DIBUTTON_HOCKEYG_POKE}
  1060.   DIBUTTON_HOCKEYG_STEAL                  = $1B000403; (* attempt steal *)
  1061.   {$EXTERNALSYM DIBUTTON_HOCKEYG_STEAL}
  1062.   DIBUTTON_HOCKEYG_BLOCK                  = $1B000404; (* block puck *)
  1063.   {$EXTERNALSYM DIBUTTON_HOCKEYG_BLOCK}
  1064.   DIBUTTON_HOCKEYG_MENU                   = $1B0004FD; (* Show menu options *)
  1065.   {$EXTERNALSYM DIBUTTON_HOCKEYG_MENU}
  1066. (*--- Priority 2 controls                            ---*)
  1067.   DIHATSWITCH_HOCKEYG_SCROLL              = $1B004601; (* scroll view *)
  1068.   {$EXTERNALSYM DIHATSWITCH_HOCKEYG_SCROLL}
  1069.   DIBUTTON_HOCKEYG_ZOOM                   = $1B004405; (* Zoom view in / out *)
  1070.   {$EXTERNALSYM DIBUTTON_HOCKEYG_ZOOM}
  1071.   DIBUTTON_HOCKEYG_STRATEGY               = $1B004406; (* Invoke coaching menu for strategy help *)
  1072.   {$EXTERNALSYM DIBUTTON_HOCKEYG_STRATEGY}
  1073.   DIBUTTON_HOCKEYG_TIMEOUT                = $1B004407; (* Call for time out *)
  1074.   {$EXTERNALSYM DIBUTTON_HOCKEYG_TIMEOUT}
  1075.   DIBUTTON_HOCKEYG_SUBSTITUTE             = $1B004408; (* substitute one player for another *)
  1076.   {$EXTERNALSYM DIBUTTON_HOCKEYG_SUBSTITUTE}
  1077.   DIBUTTON_HOCKEYG_LEFT_LINK              = $1B00C4E4; (* Fallback sidestep left button *)
  1078.   {$EXTERNALSYM DIBUTTON_HOCKEYG_LEFT_LINK}
  1079.   DIBUTTON_HOCKEYG_RIGHT_LINK             = $1B00C4EC; (* Fallback sidestep right button *)
  1080.   {$EXTERNALSYM DIBUTTON_HOCKEYG_RIGHT_LINK}
  1081.   DIBUTTON_HOCKEYG_FORWARD_LINK           = $1B0144E0; (* Fallback move forward button *)
  1082.   {$EXTERNALSYM DIBUTTON_HOCKEYG_FORWARD_LINK}
  1083.   DIBUTTON_HOCKEYG_BACK_LINK              = $1B0144E8; (* Fallback move back button *)
  1084.   {$EXTERNALSYM DIBUTTON_HOCKEYG_BACK_LINK}
  1085.   DIBUTTON_HOCKEYG_DEVICE                 = $1B0044FE; (* Show input device and controls *)
  1086.   {$EXTERNALSYM DIBUTTON_HOCKEYG_DEVICE}
  1087.   DIBUTTON_HOCKEYG_PAUSE                  = $1B0044FC; (* Start / Pause / Restart game *)
  1088.   {$EXTERNALSYM DIBUTTON_HOCKEYG_PAUSE}
  1089. (*--- Sports - Mountain Biking
  1090.                      ---*)
  1091.   DIVIRTUAL_SPORTS_BIKING_MOUNTAIN        = $1C000000;
  1092.   {$EXTERNALSYM DIVIRTUAL_SPORTS_BIKING_MOUNTAIN}
  1093.   DIAXIS_BIKINGM_TURN                     = $1C008201; (* left / right *)
  1094.   {$EXTERNALSYM DIAXIS_BIKINGM_TURN}
  1095.   DIAXIS_BIKINGM_PEDAL                    = $1C010202; (* Pedal faster / slower / brake *)
  1096.   {$EXTERNALSYM DIAXIS_BIKINGM_PEDAL}
  1097.   DIBUTTON_BIKINGM_JUMP                   = $1C000401; (* jump over obstacle *)
  1098.   {$EXTERNALSYM DIBUTTON_BIKINGM_JUMP}
  1099.   DIBUTTON_BIKINGM_CAMERA                 = $1C000402; (* switch camera view *)
  1100.   {$EXTERNALSYM DIBUTTON_BIKINGM_CAMERA}
  1101.   DIBUTTON_BIKINGM_SPECIAL1               = $1C000403; (* perform first special move *)
  1102.   {$EXTERNALSYM DIBUTTON_BIKINGM_SPECIAL1}
  1103.   DIBUTTON_BIKINGM_SELECT                 = $1C000404; (* Select *)
  1104.   {$EXTERNALSYM DIBUTTON_BIKINGM_SELECT}
  1105.   DIBUTTON_BIKINGM_SPECIAL2               = $1C000405; (* perform second special move *)
  1106.   {$EXTERNALSYM DIBUTTON_BIKINGM_SPECIAL2}
  1107.   DIBUTTON_BIKINGM_MENU                   = $1C0004FD; (* Show menu options *)
  1108.   {$EXTERNALSYM DIBUTTON_BIKINGM_MENU}
  1109. (*--- Priority 2 controls                            ---*)
  1110.   DIHATSWITCH_BIKINGM_SCROLL              = $1C004601; (* scroll view *)
  1111.   {$EXTERNALSYM DIHATSWITCH_BIKINGM_SCROLL}
  1112.   DIBUTTON_BIKINGM_ZOOM                   = $1C004406; (* Zoom view in / out *)
  1113.   {$EXTERNALSYM DIBUTTON_BIKINGM_ZOOM}
  1114.   DIAXIS_BIKINGM_BRAKE                    = $1C044203; (* Brake axis  *)
  1115.   {$EXTERNALSYM DIAXIS_BIKINGM_BRAKE}
  1116.   DIBUTTON_BIKINGM_LEFT_LINK              = $1C00C4E4; (* Fallback turn left button *)
  1117.   {$EXTERNALSYM DIBUTTON_BIKINGM_LEFT_LINK}
  1118.   DIBUTTON_BIKINGM_RIGHT_LINK             = $1C00C4EC; (* Fallback turn right button *)
  1119.   {$EXTERNALSYM DIBUTTON_BIKINGM_RIGHT_LINK}
  1120.   DIBUTTON_BIKINGM_FASTER_LINK            = $1C0144E0; (* Fallback pedal faster button *)
  1121.   {$EXTERNALSYM DIBUTTON_BIKINGM_FASTER_LINK}
  1122.   DIBUTTON_BIKINGM_SLOWER_LINK            = $1C0144E8; (* Fallback pedal slower button *)
  1123.   {$EXTERNALSYM DIBUTTON_BIKINGM_SLOWER_LINK}
  1124.   DIBUTTON_BIKINGM_BRAKE_BUTTON_LINK      = $1C0444E8; (* Fallback brake button *)
  1125.   {$EXTERNALSYM DIBUTTON_BIKINGM_BRAKE_BUTTON_LINK}
  1126.   DIBUTTON_BIKINGM_DEVICE                 = $1C0044FE; (* Show input device and controls *)
  1127.   {$EXTERNALSYM DIBUTTON_BIKINGM_DEVICE}
  1128.   DIBUTTON_BIKINGM_PAUSE                  = $1C0044FC; (* Start / Pause / Restart game *)
  1129.   {$EXTERNALSYM DIBUTTON_BIKINGM_PAUSE}
  1130. (*--- Sports: Skiing / Snowboarding / Skateboarding
  1131.         ---*)
  1132.   DIVIRTUAL_SPORTS_SKIING                 = $1D000000;
  1133.   {$EXTERNALSYM DIVIRTUAL_SPORTS_SKIING}
  1134.   DIAXIS_SKIING_TURN                      = $1D008201; (* left / right *)
  1135.   {$EXTERNALSYM DIAXIS_SKIING_TURN}
  1136.   DIAXIS_SKIING_SPEED                     = $1D010202; (* faster / slower *)
  1137.   {$EXTERNALSYM DIAXIS_SKIING_SPEED}
  1138.   DIBUTTON_SKIING_JUMP                    = $1D000401; (* Jump *)
  1139.   {$EXTERNALSYM DIBUTTON_SKIING_JUMP}
  1140.   DIBUTTON_SKIING_CROUCH                  = $1D000402; (* crouch down *)
  1141.   {$EXTERNALSYM DIBUTTON_SKIING_CROUCH}
  1142.   DIBUTTON_SKIING_CAMERA                  = $1D000403; (* switch camera view *)
  1143.   {$EXTERNALSYM DIBUTTON_SKIING_CAMERA}
  1144.   DIBUTTON_SKIING_SPECIAL1                = $1D000404; (* perform first special move *)
  1145.   {$EXTERNALSYM DIBUTTON_SKIING_SPECIAL1}
  1146.   DIBUTTON_SKIING_SELECT                  = $1D000405; (* Select *)
  1147.   {$EXTERNALSYM DIBUTTON_SKIING_SELECT}
  1148.   DIBUTTON_SKIING_SPECIAL2                = $1D000406; (* perform second special move *)
  1149.   {$EXTERNALSYM DIBUTTON_SKIING_SPECIAL2}
  1150.   DIBUTTON_SKIING_MENU                    = $1D0004FD; (* Show menu options *)
  1151.   {$EXTERNALSYM DIBUTTON_SKIING_MENU}
  1152. (*--- Priority 2 controls                            ---*)
  1153.   DIHATSWITCH_SKIING_GLANCE               = $1D004601; (* scroll view *)
  1154.   {$EXTERNALSYM DIHATSWITCH_SKIING_GLANCE}
  1155.   DIBUTTON_SKIING_ZOOM                    = $1D004407; (* Zoom view in / out *)
  1156.   {$EXTERNALSYM DIBUTTON_SKIING_ZOOM}
  1157.   DIBUTTON_SKIING_LEFT_LINK               = $1D00C4E4; (* Fallback turn left button *)
  1158.   {$EXTERNALSYM DIBUTTON_SKIING_LEFT_LINK}
  1159.   DIBUTTON_SKIING_RIGHT_LINK              = $1D00C4EC; (* Fallback turn right button *)
  1160.   {$EXTERNALSYM DIBUTTON_SKIING_RIGHT_LINK}
  1161.   DIBUTTON_SKIING_FASTER_LINK             = $1D0144E0; (* Fallback increase speed button *)
  1162.   {$EXTERNALSYM DIBUTTON_SKIING_FASTER_LINK}
  1163.   DIBUTTON_SKIING_SLOWER_LINK             = $1D0144E8; (* Fallback decrease speed button *)
  1164.   {$EXTERNALSYM DIBUTTON_SKIING_SLOWER_LINK}
  1165.   DIBUTTON_SKIING_DEVICE                  = $1D0044FE; (* Show input device and controls *)
  1166.   {$EXTERNALSYM DIBUTTON_SKIING_DEVICE}
  1167.   DIBUTTON_SKIING_PAUSE                   = $1D0044FC; (* Start / Pause / Restart game *)
  1168.   {$EXTERNALSYM DIBUTTON_SKIING_PAUSE}
  1169. (*--- Sports - Soccer - Offense
  1170.       Offense       ---*)
  1171.   DIVIRTUAL_SPORTS_SOCCER_OFFENSE         = $1E000000;
  1172.   {$EXTERNALSYM DIVIRTUAL_SPORTS_SOCCER_OFFENSE}
  1173.   DIAXIS_SOCCERO_LATERAL                  = $1E008201; (* Move / Aim: left / right *)
  1174.   {$EXTERNALSYM DIAXIS_SOCCERO_LATERAL}
  1175.   DIAXIS_SOCCERO_MOVE                     = $1E010202; (* Move / Aim: up / down *)
  1176.   {$EXTERNALSYM DIAXIS_SOCCERO_MOVE}
  1177.   DIAXIS_SOCCERO_BEND                     = $1E018203; (* Bend to soccer shot/pass *)
  1178.   {$EXTERNALSYM DIAXIS_SOCCERO_BEND}
  1179.   DIBUTTON_SOCCERO_SHOOT                  = $1E000401; (* Shoot the ball *)
  1180.   {$EXTERNALSYM DIBUTTON_SOCCERO_SHOOT}
  1181.   DIBUTTON_SOCCERO_PASS                   = $1E000402; (* Pass  *)
  1182.   {$EXTERNALSYM DIBUTTON_SOCCERO_PASS}
  1183.   DIBUTTON_SOCCERO_FAKE                   = $1E000403; (* Fake *)
  1184.   {$EXTERNALSYM DIBUTTON_SOCCERO_FAKE}
  1185.   DIBUTTON_SOCCERO_PLAYER                 = $1E000404; (* Select next player *)
  1186.   {$EXTERNALSYM DIBUTTON_SOCCERO_PLAYER}
  1187.   DIBUTTON_SOCCERO_SPECIAL1               = $1E000405; (* Apply special move *)
  1188.   {$EXTERNALSYM DIBUTTON_SOCCERO_SPECIAL1}
  1189.   DIBUTTON_SOCCERO_SELECT                 = $1E000406; (* Select special move *)
  1190.   {$EXTERNALSYM DIBUTTON_SOCCERO_SELECT}
  1191.   DIBUTTON_SOCCERO_MENU                   = $1E0004FD; (* Show menu options *)
  1192.   {$EXTERNALSYM DIBUTTON_SOCCERO_MENU}
  1193. (*--- Priority 2 controls                            ---*)
  1194.   DIHATSWITCH_SOCCERO_GLANCE              = $1E004601; (* scroll view *)
  1195.   {$EXTERNALSYM DIHATSWITCH_SOCCERO_GLANCE}
  1196.   DIBUTTON_SOCCERO_SUBSTITUTE             = $1E004407; (* Substitute one player for another *)
  1197.   {$EXTERNALSYM DIBUTTON_SOCCERO_SUBSTITUTE}
  1198.   DIBUTTON_SOCCERO_SHOOTLOW               = $1E004408; (* Shoot the ball low *)
  1199.   {$EXTERNALSYM DIBUTTON_SOCCERO_SHOOTLOW}
  1200.   DIBUTTON_SOCCERO_SHOOTHIGH              = $1E004409; (* Shoot the ball high *)
  1201.   {$EXTERNALSYM DIBUTTON_SOCCERO_SHOOTHIGH}
  1202.   DIBUTTON_SOCCERO_PASSTHRU               = $1E00440A; (* Make a thru pass *)
  1203.   {$EXTERNALSYM DIBUTTON_SOCCERO_PASSTHRU}
  1204.   DIBUTTON_SOCCERO_SPRINT                 = $1E00440B; (* Sprint / turbo boost *)
  1205.   {$EXTERNALSYM DIBUTTON_SOCCERO_SPRINT}
  1206.   DIBUTTON_SOCCERO_CONTROL                = $1E00440C; (* Obtain control of the ball *)
  1207.   {$EXTERNALSYM DIBUTTON_SOCCERO_CONTROL}
  1208.   DIBUTTON_SOCCERO_HEAD                   = $1E00440D; (* Attempt to head the ball *)
  1209.   {$EXTERNALSYM DIBUTTON_SOCCERO_HEAD}
  1210.   DIBUTTON_SOCCERO_LEFT_LINK              = $1E00C4E4; (* Fallback sidestep left button *)
  1211.   {$EXTERNALSYM DIBUTTON_SOCCERO_LEFT_LINK}
  1212.   DIBUTTON_SOCCERO_RIGHT_LINK             = $1E00C4EC; (* Fallback sidestep right button *)
  1213.   {$EXTERNALSYM DIBUTTON_SOCCERO_RIGHT_LINK}
  1214.   DIBUTTON_SOCCERO_FORWARD_LINK           = $1E0144E0; (* Fallback move forward button *)
  1215.   {$EXTERNALSYM DIBUTTON_SOCCERO_FORWARD_LINK}
  1216.   DIBUTTON_SOCCERO_BACK_LINK              = $1E0144E8; (* Fallback move back button *)
  1217.   {$EXTERNALSYM DIBUTTON_SOCCERO_BACK_LINK}
  1218.   DIBUTTON_SOCCERO_DEVICE                 = $1E0044FE; (* Show input device and controls *)
  1219.   {$EXTERNALSYM DIBUTTON_SOCCERO_DEVICE}
  1220.   DIBUTTON_SOCCERO_PAUSE                  = $1E0044FC; (* Start / Pause / Restart game *)
  1221.   {$EXTERNALSYM DIBUTTON_SOCCERO_PAUSE}
  1222. (*--- Sports - Soccer - Defense
  1223.       Defense       ---*)
  1224.   DIVIRTUAL_SPORTS_SOCCER_DEFENSE         = $1F000000;
  1225.   {$EXTERNALSYM DIVIRTUAL_SPORTS_SOCCER_DEFENSE}
  1226.   DIAXIS_SOCCERD_LATERAL                  = $1F008201; (* Move / Aim: left / right *)
  1227.   {$EXTERNALSYM DIAXIS_SOCCERD_LATERAL}
  1228.   DIAXIS_SOCCERD_MOVE                     = $1F010202; (* Move / Aim: up / down *)
  1229.   {$EXTERNALSYM DIAXIS_SOCCERD_MOVE}
  1230.   DIBUTTON_SOCCERD_BLOCK                  = $1F000401; (* Attempt to block shot *)
  1231.   {$EXTERNALSYM DIBUTTON_SOCCERD_BLOCK}
  1232.   DIBUTTON_SOCCERD_STEAL                  = $1F000402; (* Attempt to steal ball *)
  1233.   {$EXTERNALSYM DIBUTTON_SOCCERD_STEAL}
  1234.   DIBUTTON_SOCCERD_FAKE                   = $1F000403; (* Fake a block or a steal *)
  1235.   {$EXTERNALSYM DIBUTTON_SOCCERD_FAKE}
  1236.   DIBUTTON_SOCCERD_PLAYER                 = $1F000404; (* Select next player *)
  1237.   {$EXTERNALSYM DIBUTTON_SOCCERD_PLAYER}
  1238.   DIBUTTON_SOCCERD_SPECIAL                = $1F000405; (* Apply special move *)
  1239.   {$EXTERNALSYM DIBUTTON_SOCCERD_SPECIAL}
  1240.   DIBUTTON_SOCCERD_SELECT                 = $1F000406; (* Select special move *)
  1241.   {$EXTERNALSYM DIBUTTON_SOCCERD_SELECT}
  1242.   DIBUTTON_SOCCERD_SLIDE                  = $1F000407; (* Attempt a slide tackle *)
  1243.   {$EXTERNALSYM DIBUTTON_SOCCERD_SLIDE}
  1244.   DIBUTTON_SOCCERD_MENU                   = $1F0004FD; (* Show menu options *)
  1245.   {$EXTERNALSYM DIBUTTON_SOCCERD_MENU}
  1246. (*--- Priority 2 controls                            ---*)
  1247.   DIHATSWITCH_SOCCERD_GLANCE              = $1F004601; (* scroll view *)
  1248.   {$EXTERNALSYM DIHATSWITCH_SOCCERD_GLANCE}
  1249.   DIBUTTON_SOCCERD_FOUL                   = $1F004408; (* Initiate a foul / hard-foul *)
  1250.   {$EXTERNALSYM DIBUTTON_SOCCERD_FOUL}
  1251.   DIBUTTON_SOCCERD_HEAD                   = $1F004409; (* Attempt a Header *)
  1252.   {$EXTERNALSYM DIBUTTON_SOCCERD_HEAD}
  1253.   DIBUTTON_SOCCERD_CLEAR                  = $1F00440A; (* Attempt to clear the ball down the field *)
  1254.   {$EXTERNALSYM DIBUTTON_SOCCERD_CLEAR}
  1255.   DIBUTTON_SOCCERD_GOALIECHARGE           = $1F00440B; (* Make the goalie charge out of the box *)
  1256.   {$EXTERNALSYM DIBUTTON_SOCCERD_GOALIECHARGE}
  1257.   DIBUTTON_SOCCERD_SUBSTITUTE             = $1F00440C; (* Substitute one player for another *)
  1258.   {$EXTERNALSYM DIBUTTON_SOCCERD_SUBSTITUTE}
  1259.   DIBUTTON_SOCCERD_LEFT_LINK              = $1F00C4E4; (* Fallback sidestep left button *)
  1260.   {$EXTERNALSYM DIBUTTON_SOCCERD_LEFT_LINK}
  1261.   DIBUTTON_SOCCERD_RIGHT_LINK             = $1F00C4EC; (* Fallback sidestep right button *)
  1262.   {$EXTERNALSYM DIBUTTON_SOCCERD_RIGHT_LINK}
  1263.   DIBUTTON_SOCCERD_FORWARD_LINK           = $1F0144E0; (* Fallback move forward button *)
  1264.   {$EXTERNALSYM DIBUTTON_SOCCERD_FORWARD_LINK}
  1265.   DIBUTTON_SOCCERD_BACK_LINK              = $1F0144E8; (* Fallback move back button *)
  1266.   {$EXTERNALSYM DIBUTTON_SOCCERD_BACK_LINK}
  1267.   DIBUTTON_SOCCERD_DEVICE                 = $1F0044FE; (* Show input device and controls *)
  1268.   {$EXTERNALSYM DIBUTTON_SOCCERD_DEVICE}
  1269.   DIBUTTON_SOCCERD_PAUSE                  = $1F0044FC; (* Start / Pause / Restart game *)
  1270.   {$EXTERNALSYM DIBUTTON_SOCCERD_PAUSE}
  1271. (*--- Sports - Racquet
  1272.       Tennis - Table-Tennis - Squash   ---*)
  1273.   DIVIRTUAL_SPORTS_RACQUET                = $20000000;
  1274.   {$EXTERNALSYM DIVIRTUAL_SPORTS_RACQUET}
  1275.   DIAXIS_RACQUET_LATERAL                  = $20008201; (* Move / Aim: left / right *)
  1276.   {$EXTERNALSYM DIAXIS_RACQUET_LATERAL}
  1277.   DIAXIS_RACQUET_MOVE                     = $20010202; (* Move / Aim: up / down *)
  1278.   {$EXTERNALSYM DIAXIS_RACQUET_MOVE}
  1279.   DIBUTTON_RACQUET_SWING                  = $20000401; (* Swing racquet *)
  1280.   {$EXTERNALSYM DIBUTTON_RACQUET_SWING}
  1281.   DIBUTTON_RACQUET_BACKSWING              = $20000402; (* Swing backhand *)
  1282.   {$EXTERNALSYM DIBUTTON_RACQUET_BACKSWING}
  1283.   DIBUTTON_RACQUET_SMASH                  = $20000403; (* Smash shot *)
  1284.   {$EXTERNALSYM DIBUTTON_RACQUET_SMASH}
  1285.   DIBUTTON_RACQUET_SPECIAL                = $20000404; (* Special shot *)
  1286.   {$EXTERNALSYM DIBUTTON_RACQUET_SPECIAL}
  1287.   DIBUTTON_RACQUET_SELECT                 = $20000405; (* Select special shot *)
  1288.   {$EXTERNALSYM DIBUTTON_RACQUET_SELECT}
  1289.   DIBUTTON_RACQUET_MENU                   = $200004FD; (* Show menu options *)
  1290.   {$EXTERNALSYM DIBUTTON_RACQUET_MENU}
  1291. (*--- Priority 2 controls                            ---*)
  1292.   DIHATSWITCH_RACQUET_GLANCE              = $20004601; (* scroll view *)
  1293.   {$EXTERNALSYM DIHATSWITCH_RACQUET_GLANCE}
  1294.   DIBUTTON_RACQUET_TIMEOUT                = $20004406; (* Call for time out *)
  1295.   {$EXTERNALSYM DIBUTTON_RACQUET_TIMEOUT}
  1296.   DIBUTTON_RACQUET_SUBSTITUTE             = $20004407; (* Substitute one player for another *)
  1297.   {$EXTERNALSYM DIBUTTON_RACQUET_SUBSTITUTE}
  1298.   DIBUTTON_RACQUET_LEFT_LINK              = $2000C4E4; (* Fallback sidestep left button *)
  1299.   {$EXTERNALSYM DIBUTTON_RACQUET_LEFT_LINK}
  1300.   DIBUTTON_RACQUET_RIGHT_LINK             = $2000C4EC; (* Fallback sidestep right button *)
  1301.   {$EXTERNALSYM DIBUTTON_RACQUET_RIGHT_LINK}
  1302.   DIBUTTON_RACQUET_FORWARD_LINK           = $200144E0; (* Fallback move forward button *)
  1303.   {$EXTERNALSYM DIBUTTON_RACQUET_FORWARD_LINK}
  1304.   DIBUTTON_RACQUET_BACK_LINK              = $200144E8; (* Fallback move back button *)
  1305.   {$EXTERNALSYM DIBUTTON_RACQUET_BACK_LINK}
  1306.   DIBUTTON_RACQUET_DEVICE                 = $200044FE; (* Show input device and controls *)
  1307.   {$EXTERNALSYM DIBUTTON_RACQUET_DEVICE}
  1308.   DIBUTTON_RACQUET_PAUSE                  = $200044FC; (* Start / Pause / Restart game *)
  1309.   {$EXTERNALSYM DIBUTTON_RACQUET_PAUSE}
  1310. (*--- Arcade- 2D
  1311.       Side to Side movement        ---*)
  1312.   DIVIRTUAL_ARCADE_SIDE2SIDE              = $21000000;
  1313.   {$EXTERNALSYM DIVIRTUAL_ARCADE_SIDE2SIDE}
  1314.   DIAXIS_ARCADES_LATERAL                  = $21008201; (* left / right *)
  1315.   {$EXTERNALSYM DIAXIS_ARCADES_LATERAL}
  1316.   DIAXIS_ARCADES_MOVE                     = $21010202; (* up / down *)
  1317.   {$EXTERNALSYM DIAXIS_ARCADES_MOVE}
  1318.   DIBUTTON_ARCADES_THROW                  = $21000401; (* throw object *)
  1319.   {$EXTERNALSYM DIBUTTON_ARCADES_THROW}
  1320.   DIBUTTON_ARCADES_CARRY                  = $21000402; (* carry object *)
  1321.   {$EXTERNALSYM DIBUTTON_ARCADES_CARRY}
  1322.   DIBUTTON_ARCADES_ATTACK                 = $21000403; (* attack *)
  1323.   {$EXTERNALSYM DIBUTTON_ARCADES_ATTACK}
  1324.   DIBUTTON_ARCADES_SPECIAL                = $21000404; (* apply special move *)
  1325.   {$EXTERNALSYM DIBUTTON_ARCADES_SPECIAL}
  1326.   DIBUTTON_ARCADES_SELECT                 = $21000405; (* select special move *)
  1327.   {$EXTERNALSYM DIBUTTON_ARCADES_SELECT}
  1328.   DIBUTTON_ARCADES_MENU                   = $210004FD; (* Show menu options *)
  1329.   {$EXTERNALSYM DIBUTTON_ARCADES_MENU}
  1330. (*--- Priority 2 controls                            ---*)
  1331.   DIHATSWITCH_ARCADES_VIEW                = $21004601; (* scroll view left / right / up / down *)
  1332.   {$EXTERNALSYM DIHATSWITCH_ARCADES_VIEW}
  1333.   DIBUTTON_ARCADES_LEFT_LINK              = $2100C4E4; (* Fallback sidestep left button *)
  1334.   {$EXTERNALSYM DIBUTTON_ARCADES_LEFT_LINK}
  1335.   DIBUTTON_ARCADES_RIGHT_LINK             = $2100C4EC; (* Fallback sidestep right button *)
  1336.   {$EXTERNALSYM DIBUTTON_ARCADES_RIGHT_LINK}
  1337.   DIBUTTON_ARCADES_FORWARD_LINK           = $210144E0; (* Fallback move forward button *)
  1338.   {$EXTERNALSYM DIBUTTON_ARCADES_FORWARD_LINK}
  1339.   DIBUTTON_ARCADES_BACK_LINK              = $210144E8; (* Fallback move back button *)
  1340.   {$EXTERNALSYM DIBUTTON_ARCADES_BACK_LINK}
  1341.   DIBUTTON_ARCADES_VIEW_UP_LINK           = $2107C4E0; (* Fallback scroll view up button *)
  1342.   {$EXTERNALSYM DIBUTTON_ARCADES_VIEW_UP_LINK}
  1343.   DIBUTTON_ARCADES_VIEW_DOWN_LINK         = $2107C4E8; (* Fallback scroll view down button *)
  1344.   {$EXTERNALSYM DIBUTTON_ARCADES_VIEW_DOWN_LINK}
  1345.   DIBUTTON_ARCADES_VIEW_LEFT_LINK         = $2107C4E4; (* Fallback scroll view left button *)
  1346.   {$EXTERNALSYM DIBUTTON_ARCADES_VIEW_LEFT_LINK}
  1347.   DIBUTTON_ARCADES_VIEW_RIGHT_LINK        = $2107C4EC; (* Fallback scroll view right button *)
  1348.   {$EXTERNALSYM DIBUTTON_ARCADES_VIEW_RIGHT_LINK}
  1349.   DIBUTTON_ARCADES_DEVICE                 = $210044FE; (* Show input device and controls *)
  1350.   {$EXTERNALSYM DIBUTTON_ARCADES_DEVICE}
  1351.   DIBUTTON_ARCADES_PAUSE                  = $210044FC; (* Start / Pause / Restart game *)
  1352.   {$EXTERNALSYM DIBUTTON_ARCADES_PAUSE}
  1353. (*--- Arcade - Platform Game
  1354.       Character moves around on screen  ---*)
  1355.   DIVIRTUAL_ARCADE_PLATFORM               = $22000000;
  1356.   {$EXTERNALSYM DIVIRTUAL_ARCADE_PLATFORM}
  1357.   DIAXIS_ARCADEP_LATERAL                  = $22008201; (* Left / right *)
  1358.   {$EXTERNALSYM DIAXIS_ARCADEP_LATERAL}
  1359.   DIAXIS_ARCADEP_MOVE                     = $22010202; (* Up / down *)
  1360.   {$EXTERNALSYM DIAXIS_ARCADEP_MOVE}
  1361.   DIBUTTON_ARCADEP_JUMP                   = $22000401; (* Jump *)
  1362.   {$EXTERNALSYM DIBUTTON_ARCADEP_JUMP}
  1363.   DIBUTTON_ARCADEP_FIRE                   = $22000402; (* Fire *)
  1364.   {$EXTERNALSYM DIBUTTON_ARCADEP_FIRE}
  1365.   DIBUTTON_ARCADEP_CROUCH                 = $22000403; (* Crouch *)
  1366.   {$EXTERNALSYM DIBUTTON_ARCADEP_CROUCH}
  1367.   DIBUTTON_ARCADEP_SPECIAL                = $22000404; (* Apply special move *)
  1368.   {$EXTERNALSYM DIBUTTON_ARCADEP_SPECIAL}
  1369.   DIBUTTON_ARCADEP_SELECT                 = $22000405; (* Select special move *)
  1370.   {$EXTERNALSYM DIBUTTON_ARCADEP_SELECT}
  1371.   DIBUTTON_ARCADEP_MENU                   = $220004FD; (* Show menu options *)
  1372.   {$EXTERNALSYM DIBUTTON_ARCADEP_MENU}
  1373. (*--- Priority 2 controls                            ---*)
  1374.   DIHATSWITCH_ARCADEP_VIEW                = $22004601; (* Scroll view *)
  1375.   {$EXTERNALSYM DIHATSWITCH_ARCADEP_VIEW}
  1376.   DIBUTTON_ARCADEP_FIRESECONDARY          = $22004406; (* Alternative fire button *)
  1377.   {$EXTERNALSYM DIBUTTON_ARCADEP_FIRESECONDARY}
  1378.   DIBUTTON_ARCADEP_LEFT_LINK              = $2200C4E4; (* Fallback sidestep left button *)
  1379.   {$EXTERNALSYM DIBUTTON_ARCADEP_LEFT_LINK}
  1380.   DIBUTTON_ARCADEP_RIGHT_LINK             = $2200C4EC; (* Fallback sidestep right button *)
  1381.   {$EXTERNALSYM DIBUTTON_ARCADEP_RIGHT_LINK}
  1382.   DIBUTTON_ARCADEP_FORWARD_LINK           = $220144E0; (* Fallback move forward button *)
  1383.   {$EXTERNALSYM DIBUTTON_ARCADEP_FORWARD_LINK}
  1384.   DIBUTTON_ARCADEP_BACK_LINK              = $220144E8; (* Fallback move back button *)
  1385.   {$EXTERNALSYM DIBUTTON_ARCADEP_BACK_LINK}
  1386.   DIBUTTON_ARCADEP_VIEW_UP_LINK           = $2207C4E0; (* Fallback scroll view up button *)
  1387.   {$EXTERNALSYM DIBUTTON_ARCADEP_VIEW_UP_LINK}
  1388.   DIBUTTON_ARCADEP_VIEW_DOWN_LINK         = $2207C4E8; (* Fallback scroll view down button *)
  1389.   {$EXTERNALSYM DIBUTTON_ARCADEP_VIEW_DOWN_LINK}
  1390.   DIBUTTON_ARCADEP_VIEW_LEFT_LINK         = $2207C4E4; (* Fallback scroll view left button *)
  1391.   {$EXTERNALSYM DIBUTTON_ARCADEP_VIEW_LEFT_LINK}
  1392.   DIBUTTON_ARCADEP_VIEW_RIGHT_LINK        = $2207C4EC; (* Fallback scroll view right button *)
  1393.   {$EXTERNALSYM DIBUTTON_ARCADEP_VIEW_RIGHT_LINK}
  1394.   DIBUTTON_ARCADEP_DEVICE                 = $220044FE; (* Show input device and controls *)
  1395.   {$EXTERNALSYM DIBUTTON_ARCADEP_DEVICE}
  1396.   DIBUTTON_ARCADEP_PAUSE                  = $220044FC; (* Start / Pause / Restart game *)
  1397.   {$EXTERNALSYM DIBUTTON_ARCADEP_PAUSE}
  1398. (*--- CAD - 2D Object Control
  1399.       Controls to select and move objects in 2D  ---*)
  1400.   DIVIRTUAL_CAD_2DCONTROL                 = $23000000;
  1401.   {$EXTERNALSYM DIVIRTUAL_CAD_2DCONTROL}
  1402.   DIAXIS_2DCONTROL_LATERAL                = $23008201; (* Move view left / right *)
  1403.   {$EXTERNALSYM DIAXIS_2DCONTROL_LATERAL}
  1404.   DIAXIS_2DCONTROL_MOVE                   = $23010202; (* Move view up / down *)
  1405.   {$EXTERNALSYM DIAXIS_2DCONTROL_MOVE}
  1406.   DIAXIS_2DCONTROL_INOUT                  = $23018203; (* Zoom - in / out *)
  1407.   {$EXTERNALSYM DIAXIS_2DCONTROL_INOUT}
  1408.   DIBUTTON_2DCONTROL_SELECT               = $23000401; (* Select Object *)
  1409.   {$EXTERNALSYM DIBUTTON_2DCONTROL_SELECT}
  1410.   DIBUTTON_2DCONTROL_SPECIAL1             = $23000402; (* Do first special operation *)
  1411.   {$EXTERNALSYM DIBUTTON_2DCONTROL_SPECIAL1}
  1412.   DIBUTTON_2DCONTROL_SPECIAL              = $23000403; (* Select special operation *)
  1413.   {$EXTERNALSYM DIBUTTON_2DCONTROL_SPECIAL}
  1414.   DIBUTTON_2DCONTROL_SPECIAL2             = $23000404; (* Do second special operation *)
  1415.   {$EXTERNALSYM DIBUTTON_2DCONTROL_SPECIAL2}
  1416.   DIBUTTON_2DCONTROL_MENU                 = $230004FD; (* Show menu options *)
  1417.   {$EXTERNALSYM DIBUTTON_2DCONTROL_MENU}
  1418. (*--- Priority 2 controls                            ---*)
  1419.   DIHATSWITCH_2DCONTROL_HATSWITCH         = $23004601; (* Hat switch *)
  1420.   {$EXTERNALSYM DIHATSWITCH_2DCONTROL_HATSWITCH}
  1421.   DIAXIS_2DCONTROL_ROTATEZ                = $23024204; (* Rotate view clockwise / counterclockwise *)
  1422.   {$EXTERNALSYM DIAXIS_2DCONTROL_ROTATEZ}
  1423.   DIBUTTON_2DCONTROL_DISPLAY              = $23004405; (* Shows next on-screen display options *)
  1424.   {$EXTERNALSYM DIBUTTON_2DCONTROL_DISPLAY}
  1425.   DIBUTTON_2DCONTROL_DEVICE               = $230044FE; (* Show input device and controls *)
  1426.   {$EXTERNALSYM DIBUTTON_2DCONTROL_DEVICE}
  1427.   DIBUTTON_2DCONTROL_PAUSE                = $230044FC; (* Start / Pause / Restart game *)
  1428.   {$EXTERNALSYM DIBUTTON_2DCONTROL_PAUSE}
  1429. (*--- CAD - 3D object control
  1430.       Controls to select and move objects within a 3D environment  ---*)
  1431.   DIVIRTUAL_CAD_3DCONTROL                 = $24000000;
  1432.   {$EXTERNALSYM DIVIRTUAL_CAD_3DCONTROL}
  1433.   DIAXIS_3DCONTROL_LATERAL                = $24008201; (* Move view left / right *)
  1434.   {$EXTERNALSYM DIAXIS_3DCONTROL_LATERAL}
  1435.   DIAXIS_3DCONTROL_MOVE                   = $24010202; (* Move view up / down *)
  1436.   {$EXTERNALSYM DIAXIS_3DCONTROL_MOVE}
  1437.   DIAXIS_3DCONTROL_INOUT                  = $24018203; (* Zoom - in / out *)
  1438.   {$EXTERNALSYM DIAXIS_3DCONTROL_INOUT}
  1439.   DIBUTTON_3DCONTROL_SELECT               = $24000401; (* Select Object *)
  1440.   {$EXTERNALSYM DIBUTTON_3DCONTROL_SELECT}
  1441.   DIBUTTON_3DCONTROL_SPECIAL1             = $24000402; (* Do first special operation *)
  1442.   {$EXTERNALSYM DIBUTTON_3DCONTROL_SPECIAL1}
  1443.   DIBUTTON_3DCONTROL_SPECIAL              = $24000403; (* Select special operation *)
  1444.   {$EXTERNALSYM DIBUTTON_3DCONTROL_SPECIAL}
  1445.   DIBUTTON_3DCONTROL_SPECIAL2             = $24000404; (* Do second special operation *)
  1446.   {$EXTERNALSYM DIBUTTON_3DCONTROL_SPECIAL2}
  1447.   DIBUTTON_3DCONTROL_MENU                 = $240004FD; (* Show menu options *)
  1448.   {$EXTERNALSYM DIBUTTON_3DCONTROL_MENU}
  1449. (*--- Priority 2 controls                            ---*)
  1450.   DIHATSWITCH_3DCONTROL_HATSWITCH         = $24004601; (* Hat switch *)
  1451.   {$EXTERNALSYM DIHATSWITCH_3DCONTROL_HATSWITCH}
  1452.   DIAXIS_3DCONTROL_ROTATEX                = $24034204; (* Rotate view forward or up / backward or down *)
  1453.   {$EXTERNALSYM DIAXIS_3DCONTROL_ROTATEX}
  1454.   DIAXIS_3DCONTROL_ROTATEY                = $2402C205; (* Rotate view clockwise / counterclockwise *)
  1455.   {$EXTERNALSYM DIAXIS_3DCONTROL_ROTATEY}
  1456.   DIAXIS_3DCONTROL_ROTATEZ                = $24024206; (* Rotate view left / right *)
  1457.   {$EXTERNALSYM DIAXIS_3DCONTROL_ROTATEZ}
  1458.   DIBUTTON_3DCONTROL_DISPLAY              = $24004405; (* Show next on-screen display options *)
  1459.   {$EXTERNALSYM DIBUTTON_3DCONTROL_DISPLAY}
  1460.   DIBUTTON_3DCONTROL_DEVICE               = $240044FE; (* Show input device and controls *)
  1461.   {$EXTERNALSYM DIBUTTON_3DCONTROL_DEVICE}
  1462.   DIBUTTON_3DCONTROL_PAUSE                = $240044FC; (* Start / Pause / Restart game *)
  1463.   {$EXTERNALSYM DIBUTTON_3DCONTROL_PAUSE}
  1464. (*--- CAD - 3D Navigation - Fly through
  1465.       Controls for 3D modeling  ---*)
  1466.   DIVIRTUAL_CAD_FLYBY                     = $25000000;
  1467.   {$EXTERNALSYM DIVIRTUAL_CAD_FLYBY}
  1468.   DIAXIS_CADF_LATERAL                     = $25008201; (* move view left / right *)
  1469.   {$EXTERNALSYM DIAXIS_CADF_LATERAL}
  1470.   DIAXIS_CADF_MOVE                        = $25010202; (* move view up / down *)
  1471.   {$EXTERNALSYM DIAXIS_CADF_MOVE}
  1472.   DIAXIS_CADF_INOUT                       = $25018203; (* in / out *)
  1473.   {$EXTERNALSYM DIAXIS_CADF_INOUT}
  1474.   DIBUTTON_CADF_SELECT                    = $25000401; (* Select Object *)
  1475.   {$EXTERNALSYM DIBUTTON_CADF_SELECT}
  1476.   DIBUTTON_CADF_SPECIAL1                  = $25000402; (* do first special operation *)
  1477.   {$EXTERNALSYM DIBUTTON_CADF_SPECIAL1}
  1478.   DIBUTTON_CADF_SPECIAL                   = $25000403; (* Select special operation *)
  1479.   {$EXTERNALSYM DIBUTTON_CADF_SPECIAL}
  1480.   DIBUTTON_CADF_SPECIAL2                  = $25000404; (* do second special operation *)
  1481.   {$EXTERNALSYM DIBUTTON_CADF_SPECIAL2}
  1482.   DIBUTTON_CADF_MENU                      = $250004FD; (* Show menu options *)
  1483.   {$EXTERNALSYM DIBUTTON_CADF_MENU}
  1484. (*--- Priority 2 controls                            ---*)
  1485.   DIHATSWITCH_CADF_HATSWITCH              = $25004601; (* Hat switch *)
  1486.   {$EXTERNALSYM DIHATSWITCH_CADF_HATSWITCH}
  1487.   DIAXIS_CADF_ROTATEX                     = $25034204; (* Rotate view forward or up / backward or down *)
  1488.   {$EXTERNALSYM DIAXIS_CADF_ROTATEX}
  1489.   DIAXIS_CADF_ROTATEY                     = $2502C205; (* Rotate view clockwise / counterclockwise *)
  1490.   {$EXTERNALSYM DIAXIS_CADF_ROTATEY}
  1491.   DIAXIS_CADF_ROTATEZ                     = $25024206; (* Rotate view left / right *)
  1492.   {$EXTERNALSYM DIAXIS_CADF_ROTATEZ}
  1493.   DIBUTTON_CADF_DISPLAY                   = $25004405; (* shows next on-screen display options *)
  1494.   {$EXTERNALSYM DIBUTTON_CADF_DISPLAY}
  1495.   DIBUTTON_CADF_DEVICE                    = $250044FE; (* Show input device and controls *)
  1496.   {$EXTERNALSYM DIBUTTON_CADF_DEVICE}
  1497.   DIBUTTON_CADF_PAUSE                     = $250044FC; (* Start / Pause / Restart game *)
  1498.   {$EXTERNALSYM DIBUTTON_CADF_PAUSE}
  1499. (*--- CAD - 3D Model Control
  1500.       Controls for 3D modeling  ---*)
  1501.   DIVIRTUAL_CAD_MODEL                     = $26000000;
  1502.   {$EXTERNALSYM DIVIRTUAL_CAD_MODEL}
  1503.   DIAXIS_CADM_LATERAL                     = $26008201; (* move view left / right *)
  1504.   {$EXTERNALSYM DIAXIS_CADM_LATERAL}
  1505.   DIAXIS_CADM_MOVE                        = $26010202; (* move view up / down *)
  1506.   {$EXTERNALSYM DIAXIS_CADM_MOVE}
  1507.   DIAXIS_CADM_INOUT                       = $26018203; (* in / out *)
  1508.   {$EXTERNALSYM DIAXIS_CADM_INOUT}
  1509.   DIBUTTON_CADM_SELECT                    = $26000401; (* Select Object *)
  1510.   {$EXTERNALSYM DIBUTTON_CADM_SELECT}
  1511.   DIBUTTON_CADM_SPECIAL1                  = $26000402; (* do first special operation *)
  1512.   {$EXTERNALSYM DIBUTTON_CADM_SPECIAL1}
  1513.   DIBUTTON_CADM_SPECIAL                   = $26000403; (* Select special operation *)
  1514.   {$EXTERNALSYM DIBUTTON_CADM_SPECIAL}
  1515.   DIBUTTON_CADM_SPECIAL2                  = $26000404; (* do second special operation *)
  1516.   {$EXTERNALSYM DIBUTTON_CADM_SPECIAL2}
  1517.   DIBUTTON_CADM_MENU                      = $260004FD; (* Show menu options *)
  1518.   {$EXTERNALSYM DIBUTTON_CADM_MENU}
  1519. (*--- Priority 2 controls                            ---*)
  1520.   DIHATSWITCH_CADM_HATSWITCH              = $26004601; (* Hat switch *)
  1521.   {$EXTERNALSYM DIHATSWITCH_CADM_HATSWITCH}
  1522.   DIAXIS_CADM_ROTATEX                     = $26034204; (* Rotate view forward or up / backward or down *)
  1523.   {$EXTERNALSYM DIAXIS_CADM_ROTATEX}
  1524.   DIAXIS_CADM_ROTATEY                     = $2602C205; (* Rotate view clockwise / counterclockwise *)
  1525.   {$EXTERNALSYM DIAXIS_CADM_ROTATEY}
  1526.   DIAXIS_CADM_ROTATEZ                     = $26024206; (* Rotate view left / right *)
  1527.   {$EXTERNALSYM DIAXIS_CADM_ROTATEZ}
  1528.   DIBUTTON_CADM_DISPLAY                   = $26004405; (* shows next on-screen display options *)
  1529.   {$EXTERNALSYM DIBUTTON_CADM_DISPLAY}
  1530.   DIBUTTON_CADM_DEVICE                    = $260044FE; (* Show input device and controls *)
  1531.   {$EXTERNALSYM DIBUTTON_CADM_DEVICE}
  1532.   DIBUTTON_CADM_PAUSE                     = $260044FC; (* Start / Pause / Restart game *)
  1533.   {$EXTERNALSYM DIBUTTON_CADM_PAUSE}
  1534. (*--- Control - Media Equipment
  1535.       Remote        ---*)
  1536.   DIVIRTUAL_REMOTE_CONTROL                = $27000000;
  1537.   {$EXTERNALSYM DIVIRTUAL_REMOTE_CONTROL}
  1538.   DIAXIS_REMOTE_SLIDER                    = $27050201; (* Slider for adjustment: volume / color / bass / etc *)
  1539.   {$EXTERNALSYM DIAXIS_REMOTE_SLIDER}
  1540.   DIBUTTON_REMOTE_MUTE                    = $27000401; (* Set volume on current device to zero *)
  1541.   {$EXTERNALSYM DIBUTTON_REMOTE_MUTE}
  1542.   DIBUTTON_REMOTE_SELECT                  = $27000402; (* Next/previous: channel/ track / chapter / picture / station *)
  1543.   {$EXTERNALSYM DIBUTTON_REMOTE_SELECT}
  1544.   DIBUTTON_REMOTE_PLAY                    = $27002403; (* Start or pause entertainment on current device *)
  1545.   {$EXTERNALSYM DIBUTTON_REMOTE_PLAY}
  1546.   DIBUTTON_REMOTE_CUE                     = $27002404; (* Move through current media *)
  1547.   {$EXTERNALSYM DIBUTTON_REMOTE_CUE}
  1548.   DIBUTTON_REMOTE_REVIEW                  = $27002405; (* Move through current media *)
  1549.   {$EXTERNALSYM DIBUTTON_REMOTE_REVIEW}
  1550.   DIBUTTON_REMOTE_CHANGE                  = $27002406; (* Select next device *)
  1551.   {$EXTERNALSYM DIBUTTON_REMOTE_CHANGE}
  1552.   DIBUTTON_REMOTE_RECORD                  = $27002407; (* Start recording the current media *)
  1553.   {$EXTERNALSYM DIBUTTON_REMOTE_RECORD}
  1554.   DIBUTTON_REMOTE_MENU                    = $270004FD; (* Show menu options *)
  1555.   {$EXTERNALSYM DIBUTTON_REMOTE_MENU}
  1556. (*--- Priority 2 controls                            ---*)
  1557.   DIAXIS_REMOTE_SLIDER2                   = $27054202; (* Slider for adjustment: volume *)
  1558.   {$EXTERNALSYM DIAXIS_REMOTE_SLIDER2}
  1559.   DIBUTTON_REMOTE_TV                      = $27005C08; (* Select TV *)
  1560.   {$EXTERNALSYM DIBUTTON_REMOTE_TV}
  1561.   DIBUTTON_REMOTE_CABLE                   = $27005C09; (* Select cable box *)
  1562.   {$EXTERNALSYM DIBUTTON_REMOTE_CABLE}
  1563.   DIBUTTON_REMOTE_CD                      = $27005C0A; (* Select CD player *)
  1564.   {$EXTERNALSYM DIBUTTON_REMOTE_CD}
  1565.   DIBUTTON_REMOTE_VCR                     = $27005C0B; (* Select VCR *)
  1566.   {$EXTERNALSYM DIBUTTON_REMOTE_VCR}
  1567.   DIBUTTON_REMOTE_TUNER                   = $27005C0C; (* Select tuner *)
  1568.   {$EXTERNALSYM DIBUTTON_REMOTE_TUNER}
  1569.   DIBUTTON_REMOTE_DVD                     = $27005C0D; (* Select DVD player *)
  1570.   {$EXTERNALSYM DIBUTTON_REMOTE_DVD}
  1571.   DIBUTTON_REMOTE_ADJUST                  = $27005C0E; (* Enter device adjustment menu *)
  1572.   {$EXTERNALSYM DIBUTTON_REMOTE_ADJUST}
  1573.   DIBUTTON_REMOTE_DIGIT0                  = $2700540F; (* Digit 0 *)
  1574.   {$EXTERNALSYM DIBUTTON_REMOTE_DIGIT0}
  1575.   DIBUTTON_REMOTE_DIGIT1                  = $27005410; (* Digit 1 *)
  1576.   {$EXTERNALSYM DIBUTTON_REMOTE_DIGIT1}
  1577.   DIBUTTON_REMOTE_DIGIT2                  = $27005411; (* Digit 2 *)
  1578.   {$EXTERNALSYM DIBUTTON_REMOTE_DIGIT2}
  1579.   DIBUTTON_REMOTE_DIGIT3                  = $27005412; (* Digit 3 *)
  1580.   {$EXTERNALSYM DIBUTTON_REMOTE_DIGIT3}
  1581.   DIBUTTON_REMOTE_DIGIT4                  = $27005413; (* Digit 4 *)
  1582.   {$EXTERNALSYM DIBUTTON_REMOTE_DIGIT4}
  1583.   DIBUTTON_REMOTE_DIGIT5                  = $27005414; (* Digit 5 *)
  1584.   {$EXTERNALSYM DIBUTTON_REMOTE_DIGIT5}
  1585.   DIBUTTON_REMOTE_DIGIT6                  = $27005415; (* Digit 6 *)
  1586.   {$EXTERNALSYM DIBUTTON_REMOTE_DIGIT6}
  1587.   DIBUTTON_REMOTE_DIGIT7                  = $27005416; (* Digit 7 *)
  1588.   {$EXTERNALSYM DIBUTTON_REMOTE_DIGIT7}
  1589.   DIBUTTON_REMOTE_DIGIT8                  = $27005417; (* Digit 8 *)
  1590.   {$EXTERNALSYM DIBUTTON_REMOTE_DIGIT8}
  1591.   DIBUTTON_REMOTE_DIGIT9                  = $27005418; (* Digit 9 *)
  1592.   {$EXTERNALSYM DIBUTTON_REMOTE_DIGIT9}
  1593.   DIBUTTON_REMOTE_DEVICE                  = $270044FE; (* Show input device and controls *)
  1594.   {$EXTERNALSYM DIBUTTON_REMOTE_DEVICE}
  1595.   DIBUTTON_REMOTE_PAUSE                   = $270044FC; (* Start / Pause / Restart game *)
  1596.   {$EXTERNALSYM DIBUTTON_REMOTE_PAUSE}
  1597. (*--- Control- Web
  1598.       Help or Browser            ---*)
  1599.   DIVIRTUAL_BROWSER_CONTROL               = $28000000;
  1600.   {$EXTERNALSYM DIVIRTUAL_BROWSER_CONTROL}
  1601.   DIAXIS_BROWSER_LATERAL                  = $28008201; (* Move on screen pointer *)
  1602.   {$EXTERNALSYM DIAXIS_BROWSER_LATERAL}
  1603.   DIAXIS_BROWSER_MOVE                     = $28010202; (* Move on screen pointer *)
  1604.   {$EXTERNALSYM DIAXIS_BROWSER_MOVE}
  1605.   DIBUTTON_BROWSER_SELECT                 = $28000401; (* Select current item *)
  1606.   {$EXTERNALSYM DIBUTTON_BROWSER_SELECT}
  1607.   DIAXIS_BROWSER_VIEW                     = $28018203; (* Move view up/down *)
  1608.   {$EXTERNALSYM DIAXIS_BROWSER_VIEW}
  1609.   DIBUTTON_BROWSER_REFRESH                = $28000402; (* Refresh *)
  1610.   {$EXTERNALSYM DIBUTTON_BROWSER_REFRESH}
  1611.   DIBUTTON_BROWSER_MENU                   = $280004FD; (* Show menu options *)
  1612.   {$EXTERNALSYM DIBUTTON_BROWSER_MENU}
  1613. (*--- Priority 2 controls                            ---*)
  1614.   DIBUTTON_BROWSER_SEARCH                 = $28004403; (* Use search tool *)
  1615.   {$EXTERNALSYM DIBUTTON_BROWSER_SEARCH}
  1616.   DIBUTTON_BROWSER_STOP                   = $28004404; (* Cease current update *)
  1617.   {$EXTERNALSYM DIBUTTON_BROWSER_STOP}
  1618.   DIBUTTON_BROWSER_HOME                   = $28004405; (* Go directly to "home" location *)
  1619.   {$EXTERNALSYM DIBUTTON_BROWSER_HOME}
  1620.   DIBUTTON_BROWSER_FAVORITES              = $28004406; (* Mark current site as favorite *)
  1621.   {$EXTERNALSYM DIBUTTON_BROWSER_FAVORITES}
  1622.   DIBUTTON_BROWSER_NEXT                   = $28004407; (* Select Next page *)
  1623.   {$EXTERNALSYM DIBUTTON_BROWSER_NEXT}
  1624.   DIBUTTON_BROWSER_PREVIOUS               = $28004408; (* Select Previous page *)
  1625.   {$EXTERNALSYM DIBUTTON_BROWSER_PREVIOUS}
  1626.   DIBUTTON_BROWSER_HISTORY                = $28004409; (* Show/Hide History *)
  1627.   {$EXTERNALSYM DIBUTTON_BROWSER_HISTORY}
  1628.   DIBUTTON_BROWSER_PRINT                  = $2800440A; (* Print current page *)
  1629.   {$EXTERNALSYM DIBUTTON_BROWSER_PRINT}
  1630.   DIBUTTON_BROWSER_DEVICE                 = $280044FE; (* Show input device and controls *)
  1631.   {$EXTERNALSYM DIBUTTON_BROWSER_DEVICE}
  1632.   DIBUTTON_BROWSER_PAUSE                  = $280044FC; (* Start / Pause / Restart game *)
  1633.   {$EXTERNALSYM DIBUTTON_BROWSER_PAUSE}
  1634. (*--- Driving Simulator - Giant Walking Robot
  1635.       Walking tank with weapons  ---*)
  1636.   DIVIRTUAL_DRIVING_MECHA                 = $29000000;
  1637.   {$EXTERNALSYM DIVIRTUAL_DRIVING_MECHA}
  1638.   DIAXIS_MECHA_STEER                      = $29008201; (* Turns mecha left/right *)
  1639.   {$EXTERNALSYM DIAXIS_MECHA_STEER}
  1640.   DIAXIS_MECHA_TORSO                      = $29010202; (* Tilts torso forward/backward *)
  1641.   {$EXTERNALSYM DIAXIS_MECHA_TORSO}
  1642.   DIAXIS_MECHA_ROTATE                     = $29020203; (* Turns torso left/right *)
  1643.   {$EXTERNALSYM DIAXIS_MECHA_ROTATE}
  1644.   DIAXIS_MECHA_THROTTLE                   = $29038204; (* Engine Speed *)
  1645.   {$EXTERNALSYM DIAXIS_MECHA_THROTTLE}
  1646.   DIBUTTON_MECHA_FIRE                     = $29000401; (* Fire *)
  1647.   {$EXTERNALSYM DIBUTTON_MECHA_FIRE}
  1648.   DIBUTTON_MECHA_WEAPONS                  = $29000402; (* Select next weapon group *)
  1649.   {$EXTERNALSYM DIBUTTON_MECHA_WEAPONS}
  1650.   DIBUTTON_MECHA_TARGET                   = $29000403; (* Select closest enemy available target *)
  1651.   {$EXTERNALSYM DIBUTTON_MECHA_TARGET}
  1652.   DIBUTTON_MECHA_REVERSE                  = $29000404; (* Toggles throttle in/out of reverse *)
  1653.   {$EXTERNALSYM DIBUTTON_MECHA_REVERSE}
  1654.   DIBUTTON_MECHA_ZOOM                     = $29000405; (* Zoom in/out targeting reticule *)
  1655.   {$EXTERNALSYM DIBUTTON_MECHA_ZOOM}
  1656.   DIBUTTON_MECHA_JUMP                     = $29000406; (* Fires jump jets *)
  1657.   {$EXTERNALSYM DIBUTTON_MECHA_JUMP}
  1658.   DIBUTTON_MECHA_MENU                     = $290004FD; (* Show menu options *)
  1659.   {$EXTERNALSYM DIBUTTON_MECHA_MENU}
  1660. (*--- Priority 2 controls                            ---*)
  1661.   DIBUTTON_MECHA_CENTER                   = $29004407; (* Center torso to legs *)
  1662.   {$EXTERNALSYM DIBUTTON_MECHA_CENTER}
  1663.   DIHATSWITCH_MECHA_GLANCE                = $29004601; (* Look around *)
  1664.   {$EXTERNALSYM DIHATSWITCH_MECHA_GLANCE}
  1665.   DIBUTTON_MECHA_VIEW                     = $29004408; (* Cycle through view options *)
  1666.   {$EXTERNALSYM DIBUTTON_MECHA_VIEW}
  1667.   DIBUTTON_MECHA_FIRESECONDARY            = $29004409; (* Alternative fire button *)
  1668.   {$EXTERNALSYM DIBUTTON_MECHA_FIRESECONDARY}
  1669.   DIBUTTON_MECHA_LEFT_LINK                = $2900C4E4; (* Fallback steer left button *)
  1670.   {$EXTERNALSYM DIBUTTON_MECHA_LEFT_LINK}
  1671.   DIBUTTON_MECHA_RIGHT_LINK               = $2900C4EC; (* Fallback steer right button *)
  1672.   {$EXTERNALSYM DIBUTTON_MECHA_RIGHT_LINK}
  1673.   DIBUTTON_MECHA_FORWARD_LINK             = $290144E0; (* Fallback tilt torso forward button *)
  1674.   {$EXTERNALSYM DIBUTTON_MECHA_FORWARD_LINK}
  1675.   DIBUTTON_MECHA_BACK_LINK                = $290144E8; (* Fallback tilt toroso backward button *)
  1676.   {$EXTERNALSYM DIBUTTON_MECHA_BACK_LINK}
  1677.   DIBUTTON_MECHA_ROTATE_LEFT_LINK         = $290244E4; (* Fallback rotate toroso right button *)
  1678.   {$EXTERNALSYM DIBUTTON_MECHA_ROTATE_LEFT_LINK}
  1679.   DIBUTTON_MECHA_ROTATE_RIGHT_LINK        = $290244EC; (* Fallback rotate torso left button *)
  1680.   {$EXTERNALSYM DIBUTTON_MECHA_ROTATE_RIGHT_LINK}
  1681.   DIBUTTON_MECHA_FASTER_LINK              = $2903C4E0; (* Fallback increase engine speed *)
  1682.   {$EXTERNALSYM DIBUTTON_MECHA_FASTER_LINK}
  1683.   DIBUTTON_MECHA_SLOWER_LINK              = $2903C4E8; (* Fallback decrease engine speed *)
  1684.   {$EXTERNALSYM DIBUTTON_MECHA_SLOWER_LINK}
  1685.   DIBUTTON_MECHA_DEVICE                   = $290044FE; (* Show input device and controls *)
  1686.   {$EXTERNALSYM DIBUTTON_MECHA_DEVICE}
  1687.   DIBUTTON_MECHA_PAUSE                    = $290044FC; (* Start / Pause / Restart game *)
  1688.   {$EXTERNALSYM DIBUTTON_MECHA_PAUSE}
  1689. (*
  1690.  *  "ANY" semantics can be used as a last resort to get mappings for actions
  1691.  *  that match nothing in the chosen virtual genre.  These semantics will be
  1692.  *  mapped at a lower priority that virtual genre semantics.  Also, hardware
  1693.  *  vendors will not be able to provide sensible mappings for these unless
  1694.  *  they provide application specific mappings.
  1695.  *)
  1696.   DIAXIS_ANY_X_1                          = $FF00C201;
  1697.   {$EXTERNALSYM DIAXIS_ANY_X_1}
  1698.   DIAXIS_ANY_X_2                          = $FF00C202;
  1699.   {$EXTERNALSYM DIAXIS_ANY_X_2}
  1700.   DIAXIS_ANY_Y_1                          = $FF014201;
  1701.   {$EXTERNALSYM DIAXIS_ANY_Y_1}
  1702.   DIAXIS_ANY_Y_2                          = $FF014202;
  1703.   {$EXTERNALSYM DIAXIS_ANY_Y_2}
  1704.   DIAXIS_ANY_Z_1                          = $FF01C201;
  1705.   {$EXTERNALSYM DIAXIS_ANY_Z_1}
  1706.   DIAXIS_ANY_Z_2                          = $FF01C202;
  1707.   {$EXTERNALSYM DIAXIS_ANY_Z_2}
  1708.   DIAXIS_ANY_R_1                          = $FF024201;
  1709.   {$EXTERNALSYM DIAXIS_ANY_R_1}
  1710.   DIAXIS_ANY_R_2                          = $FF024202;
  1711.   {$EXTERNALSYM DIAXIS_ANY_R_2}
  1712.   DIAXIS_ANY_U_1                          = $FF02C201;
  1713.   {$EXTERNALSYM DIAXIS_ANY_U_1}
  1714.   DIAXIS_ANY_U_2                          = $FF02C202;
  1715.   {$EXTERNALSYM DIAXIS_ANY_U_2}
  1716.   DIAXIS_ANY_V_1                          = $FF034201;
  1717.   {$EXTERNALSYM DIAXIS_ANY_V_1}
  1718.   DIAXIS_ANY_V_2                          = $FF034202;
  1719.   {$EXTERNALSYM DIAXIS_ANY_V_2}
  1720.   DIAXIS_ANY_A_1                          = $FF03C201;
  1721.   {$EXTERNALSYM DIAXIS_ANY_A_1}
  1722.   DIAXIS_ANY_A_2                          = $FF03C202;
  1723.   {$EXTERNALSYM DIAXIS_ANY_A_2}
  1724.   DIAXIS_ANY_B_1                          = $FF044201;
  1725.   {$EXTERNALSYM DIAXIS_ANY_B_1}
  1726.   DIAXIS_ANY_B_2                          = $FF044202;
  1727.   {$EXTERNALSYM DIAXIS_ANY_B_2}
  1728.   DIAXIS_ANY_C_1                          = $FF04C201;
  1729.   {$EXTERNALSYM DIAXIS_ANY_C_1}
  1730.   DIAXIS_ANY_C_2                          = $FF04C202;
  1731.   {$EXTERNALSYM DIAXIS_ANY_C_2}
  1732.   DIAXIS_ANY_S_1                          = $FF054201;
  1733.   {$EXTERNALSYM DIAXIS_ANY_S_1}
  1734.   DIAXIS_ANY_S_2                          = $FF054202;
  1735.   {$EXTERNALSYM DIAXIS_ANY_S_2}
  1736.   DIAXIS_ANY_1                            = $FF004201;
  1737.   {$EXTERNALSYM DIAXIS_ANY_1}
  1738.   DIAXIS_ANY_2                            = $FF004202;
  1739.   {$EXTERNALSYM DIAXIS_ANY_2}
  1740.   DIAXIS_ANY_3                            = $FF004203;
  1741.   {$EXTERNALSYM DIAXIS_ANY_3}
  1742.   DIAXIS_ANY_4                            = $FF004204;
  1743.   {$EXTERNALSYM DIAXIS_ANY_4}
  1744.   DIPOV_ANY_1                             = $FF004601;
  1745.   {$EXTERNALSYM DIPOV_ANY_1}
  1746.   DIPOV_ANY_2                             = $FF004602;
  1747.   {$EXTERNALSYM DIPOV_ANY_2}
  1748.   DIPOV_ANY_3                             = $FF004603;
  1749.   {$EXTERNALSYM DIPOV_ANY_3}
  1750.   DIPOV_ANY_4                             = $FF004604;
  1751.   {$EXTERNALSYM DIPOV_ANY_4}
  1752. // #define DIBUTTON_ANY(instance)                  ( 0xFF004400 | instance )
  1753. function DIBUTTON_ANY(instance: Cardinal): Cardinal;
  1754. {$EXTERNALSYM DIBUTTON_ANY}
  1755. (****************************************************************************
  1756.  *
  1757.  *  Definitions for non-IDirectInput (VJoyD) features defined more recently
  1758.  *  than the current sdk files
  1759.  *
  1760.  ****************************************************************************)
  1761. //#ifdef _INC_MMSYSTEM
  1762. //#ifndef MMNOJOY
  1763. //#ifndef __VJOYDX_INCLUDED__
  1764. //#define __VJOYDX_INCLUDED__
  1765. const
  1766. (*
  1767.  * Flag to indicate that the dwReserved2 field of the JOYINFOEX structure
  1768.  * contains mini-driver specific data to be passed by VJoyD to the mini-
  1769.  * driver instead of doing a poll.
  1770.  *)
  1771.   JOY_PASSDRIVERDATA          = $10000000;
  1772.   {$EXTERNALSYM JOY_PASSDRIVERDATA}
  1773. (*
  1774.  * Informs the joystick driver that the configuration has been changed
  1775.  * and should be reloaded from the registery.
  1776.  * dwFlags is reserved and should be set to zero
  1777.  *)
  1778. const
  1779.   WinMMDll = 'WinMM.dll';
  1780. {$IFDEF DIRECTINPUT_DYNAMIC_LINK}
  1781. var
  1782.   joyConfigChanged: function(dwFlags: DWORD): MMRESULT; stdcall;
  1783. {$ELSE}
  1784. function joyConfigChanged(dwFlags: DWORD): MMRESULT; stdcall; external WinMMDll;
  1785. {$ENDIF}
  1786. {$EXTERNALSYM joyConfigChanged}
  1787. (*
  1788.  * Invoke the joystick control panel directly, using the passed window handle
  1789.  * as the parent of the dialog.  This API is only supported for compatibility
  1790.  * purposes; new applications should use the RunControlPanel method of a
  1791.  * device interface for a game controller.
  1792.  * The API is called by using the function pointer returned by
  1793.  * GetProcAddress( hCPL, TEXT("ShowJoyCPL") ) where hCPL is a HMODULE returned
  1794.  * by LoadLibrary( TEXT("joy.cpl") ).  The typedef is provided to allow
  1795.  * declaration and casting of an appropriately typed variable.
  1796.  *)
  1797. const
  1798.   JoyCPL = 'joy.cpl';
  1799. type
  1800.   TShowJoyCPL =  procedure(hWnd: HWND); stdcall;
  1801. {$IFDEF DIRECTINPUT_DYNAMIC_LINK}
  1802. var
  1803.   ShowJoyCPL: TShowJoyCPL;
  1804. {$ELSE}
  1805. procedure ShowJoyCPL(hWnd: HWND); stdcall; external JoyCPL;
  1806. {$ENDIF}
  1807. {$EXTERNALSYM ShowJoyCPL}
  1808. const
  1809. (*
  1810.  * Hardware Setting indicating that the device is a headtracker
  1811.  *)
  1812.   JOY_HWS_ISHEADTRACKER       = $02000000;
  1813.   {$EXTERNALSYM JOY_HWS_ISHEADTRACKER}
  1814. (*
  1815.  * Hardware Setting indicating that the VxD is used to replace
  1816.  * the standard analog polling
  1817.  *)
  1818.   JOY_HWS_ISGAMEPORTDRIVER    = $04000000;
  1819.   {$EXTERNALSYM JOY_HWS_ISGAMEPORTDRIVER}
  1820. (*
  1821.  * Hardware Setting indicating that the driver needs a standard
  1822.  * gameport in order to communicate with the device.
  1823.  *)
  1824.   JOY_HWS_ISANALOGPORTDRIVER  = $08000000;
  1825.   {$EXTERNALSYM JOY_HWS_ISANALOGPORTDRIVER}
  1826. (*
  1827.  * Hardware Setting indicating that VJoyD should not load this
  1828.  * driver, it will be loaded externally and will register with
  1829.  * VJoyD of it's own accord.
  1830.  *)
  1831.   JOY_HWS_AUTOLOAD            = $10000000;
  1832.   {$EXTERNALSYM JOY_HWS_AUTOLOAD}
  1833. (*
  1834.  * Hardware Setting indicating that the driver acquires any
  1835.  * resources needed without needing a devnode through VJoyD.
  1836.  *)
  1837.   JOY_HWS_NODEVNODE           = $20000000;
  1838.   {$EXTERNALSYM JOY_HWS_NODEVNODE}
  1839. (*
  1840.  * Hardware Setting indicating that the device is a gameport bus
  1841.  *)
  1842.   JOY_HWS_ISGAMEPORTBUS       = $80000000;
  1843.   {$EXTERNALSYM JOY_HWS_ISGAMEPORTBUS}
  1844.   JOY_HWS_GAMEPORTBUSBUSY     = $00000001;
  1845.   {$EXTERNALSYM JOY_HWS_GAMEPORTBUSBUSY}
  1846. (*
  1847.  * Usage Setting indicating that the settings are volatile and
  1848.  * should be removed if still present on a reboot.
  1849.  *)
  1850.   JOY_US_VOLATILE             = $00000008;
  1851.   {$EXTERNALSYM JOY_US_VOLATILE}
  1852. //#endif  (* __VJOYDX_INCLUDED__ *)
  1853. //#endif  (* not MMNOJOY *)
  1854. //#endif  (* _INC_MMSYSTEM *)
  1855. (****************************************************************************
  1856.  *
  1857.  *  Definitions for non-IDirectInput (VJoyD) features defined more recently
  1858.  *  than the current ddk files
  1859.  *
  1860.  ****************************************************************************)
  1861. //#ifdef _INC_MMDDK
  1862. //#ifndef MMNOJOYDEV
  1863. //#ifndef __VJOYDXD_INCLUDED__
  1864. //#define __VJOYDXD_INCLUDED__
  1865. const
  1866. (*
  1867.  * Poll type in which the do_other field of the JOYOEMPOLLDATA
  1868.  * structure contains mini-driver specific data passed from an app.
  1869.  *)
  1870.   JOY_OEMPOLL_PASSDRIVERDATA  = 7;
  1871.   {$EXTERNALSYM JOY_OEMPOLL_PASSDRIVERDATA}
  1872. //#endif  (* __VJOYDXD_INCLUDED__ *)
  1873. //#endif  (* not MMNOJOYDEV *)
  1874. //#endif  (* _INC_MMDDK *)
  1875. implementation
  1876. //#define DIEFT_GETTYPE(n)            LOBYTE(n)
  1877. function DIEFT_GETTYPE(n: Cardinal): Byte;
  1878. begin
  1879.   Result := LOBYTE(n);
  1880. end;
  1881. // #define GET_DIDEVICE_TYPE(dwDevType)    LOBYTE(dwDevType)
  1882. function GET_DIDEVICE_TYPE(dwDevType: DWORD): Byte;
  1883. begin
  1884.   Result := LOBYTE(dwDevType);
  1885. end;
  1886. // #define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
  1887. function GET_DIDEVICE_SUBTYPE(dwDevType: DWORD): Byte;
  1888. begin
  1889.   Result := HiByte(Word(dwDevType));
  1890. end;
  1891. // #define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
  1892. function DIDFT_MAKEINSTANCE(n: Cardinal): Cardinal;
  1893. begin
  1894.   Result := Word(n) shl 8;
  1895. end;
  1896. // #define DIDFT_GETTYPE(n)     LOBYTE(n)
  1897. function DIDFT_GETTYPE(n: Cardinal): Byte;
  1898. begin
  1899.   Result := LOBYTE(n);
  1900. end;
  1901. // #define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
  1902. function DIDFT_GETINSTANCE(n: Cardinal): Cardinal;
  1903. begin
  1904.   Result := LOWORD(n) shr 8;
  1905. end;
  1906. // #define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
  1907. function DIDFT_ENUMCOLLECTION(n: Cardinal): Cardinal;
  1908. begin
  1909.   Result := Word(n) shl 8;
  1910. end;
  1911. {$IFDEF DIRECTINPUT_VERSION_5b} (* #if(DIRECTINPUT_VERSION >= 0x050a) *)
  1912. // #define DIMAKEUSAGEDWORD(UsagePage, Usage) 
  1913. //                                 (DWORD)MAKELONG(Usage, UsagePage)
  1914. function DIMAKEUSAGEDWORD(UsagePage, Usage: Word): DWORD;
  1915. begin
  1916.   Result:= DWORD(MakeLong(UsagePage, Usage));
  1917. end;
  1918. {$ENDIF} (* DIRECTINPUT_VERSION >= 0x050a *)
  1919. //  #define DIJOFS_SLIDER(n)   (FIELD_OFFSET(DIJOYSTATE, rglSlider) + 
  1920. //                              (n) * sizeof(LONG))
  1921. function DIJOFS_SLIDER(n: Cardinal): Cardinal;
  1922. begin
  1923.   Result := Cardinal(@PDIJoyState(nil)^.rglSlider) + n*SizeOf(DWORD); //  + 24;
  1924. end;
  1925. // #define DIJOFS_POV(n)      (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + 
  1926. //                              (n) * sizeof(DWORD))
  1927. function DIJOFS_POV(n: Cardinal): Cardinal;
  1928. begin
  1929.   Result := Cardinal(@PDIJoyState(nil).rgdwPOV) + n*SizeOf(DWORD); //  + 32;
  1930. end;
  1931. // #define DIJOFS_BUTTON(n)   (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
  1932. function DIJOFS_BUTTON(n: Cardinal): Cardinal;
  1933. begin
  1934.   Result := Cardinal(@PDIJoyState(nil).rgbButtons) + n*SizeOf(DWORD); //  + 48;
  1935. end;
  1936. // #define DIBUTTON_ANY(instance)                  ( 0xFF004400 | instance )
  1937. function DIBUTTON_ANY(instance: Cardinal): Cardinal;
  1938. begin
  1939.   Result := $FF004400 or instance;
  1940. end;
  1941. {$IFDEF DIRECTINPUT_DYNAMIC_LINK}
  1942. var
  1943.   DirectInputLib: THandle = 0;
  1944.   DirectInput8Lib: THandle = 0;
  1945.   WinMMLib: THandle = 0;
  1946.   JoyCPLLib: THandle = 0;
  1947. function DirectInputLoaded: Boolean;
  1948. begin
  1949.   Result:= (DirectInputLib <> 0) and (DirectInput8Lib<>0);
  1950. end;
  1951. function UnLoadDirectInput: Boolean;
  1952. begin
  1953.   Result:= True;
  1954.   if (DirectInputLib <> 0) then
  1955.   begin
  1956.     Result:= Result and FreeLibrary(DirectInputLib);
  1957.     DirectInputCreateA:= nil;
  1958.     DirectInputCreateW:= nil;
  1959.     DirectInputCreate:= nil;
  1960.     DirectInputCreateEx:= nil;
  1961.     DirectInputLib:= 0;
  1962.   end;
  1963.   if (DirectInput8Lib <> 0) then
  1964.   begin
  1965.     Result:= Result and FreeLibrary(DirectInput8Lib);
  1966.     DirectInput8Create:= nil;
  1967.     DirectInput8Lib:= 0;
  1968.   end;
  1969.   if (WinMMLib <> 0) then
  1970.   begin
  1971.     Result:= Result and FreeLibrary(WinMMLib);
  1972.     joyConfigChanged:= nil;
  1973.     WinMMLib:= 0;
  1974.   end;
  1975.   if (JoyCPLLib <> 0) then
  1976.   begin
  1977.     Result:= Result and FreeLibrary(JoyCPLLib);
  1978.     ShowJoyCPL:= nil;
  1979.     JoyCPLLib:= 0;
  1980.   end;
  1981. end;
  1982. function LoadDirectInput: Boolean;
  1983. begin
  1984.   Result:= DirectInputLoaded;
  1985.   if (not Result) then
  1986.   begin
  1987.     DirectInputLib:= LoadLibrary(DirectInputDll);
  1988.     if (DirectInputLib<>0) then
  1989.     begin
  1990.       DirectInputCreateA:= GetProcAddress(DirectInputLib, 'DirectInputCreateA');
  1991.       DirectInputCreateW:= GetProcAddress(DirectInputLib, 'DirectInputCreateW');
  1992.       {$IFDEF UNICODE}
  1993.       DirectInputCreate:= GetProcAddress(DirectInputLib, 'DirectInputCreateW');
  1994.       {$ELSE}
  1995.       DirectInputCreate:= GetProcAddress(DirectInputLib, 'DirectInputCreateA');
  1996.       {$ENDIF}
  1997.       DirectInputCreateEx:= GetProcAddress(DirectInputLib, 'DirectInputCreateEx');
  1998.     end;
  1999.     DirectInput8Lib:= LoadLibrary(DirectInput8Dll);
  2000.     if (DirectInput8Lib<>0) then
  2001.     begin
  2002.       DirectInput8Create:= GetProcAddress(DirectInput8Lib, 'DirectInput8Create');
  2003.     end;
  2004.     WinMMLib:= LoadLibrary(WinMMDll);
  2005.     if (WinMMLib <> 0) then
  2006.     begin
  2007.       joyConfigChanged:= GetProcAddress(WinMMLib, 'joyConfigChanged');
  2008.     end;
  2009.     JoyCPLLib:= LoadLibrary(JoyCPL);
  2010.     if (JoyCPLLib <> 0) then
  2011.     begin
  2012.       ShowJoyCPL:= GetProcAddress(JoyCPLLib, 'ShowJoyCPL');
  2013.     end;
  2014.     // At least basic procedure is found!
  2015.     Result:= Assigned(DirectInputCreate) or Assigned(DirectInput8Create);
  2016.     if not Result then UnLoadDirectInput;
  2017.   end;
  2018. end;
  2019. {$ELSE}
  2020. function DirectInputLoaded: Boolean;
  2021. begin // Stub function for static linking
  2022.   Result:= True;
  2023. end;
  2024. function UnLoadDirectInput: Boolean;
  2025. begin // Stub function for static linking
  2026.   Result:= True; // should emulate "normal" behaviour
  2027. end;
  2028. function LoadDirectInput: Boolean;
  2029. begin // Stub function for static linking
  2030.   Result:= True;
  2031. end;
  2032. {$ENDIF}
  2033. {$IFDEF DIRECTINPUT_DYNAMIC_LINK}
  2034. initialization
  2035. {$IFNDEF DIRECTINPUT_DYNAMIC_LINK_EXPLICIT}
  2036.   LoadDirectInput;
  2037. {$ENDIF}
  2038. finalization
  2039.   UnLoadDirectInput;
  2040. {$ENDIF}
  2041. end.