diff mm7_4.cpp @ 718:a5ee769b02c6

Слияние
author Ritor1
date Mon, 18 Mar 2013 01:51:31 +0600
parents d5473972234d 2dfb67633b01
children 05f7a11f4f20
line wrap: on
line diff
--- a/mm7_4.cpp	Mon Mar 18 01:50:50 2013 +0600
+++ b/mm7_4.cpp	Mon Mar 18 01:51:31 2013 +0600
@@ -1384,11 +1384,11 @@
 
   v0 = pSpans;
   stru_80C9D8.pSurf = &stru_80C980;
-  stru_80C9D8.field_0 = (double)(signed int)pViewport->uViewportX;
+  stru_80C9D8.field_0 = (double)(signed int)pViewport->uViewportTL_X;
   stru_80C9A4.pSurf = &stru_80C980;
   stru_80C980.pPrev = &stru_80C980;
   stru_80C980.pNext = &stru_80C980;
-  stru_80C9A4.field_0 = (double)(signed int)pViewport->uViewportZ;
+  stru_80C9A4.field_0 = (double)(signed int)pViewport->uViewportBR_X;
   stru_80C980.field_8 = 0.0;
   stru_80C980.field_4 = 0.0;
   stru_80C9D8.pNext = &stru_80C9A4;
@@ -1398,16 +1398,16 @@
   stru_80C9A4.pPrev = &stru_80C9D8;
   stru_80C9A4.field_8 = 0;
   LODWORD(stru_80C980.field_0) = 0xC97423F0u;
