Difference between revisions of "Pad (call target)"
Jump to navigation
Jump to search
(Created page with "{{Call|id=0x0006|return=u_short|name=pad|args=|act=}}Polls a gamepad and returns button data. All controls are converted to Dualshock 2 equivalents. VM doesn't see buttons no...") |
|||
Line 2: | Line 2: | ||
All controls are converted to Dualshock 2 equivalents. VM doesn't see buttons not assigned to DS2 counterparts. The values are as follows:<syntaxhighlight lang="cpp"> | All controls are converted to Dualshock 2 equivalents. VM doesn't see buttons not assigned to DS2 counterparts. The values are as follows:<syntaxhighlight lang="cpp"> | ||
− | + | #define PAD_LEFT 0x0080 | |
#define PAD_DOWN 0x0040 | #define PAD_DOWN 0x0040 | ||
#define PAD_RIGHT 0x0020 | #define PAD_RIGHT 0x0020 | ||
Line 18: | Line 18: | ||
#define PAD_R2 0x0200 | #define PAD_R2 0x0200 | ||
#define PAD_L2 0x0100 | #define PAD_L2 0x0100 | ||
− | |||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 09:39, 23 July 2019
Signature:
u_short pad(); // id: 0x0006
Polls a gamepad and returns button data.
All controls are converted to Dualshock 2 equivalents. VM doesn't see buttons not assigned to DS2 counterparts. The values are as follows:
#define PAD_LEFT 0x0080
#define PAD_DOWN 0x0040
#define PAD_RIGHT 0x0020
#define PAD_UP 0x0010
#define PAD_START 0x0008
#define PAD_R3 0x0004
#define PAD_L3 0x0002
#define PAD_SELECT 0x0001
#define PAD_SQUARE 0x8000
#define PAD_CROSS 0x4000
#define PAD_CIRCLE 0x2000
#define PAD_TRIANGLE 0x1000
#define PAD_R1 0x0800
#define PAD_L1 0x0400
#define PAD_R2 0x0200
#define PAD_L2 0x0100