changeset 580:bcae3e06cadb

Слияние
author Ritor1
date Wed, 06 Mar 2013 09:28:27 +0600
parents a295c9f956d1 (diff) cdf3afa8db74 (current diff)
children 2d4204de7a8c
files mm7_3.cpp
diffstat 3 files changed, 89 insertions(+), 82 deletions(-) [+]
line wrap: on
line diff
--- a/MM7.vcxproj.filters	Tue Mar 05 23:48:32 2013 +0000
+++ b/MM7.vcxproj.filters	Wed Mar 06 09:28:27 2013 +0600
@@ -149,7 +149,6 @@
     <ClInclude Include="stru314.h" />
     <ClInclude Include="SaveLoad.h" />
     <ClInclude Include="stru287.h" />
-    <ClInclude Include="stru179.h" />
     <ClInclude Include="Awards.h" />
     <ClInclude Include="Autonotes.h" />
     <ClInclude Include="stru160.h" />
@@ -201,7 +200,6 @@
     <ClInclude Include="resource.h" />
     <ClInclude Include="stru346.h" />
     <ClInclude Include="texts.h" />
-    <ClInclude Include="SpriteObject.h" />
   </ItemGroup>
   <ItemGroup>
     <Filter Include="lib">
--- a/Render.cpp	Tue Mar 05 23:48:32 2013 +0000
+++ b/Render.cpp	Wed Mar 06 09:28:27 2013 +0600
@@ -1744,8 +1744,7 @@
 
   v63 = 0;
   // basic optimizations
