Mercurial > might-and-magic-trilogy
diff Vis.cpp @ 87:c0cf9393af64
Слияние
author | Ritor1 |
---|---|
date | Mon, 29 Oct 2012 09:28:08 +0600 |
parents | 8b0c4d626477 |
children | 918dca162239 |
line wrap: on
line diff
--- a/Vis.cpp Mon Oct 22 09:20:49 2012 +0600 +++ b/Vis.cpp Mon Oct 29 09:28:08 2012 +0600 @@ -93,7 +93,7 @@ } } pGame->pIndoorCameraD3D->ViewTransform(static_sub_4C1026_array_F8F200, v7); - pGame->pIndoorCameraD3D->_436BB7_project_and_stuff(static_sub_4C1026_array_F8F200, v7, 1); + pGame->pIndoorCameraD3D->Project(static_sub_4C1026_array_F8F200, v7, 1); v15 = this; SortVectors_x(static_sub_4C1026_array_F8F200, 0, v7 - 1); if ( static_sub_4C1026_array_F8F200[0].vWorldViewPosition.x > (double)a4 @@ -369,7 +369,7 @@ v7 = v6; if ( is_part_of_selection(&pIndoor->pFaces[v6], a5) ) { - if ( !pGame->pIndoorCameraD3D->IsFaceFacedTowardsCamera(&pIndoor->pFaces[v7]) ) + if ( !pGame->pIndoorCameraD3D->IsCulled(&pIndoor->pFaces[v7]) ) { if ( Intersect_Ray_Face(pRay, pRay + 1, &fDepth, &a1, &pIndoor->pFaces[v7], 0xFFFFFFFFu) ) { @@ -1419,6 +1419,8 @@ Vis *thisa; // [sp+68h] [bp-8h]@1 RenderVertexSoft *v16; // [sp+6Ch] [bp-4h]@2 + __debugbreak(); + result = sRight; thisa = this; if ( sRight > sLeft ) @@ -1600,20 +1602,17 @@ //----- (004C0646) -------------------------------------------------------- bool Vis::PickMouse(float fDepth, float fMouseX, float fMouseY, stru157 *a5, stru157 *a6) { - Vis *v6; // esi@1 - bool result; // eax@4 RenderVertexSoft pMouseRay[2]; // [sp+1Ch] [bp-60h]@1 - v6 = this; - this->stru1.uNumPointers = 0; + stru1.uNumPointers = 0; CastPickRay(pMouseRay, fMouseX, fMouseY, fDepth); - PickBillboards(fDepth, fMouseX, fMouseY, &v6->stru1, a5); + PickBillboards(fDepth, fMouseX, fMouseY, &stru1, a5); if (uCurrentlyLoadedLevelType == LEVEL_Indoor) - PickIndoor(fDepth, pMouseRay, &v6->stru1, a6); + PickIndoor(fDepth, pMouseRay, &stru1, a6); else - PickOutdoor(fDepth, pMouseRay, &v6->stru1, a6, 0); - v6->stru1.create_object_pointers(0); - sort_object_pointers(v6->stru1.array_1804, 0, v6->stru1.uNumPointers - 1); + PickOutdoor(fDepth, pMouseRay, &stru1, a6, 0); + stru1.create_object_pointers(0); + sort_object_pointers(stru1.array_1804, 0, stru1.uNumPointers - 1); return true; } @@ -2000,7 +1999,7 @@ if ( v5 < (signed int)pIndoor->uNumFaces ) { v6 = &pIndoor->pFaces[v5]; - if ( !pGame->pIndoorCameraD3D->IsFaceFacedTowardsCamera(&pIndoor->pFaces[v5]) ) + if ( !pGame->pIndoorCameraD3D->IsCulled(&pIndoor->pFaces[v5]) ) { if ( is_part_of_selection(v6, a2) ) {