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>bannercvtr</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9<STYLE type="text/css"> 10<!-- 11.sample_source{ 12 background-color : #e8e8e8; 13} 14H3{ 15 color : teal; 16} 17.command_list{ 18 margin-bottom : 16pt; 19} 20.command_desc{ 21 } 22.command_item{ 23 margin-top : 16pt; 24 background-color : #e8e8e8; 25} 26.blockquoted_table { 27 border : 1px; 28 width : 80%; 29} 30TD,TH{ 31 border-color : #c0d8d8; 32 padding : 1pt 4pt 1pt 4pt; 33 border-width : 1px; 34 border-style : solid; 35} 36--> 37</STYLE> 38</HEAD> 39<BODY> 40<H1 align="left">bannercvtr <IMG src="../image/TWL.gif" align="middle"></H1> 41<H2>Description</H2> 42<P>TWL Banner Converter is a command-line tool that converts either cell animations created with NITRO-CHARACTER or NBF files created with <A href="ntexconv.html"><CODE>ntexconv</CODE></A> into binary files for use as TWL banner icons.</P> 43<H2>Using the Tool</H2> 44<H3>Start Command</H3> 45<P><CODE>% bannercvtr.exe [option] NCE_FILE | XML_FILE</CODE></P> 46<P><CODE>NCE_FILE</CODE> specifies an <CODE>.nce</CODE> file (cell animation) created with NITRO-CHARACTER.</P> 47<P><CODE>XML_FILE</CODE> specifies an XML file that describes the contents of the NBF files created with <A href="ntexconv.html"><CODE>ntexconv</CODE></A> as well as the content of the animation.</P> 48<P>The <CODE><B>-h</B></CODE> option displays simple instructions.</P> 49<P>The <CODE><B>--version</B></CODE> option displays the version of <CODE>bannercvtr</CODE>.</P> 50<P>The <CODE><B>-o <output file></B></CODE> option specifies the output file.</P> 51<P>The <CODE><B>-x</B></CODE> option will convert an <CODE>.nce</CODE> file created with NITRO-CHARACTER into NBF files and an XML file for the banner icon.</P> 52<P>The <CODE><B>-v</B></CODE> option displays detailed information about the conversion.</P> 53<H2>Converting Cell Animations Created with NITRO-CHARACTER</H2> 54<P>For information on how to create cell animation data (<CODE>*.nce</CODE>) for TWL banners using NITRO-CHARACTER, see <A href="bannerNitroCharacter.html">Banner Creation Procedure Using NITRO-CHARACTER</A>. 55</P> 56<H3>Start Command</H3> 57<P>Running the following command from the command line outputs a binary file in the same folder where the NCE file is. This binary file has the same name as the NCE file except its file extension is <CODE>.bin</CODE>.</P> 58 59<P><CODE>% bannercvtr.exe data.nce</CODE></P> 60 61<P>The output file can also be specified as follows.</P> 62 63<P><CODE>% bannercvtr.exe -o C:\data\output.bin data.nce</CODE></P> 64 65<P>The NCG and NCL files that are referenced by the NCE file must be saved in either the same project or the same folder as the NCE file.</P> 66 67<H2>Converting NBF Files Created with <A href="ntexconv.html">ntexconv</A></H2> 68<H3>Start Command</H3> 69<H4>Creating NBF Files</H4> 70<P>Use <CODE>ntexconv</CODE> to convert image files to NBF files. Run <CODE>ntexconv</CODE> with options like those shown below.</P> 71 72<P><CODE>% ntexconv.exe -no -bg -bgb -bgnc -f palette16 image0.bmp</CODE></P> 73 74<P>When assigning the transparent color 0 based on the alpha channel of the image file, use the <CODE>-ta</CODE> option. When assigning the transparent color 0 by specifying the transparent color (R,G,B), use the <CODE>-tc</CODE> option. Although NBFC, NBFP, and NBFS files are created after running <CODE>ntexconv</CODE>, NBFS files are not used with the TWL Banner Converter.</P> 75 76<H4>Creating XML Files for Banner Icons</H4> 77<P>This creates an XML file that describes the NBF files used for the banner icon and the content of the animation. The format of the XML file is explained in the next section.</P> 78 79<H4>Running TWL Banner Converter</H4> 80<P>Running the following command from the command line outputs a binary file in the same folder where the XML file is. This file has the same name as the XML file except its file extension is <CODE>.bin</CODE>.</P> 81 82<P><CODE>% bannercvtr.exe data.xml</CODE></P> 83 84<P>The output file can also be specified as shown below.</P> 85 86<P><CODE>% bannercvtr.exe -o C:\data\output.bin data.xml</CODE></P> 87<H3>Format of XML Files for Banner Icons</H3> 88<H4>Example XML File for a Banner Icon</H4> 89<BLOCKQUOTE> 90<PRE class="sample_source"><CODE><?xml version="1.0" encoding="Shift_JIS"?> 91<banner> 92<character_array> 93<character>character0.nbfc</character> 94<character>character1.nbfc</character> 95</character_array> 96<palette_array> 97<palette>palette0.nbfp</palette> 98</palette_array> 99<animation loop_mode="loop"> 10010 0 0 N 10120 1 0 N 1025 0 0 H 103</animation> 104</banner></CODE></PRE> 105</BLOCKQUOTE> 106<BLOCKQUOTE> 107<DL class="command_list"> 108<DT class="command_item"><CODE><character_array></CODE> 109<DD class="command_desc">Use the <CODE><character_array></CODE> element to list the NBFC files (character data) to use. Up to 8 <CODE><character_array></CODE> elements can be listed.<BR>If the path of an NBFC file is not a full path, it is interpreted as a relative path from the folder where the XML file is located. 110<DT class="command_item"><CODE><palette_array></CODE> 111<DD class="command_desc">Use the <CODE><palette_array></CODE> element to list the NBFP files (palette data) to use. Only 1 <CODE><palette_array></CODE> element can be listed.<BR>If the path of an NBFP file is not a full path, it is interpreted as a relative path from the folder where the XML file is located. 112<DT class="command_item"><CODE><animation></CODE> 113<DD class="command_desc">Lists the content of the animation.<BR>Specify the behavior of the animation using the <CODE>loop_mode</CODE> attribute. To loop, specify <CODE>loop</CODE>; to stop after the last frame, specify <CODE>stop</CODE>. Specify sets of data on a line in the <CODE><animation></CODE> element as follows. 114 115<PRE class="sample_source"><CODE>Number of frames Character No. Palette No. Flip </CODE></PRE> 116 117 <B>Number of frames</B> is the number of frames displayed using the designated character, palette, and flip setting. The maximum number of frames is 255. Specifying 0 causes the entry to be ignored.<BR><B>Character No.</B> is the number in <CODE><character_array></CODE>. The first <CODE><character></CODE> element is 0.<BR> <B>Palette No.</B> is the number of the <CODE><palette_array></CODE>. <FONT color=#ff0000>It should always be set to 0.</FONT><BR> <B>Flip</B> is "N" for no flip, "H" for a horizontal flip, "V" for a vertical flip, or "VH" (or "HV") for a combined horizontal and vertical flip.<BR><FONT color=#ff0000>It is not possible to change the flip only using the same character number from the previous key data.<BR> To change the flip, be sure to change the character number, too.<BR> When making a loop setting, the same restrictions apply to the last key data and the first key data.</FONT><BR> <BR><BR> 118 119If the <CODE>loop_mode</CODE> attribute is <CODE>stop</CODE>, the maximum number of data sets is 63. If the <CODE>loop_mode</CODE> attribute is <CODE>loop</CODE>, the maximum number of data sets is 64. 120</DL> 121</BLOCKQUOTE> 122 123<H3>Outputting NBF Files and an XML File for the Banner Icon</H3> 124<P>Running the following command from the command line converts an NCE file created with NITRO-CHARACTER into NBF files and an XML file for the banner icon.</P> 125 126<P><CODE>% bannercvtr.exe -x data.nce</CODE></P> 127 128<P>This outputs an XML file and some NBF files in the same folder where the NCE file is. The XML file has the same name as the NCE file except its file extension is <CODE>.xml</CODE>. The NBF files is output with the names "<CODE>character0.nbfc, character1.nbfc, character2.nbfc, ...</CODE>" (for character data) and the names "<CODE>palette0.nbfp, palette1.nbfp, palette2.nbfp, ...</CODE>" (for palette data). If the <CODE>-x</CODE> option is specified, a binary file for the banner icon is not output.</P> 129 130<P>It is also possible to specify the XML file that is output, as shown below. (The NBF files are output in the same directory as the XML file).</P> 131 132<P><CODE>% bannercvtr.exe -x -o C:\data\output.xml data.nce</CODE></P> 133 134<P>The NCG and NCL files that are referenced by the NCE file must be saved in either the same project or the same folder as the NCE file.</P> 135<H2>Location</H2> 136<P><CODE>$TwlSDK/tools/bin/bannercvtr.exe</CODE></P> 137<H2>See Also</H2> 138<P><A href="about_Banner.html">Banner Overview</A><BR> <A href="makebannerTWL.html"><CODE>makebanner.TWL</CODE></A><BR> <A href="ntexconv.html"><CODE>ntexconv</CODE></A><BR> <A href="bannerNitroCharacter.html">Banner Creation Procedure Using NITRO-CHARACTER</A></P> 139<H2>Revision History</H2> 140<P> 1412008/11/04 Added animation restrictions. <BR>2008/09/12 Initial version.</P> 142<hr><p>CONFIDENTIAL</p></body> 143</HTML>