summaryrefslogtreecommitdiffstats
path: root/src/render/Particle.cpp
diff options
context:
space:
mode:
authorwithmorten <morten.with@gmail.com>2021-06-28 13:31:35 +0200
committerwithmorten <morten.with@gmail.com>2021-06-28 13:31:35 +0200
commitcb3b3855b844c14c0e943c1a7614fc29820cf666 (patch)
tree8e9a6ae74e9c98515b813f412476058274d3fde4 /src/render/Particle.cpp
parentLess invasive red tint on Delete Game page (diff)
downloadre3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar
re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar.gz
re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar.bz2
re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar.lz
re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar.xz
re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar.zst
re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.zip
Diffstat (limited to '')
-rw-r--r--src/render/Particle.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp
index c971955f..76ddde50 100644
--- a/src/render/Particle.cpp
+++ b/src/render/Particle.cpp
@@ -880,15 +880,15 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
int32 ColorVariation = CGeneral::GetRandomNumberInRange(-psystem->m_InitialColorVariation, psystem->m_InitialColorVariation);
//Float ColorVariation = CGeneral::GetRandomNumberInRange((float)-psystem->m_InitialColorVariation, (float)psystem->m_InitialColorVariation);
- pParticle->m_Color.red = clamp(pParticle->m_Color.red +
+ pParticle->m_Color.red = Clamp(pParticle->m_Color.red +
PERCENT(pParticle->m_Color.red, ColorVariation),
0, 255);
- pParticle->m_Color.green = clamp(pParticle->m_Color.green +
+ pParticle->m_Color.green = Clamp(pParticle->m_Color.green +
PERCENT(pParticle->m_Color.green, ColorVariation),
0, 255);
- pParticle->m_Color.blue = clamp(pParticle->m_Color.blue +
+ pParticle->m_Color.blue = Clamp(pParticle->m_Color.blue +
PERCENT(pParticle->m_Color.blue, ColorVariation),
0, 255);
}
@@ -1083,15 +1083,15 @@ void CParticle::Update()
{
float colorMul = 1.0f - float(particle->m_nTimeWhenColorWillBeChanged - CTimer::GetTimeInMilliseconds()) / float(psystem->m_ColorFadeTime);
- particle->m_Color.red = clamp(
+ particle->m_Color.red = Clamp(
psystem->m_RenderColouring.red + int32(float(psystem->m_FadeDestinationColor.red - psystem->m_RenderColouring.red) * colorMul),
0, 255);
- particle->m_Color.green = clamp(
+ particle->m_Color.green = Clamp(
psystem->m_RenderColouring.green + int32(float(psystem->m_FadeDestinationColor.green - psystem->m_RenderColouring.green) * colorMul),
0, 255);
- particle->m_Color.blue = clamp(
+ particle->m_Color.blue = Clamp(
psystem->m_RenderColouring.blue + int32(float(psystem->m_FadeDestinationColor.blue - psystem->m_RenderColouring.blue) * colorMul),
0, 255);
}
@@ -1380,7 +1380,7 @@ void CParticle::Update()
{
particle->m_nFadeToBlackTimer = 0;
- particle->m_nColorIntensity = clamp(particle->m_nColorIntensity - psystem->m_nFadeToBlackAmount,
+ particle->m_nColorIntensity = Clamp(particle->m_nColorIntensity - psystem->m_nFadeToBlackAmount,
0, 255);
}
else
@@ -1393,7 +1393,7 @@ void CParticle::Update()
{
particle->m_nFadeAlphaTimer = 0;
- particle->m_nAlpha = clamp(particle->m_nAlpha - psystem->m_nFadeAlphaAmount,
+ particle->m_nAlpha = Clamp(particle->m_nAlpha - psystem->m_nFadeAlphaAmount,
0, 255);
#ifdef PC_PARTICLE
if ( particle->m_nAlpha == 0 )