Mercurial > mm7
annotate stru9.cpp @ 2471:b61ebbb46ace
VS 2010 filters
author | Ritor1 |
---|---|
date | Mon, 18 Aug 2014 22:24:00 +0600 |
parents | f4af3b203f65 |
children |
rev | line source |
---|---|
2415 | 1 #define _CRTDBG_MAP_ALLOC |
2 #include <stdlib.h> | |
3 #include <crtdbg.h> | |
4 | |
2253
aff7a7b072b7
adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents:
1980
diff
changeset
|
5 #define _CRT_SECURE_NO_WARNINGS |
0 | 6 #include "stru9.h" |
7 #include "IndoorCameraD3D.h" | |
8 | |
9 #include "mm7_data.h" | |
10 | |
11 | |
12 | |
13 //----- (00498377) -------------------------------------------------------- | |
1188 | 14 bool stru9::_498377(struct RenderVertexSoft *pPortalBounding, unsigned int uNumVertices, struct IndoorCameraD3D_Vec4 *pVertices, struct RenderVertexSoft *pVertices2, unsigned int *pOutNumVertices) |
0 | 15 { |
687 | 16 int result; // eax@7 |
17 //unsigned int *v7; // ebx@7 | |
18 //char *v8; // esi@8 | |
0 | 19 RenderVertexSoft *v9; // ecx@9 |
687 | 20 //double v10; // st7@12 |
21 //double v11; // st6@12 | |
22 //RenderVertexSoft *v12; // esi@13 | |
23 //int v13; // ecx@25 | |
691 | 24 //VertexBuffer *v14; // edx@26 |
25 //char *v15; // eax@26 | |
26 //unsigned int i; // ecx@26 | |
1188 | 27 //int v17; // [sp+0h] [bp-28h]@9 |
687 | 28 //char *v18; // [sp+10h] [bp-18h]@8 |
0 | 29 RenderVertexSoft *v19; // [sp+14h] [bp-14h]@0 |
687 | 30 //RenderVertexSoft *v20; // [sp+18h] [bp-10h]@0 |
0 | 31 signed int v21; // [sp+1Ch] [bp-Ch]@7 |
687 | 32 //RenderVertexSoft *a2; // [sp+20h] [bp-8h]@8 |
33 //stru9 *thisa; // [sp+24h] [bp-4h]@1 | |
2334 | 34 // signed int a3a; // [sp+38h] [bp+10h]@12 |
691 | 35 //int a3b; // [sp+38h] [bp+10h]@25 |
0 | 36 |
687 | 37 //__debugbreak(); |
38 //thisa = this; | |
1195 | 39 return true; |
0 | 40 |
41 static RenderVertexSoft static_AE3FB4; | |
691 | 42 /*static bool __init_flag1 = false; |
0 | 43 if (!__init_flag1) |
44 { | |
45 __init_flag1 = true; | |
46 | |
47 static_AE3FB4.flt_2C = 0.0; | |
691 | 48 }*/ |
0 | 49 |
50 static stru312 static_AE3FA4; // idb | |
691 | 51 /*static bool __init_flag2 = false; |
0 | 52 if (!__init_flag2) |
53 { | |
54 __init_flag2 = true; | |
55 | |
56 //stru312::stru312(&static_AE3FA4); | |
691 | 57 }*/ |
0 | 58 |
59 static VertexBuffer static_AE33A0; // idb | |
691 | 60 /*static bool __init_flag3 = false; |
0 | 61 if (!__init_flag3) |
62 { | |
63 __init_flag3 = true; | |
64 | |
65 //VertexBuffer::VertexBuffer(&static_AE33A0); | |
691 | 66 }*/ |
0 | 67 |
1188 | 68 result = false; |
687 | 69 //v7 = pOutNumVertices; |
0 | 70 v21 = 0; |
71 if ( (signed int)uNumVertices <= 0 ) | |
72 { | |
687 | 73 *pOutNumVertices = 0; |
74 return true; | |
75 } | |
76 //a2 = a1; | |
77 //v8 = (char *)&a3->y; | |
78 //v18 = (char *)&a3->y; | |
79 //do | |
1188 | 80 for (uint j = 0; j < uNumVertices; j++ ) |
687 | 81 { |
82 //v17 = result + 1; | |
1188 | 83 result = j; |
84 v9 = &pPortalBounding[(j + 1) % (signed int)uNumVertices]; | |
794 | 85 if ( pPortalBounding->vWorldPosition.x != v9->vWorldPosition.x |
86 || pPortalBounding->vWorldPosition.y != v9->vWorldPosition.y | |
87 || pPortalBounding->vWorldPosition.z != v9->vWorldPosition.z ) | |
0 | 88 { |
687 | 89 //v10 = a3->z; |
90 //v11 = a3->y; | |
0 | 91 ++v21; |
687 | 92 //result = 0; |
0 | 93 static_AE33A0.uNumVertices = 0; |
687 | 94 //a3a = 0; |
1188 | 95 static_AE3FA4.x = pVertices->x; |
96 static_AE3FA4.y = pVertices->y; | |
97 static_AE3FA4.z = pVertices->z; | |
687 | 98 if ( (signed int)*pOutNumVertices <= 0 ) |
0 | 99 { |
687 | 100 *pOutNumVertices = 0; |
101 return true; | |
102 } | |
103 //do | |
104 for ( int i = 0; i < (signed int)*pOutNumVertices; i++ ) | |
105 { | |
106 //v12 = &pVertices[result]; | |
0 | 107 if ( result ) |
108 { | |
1188 | 109 if ( _4989E1(&pVertices2[i], &pVertices2[i], pPortalBounding, &static_AE3FA4) |
110 && _498774(&pVertices2[i], &pVertices2[i], pPortalBounding, &static_AE3FA4, &static_AE3FB4) ) | |
0 | 111 AddVertex(&static_AE33A0, &static_AE3FB4); |
112 } | |
113 else | |
114 { | |
1188 | 115 v19 = &pVertices2[i]; |
0 | 116 } |
687 | 117 //v20 = v12; |
1287 | 118 if ( AreVectorsCollinear(&pVertices2[i], pPortalBounding, &static_AE3FA4) ) |
1188 | 119 AddVertex(&static_AE33A0, &pVertices2[i]); |
687 | 120 //pOutNumVertices = pOutNumVertices; |
121 //a3a++; | |
0 | 122 } |
687 | 123 //while ( a3a < (signed int)*pOutNumVertices ); |
0 | 124 if ( !static_AE33A0.uNumVertices ) |
687 | 125 { |
126 *pOutNumVertices = 0; | |
127 return true; | |
128 } | |
1188 | 129 if ( _4989E1(&pVertices2[result], v19, pPortalBounding, &static_AE3FA4) |
130 && _498774(&pVertices2[result], v19, pPortalBounding, &static_AE3FA4, &static_AE3FB4) ) | |
0 | 131 AddVertex(&static_AE33A0, &static_AE3FB4); |
691 | 132 |
133 for (uint i = 0; i < static_AE33A0.uNumVertices; ++i) | |
134 { | |
1188 | 135 pVertices2[i].vWorldPosition.x = static_AE33A0.pVertices[i].vWorldPosition.x; |
136 pVertices2[i].vWorldPosition.y = static_AE33A0.pVertices[i].vWorldPosition.y; | |
137 pVertices2[i].vWorldPosition.z = static_AE33A0.pVertices[i].vWorldPosition.z; | |
138 pVertices2[i].u = static_AE33A0.pVertices[i].u; | |
139 pVertices2[i].v = static_AE33A0.pVertices[i].v; | |
691 | 140 } |
141 | |
687 | 142 //v13 = static_AE33A0.uNumVertices; |
691 | 143 /*a3b = 0; |
0 | 144 if ( static_AE33A0.uNumVertices > 0 ) |
145 { | |
146 v14 = &static_AE33A0; | |
147 v15 = (char *)&pVertices->vWorldPosition.y; | |
148 for ( i = (char *)&static_AE33A0.pVertices[0].vWorldPosition.y - (char *)pVertices; | |
149 ; | |
150 i = (char *)&static_AE33A0.pVertices[0].vWorldPosition.y - (char *)pVertices ) | |
151 { | |
152 ++a3b; | |
687 | 153 pVertices->vWorldPosition.x = v14->pVertices[0].vWorldPosition.x; |
0 | 154 v14 = (VertexBuffer *)((char *)v14 + 48); |
687 | 155 pVertices->vWorldPosition.y = *(float *)&v15[(char *)&static_AE33A0 - (char *)pVertices]; |
156 pVertices->vWorldPosition.z = *(float *)&v15[i]; | |
157 pVertices->u = *(float *)&v15[(char *)&static_AE33A0.pVertices[0]._rhw - (char *)pVertices]; | |
158 pVertices->v = *(float *)&v15[(char *)&static_AE33A0.pVertices[0].u - (char *)pVertices]; | |
159 //static_AE33A0.uNumVertices = static_AE33A0.uNumVertices; | |
0 | 160 v15 += 48; |
161 if ( a3b >= static_AE33A0.uNumVertices ) | |
162 break; | |
163 } | |
691 | 164 }*/ |
165 | |
687 | 166 //v7 = pOutNumVertices; |
167 //a3->y = a3->y; | |
168 *pOutNumVertices = static_AE33A0.uNumVertices; | |
0 | 169 } |
687 | 170 //result = v17; |
794 | 171 ++pPortalBounding; |
1188 | 172 pVertices++; |
687 | 173 //v18 = (char *)&a3->y; |
0 | 174 } |
687 | 175 //while ( v17 < (signed int)uNumVertices ); |
0 | 176 if ( v21 < 3 ) |
687 | 177 *pOutNumVertices = 0; |
178 return true; | |
0 | 179 } |
687 | 180 |
0 | 181 |
182 //----- (004985FB) -------------------------------------------------------- | |
1301 | 183 bool stru9::CalcPortalShape(struct RenderVertexSoft *a1, signed int a2, struct RenderVertexSoft *pVertices, unsigned int *pOutNumVertices, struct Vec3_float_ *a5, float a6, char *a7, int unused) |
0 | 184 { |
1301 | 185 //RenderVertexSoft *v9; // ecx@1 |
186 //Vec3_float_ *v10; // esi@1 | |
0 | 187 //char *v11; // ebx@1 |
1301 | 188 //RenderVertexSoft *pVertices; // edi@1 |
189 double pLinelength1; // st7@1 | |
0 | 190 //bool result; // eax@4 |
191 signed int v15; // edx@9 | |
1301 | 192 RenderVertexSoft *pLineEnd; // ecx@9 |
193 double pLinelength2; // st7@9 | |
194 double t; // st6@12 | |
0 | 195 signed int v19; // [sp+Ch] [bp-Ch]@7 |
1301 | 196 //float v20; // [sp+10h] [bp-8h]@1 |
0 | 197 bool v21; // [sp+14h] [bp-4h]@2 |
198 | |
1301 | 199 //v9 = a1; |
200 //v10 = a5; | |
0 | 201 //v11 = (char *)&a1->vWorldPosition.z; |
1980 | 202 RenderVertexSoft* pLineStart = &a1[0]; |
1301 | 203 //pVertices = a3; |
204 pLinelength1 = a5->x * a1[0].vWorldPosition.x + a1[0].vWorldPosition.y * a5->y + a1[0].vWorldPosition.z * a5->z; | |
205 //v20 = v13; | |
206 v21 = pLinelength1 >= a6; | |
0 | 207 |
208 *pOutNumVertices = 0; | |
209 if ( a2 <= 0 ) | |
210 return false; | |
211 v19 = 1; | |
1301 | 212 |
0 | 213 while ( 1 ) |
214 { | |
215 if ( v21 ) | |
216 { | |
1301 | 217 //++pVertices; |
218 memcpy(pVertices, pLineStart, sizeof(RenderVertexSoft)); | |
0 | 219 ++*pOutNumVertices; |
1301 | 220 //v10 = a5; |
221 pVertices++; | |
222 //v9 = a1; | |
0 | 223 } |
224 v15 = 0; | |
1301 | 225 pLineEnd = &a1[v19 % a2]; |
226 pLinelength2 = a5->x * pLineEnd->vWorldPosition.x + pLineEnd->vWorldPosition.y * a5->y + pLineEnd->vWorldPosition.z * a5->z; | |
227 if ( pLinelength2 >= a6 ) | |
0 | 228 v15 = 1; |
1301 | 229 |
0 | 230 if ( v21 != v15 ) |
231 { | |
1301 | 232 t = (a6 - pLinelength1) / (pLinelength2 - pLinelength1); |
233 pVertices->vWorldPosition.x = pLineStart->vWorldPosition.x + (pLineEnd->vWorldPosition.x - pLineStart->vWorldPosition.x) * t; | |
234 pVertices->vWorldPosition.y = pLineStart->vWorldPosition.y + (pLineEnd->vWorldPosition.y - pLineStart->vWorldPosition.y) * t; | |
235 pVertices->vWorldPosition.z = pLineStart->vWorldPosition.z + (pLineEnd->vWorldPosition.z - pLineStart->vWorldPosition.z) * t; | |
236 pVertices->u = pLineStart->u + (pLineEnd->u - pLineStart->u) * t; | |
237 pVertices->v = pLineStart->v + (pLineEnd->v - pLineStart->v) * t; | |
238 ++pVertices; | |
239 //a3 = pVertices; | |
0 | 240 ++*pOutNumVertices; |
241 *a7 = 1; | |
242 } | |
243 | |
1301 | 244 pLineStart++; |
0 | 245 v21 = v15; |
1301 | 246 pLinelength1 = pLinelength2; |
0 | 247 if ( v19 >= a2 ) |
248 break; | |
1301 | 249 //v9 = a1; |
0 | 250 v19++; |
251 } | |
252 | |
253 return *pOutNumVertices >= 3; | |
254 } | |
255 | |
256 //----- (00498737) -------------------------------------------------------- | |
257 void stru9::AddVertex(struct VertexBuffer *pVertexBuffer, struct RenderVertexSoft *pVertex) | |
258 { | |
436 | 259 // __debugbreak(); |
0 | 260 RenderVertexSoft *v3; // eax@1 |
261 | |
262 v3 = &pVertexBuffer->pVertices[pVertexBuffer->uNumVertices]; | |
263 v3->vWorldPosition.x = pVertex->vWorldPosition.x; | |
264 v3->vWorldPosition.y = pVertex->vWorldPosition.y; | |
265 v3->vWorldPosition.z = pVertex->vWorldPosition.z; | |
266 v3->u = pVertex->u; | |
267 v3->v = pVertex->v; | |
268 ++pVertexBuffer->uNumVertices; | |
269 } | |
270 | |
271 //----- (00498774) -------------------------------------------------------- | |
272 bool stru9::_498774(struct RenderVertexSoft *a1, struct RenderVertexSoft *a2, struct RenderVertexSoft *a3, struct stru312 *a4, struct RenderVertexSoft *a5) | |
273 { | |
274 RenderVertexSoft *v6; // ecx@5 | |
1924
8cd321994943
MSVS 2012 project file & some compilation warning fixes
Nomad
parents:
1301
diff
changeset
|
275 int result; // eax@5 |
0 | 276 double v8; // st7@5 |
277 __int16 v9; // fps@5 | |
278 double v10; // st7@6 | |
279 double v11; // st6@8 | |
280 double v12; // st6@18 | |
281 char v13; // c0@24 | |
282 char v14; // c2@24 | |
283 char v15; // c3@24 | |
284 float a1a; // [sp+10h] [bp+8h]@5 | |
285 | |
286 __debugbreak(); | |
287 | |
288 static stru312 static_AE3388; | |
289 static stru312 static_AE3378; | |
290 | |
291 v6 = a1; | |
292 static_AE3378.x = a1->vWorldPosition.x - a3->vWorldPosition.x; | |
293 static_AE3378.y = a1->vWorldPosition.y - a3->vWorldPosition.y; | |
294 HIWORD(result) = HIWORD(a4); | |
295 static_AE3378.z = a1->vWorldPosition.z - a3->vWorldPosition.z; | |
296 static_AE3388.x = a2->vWorldPosition.x - a1->vWorldPosition.x; | |
297 static_AE3388.y = a2->vWorldPosition.y - a1->vWorldPosition.y; | |
298 static_AE3388.z = a2->vWorldPosition.z - a1->vWorldPosition.z; | |
299 a1a = static_AE3388.x * a4->x + static_AE3388.z * a4->z + static_AE3388.y * a4->y; | |
300 v8 = static_AE3378.x * a4->x + static_AE3378.z * a4->z + static_AE3378.y * a4->y; | |
301 //UNDEF(v9); | |
302 if ( a1a != 0.0 ) | |
303 { | |
304 v10 = -(v8 / a1a); | |
305 if ( a1a <= 0.0 ) | |
306 { | |
307 if ( v10 <= 0.0 ) | |
308 v12 = 0.0; | |
309 else | |
310 v12 = v10; | |
311 if ( v12 <= 1.0 ) | |
312 { | |
313 if ( v10 <= 0.0 ) | |
314 v10 = (float)0.0; | |
315 } | |
316 else | |
317 v10 = 1.0; | |
318 } | |
319 else | |
320 { | |
321 if ( v10 >= 1.0 ) | |
322 v11 = 1.0; | |
323 else | |
324 v11 = v10; | |
325 if ( v11 >= 0.0 ) | |
326 { | |
327 if ( v10 >= 1.0 ) | |
328 v10 = (float)1.0; | |
329 } | |
330 else | |
331 v10 = 0.0; | |
332 } | |
333 result = (bool)a5; | |
334 a5->vWorldPosition.x = (a2->vWorldPosition.x - v6->vWorldPosition.x) * v10 + v6->vWorldPosition.x; | |
335 a5->vWorldPosition.y = (a2->vWorldPosition.y - v6->vWorldPosition.y) * v10 + v6->vWorldPosition.y; | |
336 a5->vWorldPosition.z = (a2->vWorldPosition.z - v6->vWorldPosition.z) * v10 + v6->vWorldPosition.z; | |
337 a5->u = (a2->u - v6->u) * v10 + v6->u; | |
338 a5->v = (a2->v - v6->v) * v10 + v6->v; | |
2335 | 339 return 1; |
0 | 340 } |
341 v13 = v8 < 0.0; | |
342 v14 = 0; | |
343 v15 = v8 == 0.0; | |
2335 | 344 // BYTE1(result) = HIBYTE(v9); |
0 | 345 if ( v8 < 0.0 ) |
2335 | 346 return 1; |
347 return 0; | |
0 | 348 } |
349 // AE3398: using guessed type char static_init_flag__AE3388_bit1__AE3378_bit2; | |
350 | |
351 //----- (0049895A) -------------------------------------------------------- | |
352 bool stru9::AreVectorsCollinear(struct RenderVertexSoft *a1, struct RenderVertexSoft *a2, struct stru312 *a3) | |
353 { | |
354 static stru312 static_F942A0; | |
355 | |
356 static_F942A0.x = a1->vWorldPosition.x - a2->vWorldPosition.x; | |
357 static_F942A0.y = a1->vWorldPosition.y - a2->vWorldPosition.y; | |
358 static_F942A0.z = a1->vWorldPosition.z - a2->vWorldPosition.z; | |
359 | |
360 static float flt_F942B4 = static_F942A0.z * a3->z + static_F942A0.y * a3->y + static_F942A0.x * a3->x; | |
361 if (flt_F942B4 >= 0) | |
362 return true; | |
363 return false; | |
364 } | |
365 | |
366 | |
367 //----- (004989E1) -------------------------------------------------------- | |
368 bool stru9::_4989E1(struct RenderVertexSoft *a1, struct RenderVertexSoft *a2, struct RenderVertexSoft *a3, struct stru312 *a4) | |
369 { | |
370 bool r1; | |
371 bool r2; | |
372 | |
373 r1 = AreVectorsCollinear(a1, a3, a4); | |
374 r2 = AreVectorsCollinear(a2, a3, a4); | |
375 return !r1 && r2 == 1 || | |
376 r1 == 1 && !r2; | |
377 } | |
378 | |
379 //----- (004980B9) -------------------------------------------------------- | |
380 bool stru9::_4980B9(RenderVertexSoft *a1, unsigned int uNumVertices, float a3, float a4, float a5, RenderVertexSoft *pOutVertices, unsigned int *pOutNumVertices) | |
381 { | |
382 RenderVertexSoft *v12; // ecx@9 | |
383 double v13; // st7@12 | |
384 double v14; // st6@12 | |
385 double v15; // st5@12 | |
386 signed int v25; // [sp+18h] [bp-Ch]@7 | |
387 | |
388 static RenderVertexSoft stru_AE4BFC; | |
389 static stru312 static_sub_4980B9_stru_AE4BEC; // idb | |
390 static VertexBuffer static_sub_4980B9_stru_AE3FE8; // idb | |
391 | |
392 v25 = 0; | |
393 if (uNumVertices <= 0) | |
394 { | |
395 *pOutNumVertices = 0; | |
396 return true; | |
397 } | |
398 | |
399 for (uint i = 0; i < uNumVertices; ++i) | |
400 { | |
401 v12 = &a1[(i + 1) % uNumVertices]; | |
402 if (a1[i].vWorldPosition.x != v12->vWorldPosition.x || | |
403 a1[i].vWorldPosition.y != v12->vWorldPosition.y || | |
404 a1[i].vWorldPosition.z!= v12->vWorldPosition.z) | |
405 { | |
406 v13 = v12->vWorldPosition.x - a1[i].vWorldPosition.x; | |
407 v14 = v12->vWorldPosition.y - a1[i].vWorldPosition.y; | |
408 v15 = v12->vWorldPosition.z - a1[i].vWorldPosition.z; | |
409 ++v25; | |
410 | |
411 static_sub_4980B9_stru_AE3FE8.uNumVertices = 0; | |
412 static_sub_4980B9_stru_AE4BEC.x = a4 * v15 - v14 * a5; | |
413 static_sub_4980B9_stru_AE4BEC.y = v13 * a5 - v15 * a3; | |
414 static_sub_4980B9_stru_AE4BEC.z = v14 * a3 - v13 * a4; | |
415 if (*pOutNumVertices == 0) | |
416 return true; | |
417 | |
418 for (uint j = 0; j < *pOutNumVertices; ++j) | |
419 { | |
420 if (j) | |
421 { | |
422 if (_4989E1(&pOutVertices[j - 1], &pOutVertices[j], &a1[i], &static_sub_4980B9_stru_AE4BEC) && | |
423 _498774(&pOutVertices[j - 1], &pOutVertices[j], &a1[i], &static_sub_4980B9_stru_AE4BEC, &stru_AE4BFC)) | |
424 AddVertex(&static_sub_4980B9_stru_AE3FE8, &stru_AE4BFC); | |
425 } | |
426 | |
427 if (AreVectorsCollinear(&pOutVertices[j], &a1[i], &static_sub_4980B9_stru_AE4BEC)) | |
428 AddVertex(&static_sub_4980B9_stru_AE3FE8, &pOutVertices[j]); | |
429 } | |
430 | |
431 if (!static_sub_4980B9_stru_AE3FE8.uNumVertices) | |
432 { | |
433 *pOutNumVertices = 0; | |
434 return true; | |
435 } | |
436 if (_4989E1(&pOutVertices[*pOutNumVertices - 1], &pOutVertices[0], &a1[i], &static_sub_4980B9_stru_AE4BEC) && | |
437 _498774(&pOutVertices[*pOutNumVertices - 1], &pOutVertices[0], &a1[i], &static_sub_4980B9_stru_AE4BEC, &stru_AE4BFC) ) | |
438 AddVertex(&static_sub_4980B9_stru_AE3FE8, &stru_AE4BFC); | |
439 | |
440 for (uint j = 0; j < static_sub_4980B9_stru_AE3FE8.uNumVertices; ++j) | |
441 { | |
442 pOutVertices[j].vWorldPosition.y = static_sub_4980B9_stru_AE3FE8.pVertices[j].vWorldPosition.x; | |
443 pOutVertices[j].vWorldPosition.y = static_sub_4980B9_stru_AE3FE8.pVertices[j].vWorldPosition.y; | |
444 pOutVertices[j].vWorldPosition.z = static_sub_4980B9_stru_AE3FE8.pVertices[j].vWorldPosition.z; | |
445 pOutVertices[j].u = static_sub_4980B9_stru_AE3FE8.pVertices[j].u; | |
446 pOutVertices[j].v = static_sub_4980B9_stru_AE3FE8.pVertices[j].v; | |
447 } | |
448 *pOutNumVertices = static_sub_4980B9_stru_AE3FE8.uNumVertices; | |
449 } | |
450 } | |
451 | |
452 if (v25 < 3) | |
453 *pOutNumVertices = 0; | |
454 | |
455 return true; | |
456 } | |
457 // AE4C2C: using guessed type char static_sub_4980B9_byte_AE4C2C_init_flag; |