diff mm7_6.cpp @ 1787:0c4d3c6a9d5a

DrawBuildingsD3D cleared
author Ritor1
date Fri, 04 Oct 2013 17:30:47 +0600
parents 11f36943e818
children bdac32c645c5
line wrap: on
line diff
--- a/mm7_6.cpp	Thu Oct 03 18:09:21 2013 +0600
+++ b/mm7_6.cpp	Fri Oct 04 17:30:47 2013 +0600
@@ -42,62 +42,6 @@
 
 
 
-//----- (00424EE0) --------------------------------------------------------
-int BuildingVerticesClipping(unsigned int uNumVertices)
-{
-  signed int previous_vertices_flag; // edi@1
-  double t; // st6@10
-  bool current_vertices_flag; // [sp+Ch] [bp-28h]@6
-  signed int depth_num_vertices; // [sp+18h] [bp-1Ch]@1
-  int pNextVertices;
-  //Доп инфо "Программирование трёхмерных игр для windows" Ламот стр 910
-
-  memcpy(&array_50AC10[uNumVertices], array_50AC10, sizeof(array_50AC10[uNumVertices]));
-  depth_num_vertices = 0;
-  previous_vertices_flag = 0;
-  if ( array_50AC10[0].vWorldViewPosition.x <= pODMRenderParams->shading_dist_mist )
-    previous_vertices_flag = 1;//предыдущая грань меньше границы видимости
-  if ( (signed int)uNumVertices <= 0 )
-    return 0;
-  for ( uint i = 1; i <= uNumVertices; ++i )
-  {
-    current_vertices_flag = pODMRenderParams->shading_dist_mist >= array_50AC10[i].vWorldViewPosition.x;
-    if ( previous_vertices_flag != current_vertices_flag )//одна из граней за границей видимости
-    {
-      if ( current_vertices_flag )//текущая грань меньше границы видимости(предыдущая грань за пределами видимости)
-      {
-        //t = far_clip - v0.x / v1.x - v0.x    (формула получения точки пересечения отрезка с плоскостью)
-        t = (pODMRenderParams->shading_dist_mist - array_50AC10[i - 1].vWorldViewPosition.x) / (array_50AC10[i].vWorldViewPosition.x - array_50AC10[i - 1].vWorldViewPosition.x);
-        array_507D30[depth_num_vertices].vWorldViewPosition.y = (array_50AC10[i].vWorldViewPosition.y - array_50AC10[i - 1].vWorldViewPosition.y) * t + array_50AC10[i - 1].vWorldViewPosition.y;
-        array_507D30[depth_num_vertices].vWorldViewPosition.z = (array_50AC10[i].vWorldViewPosition.z - array_50AC10[i - 1].vWorldViewPosition.z) * t + array_50AC10[i - 1].vWorldViewPosition.z;
-        array_507D30[depth_num_vertices].u = (array_50AC10[i].u - array_50AC10[i - 1].u) * t + array_50AC10[i - 1].u;
-        array_507D30[depth_num_vertices].v = (array_50AC10[i].v - array_50AC10[i - 1].v) * t + array_50AC10[i - 1].v;
-      }
-      else//предыдущая грань меньше границы видимости(текущая грань вышла за пределы видимости)
-      {
-        //t = far_clip - v1.x / v0.x - v1.x
-        t = (pODMRenderParams->shading_dist_mist - array_50AC10[i].vWorldViewPosition.x) / (array_50AC10[i - 1].vWorldViewPosition.x - array_50AC10[i].vWorldViewPosition.x);
-        array_507D30[depth_num_vertices].vWorldViewPosition.y = (array_50AC10[i - 1].vWorldViewPosition.y - array_50AC10[i].vWorldViewPosition.y) * t + array_50AC10[i].vWorldViewPosition.y;
-        array_507D30[depth_num_vertices].vWorldViewPosition.z = (array_50AC10[i - 1].vWorldViewPosition.z - array_50AC10[i].vWorldViewPosition.z) * t + array_50AC10[i].vWorldViewPosition.z;
-        array_507D30[depth_num_vertices].u = (array_50AC10[i - 1].u - array_50AC10[i].u) * t + array_50AC10[i].u;
-        array_507D30[depth_num_vertices].v = (array_50AC10[i - 1].v - array_50AC10[i].v) * t + array_50AC10[i].v;
-      }
-      array_507D30[depth_num_vertices].vWorldViewPosition.x = pODMRenderParams->shading_dist_mist;
-      array_507D30[depth_num_vertices]._rhw = 1.0 / pODMRenderParams->shading_dist_mist;
-      ++depth_num_vertices;
-    }
-    if ( current_vertices_flag )//оба в границе видимости
-    {
-      pNextVertices = depth_num_vertices++;
-      memcpy(&array_507D30[pNextVertices], &array_50AC10[i], 0x30);
-    }
-    previous_vertices_flag = current_vertices_flag;
-  }
-  if ( depth_num_vertices < 3 )
-    return 0;
-  return depth_num_vertices;
-}
-
 //----- (00426A5A) --------------------------------------------------------
 void stru319::LootActor(Actor *pActor)
 {