; sample script file ; this script is used by TexConv to build a sample .tpl file ; that demonstrates dolphin texture formats. ; location: /cp/build/tools/TexConv/sample ; to build, start the MS-DOS shell, ; type cd \cp\build\tools\TexConv\sample ; then \cp\X86\bin\TexConv sample.txt sample.tpl ; view the sample.tpl file using texPrev2D.bin on your Mac. ; problems? try the TexConv.exe debug version- it provides ; many assert calls with printf error messages. ; ------------------------- path = /cp/build/tools/TexConv/sample/ ; sets directory path for subsequent source files. ; use forward slash as directory separator. ; end the path with a '/' ; to cancel, type path = 0 ; then in file list, type full path + file name ; for lists, the following rules apply: ; indices start at 0 ; you may list files/images/palettes/textures ; in any order. ; variable spacing is permitted. ; FILE LIST ; list of source files ; we have provided a function to read .tga files. ; it is up to the developer to provide functions to read other ; file types ( see tplConv.h for how to install this code in TexConv ) ; all of these images are 128x128 texels file 0 = dolphin_32.tga ; this is a 32-bit rgba image file 1 = pikachu_8.tga ; this is an 8-bit color-indexed image with 256 entry 24-bit rgb palette file 2 = car_24.tga ; this is a 24-bit rgb image ; ------------------------- ; IMAGE LIST ; conversion formats are found in ; dolphin/include/dolphin/gx/gxEnum.h ; use enum definitions for GXCITexFmt, GXTexFmt, GXTlutFmt ; and remove the GX_TF_, GX_TL_ prefix ; ( example: GX_TF_RGBA8 becomes RGBA8 ). ; not supported: C4, C14X2, 'Z' formats ; and palette IA8 format. ; the last 3 numbers are optional- they provide mipmap information. ; if not mipmapping: do not set these fields. ; image can have any dimensions. ; if mipmapping: source image is considered to be LOD 0. ; numbers indicate minLOD desired relative to source image, ; maxLOD desired relative to source image, remapped minLOD. ; remapped minLOD shifts the base of the mipmap pyramid. ; ( minLOD in .tpl file = minLOD + remapMinLOD ) ; ( maxLOD in .tpl file = maxLOD + remapMinLOD ) ; image dimensions must be power of 2, ; shortest dimension must be long enough to provide maxLOD. image 0 = 0, 0, RGBA8, 0, 7, 0 ; use color from file 0, alpha from file 0 ; convert to RGBA8 format ; create 8 LODs total, starting at LOD 0 ; set the tpl minLOD to 0. image 1 = 0, 0, RGB5A3, 0, 7, 0 image 2 = 0, 0, CMPR, 0, 7, 0 ; compressed format with source alpha reduced to 1-bit alpha. image 3 = 1, x, CI8 ; when source format is CI8 (file 2) and dest. format is CI8, ; image has no alpha, cannot be mipmapped. ; 'x' indicates unused component ( no alpha for this image ) image 4 = 1, x, RGB565, 0, 7, 0 ; when source format is CI8 and dest. format is true color, ; ( rgba, rgb, cmp, i, ia ) ; dest. images may have alpha and mipmaps. ; note: if converting a C8 source file to true color format, ; source file must contain both a color map and a palette. image 5 = 1, 0, RGBA8, 0, 7, 0 ; color and alpha info. come from different source files. ; source image dimensions must be the same. image 6 = 2, x, RGBA8, 0, 7, 0 ; image 6 has no alpha channel: destination image will have ; all alphas set to maximum value. image 7 = 2, x, RGB565, 0, 7, 0, image 8 = 2, x, CMPR, 0, 7, 0 image 9 = 2, 0, RGB5A3, 0, 7, 0 ; color and alpha from different files. image 10 = 0, x, I4, 0, 7, 0 ; color images are reduced to greyscale by averaging color values. image 11 = 0, 0, IA4, 0, 7, 0 image 12 = 2, x, I8, 0, 7, 0 image 13 = 2, 0, IA8, 0, 7, 0 ; override default wrapS and wrapT mode in image 14 and 15 ; default is wrapS=wrapT=GX_REPEAT if both dimensions are power of two ; otherwise, wrapS=wrapT=GX_CLAMP image 14 = 2, x, CMPR, GX_REPEAT, GX_CLAMP ; set wrapS to repeat and set wrapT to clamp image 15 = 2, x, CMPR, 0, 7, 0, GX_CLAMP, GX_MIRROR ; set wrapS to clamp and set wrapT to mirror w/ mipmap ; ------------------------- ; PALETTE LIST ; palettes can be converted to RGB565, RGB5A3 format. ; if source palette lacks alpha and dest. is RGB5A3, ; dest. alpha in CLUT will be set to maximum. palette 0 = 1, RGB565 ; palette 0 is created from file 1. ; input palettes must be 256-entries. ; ------------------------- ; TEXTURE LIST texture 0 = 0, x ; texture 0 uses image 0, no palette texture 1 = 1, x texture 2 = 2, x texture 3 = 3, 0 ; texture 3 uses image 3, palette 0 texture 4 = 4, x texture 5 = 5, x texture 6 = 6, x texture 7 = 7, x texture 8 = 8, x texture 9 = 9, x texture 10 = 10, x texture 11 = 11, x texture 12 = 12, x texture 13 = 13, x texture 14 = 14, x texture 15 = 15, x ; -------------------------