diff Render.cpp @ 718:a5ee769b02c6

Слияние
author Ritor1
date Mon, 18 Mar 2013 01:51:31 +0600
parents d5473972234d e0a1fccc89b1
children 737d7fec67f0
line wrap: on
line diff
--- a/Render.cpp	Mon Mar 18 01:50:50 2013 +0600
+++ b/Render.cpp	Mon Mar 18 01:51:31 2013 +0600
@@ -332,7 +332,7 @@
           v5 = v4->pTexture;
           if ( v5 )
           {
-            if ( v3->field_8 >= (signed int)pViewport->uViewportX || v3->field_C != pViewport->uViewportX )
+            if ( v3->field_8 >= (signed int)pViewport->uViewportTL_X || v3->field_C != pViewport->uViewportTL_X )
             {
               LOBYTE(v4->field_32) |= 2u;
               v14 = *(int *)&v4->flags;
@@ -650,17 +650,17 @@
       v2 = (stru148 *)v30->field_E;
       if ( v2 != (stru148 *)unnamed_6BE060[1] )
       {
-        LOWORD(v2) = LOWORD(pViewport->uViewportX);
-        if ( v30->field_8 >= (signed int)pViewport->uViewportX )
+        LOWORD(v2) = LOWORD(pViewport->uViewportTL_X);
+        if ( v30->field_8 >= (signed int)pViewport->uViewportTL_X )
           goto LABEL_124;
-        if ( v30->field_C == pViewport->uViewportX )
+        if ( v30->field_C == pViewport->uViewportTL_X )
         {
           v30->field_E = LOWORD(unnamed_6BE060[1]);
         }
         else
         {
-          v30->field_8 = LOWORD(pViewport->uViewportX);
-          v30->field_C -= LOWORD(pViewport->uViewportX);
+          v30->field_8 = LOWORD(pViewport->uViewportTL_X);
+          v30->field_C -= LOWORD(pViewport->uViewportTL_X);
           if ( v30->field_C >= 0 )
           {
 LABEL_124:
@@ -693,13 +693,13 @@
       v2 = (stru148 *)v13->field_E;
       if ( v2 != (stru148 *)unnamed_6BE060[1] )
       {
-        LOWORD(v2) = LOWORD(pViewport->uViewportX);
-        if ( v13->field_8 >= (signed int)pViewport->uViewportX )
+        LOWORD(v2) = LOWORD(pViewport->uViewportTL_X);
+        if ( v13->field_8 >= (signed int)pViewport->uViewportTL_X )
           goto LABEL_109;
-        if ( v13->field_C != pViewport->uViewportX )
-        {
-          v13->field_8 = LOWORD(pViewport->uViewportX);
-          v13->field_C -= LOWORD(pViewport->uViewportX);
+        if ( v13->field_C != pViewport->uViewportTL_X )
+        {
+          v13->field_8 = LOWORD(pViewport->uViewportTL_X);
+          v13->field_C -= LOWORD(pViewport->uViewportTL_X);
           if ( v13->field_C >= 0 )
           {
 LABEL_109:
@@ -790,7 +790,7 @@
 
   v3 = a2;
   v4 = a1;
-  v5 = (double)(pViewport->uViewportZ - pViewport->uViewportX) * 0.5 / tan(0.6457717418670654) + 0.5;
+  v5 = (double)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) * 0.5 / tan(0.6457717418670654) + 0.5;
   v35 = v5 + 6.7553994e15;
   if ( LODWORD(v35) )
   {
@@ -824,7 +824,7 @@
           break;
         v12 = a1a;
       }
-      if ( v11 <= (signed int)pViewport->uViewportY )
+      if ( v11 <= (signed int)pViewport->uViewportTL_Y )
         break;
       v9 = ((unsigned __int64)(v3->v_18.z * (signed __int64)v12) >> 16) + v3->v_18.x;
       --v54;
@@ -3004,10 +3004,10 @@
   billboard.pTarget = pRenderer->pTargetSurface;
   billboard.pTargetZ = pRenderer->pActiveZBuffer;
   billboard.uTargetPitch = pRenderer->uTargetSurfacePitch;
-  billboard.uViewportX = pViewport->uViewportX;
-  billboard.uViewportY = pViewport->uViewportY;
-  billboard.uViewportZ = pViewport->uViewportZ - 1;
-  billboard.uViewportW = pViewport->uViewportW;
+  billboard.uViewportX = pViewport->uViewportTL_X;
+  billboard.uViewportY = pViewport->uViewportTL_Y;
+  billboard.uViewportZ = pViewport->uViewportBR_X - 1;
+  billboard.uViewportW = pViewport->uViewportBR_Y;
   pOutdoorCamera->uNumBillboards = uNumBillboardsToDraw;
 
   for (int i = 0; i < ::uNumBillboardsToDraw; ++i)
@@ -3723,7 +3723,7 @@
                     v42 = pSprites_LOD->pSpriteHeaders[(signed __int16)*v37].uWidth >> 1;
                     b = (unsigned __int64)(v42 * (signed __int64)v41) >> 16;
                   }
-                  if ( b + v25 >= (signed int)pViewport->uViewportX && v25 - b <= (signed int)pViewport->uViewportZ )
+                  if ( b + v25 >= (signed int)pViewport->uViewportTL_X && v25 - b <= (signed int)pViewport->uViewportBR_X )
                   {
                     if (::uNumBillboardsToDraw >= 500)
                       return;
@@ -9246,11 +9246,11 @@
     a3 = v4 * 255.0;
     v39 = a3 + 6.7553994e15;
     LODWORD(v40) = LODWORD(v39);
-    v5 = (double)(signed int)pViewport->uViewportX;
+    v5 = (double)(signed int)pViewport->uViewportTL_X;
     v36[0].pos.x = v5;
-    v6 = (double)(signed int)pViewport->uViewportY;
+    v6 = (double)(signed int)pViewport->uViewportTL_Y;
     v7 = this_ | (LODWORD(v39) << 24);
-    this_ = pViewport->uViewportW + 1;
+    this_ = pViewport->uViewportBR_Y + 1;
     v36[0].specular = 0;
     v36[0].pos.y = v6;
     v36[0].diffuse = v7;
@@ -9265,13 +9265,13 @@
     v36[3].specular = 0;
     v36[0].texcoord.y = 0.0;
     v36[1].pos.x = v5;
-    v8 = (double)(pViewport->uViewportW + 1);
+    v8 = (double)(pViewport->uViewportBR_Y + 1);
     v36[1].pos.y = v8;
     v36[1].pos.z = 0.0;
     v36[1].rhw = 1.0;
     v36[1].texcoord.x = 0.0;
     v36[1].texcoord.y = 0.0;
-    v9 = (double)(signed int)pViewport->uViewportZ;
+    v9 = (double)(signed int)pViewport->uViewportBR_X;
     v36[2].pos.x = v9;
     v36[2].pos.y = v8;
     v36[2].pos.z = 0.0;
@@ -9310,10 +9310,10 @@
     v40 = (1.0 - a3) * 65536.0;
     v39 = v40 + 6.7553994e15;
     LODWORD(a3) = LODWORD(v39);
-    v38 = (signed int)(pViewport->uViewportZ - pViewport->uViewportX) >> 1;
-    HIDWORD(v39) = pViewport->uViewportW - pViewport->uViewportY + 1;
-    v13 = pViewport->uViewportX + ecx0->uTargetSurfacePitch - pViewport->uViewportZ;
-    v14 = &ecx0->pTargetSurface[pViewport->uViewportX + pViewport->uViewportY * ecx0->uTargetSurfacePitch];
+    v38 = (signed int)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) >> 1;
+    HIDWORD(v39) = pViewport->uViewportBR_Y - pViewport->uViewportTL_Y + 1;
+    v13 = pViewport->uViewportTL_X + ecx0->uTargetSurfacePitch - pViewport->uViewportBR_X;
+    v14 = &ecx0->pTargetSurface[pViewport->uViewportTL_X + pViewport->uViewportTL_Y * ecx0->uTargetSurfacePitch];
     v37 = 2 * v13;
     LODWORD(v40) = (int)v14;