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