comparison ParticleEngine.cpp @ 1029:c94d6a37d298

Pointing a face with mouse fixed.
author Nomad
date Tue, 21 May 2013 12:10:08 +0200
parents c45d51b3f4f4
children 613c77e51e38
comparison
equal deleted inserted replaced
1028:fbde7d8fcdb1 1029:c94d6a37d298
235 //signed __int64 v40; // qtt@18 235 //signed __int64 v40; // qtt@18
236 int v41; // eax@18 236 int v41; // eax@18
237 int v42; // ecx@18 237 int v42; // ecx@18
238 int v43; // eax@18 238 int v43; // eax@18
239 unsigned __int64 v44; // qax@18 239 unsigned __int64 v44; // qax@18
240 double v45; // st7@18 240 //double v45; // st7@18
241 int v46; // ecx@18 241 //int v46; // ecx@18
242 float v47; // ST18_4@18 242 //float v47; // ST18_4@18
243 unsigned __int64 v48; // qax@18 243 //unsigned __int64 v48; // qax@18
244 int y_int_; // [sp+10h] [bp-40h]@2 244 int y_int_; // [sp+10h] [bp-40h]@2
245 int a2; // [sp+18h] [bp-38h]@10 245 int a2; // [sp+18h] [bp-38h]@10
246 int x_int; // [sp+20h] [bp-30h]@2 246 int x_int; // [sp+20h] [bp-30h]@2
247 int z_int_; // [sp+24h] [bp-2Ch]@2 247 int z_int_; // [sp+24h] [bp-2Ch]@2
248 int z_int_4; // [sp+28h] [bp-28h]@8 248 int z_int_4; // [sp+28h] [bp-28h]@8
371 v42 = pBLVRenderParams->uViewportCenterX - ((signed int)((unsigned __int64)(v41 * (signed __int64)a2) >> 16) >> 16); 371 v42 = pBLVRenderParams->uViewportCenterX - ((signed int)((unsigned __int64)(v41 * (signed __int64)a2) >> 16) >> 16);
372 v43 = pParticle->_screenspace_scale; 372 v43 = pParticle->_screenspace_scale;
373 pParticle->uScreenSpaceX = v42; 373 pParticle->uScreenSpaceX = v42;
374 v44 = v43 * (signed __int64)v24; 374 v44 = v43 * (signed __int64)v24;
375 //uParticleID = v44 >> 16; 375 //uParticleID = v44 >> 16;
376 v45 = pParticle->flt_28;
377 LODWORD(v44) = (signed int)(v44 >> 16) >> 16; 376 LODWORD(v44) = (signed int)(v44 >> 16) >> 16;
378 v46 = pBLVRenderParams->uViewportCenterY - v44;
379 pParticle->uScreenSpaceY = pBLVRenderParams->uViewportCenterY - v44; 377 pParticle->uScreenSpaceY = pBLVRenderParams->uViewportCenterY - v44;
380 v47 = v45; 378 pParticle->_screenspace_scale = fixpoint_sub0(fixpoint_from_float(pParticle->flt_28), pParticle->_screenspace_scale);
381 v48 = _48B561_mess_with_scaling_along_z(/*v46, */v47) * (signed __int64)pParticle->_screenspace_scale;
382 //_uParticleID = v48 >> 16;
383 pParticle->_screenspace_scale = v48 >> 16;
384 pParticle->sZValue = z; 379 pParticle->sZValue = z;
385 return true; 380 return true;
386 } 381 }
387 return false; 382 return false;
388 } 383 }
403 pParticle->flt_60 = pGame->pIndoorCameraD3D->fov_y; 398 pParticle->flt_60 = pGame->pIndoorCameraD3D->fov_y;
404 //v5 = v4 + 6.7553994e15; 399 //v5 = v4 + 6.7553994e15;
405 LODWORD(v6) = 0; 400 LODWORD(v6) = 0;
406 HIDWORD(v6) = floorf(pParticle->flt_5C + 0.5f); 401 HIDWORD(v6) = floorf(pParticle->flt_5C + 0.5f);
407 //v7 = pParticle->flt_28; 402 //v7 = pParticle->flt_28;
408 pParticle->_screenspace_scale = v6 / x; 403 //pParticle->_screenspace_scale = v6 / x;
409 //v8 = v7; 404 //v8 = v7;
410 pParticle->_screenspace_scale = (unsigned __int64)(_48B561_mess_with_scaling_along_z(/*v9, */pParticle->flt_28) * (signed __int64)pParticle->_screenspace_scale) >> 16; 405 pParticle->_screenspace_scale = fixpoint_sub0(fixpoint_from_float(pParticle->flt_28), v6 / x);
411 pParticle->sZValue = x; 406 pParticle->sZValue = x;
412 return true; 407 return true;
413 } 408 }
414 409
415 410
446 //int v27; // eax@9 441 //int v27; // eax@9
447 int v28; // ebx@12 442 int v28; // ebx@12
448 signed __int64 v29; // qtt@13 443 signed __int64 v29; // qtt@13
449 //int v30; // eax@13 444 //int v30; // eax@13
450 //int v31; // ST1C_4@13 445 //int v31; // ST1C_4@13
451 double v32; // st7@13 446 //double v32; // st7@13
452 signed int v33; // eax@13 447 signed int v33; // eax@13
453 int v34; // ecx@13 448 //int v34; // ecx@13
454 float v35; // ST04_4@13 449 //float v35; // ST04_4@13
455 int v36; // eax@13 450 int v36; // eax@13
456 int v37; // esi@15 451 int v37; // esi@15
457 //double v39; // [sp+10h] [bp-40h]@2 452 //double v39; // [sp+10h] [bp-40h]@2
458 int v40; // [sp+14h] [bp-3Ch]@12 453 int v40; // [sp+14h] [bp-3Ch]@12
459 //int v41; // [sp+1Ch] [bp-34h]@2 454 //int v41; // [sp+1Ch] [bp-34h]@2
564 //v30 = v29 / X_4; 559 //v30 = v29 / X_4;
565 v6->_screenspace_scale = v29 / X_4; 560 v6->_screenspace_scale = v29 / X_4;
566 //v31 = v6->_screenspace_scale; 561 //v31 = v6->_screenspace_scale;
567 v6->uScreenSpaceX = pViewport->uScreenCenterX 562 v6->uScreenSpaceX = pViewport->uScreenCenterX
568 - ((signed int)((unsigned __int64)(v6->_screenspace_scale * (signed __int64)v16) >> 16) >> 16); 563 - ((signed int)((unsigned __int64)(v6->_screenspace_scale * (signed __int64)v16) >> 16) >> 16);
569 v32 = v6->flt_28;
570 v33 = (signed int)((unsigned __int64)(v6->_screenspace_scale * (signed __int64)v40) >> 16) >> 16; 564 v33 = (signed int)((unsigned __int64)(v6->_screenspace_scale * (signed __int64)v40) >> 16) >> 16;
571 v34 = pViewport->uScreenCenterY - v33; 565 //v34 = pViewport->uScreenCenterY - v33;
572 v6->uScreenSpaceY = pViewport->uScreenCenterY - v33; 566 v6->uScreenSpaceY = pViewport->uScreenCenterY - v33;
573 v35 = v32; 567 v6->_screenspace_scale = fixpoint_sub0(fixpoint_from_float(v6->flt_28), v6->_screenspace_scale);
574 v6->_screenspace_scale = (unsigned __int64)(_48B561_mess_with_scaling_along_z(/*v34, */v35) * (signed __int64)v6->_screenspace_scale) >> 16;
575 v6->sZValue = X_4; 568 v6->sZValue = X_4;
576 v36 = v6->uScreenSpaceX; 569 v36 = v6->uScreenSpaceX;
577 if ( v36 >= (signed int)pViewport->uViewportTL_X ) 570 if ( v36 >= (signed int)pViewport->uViewportTL_X )
578 { 571 {
579 if ( v36 < (signed int)pViewport->uViewportBR_X ) 572 if ( v36 < (signed int)pViewport->uViewportBR_X )