1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     font_Types.h
4 
5   Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain proprietary
8   information of Nintendo and/or its licensed developers and are protected by
9   national and international copyright laws. They may not be disclosed to third
10   parties or copied or duplicated in any form, in whole or in part, without the
11   prior written consent of Nintendo.
12 
13   The content herein is highly confidential and should be handled accordingly.
14 
15   $Revision: 31311 $
16  *---------------------------------------------------------------------------*/
17 
18 #ifndef NW_FONT_TYPES_H_
19 #define NW_FONT_TYPES_H_
20 
21 #if defined(_MSC_VER) && _MSC_VER >= 1500
22 #pragma once
23 #endif
24 
25 #include <nn/types.h>
26 #include <nw/ut/ut_Color.h>
27 #include <nw/font/font_DrawerTypes.h>
28 
29 namespace nw {
30 namespace font {
31 namespace internal {
32 
33 enum
34 {
35     VERTEX_ATTR_POS,
36     VERTEX_ATTR_POS_Z,
37     VERTEX_ATTR_COLOR,
38     VERTEX_ATTR_TEXCOORD,
39 
40     VERTEX_ATTR_NUM
41 };
42 
43 enum
44 {
45     POS_X,
46     POS_Y,
47 
48     POS_NUM
49 };
50 
51 enum
52 {
53     COLOR_R,
54     COLOR_G,
55     COLOR_B,
56     COLOR_A,
57 
58     COLOR_NUM
59 };
60 
61 enum
62 {
63     TEXCOORD_X,
64     TEXCOORD_Y,
65 
66     TEXCOORD_NUM
67 };
68 
69 enum
70 {
71     TRIFAN_VTX_RT,
72     TRIFAN_VTX_LT,
73     TRIFAN_VTX_LB,
74     TRIFAN_VTX_RB,
75 
76     TRIFAN_VTX_MAX
77 };
78 
79 enum
80 {
81     LOC_PROJECTION,
82     LOC_MODELVIEW,
83 
84     LOC_FRAGMENTLIGHTING_ENABLED,
85     LOC_TEXTURE0_SAMPLERTYPE,
86     LOC_FOG_MODE,
87     LOC_FRAGOPERATION_ENABLEALPHATEST,
88 
89     LOC_MAX
90 };
91 
92 enum
93 {
94     TCLOC_SRCRGB,
95     TCLOC_SRCALPHA,
96     TCLOC_OPERANDRGB,
97     TCLOC_OPERANDALPHA,
98     TCLOC_COMBINERGB,
99     TCLOC_COMBINEALPHA,
100     TCLOC_SCALERGB,
101     TCLOC_SCALEALPHA,
102     TCLOC_CONSTRGBA,
103 
104     TCLOC_MAX
105 };
106 
107 enum
108 {
109     TEXENV_3,
110     TEXENV_4,
111     TEXENV_5,
112 
113     TEXENV_MAX
114 };
115 
116 enum TextColor
117 {
118     TEXTCOLOR_START,        //!< テキストのグラデーション開始色です。
119     TEXTCOLOR_END,          //!< テキストのグラデーション終了色です。
120 
121     TEXTCOLOR_MAX           //!< 列挙子の総数です。
122 };
123 
124 //! 1文字当たりに必要な頂点インデックスの数
125 const int               VERTEX_INDEX_NUM = 6;
126 
127 struct VertexAttribute
128 {
129     f32                 pos[POS_NUM];
130     ut::Color8          color;
131     f32                 tex[TEXCOORD_NUM];
132 };
133 
134 }   // namespace internal
135 }   // namespace font
136 }   // namespace nw
137 
138 #endif //  NW_FONT_TYPES_H_
139