1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - WXC - demos - simple-2
3   File:     dispfunc.h
4 
5   Copyright 2005-2009 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   $Date:: 2007-11-15#$
14   $Rev: 2414 $
15   $Author: hatamoto_minoru $
16  *---------------------------------------------------------------------------*/
17 
18 #ifndef _DISPFUNC_H_
19 #define _DISPFUNC_H_
20 
21 #include <nitro.h>
22 
23 /* Palette color for text */
24 enum
25 {
26     WHITE,
27     RED,
28     GREEN,
29     BLUE,
30     YELLOW,
31     CYAN,
32     PURPLE,
33     LIGHT_GREEN,
34     HI_YELLOW,
35     HI_CYAN,
36     HI_WHITE,
37     HI_BLUE,
38     HI_PURPLE,
39     HI_LIGHT_GREEN,
40     BROWN,
41     HI_BROWN,
42     COLOR_NUM
43 };
44 
45 /* Constant array for each type of rendering */
46 extern const u32 sampleCharData[8 * 0xe0];
47 extern const u16 samplePlttData[16][16];
48 
49 /*
50 	=================================================================================
51 
52 	OBJ character rendering
53 
54 	=================================================================================
55 */
56 
57 // --- Global value
58 extern GXOamAttr oamBak[128];
59 
60 /*
61 	=================================================================================
62 
63 	Background character rendering (fixed to BG0)
64 
65 	=================================================================================
66 */
67 
68 // --- Definition
69 
70 // --- Initialize
71 void BgInitForPrintStr(void);
72 
73 // --- For main LCD
74 void BgPrintf(s16 x, s16 y, u8 palette, char *text, ...);
75 void BgPutString(s16 x, s16 y, u8 palette, char *text);
76 void BgPutStringN(s16 x, s16 y, u8 palette, char *text, u32 num);
77 void BgPutChar(s16 x, s16 y, u8 palette, char c);
78 void BgClear(void);
79 
80 // --- V-Blank process
81 void BgScrSetVblank(void);
82 
83 #endif /*       _DISPFUNC_H_    */
84