SHARE
TWEET

C_OP_RenderBlobs::Render

a guest Nov 18th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void C_OP_RenderBlobs::Render(IMatRenderContext *param_1,CParticleCollection *param_2, Vector4D *param_3,void *param_4)
  2. {
  3.   int iVar1;
  4.   undefined4 uVar2;
  5.   undefined4 uVar3;
  6.   int iVar4;
  7.   uint uVar5;
  8.   void *pvVar6;
  9.   undefined4 uVar7;
  10.   ImpTiler *pIVar8;
  11.   IMaterial *pIVar9;
  12.   undefined8 *extraout_EAX;
  13.   undefined8 *puVar10;
  14.   int iVar11;
  15.   ImpParticle *pIVar12;
  16.   int iVar13;
  17.   int iVar14;
  18.   ImpTiler *pIStack108;
  19.   int iStack100;
  20.   int iStack96;
  21.   int local_5c [2];
  22.   ParticleRenderData_t *local_54;
  23.   uint local_50;
  24.   float local_4c;
  25.   float local_48;
  26.   float local_44;
  27.   float local_40;
  28.   float local_3c;
  29.   float local_38;
  30.   float local_34;
  31.   float local_30;
  32.   float local_2c;
  33.   undefined4 uStack40;
  34.  
  35.   pIVar8 = ?getTiler@ImpTilerFactory@@QAEPAVImpTiler@@XZ(factory);
  36.   if (*(char *)((int)param_4 + 8) != '\0') {
  37.     SetupParticleVisibility
  38.               (param_2,(CParticleVisibilityData *)param_4,(CParticleVisibilityInputs *)(this +0x58)
  39.                ,(int *)((int)param_4 + 0xc),param_1);
  40.   }
  41.   if ((
  42.       _?$S7@?4??Render@C_OP_RenderBlobs@@EBEXPAVIMatRenderContext@@PAVCParticleCollection@@ABVVector4D@@PAX@Z@4IA
  43.       & 1) == 0) {
  44.        
  45.     _?$S7@?4??Render@C_OP_RenderBlobs@@EBEXPAVIMatRenderContext@@PAVCParticleCollection@@ABVVector4D@@PAX@Z@4IA
  46.          =
  47.            _?$S7@?4??Render@C_OP_RenderBlobs@@EBEXPAVIMatRenderContext@@PAVCParticleCollection@@ABVVector4D@@PAX@Z@4IA
  48.            | 1;
  49.     DAT_00002124 = 0;
  50.     _DAT_00002128 = 0x10;
  51.     _imp_particles_sa = _malloc(0x200);
  52.     _atexit(`dynamic_atexit_destructor_for_'imp_particles_sa'');
  53.   }
  54.   ?setCubeWidth@SweepRenderer@@SAXM@Z(*(float *)(this + 0x8c));
  55.   ?setRenderR@SweepRenderer@@SAXM@Z(*(float *)(this + 0x94));
  56.   ?setCutoffR@SweepRenderer@@SAXM@Z(*(float *)(this + 0x90));
  57.   ?setCalcSignFunc@SweepRenderer@@SAXP6A_NEEEMMMPAVProjectingParticleCache@@@Z@Z(calcSign);
  58.   ?setCalcSign2Func@SweepRenderer@@SAXP6AXEEEMMMQAUCornerInfo@@PAVProjectingParticleCache@@@Z@Z
  59.             (calcSign2);
  60.   ?setCalcCornerFunc@SweepRenderer@@SAXHP6AXEEEMMMQAUCornerInfo@@PAVProjectingParticleCache@@@Z@Z
  61.             (0x20,calcCornerNormal);
  62.   ?setCalcVertexFunc@SweepRenderer@@SAXP6AXMMMHPBUCornerInfo@@0PAVIndexTriVertexBuffer@@@Z@Z
  63.             (calcVertexNormalDebugColor);
  64.   pIVar9 = ?GetMaterial@CParticleSystemDefinition@@QAEPAVIMaterial@@XZ
  65.                      (*(CParticleSystemDefinition **)(param_2 + 0x48));
  66.   local_54 =
  67.              ?GetRenderList@CParticleCollection@@QAEPBUParticleRenderData_t@@PAVIMatRenderContext@@_NPAHPAUCParticleVisibilityData@@@Z
  68.                        (param_2,param_1,false,local_5c,(CParticleVisibilityData *)param_4);
  69.   iVar4 = *(int *)(param_2 + 0xe0);
  70.   local_50 = *(uint *)(param_2 + 0x140) >> 2;
  71.   ?GetBounds@CParticleCollection@@QAEXPAVVector@@0@Z
  72.             (param_2,(Vector *)&local_34,(Vector *)&local_40);
  73.   local_4c = (local_40 + local_34) * __real@3f000000;
  74.   local_48 = (local_3c + local_30) * __real@3f000000;
  75.   local_44 = (local_38 + local_2c) * __real@3f000000;
  76.   (**(code **)(**(int **)(g_pParticleSystemMgr + 0xf0) + 100))(&local_4c);
  77.   (**(code **)(*(int *)param_1 + 0x24))(pIVar9,&local_50);
  78.   local_34 = 0.00000000;
  79.   local_30 = 0.00000000;
  80.   local_2c = 0.00000000;
  81.   uStack40 = 0;
  82.   ?beginFrame@ImpTiler@@QAEXAAVPoint3D@@PAX_N@Z(pIStack108,(Point3D *)&local_34,&param_1,true);
  83.   while (DAT_00002124 < (int)pIVar8) {
  84.     ??0ImpParticle@@QAE@XZ((ImpParticle *)&local_34);
  85.     if (_DAT_00002128 <= DAT_00002124) {
  86.       _DAT_00002128 = DAT_00002124 * 2 + 2;
  87.       _imp_particles_sa = _realloc(_imp_particles_sa,_DAT_00002128 * 0x20);
  88.     }
  89.     puVar10 = (undefined8 *)(DAT_00002124 * 0x20 + (int)_imp_particles_sa);
  90.     *puVar10 = *extraout_EAX;
  91.     puVar10[1] = extraout_EAX[1];
  92.     puVar10[2] = extraout_EAX[2];
  93.     puVar10[3] = extraout_EAX[3];
  94.     DAT_00002124 = DAT_00002124 + 1;
  95.   }
  96.   iVar13 = 0;
  97.   iStack100 = 0;
  98.   if (0 < (int)pIVar8) {
  99.     iVar14 = iStack96 + 4;
  100.     do {
  101.       uVar7 = __real@3f800000;
  102.       pvVar6 = _imp_particles_sa;
  103.       uVar5 = *(uint *)(iVar14 + -0x10);
  104.       iVar14 = iVar14 + -0x10;
  105.       iVar11 = ((int)(uVar5 + ((int)uVar5 >> 0x1f & 3U)) >> 2) * local_5c[0];
  106.       iVar1 = (uVar5 & 3) + iVar11 * 4;
  107.       uVar2 = *(undefined4 *)(iVar4 + 0x10 + iVar1 * 4);
  108.       uVar3 = *(undefined4 *)(iVar4 + ((uVar5 & 3) + 8 + iVar11 * 4) * 4);
  109.       *(undefined4 *)((int)_imp_particles_sa + iVar13) = *(undefined4 *)(iVar4 + iVar1 * 4);
  110.       pIVar12 = (ImpParticle *)((int)pvVar6 + iVar13);
  111.       *(undefined4 *)(pIVar12 + 4) = uVar2;
  112.       *(undefined4 *)(pIVar12 + 8) = uVar3;
  113.       *(undefined4 *)(pIVar12 + 0x14) = uVar7;
  114.       *(undefined4 *)(pIVar12 + 0x10) = uVar7;
  115.       ?insertParticle@ImpTiler@@QAEXPAVImpParticle@@@Z(pIStack108,pIVar12);
  116.       iStack100 = iStack100 + 1;
  117.       iVar13 = iVar13 + 0x20;
  118.     } while (iStack100 < (int)pIVar8);
  119.   }
  120.   ?drawSurface@ImpTiler@@QAEXXZ(pIStack108);
  121.   ?endFrame@ImpTiler@@QAEXXZ(pIStack108);
  122.   ?returnTiler@ImpTilerFactory@@QAEXPAVImpTiler@@@Z(factory,pIStack108);
  123.   return;
  124. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top