1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     pl_ExBanner.h
4 
5   Copyright (C)2009-2012 Nintendo Co., Ltd.  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   $Rev:$
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_PL_CTR_PL_EXBANNER_H_
17 #define NN_PL_CTR_PL_EXBANNER_H_
18 
19 namespace nn
20 {
21 namespace pl
22 {
23 namespace CTR
24 {
25     //Extended banner data
26     //Possible to replace banner texture or change the text displayed on the lower part of the HOME Menu top screen
27     //
28     const u32 EXBANNER_TEXTURE_NAME_LENGTH = 16;
29     const u32 EXBANNER_MESSAGE_LENGTH      = 256;
30 
31     //Format of the texture image after replaced
32     //The format must be the PICA native format
33     //See the comments for which values correspond to which PICA native format
34     //
35     enum ExBannerTexFormat
36     {
37         EXBANNER_TEX_FORMAT_RGBA8    = 0,  //format GL_RGBA_NATIVE_DMP
38         EXBANNER_TEX_FORMAT_RGB8     = 1,  //format GL_RGB_NATIVE_DMP
39         EXBANNER_TEX_FORMAT_RGBA5551 = 2,  //format GL_RGBA_NATIVE_DMP
40         EXBANNER_TEX_FORMAT_RGB565   = 3,  //format GL_RGB_NATIVE_DMP
41         EXBANNER_TEX_FORMAT_RGBA4    = 4,  //format GL_RGBA_NATIVE_DMP
42         EXBANNER_TEX_FORMAT_LA8      = 5,  //format GL_LUMINANCE_ALPHA_NATIVE_DMP
43         EXBANNER_TEX_FORMAT_HILO8    = 6,  //format GL_HILO8_DMP_NATIVE_DMP
44         EXBANNER_TEX_FORMAT_L8       = 7,  //format GL_LUMINANCE_NATIVE_DMP
45         EXBANNER_TEX_FORMAT_A8       = 8,  //format GL_ALPHA_NATIVE_DMP
46         EXBANNER_TEX_FORMAT_LA4      = 9,  //format GL_LUMINANCE_ALPHA_NATIVE_DMP
47         EXBANNER_TEX_FORMAT_L4       = 10, //format GL_LUMINANCE_NATIVE_DMP
48         EXBANNER_TEX_FORMAT_A4       = 11, //format GL_ALPHA_NATIVE_DMP
49         EXBANNER_TEX_FORMAT_ETC1     = 12, //format GL_ETC1_RGB8_NATIVE_DMP
50         EXBANNER_TEX_FORMAT_ETC1A4   = 13  //format GL_ETC1_ALPHA_RGB8_A4_NATIVE_DMP
51     };
52 
53     struct ExBanner
54     {
55         u16 tex_width;   // Width of the texture after replaced
56         u16 tex_height;  // Height of the texture after replaced
57         u8  tex_format;  // Texture format (specify with nn::CTR::ExBannerTexFormat)
58         NN_PADDING3;
59 
60         s32 limit_year;  // Expiration term (can display the set year/month/date including the time 23:59)
61         s32 limit_month; // The term setting is valid only for downloaded extended banners
62         s32 limit_date;  // This setting is ignored for local extended banners
63 
64         char    texture_name[EXBANNER_TEXTURE_NAME_LENGTH]; // Name of texture to overwrite
65         wchar_t text[EXBANNER_MESSAGE_LENGTH];              // Extended banner message
66         void    *tex_data;                                  // Variable length, start of texture data
67     };
68 }
69 }
70 }
71 
72 #endif  // ifndef NN_PL_CTR_PL_EXBANNER_H_
73 
74