# HG changeset patch # User Nomad # Date 1365016971 -7200 # Node ID a5456f17ab3643b2550e313a03e23ef4718c2ce7 # Parent df0ffbb70cc6133aea3c3edf5153c1924865d820 Sky looks slightly better. diff -r df0ffbb70cc6 -r a5456f17ab36 mm7_3.cpp --- a/mm7_3.cpp Wed Apr 03 14:52:15 2013 +0600 +++ b/mm7_3.cpp Wed Apr 03 21:22:51 2013 +0200 @@ -6023,10 +6023,25 @@ array_50AC10[3].vWorldViewProjX = pViewport->uViewportBR_X; array_50AC10[3].vWorldViewProjY = pViewport->uViewportTL_Y; + //pParty->sRotationY / 2048.0f + + float t = (GetTickCount() % 96000) / 96000.0f; + array_50AC10[0].u = t - pParty->sRotationY / 1024.0f; + array_50AC10[0].v = t - pParty->sRotationX / 512.0f; + + array_50AC10[1].u = t - pParty->sRotationY / 1024.0f; + array_50AC10[1].v = 1 + t - pParty->sRotationX / 512.0f; + + array_50AC10[2].u = 1 + t - pParty->sRotationY / 1024.0f; + array_50AC10[2].v = 1 + t - pParty->sRotationX / 512.0f; + + array_50AC10[3].u = 1 + t - pParty->sRotationY / 1024.0f; + array_50AC10[3].v = t - pParty->sRotationX / 512.0f; + v36 = (double)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) * 0.5; v33 = 65536 / (signed int)(v36 / tan(0.6457717418670654) + 0.5); - for (int i = 0; i < _this.uNumVertices; ++i) + for (uint i = 0; i < _this.uNumVertices; ++i) { v29 = floorf(array_50AC10[i].vWorldViewProjY + 0.5f); v39 = (unsigned __int64)(_this.ptr_38->field_14 * v33 * (v30 - v29)) / 65536; @@ -6096,14 +6111,16 @@ //array_50AC10[i].vWorldPosition.x = v36 / (_this.pTexture->uTextureHeight * 65536.0); //array_50AC10[i].vWorldPosition.y = 1.0 / (pOutdoorCamera->shading_dist_mist >> 16); //array_50AC10[i].vWorldPosition.z = v35 / (_this.pTexture->uTextureWidth * 65536.0); - array_50AC10[i]._rhw = 1.0;// / (pOutdoorCamera->shading_dist_mist >> 16); + //array_50AC10[i]._rhw = 1.0f / (v18 >> 16); //array_50AC10[i].u = (double)v35 / (65536.0 * _this.pTexture->uTextureWidth); //array_50AC10[i].v = (double)v36 / (65536.0 * _this.pTexture->uTextureHeight); - float t = (GetTickCount() % 96000) / 96000.0f; - array_50AC10[i].u += t; - array_50AC10[i].v += t; - if ( i == _this.uNumVertices - 1 ) - { + //float t = (GetTickCount() % 96000) / 96000.0f; + array_50AC10[i]._rhw = 1.0f; + //array_50AC10[i].u = t; + //array_50AC10[i].v = t; + } + //if ( i == _this.uNumVertices - 1 ) + //{ pRenderer->DrawSkyPolygon(_this.uNumVertices, &_this, pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]); array_50AC10[0].vWorldViewProjY = v38; @@ -6112,9 +6129,8 @@ array_50AC10[3].vWorldViewProjY = v38; pRenderer->DrawSkyPolygon(_this.uNumVertices, &_this, pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]); - return; - } - } + //return; + //} } //----- (00479A53) --------------------------------------------------------