Mercurial > mm7
diff Render.cpp @ 1923:f92e0bab7c78
rename DrawIndoorPolygonSky
author | Ritor1 |
---|---|
date | Wed, 23 Oct 2013 17:30:14 +0600 |
parents | e60d9df73428 |
children | f4d5082b4a39 |
line wrap: on
line diff
--- a/Render.cpp Wed Oct 23 17:13:23 2013 +0600 +++ b/Render.cpp Wed Oct 23 17:30:14 2013 +0600 @@ -4925,7 +4925,7 @@ // 4D864C: using guessed type char byte_4D864C; //----- (004A2DA3) -------------------------------------------------------- -void Render::DrawSkyPolygon(unsigned int uNumVertices, struct Polygon *pSkyPolygon, IDirect3DTexture2 *pTexture) +void Render::DrawOutdoorSkyPolygon(unsigned int uNumVertices, struct Polygon *pSkyPolygon, IDirect3DTexture2 *pTexture) { int v7; // eax@7 @@ -4962,7 +4962,7 @@ } //----- (004A2ED5) -------------------------------------------------------- -void Render::_4A2ED5(signed int a2, struct Polygon *a3, IDirect3DTexture2 *pHwTex) +void Render::DrawIndoorSkyPolygon(signed int uNumVertices, struct Polygon *pSkyPolygon, IDirect3DTexture2 *pTexture) { signed int v4; // edi@2 int v5; // eax@3 @@ -4975,15 +4975,15 @@ if ( this->uNumD3DSceneBegins ) { - v4 = a2; - if ( a2 >= 3 ) + v4 = uNumVertices; + if ( uNumVertices >= 3 ) { ErrD3D(pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, D3DTADDRESS_WRAP)); - v5 = 31 - (a3->dimming_level & 0x1F); + v5 = 31 - (pSkyPolygon->dimming_level & 0x1F); if ( v5 < pOutdoor->max_terrain_dimming_level ) v5 = pOutdoor->max_terrain_dimming_level; v6 = 8 * v5 | ((8 * v5 | (v5 << 11)) << 8); - for (uint i = 0; i < a2; ++i) + 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; @@ -4995,19 +4995,18 @@ d3d_vertex_buffer[i].texcoord.y = array_507D30[i].v; } - ErrD3D(pRenderD3D->pDevice->SetTexture(0, pHwTex)); + ErrD3D(pRenderD3D->pDevice->SetTexture(0, pTexture)); ErrD3D(pRenderD3D->pDevice->DrawPrimitive(D3DPT_TRIANGLEFAN, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1, d3d_vertex_buffer, - a2, + uNumVertices, 28)); } } } - //----- (00479A53) -------------------------------------------------------- -void Render::DrawIndoorPolygonSky(unsigned int uNumVertices, unsigned int uFaceID) +void Render::DrawIndoorSky(unsigned int uNumVertices, unsigned int uFaceID) { BLVFace *pFace; // esi@1 //unsigned int v3; // edi@1 @@ -5371,7 +5370,7 @@ while ( HIDWORD(v69) ); } pSkyPoligon.uNumVertices = v47; - pRenderer->_4A2ED5(v47, &pSkyPoligon, pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPoligon.uTileBitmapID]); + pRenderer->DrawIndoorSkyPolygon(v47, &pSkyPoligon, pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPoligon.uTileBitmapID]); *(float *)&v74 = 0.0; if ( SLODWORD(v73) > 0 ) { @@ -5399,7 +5398,7 @@ v59 = v74; //v27 = pRenderer; LABEL_18: - pRenderer->_4A2ED5(v59, v60, v61); + pRenderer->DrawIndoorSkyPolygon(v59, v60, v61); } @@ -9046,7 +9045,7 @@ return; } //----- (00479543) -------------------------------------------------------- -void Render::DrawSkyD3D() +void Render::DrawOutdoorSkyD3D() { int v9; // eax@4 int v10; // ebx@4 @@ -9189,12 +9188,12 @@ array_50AC10[i].vWorldViewPosition.x = (double)0x2000;//pODMRenderParams->shading_dist_mist array_50AC10[i]._rhw = 1.0 / (double)(v18 >> 16); } - pRenderer->DrawSkyPolygon(pSkyPolygon.uNumVertices, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPolygon.uTileBitmapID]); + pRenderer->DrawOutdoorSkyPolygon(pSkyPolygon.uNumVertices, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPolygon.uTileBitmapID]); array_50AC10[0].vWorldViewProjY = (double)v38; array_50AC10[1].vWorldViewProjY = array_50AC10[1].vWorldViewProjY + 30.0; array_50AC10[2].vWorldViewProjY = array_50AC10[2].vWorldViewProjY + 30.0; array_50AC10[3].vWorldViewProjY = (double)v38; - pRenderer->DrawSkyPolygon(pSkyPolygon.uNumVertices, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPolygon.uTileBitmapID]); + pRenderer->DrawOutdoorSkyPolygon(pSkyPolygon.uNumVertices, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPolygon.uTileBitmapID]); return; } }