diff ParticleEngine.cpp @ 2081:70c45d12d9ca

Merge
author Ritor1
date Wed, 04 Dec 2013 00:45:18 +0600
parents 259df09dfb50
children 9bd7522cdbbb
line wrap: on
line diff
--- a/ParticleEngine.cpp	Wed Dec 04 00:45:10 2013 +0600
+++ b/ParticleEngine.cpp	Wed Dec 04 00:45:18 2013 +0600
@@ -649,8 +649,28 @@
         p->uScreenSpaceY >= pBLVRenderParams->uViewportY &&
         p->uScreenSpaceY < pBLVRenderParams->uViewportW)
     {
-      if (pRenderer->pRenderD3D)
+      if (!pRenderer->pRenderD3D)
       {
+        __debugbreak();
+                    /*v11 = 13 * p->_screenspace_scale >> 16;
+                     if ( v11 > 30 )
+                       v11 = 30;
+                    v12 = p->uScreenSpaceY - v11;
+                    v13 = p->uScreenSpaceX - (v11 >> 1);
+                     if ( v13 + v11 < (signed int)pViewport->uViewportTL_X
+                       || v13 >= (signed int)pViewport->uViewportBR_X
+                       || v12 + v11 < (signed int)pViewport->uViewportTL_Y
+                       || v12 >= (signed int)pViewport->uViewportBR_Y )
+                     {
+                      ;
+                     }
+                     else
+                     {
+                       pRenderer->MakeParticleBillboardAndPush_BLV_Software(v13, v12, p->sZValue, p->uLightColor_bgr, v11);
+                     }*/
+      }
+      //else
+
         if (p->type & ParticleType_Diffuse)
         {
           //v14 = &pParticles[i];
@@ -703,26 +723,6 @@
           v15.sZValue = p->sZValue;
           pRenderer->MakeParticleBillboardAndPush_BLV(&v15, pSprites_LOD->pHardwareSprites[p->uTextureID].pTexture, p->uLightColor_bgr, p->angle);
         }
-      }
-      else
-      {
-                    v11 = 13 * p->_screenspace_scale >> 16;
-                     if ( v11 > 30 )
-                       v11 = 30;
-                    v12 = p->uScreenSpaceY - v11;
-                    v13 = p->uScreenSpaceX - (v11 >> 1);
-                     if ( v13 + v11 < (signed int)pViewport->uViewportTL_X
-                       || v13 >= (signed int)pViewport->uViewportBR_X
-                       || v12 + v11 < (signed int)pViewport->uViewportTL_Y
-                       || v12 >= (signed int)pViewport->uViewportBR_Y )
-                     {
-                      ;
-                     }
-                     else
-                     {
-                       pRenderer->MakeParticleBillboardAndPush_BLV_Software(v13, v12, p->sZValue, p->uLightColor_bgr, v11);
-                     }
-      }
     }
   }
 }
@@ -759,8 +759,28 @@
     if (particle->type == ParticleType_Invalid || !ViewProject_TrueIfStillVisible_ODM(i))
       continue;
 
-        if ( pRenderer->pRenderD3D )
+        if ( !pRenderer->pRenderD3D )
         {
+          __debugbreak();
+          /*v10 = 13 * particle->_screenspace_scale >> 16;
+          if ( v10 > 30 )
+            v10 = 30;
+          v11 = particle->uScreenSpaceX - (v10 >> 1);
+          v12 = particle->uScreenSpaceY - v10;
+          if ( v11 + v10 < pViewport->uViewportTL_X
+            || v11 >= pViewport->uViewportBR_X
+            || particle->uScreenSpaceY < pViewport->uViewportTL_Y
+            || v12 >= (signed int)pViewport->uViewportBR_Y )
+          {
+            ;
+          }
+          else
+          {
+            pRenderer->MakeParticleBillboardAndPush_BLV_Software(v11, v12, particle->sZValue, particle->uLightColor_bgr, v10);
+          }*/
+        }
+        //else
+
           //v8 = *(_DWORD *)(v7 - 82);
           if (particle->type & ParticleType_Diffuse)
           {
@@ -813,26 +833,6 @@
             pBillboard.uScreenSpaceY = particle->uScreenSpaceY;
             pBillboard.sZValue = particle->sZValue;
             pRenderer->MakeParticleBillboardAndPush_ODM(&pBillboard, pSprites_LOD->pHardwareSprites[particle->uTextureID].pTexture, particle->uLightColor_bgr, particle->angle);
-          }
-        }
-        else
-        {
-          v10 = 13 * particle->_screenspace_scale >> 16;
-          if ( v10 > 30 )
-            v10 = 30;
-          v11 = particle->uScreenSpaceX - (v10 >> 1);
-          v12 = particle->uScreenSpaceY - v10;
-          if ( v11 + v10 < pViewport->uViewportTL_X
-            || v11 >= pViewport->uViewportBR_X
-            || particle->uScreenSpaceY < pViewport->uViewportTL_Y
-            || v12 >= (signed int)pViewport->uViewportBR_Y )
-          {
-            ;
-          }
-          else
-          {
-            pRenderer->MakeParticleBillboardAndPush_BLV_Software(v11, v12, particle->sZValue, particle->uLightColor_bgr, v10);
-          }
-        }      
+          }   
   }
 }
\ No newline at end of file