comparison stru10.cpp @ 1640:afc1c3514dd5

Some common code from ODM and BLV RenderParams moved to IndoorCameraD3D
author Nomad
date Tue, 17 Sep 2013 17:40:59 +0200
parents c4ab816fcc5e
children 30c2b575d25c
comparison
equal deleted inserted replaced
1639:b60ddd777d50 1640:afc1c3514dd5
666 666
667 667
668 RenderVertexSoft v25; // [sp+10h] [bp-90h]@20 668 RenderVertexSoft v25; // [sp+10h] [bp-90h]@20
669 memcpy(&v25, pOutBounding, sizeof(RenderVertexSoft)); 669 memcpy(&v25, pOutBounding, sizeof(RenderVertexSoft));
670 670
671 float _dp = (v25.vWorldPosition.x - pBLVRenderParams->vPartyPos.x) * a1.x + 671 float _dp = (v25.vWorldPosition.x - pGame->pIndoorCameraD3D->vPartyPos.x) * a1.x +
672 (v25.vWorldPosition.y - pBLVRenderParams->vPartyPos.y) * a1.y + 672 (v25.vWorldPosition.y - pGame->pIndoorCameraD3D->vPartyPos.y) * a1.y +
673 (v25.vWorldPosition.z - pBLVRenderParams->vPartyPos.z) * a1.z; 673 (v25.vWorldPosition.z - pGame->pIndoorCameraD3D->vPartyPos.z) * a1.z;
674 if (fabs(_dp) < 1e-6f) 674 if (fabs(_dp) < 1e-6f)
675 { 675 {
676 memcpy(&v25, &pOutBounding[1], sizeof(RenderVertexSoft)); 676 memcpy(&v25, &pOutBounding[1], sizeof(RenderVertexSoft));
677 memcpy(&pOutBounding[1], &pOutBounding[3], sizeof(RenderVertexSoft)); 677 memcpy(&pOutBounding[1], &pOutBounding[3], sizeof(RenderVertexSoft));
678 memcpy(&pOutBounding[3], &v25, sizeof(RenderVertexSoft)); 678 memcpy(&pOutBounding[3], &v25, sizeof(RenderVertexSoft));
782 782
783 //----- (0049C720) -------------------------------------------------------- 783 //----- (0049C720) --------------------------------------------------------
784 char stru10::_49C720(RenderVertexSoft *pFaceBounding, IndoorCameraD3D_Vec4 *pPortalDataFrustum) 784 char stru10::_49C720(RenderVertexSoft *pFaceBounding, IndoorCameraD3D_Vec4 *pPortalDataFrustum)
785 { 785 {
786 Vec3_float_ pRayStart; // [sp+4h] [bp-34h]@1 786 Vec3_float_ pRayStart; // [sp+4h] [bp-34h]@1
787 pRayStart.x = (double)pBLVRenderParams->vPartyPos.x; 787 pRayStart.x = (double)pGame->pIndoorCameraD3D->vPartyPos.x;
788 pRayStart.y = (double)pBLVRenderParams->vPartyPos.y; 788 pRayStart.y = (double)pGame->pIndoorCameraD3D->vPartyPos.y;
789 pRayStart.z = (double)pBLVRenderParams->vPartyPos.z; 789 pRayStart.z = (double)pGame->pIndoorCameraD3D->vPartyPos.z;
790 790
791 if (FindFaceNormal(&pFaceBounding[0], &pFaceBounding[1], &pRayStart, &pPortalDataFrustum[0]) && 791 if (FindFaceNormal(&pFaceBounding[0], &pFaceBounding[1], &pRayStart, &pPortalDataFrustum[0]) &&
792 FindFaceNormal(&pFaceBounding[1], &pFaceBounding[2], &pRayStart, &pPortalDataFrustum[1]) && 792 FindFaceNormal(&pFaceBounding[1], &pFaceBounding[2], &pRayStart, &pPortalDataFrustum[1]) &&
793 FindFaceNormal(&pFaceBounding[2], &pFaceBounding[3], &pRayStart, &pPortalDataFrustum[2]) && 793 FindFaceNormal(&pFaceBounding[2], &pFaceBounding[3], &pRayStart, &pPortalDataFrustum[2]) &&
794 FindFaceNormal(&pFaceBounding[3], &pFaceBounding[0], &pRayStart, &pPortalDataFrustum[3])) 794 FindFaceNormal(&pFaceBounding[3], &pFaceBounding[0], &pRayStart, &pPortalDataFrustum[3]))