Mercurial > might-and-magic-trilogy
comparison Vis.cpp @ 87:c0cf9393af64
Слияние
author | Ritor1 |
---|---|
date | Mon, 29 Oct 2012 09:28:08 +0600 |
parents | 8b0c4d626477 |
children | 918dca162239 |
comparison
equal
deleted
inserted
replaced
86:c83d06692295 | 87:c0cf9393af64 |
---|---|
91 } | 91 } |
92 while ( v23 < (signed int)v7 ); | 92 while ( v23 < (signed int)v7 ); |
93 } | 93 } |
94 } | 94 } |
95 pGame->pIndoorCameraD3D->ViewTransform(static_sub_4C1026_array_F8F200, v7); | 95 pGame->pIndoorCameraD3D->ViewTransform(static_sub_4C1026_array_F8F200, v7); |
96 pGame->pIndoorCameraD3D->_436BB7_project_and_stuff(static_sub_4C1026_array_F8F200, v7, 1); | 96 pGame->pIndoorCameraD3D->Project(static_sub_4C1026_array_F8F200, v7, 1); |
97 v15 = this; | 97 v15 = this; |
98 SortVectors_x(static_sub_4C1026_array_F8F200, 0, v7 - 1); | 98 SortVectors_x(static_sub_4C1026_array_F8F200, 0, v7 - 1); |
99 if ( static_sub_4C1026_array_F8F200[0].vWorldViewPosition.x > (double)a4 | 99 if ( static_sub_4C1026_array_F8F200[0].vWorldViewPosition.x > (double)a4 |
100 || (_4C1495(static_sub_4C1026_array_F8F200, v7, (float *)&v21, (float *)&v22), | 100 || (_4C1495(static_sub_4C1026_array_F8F200, v7, (float *)&v21, (float *)&v22), |
101 _4C12C3_FindSomeBillboard(static_sub_4C1026_array_F8F200, v7, *(float *)&v21, *(float *)&v22)) | 101 _4C12C3_FindSomeBillboard(static_sub_4C1026_array_F8F200, v7, *(float *)&v21, *(float *)&v22)) |
367 if ( v6 < (signed int)pIndoor->uNumFaces ) | 367 if ( v6 < (signed int)pIndoor->uNumFaces ) |
368 { | 368 { |
369 v7 = v6; | 369 v7 = v6; |
370 if ( is_part_of_selection(&pIndoor->pFaces[v6], a5) ) | 370 if ( is_part_of_selection(&pIndoor->pFaces[v6], a5) ) |
371 { | 371 { |
372 if ( !pGame->pIndoorCameraD3D->IsFaceFacedTowardsCamera(&pIndoor->pFaces[v7]) ) | 372 if ( !pGame->pIndoorCameraD3D->IsCulled(&pIndoor->pFaces[v7]) ) |
373 { | 373 { |
374 if ( Intersect_Ray_Face(pRay, pRay + 1, &fDepth, &a1, &pIndoor->pFaces[v7], 0xFFFFFFFFu) ) | 374 if ( Intersect_Ray_Face(pRay, pRay + 1, &fDepth, &a1, &pIndoor->pFaces[v7], 0xFFFFFFFFu) ) |
375 { | 375 { |
376 pGame->pIndoorCameraD3D->ViewTransform(&a1, 1u); | 376 pGame->pIndoorCameraD3D->ViewTransform(&a1, 1u); |
377 v9 = _48B561_mess_with_scaling_along_z(/*v8, */a1.vWorldViewPosition.x); | 377 v9 = _48B561_mess_with_scaling_along_z(/*v8, */a1.vWorldViewPosition.x); |
1417 float v13; // [sp+4Ch] [bp-24h]@4 | 1417 float v13; // [sp+4Ch] [bp-24h]@4 |
1418 int v14; // [sp+64h] [bp-Ch]@7 | 1418 int v14; // [sp+64h] [bp-Ch]@7 |
1419 Vis *thisa; // [sp+68h] [bp-8h]@1 | 1419 Vis *thisa; // [sp+68h] [bp-8h]@1 |
1420 RenderVertexSoft *v16; // [sp+6Ch] [bp-4h]@2 | 1420 RenderVertexSoft *v16; // [sp+6Ch] [bp-4h]@2 |
1421 | 1421 |
1422 __debugbreak(); | |
1423 | |
1422 result = sRight; | 1424 result = sRight; |
1423 thisa = this; | 1425 thisa = this; |
1424 if ( sRight > sLeft ) | 1426 if ( sRight > sLeft ) |
1425 { | 1427 { |
1426 v5 = pArray; | 1428 v5 = pArray; |
1598 } | 1600 } |
1599 | 1601 |
1600 //----- (004C0646) -------------------------------------------------------- | 1602 //----- (004C0646) -------------------------------------------------------- |
1601 bool Vis::PickMouse(float fDepth, float fMouseX, float fMouseY, stru157 *a5, stru157 *a6) | 1603 bool Vis::PickMouse(float fDepth, float fMouseX, float fMouseY, stru157 *a5, stru157 *a6) |
1602 { | 1604 { |
1603 Vis *v6; // esi@1 | |
1604 bool result; // eax@4 | |
1605 RenderVertexSoft pMouseRay[2]; // [sp+1Ch] [bp-60h]@1 | 1605 RenderVertexSoft pMouseRay[2]; // [sp+1Ch] [bp-60h]@1 |
1606 | 1606 |
1607 v6 = this; | 1607 stru1.uNumPointers = 0; |
1608 this->stru1.uNumPointers = 0; | |
1609 CastPickRay(pMouseRay, fMouseX, fMouseY, fDepth); | 1608 CastPickRay(pMouseRay, fMouseX, fMouseY, fDepth); |
1610 PickBillboards(fDepth, fMouseX, fMouseY, &v6->stru1, a5); | 1609 PickBillboards(fDepth, fMouseX, fMouseY, &stru1, a5); |
1611 if (uCurrentlyLoadedLevelType == LEVEL_Indoor) | 1610 if (uCurrentlyLoadedLevelType == LEVEL_Indoor) |
1612 PickIndoor(fDepth, pMouseRay, &v6->stru1, a6); | 1611 PickIndoor(fDepth, pMouseRay, &stru1, a6); |
1613 else | 1612 else |
1614 PickOutdoor(fDepth, pMouseRay, &v6->stru1, a6, 0); | 1613 PickOutdoor(fDepth, pMouseRay, &stru1, a6, 0); |
1615 v6->stru1.create_object_pointers(0); | 1614 stru1.create_object_pointers(0); |
1616 sort_object_pointers(v6->stru1.array_1804, 0, v6->stru1.uNumPointers - 1); | 1615 sort_object_pointers(stru1.array_1804, 0, stru1.uNumPointers - 1); |
1617 return true; | 1616 return true; |
1618 } | 1617 } |
1619 | 1618 |
1620 //----- (004C06F8) -------------------------------------------------------- | 1619 //----- (004C06F8) -------------------------------------------------------- |
1621 void Vis::_4C06F8(float arg0, Vis_stru1 *a3, stru157 *a2) | 1620 void Vis::_4C06F8(float arg0, Vis_stru1 *a3, stru157 *a2) |
1998 if ( v5 >= 0 ) | 1997 if ( v5 >= 0 ) |
1999 { | 1998 { |
2000 if ( v5 < (signed int)pIndoor->uNumFaces ) | 1999 if ( v5 < (signed int)pIndoor->uNumFaces ) |
2001 { | 2000 { |
2002 v6 = &pIndoor->pFaces[v5]; | 2001 v6 = &pIndoor->pFaces[v5]; |
2003 if ( !pGame->pIndoorCameraD3D->IsFaceFacedTowardsCamera(&pIndoor->pFaces[v5]) ) | 2002 if ( !pGame->pIndoorCameraD3D->IsCulled(&pIndoor->pFaces[v5]) ) |
2004 { | 2003 { |
2005 if ( is_part_of_selection(v6, a2) ) | 2004 if ( is_part_of_selection(v6, a2) ) |
2006 { | 2005 { |
2007 v7 = 8 * v5; | 2006 v7 = 8 * v5; |
2008 LOBYTE(v7) = 8 * v5 | 6; | 2007 LOBYTE(v7) = 8 * v5 | 6; |