changeset 2016:f1fd2ed4e9ba

Обращённый набор изменений слияния: 9dbc142fc8f7 Обращены изменения ревизии слияния, к её первому родителю (f39f27b08908)
author Ritor1
date Mon, 11 Nov 2013 09:36:52 +0600
parents 9dbc142fc8f7
children a5a3ad2713b2
files Render.cpp
diffstat 1 files changed, 25 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Render.cpp	Mon Nov 11 09:17:08 2013 +0600
+++ b/Render.cpp	Mon Nov 11 09:36:52 2013 +0600
@@ -5074,6 +5074,7 @@
   unsigned int v63; // [sp+120h] [bp-54h]@7
   unsigned int v65; // [sp+128h] [bp-4Ch]@1
   unsigned int v66; // [sp+12Ch] [bp-48h]@7
+  //float v67; // [sp+130h] [bp-44h]@7
   __int64 v69; // [sp+13Ch] [bp-38h]@3
   int v70; // [sp+144h] [bp-30h]@3
   int X; // [sp+148h] [bp-2Ch]@9
@@ -5090,7 +5091,7 @@
   const void *v81; // [sp+170h] [bp-4h]@7
 
   pFace = &pIndoor->pFaces[uFaceID];
-  //for floor and wall(for example Celesta)-------------------
+  //for floor and wall(for example Selesta)-------------------
   if (pFace->uPolygonType == POLYGON_InBetweenFloorAndWall || pFace->uPolygonType == POLYGON_Floor)
   {
     int v69 = (GetTickCount() / 32) - pGame->pIndoorCameraD3D->vPartyPos.x;
@@ -5134,12 +5135,16 @@
   pSkyPolygon.field_24 = 0x2000000;
 
   extern float _calc_fov(int viewport_width, int angle_degree);
+  //v64 = (double)(signed int)(pBLVRenderParams->uViewportZ - pBLVRenderParams->uViewportX) * 0.5;
+  //v72 = 65536 / (signed int)(signed __int64)(v64 / tan(0.6457717418670654) + 0.5);
   v72 = 65536.0f / _calc_fov(pBLVRenderParams->uViewportZ - pBLVRenderParams->uViewportX, 74);
   v12 = pSkyPolygon.pTexture->uWidthMinus1;
   v13 = pSkyPolygon.pTexture->uHeightMinus1;
+  //v67 = 1.0 / (double)pSkyPolygon.pTexture->uTextureWidth;
   v63 = 224 * pMiscTimer->uTotalGameTimeElapsed & v13;
   v66 = 224 * pMiscTimer->uTotalGameTimeElapsed & v12;
   v78 = 0;
+  //v81 = 0;
   float v68 = 1.0 / (double)pSkyPolygon.pTexture->uTextureHeight;
   if ( (signed int)pSkyPolygon.uNumVertices <= 0 )
     return;
@@ -5147,6 +5152,7 @@
   int _507D30_idx = 0;
   for ( _507D30_idx; _507D30_idx < pSkyPolygon.uNumVertices; _507D30_idx++ )
   {
+    //v15 = (void *)(v72 * (v70 - (int)array_507D30[_507D30_idx].vWorldViewProjY));
     v77 = (unsigned __int64)(pSkyPolygon.ptr_38->viewing_angle_from_west_east * (signed __int64)(v72 * (v70 - array_507D30[_507D30_idx].vWorldViewProjY))) >> 16;
     v74 = v77 + pSkyPolygon.ptr_38->angle_from_north;
 
@@ -5198,6 +5204,13 @@
       v77 = (unsigned __int64)(SLODWORD(s) * (v23 / X)) >> 16;
       LODWORD(v73) = (unsigned __int64)(SLODWORD(s2) * (v23 / X)) >> 16;
       array_507D30[_507D30_idx]._rhw = 65536.0 / (double)(signed int)v79;
+
+      //if ( (int)v81 >= pSkyPolygon.uNumVertices )
+      //{
+      //  pRenderer->DrawIndoorSkyPolygon(pSkyPolygon.uNumVertices, &pSkyPolygon,
+      //     pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPolygon.uTileBitmapID]);
+      //  return;
+      //}
       continue;
     }
     break;
@@ -5245,17 +5258,21 @@
   }
   if ( SLODWORD(v73) <= 0 )
     goto LABEL_40;
