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
17
18<h2>C Specification</h2>
19
20<dl>
21  <dd><pre><code>#include &lt;revolution/pad.h&gt;
22
23#define PAD_STICK_CLAMP_CIRCLE_WITH_MARGE       2
24#define PAD_STICK_CLAMP_CIRCLE_WITHOUT_MARGE    3
25</code></pre>
26  </dd>
27  <dd><pre><CODE>void PADClampCircleEx(<a href="PADStatus.html">PADStatus</a>* status, u32 type );</CODE></pre>
28  </dd>
29</dl>
30<h2>Arguments</h2>
31<TABLE border="1" cellpadding="3" cellspacing="0.1">
32
33    <tr>
34<TD width="120" bgcolor="#ffffe8"><code><strong><em>status</em></strong></code></TD>
35<TD width="520">array[<code>PAD_MAX_CONTROLLERS</code>] of <a href="PADStatus.html"><code>PADStatus</code></a> to be clamped.&nbsp;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>
36    </tr>
37    <TR>
38<TD width="120" bgcolor="#ffffe8"><CODE><b><i>type</i></b></CODE></TD>
39      <TD>one of the <code>PAD_STICK_CLAMP_CIRCLE_*</code>.</TD>
40    </TR>
41
42</TABLE>
43<h2>Return Values</h2>
44<P>None.</P>
45<h2>Description</h2>
46<P>This function allows the value of analog stick input to be obtained in a broader range than 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 determined by <code>PAD_MAX_CONTROLLERS</code>. <code>PADClampCircle2</code> clamps all <A href="PADStatus.html"><code>PADStatus</code></A> at once.</P>
47<p>Unlike the <CODE>PADClampCircle</CODE> function, analog trigger input is not clamped. </p>
48
49<P><B>Clamp algorithm</B> (Analog stick): Specifications can be made using <code>type</code> as shown in the figure below.  If <code>PAD_STICK_CIRCLE_WITH_MARGE</code> is specified, the deadzone for the analog stick is clamped and the outside of an octagonal or circular shape is clamped. <P>This function allows the value of analog stick input to be obtained in a broader range than the <CODE>PADClampCircle</CODE> function used with the Dolphin SDK.  If <code>PAD_STICK_CIRCLE_WITHOUT_MARGE</code> is specified, the outside of a circle around the analog stick only is clamped as shown in the figure below. More accurate movement in the diagonal direction that straddles each axis can be obtained when the deadzone 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>
50<P><IMG src="images/padclampcircleM1.gif" alt="padclampcircleM1.gif" width="585" height="390"></P>
51<P><IMG src="images/padclampcircleM2.gif" alt="padclampcircleM2.gif" width="585" height="390"></P>
52<P><IMG src="images/padclampcircleC1.gif" alt="padclampcircleC1.gif" width="585" height="390"></P>
53<P><IMG src="images/padclampcircleC2.gif" alt="padclampcircleC2.gif" width="585" height="390"></P>
54
55
56
57<h2>See Also</h2>
58
59<p><a href="toc.html" target="contents">Game Pad Functions</a> <br> <code><a href="PADClampCircle.html">PADClampCircle</a></code>, <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>
60<H2>Revision History</H2>
61<P>2006/09/07 Initial version.</p>
62<hr>
63<P>CONFIDENTIAL</p>
64</BODY>
65</HTML>