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>GXCompressZ16</title>
10</head>
11
12<body>
13
14<h1 align="left">GXCompressZ16</h1>
15
16
17<h2>C Specification</h2>
18
19<dl>
20<dd><PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE>
21  </dd>
22<dd><pre>u32 GXCompressZ16( u32 z24, GXZFmt16 zfmt );</pre>
23  </dd>
24</dl>
25
26<h2>Arguments</h2>
27<TABLE border="1" cellpadding="3" cellspacing="0.1">
28  <tr>
29<TD width="120" valign="top" bgcolor="#ffffe8"><code><em><strong>z24</strong></em></code></TD>
30<TD width="520">24-bit z value&nbsp;0x00000000 &lt;= <code><strong><em>z24</em></strong></code> &lt;= 0x00FFFFFF.</TD>
31    </tr>
32  <tr>
33<TD width="120" valign="top" bgcolor="#ffffe8"><code><em><strong>zfmt</strong></em></code></TD>
34<TD width="520">Z compression format Accepted values are:
35      <TABLE border="1" width="500" cellspacing="0.1">
36
37          <tr>
38<TD width="150" bgcolor="#C0C0C0">Name</TD>
39<TD width="350" bgcolor="#C0C0C0">Z format</TD>
40          </tr>
41          <tr>
42<TD width="150"><code>GX_ZC_LINEAR</code></TD>
43<TD width="350">Linear 16bit</TD>
44          </tr>
45          <tr>
46<TD width="150"><code>GX_ZC_NEAR</code></TD>
47<TD width="350">Compressed format for smaller far/near ratio</TD>
48          </tr>
49          <tr>
50<TD width="150"><code>GX_ZC_MID</code></TD>
51<TD width="350">Compressed format for medium far/near ratio</TD>
52          </tr>
53          <tr>
54<TD width="150"><code>GX_ZC_FAR</code></TD>
55<TD width="350">Compressed format for large far/near ratio</TD>
56          </tr>
57
58      </TABLE>
59      </TD>
60    </tr>
61</TABLE>
62<h2>Return Values</h2>
63
64<P>16-bit compressed Z value. Return type is u32 to match the argument of <code><a href="GXPokeZ.html">GXPokeZ</a></code>.</P>
65<H2>Description</H2>
66<P>This auxiliary function is used to directly write the Z value to the 16-bit Z buffer, using the <A href="GXPokeZ.html"><CODE>GXPokeZ</CODE></A> function. The 24-bit value is compressed to a 16-bit value via the Z compression format specified by the argument <CODE><EM><STRONG>zfmt</STRONG></EM></CODE>.</P>
67
68
69
70
71<h2>See Also</h2>
72
73<p><code><a href="GXPokeZ.html">GXPokeZ</a><br> <a href="GXDecompressZ16.html">GXDecompressZ16</a></code></p>
74<H2>Revision History</H2>
75<P>03/01/2006 Initial version.</P>
76</BODY>
77</HTML>
78