Mercurial > mm7
changeset 1937:bd5c3f33bff4
m
author | Ritor1 |
---|---|
date | Thu, 24 Oct 2013 15:24:55 +0600 |
parents | 68f2d9d3a1d9 |
children | f67d6d5de42a |
files | Render.cpp |
diffstat | 1 files changed, 11 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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));