Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | pmbaty | 1 | #include "token.h" |
2 | #include "CORE/FW/fwsetup.h" |
||
3 | #include "CORE/FW/brlists.h" |
||
4 | #include "CORE/FW/pattern.h" |
||
5 | #include "CORE/FW/resource.h" |
||
6 | #include "CORE/STD/brstdlib.h" |
||
7 | #include "harness/trace.h" |
||
8 | |||
9 | br_token_entry predefinedTokens[457] = { |
||
10 | { { NULL, NULL, }, "ABGR_1_5_5_5", BRT_NONE, BRT_ABGR_1_5_5_5, 12, }, |
||
11 | { { NULL, NULL, }, "ABGR_4_4_4_4", BRT_NONE, BRT_ABGR_4_4_4_4, 12, }, |
||
12 | { { NULL, NULL, }, "ABGR_8_8_8_8", BRT_NONE, BRT_ABGR_8_8_8_8, 12, }, |
||
13 | { { NULL, NULL, }, "ACCEPT", BRT_NONE, BRT_ACCEPT, 6, }, |
||
14 | { { NULL, NULL, }, "AINDEX_4_4", BRT_NONE, BRT_AINDEX_4_4, 10, }, |
||
15 | { { NULL, NULL, }, "AINDEX_8_8", BRT_NONE, BRT_AINDEX_8_8, 10, }, |
||
16 | { { NULL, NULL, }, "ALPHA", BRT_NONE, BRT_ALPHA, 5, }, |
||
17 | { { NULL, NULL, }, "ALWAYS", BRT_NONE, BRT_ALWAYS, 6, }, |
||
18 | { { NULL, NULL, }, "AMBIENT_F", BRT_FLOAT, BRT_AMBIENT_F, 7, }, |
||
19 | { { NULL, NULL, }, "AMBIENT_X", BRT_FIXED, BRT_AMBIENT_X, 7, }, |
||
20 | { { NULL, NULL, }, "ANGLE", BRT_NONE, BRT_ANGLE, 5, }, |
||
21 | { { NULL, NULL, }, "ANTIALIASING_T", BRT_TOKEN, BRT_ANTIALIASING_T, 12, }, |
||
22 | { { NULL, NULL, }, "ANTIALIASING_TL", BRT_TOKEN_LIST, BRT_ANTIALIASING_TL, 12, }, |
||
23 | { { NULL, NULL, }, "ARGB_1_5_5_5", BRT_NONE, BRT_ARGB_1_5_5_5, 12, }, |
||
24 | { { NULL, NULL, }, "ARGB_4_4_4_4", BRT_NONE, BRT_ARGB_4_4_4_4, 12, }, |
||
25 | { { NULL, NULL, }, "ARGB_8_8_8_8", BRT_NONE, BRT_ARGB_8_8_8_8, 12, }, |
||
26 | { { NULL, NULL, }, "ATTENUATION_C_F", BRT_FLOAT, BRT_ATTENUATION_C_F, 13, }, |
||
27 | { { NULL, NULL, }, "ATTENUATION_C_X", BRT_FIXED, BRT_ATTENUATION_C_X, 13, }, |
||
28 | { { NULL, NULL, }, "ATTENUATION_L_F", BRT_FLOAT, BRT_ATTENUATION_L_F, 13, }, |
||
29 | { { NULL, NULL, }, "ATTENUATION_L_X", BRT_FIXED, BRT_ATTENUATION_L_X, 13, }, |
||
30 | { { NULL, NULL, }, "ATTENUATION_Q_F", BRT_FLOAT, BRT_ATTENUATION_Q_F, 13, }, |
||
31 | { { NULL, NULL, }, "ATTENUATION_Q_X", BRT_FIXED, BRT_ATTENUATION_Q_X, 13, }, |
||
32 | { { NULL, NULL, }, "A_4", BRT_NONE, BRT_A_4, 3, }, |
||
33 | { { NULL, NULL, }, "A_8", BRT_NONE, BRT_A_8, 3, }, |
||
34 | { { NULL, NULL, }, "BEST_QUALITY", BRT_NONE, BRT_BEST_QUALITY, 12, }, |
||
35 | { { NULL, NULL, }, "BEST_SPEED", BRT_NONE, BRT_BEST_SPEED, 10, }, |
||
36 | { { NULL, NULL, }, "BGRA_4_4_4_4", BRT_NONE, BRT_BGRA_4_4_4_4, 12, }, |
||
37 | { { NULL, NULL, }, "BGRA_8_8_8_8", BRT_NONE, BRT_BGRA_8_8_8_8, 12, }, |
||
38 | { { NULL, NULL, }, "BGRX_8_8_8_8", BRT_NONE, BRT_BGRX_8_8_8_8, 12, }, |
||
39 | { { NULL, NULL, }, "BGR_2_3_2", BRT_NONE, BRT_BGR_2_3_2, 9, }, |
||
40 | { { NULL, NULL, }, "BGR_5_6_5", BRT_NONE, BRT_BGR_5_6_5, 9, }, |
||
41 | { { NULL, NULL, }, "BGR_8_8_8", BRT_NONE, BRT_BGR_8_8_8, 9, }, |
||
42 | { { NULL, NULL, }, "BLENDER_PROGRAM_P", BRT_POINTER, BRT_BLENDER_PROGRAM_P, 15, }, |
||
43 | { { NULL, NULL, }, "BLEND_B", BRT_BOOLEAN, BRT_BLEND_B, 5, }, |
||
44 | { { NULL, NULL, }, "BLEND_CONSTANT", BRT_NONE, BRT_BLEND_CONSTANT, 14, }, |
||
45 | { { NULL, NULL, }, "BLEND_DIMMED", BRT_NONE, BRT_BLEND_DIMMED, 12, }, |
||
46 | { { NULL, NULL, }, "BLEND_MODE_T", BRT_TOKEN, BRT_BLEND_MODE_T, 10, }, |
||
47 | { { NULL, NULL, }, "BLEND_MODE_TL", BRT_TOKEN_LIST, BRT_BLEND_MODE_TL, 10, }, |
||
48 | { { NULL, NULL, }, "BLEND_STANDARD", BRT_NONE, BRT_BLEND_STANDARD, 14, }, |
||
49 | { { NULL, NULL, }, "BLEND_SUMMED", BRT_NONE, BRT_BLEND_SUMMED, 12, }, |
||
50 | { { NULL, NULL, }, "BLUE", BRT_NONE, BRT_BLUE, 4, }, |
||
51 | { { NULL, NULL, }, "BOOLEAN", BRT_NONE, BRT_BOOLEAN, 7, }, |
||
52 | { { NULL, NULL, }, "BOTTOM_TOP", BRT_NONE, BRT_BOTTOM_TOP, 10, }, |
||
53 | { { NULL, NULL, }, "BOUNDS", BRT_NONE, BRT_BOUNDS, 6, }, |
||
54 | { { NULL, NULL, }, "BOUNDS_B", BRT_BOOLEAN, BRT_BOUNDS_B, 6, }, |
||
55 | { { NULL, NULL, }, "BRENDER_DEVICES_STR", BRT_STRING, BRT_BRENDER_DEVICES_STR, 15, }, |
||
56 | { { NULL, NULL, }, "BRENDER_DRIVERS_STR", BRT_STRING, BRT_BRENDER_DRIVERS_STR, 15, }, |
||
57 | { { NULL, NULL, }, "BRENDER_PATH_STR", BRT_STRING, BRT_BRENDER_PATH_STR, 12, }, |
||
58 | { { NULL, NULL, }, "BRENDER_VERSION_U32", BRT_UINT_32, BRT_BRENDER_VERSION_U32, 15, }, |
||
59 | { { NULL, NULL, }, "BUCKET_SORT", BRT_NONE, BRT_BUCKET_SORT, 11, }, |
||
60 | { { NULL, NULL, }, "BUFFER_STORED", BRT_NONE, BRT_BUFFER_STORED, 13, }, |
||
61 | { { NULL, NULL, }, "BUMP_O", BRT_OBJECT, BRT_BUMP_O, 4, }, |
||
62 | { { NULL, NULL, }, "BUMP_TVL", BRT_TOKEN_VALUE_LIST, BRT_BUMP_TVL, 4, }, |
||
63 | { { NULL, NULL, }, "CACHED_B", BRT_BOOLEAN, BRT_CACHED_B, 6, }, |
||
64 | { { NULL, NULL, }, "CACHED_SIZE_U32", BRT_UINT_32, BRT_CACHED_SIZE_U32, 11, }, |
||
65 | { { NULL, NULL, }, "CACHED_TOTAL_U32", BRT_UINT_32, BRT_CACHED_TOTAL_U32, 12, }, |
||
66 | { { NULL, NULL, }, "CAN_SHARE_B", BRT_BOOLEAN, BRT_CAN_SHARE_B, 9, }, |
||
67 | { { NULL, NULL, }, "CLAMP", BRT_NONE, BRT_CLAMP, 5, }, |
||
68 | { { NULL, NULL, }, "CLIP", BRT_NONE, BRT_CLIP, 4, }, |
||
69 | { { NULL, NULL, }, "CLIPPING_B", BRT_BOOLEAN, BRT_CLIPPING_B, 8, }, |
||
70 | { { NULL, NULL, }, "CLIP_MAX_I32", BRT_INT_32, BRT_CLIP_MAX_I32, 8, }, |
||
71 | { { NULL, NULL, }, "CLONE", BRT_NONE, BRT_CLONE, 5, }, |
||
72 | { { NULL, NULL, }, "CLUT_MAX_I32", BRT_INT_32, BRT_CLUT_MAX_I32, 8, }, |
||
73 | { { NULL, NULL, }, "CLUT_O", BRT_OBJECT, BRT_CLUT_O, 4, }, |
||
74 | { { NULL, NULL, }, "COLOUR_B", BRT_BOOLEAN, BRT_COLOUR_B, 6, }, |
||
75 | { { NULL, NULL, }, "COLOUR_BUFFER_O", BRT_OBJECT, BRT_COLOUR_BUFFER_O, 13, }, |
||
76 | { { NULL, NULL, }, "COLOUR_I32", BRT_INT_32, BRT_COLOUR_I32, 6, }, |
||
77 | { { NULL, NULL, }, "COLOUR_MAP_O", BRT_OBJECT, BRT_COLOUR_MAP_O, 10, }, |
||
78 | { { NULL, NULL, }, "COLOUR_MAP_TVL", BRT_TOKEN_VALUE_LIST, BRT_COLOUR_MAP_TVL, 10, }, |
||
79 | { { NULL, NULL, }, "COLOUR_RGB", BRT_NONE, BRT_COLOUR_RGB, 10, }, |
||
80 | { { NULL, NULL, }, "COLOUR_SOURCE_T", BRT_TOKEN, BRT_COLOUR_SOURCE_T, 13, }, |
||
81 | { { NULL, NULL, }, "COLOUR_T", BRT_TOKEN, BRT_COLOUR_T, 6, }, |
||
82 | { { NULL, NULL, }, "COLOUR_TL", BRT_TOKEN_LIST, BRT_COLOUR_TL, 6, }, |
||
83 | { { NULL, NULL, }, "COLOUR_WRITE_B", BRT_BOOLEAN, BRT_COLOUR_WRITE_B, 12, }, |
||
84 | { { NULL, NULL, }, "CONSTANT_STRING", BRT_NONE, BRT_CONSTANT_STRING, 15, }, |
||
85 | { { NULL, NULL, }, "COPY_BITS_F", BRT_FLOAT, BRT_COPY_BITS_F, 9, }, |
||
86 | { { NULL, NULL, }, "COPY_BITS_X", BRT_FIXED, BRT_COPY_BITS_X, 9, }, |
||
87 | { { NULL, NULL, }, "COPY_DESTINATION_TVL", BRT_TOKEN_VALUE_LIST, BRT_COPY_DESTINATION_TVL, 16, }, |
||
88 | { { NULL, NULL, }, "COPY_F", BRT_FLOAT, BRT_COPY_F, 4, }, |
||
89 | { { NULL, NULL, }, "COPY_SOURCE_TVL", BRT_TOKEN_VALUE_LIST, BRT_COPY_SOURCE_TVL, 11, }, |
||
90 | { { NULL, NULL, }, "COPY_X", BRT_FIXED, BRT_COPY_X, 4, }, |
||
91 | { { NULL, NULL, }, "CREATOR_CSTR", BRT_CONSTANT_STRING, BRT_CREATOR_CSTR, 7, }, |
||
92 | { { NULL, NULL, }, "CULL", BRT_NONE, BRT_CULL, 4, }, |
||
93 | { { NULL, NULL, }, "CULL_B", BRT_BOOLEAN, BRT_CULL_B, 4, }, |
||
94 | { { NULL, NULL, }, "DDI_VERSION_U32", BRT_UINT_32, BRT_DDI_VERSION_U32, 11, }, |
||
95 | { { NULL, NULL, }, "DECAL_B", BRT_BOOLEAN, BRT_DECAL_B, 5, }, |
||
96 | { { NULL, NULL, }, "DEFAULT", BRT_NONE, BRT_DEFAULT, 7, }, |
||
97 | { { NULL, NULL, }, "DEFAULT_BASE_I32", BRT_INT_32, BRT_DEFAULT_BASE_I32, 12, }, |
||
98 | { { NULL, NULL, }, "DEFAULT_DEVICE_STR", BRT_STRING, BRT_DEFAULT_DEVICE_STR, 14, }, |
||
99 | { { NULL, NULL, }, "DEFAULT_RANGE_I32", BRT_INT_32, BRT_DEFAULT_RANGE_I32, 13, }, |
||
100 | { { NULL, NULL, }, "DEPTH", BRT_NONE, BRT_DEPTH, 5, }, |
||
101 | { { NULL, NULL, }, "DEPTH_BUFFER_O", BRT_OBJECT, BRT_DEPTH_BUFFER_O, 12, }, |
||
102 | { { NULL, NULL, }, "DEPTH_TEST_T", BRT_TOKEN, BRT_DEPTH_TEST_T, 10, }, |
||
103 | { { NULL, NULL, }, "DEPTH_TEST_TL", BRT_TOKEN_LIST, BRT_DEPTH_TEST_TL, 10, }, |
||
104 | { { NULL, NULL, }, "DEPTH_WRITE_B", BRT_BOOLEAN, BRT_DEPTH_WRITE_B, 11, }, |
||
105 | { { NULL, NULL, }, "DESTINATION_O", BRT_OBJECT, BRT_DESTINATION_O, 11, }, |
||
106 | { { NULL, NULL, }, "DEVICE", BRT_NONE, BRT_DEVICE, 6, }, |
||
107 | { { NULL, NULL, }, "DEVICE_CLUT", BRT_NONE, BRT_DEVICE_CLUT, 11, }, |
||
108 | { { NULL, NULL, }, "DEVICE_PIXELMAP", BRT_NONE, BRT_DEVICE_PIXELMAP, 15, }, |
||
109 | { { NULL, NULL, }, "DIBSECTION", BRT_NONE, BRT_DIBSECTION, 10, }, |
||
110 | { { NULL, NULL, }, "DIFFUSE_F", BRT_FLOAT, BRT_DIFFUSE_F, 7, }, |
||
111 | { { NULL, NULL, }, "DIFFUSE_X", BRT_FIXED, BRT_DIFFUSE_X, 7, }, |
||
112 | { { NULL, NULL, }, "DIRECT", BRT_NONE, BRT_DIRECT, 6, }, |
||
113 | { { NULL, NULL, }, "DIRECT3D_HAL", BRT_NONE, BRT_DIRECT3D_HAL, 12, }, |
||
114 | { { NULL, NULL, }, "DIRECT3D_RAMP", BRT_NONE, BRT_DIRECT3D_RAMP, 13, }, |
||
115 | { { NULL, NULL, }, "DIRECT3D_RENDER_METHOD_T", BRT_TOKEN, BRT_DIRECT3D_RENDER_METHOD_T, 22, }, |
||
116 | { { NULL, NULL, }, "DIRECT3D_RGB", BRT_NONE, BRT_DIRECT3D_RGB, 12, }, |
||
117 | { { NULL, NULL, }, "DIRECTDRAW", BRT_NONE, BRT_DIRECTDRAW, 10, }, |
||
118 | { { NULL, NULL, }, "DIRECTDRAW_DEVICENAME_CSTR", BRT_CONSTANT_STRING, BRT_DIRECTDRAW_DEVICENAME_CSTR, 21, }, |
||
119 | { { NULL, NULL, }, "DIRECTION_V3_F", BRT_VECTOR3_FLOAT, BRT_DIRECTION_V3_F, 9, }, |
||
120 | { { NULL, NULL, }, "DIRECTION_V3_X", BRT_VECTOR3_FIXED, BRT_DIRECTION_V3_X, 9, }, |
||
121 | { { NULL, NULL, }, "DIRECT_F", BRT_FLOAT, BRT_DIRECT_F, 6, }, |
||
122 | { { NULL, NULL, }, "DIRECT_X", BRT_FIXED, BRT_DIRECT_X, 6, }, |
||
123 | { { NULL, NULL, }, "DITHER", BRT_NONE, BRT_DITHER, 6, }, |
||
124 | { { NULL, NULL, }, "DITHER_B", BRT_BOOLEAN, BRT_DITHER_B, 6, }, |
||
125 | { { NULL, NULL, }, "DITHER_COLOUR_B", BRT_BOOLEAN, BRT_DITHER_COLOUR_B, 13, }, |
||
126 | { { NULL, NULL, }, "DITHER_COLOUR_T", BRT_TOKEN, BRT_DITHER_COLOUR_T, 13, }, |
||
127 | { { NULL, NULL, }, "DITHER_COLOUR_TL", BRT_TOKEN_LIST, BRT_DITHER_COLOUR_TL, 13, }, |
||
128 | { { NULL, NULL, }, "DITHER_MAP_B", BRT_BOOLEAN, BRT_DITHER_MAP_B, 10, }, |
||
129 | { { NULL, NULL, }, "DITHER_MAP_T", BRT_TOKEN, BRT_DITHER_MAP_T, 10, }, |
||
130 | { { NULL, NULL, }, "DITHER_MAP_TL", BRT_TOKEN_LIST, BRT_DITHER_MAP_TL, 10, }, |
||
131 | { { NULL, NULL, }, "DONT_CARE", BRT_NONE, BRT_DONT_CARE, 9, }, |
||
132 | { { NULL, NULL, }, "D_15", BRT_NONE, BRT_D_15, 4, }, |
||
133 | { { NULL, NULL, }, "D_16", BRT_NONE, BRT_D_16, 4, }, |
||
134 | { { NULL, NULL, }, "D_24", BRT_NONE, BRT_D_24, 4, }, |
||
135 | { { NULL, NULL, }, "D_31", BRT_NONE, BRT_D_31, 4, }, |
||
136 | { { NULL, NULL, }, "D_32", BRT_NONE, BRT_D_32, 4, }, |
||
137 | { { NULL, NULL, }, "D_FP15", BRT_NONE, BRT_D_FP15, 6, }, |
||
138 | { { NULL, NULL, }, "D_FP16", BRT_NONE, BRT_D_FP16, 6, }, |
||
139 | { { NULL, NULL, }, "ENABLE", BRT_NONE, BRT_ENABLE, 6, }, |
||
140 | { { NULL, NULL, }, "ENVIRONMENT_INFINITE", BRT_NONE, BRT_ENVIRONMENT_INFINITE, 20, }, |
||
141 | { { NULL, NULL, }, "ENVIRONMENT_LOCAL", BRT_NONE, BRT_ENVIRONMENT_LOCAL, 17, }, |
||
142 | { { NULL, NULL, }, "EQUAL", BRT_NONE, BRT_EQUAL, 5, }, |
||
143 | { { NULL, NULL, }, "EVEN_ODD", BRT_NONE, BRT_EVEN_ODD, 8, }, |
||
144 | { { NULL, NULL, }, "FACILITY", BRT_NONE, BRT_FACILITY, 8, }, |
||
145 | { { NULL, NULL, }, "FACILITY_O", BRT_OBJECT, BRT_FACILITY_O, 8, }, |
||
146 | { { NULL, NULL, }, "FIXED", BRT_NONE, BRT_FIXED, 5, }, |
||
147 | { { NULL, NULL, }, "FLOAT", BRT_NONE, BRT_FLOAT, 5, }, |
||
148 | { { NULL, NULL, }, "FOG_MAX_F", BRT_FLOAT, BRT_FOG_MAX_F, 7, }, |
||
149 | { { NULL, NULL, }, "FOG_MAX_X", BRT_FIXED, BRT_FOG_MAX_X, 7, }, |
||
150 | { { NULL, NULL, }, "FOG_MIN_F", BRT_FLOAT, BRT_FOG_MIN_F, 7, }, |
||
151 | { { NULL, NULL, }, "FOG_MIN_X", BRT_FIXED, BRT_FOG_MIN_X, 7, }, |
||
152 | { { NULL, NULL, }, "FOG_RGB", BRT_COLOUR_RGB, BRT_FOG_RGB, 3, }, |
||
153 | { { NULL, NULL, }, "FOG_T", BRT_TOKEN, BRT_FOG_T, 3, }, |
||
154 | { { NULL, NULL, }, "FOG_TL", BRT_TOKEN_LIST, BRT_FOG_TL, 3, }, |
||
155 | { { NULL, NULL, }, "FONT_NORMAL_O", BRT_OBJECT, BRT_FONT_NORMAL_O, 11, }, |
||
156 | { { NULL, NULL, }, "FONT_NORMAL_P", BRT_POINTER, BRT_FONT_NORMAL_P, 11, }, |
||
157 | { { NULL, NULL, }, "FORCE_FRONT_B", BRT_BOOLEAN, BRT_FORCE_FRONT_B, 11, }, |
||
158 | { { NULL, NULL, }, "FORMAT_T", BRT_TOKEN, BRT_FORMAT_T, 6, }, |
||
159 | { { NULL, NULL, }, "GEOMETRY", BRT_NONE, BRT_GEOMETRY, 8, }, |
||
160 | { { NULL, NULL, }, "GEOMETRY_LIGHTING", BRT_NONE, BRT_GEOMETRY_LIGHTING, 17, }, |
||
161 | { { NULL, NULL, }, "GEOMETRY_MAP", BRT_NONE, BRT_GEOMETRY_MAP, 12, }, |
||
162 | { { NULL, NULL, }, "GEOMETRY_PRIMITIVES", BRT_NONE, BRT_GEOMETRY_PRIMITIVES, 19, }, |
||
163 | { { NULL, NULL, }, "GEOMETRY_STORED", BRT_NONE, BRT_GEOMETRY_STORED, 15, }, |
||
164 | { { NULL, NULL, }, "GEOMETRY_V1_BUCKETS", BRT_NONE, BRT_GEOMETRY_V1_BUCKETS, 19, }, |
||
165 | { { NULL, NULL, }, "GEOMETRY_V1_MODEL", BRT_NONE, BRT_GEOMETRY_V1_MODEL, 17, }, |
||
166 | { { NULL, NULL, }, "GEOMETRY_X", BRT_NONE, BRT_GEOMETRY_X, 10, }, |
||
167 | { { NULL, NULL, }, "GEOMETRY_Y", BRT_NONE, BRT_GEOMETRY_Y, 10, }, |
||
168 | { { NULL, NULL, }, "GEOMETRY_Z", BRT_NONE, BRT_GEOMETRY_Z, 10, }, |
||
169 | { { NULL, NULL, }, "GREATER", BRT_NONE, BRT_GREATER, 7, }, |
||
170 | { { NULL, NULL, }, "GREATER_OR_EQUAL", BRT_NONE, BRT_GREATER_OR_EQUAL, 16, }, |
||
171 | { { NULL, NULL, }, "GREEN", BRT_NONE, BRT_GREEN, 5, }, |
||
172 | { { NULL, NULL, }, "HANDLE", BRT_NONE, BRT_HANDLE, 6, }, |
||
173 | { { NULL, NULL, }, "HEIGHT_I32", BRT_INT_32, BRT_HEIGHT_I32, 6, }, |
||
174 | { { NULL, NULL, }, "HEIGHT_MAX_I32", BRT_INT_32, BRT_HEIGHT_MAX_I32, 10, }, |
||
175 | { { NULL, NULL, }, "HEIGHT_MIN_I32", BRT_INT_32, BRT_HEIGHT_MIN_I32, 10, }, |
||
176 | { { NULL, NULL, }, "HEIGHT_OPTIMUM_I32", BRT_INT_32, BRT_HEIGHT_OPTIMUM_I32, 14, }, |
||
177 | { { NULL, NULL, }, "HEIGHT_T", BRT_TOKEN, BRT_HEIGHT_T, 6, }, |
||
178 | { { NULL, NULL, }, "HEIGHT_TL", BRT_TOKEN_LIST, BRT_HEIGHT_TL, 6, }, |
||
179 | { { NULL, NULL, }, "HIDDEN", BRT_NONE, BRT_HIDDEN, 6, }, |
||
180 | { { NULL, NULL, }, "HIDDEN_BUFFER", BRT_NONE, BRT_HIDDEN_BUFFER, 13, }, |
||
181 | { { NULL, NULL, }, "HIDDEN_SURFACE", BRT_NONE, BRT_HIDDEN_SURFACE, 14, }, |
||
182 | { { NULL, NULL, }, "HOST_MEMORY_U32", BRT_UINT_32, BRT_HOST_MEMORY_U32, 11, }, |
||
183 | { { NULL, NULL, }, "IDENTIFIER_CSTR", BRT_CONSTANT_STRING, BRT_IDENTIFIER_CSTR, 10, }, |
||
184 | { { NULL, NULL, }, "INDEX", BRT_NONE, BRT_INDEX, 5, }, |
||
185 | { { NULL, NULL, }, "INDEXA_4_4", BRT_NONE, BRT_INDEXA_4_4, 10, }, |
||
186 | { { NULL, NULL, }, "INDEXA_8_8", BRT_NONE, BRT_INDEXA_8_8, 10, }, |
||
187 | { { NULL, NULL, }, "INDEXED_B", BRT_BOOLEAN, BRT_INDEXED_B, 7, }, |
||
188 | { { NULL, NULL, }, "INDEX_1", BRT_NONE, BRT_INDEX_1, 7, }, |
||
189 | { { NULL, NULL, }, "INDEX_2", BRT_NONE, BRT_INDEX_2, 7, }, |
||
190 | { { NULL, NULL, }, "INDEX_4", BRT_NONE, BRT_INDEX_4, 7, }, |
||
191 | { { NULL, NULL, }, "INDEX_8", BRT_NONE, BRT_INDEX_8, 7, }, |
||
192 | { { NULL, NULL, }, "INDEX_BASE_I32", BRT_INT_32, BRT_INDEX_BASE_I32, 10, }, |
||
193 | { { NULL, NULL, }, "INDEX_BLEND_O", BRT_OBJECT, BRT_INDEX_BLEND_O, 11, }, |
||
194 | { { NULL, NULL, }, "INDEX_BLEND_TVL", BRT_TOKEN_VALUE_LIST, BRT_INDEX_BLEND_TVL, 11, }, |
||
195 | { { NULL, NULL, }, "INDEX_FOG_O", BRT_OBJECT, BRT_INDEX_FOG_O, 9, }, |
||
196 | { { NULL, NULL, }, "INDEX_FOG_TVL", BRT_TOKEN_VALUE_LIST, BRT_INDEX_FOG_TVL, 9, }, |
||
197 | { { NULL, NULL, }, "INDEX_LIGHT_O", BRT_OBJECT, BRT_INDEX_LIGHT_O, 11, }, |
||
198 | { { NULL, NULL, }, "INDEX_LIGHT_TVL", BRT_TOKEN_VALUE_LIST, BRT_INDEX_LIGHT_TVL, 11, }, |
||
199 | { { NULL, NULL, }, "INDEX_RANGE_I32", BRT_INT_32, BRT_INDEX_RANGE_I32, 11, }, |
||
200 | { { NULL, NULL, }, "INDEX_SHADE_O", BRT_OBJECT, BRT_INDEX_SHADE_O, 11, }, |
||
201 | { { NULL, NULL, }, "INDEX_SHADE_TVL", BRT_TOKEN_VALUE_LIST, BRT_INDEX_SHADE_TVL, 11, }, |
||
202 | { { NULL, NULL, }, "INI_STR", BRT_STRING, BRT_INI_STR, 3, }, |
||
203 | { { NULL, NULL, }, "INTEL", BRT_NONE, BRT_INTEL, 5, }, |
||
204 | { { NULL, NULL, }, "INTEL_386", BRT_NONE, BRT_INTEL_386, 9, }, |
||
205 | { { NULL, NULL, }, "INTEL_486", BRT_NONE, BRT_INTEL_486, 9, }, |
||
206 | { { NULL, NULL, }, "INTEL_PENTIUM", BRT_NONE, BRT_INTEL_PENTIUM, 13, }, |
||
207 | { { NULL, NULL, }, "INTEL_PENTIUM_PRO", BRT_NONE, BRT_INTEL_PENTIUM_PRO, 17, }, |
||
208 | { { NULL, NULL, }, "INTERLACE_B", BRT_BOOLEAN, BRT_INTERLACE_B, 9, }, |
||
209 | { { NULL, NULL, }, "INT_16", BRT_NONE, BRT_INT_16, 6, }, |
||
210 | { { NULL, NULL, }, "INT_32", BRT_NONE, BRT_INT_32, 6, }, |
||
211 | { { NULL, NULL, }, "INT_8", BRT_NONE, BRT_INT_8, 5, }, |
||
212 | { { NULL, NULL, }, "KEY_IS_TRANSPARENT", BRT_NONE, BRT_KEY_IS_TRANSPARENT, 18, }, |
||
213 | { { NULL, NULL, }, "LEFT_RIGHT", BRT_NONE, BRT_LEFT_RIGHT, 10, }, |
||
214 | { { NULL, NULL, }, "LENGTH_PRESERVING", BRT_NONE, BRT_LENGTH_PRESERVING, 17, }, |
||
215 | { { NULL, NULL, }, "LESS", BRT_NONE, BRT_LESS, 4, }, |
||
216 | { { NULL, NULL, }, "LESS_OR_EQUAL", BRT_NONE, BRT_LESS_OR_EQUAL, 13, }, |
||
217 | { { NULL, NULL, }, "LIGHT", BRT_NONE, BRT_LIGHT, 5, }, |
||
218 | { { NULL, NULL, }, "LIGHTING_B", BRT_BOOLEAN, BRT_LIGHTING_B, 8, }, |
||
219 | { { NULL, NULL, }, "LIGHT_MAX_I32", BRT_INT_32, BRT_LIGHT_MAX_I32, 9, }, |
||
220 | { { NULL, NULL, }, "LIGHT_VERTICES", BRT_NONE, BRT_LIGHT_VERTICES, 14, }, |
||
221 | { { NULL, NULL, }, "LINE", BRT_NONE, BRT_LINE, 4, }, |
||
222 | { { NULL, NULL, }, "LINEAR", BRT_NONE, BRT_LINEAR, 6, }, |
||
223 | { { NULL, NULL, }, "LPDIRECTDRAWSURFACE_P", BRT_POINTER, BRT_LPDIRECTDRAWSURFACE_P, 19, }, |
||
224 | { { NULL, NULL, }, "MAPPING_SOURCE_T", BRT_TOKEN, BRT_MAPPING_SOURCE_T, 14, }, |
||
225 | { { NULL, NULL, }, "MAP_ANTIALIASING_T", BRT_TOKEN, BRT_MAP_ANTIALIASING_T, 16, }, |
||
226 | { { NULL, NULL, }, "MAP_ANTIALIASING_TL", BRT_TOKEN_LIST, BRT_MAP_ANTIALIASING_TL, 16, }, |
||
227 | { { NULL, NULL, }, "MAP_HEIGHT_LIMIT_T", BRT_TOKEN, BRT_MAP_HEIGHT_LIMIT_T, 16, }, |
||
228 | { { NULL, NULL, }, "MAP_HEIGHT_LIMIT_TL", BRT_TOKEN_LIST, BRT_MAP_HEIGHT_LIMIT_TL, 16, }, |
||
229 | { { NULL, NULL, }, "MAP_INTERPOLATION_MAG_T", BRT_TOKEN, BRT_MAP_INTERPOLATION_MAG_T, 21, }, |
||
230 | { { NULL, NULL, }, "MAP_INTERPOLATION_MAG_TL", BRT_TOKEN_LIST, BRT_MAP_INTERPOLATION_MAG_TL, 21, }, |
||
231 | { { NULL, NULL, }, "MAP_INTERPOLATION_MIN_T", BRT_TOKEN, BRT_MAP_INTERPOLATION_MIN_T, 21, }, |
||
232 | { { NULL, NULL, }, "MAP_INTERPOLATION_MIN_TL", BRT_TOKEN_LIST, BRT_MAP_INTERPOLATION_MIN_TL, 21, }, |
||
233 | { { NULL, NULL, }, "MAP_INTERPOLATION_T", BRT_TOKEN, BRT_MAP_INTERPOLATION_T, 17, }, |
||
234 | { { NULL, NULL, }, "MAP_INTERPOLATION_TL", BRT_TOKEN_LIST, BRT_MAP_INTERPOLATION_TL, 17, }, |
||
235 | { { NULL, NULL, }, "MAP_MATRIX_M23_F", BRT_MATRIX23_FLOAT, BRT_MAP_MATRIX_M23_F, 10, }, |
||
236 | { { NULL, NULL, }, "MAP_MATRIX_M23_X", BRT_MATRIX23_FIXED, BRT_MAP_MATRIX_M23_X, 10, }, |
||
237 | { { NULL, NULL, }, "MAP_WIDTH_LIMIT_T", BRT_TOKEN, BRT_MAP_WIDTH_LIMIT_T, 15, }, |
||
238 | { { NULL, NULL, }, "MAP_WIDTH_LIMIT_TL", BRT_TOKEN_LIST, BRT_MAP_WIDTH_LIMIT_TL, 15, }, |
||
239 | { { NULL, NULL, }, "MATCH_TVL", BRT_TOKEN_VALUE_LIST, BRT_MATCH_TVL, 5, }, |
||
240 | { { NULL, NULL, }, "MATRIX", BRT_NONE, BRT_MATRIX, 6, }, |
||
241 | { { NULL, NULL, }, "MATRIX23_FIXED", BRT_NONE, BRT_MATRIX23_FIXED, 14, }, |
||
242 | { { NULL, NULL, }, "MATRIX23_FLOAT", BRT_NONE, BRT_MATRIX23_FLOAT, 14, }, |
||
243 | { { NULL, NULL, }, "MATRIX34_FIXED", BRT_NONE, BRT_MATRIX34_FIXED, 14, }, |
||
244 | { { NULL, NULL, }, "MATRIX34_FLOAT", BRT_NONE, BRT_MATRIX34_FLOAT, 14, }, |
||
245 | { { NULL, NULL, }, "MATRIX4_FIXED", BRT_NONE, BRT_MATRIX4_FIXED, 13, }, |
||
246 | { { NULL, NULL, }, "MATRIX4_FLOAT", BRT_NONE, BRT_MATRIX4_FLOAT, 13, }, |
||
247 | { { NULL, NULL, }, "MAX_V2_F", BRT_VECTOR2_FLOAT, BRT_MAX_V2_F, 3, }, |
||
248 | { { NULL, NULL, }, "MAX_V2_I", BRT_VECTOR2_INTEGER, BRT_MAX_V2_I, 3, }, |
||
249 | { { NULL, NULL, }, "MAX_V2_X", BRT_VECTOR2_FIXED, BRT_MAX_V2_X, 3, }, |
||
250 | { { NULL, NULL, }, "MEMORY_MAPPED_B", BRT_BOOLEAN, BRT_MEMORY_MAPPED_B, 13, }, |
||
251 | { { NULL, NULL, }, "MIN_V2_F", BRT_VECTOR2_FLOAT, BRT_MIN_V2_F, 3, }, |
||
252 | { { NULL, NULL, }, "MIN_V2_I", BRT_VECTOR2_INTEGER, BRT_MIN_V2_I, 3, }, |
||
253 | { { NULL, NULL, }, "MIN_V2_X", BRT_VECTOR2_FIXED, BRT_MIN_V2_X, 3, }, |
||
254 | { { NULL, NULL, }, "MIP", BRT_NONE, BRT_MIP, 3, }, |
||
255 | { { NULL, NULL, }, "MIPS", BRT_NONE, BRT_MIPS, 4, }, |
||
256 | { { NULL, NULL, }, "MIP_INTERPOLATION_T", BRT_TOKEN, BRT_MIP_INTERPOLATION_T, 17, }, |
||
257 | { { NULL, NULL, }, "MIP_INTERPOLATION_TL", BRT_TOKEN_LIST, BRT_MIP_INTERPOLATION_TL, 17, }, |
||
258 | { { NULL, NULL, }, "MIP_PER_PIXEL", BRT_NONE, BRT_MIP_PER_PIXEL, 13, }, |
||
259 | { { NULL, NULL, }, "MIP_PER_PRIMITIVE", BRT_NONE, BRT_MIP_PER_PRIMITIVE, 17, }, |
||
260 | { { NULL, NULL, }, "MIRROR", BRT_NONE, BRT_MIRROR, 6, }, |
||
261 | { { NULL, NULL, }, "MODEL", BRT_NONE, BRT_MODEL, 5, }, |
||
262 | { { NULL, NULL, }, "MODEL_TO_SCREEN_M4_F", BRT_MATRIX4_FLOAT, BRT_MODEL_TO_SCREEN_M4_F, 15, }, |
||
263 | { { NULL, NULL, }, "MODEL_TO_SCREEN_M4_X", BRT_MATRIX4_FIXED, BRT_MODEL_TO_SCREEN_M4_X, 15, }, |
||
264 | { { NULL, NULL, }, "MODEL_TO_VIEW_HINT_T", BRT_TOKEN, BRT_MODEL_TO_VIEW_HINT_T, 18, }, |
||
265 | { { NULL, NULL, }, "MODEL_TO_VIEW_M34_F", BRT_MATRIX34_FLOAT, BRT_MODEL_TO_VIEW_M34_F, 13, }, |
||
266 | { { NULL, NULL, }, "MODEL_TO_VIEW_M34_X", BRT_MATRIX34_FIXED, BRT_MODEL_TO_VIEW_M34_X, 13, }, |
||
267 | { { NULL, NULL, }, "MODE_U32", BRT_UINT_32, BRT_MODE_U32, 4, }, |
||
268 | { { NULL, NULL, }, "MODULATE_B", BRT_BOOLEAN, BRT_MODULATE_B, 8, }, |
||
269 | { { NULL, NULL, }, "MOTOROLA", BRT_NONE, BRT_MOTOROLA, 8, }, |
||
270 | { { NULL, NULL, }, "NEAREST", BRT_NONE, BRT_NEAREST, 7, }, |
||
271 | { { NULL, NULL, }, "NEVER", BRT_NONE, BRT_NEVER, 5, }, |
||
272 | { { NULL, NULL, }, "NONE", BRT_NONE, BRT_NONE, 4, }, |
||
273 | { { NULL, NULL, }, "NOT_EQUAL", BRT_NONE, BRT_NOT_EQUAL, 9, }, |
||
274 | { { NULL, NULL, }, "NO_RENDER", BRT_NONE, BRT_NO_RENDER, 9, }, |
||
275 | { { NULL, NULL, }, "OBJECT", BRT_NONE, BRT_OBJECT, 6, }, |
||
276 | { { NULL, NULL, }, "OBJECT_CONTAINER", BRT_NONE, BRT_OBJECT_CONTAINER, 16, }, |
||
277 | { { NULL, NULL, }, "OBJECT_LIST", BRT_NONE, BRT_OBJECT_LIST, 11, }, |
||
278 | { { NULL, NULL, }, "ODD_EVEN", BRT_NONE, BRT_ODD_EVEN, 8, }, |
||
279 | { { NULL, NULL, }, "OFFSCREEN", BRT_NONE, BRT_OFFSCREEN, 9, }, |
||
280 | { { NULL, NULL, }, "ONE_SIDED", BRT_NONE, BRT_ONE_SIDED, 9, }, |
||
281 | { { NULL, NULL, }, "OPACITY_F", BRT_FLOAT, BRT_OPACITY_F, 7, }, |
||
282 | { { NULL, NULL, }, "OPACITY_SOURCE_T", BRT_TOKEN, BRT_OPACITY_SOURCE_T, 14, }, |
||
283 | { { NULL, NULL, }, "OPACITY_X", BRT_FIXED, BRT_OPACITY_X, 7, }, |
||
284 | { { NULL, NULL, }, "ORIGIN_V2_I", BRT_VECTOR2_INTEGER, BRT_ORIGIN_V2_I, 6, }, |
||
285 | { { NULL, NULL, }, "OUTPUT", BRT_NONE, BRT_OUTPUT, 6, }, |
||
286 | { { NULL, NULL, }, "OUTPUT_FACILITY", BRT_NONE, BRT_OUTPUT_FACILITY, 15, }, |
||
287 | { { NULL, NULL, }, "OUTPUT_FACILITY_O", BRT_OBJECT, BRT_OUTPUT_FACILITY_O, 15, }, |
||
288 | { { NULL, NULL, }, "PARALLEL", BRT_NONE, BRT_PARALLEL, 8, }, |
||
289 | { { NULL, NULL, }, "PARTIAL", BRT_NONE, BRT_PARTIAL, 7, }, |
||
290 | { { NULL, NULL, }, "PARTS_TL", BRT_TOKEN_LIST, BRT_PARTS_TL, 5, }, |
||
291 | { { NULL, NULL, }, "PARTS_U32", BRT_UINT_32, BRT_PARTS_U32, 5, }, |
||
292 | { { NULL, NULL, }, "PERSPECTIVE", BRT_NONE, BRT_PERSPECTIVE, 11, }, |
||
293 | { { NULL, NULL, }, "PERSPECTIVE_B", BRT_BOOLEAN, BRT_PERSPECTIVE_B, 11, }, |
||
294 | { { NULL, NULL, }, "PERSPECTIVE_T", BRT_TOKEN, BRT_PERSPECTIVE_T, 11, }, |
||
295 | { { NULL, NULL, }, "PERSPECTIVE_TL", BRT_TOKEN_LIST, BRT_PERSPECTIVE_TL, 11, }, |
||
296 | { { NULL, NULL, }, "PIXELMAP_MAX_I32", BRT_INT_32, BRT_PIXELMAP_MAX_I32, 12, }, |
||
297 | { { NULL, NULL, }, "PIXEL_BITS_I32", BRT_INT_32, BRT_PIXEL_BITS_I32, 10, }, |
||
298 | { { NULL, NULL, }, "PIXEL_CHANNELS_I32", BRT_INT_32, BRT_PIXEL_CHANNELS_I32, 14, }, |
||
299 | { { NULL, NULL, }, "PIXEL_CHANNELS_TL", BRT_TOKEN_LIST, BRT_PIXEL_CHANNELS_TL, 14, }, |
||
300 | { { NULL, NULL, }, "PIXEL_GET_F", BRT_FLOAT, BRT_PIXEL_GET_F, 9, }, |
||
301 | { { NULL, NULL, }, "PIXEL_GET_X", BRT_FIXED, BRT_PIXEL_GET_X, 9, }, |
||
302 | { { NULL, NULL, }, "PIXEL_SET_F", BRT_FLOAT, BRT_PIXEL_SET_F, 9, }, |
||
303 | { { NULL, NULL, }, "PIXEL_SET_X", BRT_FIXED, BRT_PIXEL_SET_X, 9, }, |
||
304 | { { NULL, NULL, }, "PIXEL_TYPE_U8", BRT_UINT_8, BRT_PIXEL_TYPE_U8, 10, }, |
||
305 | { { NULL, NULL, }, "PLANE", BRT_NONE, BRT_PLANE, 5, }, |
||
306 | { { NULL, NULL, }, "PLANE_V4_F", BRT_VECTOR4_FLOAT, BRT_PLANE_V4_F, 5, }, |
||
307 | { { NULL, NULL, }, "PLANE_V4_X", BRT_VECTOR4_FIXED, BRT_PLANE_V4_X, 5, }, |
||
308 | { { NULL, NULL, }, "POINT", BRT_NONE, BRT_POINT, 5, }, |
||
309 | { { NULL, NULL, }, "POINTER", BRT_NONE, BRT_POINTER, 7, }, |
||
310 | { { NULL, NULL, }, "POINTER_LIST", BRT_NONE, BRT_POINTER_LIST, 12, }, |
||
311 | { { NULL, NULL, }, "POSITION_V3_F", BRT_VECTOR3_FLOAT, BRT_POSITION_V3_F, 8, }, |
||
312 | { { NULL, NULL, }, "POSITION_V3_X", BRT_VECTOR3_FIXED, BRT_POSITION_V3_X, 8, }, |
||
313 | { { NULL, NULL, }, "POWERPC", BRT_NONE, BRT_POWERPC, 7, }, |
||
314 | { { NULL, NULL, }, "POWER_OF_2", BRT_NONE, BRT_POWER_OF_2, 10, }, |
||
315 | { { NULL, NULL, }, "PREFER_SHARE_B", BRT_BOOLEAN, BRT_PREFER_SHARE_B, 12, }, |
||
316 | { { NULL, NULL, }, "PRIMITIVE", BRT_NONE, BRT_PRIMITIVE, 9, }, |
||
317 | { { NULL, NULL, }, "PRIMITIVES", BRT_NONE, BRT_PRIMITIVES, 10, }, |
||
318 | { { NULL, NULL, }, "PRIMITIVE_BLOCK_P", BRT_POINTER, BRT_PRIMITIVE_BLOCK_P, 15, }, |
||
319 | { { NULL, NULL, }, "PRIMITIVE_CUSTOM_P", BRT_POINTER, BRT_PRIMITIVE_CUSTOM_P, 16, }, |
||
320 | { { NULL, NULL, }, "PRIMITIVE_FILTER_P", BRT_POINTER, BRT_PRIMITIVE_FILTER_P, 16, }, |
||
321 | { { NULL, NULL, }, "PRIMITIVE_LIBRARY", BRT_NONE, BRT_PRIMITIVE_LIBRARY, 17, }, |
||
322 | { { NULL, NULL, }, "PRIMITIVE_LIBRARY_O", BRT_OBJECT, BRT_PRIMITIVE_LIBRARY_O, 17, }, |
||
323 | { { NULL, NULL, }, "PRIMITIVE_LIBRARY_P", BRT_POINTER, BRT_PRIMITIVE_LIBRARY_P, 17, }, |
||
324 | { { NULL, NULL, }, "PRIMITIVE_STATE", BRT_NONE, BRT_PRIMITIVE_STATE, 15, }, |
||
325 | { { NULL, NULL, }, "PRIVATE", BRT_NONE, BRT_PRIVATE, 7, }, |
||
326 | { { NULL, NULL, }, "PRODUCT_CSTR", BRT_CONSTANT_STRING, BRT_PRODUCT_CSTR, 7, }, |
||
327 | { { NULL, NULL, }, "PRODUCT_VERSION_CSTR", BRT_CONSTANT_STRING, BRT_PRODUCT_VERSION_CSTR, 15, }, |
||
328 | { { NULL, NULL, }, "QUAD", BRT_NONE, BRT_QUAD, 4, }, |
||
329 | { { NULL, NULL, }, "QUAD_STRIP", BRT_NONE, BRT_QUAD_STRIP, 10, }, |
||
330 | { { NULL, NULL, }, "RED", BRT_NONE, BRT_RED, 3, }, |
||
331 | { { NULL, NULL, }, "REGISTRY_STR", BRT_STRING, BRT_REGISTRY_STR, 8, }, |
||
332 | { { NULL, NULL, }, "REJECT", BRT_NONE, BRT_REJECT, 6, }, |
||
333 | { { NULL, NULL, }, "RENDERER", BRT_NONE, BRT_RENDERER, 8, }, |
||
334 | { { NULL, NULL, }, "RENDERER_FACILITY", BRT_NONE, BRT_RENDERER_FACILITY, 17, }, |
||
335 | { { NULL, NULL, }, "RENDERER_FACILITY_O", BRT_OBJECT, BRT_RENDERER_FACILITY_O, 17, }, |
||
336 | { { NULL, NULL, }, "RENDERER_MAX_I32", BRT_INT_32, BRT_RENDERER_MAX_I32, 12, }, |
||
337 | { { NULL, NULL, }, "RENDERER_O", BRT_OBJECT, BRT_RENDERER_O, 8, }, |
||
338 | { { NULL, NULL, }, "RENDERER_STATE_STORED", BRT_NONE, BRT_RENDERER_STATE_STORED, 21, }, |
||
339 | { { NULL, NULL, }, "RENDER_B", BRT_BOOLEAN, BRT_RENDER_B, 6, }, |
||
340 | { { NULL, NULL, }, "RGB", BRT_NONE, BRT_RGB, 3, }, |
||
341 | { { NULL, NULL, }, "RGBA_4_4_4_4", BRT_NONE, BRT_RGBA_4_4_4_4, 12, }, |
||
342 | { { NULL, NULL, }, "RGBA_8_8_8_8", BRT_NONE, BRT_RGBA_8_8_8_8, 12, }, |
||
343 | { { NULL, NULL, }, "RGBX_8_8_8_8", BRT_NONE, BRT_RGBX_8_8_8_8, 12, }, |
||
344 | { { NULL, NULL, }, "RGB_2_3_2", BRT_NONE, BRT_RGB_2_3_2, 9, }, |
||
345 | { { NULL, NULL, }, "RGB_5_6_5", BRT_NONE, BRT_RGB_5_6_5, 9, }, |
||
346 | { { NULL, NULL, }, "RGB_8_8_8", BRT_NONE, BRT_RGB_8_8_8, 9, }, |
||
347 | { { NULL, NULL, }, "RIGHT_LEFT", BRT_NONE, BRT_RIGHT_LEFT, 10, }, |
||
348 | { { NULL, NULL, }, "SCREEN_DOOR_O", BRT_OBJECT, BRT_SCREEN_DOOR_O, 11, }, |
||
349 | { { NULL, NULL, }, "SCREEN_DOOR_TVL", BRT_TOKEN_VALUE_LIST, BRT_SCREEN_DOOR_TVL, 11, }, |
||
350 | { { NULL, NULL, }, "SHARED_B", BRT_BOOLEAN, BRT_SHARED_B, 6, }, |
||
351 | { { NULL, NULL, }, "SMOOTH_B", BRT_BOOLEAN, BRT_SMOOTH_B, 6, }, |
||
352 | { { NULL, NULL, }, "SPACE_T", BRT_TOKEN, BRT_SPACE_T, 5, }, |
||
353 | { { NULL, NULL, }, "SPECULAR_F", BRT_FLOAT, BRT_SPECULAR_F, 8, }, |
||
354 | { { NULL, NULL, }, "SPECULAR_POWER_F", BRT_FLOAT, BRT_SPECULAR_POWER_F, 14, }, |
||
355 | { { NULL, NULL, }, "SPECULAR_POWER_X", BRT_FIXED, BRT_SPECULAR_POWER_X, 14, }, |
||
356 | { { NULL, NULL, }, "SPECULAR_X", BRT_FIXED, BRT_SPECULAR_X, 8, }, |
||
357 | { { NULL, NULL, }, "SPOT", BRT_NONE, BRT_SPOT, 4, }, |
||
358 | { { NULL, NULL, }, "SPOT_INNER_F", BRT_FLOAT, BRT_SPOT_INNER_F, 10, }, |
||
359 | { { NULL, NULL, }, "SPOT_INNER_X", BRT_FIXED, BRT_SPOT_INNER_X, 10, }, |
||
360 | { { NULL, NULL, }, "SPOT_OUTER_F", BRT_FLOAT, BRT_SPOT_OUTER_F, 10, }, |
||
361 | { { NULL, NULL, }, "SPOT_OUTER_X", BRT_FIXED, BRT_SPOT_OUTER_X, 10, }, |
||
362 | { { NULL, NULL, }, "SPRITE", BRT_NONE, BRT_SPRITE, 6, }, |
||
363 | { { NULL, NULL, }, "SQUARE", BRT_NONE, BRT_SQUARE, 6, }, |
||
364 | { { NULL, NULL, }, "STATE_RESTORE", BRT_NONE, BRT_STATE_RESTORE, 13, }, |
||
365 | { { NULL, NULL, }, "STEREO_B", BRT_BOOLEAN, BRT_STEREO_B, 6, }, |
||
366 | { { NULL, NULL, }, "STEREO_T", BRT_TOKEN, BRT_STEREO_T, 6, }, |
||
367 | { { NULL, NULL, }, "STEREO_TL", BRT_TOKEN_LIST, BRT_STEREO_TL, 6, }, |
||
368 | { { NULL, NULL, }, "STORED_STATE_O", BRT_OBJECT, BRT_STORED_STATE_O, 12, }, |
||
369 | { { NULL, NULL, }, "STRETCHDIBITS", BRT_NONE, BRT_STRETCHDIBITS, 13, }, |
||
370 | { { NULL, NULL, }, "STRETCH_COPY_DESTINATION_TVL", BRT_TOKEN_VALUE_LIST, BRT_STRETCH_COPY_DESTINATION_TVL, 24, }, |
||
371 | { { NULL, NULL, }, "STRETCH_COPY_F", BRT_FLOAT, BRT_STRETCH_COPY_F, 12, }, |
||
372 | { { NULL, NULL, }, "STRETCH_COPY_SOURCE_TVL", BRT_TOKEN_VALUE_LIST, BRT_STRETCH_COPY_SOURCE_TVL, 19, }, |
||
373 | { { NULL, NULL, }, "STRETCH_COPY_T", BRT_TOKEN, BRT_STRETCH_COPY_T, 12, }, |
||
374 | { { NULL, NULL, }, "STRETCH_COPY_TL", BRT_TOKEN_LIST, BRT_STRETCH_COPY_TL, 12, }, |
||
375 | { { NULL, NULL, }, "STRETCH_COPY_X", BRT_FIXED, BRT_STRETCH_COPY_X, 12, }, |
||
376 | { { NULL, NULL, }, "STRING", BRT_NONE, BRT_STRING, 6, }, |
||
377 | { { NULL, NULL, }, "SUBDIVIDE", BRT_NONE, BRT_SUBDIVIDE, 9, }, |
||
378 | { { NULL, NULL, }, "SUBDIVIDE_TOLERANCE_I32", BRT_INT_32, BRT_SUBDIVIDE_TOLERANCE_I32, 19, }, |
||
379 | { { NULL, NULL, }, "SURFACE", BRT_NONE, BRT_SURFACE, 7, }, |
||
380 | { { NULL, NULL, }, "SURFACE_B", BRT_BOOLEAN, BRT_SURFACE_B, 7, }, |
||
381 | { { NULL, NULL, }, "SURFACE_C_CUSTOM_P", BRT_POINTER, BRT_SURFACE_C_CUSTOM_P, 16, }, |
||
382 | { { NULL, NULL, }, "SURFACE_C_FILTER_P", BRT_POINTER, BRT_SURFACE_C_FILTER_P, 16, }, |
||
383 | { { NULL, NULL, }, "SURFACE_V_CUSTOM_P", BRT_POINTER, BRT_SURFACE_V_CUSTOM_P, 16, }, |
||
384 | { { NULL, NULL, }, "SURFACE_V_FILTER_P", BRT_POINTER, BRT_SURFACE_V_FILTER_P, 16, }, |
||
385 | { { NULL, NULL, }, "SYCHRONISE_I32", BRT_INT_32, BRT_SYCHRONISE_I32, 10, }, |
||
386 | { { NULL, NULL, }, "TEXTURE_MEMORY_U32", BRT_UINT_32, BRT_TEXTURE_MEMORY_U32, 14, }, |
||
387 | { { NULL, NULL, }, "TEXTURE_O", BRT_OBJECT, BRT_TEXTURE_O, 7, }, |
||
388 | { { NULL, NULL, }, "TEXTURE_TVL", BRT_TOKEN_VALUE_LIST, BRT_TEXTURE_TVL, 7, }, |
||
389 | { { NULL, NULL, }, "TITLE_CSTR", BRT_CONSTANT_STRING, BRT_TITLE_CSTR, 5, }, |
||
390 | { { NULL, NULL, }, "TOKEN", BRT_NONE, BRT_TOKEN, 5, }, |
||
391 | { { NULL, NULL, }, "TOKEN_LIST", BRT_NONE, BRT_TOKEN_LIST, 10, }, |
||
392 | { { NULL, NULL, }, "TOKEN_VALUE_LIST", BRT_NONE, BRT_TOKEN_VALUE_LIST, 16, }, |
||
393 | { { NULL, NULL, }, "TOP_BOTTOM", BRT_NONE, BRT_TOP_BOTTOM, 10, }, |
||
394 | { { NULL, NULL, }, "TRANSFORM_B", BRT_BOOLEAN, BRT_TRANSFORM_B, 9, }, |
||
395 | { { NULL, NULL, }, "TRIANGLE", BRT_NONE, BRT_TRIANGLE, 8, }, |
||
396 | { { NULL, NULL, }, "TRI_FAN", BRT_NONE, BRT_TRI_FAN, 7, }, |
||
397 | { { NULL, NULL, }, "TRI_STRIP", BRT_NONE, BRT_TRI_STRIP, 9, }, |
||
398 | { { NULL, NULL, }, "TWO_SIDED", BRT_NONE, BRT_TWO_SIDED, 9, }, |
||
399 | { { NULL, NULL, }, "TYPE_T", BRT_TOKEN, BRT_TYPE_T, 4, }, |
||
400 | { { NULL, NULL, }, "UINT_16", BRT_NONE, BRT_UINT_16, 7, }, |
||
401 | { { NULL, NULL, }, "UINT_32", BRT_NONE, BRT_UINT_32, 7, }, |
||
402 | { { NULL, NULL, }, "UINT_8", BRT_NONE, BRT_UINT_8, 6, }, |
||
403 | { { NULL, NULL, }, "UNKNOWN", BRT_NONE, BRT_UNKNOWN, 7, }, |
||
404 | { { NULL, NULL, }, "USE_NO_3D_B", BRT_BOOLEAN, BRT_USE_NO_3D_B, 9, }, |
||
405 | { { NULL, NULL, }, "USE_NO_DEPTH_B", BRT_BOOLEAN, BRT_USE_NO_DEPTH_B, 12, }, |
||
406 | { { NULL, NULL, }, "USE_T", BRT_TOKEN, BRT_USE_T, 3, }, |
||
407 | { { NULL, NULL, }, "V1BUCKETS", BRT_NONE, BRT_V1BUCKETS, 9, }, |
||
408 | { { NULL, NULL, }, "V1INSERT_ARG1_P", BRT_POINTER, BRT_V1INSERT_ARG1_P, 13, }, |
||
409 | { { NULL, NULL, }, "V1INSERT_ARG2_P", BRT_POINTER, BRT_V1INSERT_ARG2_P, 13, }, |
||
410 | { { NULL, NULL, }, "V1INSERT_ARG3_P", BRT_POINTER, BRT_V1INSERT_ARG3_P, 13, }, |
||
411 | { { NULL, NULL, }, "V1INSERT_FUNCTION_P", BRT_POINTER, BRT_V1INSERT_FUNCTION_P, 17, }, |
||
412 | { { NULL, NULL, }, "V1MODEL", BRT_NONE, BRT_V1MODEL, 7, }, |
||
413 | { { NULL, NULL, }, "V1ORDER_TABLE_P", BRT_POINTER, BRT_V1ORDER_TABLE_P, 13, }, |
||
414 | { { NULL, NULL, }, "V1PRIMITIVE_HEAP_P", BRT_POINTER, BRT_V1PRIMITIVE_HEAP_P, 16, }, |
||
415 | { { NULL, NULL, }, "VECTOR2_FIXED", BRT_NONE, BRT_VECTOR2_FIXED, 13, }, |
||
416 | { { NULL, NULL, }, "VECTOR2_FLOAT", BRT_NONE, BRT_VECTOR2_FLOAT, 13, }, |
||
417 | { { NULL, NULL, }, "VECTOR2_INTEGER", BRT_NONE, BRT_VECTOR2_INTEGER, 15, }, |
||
418 | { { NULL, NULL, }, "VECTOR3_FIXED", BRT_NONE, BRT_VECTOR3_FIXED, 13, }, |
||
419 | { { NULL, NULL, }, "VECTOR3_FLOAT", BRT_NONE, BRT_VECTOR3_FLOAT, 13, }, |
||
420 | { { NULL, NULL, }, "VECTOR3_INTEGER", BRT_NONE, BRT_VECTOR3_INTEGER, 15, }, |
||
421 | { { NULL, NULL, }, "VECTOR4_FIXED", BRT_NONE, BRT_VECTOR4_FIXED, 13, }, |
||
422 | { { NULL, NULL, }, "VECTOR4_FLOAT", BRT_NONE, BRT_VECTOR4_FLOAT, 13, }, |
||
423 | { { NULL, NULL, }, "VECTOR4_INTEGER", BRT_NONE, BRT_VECTOR4_INTEGER, 15, }, |
||
424 | { { NULL, NULL, }, "VERSION_U32", BRT_UINT_32, BRT_VERSION_U32, 7, }, |
||
425 | { { NULL, NULL, }, "VERTEX_DBL", BRT_NONE, BRT_VERTEX_DBL, 10, }, |
||
426 | { { NULL, NULL, }, "VERTEX_SGL", BRT_NONE, BRT_VERTEX_SGL, 10, }, |
||
427 | { { NULL, NULL, }, "VERTICAL_BLANK", BRT_NONE, BRT_VERTICAL_BLANK, 14, }, |
||
428 | { { NULL, NULL, }, "VIDEO_MEMORY_U32", BRT_UINT_32, BRT_VIDEO_MEMORY_U32, 12, }, |
||
429 | { { NULL, NULL, }, "VIEW", BRT_NONE, BRT_VIEW, 4, }, |
||
430 | { { NULL, NULL, }, "VIEW_TO_ENVIRONMENT_HINT_T", BRT_TOKEN, BRT_VIEW_TO_ENVIRONMENT_HINT_T, 24, }, |
||
431 | { { NULL, NULL, }, "VIEW_TO_ENVIRONMENT_M34_F", BRT_MATRIX34_FLOAT, BRT_VIEW_TO_ENVIRONMENT_M34_F, 19, }, |
||
432 | { { NULL, NULL, }, "VIEW_TO_ENVIRONMENT_M34_X", BRT_MATRIX34_FIXED, BRT_VIEW_TO_ENVIRONMENT_M34_X, 19, }, |
||
433 | { { NULL, NULL, }, "VIEW_TO_SCREEN_HINT_T", BRT_TOKEN, BRT_VIEW_TO_SCREEN_HINT_T, 19, }, |
||
434 | { { NULL, NULL, }, "VIEW_TO_SCREEN_M4_F", BRT_MATRIX4_FLOAT, BRT_VIEW_TO_SCREEN_M4_F, 14, }, |
||
435 | { { NULL, NULL, }, "VIEW_TO_SCREEN_M4_X", BRT_MATRIX4_FIXED, BRT_VIEW_TO_SCREEN_M4_X, 14, }, |
||
436 | { { NULL, NULL, }, "WIDTH_I32", BRT_INT_32, BRT_WIDTH_I32, 5, }, |
||
437 | { { NULL, NULL, }, "WIDTH_MAX_I32", BRT_INT_32, BRT_WIDTH_MAX_I32, 9, }, |
||
438 | { { NULL, NULL, }, "WIDTH_MIN_I32", BRT_INT_32, BRT_WIDTH_MIN_I32, 9, }, |
||
439 | { { NULL, NULL, }, "WIDTH_OPTIMUM_I32", BRT_INT_32, BRT_WIDTH_OPTIMUM_I32, 13, }, |
||
440 | { { NULL, NULL, }, "WIDTH_T", BRT_TOKEN, BRT_WIDTH_T, 5, }, |
||
441 | { { NULL, NULL, }, "WIDTH_TL", BRT_TOKEN_LIST, BRT_WIDTH_TL, 5, }, |
||
442 | { { NULL, NULL, }, "WINDOW_BUFFER_METHOD_T", BRT_TOKEN, BRT_WINDOW_BUFFER_METHOD_T, 20, }, |
||
443 | { { NULL, NULL, }, "WINDOW_FULLSCREEN_B", BRT_BOOLEAN, BRT_WINDOW_FULLSCREEN_B, 17, }, |
||
444 | { { NULL, NULL, }, "WINDOW_HANDLE_H", BRT_HANDLE, BRT_WINDOW_HANDLE_H, 13, }, |
||
445 | { { NULL, NULL, }, "WINDOW_NAME_CSTR", BRT_CONSTANT_STRING, BRT_WINDOW_NAME_CSTR, 11, }, |
||
446 | { { NULL, NULL, }, "WINDOW_PROCEDURE_P", BRT_POINTER, BRT_WINDOW_PROCEDURE_P, 16, }, |
||
447 | { { NULL, NULL, }, "WING", BRT_NONE, BRT_WING, 4, }, |
||
448 | { { NULL, NULL, }, "WORD_BYTES_I32", BRT_INT_32, BRT_WORD_BYTES_I32, 10, }, |
||
449 | { { NULL, NULL, }, "WRAP", BRT_NONE, BRT_WRAP, 4, }, |
||
450 | { { NULL, NULL, }, "WRITABLE_BASE_I32", BRT_INT_32, BRT_WRITABLE_BASE_I32, 13, }, |
||
451 | { { NULL, NULL, }, "WRITABLE_RANGE_I32", BRT_INT_32, BRT_WRITABLE_RANGE_I32, 14, }, |
||
452 | { { NULL, NULL, }, "XBGR_1_5_5_5", BRT_NONE, BRT_XBGR_1_5_5_5, 12, }, |
||
453 | { { NULL, NULL, }, "XBGR_8_8_8_8", BRT_NONE, BRT_XBGR_8_8_8_8, 12, }, |
||
454 | { { NULL, NULL, }, "XRGB_1_5_5_5", BRT_NONE, BRT_XRGB_1_5_5_5, 12, }, |
||
455 | { { NULL, NULL, }, "XRGB_8_8_8_8", BRT_NONE, BRT_XRGB_8_8_8_8, 12, }, |
||
456 | { { NULL, NULL, }, "XYZ_16_16_16", BRT_NONE, BRT_XYZ_16_16_16, 12, }, |
||
457 | { { NULL, NULL, }, "XYZ_8_8_8", BRT_NONE, BRT_XYZ_8_8_8, 9, }, |
||
458 | { { NULL, NULL, }, "YUV_16", BRT_NONE, BRT_YUV_16, 6, }, |
||
459 | { { NULL, NULL, }, "ZERO_IS_TRANSPARENT", BRT_NONE, BRT_ZERO_IS_TRANSPARENT, 19, }, |
||
460 | { { NULL, NULL, }, "ZTRANSPARENCY_B", BRT_BOOLEAN, BRT_ZTRANSPARENCY_B, 13, }, |
||
461 | { { NULL, NULL, }, "Z_WRITE_ALWAYS", BRT_NONE, BRT_Z_WRITE_ALWAYS, 14, }, |
||
462 | { { NULL, NULL, }, "Z_WRITE_CONDITIONAL", BRT_NONE, BRT_Z_WRITE_CONDITIONAL, 19, }, |
||
463 | { { NULL, NULL, }, "Z_WRITE_CONDITIONAL_NO_Z", BRT_NONE, BRT_Z_WRITE_CONDITIONAL_NO_Z, 24, }, |
||
464 | { { NULL, NULL, }, "Z_WRITE_NEVER", BRT_NONE, BRT_Z_WRITE_NEVER, 13, }, |
||
465 | { { NULL, NULL, }, "Z_WRITE_T", BRT_TOKEN, BRT_Z_WRITE_T, 7, }, |
||
466 | { { NULL, NULL, }, "Z_WRITE_TL", BRT_TOKEN_LIST, BRT_Z_WRITE_TL, 7, }, |
||
467 | }; |
||
468 | token_type tokenTypes[37] = { |
||
469 | { "_M34_X", BRT_MATRIX34_FIXED, 6, }, |
||
470 | { "_M23_F", BRT_MATRIX23_FLOAT, 6, }, |
||
471 | { "_M23_X", BRT_MATRIX23_FIXED, 6, }, |
||
472 | { "_M34_F", BRT_MATRIX34_FLOAT, 6, }, |
||
473 | { "_V3_X", BRT_VECTOR3_FIXED, 5, }, |
||
474 | { "_V4_X", BRT_VECTOR4_FIXED, 5, }, |
||
475 | { "_M4_F", BRT_MATRIX4_FLOAT, 5, }, |
||
476 | { "_M4_X", BRT_MATRIX4_FIXED, 5, }, |
||
477 | { "_V3_I", BRT_VECTOR3_INTEGER, 5, }, |
||
478 | { "_V4_F", BRT_VECTOR4_FLOAT, 5, }, |
||
479 | { "_V2_X", BRT_VECTOR2_FIXED, 5, }, |
||
480 | { "_V2_I", BRT_VECTOR2_INTEGER, 5, }, |
||
481 | { "_CSTR", BRT_CONSTANT_STRING, 5, }, |
||
482 | { "_V4_I", BRT_VECTOR4_INTEGER, 5, }, |
||
483 | { "_V2_F", BRT_VECTOR2_FLOAT, 5, }, |
||
484 | { "_V3_F", BRT_VECTOR3_FLOAT, 5, }, |
||
485 | { "_STR", BRT_STRING, 4, }, |
||
486 | { "_U32", BRT_UINT_32, 4, }, |
||
487 | { "_RGB", BRT_COLOUR_RGB, 4, }, |
||
488 | { "_I16", BRT_INT_16, 4, }, |
||
489 | { "_U16", BRT_UINT_16, 4, }, |
||
490 | { "_TVL", BRT_TOKEN_VALUE_LIST, 4, }, |
||
491 | { "_I32", BRT_INT_32, 4, }, |
||
492 | { "_OL", BRT_OBJECT_LIST, 3, }, |
||
493 | { "_I8", BRT_INT_8, 3, }, |
||
494 | { "_PL", BRT_POINTER_LIST, 3, }, |
||
495 | { "_TL", BRT_TOKEN_LIST, 3, }, |
||
496 | { "_U8", BRT_UINT_8, 3, }, |
||
497 | { "_H", BRT_HANDLE, 2, }, |
||
498 | { "_P", BRT_POINTER, 2, }, |
||
499 | { "_X", BRT_FIXED, 2, }, |
||
500 | { "_T", BRT_TOKEN, 2, }, |
||
501 | { "_A", BRT_ANGLE, 2, }, |
||
502 | { "_O", BRT_OBJECT, 2, }, |
||
503 | { "_F", BRT_FLOAT, 2, }, |
||
504 | { "_B", BRT_BOOLEAN, 2, }, |
||
505 | { NULL, BRT_NONE, 0, }, |
||
506 | }; |
||
507 | |||
508 | // IDA: void __cdecl BrTokenBegin() |
||
509 | void BrTokenBegin(void) { |
||
510 | int i; |
||
511 | LOG_TRACE("()"); |
||
512 | |||
513 | BrNewList(&fw.tokens); |
||
514 | for (i = 0; i < BR_ASIZE(predefinedTokens); i++) { |
||
515 | BrAddHead(&fw.tokens, &predefinedTokens[i].node); |
||
516 | } |
||
517 | fw.next_free_token = _BRT_LAST_BUILTIN_TOKEN + 1; |
||
518 | } |
||
519 | |||
520 | // IDA: br_token __cdecl BrTokenCreate(char *identifier, br_token type) |
||
521 | br_token BrTokenCreate(char* identifier, br_token type) { |
||
522 | br_token_entry* te; |
||
523 | int i; |
||
524 | int l; |
||
525 | LOG_TRACE("(\"%s\", %d)", identifier, type); |
||
526 | |||
527 | l = BrStrLen(identifier); |
||
528 | te = (br_token_entry*)fw.tokens.head; |
||
529 | while (te->node.next != NULL) { |
||
530 | if (BrStrCmp(identifier, te->identifier) == 0) { |
||
531 | return te->token; |
||
532 | } |
||
533 | te = (br_token_entry*)te->node.next; |
||
534 | } |
||
535 | |||
536 | if (type == 0) { |
||
537 | type = BRT_NONE; |
||
538 | for (i = 0; i < BR_ASIZE(tokenTypes); i++) { |
||
539 | if ((tokenTypes[i].length < l) && (BrStrNCmp(identifier + l - tokenTypes[i].length, tokenTypes[i].identifier, tokenTypes[i].length) == 0)) { |
||
540 | type = tokenTypes[i].type; |
||
541 | break; |
||
542 | } |
||
543 | } |
||
544 | } else { |
||
545 | for (i = 0; i < BR_ASIZE(tokenTypes); i++) { |
||
546 | if (tokenTypes[i].type == type) { |
||
547 | break; |
||
548 | } |
||
549 | } |
||
550 | if (i >= BR_ASIZE(tokenTypes)) { |
||
551 | return 0; |
||
552 | } |
||
553 | if (l <= tokenTypes[i].length) { |
||
554 | return 0; |
||
555 | } |
||
556 | if (BrStrNCmp(identifier + (l - tokenTypes[i].length), tokenTypes[i].identifier, tokenTypes[i].length) != 0) { |
||
557 | return 0; |
||
558 | } |
||
559 | } |
||
560 | te = BrResAllocate(fw.res, sizeof(br_token_entry), BR_MEMORY_TOKEN); |
||
561 | te->identifier = BrResStrDup(te, identifier); |
||
562 | te->type = type; |
||
563 | te->base_length = l - tokenTypes[i].length; |
||
564 | te->token = fw.next_free_token; |
||
565 | fw.next_free_token++; |
||
566 | BrAddHead(&fw.tokens, &te->node); |
||
567 | return te->token; |
||
568 | } |
||
569 | |||
570 | // IDA: char* __cdecl BrTokenIdentifier(br_token t) |
||
571 | char* BrTokenIdentifier(br_token t) { |
||
572 | br_token_entry* te; |
||
573 | LOG_TRACE("(%d)", t); |
||
574 | |||
575 | te = (br_token_entry*)fw.tokens.head; |
||
576 | while (te->node.next != NULL) { |
||
577 | if (t == te->token) { |
||
578 | return te->identifier; |
||
579 | } |
||
580 | te = (br_token_entry*)te->node.next; |
||
581 | } |
||
582 | return NULL; |
||
583 | |||
584 | } |
||
585 | |||
586 | // IDA: br_token __cdecl BrTokenType(br_token t) |
||
587 | br_token BrTokenType(br_token t) { |
||
588 | br_token_entry* te; |
||
589 | LOG_TRACE("(%d)", t); |
||
590 | |||
591 | te = (br_token_entry*)fw.tokens.head; |
||
592 | while (te->node.next != NULL) { |
||
593 | if (t == te->token) { |
||
594 | return te->type; |
||
595 | } |
||
596 | te = (br_token_entry*)te->node.next; |
||
597 | } |
||
598 | return 0; |
||
599 | } |
||
600 | |||
601 | // IDA: br_int_32 __cdecl BrTokenCount(char *pattern) |
||
602 | br_int_32 BrTokenCount(char* pattern) { |
||
603 | br_token_entry* te; |
||
604 | int n; |
||
605 | LOG_TRACE("(\"%s\")", pattern); |
||
606 | |||
607 | n = 0; |
||
608 | if (pattern == NULL) { |
||
609 | te = (br_token_entry*)fw.tokens.head; |
||
610 | while (te->node.next != NULL) { |
||
611 | n++; |
||
612 | te = (br_token_entry*)te->node.next; |
||
613 | } |
||
614 | } else { |
||
615 | te = (br_token_entry*)fw.tokens.head; |
||
616 | while (te->node.next != NULL) { |
||
617 | if (BrNamePatternMatch(pattern, te->identifier) != 0) { |
||
618 | n++; |
||
619 | } |
||
620 | te = (br_token_entry*)te->node.next; |
||
621 | } |
||
622 | } |
||
623 | return n; |
||
624 | } |
||
625 | |||
626 | // IDA: br_token __cdecl BrTokenFind(char *pattern) |
||
627 | br_token BrTokenFind(char* pattern) { |
||
628 | br_token_entry* te; |
||
629 | LOG_TRACE("(\"%s\")", pattern); |
||
630 | |||
631 | te = (br_token_entry*)fw.tokens.head; |
||
632 | while (te->node.next != NULL) { |
||
633 | if (BrNamePatternMatch(pattern, te->identifier) != 0) { |
||
634 | return te->token; |
||
635 | } |
||
636 | te = (br_token_entry*)te->node.next; |
||
637 | } |
||
638 | return 0; |
||
639 | } |
||
640 | |||
641 | // IDA: br_int_32 __cdecl BrTokenFindMany(char *pattern, br_token *tokens, br_int_32 max_tokens) |
||
642 | br_int_32 BrTokenFindMany(char* pattern, br_token* tokens, br_int_32 max_tokens) { |
||
643 | br_token_entry* te; |
||
644 | int n; |
||
645 | LOG_TRACE("(\"%s\", %p, %d)", pattern, tokens, max_tokens); |
||
646 | |||
647 | n = 0; |
||
648 | te = (br_token_entry*)fw.tokens.head; |
||
649 | while (te->node.next != NULL) { |
||
650 | if (BrNamePatternMatch(pattern, te->identifier) != 0) { |
||
651 | *tokens = te->token; |
||
652 | tokens++; |
||
653 | n++; |
||
654 | } |
||
655 | te = (br_token_entry*)te->node.next; |
||
656 | } |
||
657 | return n; |
||
658 | } |
||
659 | |||
660 | // IDA: br_token __usercall BrTokenFindType@<EAX>(br_token *ptype@<EAX>, char *base@<EDX>, br_token *types@<EBX>, br_int_32 ntypes@<ECX>) |
||
661 | br_token BrTokenFindType(br_token* ptype, char* base, br_token* types, br_int_32 ntypes) { |
||
662 | br_token_entry* te; |
||
663 | int l; |
||
664 | int t; |
||
665 | LOG_TRACE("(%p, \"%s\", %p, %d)", ptype, base, types, ntypes); |
||
666 | |||
667 | l = BrStrLen(base); |
||
668 | te = (br_token_entry*)fw.tokens.head; |
||
669 | while (te->node.next != NULL) { |
||
670 | if ((l == te->base_length) && BrStrNICmp(te->identifier, base, te->base_length) == 0) { |
||
671 | for (t = 0; t < ntypes; t++) { |
||
672 | if (te->type == types[t]) { |
||
673 | if (ptype != NULL) { |
||
674 | *ptype = te->type; |
||
675 | } |
||
676 | return te->token; |
||
677 | } |
||
678 | } |
||
679 | } |
||
680 | te = (br_token_entry*)te->node.next; |
||
681 | } |
||
682 | return 0; |
||
683 | } |