#include <revolution/wpad.h>
#define WPAD_CHAN0 0
#define WPAD_CHAN1 1
#define WPAD_CHAN2 2
#define WPAD_CHAN3 3
#define WPAD_STICK_CLAMP_OCTA_WITH_PLAY 0
#define WPAD_STICK_CLAMP_OCTA_WITHOUT_PLAY 1
#define WPAD_STICK_CLAMP_CIRCLE_WITH_PLAY 2
#define WPAD_STICK_CLAMP_CIRCLE_WITHOUT_PLAY 3
void WPADClampStick( s32 chan, void *status, u32 type );
chan |
One of WPAD_CHAN*. |
status |
Pointer to the WPADStatus structure to be clamped. If the err member stores WPAD_ERR_NONE, the analog stick input value is clamped according to the algorithm below. |
type |
One of WPAD_STICK_CLAMP_*. |
None.
This API clamps the input of the analog stick of a Nunchuk unit or a classic controller unit.
The algorithm for clamping the analog stick can be specified using type as shown in the figure below. If WPAD_STICK_CLAMP_OCTA_WITH_PLAY or WPAD_STICK_CIRCLE_WITH_PLAY are specified, the deadzone for the analog stick is clamped and the outside of an octagonal or circular shape is clamped. If WPAD_STICK_CLAMP_OCTA_WITHOUT_PLAY or WPAD_STICK_CIRCLE_WITHOUT_PLAY are specified, only the outside of the octagonal or circular shape is clamped without clamping the deadzone. More accurate movement in the diagonal direction that straddles each axis can be obtained when the deadzone is not clamped.








WPAD Functions
WPADFSStatus
WPADCLStatus
08/15/2006 Changed the API, added circular clamping and added diagrams.
06/19/2006 Changed the name of the External Extension Controller, deleted a description related to standard GameCube controllers from the text, and deleted parts related to the sub-stick from the figure.
11/10/2005 Initial version.
CONFIDENTIAL