# HG changeset patch # User Ritor1 # Date 1382606695 -21600 # Node ID bd5c3f33bff447167239f85006fd6a9eab1ba468 # Parent 68f2d9d3a1d906c4600c61b55ff7fa22c8586f55 m diff -r 68f2d9d3a1d9 -r bd5c3f33bff4 Render.cpp --- a/Render.cpp Thu Oct 24 15:24:14 2013 +0600 +++ b/Render.cpp Thu Oct 24 15:24:55 2013 +0600 @@ -4974,18 +4974,17 @@ v5 = 31 - (pSkyPolygon->dimming_level & 0x1F); if ( v5 < pOutdoor->max_terrain_dimming_level ) v5 = pOutdoor->max_terrain_dimming_level; - for (uint i = 0; i < uNumVertices; ++i) - { - d3d_vertex_buffer[i].pos.x = array_507D30[i].vWorldViewProjX; - d3d_vertex_buffer[i].pos.y = array_507D30[i].vWorldViewProjY; - d3d_vertex_buffer[i].pos.z = 1.0 - 1.0 / array_507D30[i].vWorldViewPosition.y; - d3d_vertex_buffer[i].rhw = array_507D30[i]._rhw; - d3d_vertex_buffer[i].diffuse = 8 * v5 | ((8 * v5 | (v5 << 11)) << 8); - d3d_vertex_buffer[i].specular = 0; - d3d_vertex_buffer[i].texcoord.x = array_507D30[i].u; - d3d_vertex_buffer[i].texcoord.y = array_507D30[i].v; - } - + for (uint i = 0; i < uNumVertices; ++i) + { + d3d_vertex_buffer[i].pos.x = array_507D30[i].vWorldViewProjX; + d3d_vertex_buffer[i].pos.y = array_507D30[i].vWorldViewProjY; + d3d_vertex_buffer[i].pos.z = 1.0 - 1.0 / array_507D30[i].vWorldViewPosition.y; + d3d_vertex_buffer[i].rhw = array_507D30[i]._rhw; + d3d_vertex_buffer[i].diffuse = 8 * v5 | ((8 * v5 | (v5 << 11)) << 8); + d3d_vertex_buffer[i].specular = 0; + d3d_vertex_buffer[i].texcoord.x = array_507D30[i].u; + d3d_vertex_buffer[i].texcoord.y = array_507D30[i].v; + } ErrD3D(pRenderD3D->pDevice->SetTexture(0, pTexture)); ErrD3D(pRenderD3D->pDevice->DrawPrimitive(D3DPT_TRIANGLEFAN, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1, d3d_vertex_buffer, uNumVertices, 28));