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>WPADClampTrigger</title> 9</head> 10 11<body> 12 13<h1>WPADClampTrigger</h1> 14 15 16<h2>C Specification</h2> 17 18<dl> 19 <dd> 20 <pre> 21 <code> 22#include <revolution/wpad.h> 23 24#define WPAD_CHAN0 0 25#define WPAD_CHAN1 1 26#define WPAD_CHAN2 2 27#define WPAD_CHAN3 3 28 29#define WPAD_TRIGGER_FIXED_BASE 0 30#define WPAD_TRIGGER_INDIVIDUAL_BASE 1 31 32void WPADClampTrigger( s32 chan, void *status, u32 type ); 33 </code> 34 </pre> 35 </dd> 36</dl> 37 38<h2>Arguments</h2> 39<TABLE border="1"> 40 <TBODY> 41 <TR> 42<TD width="120" bgcolor="#ffffe8"><CODE><b><i>chan</i></b></CODE></TD> 43<TD>One of the <code>WPAD_CHAN*</code>.</TD> 44 </TR> 45 <TR> 46<TD width="120" bgcolor="#ffffe8"><code><b><i>status</i></b></code></TD> 47<TD>Pointer to the <a href="./WPADStatus.html"><code>WPADStatus</code></a> structure to be clamped. If the err member stores WPAD_ERR_NONE, the analog trigger input is clamped according to the algorithm described below.</TD> 48 </TR> 49 <TR> 50<TD width="120" bgcolor="#ffffe8"><CODE><b><i>type</i></b></CODE></TD> 51<TD>Stores either <code>WPAD_TRIGGER_FIXED_BASE</code> or <code>WPAD_TRIGGER_INDIVIDUAL_BASE</code>.</TD> 52 </TR> 53 </TBODY> 54</TABLE> 55<h2>Return Values</h2> 56<p>None.</p> 57 58<H2>Description</H2> 59<p>Clamps the input of the analog trigger of a Classic Controller.</p> 60<p> 61The algorithm for clamping the analog trigger can be specified using <code>type</code> as shown in the figure below. If <code>WPAD_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 for the analog trigger of the Nintendo GameCube standard controller. If <code>WPAD_TRIGGER_INDIVIDUAL_BASE</code> is specified, clamping is performed using the lower limit value for each Classic Controller as obtained using the <a href="./WPADGetCLTriggerThreshold.html"><code>WPADGetCLTriggerThreshold</code></a> function and the upper limit value as (the obtained lower limit value + 180). 62</p> 63 64<P><IMG src="WPADClampTrigger.gif" alt="WPADClampTrigger.gif" width="575" height="375"></P> 65 66<h2>See Also</h2> 67<p> 68<A href="./toc.html" target="contents">WPAD Functions</A><br> <A href="./WPADGetCLTriggerThreshold.html"><CODE>WPADGetCLTriggerThreshold</CODE></A>, <A href="./WPADCLStatus.html"><CODE>WPADCLStatus</CODE></A><br> 69</p> 70 71<H2>Revision History</H2> 72<P> 732006/08/15 Initial version. 74</p> 75 76<hr> 77<P>CONFIDENTIAL</p> 78</BODY> 79</HTML>