1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
9<title>PADClampCircle2</title>
10</head>
11
12<body>
13
14<h1>PADClampCircle2</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/pad.h&gt;
19
20#define PAD_STICK_CLAMP_CIRCLE_WITH_MARGE       2
21#define PAD_STICK_CLAMP_CIRCLE_WITHOUT_MARGE    3
22
23void PADClampCircleEx(<a href="PADStatus.html">PADStatus</a>* status, u32 type );
24</pre></dd></dl>
25
26<h2>Arguments</h2>
27<TABLE class="arguments" border="1" >
28  <tr>
29<TH>status</TH>
30<TD>Array [<code>PAD_MAX_CONTROLLERS</code>] of <A href="PADStatus.html"><code>PADStatus</code></A> to be clamped. If the <SPAN class="argument">err</SPAN> member stores <code>PAD_ERR_NONE</code>, the analog stick input value is clamped according to the algorithm below.</TD>
31  </tr>
32  <TR>
33<TH>type</TH>
34<TD>One of <code>PAD_STICK_CLAMP_CIRCLE_*</code></TD>
35  </TR>
36</TABLE>
37
38<h2>Return Values</h2>
39<P>None.</P>
40
41<h2>Description</h2>
42<P>This function allows the value of analog stick input to be obtained in a broader range than is possible with the <CODE>PADClampCircle</CODE> function used with the Dolphin SDK. <code>PADClampCircle2</code> takes an array of <A href="PADStatus.html"><code>PADStatus</code></A> type as an argument. The number of elements in this array is indicated by <code>PAD_MAX_CONTROLLERS</code>. <code>PADClampCircle2</code> clamps all <A href="PADStatus.html"><code>PADStatus</code></A> at once.</P>
43<p>Unlike the <CODE>PADClampCircle</CODE> function, the analog trigger input is not clamped.</p>
44
45<P><B>Clamp algorithm</B> (Analog stick): Specifications can be made using <SPAN class="argument">type</SPAN> as shown in the figure below. <BR>If <code>PAD_STICK_CLAMP_CIRCLE_WITH_MARGE</code> is specified, the dead zone of the analog stick is clamped and the outside of an octagonal or circular shape is clamped. This allows the value of analog stick input to be obtained in a broader range than is possible with the <CODE>PADClampCircle</CODE> function used with the Dolphin SDK. If <code>PAD_STICK_CLAMP_CIRCLE_WITHOUT_MARGE</code> is specified, only the outside of a circle around the analog stick is clamped, as shown in the figure below. More accurate movement in the diagonal direction that straddles each axis can be gotten when the dead zone is not clamped. The outside of a circle having a radius of 80 around the control stick is clamped. The outside of a circle having a radius of 68 around the C stick is clamped.</P>
46<P><IMG src="images/padclampcircleM1.gif" alt="padclampcircleM1.gif" width="585" height="390"></P>
47<P><IMG src="images/padclampcircleM2.gif" alt="padclampcircleM2.gif" width="585" height="390"></P>
48<P><IMG src="images/padclampcircleC1.gif" alt="padclampcircleC1.gif" width="585" height="390"></P>
49<P><IMG src="images/padclampcircleC2.gif" alt="padclampcircleC2.gif" width="585" height="390"></P>
50
51<h2>See Also</h2>
52<p class="reference">
53<a href="PADClampCircle.html">PADClampCircle</a>,
54<a href="PADInit.html">PADInit</a>,
55<a href="PADRead.html">PADRead</a>,
56<a href="PADStatus.html">PADStatus</a>
57</p>
58
59<H2>Revision History</H2>
60<P>
612007/09/26 Revised <CODE>PAD_STICK_CIRCLE_*</CODE> in the <B>Description</B> section to <CODE>PAD_STICK_CLAMP_CIRCLE_*</CODE>.<br>2006/09/07 Initial version.<br>
62</p>
63
64<hr><p>CONFIDENTIAL</p></body>
65</html>