comparison 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
comparison
equal deleted inserted replaced
2234:fd0b2a697416 2235:6ab7d7c112bb
219 a1.Normalize(); 219 a1.Normalize();
220 220
221 auto dist_x = abs(pos->x - v11->field_C08), //v31 221 auto dist_x = abs(pos->x - v11->field_C08), //v31
222 dist_y = abs(pos->y - v11->field_C0A), //v32 arg0a 222 dist_y = abs(pos->y - v11->field_C0A), //v32 arg0a
223 dist_z = abs(pos->z - v11->field_C0C); //v33 _v64 223 dist_z = abs(pos->z - v11->field_C0C); //v33 _v64
224 v31 = dist_x; 224 v38 = int_get_vector_length(dist_x, dist_y, dist_z);
225 v32 = dist_y;
226 v33 = dist_z;
227 if (v31 < dist_y)
228 {
229 v34 = v31;
230 v31 = dist_y;
231 v32 = v34;
232 }
233 if (v31 < dist_z)//SHIDWORD(v64) )
234 {
235 v35 = v31;
236 v31 = dist_z;//HIDWORD(v64);
237 v33 = v35;
238 }
239 if ( v32 < (signed int)v33 )
240 {
241 v36 = v33;
242 v33 = v32;
243 v32 = v36;
244 }
245 v37 = v33 >> 2;
246 //LODWORD(a5) = ((unsigned int)(11 * v32) >> 5) + v37 + v31;
247 v38 = (double)(signed)(((unsigned int)(11 * v32) >> 5) + v37 + v31);
248 if (v38 > radius) 225 if (v38 > radius)
249 return true; 226 return true;
250 //radius = (1 / radius) * v38; 227 //radius = (1 / radius) * v38;
251 if ( uLightType & 4 ) 228 if ( uLightType & 4 )
252 { 229 {
839 v26 = abs((signed)LODWORD(a1.z) - v26); 816 v26 = abs((signed)LODWORD(a1.z) - v26);
840 //v25 = abs((signed)LODWORD(a1.y) - (signed)LODWORD(v24)); 817 //v25 = abs((signed)LODWORD(a1.y) - (signed)LODWORD(v24));
841 //v8 = abs((int)a1.x - (signed)LODWORD(v23)); 818 //v8 = abs((int)a1.x - (signed)LODWORD(v23));
842 v25 = abs((signed)LODWORD(a1.y) - (signed)_v24); 819 v25 = abs((signed)LODWORD(a1.y) - (signed)_v24);
843 v8 = abs((int)a1.x - (signed)_v23); 820 v8 = abs((int)a1.x - (signed)_v23);
844 LODWORD(a5) = v8; 821 v14 = int_get_vector_length(v26, v25, v8);
845 v9 = v25;
846 v10 = v26;
847 if ( v8 < v25 )
848 {
849 v11 = v8;
850 v8 = v25;
851 v9 = v11;
852 }
853 if ( v8 < v26 )
854 {
855 v12 = v8;
856 v8 = v26;
857 v10 = v12;
858 }
859 if ( v9 < (signed int)v10 )
860 {
861 v13 = v10;
862 v10 = v9;
863 v9 = v13;
864 }
865 v14 = (double)(signed int)(((unsigned int)(11 * v9) >> 5) + (v10 >> 2) + v8);
866 if ( v14 <= a3 ) 822 if ( v14 <= a3 )
867 { 823 {
868 a5 = v14 / a3; 824 a5 = v14 / a3;
869 v16 = (double)(signed int)a1.x; 825 v16 = (double)(signed int)a1.x;
870 *(float *)&v23 = (double)SLODWORD(a1.y); 826 *(float *)&v23 = (double)SLODWORD(a1.y);