1 /*---------------------------------------------------------------------------* 2 Project: TwlSDK - MB - demos - fake_child 3 File: disp.h 4 5 Copyright 2006-2008 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:: 2008-09-18#$ 14 $Rev: 8573 $ 15 $Author: okubata_ryoma $ 16 *---------------------------------------------------------------------------*/ 17 #ifndef MB_DEMO_DISP_H_ 18 #define MB_DEMO_DISP_H_ 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 #ifdef SDK_TWL 25 #include <twl.h> 26 #else 27 #include <nitro.h> 28 #endif 29 30 /* 31 * Processing for general text rendering 32 */ 33 34 /* Assign OBJ numbers */ 35 enum 36 { 37 TITLE_STRING_OBJNO = 0, 38 PARENT_STRING_OBJNO = 10, 39 CHILD_STRING_OBJNO = 22, 40 PLIST_STRING_OBJNO = 33, 41 CLIST_STRING_OBJNO = 39, 42 43 CURSOR_OBJNO = 45, 44 PARENT_NAME_OBJNO = 46, 45 FILENAME_OBJNO = 82, 46 MESSAGE_OBJNO = 104 47 }; 48 49 /* Palette color for text */ 50 enum 51 { 52 PLTT_BLACK = 0, 53 PLTT_BLUE = 1, 54 PLTT_RED = 2, 55 PLTT_PURPLE = 3, 56 PLTT_GREEN = 4, 57 PLTT_CYAN = 5, 58 PLTT_YELLOW = 6, 59 PLTT_WHITE = 7 60 }; 61 62 63 64 //============================================================================ 65 // Function Declarations 66 //============================================================================ 67 68 void DispInit(void); 69 void DispOn(void); 70 void DispOff(void); 71 void DispVBlankFunc(void); 72 void ObjSet(s32 objNo, s32 x, s32 y, s32 charNo, s32 paletteNo); 73 void ObjSetString(s32 startobjNo, s32 x, s32 y, const char *string, s32 paletteNo); 74 void ObjClear(s32 objNo); 75 void ObjClearRange(s32 start, s32 end); 76 void ObjSetMessage(const char *message); 77 void BgPutChar(s32 x, s32 y, s32 palette, s8 c); 78 void BgPutStringN(s32 x, s32 y, s32 palette, const char *text, s32 num); 79 void BgPutString(s32 x, s32 y, s32 palette, const char *text); 80 void BgPrintStr(s32 x, s32 y, s32 palette, const char *text, ...); 81 void BgSetMessage(s32 palette, const char *text, ...); 82 void BgClear(void); 83 void BgColorString(s16 x, s16 y, s16 length, u8 palette); 84 85 86 87 #ifdef __cplusplus 88 }/* extern "C" */ 89 #endif 90 91 #endif // MB_DEMO_DISP_H_ 92