Mercurial > mm7
changeset 1188:9541e9d1e5fa
m
author | Ritor1 |
---|---|
date | Fri, 07 Jun 2013 11:31:11 +0600 |
parents | 02e2a5c1ebc0 |
children | cb365b58a641 |
files | stru9.cpp stru9.h |
diffstat | 2 files changed, 23 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/stru9.cpp Fri Jun 07 11:30:29 2013 +0600 +++ b/stru9.cpp Fri Jun 07 11:31:11 2013 +0600 @@ -6,7 +6,7 @@ //----- (00498377) -------------------------------------------------------- -bool stru9::_498377(struct RenderVertexSoft *pPortalBounding, unsigned int uNumVertices, struct IndoorCameraD3D_Vec4 *a3, struct RenderVertexSoft *pVertices, unsigned int *pOutNumVertices) +bool stru9::_498377(struct RenderVertexSoft *pPortalBounding, unsigned int uNumVertices, struct IndoorCameraD3D_Vec4 *pVertices, struct RenderVertexSoft *pVertices2, unsigned int *pOutNumVertices) { int result; // eax@7 //unsigned int *v7; // ebx@7 @@ -19,7 +19,7 @@ //VertexBuffer *v14; // edx@26 //char *v15; // eax@26 //unsigned int i; // ecx@26 - int v17; // [sp+0h] [bp-28h]@9 + //int v17; // [sp+0h] [bp-28h]@9 //char *v18; // [sp+10h] [bp-18h]@8 RenderVertexSoft *v19; // [sp+14h] [bp-14h]@0 //RenderVertexSoft *v20; // [sp+18h] [bp-10h]@0 @@ -59,7 +59,7 @@ //VertexBuffer::VertexBuffer(&static_AE33A0); }*/ - result = 0; + result = false; //v7 = pOutNumVertices; v21 = 0; if ( (signed int)uNumVertices <= 0 ) @@ -71,11 +71,11 @@ //v8 = (char *)&a3->y; //v18 = (char *)&a3->y; //do - for (v17 = 0; v17 < uNumVertices; v17++ ) + for (uint j = 0; j < uNumVertices; j++ ) { //v17 = result + 1; - result = v17; - v9 = &pPortalBounding[(result + 1) % (signed int)uNumVertices]; + result = j; + v9 = &pPortalBounding[(j + 1) % (signed int)uNumVertices]; if ( pPortalBounding->vWorldPosition.x != v9->vWorldPosition.x || pPortalBounding->vWorldPosition.y != v9->vWorldPosition.y || pPortalBounding->vWorldPosition.z != v9->vWorldPosition.z ) @@ -86,9 +86,9 @@ //result = 0; static_AE33A0.uNumVertices = 0; //a3a = 0; - static_AE3FA4.x = a3->x; - static_AE3FA4.y = a3->y; - static_AE3FA4.z = a3->z; + static_AE3FA4.x = pVertices->x; + static_AE3FA4.y = pVertices->y; + static_AE3FA4.z = pVertices->z; if ( (signed int)*pOutNumVertices <= 0 ) { *pOutNumVertices = 0; @@ -100,17 +100,17 @@ //v12 = &pVertices[result]; if ( result ) { - if ( _4989E1(&pVertices[i], &pVertices[i], pPortalBounding, &static_AE3FA4) - && _498774(&pVertices[i], &pVertices[i], pPortalBounding, &static_AE3FA4, &static_AE3FB4) ) + if ( _4989E1(&pVertices2[i], &pVertices2[i], pPortalBounding, &static_AE3FA4) + && _498774(&pVertices2[i], &pVertices2[i], pPortalBounding, &static_AE3FA4, &static_AE3FB4) ) AddVertex(&static_AE33A0, &static_AE3FB4); } else { - v19 = &pVertices[i]; + v19 = &pVertices2[i]; } //v20 = v12; - if ( AreVectorsCollinear(&pVertices[i], pPortalBounding, &static_AE3FA4) )// - AddVertex(&static_AE33A0, &pVertices[i]); + if ( AreVectorsCollinear(&pVertices2[i], pPortalBounding, &static_AE3FA4) )// + AddVertex(&static_AE33A0, &pVertices2[i]); //pOutNumVertices = pOutNumVertices; //a3a++; } @@ -120,17 +120,17 @@ *pOutNumVertices = 0; return true; } - if ( _4989E1(&pVertices[result], v19, pPortalBounding, &static_AE3FA4) - && _498774(&pVertices[result], v19, pPortalBounding, &static_AE3FA4, &static_AE3FB4) ) + if ( _4989E1(&pVertices2[result], v19, pPortalBounding, &static_AE3FA4) + && _498774(&pVertices2[result], v19, pPortalBounding, &static_AE3FA4, &static_AE3FB4) ) AddVertex(&static_AE33A0, &static_AE3FB4); for (uint i = 0; i < static_AE33A0.uNumVertices; ++i) { - pVertices[i].vWorldPosition.x = static_AE33A0.pVertices[i].vWorldPosition.x; - pVertices[i].vWorldPosition.y = static_AE33A0.pVertices[i].vWorldPosition.y; - pVertices[i].vWorldPosition.z = static_AE33A0.pVertices[i].vWorldPosition.z; - pVertices[i].u = static_AE33A0.pVertices[i].u; - pVertices[i].v = static_AE33A0.pVertices[i].v; + pVertices2[i].vWorldPosition.x = static_AE33A0.pVertices[i].vWorldPosition.x; + pVertices2[i].vWorldPosition.y = static_AE33A0.pVertices[i].vWorldPosition.y; + pVertices2[i].vWorldPosition.z = static_AE33A0.pVertices[i].vWorldPosition.z; + pVertices2[i].u = static_AE33A0.pVertices[i].u; + pVertices2[i].v = static_AE33A0.pVertices[i].v; } //v13 = static_AE33A0.uNumVertices; @@ -163,7 +163,7 @@ } //result = v17; ++pPortalBounding; - a3++; + pVertices++; //v18 = (char *)&a3->y; } //while ( v17 < (signed int)uNumVertices );
--- a/stru9.h Fri Jun 07 11:30:29 2013 +0600 +++ b/stru9.h Fri Jun 07 11:31:11 2013 +0600 @@ -51,7 +51,7 @@ {} bool _4980B9(struct RenderVertexSoft *a1, unsigned int uNumVertices, float a3, float a4, float a5, struct RenderVertexSoft *pOutVertices, unsigned int *pOutNumVertices); - bool _498377(struct RenderVertexSoft *pPortalBounding, unsigned int uNumVertices, struct IndoorCameraD3D_Vec4 *a3, struct RenderVertexSoft *pVertices, unsigned int *pOutNumVertices); + bool _498377(struct RenderVertexSoft *pPortalBounding, unsigned int uNumVertices, struct IndoorCameraD3D_Vec4 *pVertices, struct RenderVertexSoft *pVertices2, unsigned int *pOutNumVertices); bool CalcPortalShape(struct RenderVertexSoft *a1, signed int a2, struct RenderVertexSoft *a3, unsigned int *pOutNumVertices, struct Vec3_float_ *a5, float a6, char *a7, int unused); void AddVertex(struct VertexBuffer *pVertexBuffer, struct RenderVertexSoft *pVertex); bool _498774(struct RenderVertexSoft *a1, struct RenderVertexSoft *a2, struct RenderVertexSoft *a3, struct stru312 *a4, struct RenderVertexSoft *a5);