diff UI/UIPopup.cpp @ 2155:0a1438c16c2b

Render decoupling.
author Nomad
date Thu, 09 Jan 2014 17:29:17 +0200
parents 9bd7522cdbbb
children 385040580292
line wrap: on
line diff
--- a/UI/UIPopup.cpp	Thu Jan 09 14:36:48 2014 +0200
+++ b/UI/UIPopup.cpp	Thu Jan 09 17:29:17 2014 +0200
@@ -527,7 +527,7 @@
   pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, Color16(0xE1u, 255, 0x9Bu));//горизонтальная нижняя линия
   pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, Color16(0xE1u, 255, 0x9Bu));//левая вертикальная линия
   pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportW + 1, Color16(0xE1u, 255, 0x9Bu));//правая вертикальная линия
-  if ( pRenderer->pRenderD3D )
+  //if ( pRenderer->pRenderD3D )
   {
     v106.uScreenSpaceY = v115 + v106.uViewportY + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferHeight;
     memset(&Dst, 0, 0x64u);
@@ -558,14 +558,14 @@
       dst_z = v106.uViewportZ;
     if (dst_w > v106.uViewportW)
       dst_w = v106.uViewportW;
-    pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, pRenderer->uTargetBMask | pRenderer->uTargetGMask);
-    pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, pRenderer->uTargetBMask | pRenderer->uTargetGMask);
+    pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, 0x7FF);
+    pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, 0x7FF);
     v84.left = v106.uViewportX;
     v84.top = v106.uViewportY;
     v84.right = v106.uViewportZ;
     v84.bottom = v106.uViewportW;
     ErrD3D(pRenderer->pBackBuffer4->Blt(&v84, 0, 0, 16778240u, &Dst));
-    if ( pRenderer->uTargetGBits == 5 )
+    /*if ( pRenderer->uTargetGBits == 5 )
     {
       __debugbreak(); // no monster popup for r5g5b5 will be
       memset(&pDesc, 0, 0x7Cu);
@@ -612,7 +612,7 @@
         pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface->Unlock(0);
       }
     }
-    else
+    else*/
     {
       memset(&pDesc, 0, 0x7Cu);
       pDesc.dwSize = 124;
@@ -640,12 +640,12 @@
       }
     }
   }
-  else
+  /*else
   {
     pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, 0);
     if ( v10->pHwSpriteIDs[0] >= 0 )
       pSprites_LOD->pSpriteHeaders[v10->pHwSpriteIDs[0]].DrawSprite_sw(&v106, 0);
-  }
+  }*/
 //name and profession
   if ( pActors[uActorID].sNPC_ID )
   {
@@ -1309,7 +1309,7 @@
   {
     pMouse->GetClickPos(&pX, &pY);
   }
-  if ( pRenderer->bWindowMode )
+  //if ( pRenderer->bWindowMode )
   {
     GetCursorPos(&Point);
     ScreenToClient(window->GetApiHandle(), &Point);
@@ -1428,10 +1428,10 @@
         if ( (signed int)pX <= 320 )
           popup_window.uFrameX = pX + 30;
         popup_window.uFrameY = 40;
-        if ( pRenderer->pRenderD3D )
-          LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val();
-        else
-          v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
+        //if ( pRenderer->pRenderD3D )
+          v5 = pGame->pVisInstance->get_picked_object_zbuf_val();
+        /*else
+          v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];*/
         if (PID_TYPE((unsigned __int16)v5) == OBJECT_Actor)
         {
           /*if ( pRenderer->uNumSceneBegins )