diff Render.cpp @ 665:92bc2544249d

Слияние
author Ritor1
date Wed, 13 Mar 2013 10:13:02 +0600
parents 7747161ea5b5
children 9824e2eeee30
line wrap: on
line diff
--- a/Render.cpp	Wed Mar 13 10:12:52 2013 +0600
+++ b/Render.cpp	Wed Mar 13 10:13:02 2013 +0600
@@ -208,10 +208,10 @@
       if ( v2 != -1 )
       {
         if ( pRenderer->pRenderD3D )
-          pRenderer->DrawBillboard_Indoor(&soft_billboard, &pSprites_LOD->pHardwareSprites[v2], p->uPaletteSubindex);
+          pRenderer->DrawBillboard_Indoor(&soft_billboard, &pSprites_LOD->pHardwareSprites[v2], p->dimming_level);
         else
         {
-          soft_billboard.pPalette = PaletteManager::Get_Dark_or_Red_LUT(p->uPalette, p->uPaletteSubindex, 1);
+          soft_billboard.pPalette = PaletteManager::Get_Dark_or_Red_LUT(p->uPalette, p->dimming_level, 1);
           if (p->field_1E & 0x0100)
             soft_billboard.pPalette = pPaletteManager->field_261600[p->uPalette];
           if ( !(soft_billboard.uFlags & 0x40) && soft_billboard.uFlags & 0x80 )
@@ -3027,7 +3027,7 @@
       if (pRenderer->pRenderD3D)
         pRenderer->TransformBillboard(&billboard,
                                       &pSprites_LOD->pHardwareSprites[pBillboard->uHwSpriteID],
-                                      pBillboard->uPaletteSubindex, pBillboard);
+                                      pBillboard->dimming_level, pBillboard);
       else
       {
           assert(false);
@@ -3239,7 +3239,7 @@
                   LOWORD(v26) = 0;
                   v27 = (object->uAttributes & 0x20) == 0;
                   v3->sZValue = v26 + (8 * i | OBJECT_Item);
-                  v3->uPaletteSubindex = 0;
+                  v3->dimming_level = 0;
                   v3->uTintColor = 0;
                   if ( !v27 )
                   {
@@ -3747,7 +3747,7 @@
                     LOWORD(v30) = 0;
                     v27->uIndoorSectorID = 0;
                     v27->sZValue = v30 + v31;
-                    v27->uPaletteSubindex = 0;
+                    v27->dimming_level = 0;
                     v27->pSpriteFrame = v8;
                     v27->uTintColor = 0;
                   }
@@ -8075,7 +8075,7 @@
 
 
 //----- (004A43B1) --------------------------------------------------------
-void Render::DrawBillboard_Indoor(RenderBillboardTransform_local0 *pSoftBillboard, Sprite *a3, int uPaletteSubindex)
+void Render::DrawBillboard_Indoor(RenderBillboardTransform_local0 *pSoftBillboard, Sprite *a3, int dimming_level)
 {
   RenderBillboardTransform_local0 *v4; // ebx@2
   double v5; // st7@2
@@ -8116,10 +8116,10 @@
     pSoftBillboarda = v5;
     v6 = v5;
     v7 = Billboard_ProbablyAddToListAndSortByZOrder(LODWORD(v6));
-    v8 = uPaletteSubindex;
+    v8 = dimming_level;
     v9 = v7;
-    v28 = uPaletteSubindex & 0xFF000000;
-    if ( uPaletteSubindex & 0xFF000000 )
+    v28 = dimming_level & 0xFF000000;
+    if ( dimming_level & 0xFF000000 )
       pBillboardRenderListD3D[v9].uOpacity = RenderBillboardD3D::Opaque_3;
     else
       pBillboardRenderListD3D[v9].uOpacity = RenderBillboardD3D::Transparent;
@@ -8137,14 +8137,14 @@
       v31 = v31 * -1.0;
     if ( v4->uTintColor && v26->bTinting )
     {
-      v11 = ::GetActorTintColor(v8, 0, pSoftBillboarda, 0, 0);
+      v11 = ::GetActorTintColor(dimming_level, 0, pSoftBillboarda, 0, 0);
       v12 = sub_4A19D8(v4->uTintColor, v11);
       if ( v28 )
         v12 = (unsigned int)((char *)&array_77EC08[1852].pEdgeList1[17] + 3) & ((unsigned int)v12 >> 1);
     }
     else
     {
-      v12 = ::GetActorTintColor(v8, 0, pSoftBillboarda, 0, 0);
+      v12 = ::GetActorTintColor(dimming_level, 0, pSoftBillboarda, 0, 0);
     }
     v13 = (double)v25;
     pBillboardRenderListD3D[v9].pQuards[0].specular = 0;
@@ -8554,7 +8554,7 @@
 
 
 //----- (004A4023) --------------------------------------------------------
-void Render::TransformBillboard(RenderBillboardTransform_local0 *a2, Sprite *pSprite, int paletteSubindex, RenderBillboard *pBillboard)
+void Render::TransformBillboard(RenderBillboardTransform_local0 *a2, Sprite *pSprite, int dimming_level, RenderBillboard *pBillboard)
 {
   unsigned int v8; // esi@2
   double v14; // st6@14
@@ -8581,7 +8581,7 @@
   v30 = (a2->_screenspace_x_scaler_packedfloat & 0xFFFF) / 65530.0 + HIWORD(a2->_screenspace_x_scaler_packedfloat);
   v29 = (a2->_screenspace_y_scaler_packedfloat & 0xFFFF) / 65530.0 + HIWORD(a2->_screenspace_y_scaler_packedfloat);
 
-  unsigned int diffuse = ::GetActorTintColor(paletteSubindex, 0, a2->zbuffer_depth, 0, pBillboard);
+  unsigned int diffuse = ::GetActorTintColor(dimming_level, 0, a2->zbuffer_depth, 0, pBillboard);
   if (a2->uTintColor & 0x00FFFFFF && bTinting)
   {
     diffuse = sub_4A19D8(a2->uTintColor, diffuse);