1 /*---------------------------------------------------------------------* 2 Project: tc library 3 File: TCPaletteList.h 4 5 Copyright 1998, 1999 Nintendo. All rights reserved. 6 7 These coded instructions, statements and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 Change History: 14 15 $Log: TCPaletteList.h,v $ 16 Revision 1.1 2006/02/17 09:02:16 mitu 17 1st version 18 19 20 3 4/11/01 3:04p John 21 Updated header copyrights and pathname. 22 23 2 3/17/00 1:16p Mikepc 24 change tc to use indices numbered from 0: 25 add TCFindPalettePos prototype. 26 27 1 12/03/99 3:44p Ryan 28 29 9 10/08/99 2:44p Mikepc 30 update for tplConv portability: altered data structures, replaced 31 references to 'read tga code' with ' *fileFn, removed redundant 32 functions. 33 34 8 9/17/99 12:24p Mikepc 35 arbitrary palette size is gone- removed CreatePalette() prototype 36 37 7 9/16/99 8:48p Mikepc 38 39 6 8/26/99 4:56p Mikepc 40 added namespace protection to remove potential name collisions with 41 tool code. Exceptions are CreateTplFile and QuickConvert. These are 42 extern "C" linked. 43 44 5 8/26/99 11:37a Mikepc 45 46 4 8/26/99 11:01a Mikepc 47 tplConv rewrite for memory usage efficiency, batch file processing 48 ability. 49 50 $NoKeywords: $ 51 52 -----------------------------------------------------------------------*/ 53 54 #ifndef __TCPALETTELIST_H__ 55 #define __TCPALETTELIST_H__ 56 57 /********************************/ 58 #include <charPipeline/tc/TCPalTable.h> 59 60 /********************************/ 61 typedef struct TCPalette 62 { 63 u32 index; // index from script file. This is also the .tpl bank location 64 65 u32 srcImage; // index of SrcImage providing 66 // both color and alpha components of CLUT 67 68 u32 entryFormat; // Dolphin format of CLUT entries 69 70 //------------------- 71 72 TCPalTable* palPtr; // array of palette entries 73 74 75 u32 tplPaletteBankOffset; // number of bytes from top of file to palette data block 76 u32 tplBufferSize; // size of palette data block 77 78 struct TCPalette* prev; 79 struct TCPalette* next; 80 81 //------------------- 82 83 }TCPalette, *TCPalettePtr; 84 85 /********************************/ 86 extern TCPalette* PlHead; 87 88 /*>*******************************(*)*******************************<*/ 89 90 void TCSetPalettes ( void ); 91 TCPalette* TCNewPalette ( void ); 92 void TCSetPaletteIndex ( TCPalette* pl, u32 index ); 93 void TCSetPaletteSrcImage ( TCPalette* pl, u32 srcImage ); 94 void TCSetPaletteEntryFormat ( TCPalette* pl, u32 entryFmt ); 95 96 void TCSortPaletteByIndex( void ); 97 TCPalette* TCFindPaletteByIndex( u32 index ); 98 u32 TCFindPalettePos( TCPalette* pl ); 99 100 /*>*******************************(*)*******************************<*/ 101 102 #endif // __TCPALETTELIST_H__ 103 104