#include <revolution/pad.h>
void PADClamp(PADStatus* status);
status |
Array [PAD_MAX_CONTROLLERS] of PADStatus to be clamped. If the err member holds PAD_ERR_NONE, the analog stick input value is clamped according to the algorithm below. |
None.
Clamps the input from the analog sticks. The PADClamp 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 PADStatus objects at once.
Clamping Algorithm (analog sticks): PADClamp performs dead-zone and outer-octagon clamping for analog sticks as illustrated below. For the Control Stick, the function first clamps dead zones along both axes (±15), and then it clamps the outside of the octagon whose lengths from the center to its vertices are 72 (x = 0 or y = 0) and 56.6 (x = ±y). For the C-Stick (substick), the function first clamps dead zones along both axes (±15), and then it clamps along the outside of the octagon whose lengths from the center to its vertices are 59 (x = 0 or y = 0) and 43.8 (x = ±y).

Clamping Algorithm (analog trigger): PADClamp clamps the dead zone and outer zone of the analog trigger. The dead zone from 0 to 30 and the external zone from 180-255 are clamped. The trigger return value is between 0 and 150.
Controller Functions, PADInit, PADRead, PADStatus
2006/03/01 Initial version.
CONFIDENTIAL