Mercurial > mm7
comparison LightmapBuilder.cpp @ 190:9b77686e2239
Merge
author | Gloval |
---|---|
date | Sat, 16 Feb 2013 00:44:38 +0400 |
parents | d65528fc3bda |
children | 55d6b756e03a |
comparison
equal
deleted
inserted
replaced
189:038a4d09406f | 190:9b77686e2239 |
---|---|
1628 v7 = pGame->pIndoorCameraD3D->LoadTextureAndGetHardwarePtr("effpar03"); | 1628 v7 = pGame->pIndoorCameraD3D->LoadTextureAndGetHardwarePtr("effpar03"); |
1629 if ( pRenderer->bUsingSpecular ) | 1629 if ( pRenderer->bUsingSpecular ) |
1630 pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, 0); | 1630 pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, 0); |
1631 if ( !byte_4D864C || !(pGame->uFlags & 1) ) | 1631 if ( !byte_4D864C || !(pGame->uFlags & 1) ) |
1632 { | 1632 { |
1633 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 1u)); | 1633 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE)); |
1634 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, 0)); | 1634 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, FALSE)); |
1635 ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, v7)); | 1635 ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, v7)); |
1636 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, 2u)); | 1636 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE)); |
1637 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, 2u)); | 1637 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ONE)); |
1638 v13 = a3; | 1638 v13 = a3; |
1639 v33 = 1.0; | 1639 v33 = 1.0; |
1640 v32 = 1.0; | 1640 v32 = 1.0; |
1641 *(float *)&arg4 = 1.0; | 1641 *(float *)&arg4 = 1.0; |
1642 if ( a3 ) | 1642 if ( a3 ) |
1679 v14 = v38; | 1679 v14 = v38; |
1680 } | 1680 } |
1681 } | 1681 } |
1682 } | 1682 } |
1683 v15 = pRenderer->pRenderD3D->pDevice; | 1683 v15 = pRenderer->pRenderD3D->pDevice; |
1684 ErrD3D(v15->SetRenderState(D3DRENDERSTATE_SRCBLEND, 2u)); | 1684 ErrD3D(v15->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE)); |
1685 ErrD3D(v15->SetRenderState(D3DRENDERSTATE_DESTBLEND, 1u)); | 1685 ErrD3D(v15->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ZERO)); |
1686 ErrD3D(v15->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 0)); | 1686 ErrD3D(v15->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, FALSE)); |
1687 ErrD3D(v15->SetRenderState(D3DRENDERSTATE_DITHERENABLE, 1u)); | 1687 ErrD3D(v15->SetRenderState(D3DRENDERSTATE_DITHERENABLE, TRUE)); |
1688 } | 1688 } |
1689 if ( pRenderer->bUsingSpecular ) | 1689 if ( pRenderer->bUsingSpecular ) |
1690 { | 1690 { |
1691 //LODWORD(v30) = 1; | 1691 //LODWORD(v30) = 1; |
1692 //v29 = 28; | 1692 //v29 = 28; |
1693 //v28 = (Lightmap *)pRenderer->pRenderD3D->pDevice; | 1693 //v28 = (Lightmap *)pRenderer->pRenderD3D->pDevice; |
1694 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, 1)); | 1694 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, TRUE)); |
1695 //v30 = pRenderer->uFogColor; | 1695 //v30 = pRenderer->uFogColor; |
1696 //v23 = pRenderer->pRenderD3D->pDevice; | 1696 //v23 = pRenderer->pRenderD3D->pDevice; |
1697 //v29 = 34; | 1697 //v29 = 34; |
1698 //v28 = (Lightmap *)v23; | 1698 //v28 = (Lightmap *)v23; |
1699 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGCOLOR, pRenderer->uFogColor)); | 1699 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGCOLOR, pRenderer->uFogColor)); |
1700 //v28 = (Lightmap *)pRenderer->pRenderD3D->pDevice; | 1700 //v28 = (Lightmap *)pRenderer->pRenderD3D->pDevice; |
1701 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGTABLEMODE, false)); | 1701 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGTABLEMODE, 0)); |
1702 } | 1702 } |
1703 } | 1703 } |
1704 return 1; | 1704 return 1; |
1705 } | 1705 } |
1706 | 1706 |
1795 { | 1795 { |
1796 if (!std__vector_183808_size) | 1796 if (!std__vector_183808_size) |
1797 return; | 1797 return; |
1798 | 1798 |
1799 if (pRenderer->bUsingSpecular) | 1799 if (pRenderer->bUsingSpecular) |
1800 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, 0)); | 1800 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, FALSE)); |
1801 | 1801 |
1802 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, 1)); | 1802 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_NONE)); |
1803 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, 0)); | 1803 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, FALSE)); |
1804 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 1u)); | 1804 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE)); |
1805 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, 0)); | 1805 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, FALSE)); |
1806 | 1806 |
1807 auto pTex = pGame->pIndoorCameraD3D->LoadTextureAndGetHardwarePtr("effpar03"); | 1807 auto pTex = pGame->pIndoorCameraD3D->LoadTextureAndGetHardwarePtr("effpar03"); |
1808 ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, pTex)); | 1808 ErrD3D(pRenderer->pRenderD3D->pDevice->SetTexture(0, pTex)); |
1809 | 1809 |
1810 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, 2u)); | 1810 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE)); |
1811 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, 2u)); | 1811 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ONE)); |
1812 | 1812 |
1813 DrawLightmaps2(0.00050000002); | 1813 DrawLightmaps2(0.00050000002); |
1814 | 1814 |
1815 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, 2u)); | 1815 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE)); |
1816 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, 1u)); | 1816 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ZERO)); |
1817 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, 0)); | 1817 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, FALSE)); |
1818 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, 1u)); | 1818 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DITHERENABLE, TRUE)); |
1819 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, 1u)); | 1819 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ZWRITEENABLE, TRUE)); |
1820 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, 2)); | 1820 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_CW)); |
1821 | 1821 |
1822 if (pRenderer->bUsingSpecular) | 1822 if (pRenderer->bUsingSpecular) |
1823 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, 1u)); | 1823 ErrD3D(pRenderer->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE, TRUE)); |
1824 } | 1824 } |