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 http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>PADClampTrigger</title>
9</head>
10
11<body>
12
13<h1>PADClampTrigger</h1>
14
15
16<h2>C Specification</h2>
17
18<dl>
19  <dd>
20    <pre>
21      <code>
22#include &lt;revolution/pad.h&gt;
23
24#define PAD_TRIGGER_FIXED_BASE       0
25#define PAD_TRIGGER_INDIVIDUAL_BASE  1
26
27void PADClampTrigger( void *status, u32 type );
28      </code>
29    </pre>
30  </dd>
31</dl>
32
33<h2>Arguments</h2>
34<TABLE border="1">
35  <TBODY>
36    <TR>
37<TD width="120" bgcolor="#ffffe8"><code><b><i>status</i></b></code></TD>
38<TD>Pointer to the <a href="./PADStatus.html"><code>PADStatus</code></a> structure to be clamped. If the err member stores PAD_ERR_NONE, the analog trigger input is clamped according to the algorithm described below.</TD>
39    </TR>
40    <TR>
41<TD width="120" bgcolor="#ffffe8"><CODE><b><i>type</i></b></CODE></TD>
42<TD>Stores either <code>PAD_TRIGGER_FIXED_BASE</code> or <code>PAD_TRIGGER_INDIVIDUAL_BASE</code>.</TD>
43    </TR>
44  </TBODY>
45</TABLE>
46<h2>Return Values</h2>
47<p>None.</p>
48
49<H2>Description</H2>
50<p>Clamps the analog trigger inputs of a standard Nintendo GameCube controller.</p>
51<p>
52
53The algorithm for clamping the analog trigger can be specified using <code>type</code> as shown in the figure below. If <code>PAD_TRIGGER_FIXED_BASE</code> is specified, trigger input is clamped to a lower limit of 30 and an upper limit of 180 just like the clamp algorithm used when the <A href="./PADClamp.html"><CODE>PADClamp</CODE></A> function is called. If <code>PAD_TRIGGER_INDIVIDUAL_BASE</code> is specified, clamping is performed using the lower limit value for each controller unit as automatically obtained when the power is turned on or when <code>PADRecalibrate</code> is executed, and using an upper limit value equal to the lower limit value plus 180.
54</p>
55<p>Joint use with the <A href="./PADClamp.html"><CODE>PADClamp</CODE></A> function is not recommended since <A href="./PADClamp.html"><CODE>PADClamp</CODE></A> also clamps the analog input trigger.
56</p>
57<P><IMG src="images/padclamptrigger1.gif" alt="padclamptrigger1.gif" width="585" height="390"></P>
58<P><IMG src="images/padclamptrigger2.gif" alt="padclamptrigger2.gif" width="585" height="390"></P>
59
60<h2>See Also</h2>
61<p>
62<A href="./toc.html" target="contents"><CODE>PAD Functions</CODE></A><br>
63
64<A href="./PADStatus.html"><CODE>PADStatus</CODE></A><br>
65</p>
66
67<H2>Revision History</H2>
68<P>
692006/09/07 Initial version.<br>
70</p>
71
72</body>
73</html>