#include <revolution/pad.h>
#define PAD_STICK_CLAMP_OCTA_WITH_MARGE 0
#define PAD_STICK_CLAMP_OCTA_WITHOUT_MARGE 1
void PADClamp2(PADStatus* status, u32 type );
status |
array[PAD_MAX_CONTROLLERS] of PADStatus to be clamped. If the err member stores PAD_ERR_NONE, the analog stick input value is clamped according to the algorithm below. |
type |
one of the PAD_STICK_CLAMP_OCTA_*. |
None.
This function allows the value of analog stick input to be obtained in a broader range than is possible with the PADClamp function used with the Dolphin SDK. The PADClamp2 function takes an array of PADStatus type as an argument. The number of elements in this array is determined by PAD_MAX_CONTROLLERS. This function clamps all the PADStatus data at once.
Unlike the PADClamp function, this function does not clamp analog trigger input.
Clamp algorithm (Analog stick): Specifications can be made using type as shown in the figure below. If PAD_STICK_CLAMP_OCTA_WITH_MARGE is specified, the deadzone of the analog stick is clamped and the outside of an octagonal or circular shape is clamped. This function allows the value of analog stick input to be obtained in a broader range than is possible with the PADClamp function used with the Dolphin SDK. If PAD_STICK_CLAMP_OCTA_WITHOUT_MARGE has been 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.




Game Pad Functions, PADClamp(), PADInit(), PADRead, PADStatus
2006/09/07 Initial version.
CONFIDENTIAL