diff mm7_5.cpp @ 2235:6ab7d7c112bb

adding int_get_vector_length calls where the calls were inlined
author Grumpy7
date Sun, 23 Feb 2014 03:07:46 +0100
parents 3f375342de12
children 8817c398b792
line wrap: on
line diff
--- a/mm7_5.cpp	Sun Feb 23 00:34:38 2014 +0100
+++ b/mm7_5.cpp	Sun Feb 23 03:07:46 2014 +0100
@@ -518,28 +518,7 @@
               v39 = abs(v16->vPosition.z - z);
               if ( v39 <= v16->uRadius )
               {
-                v18 = v17;
-                v19 = v42;
-                v20 = v39;
-                if ( v18 < v42 )
-                {
-                  v21 = v18;
-                  v18 = v42;
-                  v19 = v21;
-                }
-                if ( v18 < v39 )
-                {
-                  v22 = v18;
-                  v18 = v39;
-                  v20 = v22;
-                }
-                if ( v19 < (signed int)v20 )
-                {
-                  v23 = v20;
-                  v20 = v19;
-                  v19 = v23;
-                }
-                v44 = ((unsigned int)(11 * v19) >> 5) + (v20 >> 2) + v18;
+                v44 = int_get_vector_length(v17, v42, v39);
                 v24 = v16->uRadius;
                 if ( (signed int)v44 < v24 )
                   v6 += ((unsigned __int64)(30i64 * (signed int)(v44 << 16) / v24) >> 16) - 30;
@@ -562,28 +541,7 @@
           v37 = abs(p->vPosition.z - z);
           if ( v37 <= p->uRadius)
           {
-            v27 = v26;
-            v28 = v40;
-            v29 = v37;
-            if ( v27 < v40 )
-            {
-              v30 = v27;
-              v27 = v40;
-              v28 = v30;
-            }
-            if ( v27 < v37 )
-            {
-              v31 = v27;
-              v27 = v37;
-              v29 = v31;
-            }
-            if ( v28 < (signed int)v29 )
-            {
-              v32 = v29;
-              v29 = v28;
-              v28 = v32;
-            }
-            v45 = ((unsigned int)(11 * v28) >> 5) + (v29 >> 2) + v27;
+            v45 = int_get_vector_length(v26, v40, v37);
             v33 = p->uRadius;
             if ( (signed int)v45 < v33 )
               v6 += ((unsigned __int64)(30i64 * (signed int)(v45 << 16) / v33) >> 16) - 30;