-  unsigned int uStartX, uEndX,
-               uStartZ, uEndZ;
+  unsigned int uStartX, uEndX, uStartZ, uEndZ;
   if (pIndoorCamera->sRotationY >= 0 && pIndoorCamera->sRotationY <= 1024)
   {
     uStartX = 0, uEndX = 128;
--- a/mm7_3.cpp	Tue Mar 05 23:48:32 2013 +0000
+++ b/mm7_3.cpp	Wed Mar 06 09:28:27 2013 +0600
@@ -6166,47 +6166,38 @@
   array_50AC10[3].vWorldViewProjX = pViewport->uViewportZ;
   array_50AC10[3].vWorldViewProjY = v38;
 
-  v36 = (double)(pViewport->uViewportZ - pViewport->uViewportX) * 0.5;
+  /*v36 = (double)(pViewport->uViewportZ - pViewport->uViewportX) * 0.5;
   v33 = 65536 / (signed int)(v36 / tan(0.6457717418670654) + 0.5);
 
   for (int i = 0; i < _this.uNumVertices; ++i)
   {
-     v29 = floorf(array_50AC10[i].vWorldViewProjY + 0.5f);
-     v39 = (unsigned __int64)(_this.ptr_38->field_14 * v33 * (v30 - v29)) / 65536;
-     v8 = v39 + _this.ptr_38->field_C;
-
-     v39 = (unsigned __int64)(_this.ptr_38->field_20 * v33 * (v30 - v29)) / 65536;
-     v36 = v39 + _this.ptr_38->field_18;
-
-      v9 = (unsigned __int64)(_this.v_18.z * v33 * (v30 - v29)) / 65536;
-      v10 = _this.v_18.x + v9;
-      v39 = _this.v_18.x + v9;
-      if ( _this.v_18.x + v9 > 0 )
-      {
-        v10 = 0;
-        v39 = 0;
-      }
-      v11 = (signed __int64)array_50AC10[i].vWorldViewProjX;
-      v38 = v10;
-      v12 = array_50AC10[i].vWorldViewProjY - 1.0;
-      v13 = v33 * (pViewport->uScreenCenterX - v11);
-      v34 = -_this.field_24;
-      v32 = (signed __int64)v12;
-      v14 = v33 * (v30 - v32);
-      while ( 1 )
-      {
-        v40 = v14;
-        if ( !v10 )
-          goto LABEL_12;
-        v37 = abs(v34 >> 14);
-        v15 = abs(v10);
-        if ( v37 <= v15 || v32 <= pViewport->uViewportY )
-        {
-          if ( v39 <= 0 )
-            break;
-        }
-        v14 = v40;
-LABEL_12:
+    v29 = floorf(array_50AC10[i].vWorldViewProjY + 0.5f);
+    v39 = (unsigned __int64)(_this.ptr_38->field_14 * v33 * (v30 - v29)) / 65536;
+    v8 = v39 + _this.ptr_38->field_C;
+
+    v39 = (unsigned __int64)(_this.ptr_38->field_20 * v33 * (v30 - v29)) / 65536;
+    v36 = v39 + _this.ptr_38->field_18;
+
+    v9 = (unsigned __int64)(_this.v_18.z * v33 * (v30 - v29)) / 65536;
+    v10 = _this.v_18.x + v9;
+    v39 = _this.v_18.x + v9;
+    if ( _this.v_18.x + v9 > 0 )
+    {
+      v10 = 0;
+      v39 = 0;
+    }
+    v11 = (signed __int64)array_50AC10[i].vWorldViewProjX;
+    v38 = v10;
+    v12 = array_50AC10[i].vWorldViewProjY - 1.0;
+    v13 = v33 * (pViewport->uScreenCenterX - v11);
+    v34 = -_this.field_24;
+    v32 = (signed __int64)v12;
+    v14 = v33 * (v30 - v32);
+    while ( 1 )
+    {
+      //v40 = v14;
+      if ( !v10 )
+      {
         v37 = _this.v_18.z;
         v16 = (unsigned __int64)(_this.v_18.z * (signed __int64)v14) >> 16;
         --v32;
@@ -6216,47 +6207,66 @@
         v38 = _this.v_18.x + v16;
         break;
       }
-      LODWORD(v17) = v34 << 16;
-      HIDWORD(v17) = v34 >> 16;
-      v18 = v17 / v38;
-      if ( v18 < 0 )
-        v18 = pOutdoorCamera->shading_dist_mist;
-
-      v37 += ((unsigned __int64)(_this.ptr_38->field_10 * v13) >> 16);
-      v36 += ((unsigned __int64)(_this.ptr_38->field_1C * v13) >> 16);
-      v35 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v37 * v18) >> 16) / 8;
-      v36 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v36 * v18) >> 16) / 8;
-
-      array_50AC10[i].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
-      array_50AC10[i]._rhw = 1.0 / (double)(v17 / 65536);
-      array_50AC10[i].u = (double)v35 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth);
-      array_50AC10[i].v = (double)v36 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth);
-    }
-
-     float t = (GetTickCount() % 96000) / 96000.0f;
-
- array_50AC10[0].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
- array_50AC10[0]._rhw = 1;
- array_50AC10[0].u = 0;
- array_50AC10[0].v = 0 + t;
-
- array_50AC10[1].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
- array_50AC10[1]._rhw = 1;
- array_50AC10[1].u = 0;
- array_50AC10[1].v = 1 + t;
- 
- array_50AC10[2].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
- array_50AC10[2]._rhw = 1;
- array_50AC10[2].u = 1;
- array_50AC10[2].v = 0 + t;
-
- array_50AC10[3].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
- array_50AC10[3]._rhw = 1;
- array_50AC10[3].u = 1;
- array_50AC10[3].v = 1 + t;
- pRenderer->DrawStrip(_this.uNumVertices, &_this,
-          pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]);
-        return;
+      v37 = abs(v34 >> 14);
+      v15 = abs(v10);
+      if ( v37 <= v15 || v32 <= pViewport->uViewportY )
+      {
+        if ( v39 <= 0 )
+          break;
+      }
+      //v14 = v40;
+      v37 = _this.v_18.z;
+      v16 = (unsigned __int64)(_this.v_18.z * v14) >> 16;
+      --v32;
+      v14 += v33;
+      v10 = _this.v_18.x + v16;
+      v39 = _this.v_18.x + v16;
+      v38 = _this.v_18.x + v16;
+      break;
+    }
+    LODWORD(v17) = v34 << 16;
+    HIDWORD(v17) = v34 >> 16;
+    v18 = v17 / v38;
+    if ( v18 < 0 )
+      v18 = pOutdoorCamera->shading_dist_mist;
+
+    v37 += ((unsigned __int64)(_this.ptr_38->field_10 * v13) >> 16);
+    v36 += ((unsigned __int64)(_this.ptr_38->field_1C * v13) >> 16);
+    v35 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v37 * v18) >> 16) / 8;
+    v36 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v36 * v18) >> 16) / 8;
+	*/
+    //array_50AC10[i].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
+    //array_50AC10[i]._rhw = 1;
+    //array_50AC10[i].u = (double)v35 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth);
+    //array_50AC10[i].v = (double)v36 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth);
+    //}
+    if ( _this.uNumVertices > 0)
+    {
+      float t = (GetTickCount() % 96000) / 96000.0f;
+
+      array_50AC10[0].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
+      array_50AC10[0]._rhw = 1;
+      array_50AC10[0].u = 0;
+      array_50AC10[0].v = 0 + t;
+
+      array_50AC10[1].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
+      array_50AC10[1]._rhw = 1;
+      array_50AC10[1].u = 0;
+      array_50AC10[1].v = 1 + t;
+
+      array_50AC10[2].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
+      array_50AC10[2]._rhw = 1;
+      array_50AC10[2].u = 1;
+      array_50AC10[2].v = 0 + t;
+
+      array_50AC10[3].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist;
+      array_50AC10[3]._rhw = 1;
+      array_50AC10[3].u = 1;
+      array_50AC10[3].v = 1 + t;
+      pRenderer->DrawStrip(_this.uNumVertices, &_this, pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]);
+      return;
+    //}
+  }
 }