diff mm7_3.cpp @ 315:2a09e1d6fc8f

Some 0041D895 GameUI_DrawItemInfo overhaul
author Nomad
date Wed, 20 Feb 2013 01:17:13 +0200
parents cc8e4dc397ec
children 922a96fdcc86
line wrap: on
line diff
--- a/mm7_3.cpp	Tue Feb 19 22:06:49 2013 +0200
+++ b/mm7_3.cpp	Wed Feb 20 01:17:13 2013 +0200
@@ -138,7 +138,7 @@
     {
       v11 = v9->pFloors[v10];
       v12 = &pIndoor->pFaces[v11];
-      if ( v12->uAttributes & 1
+      if ( v12->TwoSided()
         || stru_721530.sMaxX > v12->pBounding.x2
         || stru_721530.sMinX < v12->pBounding.x1
         || stru_721530.sMaxY > v12->pBounding.y2
@@ -2257,7 +2257,7 @@
             goto LABEL_36;
           }
           v11 = v4->uLifetime;
-          if ( item->uAttributes & 2 )
+          if (item->uAttributes & 2)
             v11 = *((short *)v2 + 1);
           if ( v8 < v11 )
           {
@@ -4596,7 +4596,7 @@
         v6 = (unsigned __int64)(a2->z * (signed __int64)v4->pFacePlane_old.vNormal.z) >> 16,
         v7 = v5 + v6 + a4b,
         (v16 = v5 + v6 + a4b) == 0)
-    || v7 > 0 && !(v4->uAttributes & 1) )
+    || v7 > 0 && !v4->TwoSided())
     return 0;
   v8 = v4->pFacePlane_old.vNormal.z * a1->z;
   v9 = -(v4->pFacePlane_old.dist + v8 + a1->y * v4->pFacePlane_old.vNormal.y + a1->x * v4->pFacePlane_old.vNormal.x);
@@ -4656,7 +4656,7 @@
         v14 = v10 + v12 + v11,
         v22 = v10 + v12 + v11,
         v13)
-    || v14 > 0 && !(a2->uAttributes & 1) )
+    || v14 > 0 && !a2->TwoSided())
     return 0;
   v15 = a4 * a2->pFacePlane_old.vNormal.y;
   v16 = -(a2->pFacePlane_old.dist + v15 + a3 * a2->pFacePlane_old.vNormal.x + a5 * a2->pFacePlane_old.vNormal.z);
@@ -12384,7 +12384,7 @@
        + pBLVRenderParams->vPartyPos.x * v4->pFacePlane_old.vNormal.x
        + pBLVRenderParams->vPartyPos.y * v4->pFacePlane_old.vNormal.y
        + pBLVRenderParams->vPartyPos.z * v4->pFacePlane_old.vNormal.z;
-    if ( v4->uAttributes & 1 && v4->uSectorID != v12->uSectorID )
+    if (v4->TwoSided() && v4->uSectorID != v12->uSectorID )
       v5 = -v5;
     v11 = v5 > 0;
     if ( v5 <= 0 )
@@ -13599,10 +13599,7 @@
 	  else
         v50 = 1;
     }
-    pRenderer->_4A6776(
-      v47,
-      v49,
-      (Texture *)(pTextureIDs_pMapDirs[v50] != -1 ? (int)&pIcons_LOD->pTextures[pTextureIDs_pMapDirs[v50]] : 0));
+    pRenderer->DrawTransparentRedShade(v47, v49, (Texture *)(pTextureIDs_pMapDirs[v50] != -1 ? (int)&pIcons_LOD->pTextures[pTextureIDs_pMapDirs[v50]] : 0));
   }
   result = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
   v95 = 0;