Mercurial > mm7
diff Outdoor.cpp @ 121:3471df3713e2
Teal line at game's viewport bottom fix
author | Nomad |
---|---|
date | Mon, 11 Feb 2013 17:29:51 +0200 |
parents | fe0e317c0de0 |
children | a8ec7e1e18b6 |
line wrap: on
line diff
--- a/Outdoor.cpp Sun Feb 10 23:43:28 2013 +0200 +++ b/Outdoor.cpp Mon Feb 11 17:29:51 2013 +0200 @@ -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();