diff stru6.cpp @ 693:e0a1fccc89b1

map render fixes
author Gloval
date Sun, 17 Mar 2013 01:50:34 +0400
parents 574cc56e05e9
children d394cc892106
line wrap: on
line diff
--- a/stru6.cpp	Sat Mar 16 21:57:32 2013 +0400
+++ b/stru6.cpp	Sun Mar 17 01:50:34 2013 +0400
@@ -1456,22 +1456,22 @@
     uAnimLength -= pEventTimer->uTimeElapsed;
     if ( pRenderer->pRenderD3D )
     {
-      v12 = (double)(signed int)pViewport->uViewportX;
+      v12 = (double)(signed int)pViewport->uViewportTL_X;
       vd3d[0].pos.x = v12;
       vd3d[1].pos.x = v12;
-      v13 = (double)(signed int)pViewport->uViewportZ;
-      v26 = pViewport->uViewportW + 1;
+      v13 = (double)(signed int)pViewport->uViewportBR_X;
+      v26 = pViewport->uViewportBR_Y + 1;
       vd3d[0].diffuse = 0x7F7F7Fu;
       vd3d[1].diffuse = 0x7F7F7Fu;
       vd3d[2].pos.x = v13;
       vd3d[3].pos.x = v13;
-      v14 = (double)(signed int)pViewport->uViewportY;
+      v14 = (double)(signed int)pViewport->uViewportTL_Y;
       vd3d[2].diffuse = 0x7F7F7Fu;
       vd3d[3].diffuse = 0x7F7F7Fu;
       vd3d[0].specular = 0;
       vd3d[1].specular = 0;
       vd3d[0].pos.y = v14;
-      v15 = (double)(pViewport->uViewportW + 1);
+      v15 = (double)(pViewport->uViewportBR_Y + 1);
       vd3d[2].specular = 0;
       vd3d[3].specular = 0;
       vd3d[1].pos.y = v15;
@@ -1521,24 +1521,24 @@
       vsr.pTarget = pRenderer->pTargetSurface;
       vsr.uParentBillboardID = -1;
       vsr.pTargetZ = pRenderer->pActiveZBuffer;
-      vsr.uScreenSpaceX = (signed int)(pViewport->uViewportZ - pViewport->uViewportX) / 2;
-      vsr.uScreenSpaceY = pViewport->uViewportW;
+      vsr.uScreenSpaceX = (signed int)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) / 2;
+      vsr.uScreenSpaceY = pViewport->uViewportBR_Y;
       v24 = 16777216;
       LODWORD(v18) = 0;
-      HIDWORD(v18) = (signed __int16)(LOWORD(pViewport->uViewportZ) - LOWORD(pViewport->uViewportX));
+      HIDWORD(v18) = (signed __int16)(LOWORD(pViewport->uViewportBR_X) - LOWORD(pViewport->uViewportTL_X));
       vsr._screenspace_x_scaler_packedfloat = v18 / 0x1000000;
       LODWORD(v18) = 0;
-      HIDWORD(v18) = (signed __int16)(LOWORD(pViewport->uViewportW) - LOWORD(pViewport->uViewportY));
+      HIDWORD(v18) = (signed __int16)(LOWORD(pViewport->uViewportBR_Y) - LOWORD(pViewport->uViewportTL_Y));
       v26 = v18 / 16777216;
       vsr._screenspace_y_scaler_packedfloat = v18 / 0x1000000;
       vsr.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v70->uPaletteIndex, 0, 1);
       vsr.uTargetPitch = pRenderer->uTargetSurfacePitch;
       vsr.uParentBillboardID = -1;
-      vsr.uViewportX = pViewport->uViewportX;
-      vsr.uViewportZ = pViewport->uViewportZ;
-      vsr.uViewportY = pViewport->uViewportY;
+      vsr.uViewportX = pViewport->uViewportTL_X;
+      vsr.uViewportZ = pViewport->uViewportBR_X;
+      vsr.uViewportY = pViewport->uViewportTL_Y;
       vsr.sZValue = 0;
-      vsr.uViewportW = pViewport->uViewportW;
+      vsr.uViewportW = pViewport->uViewportBR_Y;
       vsr.uFlags = 0;
       if ( v11 >= 0 )
         pSprites_LOD->pSpriteHeaders[v11]._4ACC38(&vsr, 1);