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>GXPackedRGB5A3</title> 10</head> 11 12<body> 13 14<h1 align="left">GXPackedRGB5A3</h1> 15 16<h2>C Specification</h2> 17 18<dl> 19<dd><pre><CODE>#include <revolution/gx.h></CODE></pre></dd> 20<dd><pre><CODE>#define GXPackedRGB5A3(r, g, b, a) 21((u16)((a)>=224 ? \ 22((((r)&0xf8)<<7)|(((g)&0xf8)<<2)|(((b)&0xf8)>>3)|(1<<15)): \ 23((((r)&0xf0)<<4)|(((g)&0xf0) )|(((b)&0xf0)>>4)|(((a)&0xe0)<<7))))</CODE></pre> 24 </dd> 25</dl> 26 27<h2>Arguments</h2> 28<TABLE border="1" cellpadding="3" cellspacing="0.1"> 29 <tr> 30<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong><CODE>r,g,b,a</font></strong></em></TD> 31<TD width="520">Color components.</TD> 32 </tr> 33</TABLE> 34<h2>Return Values</h2> 35 36<p>None.</p> 37<H2>Description</H2> 38<P>Pack RGBA color components into RGBA5551/4443 16-bit format. <br> The fractions are rounded off each component.</P> 39 40<h2>See Also</h2> 41 42<p><a href="GXPackedRGB565.html">GXPackedRGB565</a><br> <a href="GXPackedRGBA4.html">GXPackedRGBA4</a><br> 43</p> 44<H2>Revision History</H2> 45<P>03/01/2006 Initial version.</P>