Mercurial > mm7
changeset 1923:f92e0bab7c78
rename DrawIndoorPolygonSky
author | Ritor1 |
---|---|
date | Wed, 23 Oct 2013 17:30:14 +0600 |
parents | e60d9df73428 |
children | f4d5082b4a39 |
files | Indoor.cpp Outdoor.cpp Render.cpp Render.h |
diffstat | 4 files changed, 20 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/Indoor.cpp Wed Oct 23 17:13:23 2013 +0600 +++ b/Indoor.cpp Wed Oct 23 17:30:14 2013 +0600 @@ -602,7 +602,7 @@ } if (pFace->uAttributes & FACE_INDOOR_SKY) - pRenderer->DrawIndoorPolygonSky(uNumVerticesa, uFaceID); + pRenderer->DrawIndoorSky(uNumVerticesa, uFaceID); else pRenderer->DrawIndoorPolygon(uNumVerticesa, pFace, v27, v28, PID(OBJECT_BModel, uFaceID), v17, 0); return;
--- a/Outdoor.cpp Wed Oct 23 17:13:23 2013 +0600 +++ b/Outdoor.cpp Wed Oct 23 17:30:14 2013 +0600 @@ -113,7 +113,7 @@ if (pRenderer->pRenderD3D) // d3d - redraw always { - pRenderer->DrawSkyD3D(); + pRenderer->DrawOutdoorSkyD3D(); pRenderer->DrawBuildingsD3D(); pRenderer->RenderTerrainD3D(); }
--- 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; } }
--- a/Render.h Wed Oct 23 17:13:23 2013 +0600 +++ b/Render.h Wed Oct 23 17:30:14 2013 +0600 @@ -320,10 +320,10 @@ unsigned int GetActorTintColor(float a2, int tint, int a4, int a5, RenderBillboard *a6); void DrawPolygon(unsigned int uNumVertices, struct Polygon *a3, ODMFace *a4, IDirect3DTexture2 *pTexture); void DrawTerrainPolygon(unsigned int uNumVertices, struct Polygon *a4, IDirect3DTexture2 *a5, bool transparent, bool clampAtTextureBorders); - void DrawSkyPolygon(unsigned int uNumVertices, struct Polygon *pSkyPolygon, IDirect3DTexture2 *pTexture); - void _4A2ED5(signed int a2, struct Polygon *a3, IDirect3DTexture2 *pHwTex); + void DrawOutdoorSkyPolygon(unsigned int uNumVertices, struct Polygon *pSkyPolygon, IDirect3DTexture2 *pTexture); + void DrawIndoorSkyPolygon(signed int uNumVertices, struct Polygon *pSkyPolygon, IDirect3DTexture2 *pTexture); void DrawIndoorPolygon(unsigned int uNumVertices, struct BLVFace *a3, IDirect3DTexture2 *pHwTex, struct Texture *pTex, int uPackedID, unsigned int uColor, int a8); - void DrawIndoorPolygonSky(unsigned int uNumVertices, unsigned int uFaceID); + void DrawIndoorSky(unsigned int uNumVertices, unsigned int uFaceID); void MakeParticleBillboardAndPush_BLV(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle); void MakeParticleBillboardAndPush_ODM(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle); void TransformBillboard(RenderBillboardTransform_local0 *a2, Sprite *pSprite, int dimming_level, RenderBillboard *pBillboard); @@ -357,7 +357,7 @@ void DrawBuildingsD3D(); //struct BSPModel *DrawBuildingsSW(); //int OnOutdoorRedrawSW(); - void DrawSkyD3D(); + void DrawOutdoorSkyD3D(); //int DrawSkySW(struct Span *a1, Polygon *a2, int a3); void PrepareDecorationsRenderList_ODM(); void DrawSpriteObjects_ODM();