Mercurial > mm7
diff Engine/Graphics/stru9.cpp @ 2562:b8a56afc6ba1
new var no_actors, lights_flag, debug_lights, StationaryLights and MobileLights
author | Ritor1 |
---|---|
date | Sun, 17 May 2015 22:42:13 +0600 |
parents | a902abdfc7f2 |
children |
line wrap: on
line diff
--- a/Engine/Graphics/stru9.cpp Thu May 14 19:29:28 2015 +0600 +++ b/Engine/Graphics/stru9.cpp Sun May 17 22:42:13 2015 +0600 @@ -241,15 +241,11 @@ //----- (00498737) -------------------------------------------------------- void stru9::AddVertex(struct VertexBuffer *pVertexBuffer, struct RenderVertexSoft *pVertex) { -// __debugbreak(); - RenderVertexSoft *v3; // eax@1 - - v3 = &pVertexBuffer->pVertices[pVertexBuffer->uNumVertices]; - v3->vWorldPosition.x = pVertex->vWorldPosition.x; - v3->vWorldPosition.y = pVertex->vWorldPosition.y; - v3->vWorldPosition.z = pVertex->vWorldPosition.z; - v3->u = pVertex->u; - v3->v = pVertex->v; + pVertexBuffer->pVertices[pVertexBuffer->uNumVertices].vWorldPosition.x = pVertex->vWorldPosition.x; + pVertexBuffer->pVertices[pVertexBuffer->uNumVertices].vWorldPosition.y = pVertex->vWorldPosition.y; + pVertexBuffer->pVertices[pVertexBuffer->uNumVertices].vWorldPosition.z = pVertex->vWorldPosition.z; + pVertexBuffer->pVertices[pVertexBuffer->uNumVertices].u = pVertex->u; + pVertexBuffer->pVertices[pVertexBuffer->uNumVertices].v = pVertex->v; ++pVertexBuffer->uNumVertices; } @@ -362,7 +358,7 @@ } //----- (004980B9) -------------------------------------------------------- -bool stru9::_4980B9(RenderVertexSoft *a1, unsigned int uNumVertices, float a3, float a4, float a5, RenderVertexSoft *pOutVertices, signed int *pOutNumVertices) +bool stru9::_4980B9(RenderVertexSoft *a1, unsigned int uNumVertices, float pNormalX, float pNormalY, float pNormalZ, RenderVertexSoft *pOutVertices, signed int *pOutNumVertices) { RenderVertexSoft *v12; // ecx@9 double v13; // st7@12 @@ -386,7 +382,7 @@ v12 = &a1[(i + 1) % uNumVertices]; if (a1[i].vWorldPosition.x != v12->vWorldPosition.x || a1[i].vWorldPosition.y != v12->vWorldPosition.y || - a1[i].vWorldPosition.z!= v12->vWorldPosition.z) + a1[i].vWorldPosition.z != v12->vWorldPosition.z) { v13 = v12->vWorldPosition.x - a1[i].vWorldPosition.x; v14 = v12->vWorldPosition.y - a1[i].vWorldPosition.y; @@ -394,9 +390,9 @@ ++v25; static_sub_4980B9_stru_AE3FE8.uNumVertices = 0; - static_sub_4980B9_stru_AE4BEC.x = a4 * v15 - v14 * a5; - static_sub_4980B9_stru_AE4BEC.y = v13 * a5 - v15 * a3; - static_sub_4980B9_stru_AE4BEC.z = v14 * a3 - v13 * a4; + static_sub_4980B9_stru_AE4BEC.x = pNormalY * v15 - v14 * pNormalZ; + static_sub_4980B9_stru_AE4BEC.y = v13 * pNormalZ - v15 * pNormalX; + static_sub_4980B9_stru_AE4BEC.z = v14 * pNormalX - v13 * pNormalY; if (*pOutNumVertices == 0) return true; @@ -424,7 +420,7 @@ for (uint j = 0; j < static_sub_4980B9_stru_AE3FE8.uNumVertices; ++j) { - pOutVertices[j].vWorldPosition.y = static_sub_4980B9_stru_AE3FE8.pVertices[j].vWorldPosition.x; + pOutVertices[j].vWorldPosition.x = static_sub_4980B9_stru_AE3FE8.pVertices[j].vWorldPosition.x; pOutVertices[j].vWorldPosition.y = static_sub_4980B9_stru_AE3FE8.pVertices[j].vWorldPosition.y; pOutVertices[j].vWorldPosition.z = static_sub_4980B9_stru_AE3FE8.pVertices[j].vWorldPosition.z; pOutVertices[j].u = static_sub_4980B9_stru_AE3FE8.pVertices[j].u;