comparison mm7_4.cpp @ 871:710cf848ad24

Particle engine made working.
author Nomad
date Mon, 01 Apr 2013 13:39:19 +0200
parents dfd683c4f538
children 2db21a810d48
comparison
equal deleted inserted replaced
838:d061180f2b42 871:710cf848ad24
304 else if (!v15) 304 else if (!v15)
305 ++v53; 305 ++v53;
306 else 306 else
307 { 307 {
308 auto a_div_b = fixpoint_div(y - word_721390_ys[j], word_721390_ys[j + 1] - word_721390_ys[j]); 308 auto a_div_b = fixpoint_div(y - word_721390_ys[j], word_721390_ys[j + 1] - word_721390_ys[j]);
309 auto res = fixpoint_mul((signed int)word_721460_xs[j + 1] - (signed int)word_721460_xs[j], a_div_b); 309 auto res = fixpoint_sub0((signed int)word_721460_xs[j + 1] - (signed int)word_721460_xs[j], a_div_b);
310 310
311 if (res + word_721460_xs[j] >= x) 311 if (res + word_721460_xs[j] >= x)
312 ++v53; 312 ++v53;
313 } 313 }
314 } 314 }
322 { 322 {
323 v21 = pIndoor->pVertices[pFloor->pVertexIDs[0]].z; 323 v21 = pIndoor->pVertices[pFloor->pVertexIDs[0]].z;
324 } 324 }
325 else 325 else
326 { 326 {
327 v21 = fixpoint_mul(pFloor->zCalc1, x) + fixpoint_mul(pFloor->zCalc2, y) + (short)(pFloor->zCalc3 >> 16); 327 v21 = fixpoint_sub0(pFloor->zCalc1, x) + fixpoint_sub0(pFloor->zCalc2, y) + (short)(pFloor->zCalc3 >> 16);
328 } 328 }
329 blv_floor_level[v55] = v21; 329 blv_floor_level[v55] = v21;
330 blv_floor_id[v55] = pSector->pFloors[i]; 330 blv_floor_id[v55] = pSector->pFloors[i];
331 v55++; 331 v55++;
332 } 332 }
375 if ( !v29 ) 375 if ( !v29 )
376 ++v54; 376 ++v54;
377 else 377 else
378 { 378 {
379 auto a_div_b = fixpoint_div(y - word_721390_ys[j], word_721390_ys[j + 1] - word_721390_ys[j]); 379 auto a_div_b = fixpoint_div(y - word_721390_ys[j], word_721390_ys[j + 1] - word_721390_ys[j]);
380 auto res = fixpoint_mul(word_721460_xs[j + 1] - word_721460_xs[j], a_div_b); 380 auto res = fixpoint_sub0(word_721460_xs[j + 1] - word_721460_xs[j], a_div_b);
381 if (res + word_721460_xs[j] >= x) 381 if (res + word_721460_xs[j] >= x)
382 ++v54; 382 ++v54;
383 } 383 }
384 } 384 }
385 } 385 }