Mercurial > mm7
diff IndoorCameraD3D.cpp @ 693:e0a1fccc89b1
map render fixes
author | Gloval |
---|---|
date | Sun, 17 Mar 2013 01:50:34 +0400 |
parents | 066e2b29b30f |
children | d170f23f70d1 |
line wrap: on
line diff
--- a/IndoorCameraD3D.cpp Sat Mar 16 21:57:32 2013 +0400 +++ b/IndoorCameraD3D.cpp Sun Mar 17 01:50:34 2013 +0400 @@ -674,10 +674,10 @@ } else { - if ( (double)(signed int)pViewport->uViewportX <= vert[0].vWorldViewProjX - 1.0 - && (double)(signed int)pViewport->uViewportZ > vert[0].vWorldViewProjX + 2.0 - && (double)(signed int)pViewport->uViewportY <= vert[0].vWorldViewProjY - 1.0 - && (double)(signed int)pViewport->uViewportW > vert[0].vWorldViewProjY + 2.0 + if ( (double)(signed int)pViewport->uViewportTL_X <= vert[0].vWorldViewProjX - 1.0 + && (double)(signed int)pViewport->uViewportBR_X > vert[0].vWorldViewProjX + 2.0 + && (double)(signed int)pViewport->uViewportTL_Y <= vert[0].vWorldViewProjY - 1.0 + && (double)(signed int)pViewport->uViewportBR_Y > vert[0].vWorldViewProjY + 2.0 && uNumD3DVertices > 0 ) { v13 = (char *)&pD3DVertices[0].diffuse; @@ -1609,7 +1609,7 @@ v7 = 1.0 / pVertices[i].vWorldViewPosition.x; pVertices[i].vWorldViewProjX = pVertices[i].vWorldViewPosition.y * fov * v7 + screenCenterX; - pVertices[i].vWorldViewProjY = (signed int)pViewport->uViewportW - (pVertices[i].vWorldViewPosition.z * fov * v7 + screenCenterY); + pVertices[i].vWorldViewProjY = (signed int)pViewport->uViewportBR_Y - (pVertices[i].vWorldViewPosition.z * fov * v7 + screenCenterY); } else { @@ -1620,12 +1620,12 @@ if ( a4 ) { // __debugbreak(); - v8 = (double)(signed int)pViewport->uViewportZ; + v8 = (double)(signed int)pViewport->uViewportBR_X; if ( v8 >= pVertices[i].vWorldViewProjX ) v9 = pVertices[i].vWorldViewProjX; else v9 = v8; - v10 = (double)(signed int)pViewport->uViewportX; + v10 = (double)(signed int)pViewport->uViewportTL_X; if ( v10 <= v9 ) { if ( v8 >= pVertices[i].vWorldViewProjX) @@ -1637,12 +1637,12 @@ v8 = uNumVerticesa; } pVertices[i].vWorldViewProjX = v8; - v11 = (double)(signed int)pViewport->uViewportW; + v11 = (double)(signed int)pViewport->uViewportBR_Y; if ( v11 >= pVertices[i].vWorldViewProjY) v12 = pVertices[i].vWorldViewProjY; else v12 = v11; - v13 = (double)(signed int)pViewport->uViewportY; + v13 = (double)(signed int)pViewport->uViewportTL_Y; if ( v13 <= v12 ) { if ( v11 >= pVertices[i].vWorldViewProjY) @@ -1678,7 +1678,7 @@ *a5 = floorf(a2a + 0.5f); a2b = (double)z * fov * v6 + screenCenterY; //v8 = a2b + 6.7553994e15; - *a6 = pViewport->uViewportW - floorf(a2b + 0.5f); + *a6 = pViewport->uViewportBR_Y - floorf(a2b + 0.5f); } else {