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=utf-8">
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<p><i><CODE>TexConv.exe</CODE> also exists as <CODE>TexConvD.exe</CODE> in this program. There is no difference in how the two behave. Normally you should use <CODE>TexConv.exe</CODE>. <CODE>TexConvD.exe</CODE> remains in order to maintain compatibility with past systems.</i></p>
34
35<H2>Texture Conversion Script File</H2>
36<P>
37An 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).
38</P>
39<table border="1" width="80%">
40  <tbody>
41    <tr>
42      <td width="80%">
43<pre><code>
44					; Comments start with a semicolon and continue to the end of the line
45
46path = c:/level1/mario/			; Sets the path of the directory in which files exist
47					; If path is NULL, the full path is required in the filename
48					; path will be attached to all of the filenames that come after
49					; path can be set on any line
50					; path can be an absolute or relative path
51
52file    0  =  marioHead_rgba8.tga
53					; The complete filename is
54					; c:/level1/mario/marioHead_rgba8.tga
55image   0  =  0, 0, RGBA8		; With image0[RGB]=file0 and image0[A]=file0
56					: , convert into RGBA8
57texture 0  =  0, x			; For texture 0 in TPL file
58					; the image index is image0
59					; This is not color index texture, so
60					;  the CLUT index is [x]
61
62path       =  d:/temp/mario/		; Change the path
63file    1  =  marioArm_rgb565.tga
64					; The complete filename is
65					; d:/temp/mario/marioArm_rgb565.tga
66image   1  =  1, x, RGB565, 0, 3, 0
67					; Generate mipmaps 0 to 3 (four levels of detail) and remap to 0
68texture 1  =  1, x
69
70file    2  =  marioFoot_ci8.tga
71image   2  =  2, x, CI8			; Convert to CI format
72palette 0  =  2, RGB565			; Create palette 0 from image 2
73					; Convert palette entries into RGB565 format
74texture 2  =  2, 0			; texture 2[RGB] = image 2,
75					; texture 2[CLUT] = palette 0
76
77path        = NULL			; No path setting
78file    3   =  c:/marioBody_i8.tga
79					; The full path is required here
80image   3   =  3, x, I8, GX_REPEAT, GX_REPEAT
81					; TexConv automatically converts from RGB input to intensity output.
82					;
83					; For repeating, you can
84					; set the wrap mode of S and T.
85					; Just as for the mipmap argument,
86					; wrap mode can be set the same way.
87texture 3  =  3, x
88</code></pre>
89      </td>
90    </tr>
91  </tbody>
92</table>
93<br>
94<H3>Basic Formatting Rules</H3>
95<P>
96Script files have the following basic rules.<br>- Spaces are ignored. Both &quot;image1=1&quot; and &quot;image  1  =    1&quot; 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 &quot;x&quot;. For example, &quot;image 1 = 1, x, RGB565&quot; would describe an image without an alpha plane. Writing &quot;texture 1 = 1, x&quot; 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>
97</P>
98
99<H2>Revision History</H2>
100<P>
1012009/06/05 Explained the existence of <CODE>*.exe</CODE> and <CODE>*D.exe</CODE>.<br>2008/07/29 Initial version.<br>
102</P>
103
104<hr><p>CONFIDENTIAL</p></body>
105</HTML>
106