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