comparison Render.cpp @ 121:3471df3713e2

Teal line at game's viewport bottom fix
author Nomad
date Mon, 11 Feb 2013 17:29:51 +0200
parents 23b213c3f8e1
children f4d7a9a8c363 77ad59c17864
comparison
equal deleted inserted replaced
120:fe0e317c0de0 121:3471df3713e2
1733 int v57; // [sp+38h] [bp-20h]@36 1733 int v57; // [sp+38h] [bp-20h]@36
1734 int v58; // [sp+3Ch] [bp-1Ch]@8 1734 int v58; // [sp+3Ch] [bp-1Ch]@8
1735 int v63; // [sp+50h] [bp-8h]@3 1735 int v63; // [sp+50h] [bp-8h]@3
1736 int v64; // [sp+57h] [bp-1h]@2 1736 int v64; // [sp+57h] [bp-1h]@2
1737 int v62; 1737 int v62;
1738 struct IndoorCameraD3D *pIndoorCameraD3D; 1738 //struct IndoorCameraD3D *pIndoorCameraD3D;
1739 1739
1740 v63 = 0; 1740 v63 = 0;
1741 // basic optimizations 1741 // basic optimizations
1742 unsigned int uStartX, uEndX, 1742 unsigned int uStartX, uEndX,
1743 uStartZ, uEndZ; 1743 uStartZ, uEndZ;
1769 for (unsigned int x = uStartX; x < uEndX; ++x) 1769 for (unsigned int x = uStartX; x < uEndX; ++x)
1770 { 1770 {
1771 pTerrainVertices[z * 128 + x].vWorldPosition.x = (-64 + (signed)x) * 512; 1771 pTerrainVertices[z * 128 + x].vWorldPosition.x = (-64 + (signed)x) * 512;
1772 pTerrainVertices[z * 128 + x].vWorldPosition.y = (64 - (signed)z) * 512; 1772 pTerrainVertices[z * 128 + x].vWorldPosition.y = (64 - (signed)z) * 512;
1773 pTerrainVertices[z * 128 + x].vWorldPosition.z = 32 * pOutdoor->pTerrain.pHeightmap[z * 128 + x]; 1773 pTerrainVertices[z * 128 + x].vWorldPosition.z = 32 * pOutdoor->pTerrain.pHeightmap[z * 128 + x];
1774 pIndoorCameraD3D = pGame->pIndoorCameraD3D; 1774 //pIndoorCameraD3D = pGame->pIndoorCameraD3D;
1775 pIndoorCameraD3D->ViewTransform(&pTerrainVertices[z * 128 + x], 1); 1775 pGame->pIndoorCameraD3D->ViewTransform(&pTerrainVertices[z * 128 + x], 1);
1776 pIndoorCameraD3D->Project(&pTerrainVertices[z * 128 + x], 1, 0); 1776 pGame->pIndoorCameraD3D->Project(&pTerrainVertices[z * 128 + x], 1, 0);
1777 } 1777 }
1778 } 1778 }
1779 for (unsigned int z = uStartZ; z < uEndZ - 1; ++z) 1779 for (unsigned int z = uStartZ; z < uEndZ - 1; ++z)
1780 { 1780 {
1781 for (unsigned int x = uStartX; x < uEndX - 1; ++x) 1781 for (unsigned int x = uStartX; x < uEndX - 1; ++x)