diff Render.cpp @ 61:6c2cefdaea3e

Слияние
author Ritor1
date Tue, 22 Jan 2013 18:41:17 +0600
parents b9d70af644f3 63cfe63ac4c5
children 80484cf3a683
line wrap: on
line diff
--- a/Render.cpp	Tue Jan 22 01:11:32 2013 +0600
+++ b/Render.cpp	Tue Jan 22 18:41:17 2013 +0600
@@ -1593,18 +1593,18 @@
         v105 = v79;
         v111 = v75 - v77;
         do
-        {
+        {//    
 		  *(float *)&v106 = (double)v105;
-          *(float *)((char *)&ptr_801A08->vWorldPosition.x + v127) = *(float *)&v106;
+          *(float *)((char *)&ptr_801A08->vWorldPosition.x + v127) = *(float *)&v106;//x
           v105 = (64 - *(int *)((char *)terrain_76D9C8 + v70)) << 9;
-          *(float *)((char *)&ptr_801A08->vWorldPosition.y + v127) = (double)v105;
+          *(float *)((char *)&ptr_801A08->vWorldPosition.y + v127) = (double)v105;//y
           v105 = pOutdoor->GetHeightOnTerrain(v112, *(int *)((char *)terrain_76D9C8 + v70));
-          *(float *)((char *)&ptr_801A08->vWorldPosition.z + v127) = (double)v105;
-          *(float *)((char *)&ptr_801A04->vWorldPosition.x + v127) = *(float *)&v106;
+          *(float *)((char *)&ptr_801A08->vWorldPosition.z + v127) = (double)v105;//z
+          *(float *)((char *)&ptr_801A04->vWorldPosition.x + v127) = *(float *)&v106;//x
           v105 = (63 - *(int *)((char *)terrain_76D9C8 + v70)) << 9;
-          *(float *)((char *)&ptr_801A04->vWorldPosition.y + v127) = (double)v105;
+          *(float *)((char *)&ptr_801A04->vWorldPosition.y + v127) = (double)v105;//y
           v105 = pOutdoor->GetHeightOnTerrain(v112, *(int *)((char *)terrain_76D9C8 + v70) + 1);
-          *(float *)((char *)&ptr_801A04->vWorldPosition.z + v127) = (double)v105;
+          *(float *)((char *)&ptr_801A04->vWorldPosition.z + v127) = (double)v105;//z
           if ( !byte_4D864C || !(pGame->uFlags & 0x80) )
           {
             a1->ViewTransform((RenderVertexSoft *)(char *)ptr_801A08 + v127, 1);
@@ -2878,11 +2878,7 @@
         {
           billboard.sZValue = v7;
           billboard.uFlags = v2;
-          pRenderer->TransformBillboard(
-            &billboard,
-            &pSprites_LOD->pHardwareSprites[v6],
-            v8,
-            (RenderBillboard *)(v1 - 40));
+          pRenderer->TransformBillboard(&billboard, &pSprites_LOD->pHardwareSprites[v6], v8, (RenderBillboard *)(v1 - 40));
         }
         else
         {
@@ -8228,11 +8224,11 @@
   if ( a1->uNumD3DSceneBegins )
   {
     v5 = a2;
-    v6 = (double)a2->sZValue; //Ritor1:begin pBillboardRenderListD3D
+    v6 = (double)a2->sZValue;
     v31 = v6;
     v7 = v6;
     v8 = Billboard_ProbablyAddToListAndSortByZOrder(v7);
-    if ( v5->uTintColor )
+    if ( BYTE3(v5->uTintColor) )
       pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Opaque_3;
     else
       pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Transparent;
@@ -11083,10 +11079,10 @@
 //----- (004A1C1E) --------------------------------------------------------
 void DoRenderBillboards_D3D()
 {
-  ErrD3D(pRenderer->pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, 3));
-  ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 1));
+  ErrD3D(pRenderer->pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, 3u));
+  ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 1u));
   ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, 0));
-  ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, 1));
+  ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, 1u));
 
   for (uint i = pRenderer->uNumBillboardsToDraw - 1; i != (uint)-1; --i)
   {