1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>NASubBanner</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11
12<H1 align="left">NASubBanner <IMG src="../../image/BPT.gif" align=middle><IMG src="../../image/TWL.gif" align=middle></H1>
13<H2>Definition</H2>
14<PRE><CODE>
15#define NA_SUBBANNER_PALETTE_NUM    16
16#define NA_SUBBANNER_CHARACTER_NUM  16
17#define NA_SUBBANNER_PATTERN_NUM    8
18#define NA_SUBBANNER_CONTROL_NUM    64
19
20typedef struct NASubBannerControl
21{
22    u8 frameCount : 8;
23
24    union
25    {
26        struct
27        {
28            u8 cellNo   : 3;
29            u8 plttNo   : 3;
30            u8 flipH    : 1;
31            u8 flipV    : 1;
32        }
33        frameInfo;
34
35        u8 animeType;
36    };
37}
38NASubBannerControl;
39
40typedef struct NASubBannerAnime
41{
42    GXCharFmt16         image   [ NA_SUBBANNER_PATTERN_NUM ][ NA_SUBBANNER_CHARACTER_NUM ];
43    GXRgb               pltt    [ NA_SUBBANNER_PATTERN_NUM ][ NA_SUBBANNER_PALETTE_NUM ];
44    NASubBannerControl  control [ NA_SUBBANNER_CONTROL_NUM ];
45}
46NASubBannerAnime;
47
48typedef struct NASubBanner
49{
50    NASubBannerHeader   header;
51    NASubBannerAnime    anime;
52}
53NASubBanner;
54
55</CODE></PRE>
56
57<H2>Description</H2>
58<P>These sub-banner structures are used by the <A href="NA_SaveSubBanner.html"><CODE>NA_SaveSubBanner</CODE></A> and <A href="NA_LoadSubBanner.html"><CODE>NA_LoadSubBanner</CODE></A> functions. The details of each member are as follows.</P>
59<H3>NASubBanner Structure</H3>
60<TABLE>
61<TR><TD><code>header</code></TD><TD>The sub-banner header. It has a CRC value that should be set to the proper value with the <A href="NA_MakeSubBannerHeader.html"><CODE>NA_MakeSubBannerHeader</CODE></A> function when the following <CODE>anime</CODE> member is edited.</TD></TR>
62<TR><TD>anime</TD><TD>Animation data. See the following topics.</TD></TR>
63</TABLE>
64<H3>NASubBannerAnime Structure</H3>
65<TABLE>
66<TR><TD>image</TD><TD>Sub-banner character data. It is formatted with 4-bit index values into the color palette. The displayed image is the same as when <CODE>GX_OAM_SHAPE_32x32</CODE> is specified as the <SPAN class="argument">shape</SPAN> argument to the <A href="../../gx/g2/G2_SetOBJAttr.html"><CODE>G2_SetOBJAttr</CODE></A> function.
67</TD></TR>
68<TR><TD>pltt</TD><TD>Sub-banner color palette. It is formatted using the <CODE>GXRgb</CODE> type. The displayed image is the same as when <CODE>GX_OAM_COLORMODE_16</CODE> is specified as the <SPAN class="argument">color</SPAN> argument to the <A href="../../gx/g2/G2_SetOBJAttr.html"><CODE>G2_SetOBJAttr</CODE></A> function. <BR> <FONT color=#ff0000>You can use one only 16-color palette.<BR> Use palette 0. Do not use palettes 1&ndash;7.</FONT></P>
69</TD></TR>
70<TR><TD>control</TD><TD>Animation control data. See the following topics.</TD></TR>
71</TABLE>
72For details on <CODE>image</CODE> and <CODE>pltt</CODE>, see <B>OBJ</B> &gt; <B>Character OBJ</B> &gt; <B>Character Data Format</B> &gt; <B>16-Color Mode</B> in the <I>TWL Programming Manual</I>.
73<H3>NASubBannerControl Structure</H3>
74<TABLE>
75<TR><TD>frameCount</TD><TD>Use the following parameters up to the frame set by <CODE>frameCount</CODE>.<BR> Set a <CODE>0</CODE> in the terminating block.</TD></TR>
76<TR><TD>cellNo</TD><TD>Sets the sequential number of the <CODE>image</CODE> to use from the <CODE>NASubBannerAnime</CODE> structure.<BR> Setting the terminating block to 0 will result in a loop, and setting it to 1 will cause playback to stop at the last frame.</TD></TR>
77<TR><TD>plttNo</TD><TD>Sets the sequential number of the <CODE>pltt</CODE> to use from the <CODE>NASubBannerAnime</CODE> structure.<BR> <FONT color=#ff0000>Always set it to use number 0.</FONT></TD></TR>
78<TR><TD>flipH</TD><TD>Setting a value of 1 will cause horizontal flipping.<BR> <FONT color=#ff0000>You cannot change the flip setting alone using the same <CODE>cellNo</CODE> as the previous control data. Change the <CODE>image</CODE> along with the flip setting. When a loop is set, the same restrictions also apply to the first and last control data.</FONT></TD></TR>
79<TR><TD>flipV</TD><TD>Setting a value of 1 will cause vertical flipping.<BR> <FONT color=#ff0000>This has the same restrictions as <CODE>flipH</CODE>.</FONT></TD></TR>
80</TABLE>
81<H2>See Also</H2>
82<P>
83<A href="NA_MakeSubBannerHeader.html"><CODE>NA_MakeSubBannerHeader</CODE></A>
84</P>
85
86<H2>Revision History</H2>
87<P>
882008/11/04 Added animation restrictions.<BR> 2008/09/17 Split <CODE>flipType</CODE> into <CODE>flipH</CODE> and <CODE>flipV</CODE>. Added to <CODE>frameCount</CODE>.<BR> 2008/09/16 Initial version.
89</P>
90<hr><p>CONFIDENTIAL</p></body>
91</HTML>
92