1 /*---------------------------------------------------------------------*
2 Project:  tc library
3 File:     TCTPLToolbox.h
4 
5 Copyright 1998-2001 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: TCTPLToolbox.h,v $
16    Revision 1.1  2006/02/17 09:02:16  mitu
17    1st version
18 
19 
20     2     4/11/01 3:04p John
21     Updated header copyrights and pathname.
22 
23     1     12/03/99 3:44p Ryan
24 
25     2     11/23/99 2:52p Mikepc
26     changed WriteTplImageBank, WriteTplPaletteBankto include partial update
27     flags
28 
29     14    10/14/99 5:47p Mikepc
30     increased TPL_HDR_SIZE to 12B ( was 8 ) for new version field.
31 
32     13     9/16/99 8:48p Mikepc
33 
34     12     8/26/99 4:56p Mikepc
35     added namespace protection to remove potential name collisions with
36     tool code.  Exceptions are CreateTplFile and QuickConvert.  These are
37     extern "C" linked.
38 
39     11     8/26/99 11:37a Mikepc
40 
41     10     8/26/99 11:01a Mikepc
42     tplConv rewrite for memory usage efficiency, batch file processing
43     ability.
44 
45   $NoKeywords: $
46 
47 -----------------------------------------------------------------------*/
48 
49 #ifndef __TCTPLTOOLBOX_H__
50 #define __TCTPLTOOLBOX_H__
51 
52 /********************************/
53 #include <stdio.h>
54 
55 #include <charPipeline/tc/TCLayer.h>
56 
57 #include "TCImageList.h"
58 #include "TCPaletteList.h"
59 
60 /*>*******************************(*)*******************************<*/
61 void TCComputeTplSizes			( void );
62 void TCWriteTplFile				( char* tplFile );
63 
64 u32 TCComputeTplImageBufferSize	( TCImage* thisImage );
65 
66 // write images as tiles
67 void TCWriteTplImage_I4		( TCLayer* colorLayer, u8* tplBuffer );
68 void TCWriteTplImage_I8		( TCLayer* colorLayer, u8* tplBuffer );
69 
70 void TCWriteTplImage_IA4	( TCLayer* colorLayer, TCLayer* alphaLayer,
71 							  u8* tplBuffer );
72 
73 void TCWriteTplImage_IA8	( TCLayer* colorLayer, TCLayer* alphaLayer,
74 							  u8* tplBuffer );
75 
76 void TCWriteTplImage_R5G6B5	( TCLayer* colorLayer, u8* tplBuffer );
77 
78 void TCWriteTplImage_RGB5A3	( TCLayer* colorLayer, TCLayer* alphaLayer,
79 							  u8* tplBuffer );
80 
81 void TCWriteTplImage_RGBA8	( TCLayer* colorLayer, TCLayer* alphaLayer,
82 							  u8* tplBuffer );
83 
84 void TCWriteTplImage_CI4	( TCLayer* colorLayer, u8* tplBuffer );
85 void TCWriteTplImage_CI8	( TCLayer* colorLayer, u8* tplBuffer );
86 void TCWriteTplImage_CI14_X2( TCLayer* colorLayer, u8* tplBuffer );
87 void TCWriteTplImage_CMP	( TCLayer* colorLayer, u8* tplBuffer );
88 
89 #endif  // __TCTPLTOOLBOX_H__
90