Mercurial > mm7
diff LightmapBuilder.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 | 0a1438c16c2b |
children | 8817c398b792 |
line wrap: on
line diff
--- a/LightmapBuilder.cpp Sun Feb 23 00:34:38 2014 +0100 +++ b/LightmapBuilder.cpp Sun Feb 23 03:07:46 2014 +0100 @@ -221,30 +221,7 @@ auto dist_x = abs(pos->x - v11->field_C08), //v31 dist_y = abs(pos->y - v11->field_C0A), //v32 arg0a dist_z = abs(pos->z - v11->field_C0C); //v33 _v64 - v31 = dist_x; - v32 = dist_y; - v33 = dist_z; - if (v31 < dist_y) - { - v34 = v31; - v31 = dist_y; - v32 = v34; - } - if (v31 < dist_z)//SHIDWORD(v64) ) - { - v35 = v31; - v31 = dist_z;//HIDWORD(v64); - v33 = v35; - } - if ( v32 < (signed int)v33 ) - { - v36 = v33; - v33 = v32; - v32 = v36; - } - v37 = v33 >> 2; - //LODWORD(a5) = ((unsigned int)(11 * v32) >> 5) + v37 + v31; - v38 = (double)(signed)(((unsigned int)(11 * v32) >> 5) + v37 + v31); + v38 = int_get_vector_length(dist_x, dist_y, dist_z); if (v38 > radius) return true; //radius = (1 / radius) * v38; @@ -841,28 +818,7 @@ //v8 = abs((int)a1.x - (signed)LODWORD(v23)); v25 = abs((signed)LODWORD(a1.y) - (signed)_v24); v8 = abs((int)a1.x - (signed)_v23); - LODWORD(a5) = v8; - v9 = v25; - v10 = v26; - if ( v8 < v25 ) - { - v11 = v8; - v8 = v25; - v9 = v11; - } - if ( v8 < v26 ) - { - v12 = v8; - v8 = v26; - v10 = v12; - } - if ( v9 < (signed int)v10 ) - { - v13 = v10; - v10 = v9; - v9 = v13; - } - v14 = (double)(signed int)(((unsigned int)(11 * v9) >> 5) + (v10 >> 2) + v8); + v14 = int_get_vector_length(v26, v25, v8); if ( v14 <= a3 ) { a5 = v14 / a3;