1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<TITLE>PADClamp2</TITLE> 9</HEAD> 10<BODY> 11<H1>PADClamp2</H1> 12<H2>C Specification</H2> 13<DL> 14 <DD> 15<PRE><CODE>#include <revolution/pad.h> 16 17#define PAD_STICK_CLAMP_OCTA_WITH_MARGE 0 18#define PAD_STICK_CLAMP_OCTA_WITHOUT_MARGE 1 19</CODE></PRE> 20 <DD> 21 <PRE><CODE>void PADClamp2(<A href="PADStatus.html">PADStatus</A>* status, u32 type );</CODE></PRE> 22</DL> 23<H2>Arguments</H2> 24<TABLE border="1" cellpadding="3" cellspacing="0.1"> 25 <TBODY> 26 <TR> 27<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>status</EM></STRONG></CODE></TD> 28<TD width="520">array[<code>PAD_MAX_CONTROLLERS</code>] of <a href="PADStatus.html"><code>PADStatus</code></a> to be clamped. If the <CODE><b><i>err</i></b></CODE> member stores <code>PAD_ERR_NONE</code>, the analog stick input value is clamped according to the algorithm below.</TD> 29 </TR> 30 <TR> 31<TD width="120" bgcolor="#ffffe8"><CODE><b><i>type</i></b></CODE></TD> 32 <TD>one of the <code>PAD_STICK_CLAMP_OCTA_*</code>.</TD> 33 </TR> 34 </TBODY> 35</TABLE> 36<H2>Return Values</H2> 37<P>None.</P> 38<H2>Description</H2> 39<P>This function allows the value of analog stick input to be obtained in a broader range than is possible with the <CODE>PADClamp</CODE> function used with the Dolphin SDK. The <code>PADClamp2</code> function takes an array of <a href="PADStatus.html"><code>PADStatus</code></a> type as an argument. The number of elements in this array is determined by <code>PAD_MAX_CONTROLLERS</code>. This function clamps all the <a href="PADStatus.html"><code>PADStatus</code></a> data at once. 40</P> 41<p>Unlike the <CODE>PADClamp</CODE> function, this function does not clamp analog trigger input. </p> 42<p> 43<B>Clamp algorithm</B> (Analog stick): Specifications can be made using <code>type</code> as shown in the figure below. If <code>PAD_STICK_CLAMP_OCTA_WITH_MARGE</code> 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 <CODE>PADClamp</CODE> function used with the Dolphin SDK. If <code>PAD_STICK_CLAMP_OCTA_WITHOUT_MARGE</code> 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. 44</p> 45 46<P><IMG src="images/padclampM1.gif" alt="padclampM1.gif" width="585" height="390"></P> 47<P><IMG src="images/padclampM2.gif" alt="padclampM2.gif" width="585" height="390"></P> 48<P><IMG src="images/padclampC1.gif" alt="padclampC1.gif" width="585" height="390"></P> 49<P><IMG src="images/padclampC2.gif" alt="padclampC2.gif" width="585" height="390"></P> 50 51 52<H2>See Also</H2> 53<P><a href="list.html" target="contents">Game Pad Functions</a>, <a href="PADClamp.html"><code>PADClamp()</code></a>, <code><a href="PADInit.html">PADInit()</a></code>, <A href="PADRead.html"><CODE>PADRead</CODE></A>, <code><a href="PADStatus.html">PADStatus</a></code></P> 54<H2>Revision History</H2> 55<P>2006/09/07 Initial version.</P> 56<hr> 57<P>CONFIDENTIAL</p> 58</BODY> 59</HTML>