changeset 59:285e144d0b8b

Слияние
author Ritor1
date Tue, 22 Jan 2013 00:59:20 +0600
parents 764abc86ce90 (diff) ca142e247b73 (current diff)
children b9d70af644f3
files Outdoor.cpp Render.cpp Vis.cpp
diffstat 6 files changed, 13 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/GUIWindow.cpp	Mon Jan 21 18:57:56 2013 +0000
+++ b/GUIWindow.cpp	Tue Jan 22 00:59:20 2013 +0600
@@ -1830,7 +1830,6 @@
       break;
   }
 
-
   auto pWindow = &pWindowList[uNextFreeWindowID];
   pWindow->uFrameWidth = uWidth;
   pWindow->uFrameZ = uX + uWidth - 1;
--- a/Outdoor.cpp	Mon Jan 21 18:57:56 2013 +0000
+++ b/Outdoor.cpp	Tue Jan 22 00:59:20 2013 +0600
@@ -102,7 +102,7 @@
 //LABEL_14:
     pRenderer->DrawSkyD3D();
     pRenderer->DrawBuildingsD3D();
-    //pRenderer->DrawBezierTerrain();
+    pRenderer->DrawBezierTerrain();// Ritor1: sometimes crash
     goto LABEL_16;
   }
   pRenderer->DrawBuildingsSW();
--- a/Render.cpp	Mon Jan 21 18:57:56 2013 +0000
+++ b/Render.cpp	Tue Jan 22 00:59:20 2013 +0600
@@ -7083,7 +7083,7 @@
   if (pRenderD3D)
   {
     pGame->draw_debug_outlines();
-    //DoRenderBillboards_D3D(); //Ritor1: it's temporarily
+    DoRenderBillboards_D3D(); //Ritor1: it's temporarily
     pGame->pStru6Instance->RenderSpecialEffects();
     pRenderD3D->pDevice->EndScene();
   }
@@ -8228,11 +8228,11 @@
   if ( a1->uNumD3DSceneBegins )
   {
     v5 = a2;
-    v6 = (double)HIWORD(a2->sZValue);
+    v6 = (double)a2->sZValue; //Ritor1:begin pBillboardRenderListD3D
     v31 = v6;
     v7 = v6;
-    v8 = Billboard_ProbablyAddToListAndSortByZOrder(LODWORD(v7));
-    if ( BYTE3(v5->uTintColor) )
+    v8 = Billboard_ProbablyAddToListAndSortByZOrder(v7);
+    if ( v5->uTintColor )
       pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Opaque_3;
     else
       pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Transparent;
@@ -8267,8 +8267,7 @@
     pBillboardRenderListD3D[v8].pQuards[0].pos.y = a1b - v26 * v29;
     v27 = v31 * 1000.0;
     v13 = 1.0;
-    pBillboardRenderListD3D[v8].pQuards[0].pos.z = 1.0
-                                                    - 1.0 / (v27 / (double)pOutdoorCamera->shading_dist_mist);
+    pBillboardRenderListD3D[v8].pQuards[0].pos.z = 1.0 - 1.0 / (v27 / (double)pOutdoorCamera->shading_dist_mist);
     v25 = 1.0 / v31;
     pBillboardRenderListD3D[v8].pQuards[0].rhw = v25;
     if ( a3->bUsingSpecular )
@@ -11084,10 +11083,10 @@
 //----- (004A1C1E) --------------------------------------------------------
 void DoRenderBillboards_D3D()
 {
-  ErrD3D(pRenderer->pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, 3u));
-  ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 1u));
+  ErrD3D(pRenderer->pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, 3));
+  ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 1));
   ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, 0));
-  ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, 1u));
+  ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, 1));
 
   for (uint i = pRenderer->uNumBillboardsToDraw - 1; i != (uint)-1; --i)
   {
--- a/Vis.cpp	Mon Jan 21 18:57:56 2013 +0000
+++ b/Vis.cpp	Tue Jan 22 00:59:20 2013 +0600
@@ -1819,7 +1819,7 @@
         v9 = v8 < fDepth,
         v10 = 0,
         v11 = v8 == fDepth,
-        BYTE1(result) = HIBYTE(v7),
+        //BYTE1(result) = HIBYTE(v7),
         v9 | v11) )
   {
     LOWORD(v5) = 0;
@@ -1850,7 +1850,7 @@
           v15 = v14 < fBillboardCenterY,
           v16 = 0,
           v17 = v14 == fBillboardCenterY,
-          BYTE1(result) = HIBYTE(v13),
+          //BYTE1(result) = HIBYTE(v13),
           v14 < fBillboardCenterY) )
     {
       a3a = 0;
--- a/mm7_2.cpp	Mon Jan 21 18:57:56 2013 +0000
+++ b/mm7_2.cpp	Tue Jan 22 00:59:20 2013 +0600
@@ -12980,6 +12980,7 @@
   bDialogueUI_InitializeActor_NPC_ID = 0;
   OnMapLoad();
   pGameLoadingUI_ProgressBar->Progress();
+  memset(&pRenderer->pBillboardRenderListD3D, 0, sizeof(pRenderer->pBillboardRenderListD3D));//Ritor1: fix
   pGameLoadingUI_ProgressBar->Release();
   _flushall();
 }
--- a/mm7_4.cpp	Mon Jan 21 18:57:56 2013 +0000
+++ b/mm7_4.cpp	Tue Jan 22 00:59:20 2013 +0600
@@ -3245,7 +3245,7 @@
     if (pPlayer->field_1AA2 != pFrame->uTextureID - 1 || v22 )
     {
       pPlayer->field_1AA2 = pFrame->uTextureID - 1;
-      pFace = (Texture *)pTextures_PlayerFaces[i][pPlayer->field_1AA2];
+      pFace = (Texture *)pTextures_PlayerFaces[i][pPlayer->field_1AA2];//pFace = (Texture *)pTextures_PlayerFaces[i][pFrame->uTextureID];
       pPortrait = pFace;
       v9 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i];
       if ( pParty->pPartyBuffs[11].uExpireTime )