1 /*---------------------------------------------------------------------------* 2 Project: TwlSDK - WXC - demos - relayStation-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 Background character rendering (fixed to BG0) 53 54 ================================================================================= 55 */ 56 57 // --- Definition 58 59 // --- Initialize 60 void BgInitForPrintStr(void); 61 62 // --- For main LCD 63 void BgPrintf(int x, int y, u8 palette, const char *text, ...); 64 void BgPutString(int x, int y, u8 palette, const char *text); 65 void BgPutStringN(int x, int y, u8 palette, const char *text, u32 num); 66 void BgPutChar(int x, int y, u8 palette, char c); 67 void BgClear(void); 68 69 // --- V-Blank process 70 void BgScrSetVblank(void); 71 72 #endif /* _DISPFUNC_H_ */ 73