comparison mm7_5.cpp @ 295:640a176c030f

sub_42ECB5
author Nomad
date Tue, 19 Feb 2013 13:29:02 +0200
parents 250e49fef6f6
children af7e848d6def
comparison
equal deleted inserted replaced
275:250e49fef6f6 295:640a176c030f
6194 int *v4; // esi@1 6194 int *v4; // esi@1
6195 signed int v5; // eax@1 6195 signed int v5; // eax@1
6196 6196
6197 v3 = x; 6197 v3 = x;
6198 v4 = y; 6198 v4 = y;
6199 v5 = sub_452A9E(*y * *y + *z * *z + *x * *x); 6199 v5 = integer_sqrt(*y * *y + *z * *z + *x * *x);
6200 *v3 *= 65536 / (v5 | 1); 6200 *v3 *= 65536 / (v5 | 1);
6201 *v4 *= 65536 / (v5 | 1); 6201 *v4 *= 65536 / (v5 | 1);
6202 *z *= 65536 / (v5 | 1); 6202 *z *= 65536 / (v5 | 1);
6203 } 6203 }
6204 6204
10812 v19 = pLayingItems[v22].uSectorID; 10812 v19 = pLayingItems[v22].uSectorID;
10813 } 10813 }
10814 v62 = v19; 10814 v62 = v19;
10815 v23 = v18 - v63; 10815 v23 = v18 - v63;
10816 v50 = v17 - v65; 10816 v50 = v17 - v65;
10817 v24 = sub_452A9E(v23 * v23 + (v60 - v64) * (v60 - v64) + v50 * v50); 10817 v24 = integer_sqrt(v23 * v23 + (v60 - v64) * (v60 - v64) + v50 * v50);
10818 if ( v24 > 5120 ) 10818 if ( v24 > 5120 )
10819 return 0; 10819 return 0;
10820 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) 10820 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
10821 return 1; 10821 return 1;
10822 v25 = 65536; 10822 v25 = 65536;
11408 *(_QWORD *)&v45.x = *(_QWORD *)&v; 11408 *(_QWORD *)&v45.x = *(_QWORD *)&v;
11409 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v45, &outx, &outy, &v163); 11409 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v45, &outx, &outy, &v163);
11410 v46 = outy - pOut.y; 11410 v46 = outy - pOut.y;
11411 v47 = v163 - outz; 11411 v47 = v163 - outz;
11412 v48 = outx - pOut.x; 11412 v48 = outx - pOut.x;
11413 v49 = sub_452A9E(v48 * v48 + v46 * v46 + v47 * v47); 11413 v49 = integer_sqrt(v48 * v48 + v46 * v46 + v47 * v47);
11414 v50 = 65536; 11414 v50 = 65536;
11415 if ( v49 ) 11415 if ( v49 )
11416 v50 = 65536 / v49; 11416 v50 = 65536 / v49;
11417 v51 = outx; 11417 v51 = outx;
11418 v143 = v48 * v50; 11418 v143 = v48 * v50;
11560 *(_QWORD *)&v73.x = *(_QWORD *)&v; 11560 *(_QWORD *)&v73.x = *(_QWORD *)&v;
11561 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v73, &outx, &outy, &v163); 11561 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v73, &outx, &outy, &v163);
11562 v74 = outy - pOut.y; 11562 v74 = outy - pOut.y;
11563 v75 = v163 - outz; 11563 v75 = v163 - outz;
11564 v76 = outx - pOut.x; 11564 v76 = outx - pOut.x;
11565 v77 = sub_452A9E(v76 * v76 + v74 * v74 + v75 * v75); 11565 v77 = integer_sqrt(v76 * v76 + v74 * v74 + v75 * v75);
11566 v78 = 65536; 11566 v78 = 65536;
11567 if ( v77 ) 11567 if ( v77 )
11568 v78 = 65536 / v77; 11568 v78 = 65536 / v77;
11569 v79 = outx; 11569 v79 = outx;
11570 v144 = v76 * v78; 11570 v144 = v76 * v78;
11719 *(_QWORD *)&v5.x = *(_QWORD *)&v; 11719 *(_QWORD *)&v5.x = *(_QWORD *)&v;
11720 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v5, &outx, &outy, &v163); 11720 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v5, &outx, &outy, &v163);
11721 v6 = outy - pOut.y; 11721 v6 = outy - pOut.y;
11722 v7 = v163 - outz; 11722 v7 = v163 - outz;
11723 v8 = outx - pOut.x; 11723 v8 = outx - pOut.x;
11724 v9 = sub_452A9E(v8 * v8 + v6 * v6 + v7 * v7); 11724 v9 = integer_sqrt(v8 * v8 + v6 * v6 + v7 * v7);
11725 v10 = 65536; 11725 v10 = 65536;
11726 if ( v9 ) 11726 if ( v9 )
11727 v10 = 65536 / v9; 11727 v10 = 65536 / v9;
11728 v125 = v8 * v10; 11728 v125 = v8 * v10;
11729 v11 = v10; 11729 v11 = v10;
11850 *(_QWORD *)&v28.x = *(_QWORD *)&v; 11850 *(_QWORD *)&v28.x = *(_QWORD *)&v;
11851 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v28, &outx, &outy, &v163); 11851 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v28, &outx, &outy, &v163);
11852 v29 = outy - pOut.y; 11852 v29 = outy - pOut.y;
11853 v30 = v163 - outz; 11853 v30 = v163 - outz;
11854 v31 = outx - pOut.x; 11854 v31 = outx - pOut.x;
11855 v32 = sub_452A9E(v31 * v31 + v29 * v29 + v30 * v30); 11855 v32 = integer_sqrt(v31 * v31 + v29 * v29 + v30 * v30);
11856 v33 = 65536; 11856 v33 = 65536;
11857 if ( v32 ) 11857 if ( v32 )
11858 v33 = 65536 / v32; 11858 v33 = 65536 / v32;
11859 v126 = v31 * v33; 11859 v126 = v31 * v33;
11860 v34 = v33; 11860 v34 = v33;
12053 v6 = a1; 12053 v6 = a1;
12054 v10 = a2; 12054 v10 = a2;
12055 v7 = a3 - a1; 12055 v7 = a3 - a1;
12056 v11 = abs(a3 - a1); 12056 v11 = abs(a3 - a1);
12057 v8 = abs(a4 - v10); 12057 v8 = abs(a4 - v10);
12058 result = sub_452A9E(v11 * v11 + v8 * v8); 12058 result = integer_sqrt(v11 * v11 + v8 * v8);
12059 if ( result ) 12059 if ( result )
12060 result = abs((v7 * (v10 - a6) - (a4 - v10) * (v6 - a5)) / result); 12060 result = abs((v7 * (v10 - a6) - (a4 - v10) * (v6 - a5)) / result);
12061 return result; 12061 return result;
12062 } 12062 }
12063 12063