-  v27 = pViewport->uViewportY;
-  if ( (signed int)pViewport->uViewportY > (signed int)pViewport->uViewportW )
+  v27 = pViewport->uViewportTL_Y;
+  if ( (signed int)pViewport->uViewportTL_Y > (signed int)pViewport->uViewportBR_Y )
   {
 LABEL_51:
     v0->field_8 = -1;
   }
   else
   {
-    v1 = 52 * pViewport->uViewportY;
-    v24 = 52 * pViewport->uViewportY;
+    v1 = 52 * pViewport->uViewportTL_Y;
+    v24 = 52 * pViewport->uViewportTL_Y;
     while ( 1 )
     {
       v2 = *(Edge **)((char *)&pNewEdges->pNext + v1);
@@ -1564,7 +1564,7 @@
       ++v27;
       v1 = v24 + 52;
       v24 += 52;
-      if ( (signed int)v27 > (signed int)pViewport->uViewportW )
+      if ( (signed int)v27 > (signed int)pViewport->uViewportBR_Y )
         goto LABEL_51;
     }
     while ( 1 )
@@ -6506,15 +6506,15 @@
   v5 = a4;
   v23 = _z >> 16;
   z = x + v5;
-  if ( z >= (signed int)pViewport->uViewportX
-    && (signed int)x <= (signed int)pViewport->uViewportZ
-    && y >= (signed int)pViewport->uViewportY
-    && y <= (signed int)pViewport->uViewportW )
-  {
-    if ( (signed int)x < (signed int)pViewport->uViewportX )
-      x = pViewport->uViewportX;
-    if ( z > (signed int)pViewport->uViewportZ )
-      z = pViewport->uViewportZ;
+  if ( z >= (signed int)pViewport->uViewportTL_X
+    && (signed int)x <= (signed int)pViewport->uViewportBR_X
+    && y >= (signed int)pViewport->uViewportTL_Y
+    && y <= (signed int)pViewport->uViewportBR_Y )
+  {
+    if ( (signed int)x < (signed int)pViewport->uViewportTL_X )
+      x = pViewport->uViewportTL_X;
+    if ( z > (signed int)pViewport->uViewportBR_X )
+      z = pViewport->uViewportBR_X;
     pTarget = &pRenderer->pTargetSurface[x + y * pRenderer->uTargetSurfacePitch];
     v22 = z - x;
     pTargetZ = &pRenderer->pActiveZBuffer[x + 640 * y];
@@ -6635,48 +6635,48 @@
   {
     if ( pRenderer->field_40110 )
     {
-      a2.bottom = pViewport->uViewportY;
+      a2.bottom = pViewport->uViewportTL_Y;
       a2.left = 0;
       a2.top = 0;
       a2.right = 640;
       ErrD3D(pRenderer->pBackBuffer4->BltFast(0, 0, pRenderer->pColorKeySurface4, &a2, 16u));
       a2.right = 640;
       a2.left = 0;
-      a2.top = pViewport->uViewportW + 1;
+      a2.top = pViewport->uViewportBR_Y + 1;
       a2.bottom = 480;
       ErrD3D(pRenderer->pBackBuffer4->BltFast(
              0,
-             pViewport->uViewportW + 1,
+             pViewport->uViewportBR_Y + 1,
              pRenderer->pColorKeySurface4,
              &a2,
              16u));
-      a2.right = pViewport->uViewportX;
-      a2.bottom = pViewport->uViewportW + 1;
+      a2.right = pViewport->uViewportTL_X;
+      a2.bottom = pViewport->uViewportBR_Y + 1;
       a2.left = 0;
-      a2.top = pViewport->uViewportY;
+      a2.top = pViewport->uViewportTL_Y;
       ErrD3D(pRenderer->pBackBuffer4->BltFast(
              0,
-             pViewport->uViewportY,
+             pViewport->uViewportTL_Y,
              pRenderer->pColorKeySurface4,
              &a2,
              16u));
-      a2.left = pViewport->uViewportZ;
-      a2.top = pViewport->uViewportY;
+      a2.left = pViewport->uViewportBR_X;
+      a2.top = pViewport->uViewportTL_Y;
       a2.right = 640;
-      a2.bottom = pViewport->uViewportW + 1;
+      a2.bottom = pViewport->uViewportBR_Y + 1;
       ErrD3D(pRenderer->pBackBuffer4->BltFast(
-             pViewport->uViewportZ,
-             pViewport->uViewportY,
+             pViewport->uViewportBR_X,
+             pViewport->uViewportTL_Y,
              pRenderer->pColorKeySurface4,
              &a2,
              16u));
-      a2.right = pViewport->uViewportZ;
-      a2.bottom = pViewport->uViewportW + 1;
-      a2.left = pViewport->uViewportX;
-      a2.top = pViewport->uViewportY;
+      a2.right = pViewport->uViewportBR_X;
+      a2.bottom = pViewport->uViewportBR_Y + 1;
+      a2.left = pViewport->uViewportTL_X;
+      a2.top = pViewport->uViewportTL_Y;
       ErrD3D(pRenderer->pBackBuffer4->BltFast(
-             pViewport->uViewportX,
-             pViewport->uViewportY,
+             pViewport->uViewportTL_X,
+             pViewport->uViewportTL_Y,
              pRenderer->pColorKeySurface4,
              &a2,
              17u));
@@ -6760,11 +6760,11 @@
                  pSrc + y * 640, 640 * sizeof(__int16));
 
 
-        auto pSrc_x1y1 = pSrc + 640 * pViewport->uViewportY + pViewport->uViewportX;
+        auto pSrc_x1y1 = pSrc + 640 * pViewport->uViewportTL_Y + pViewport->uViewportTL_X;
         //_this = (unsigned int)&pSrc[2 * (((signed int)pViewport->uViewportX >> 1) + 320 * pViewport->uViewportY)];
-        auto pDst_x1y1 = pDst + Dst.lPitch * pViewport->uViewportY + pViewport->uViewportX;
+        auto pDst_x1y1 = pDst + Dst.lPitch * pViewport->uViewportTL_Y + pViewport->uViewportTL_X;
         //v23 = (unsigned __int32)((char *)v26 + 4 * (((signed int)pViewport->uViewportX >> 1) + (Dst.lPitch >> 2) * pViewport->uViewportY));
-        v9 = ((signed int)pViewport->uViewportX >> 1) - ((signed int)pViewport->uViewportZ >> 1);
+        v9 = ((signed int)pViewport->uViewportTL_X >> 1) - ((signed int)pViewport->uViewportBR_X >> 1);
         //v20 = ((signed int)pViewport->uViewportZ >> 1) - ((signed int)pViewport->uViewportX >> 1);
         v22 = 4 * ((Dst.lPitch / 4) + v9);
         v21 = 4 * v9 + 1280;
@@ -6773,14 +6773,14 @@
         //v26 = (LPVOID)(pViewport->uViewportW - pViewport->uViewportY + 1);
         v10 = (int)pSrc_x1y1;
         v11 = (int)pDst_x1y1;
-        auto uHalfWidth = v20 = (pViewport->uViewportZ - pViewport->uViewportX) / 2;
+        auto uHalfWidth = v20 = (pViewport->uViewportBR_X - pViewport->uViewportTL_X) / 2;
         v13 = v24;
 
-        for (uint y = pViewport->uViewportY; y < pViewport->uViewportW + 1; ++y)
+        for (uint y = pViewport->uViewportTL_Y; y < pViewport->uViewportBR_Y + 1; ++y)
         {
           //memcpy(pDst + pViewport->uViewportX + y * Dst.lPitch / 2,
           //       pSrc + pViewport->uViewportX + y * 640, (pViewport->uViewportZ - pViewport->uViewportX) * sizeof(__int16));
-          for (uint x = pViewport->uViewportX; x < pViewport->uViewportZ; ++x)
+          for (uint x = pViewport->uViewportTL_X; x < pViewport->uViewportBR_X; ++x)
           {
             if (pSrc[y * 640 + x] != (pRenderer->uTargetGMask | pRenderer->uTargetBMask))
               pDst[y * Dst.lPitch / 2 + x] = pSrc[y * 640 + x];
@@ -10707,7 +10707,7 @@
     else
     {
       for ( i = 0; i < uNumDialogueNPCPortraits; ++i )
-        GUIButton::_41D0D8((GUIButton *)HouseNPCData[i + 7]);
+        ((GUIButton *)HouseNPCData[i + 7])->Release();
     }
     pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0);
     pBtn_ExitCancel = pDialogueWindow->CreateButton(  471u,  445u,  169u, 35u,  1,   0, 0x71u,  0,  0,