+  //v34 = (char *)&array_50AC10[0].vWorldViewProjY;
   uint j = 0;
   v65 = v77 >> 14;
+  //HIDWORD(v69) = LODWORD(v73);
   for ( int t = (int)LODWORD(v73); t > 1; t-- )
   {
     v35 = (const void *)(v72 * (v70 - (unsigned __int64)(signed __int64)array_50AC10[j].vWorldViewProjY));
 
+    //v78 = pSkyPolygon.ptr_38->viewing_angle_from_west_east;
     v81 = (const void *)((unsigned __int64)(pSkyPolygon.ptr_38->viewing_angle_from_west_east * (signed __int64)(signed int)v35) >> 16);
     v36 = (int)((char *)v81 + pSkyPolygon.ptr_38->angle_from_north);
 
     v81 = v35;
     v74 = v36;
+    //v78 = pSkyPolygon.ptr_38->viewing_angle_from_north_south;
     v81 = (const void *)((unsigned __int64)(pSkyPolygon.ptr_38->viewing_angle_from_north_south * (signed __int64)(signed int)v35) >> 16);
     v78 = (int)v35;
     v75 = (RenderVertexSoft *)((char *)v81 + pSkyPolygon.ptr_38->angle_from_east);
@@ -5302,24 +5319,30 @@
     v79 = (void *)(v42 / X);
     v81 = v37;
 
+    //v78 = pSkyPolygon.ptr_38->angle_from_west;
     v81 = (const void *)((unsigned __int64)(pSkyPolygon.ptr_38->angle_from_west * (signed __int64)(signed int)v37) >> 16);
     v43 = v74 + ((unsigned __int64)(pSkyPolygon.ptr_38->angle_from_west * (signed __int64)(signed int)v37) >> 16);
     v74 = (unsigned int)v37;
     LODWORD(v76) = v43;
 
+    //v78 = pSkyPolygon.ptr_38->angle_from_south;
     v75 = (RenderVertexSoft *)((char *)v75 + ((unsigned __int64)(pSkyPolygon.ptr_38->angle_from_south * (signed __int64)(signed int)v37) >> 16));
     v74 = (unsigned __int64)(v43 * v42 / X) >> 16;
     v81 = (const void *)((unsigned __int64)((signed int)v75 * v42 / X) >> 16);
 
+    //v34 += 48;
     v78 = v66 + ((signed int)v74 >> 4);
+    //v44 = HIDWORD(v69)-- == 1;
     v45 = (double)v78 * 0.000015259022;
     v78 = v63 + ((signed int)((unsigned __int64)((signed int)v75 * v42 / X) >> 16) >> 4);
     array_50AC10[j].u = v45 * (1.0 / (double)pSkyPolygon.pTexture->uTextureWidth);
     array_50AC10[j].v = (double)v78 * 0.000015259022 * v68;
+    //v46 = (double)(signed int)v79;
     array_50AC10[j].vWorldViewPosition.x = 0.000015258789 * (double)(signed int)v79;
     array_50AC10[j]._rhw = 65536.0 / (double)(signed int)v79;
 	++j;
   }
+  //while ( !v44 );
 LABEL_40:
   uint i = 0;
   if ( SLODWORD(v73) > 0 )
@@ -5352,6 +5375,7 @@
   pRenderer->DrawIndoorSkyPolygon(pNumVertices, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPolygon.uTileBitmapID]);
 }
 
+
 //----- (004A2FC0) --------------------------------------------------------
 void Render::DrawIndoorPolygon(unsigned int uNumVertices, BLVFace *pFace, IDirect3DTexture2 *pHwTex, Texture *pTex, int uPackedID, unsigned int uColor, int a8)
 {