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<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/pad.h&gt;
18
19#define PAD_TRIGGER_FIXED_BASE       0
20#define PAD_TRIGGER_INDIVIDUAL_BASE  1
21
22void PADClampTrigger( void *status, u32 type );
23</pre></dd></dl>
24
25<h2>Arguments</h2>
26<TABLE class="arguments" border="1" >
27  <TBODY>
28    <TR>
29<TH>status</TH>
30<TD>Pointer to the <a href="./PADStatus.html"><code>PADStatus</code></a> structure to be clamped. If the <SPAN class="argument">err</SPAN> member stores <CODE>PAD_ERR_NONE</CODE>, the analog trigger input value is clamped according to the algorithm below.</TD>
31    </TR>
32    <TR>
33<TH>type</TH>
34<TD>Either <code>PAD_TRIGGER_FIXED_BASE</code> or <code>PAD_TRIGGER_INDIVIDUAL_BASE</code></TD>
35    </TR>
36  </TBODY>
37</TABLE>
38
39<h2>Return Values</h2>
40<p>None.</p>
41
42<H2>Description</H2>
43<p>Clamps the analog trigger inputs of a standard Nintendo GameCube controller.</p>
44<p>
45The algorithm for clamping the analog trigger can be specified using <SPAN class="argument">type</SPAN> as shown in the figure below. <BR>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.
46</p>
47<p>Joint use with the <A href="./PADClamp.html"><CODE>PADClamp</CODE></A> function is not recommended since the <A href="./PADClamp.html"><CODE>PADClamp</CODE></A> function also clamps the analog input trigger.
48</p>
49<P><IMG src="images/padclamptrigger1.gif" alt="padclamptrigger1.gif" width="585" height="390"></P>
50<P><IMG src="images/padclamptrigger2.gif" alt="padclamptrigger2.gif" width="585" height="390"></P>
51
52<h2>See Also</h2>
53<p class="reference">
54<A href="./PADStatus.html">PADStatus</A>
55</p>
56
57<H2>Revision History</H2>
58<P>
592006/09/07 Initial version.<br>
60</p>
61
62<hr><p>CONFIDENTIAL</p></body>
63</html>