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 http-equiv="Content-Style-Type" content="text/css"> 6<TITLE>TexConv</TITLE> 7<LINK rel="stylesheet" href="../CSS/revolution.css"> 8</HEAD> 9<BODY> 10<H1>TexConv</H1> 11 12<H2>Overview</H2> 13<P>TexConv converts an image file in the Truevision Graphics Adapter (TGA) format into a TPL file according to the specifications in a script file.</P> 14 15<H2>Using the Tool</H2> 16<P>TexConv is executed by the following command.</P> 17 18<table border="1" width="80%"> 19 <tbody> 20 <tr> 21 <td width="80%"> 22<pre><code> 23TexConv (TCS file) (TPL file) 24</code></pre> 25 </td> 26 </tr> 27 </tbody> 28</table> 29<br> 30 31<P>A TGA file is not directly specified as an argument to TexConv. Instead, specify a texture conversion script (TCS) file, which contains the path of the TGA file to convert as well as other settings.</P> 32 33<H2>Texture Conversion Script File</H2> 34<P> 35An example texture conversion script (TCS) file is given below. For more information, see the Revolution Texture Palette Library (TPL) (Graphics_Programmer's_Guide/TPL.pdf). 36</P> 37<table border="1" width="80%"> 38 <tbody> 39 <tr> 40 <td width="80%"> 41<pre><code> 42 ; Comments start with a semicolon and continue to the end of the line 43 44path = c:/level1/mario/ ; Sets the path of the directory in which files exist 45 ; If path is NULL, the full path is required in the filename 46 ; path will be attached to all of the filenames that come after 47 ; path can be set on any line 48 ; path can be an absolute or relative path 49 50file 0 = marioHead_rgba8.tga 51 ; The complete filename is 52 ; c:/level1/mario/marioHead_rgba8.tga 53image 0 = 0, 0, RGBA8 ; With image0[RGB]=file0 and image0[A]=file0, convert into RGBA8 54 ; 55texture 0 = 0, x ; With TPL file texture 0, the image index is image0 56 ; This is not a color index texture, so the CLUT index is "x" 57 ; 58 ; 59 60path = d:/temp/mario/ ; Change the path 61file 1 = marioArm_rgb565.tga 62 ; The complete filename is 63 ; d:/temp/mario/marioArm_rgb565.tga 64image 1 = 1, x, RGB565, 0, 3, 0 65 ; Generate mipmaps 0 to 3 (four levels of detail) and remap to 0 66texture 1 = 1, x 67 68file 2 = marioFoot_ci8.tga 69image 2 = 2, x, CI8 ; Convert to CI format 70palette 0 = 2, RGB565 ; Create palette 0 from image 2 71 ; Convert palette entries into RGB565 format 72texture 2 = 2, 0 ; texture 2[RGB] = image 2, 73 ; texture 2[CLUT] = palette 0 74 75path = NULL ; No path setting 76file 3 = c:/marioBody_i8.tga 77 ; The full path is required here 78image 3 = 3, x, I8, GX_REPEAT, GX_REPEAT 79 ; TexConv automatically converts RGB input into intensity output. 80 ; The wrapping mode can be configured for S and T to repeat. 81 ; The wrap mode can be set in the same way as the mipmap arguments. 82 ; 83 ; 84 ; 85texture 3 = 3, x 86</code></pre> 87 </td> 88 </tr> 89 </tbody> 90</table> 91<br> 92<H3>Basic Formatting Rules</H3> 93<P> 94Script files have the following basic rules.<br> - Spaces are ignored. Both "image1=1" and "image 1 = 1" are considered to be identical.<br> - Text is parsed line by line. A line ends with a newline character and cannot contain more than 255 characters.<br> - Images, textures, and palettes can be listed in any order, as can their indices. TexConv sorts each list in ascending order before converting them.<br> - Comments start with a semicolon and continue to the end of the line.<br> - Unspecified elements are written as "x". For example, "image 1 = 1, x, RGB565" would describe an image without an alpha plane. Writing "texture 1 = 1, x" would describe a texture without a palette.<br> - The directory path name is specified as either an absolute path or a relative path from the current directory.<br> 95</P> 96 97<H2>Revision History</H2> 98<P> 992008/07/29 Initial version.<br> 100</P> 101 102<hr><p>CONFIDENTIAL</p></body> 103</HTML> 104