1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     font_Types.h
4 
5   Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc.  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   $Revision: 21906 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NW_FONT_TYPES_H_
17 #define NW_FONT_TYPES_H_
18 
19 #if defined(_MSC_VER) && _MSC_VER >= 1500
20 #pragma once
21 #endif
22 
23 #include <nn/types.h>
24 #include <nw/ut/ut_Color.h>
25 #include <nw/font/font_DrawerTypes.h>
26 
27 namespace nw {
28 namespace font {
29 namespace internal {
30 
31 enum
32 {
33     VERTEX_ATTR_POS,
34     VERTEX_ATTR_POS_Z,
35     VERTEX_ATTR_COLOR,
36     VERTEX_ATTR_TEXCOORD,
37 
38     VERTEX_ATTR_NUM
39 };
40 
41 enum
42 {
43     POS_X,
44     POS_Y,
45 
46     POS_NUM
47 };
48 
49 enum
50 {
51     COLOR_R,
52     COLOR_G,
53     COLOR_B,
54     COLOR_A,
55 
56     COLOR_NUM
57 };
58 
59 enum
60 {
61     TEXCOORD_X,
62     TEXCOORD_Y,
63 
64     TEXCOORD_NUM
65 };
66 
67 enum
68 {
69     TRIFAN_VTX_RT,
70     TRIFAN_VTX_LT,
71     TRIFAN_VTX_LB,
72     TRIFAN_VTX_RB,
73 
74     TRIFAN_VTX_MAX
75 };
76 
77 enum
78 {
79     LOC_PROJECTION,
80     LOC_MODELVIEW,
81 
82     LOC_FRAGMENTLIGHTING_ENABLED,
83     LOC_TEXTURE0_SAMPLERTYPE,
84     LOC_FOG_MODE,
85     LOC_FRAGOPERATION_ENABLEALPHATEST,
86 
87     LOC_MAX
88 };
89 
90 enum
91 {
92     TCLOC_SRCRGB,
93     TCLOC_SRCALPHA,
94     TCLOC_OPERANDRGB,
95     TCLOC_OPERANDALPHA,
96     TCLOC_COMBINERGB,
97     TCLOC_COMBINEALPHA,
98     TCLOC_SCALERGB,
99     TCLOC_SCALEALPHA,
100     TCLOC_CONSTRGBA,
101 
102     TCLOC_MAX
103 };
104 
105 enum
106 {
107     TEXENV_3,
108     TEXENV_4,
109     TEXENV_5,
110 
111     TEXENV_MAX
112 };
113 
114 enum TextColor
115 {
116     TEXTCOLOR_START,        //!< テキストのグラデーション開始色です。
117     TEXTCOLOR_END,          //!< テキストのグラデーション終了色です。
118 
119     TEXTCOLOR_MAX           //!< 列挙子の総数です。
120 };
121 
122 //! 1文字当たりに必要な頂点インデックスの数
123 const int               VERTEX_INDEX_NUM = 6;
124 
125 struct VertexAttribute
126 {
127     f32                 pos[POS_NUM];
128     ut::Color8          color;
129     f32                 tex[TEXCOORD_NUM];
130 };
131 
132 }   // namespace internal
133 }   // namespace font
134 }   // namespace nw
135 
136 #endif //  NW_FONT_TYPES_H_
137