Mercurial > mm7
comparison Vis.cpp @ 36:415e1f2d5936
Слияние
author | Ritor1 |
---|---|
date | Sun, 20 Jan 2013 20:04:18 +0600 |
parents | bf67f3164041 8aa7e4a303c9 |
children | ca142e247b73 5a08b193507f |
comparison
equal
deleted
inserted
replaced
35:aac67e0d2c10 | 36:415e1f2d5936 |
---|---|
1343 bool Vis::SortVerticesByY(RenderVertexD3D3 *a2, unsigned int uStart, unsigned int uEnd) | 1343 bool Vis::SortVerticesByY(RenderVertexD3D3 *a2, unsigned int uStart, unsigned int uEnd) |
1344 { | 1344 { |
1345 bool result; // eax@1 | 1345 bool result; // eax@1 |
1346 RenderVertexD3D3 *v5; // edx@2 | 1346 RenderVertexD3D3 *v5; // edx@2 |
1347 RenderVertexD3D3 *v6; // esi@2 | 1347 RenderVertexD3D3 *v6; // esi@2 |
1348 RenderVertexD3D3 v7; // qdi@2 | 1348 void *v7; // edi@2 |
1349 unsigned int v8; // ebx@2 | 1349 unsigned int v8; // ebx@2 |
1350 int v9; // ecx@3 | 1350 float *v9; // ecx@3 |
1351 int v10; // ecx@5 | 1351 float *v10; // ecx@5 |
1352 float v11; // eax@8 | 1352 RenderVertexD3D3 *v11; // eax@8 |
1353 RenderVertexD3D3 v12; // [sp+4h] [bp-4Ch]@8 | 1353 RenderVertexD3D3 v12; // [sp+4h] [bp-4Ch]@8 |
1354 char v13; // [sp+24h] [bp-2Ch]@2 | 1354 RenderVertexD3D3 v13; // [sp+24h] [bp-2Ch]@2 |
1355 float v14; // [sp+28h] [bp-28h]@4 | |
1356 Vis *thisa; // [sp+44h] [bp-Ch]@1 | 1355 Vis *thisa; // [sp+44h] [bp-Ch]@1 |
1357 RenderVertexD3D3 *v16; // [sp+48h] [bp-8h]@2 | 1356 RenderVertexD3D3 *v15; // [sp+48h] [bp-8h]@2 |
1358 unsigned int v17; // [sp+4Ch] [bp-4h]@2 | 1357 unsigned int v16; // [sp+4Ch] [bp-4h]@2 |
1359 | 1358 |
1360 result = uEnd; | 1359 result = uEnd; |
1361 thisa = this; | 1360 thisa = this; |
1362 if ( (signed int)uEnd > (signed int)uStart ) | 1361 if ( (signed int)uEnd > (signed int)uStart ) |
1363 { | 1362 { |
1364 v5 = a2; | 1363 v5 = a2; |
1365 v6 = &a2[uEnd]; | 1364 v6 = &a2[uEnd]; |
1366 LODWORD(v7.pos.x) = (int)&v13; | 1365 v7 = &v13; |
1367 v16 = &a2[uEnd]; | 1366 v15 = &a2[uEnd]; |
1368 v8 = uStart - 1; | 1367 v8 = uStart - 1; |
1369 v17 = uEnd; | 1368 v16 = uEnd; |
1370 while ( 1 ) | 1369 while ( 1 ) |
1371 { | 1370 { |
1372 memcpy(*(void **)&v7.pos.x, v6, 0x20u); | 1371 memcpy(v7, v6, 0x20u); |
1373 v9 = (int)&v5[v8].pos.y; | 1372 v9 = &v5[v8].pos.y; |
1374 do | 1373 do |
1375 { | 1374 { |
1376 v9 += 32; | 1375 v9+=8; |
1377 ++v8; | 1376 ++v8; |
1378 } | 1377 } |
1379 while ( *(float *)v9 < (double)v14 ); | 1378 while ( *v9 < (double)v13.pos.y ); |
1380 v10 = (int)&v5[v17].pos.y; | 1379 v10 = &v5[v16].pos.y; |
1381 do | 1380 do |
1382 { | 1381 { |
1383 v10 -= 32; | 1382 v10-=8; |
1384 --v17; | 1383 --v16; |
1385 } | 1384 } |
1386 while ( *(float *)v10 > (double)v14 ); | 1385 while ( *v10 > (double)v13.pos.y ); |
1387 if ( (signed int)v8 >= (signed int)v17 ) | 1386 if ( (signed int)v8 >= (signed int)v16 ) |
1388 break; | 1387 break; |
1389 LODWORD(v11) = (int)&v5[v17]; | 1388 v11 = &v5[v16]; |
1390 memcpy(&v12, &a2[v8], sizeof(v12)); | 1389 memcpy(&v12, &a2[v8], sizeof(v12)); |
1391 v5 = a2; | 1390 v5 = a2; |
1392 memcpy(&a2[v8], *(void **)&v11, sizeof(a2[v8])); | 1391 memcpy(&a2[v8], v11, sizeof(a2[v8])); |
1393 v6 = &v12; | 1392 v6 = &v12; |
1394 v7.pos.x = v11; | 1393 v7 = v11; |
1395 } | 1394 } |
1396 memcpy(&v12, &v5[v8], sizeof(v12)); | 1395 memcpy(&v12, &v5[v8], sizeof(v12)); |
1397 memcpy(&v5[v8], v16, sizeof(v5[v8])); | 1396 memcpy(&v5[v8], v15, sizeof(v5[v8])); |
1398 memcpy(v16, &v12, 0x20u); | 1397 memcpy(v15, &v12, 0x20u); |
1399 SortVerticesByY(v5, uStart, v8 - 1); | 1398 SortVerticesByX(v5, uStart, v8 - 1); |
1400 SortVerticesByY(a2, v8 + 1, uEnd); | 1399 SortVerticesByX(a2, v8 + 1, uEnd); |
1401 } | 1400 } |
1402 return true; | 1401 return true; |
1403 } | 1402 } |
1404 | 1403 |
1405 //----- (004C288E) -------------------------------------------------------- | 1404 //----- (004C288E) -------------------------------------------------------- |