comparison Indoor.cpp @ 1562:c44db078127d

Merge
author Grumpy7
date Sun, 08 Sep 2013 01:23:37 +0200
parents 30db6d265ceb e668660457dc
children 75fafd8ced59
comparison
equal deleted inserted replaced
1561:f8c15e45de7e 1562:c44db078127d
5222 char v20; // zf@25 5222 char v20; // zf@25
5223 int v21; // ebx@25 5223 int v21; // ebx@25
5224 int v22; // eax@26 5224 int v22; // eax@26
5225 signed int v23; // edi@26 5225 signed int v23; // edi@26
5226 int v24; // ST34_4@30 5226 int v24; // ST34_4@30
5227 signed __int64 v25; // qtt@31 5227 //signed __int64 v25; // qtt@31
5228 int v26; // eax@31 5228 //int v26; // eax@31
5229 Vec3_int_ v27; // ST08_12@37 5229 Vec3_int_ v27; // ST08_12@37
5230 Vec3_int_ v28; // ST08_12@37 5230 Vec3_int_ v28; // ST08_12@37
5231 int v29; // edi@37 5231 int v29; // edi@37
5232 int v30; // ebx@37 5232 int v30; // ebx@37
5233 int v31; // esi@37 5233 int v31; // esi@37
5240 char *v38; // edi@51 5240 char *v38; // edi@51
5241 ODMFace *v39; // esi@54 5241 ODMFace *v39; // esi@54
5242 int v40; // ebx@60 5242 int v40; // ebx@60
5243 int v41; // eax@61 5243 int v41; // eax@61
5244 signed int v42; // edi@61 5244 signed int v42; // edi@61
5245 signed __int64 v43; // qtt@66 5245 //signed __int64 v43; // qtt@66
5246 int v44; // eax@66 5246 //int v44; // eax@66
5247 Vec3_int_ v45; // ST08_12@73 5247 Vec3_int_ v45; // ST08_12@73
5248 int v46; // edi@73 5248 int v46; // edi@73
5249 int v47; // ebx@73 5249 int v47; // ebx@73
5250 int v48; // esi@73 5250 int v48; // esi@73
5251 signed int v49; // ecx@73 5251 signed int v49; // ecx@73
5267 int v65; // eax@98 5267 int v65; // eax@98
5268 int v66; // ebx@98 5268 int v66; // ebx@98
5269 int v67; // eax@99 5269 int v67; // eax@99
5270 signed int v68; // edi@99 5270 signed int v68; // edi@99
5271 int v69; // ST2C_4@103 5271 int v69; // ST2C_4@103
5272 signed __int64 v70; // qtt@104 5272 //signed __int64 v70; // qtt@104
5273 int v71; // eax@104 5273 //int v71; // eax@104
5274 Vec3_int_ v72; // ST08_12@111 5274 Vec3_int_ v72; // ST08_12@111
5275 Vec3_int_ v73; // ST08_12@111 5275 Vec3_int_ v73; // ST08_12@111
5276 int v74; // edi@111 5276 int v74; // edi@111
5277 int v75; // ebx@111 5277 int v75; // ebx@111
5278 int v76; // esi@111 5278 int v76; // esi@111
5291 int v89; // ecx@128 5291 int v89; // ecx@128
5292 BLVFace *v90; // esi@129 5292 BLVFace *v90; // esi@129
5293 int v91; // ebx@136 5293 int v91; // ebx@136
5294 int v92; // eax@137 5294 int v92; // eax@137
5295 signed int v93; // edi@137 5295 signed int v93; // edi@137
5296 signed __int64 v94; // qtt@142 5296 //signed __int64 v94; // qtt@142
5297 int v95; // eax@142 5297 //int v95; // eax@142
5298 Vec3_int_ v97; // [sp-18h] [bp-94h]@1 5298 Vec3_int_ v97; // [sp-18h] [bp-94h]@1
5299 int v98; // [sp-Ch] [bp-88h]@88 5299 int v98; // [sp-Ch] [bp-88h]@88
5300 int v99; // [sp-Ch] [bp-88h]@126 5300 int v99; // [sp-Ch] [bp-88h]@126
5301 int v100; // [sp-8h] [bp-84h]@88 5301 int v100; // [sp-8h] [bp-84h]@88
5302 int v101; // [sp-8h] [bp-84h]@126 5302 int v101; // [sp-8h] [bp-84h]@126
5391 a4_8 = v4; 5391 a4_8 = v4;
5392 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor) 5392 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor)
5393 { 5393 {
5394 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz); 5394 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz);
5395 v45.z = v.z; 5395 v45.z = v.z;
5396 *(_QWORD *)&v45.x = *(_QWORD *)&v; 5396 v45.x = v.x;
5397 v45.y = v.y;
5397 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v45, &outx, &outy, &v163); 5398 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v45, &outx, &outy, &v163);
5398 v46 = outy - pOut.y; 5399 v46 = outy - pOut.y;
5399 v47 = v163 - outz; 5400 v47 = v163 - outz;
5400 v48 = outx - pOut.x; 5401 v48 = outx - pOut.x;
5401 v49 = integer_sqrt(v48 * v48 + v46 * v46 + v47 * v47); 5402 v49 = integer_sqrt(v48 * v48 + v46 * v46 + v47 * v47);
5508 + v67 5509 + v67
5509 + pOut.y * v62->pFacePlane_old.vNormal.y 5510 + pOut.y * v62->pFacePlane_old.vNormal.y
5510 + pOut.x * v62->pFacePlane_old.vNormal.x)) >> 14; 5511 + pOut.x * v62->pFacePlane_old.vNormal.x)) >> 14;
5511 if ( v69 <= abs(v66) ) 5512 if ( v69 <= abs(v66) )
5512 { 5513 {
5513 LODWORD(v70) = v68 << 16; 5514 //LODWORD(v70) = v68 << 16;
5514 HIDWORD(v70) = v68 >> 16; 5515 //HIDWORD(v70) = v68 >> 16;
5515 v71 = v70 / v107; 5516 //v71 = v70 / v107;
5516 v108 = v70 / v107; 5517 //v108 = v70 / v107;
5517 if ( v71 >= 0 ) 5518 v108 = fixpoint_div(v68, v107);
5519 if ( v108 >= 0 )
5518 { 5520 {
5519 if ( sub_4075DB( 5521 if ( sub_4075DB(
5520 pOut.x + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v143) >> 16) + 32768) >> 16), 5522 pOut.x + ((signed int)(fixpoint_sub0(v108, v143) + 32768) >> 16),
5521 pOut.y + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v147) >> 16) + 32768) >> 16), 5523 pOut.y + ((signed int)(fixpoint_sub0(v108, v147) + 32768) >> 16),
5522 outz + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v151) >> 16) + 32768) >> 16), 5524 outz + ((signed int)(fixpoint_sub0(v108, v151) + 32768) >> 16),
5523 v62) ) 5525 v62) )
5524 { 5526 {
5525 v114 = 1; 5527 v114 = 1;
5526 break; 5528 break;
5527 } 5529 }
5641 || v124 < v90->pBounding.x1 5643 || v124 < v90->pBounding.x1
5642 || v128 > v90->pBounding.y2 5644 || v128 > v90->pBounding.y2
5643 || v132 < v90->pBounding.y1 5645 || v132 < v90->pBounding.y1
5644 || v136 > v90->pBounding.z2 5646 || v136 > v90->pBounding.z2
5645 || v140 < v90->pBounding.z1 5647 || v140 < v90->pBounding.z1
5646 || (yb = (unsigned __int64)(v144 * (signed __int64)v90->pFacePlane_old.vNormal.x) >> 16, 5648 || (yb = fixpoint_sub0(v144, v90->pFacePlane_old.vNormal.x),
5647 v_4b = (unsigned __int64)(v148 * (signed __int64)v90->pFacePlane_old.vNormal.y) >> 16, 5649 v_4b = fixpoint_sub0(v148, v90->pFacePlane_old.vNormal.y),
5648 vf = (unsigned __int64)(v152 * (signed __int64)v90->pFacePlane_old.vNormal.z) >> 16, 5650 vf = fixpoint_sub0(v152, v90->pFacePlane_old.vNormal.z),
5649 v20 = yb + vf + v_4b == 0, 5651 v20 = yb + vf + v_4b == 0,
5650 v91 = yb + vf + v_4b, 5652 v91 = yb + vf + v_4b,
5651 vc = yb + vf + v_4b, 5653 vc = yb + vf + v_4b,
5652 v20) ) 5654 v20) )
5653 goto LABEL_145; 5655 goto LABEL_145;
5676 + v92 5678 + v92
5677 + pOut.y * v90->pFacePlane_old.vNormal.y 5679 + pOut.y * v90->pFacePlane_old.vNormal.y
5678 + pOut.x * v90->pFacePlane_old.vNormal.x)) >> 14; 5680 + pOut.x * v90->pFacePlane_old.vNormal.x)) >> 14;
5679 if ( v_4c <= abs(v91) ) 5681 if ( v_4c <= abs(v91) )
5680 { 5682 {
5681 LODWORD(v94) = v93 << 16; 5683 //LODWORD(v94) = v93 << 16;
5682 HIDWORD(v94) = v93 >> 16; 5684 //HIDWORD(v94) = v93 >> 16;
5683 v95 = v94 / vc; 5685 //v95 = v94 / vc;
5684 vd = v94 / vc; 5686 //vd = v94 / vc;
5685 if ( v95 >= 0 ) 5687 vd = fixpoint_div(v93, vc);
5688 if ( vd >= 0 )
5686 { 5689 {
5687 if ( sub_4075DB( 5690 if ( sub_4075DB(
5688 pOut.x + ((signed int)(((unsigned __int64)(vd * (signed __int64)v144) >> 16) + 32768) >> 16), 5691 pOut.x + ((signed int)(fixpoint_sub0(vd, v144) + 32768) >> 16),
5689 pOut.y + ((signed int)(((unsigned __int64)(vd * (signed __int64)v148) >> 16) + 32768) >> 16), 5692 pOut.y + ((signed int)(fixpoint_sub0(vd, v148) + 32768) >> 16),
5690 outz + ((signed int)(((unsigned __int64)(vd * (signed __int64)v152) >> 16) + 32768) >> 16), 5693 outz + ((signed int)(fixpoint_sub0(vd, v152) + 32768) >> 16),
5691 v90) ) 5694 v90) )
5692 { 5695 {
5693 v113 = 1; 5696 v113 = 1;
5694 goto LABEL_148; 5697 goto LABEL_148;
5695 } 5698 }
5704 goto LABEL_148; 5707 goto LABEL_148;
5705 } 5708 }
5706 } 5709 }
5707 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz); 5710 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz);
5708 v5.z = v.z; 5711 v5.z = v.z;
5709 *(_QWORD *)&v5.x = *(_QWORD *)&v; 5712 v5.x = v.x;
5713 v5.y = v.y;
5710 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v5, &outx, &outy, &v163); 5714 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v5, &outx, &outy, &v163);
5711 v6 = outy - pOut.y; 5715 v6 = outy - pOut.y;
5712 v7 = v163 - outz; 5716 v7 = v163 - outz;
5713 v8 = outx - pOut.x; 5717 v8 = outx - pOut.x;
5714 v9 = integer_sqrt(v8 * v8 + v6 * v6 + v7 * v7); 5718 v9 = integer_sqrt(v8 * v8 + v6 * v6 + v7 * v7);
5782 || v145 < v16->pBoundingBox.x1 5786 || v145 < v16->pBoundingBox.x1
5783 || v141 > v16->pBoundingBox.y2 5787 || v141 > v16->pBoundingBox.y2
5784 || v137 < v16->pBoundingBox.y1 5788 || v137 < v16->pBoundingBox.y1
5785 || v133 > v16->pBoundingBox.z2 5789 || v133 > v16->pBoundingBox.z2
5786 || v129 < v16->pBoundingBox.z1 5790 || v129 < v16->pBoundingBox.z1
5787 || (v17 = (unsigned __int64)(v125 * (signed __int64)v16->pFacePlane.vNormal.x) >> 16, 5791 || (v17 = fixpoint_sub0(v125, v16->pFacePlane.vNormal.x),
5788 v18 = (unsigned __int64)(v121 * (signed __int64)v16->pFacePlane.vNormal.y) >> 16, 5792 v18 = fixpoint_sub0(v121, v16->pFacePlane.vNormal.y),
5789 v19 = (unsigned __int64)(v117 * (signed __int64)v16->pFacePlane.vNormal.z) >> 16, 5793 v19 = fixpoint_sub0(v117, v16->pFacePlane.vNormal.z),
5790 v20 = v17 + v18 + v19 == 0, 5794 v20 = v17 + v18 + v19 == 0,
5791 v21 = v17 + v18 + v19, 5795 v21 = v17 + v18 + v19,
5792 v109 = v17 + v18 + v19, 5796 v109 = v17 + v18 + v19,
5793 v20) ) 5797 v20) )
5794 goto LABEL_33; 5798 goto LABEL_33;
5805 goto LABEL_33; 5809 goto LABEL_33;
5806 } 5810 }
5807 v24 = abs(-(v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x)) >> 14; 5811 v24 = abs(-(v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x)) >> 14;
5808 if ( v24 <= abs(v21) ) 5812 if ( v24 <= abs(v21) )
5809 { 5813 {
5810 LODWORD(v25) = v23 << 16; 5814 //LODWORD(v25) = v23 << 16;
5811 HIDWORD(v25) = v23 >> 16; 5815 //HIDWORD(v25) = v23 >> 16;
5812 v26 = v25 / v109; 5816 //v26 = v25 / v109;
5813 v110 = v25 / v109; 5817 //v110 = v25 / v109;
5814 if ( v26 >= 0 ) 5818 v110 = fixpoint_div(v23, v109);
5819 if ( v110 >= 0 )
5815 { 5820 {
5816 if ( sub_4077F1( 5821 if ( sub_4077F1(
5817 pOut.x + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v125) >> 16) + 32768) >> 16), 5822 pOut.x + ((signed int)(fixpoint_sub0(v110, v125) + 32768) >> 16),
5818 pOut.y + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v121) >> 16) + 32768) >> 16), 5823 pOut.y + ((signed int)(fixpoint_sub0(v110, v121) + 32768) >> 16),
5819 outz + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v117) >> 16) + 32768) >> 16), 5824 outz + ((signed int)(fixpoint_sub0(v110, v117) + 32768) >> 16),
5820 v16, 5825 v16,
5821 (BSPVertexBuffer *)a5) ) 5826 (BSPVertexBuffer *)a5) )
5822 { 5827 {
5823 v114 = 1; 5828 v114 = 1;
5824 goto LABEL_36; 5829 goto LABEL_36;
5915 || v146 < v39->pBoundingBox.x1 5920 || v146 < v39->pBoundingBox.x1
5916 || v142 > v39->pBoundingBox.y2 5921 || v142 > v39->pBoundingBox.y2
5917 || v138 < v39->pBoundingBox.y1 5922 || v138 < v39->pBoundingBox.y1
5918 || v134 > v39->pBoundingBox.z2 5923 || v134 > v39->pBoundingBox.z2
5919 || v130 < v39->pBoundingBox.z1 5924 || v130 < v39->pBoundingBox.z1
5920 || (ya = (unsigned __int64)(v126 * (signed __int64)v39->pFacePlane.vNormal.x) >> 16, 5925 || (ya = fixpoint_sub0(v126, v39->pFacePlane.vNormal.x),
5921 ve = (unsigned __int64)(v122 * (signed __int64)v39->pFacePlane.vNormal.y) >> 16, 5926 ve = fixpoint_sub0(v122, v39->pFacePlane.vNormal.y),
5922 v_4 = (unsigned __int64)(v118 * (signed __int64)v39->pFacePlane.vNormal.z) >> 16, 5927 v_4 = fixpoint_sub0(v118, v39->pFacePlane.vNormal.z),
5923 v20 = ya + ve + v_4 == 0, 5928 v20 = ya + ve + v_4 == 0,
5924 v40 = ya + ve + v_4, 5929 v40 = ya + ve + v_4,
5925 va = ya + ve + v_4, 5930 va = ya + ve + v_4,
5926 v20) ) 5931 v20) )
5927 goto LABEL_68; 5932 goto LABEL_68;
5938 goto LABEL_68; 5943 goto LABEL_68;
5939 } 5944 }
5940 v_4a = abs(-(v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x)) >> 14; 5945 v_4a = abs(-(v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x)) >> 14;
5941 if ( v_4a <= abs(v40) ) 5946 if ( v_4a <= abs(v40) )
5942 { 5947 {
5943 LODWORD(v43) = v42 << 16; 5948 //LODWORD(v43) = v42 << 16;
5944 HIDWORD(v43) = v42 >> 16; 5949 //HIDWORD(v43) = v42 >> 16;
5945 v44 = v43 / va; 5950 //vb = v43 / va;
5946 vb = v43 / va; 5951 vb = fixpoint_div(v42, va);
5947 if ( v44 >= 0 ) 5952 if ( vb >= 0 )
5948 { 5953 {
5949 if ( sub_4077F1( 5954 if ( sub_4077F1(
5950 pOut.x + ((signed int)(((unsigned __int64)(vb * (signed __int64)v126) >> 16) + 32768) >> 16), 5955 pOut.x + ((signed int)(fixpoint_sub0(vb, v126) + 32768) >> 16),
5951 pOut.y + ((signed int)(((unsigned __int64)(vb * (signed __int64)v122) >> 16) + 32768) >> 16), 5956 pOut.y + ((signed int)(fixpoint_sub0(vb, v122) + 32768) >> 16),
5952 outz + ((signed int)(((unsigned __int64)(vb * (signed __int64)v118) >> 16) + 32768) >> 16), 5957 outz + ((signed int)(fixpoint_sub0(vb, v118) + 32768) >> 16),
5953 v39, 5958 v39,
5954 (BSPVertexBuffer *)a5a) ) 5959 (BSPVertexBuffer *)a5a) )
5955 { 5960 {
5956 v113 = 1; 5961 v113 = 1;
5957 goto LABEL_71; 5962 goto LABEL_71;