# HG changeset patch # User Ritor1 # Date 1360595483 -21600 # Node ID fa3b930d0ccf4eb33882f7847062ba0effe17838 # Parent b5c3f448cd741677539ff4909c4abf166a411111# Parent 3471df3713e28b00820968f8987a033e2e4569f1 Слияние diff -r b5c3f448cd74 -r fa3b930d0ccf Game.cpp --- a/Game.cpp Mon Feb 11 21:09:13 2013 +0600 +++ b/Game.cpp Mon Feb 11 21:11:23 2013 +0600 @@ -1,3 +1,5 @@ +#include + #include "Game.h" #include "Party.h" #include "IndoorCamera.h" @@ -104,6 +106,7 @@ pIndoor->Draw(); else if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) pOutdoor->Draw(); + else assert(false); if (pRenderer->pRenderD3D) { diff -r b5c3f448cd74 -r fa3b930d0ccf Outdoor.cpp --- a/Outdoor.cpp Mon Feb 11 21:09:13 2013 +0600 +++ b/Outdoor.cpp Mon Feb 11 21:11:23 2013 +0600 @@ -47,13 +47,13 @@ void OutdoorLocation::ExecDraw(unsigned int bRedraw) { int v1; // edi@1 - unsigned int v2; // ebx@1 + //unsigned int v2; // ebx@1 int v3; // ST18_4@3 int v4; // ST04_4@19 int v5; // eax@19 v1 = 0; - v2 = bRedraw; + //v2 = bRedraw; if ( viewparams->field_54 ) v1 = 2; pIndoorCamera->sRotationX = pParty->sRotationX; @@ -65,7 +65,7 @@ pIndoorCamera->field_4C = v1; pIndoorCamera->pos.y = pParty->vPosition.y - pParty->y_rotation_granularity * ((stru_5C6E00->SinCos(pParty->sRotationY)) >> 16); pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel; - if ( v2 || pRenderer->pRenderD3D ) + if (bRedraw || pRenderer->pRenderD3D) { ResetStru148s(); pOutdoorCamera->RotationToInts(); @@ -73,7 +73,7 @@ } pIndoorCamera->uMapGridCellX = WorldPosToGridCellX(pParty->vPosition.x); pIndoorCamera->uMapGridCellZ = WorldPosToGridCellZ(pParty->vPosition.y); - if ( v2 ) + if (bRedraw) { Software_ResetNewEdges(); sub_487DA9(); @@ -84,7 +84,7 @@ pOutdoor->UpdateSunlightVectors(); pOutdoor->UpdateFog(); pGame->pIndoorCameraD3D->Reset_list_0037C(); - if ( !v2 ) + if (!bRedraw) { if ( !pRenderer->pRenderD3D ) { @@ -97,7 +97,7 @@ pRenderer->RenderTerrainD3D();//pRenderer->DrawBezierTerrain();// Ritor1: temporarily lag } } - else if ( pRenderer->pRenderD3D ) + else if (pRenderer->pRenderD3D) { pRenderer->DrawSkyD3D(); pRenderer->DrawBuildingsD3D(); @@ -119,7 +119,7 @@ } pGame->PushStationaryLights(-1); pGame->PrepareBloodsplats(); - if ( v2 ) + if (bRedraw) { v4 = WorldPosToGridCellZ(pParty->vPosition.y); v5 = WorldPosToGridCellX(pParty->vPosition.x); @@ -147,12 +147,11 @@ //----- (00441CFF) -------------------------------------------------------- void OutdoorLocation::Draw() { - unsigned int v0; // ecx@1 + bool redrawWorld = true; + if ( !(pParty->uFlags & 2) && !(pGame->uFlags2 & 1) ) + redrawWorld = false; + pOutdoor->ExecDraw(redrawWorld); - v0 = 1; - if ( !(pParty->uFlags & 2) && !(pGame->uFlags2 & 1) ) - v0 = 0; - pOutdoor->ExecDraw(v0); pGame->DrawParticles(); pWeather->Draw(); array_5118E8._440F07(); diff -r b5c3f448cd74 -r fa3b930d0ccf Render.cpp --- a/Render.cpp Mon Feb 11 21:09:13 2013 +0600 +++ b/Render.cpp Mon Feb 11 21:11:23 2013 +0600 @@ -1735,7 +1735,7 @@ int v63; // [sp+50h] [bp-8h]@3 int v64; // [sp+57h] [bp-1h]@2 int v62; - struct IndoorCameraD3D *pIndoorCameraD3D; + //struct IndoorCameraD3D *pIndoorCameraD3D; v63 = 0; // basic optimizations @@ -1771,9 +1771,9 @@ pTerrainVertices[z * 128 + x].vWorldPosition.x = (-64 + (signed)x) * 512; pTerrainVertices[z * 128 + x].vWorldPosition.y = (64 - (signed)z) * 512; pTerrainVertices[z * 128 + x].vWorldPosition.z = 32 * pOutdoor->pTerrain.pHeightmap[z * 128 + x]; - pIndoorCameraD3D = pGame->pIndoorCameraD3D; - pIndoorCameraD3D->ViewTransform(&pTerrainVertices[z * 128 + x], 1); - pIndoorCameraD3D->Project(&pTerrainVertices[z * 128 + x], 1, 0); + //pIndoorCameraD3D = pGame->pIndoorCameraD3D; + pGame->pIndoorCameraD3D->ViewTransform(&pTerrainVertices[z * 128 + x], 1); + pGame->pIndoorCameraD3D->Project(&pTerrainVertices[z * 128 + x], 1, 0); } } for (unsigned int z = uStartZ; z < uEndZ - 1; ++z) diff -r b5c3f448cd74 -r fa3b930d0ccf mm7_4.cpp --- a/mm7_4.cpp Mon Feb 11 21:09:13 2013 +0600 +++ b/mm7_4.cpp Mon Feb 11 21:11:23 2013 +0600 @@ -6827,7 +6827,7 @@ pSrc + 8 + 460/*462*/ + y * 640, 174/*172*/ * sizeof(__int16)); } - for (uint y = 351/*352*/; y < 480; ++y) + for (uint y = 352; y < 480; ++y) memcpy(pDst + y * Dst.lPitch / 2, pSrc + y * 640, 640 * sizeof(__int16)); @@ -6841,7 +6841,7 @@ v22 = 4 * ((Dst.lPitch / 4) + v9); v21 = 4 * v9 + 1280; - auto uNumLines = pViewport->uViewportW - pViewport->uViewportY + 1; + //auto uNumLines = pViewport->uViewportW - pViewport->uViewportY + 1; //v26 = (LPVOID)(pViewport->uViewportW - pViewport->uViewportY + 1); v10 = (int)pSrc_x1y1; v11 = (int)pDst_x1y1;