diff options
author | jaroWMR <jarorutjes07@gmail.com> | 2024-10-10 08:38:40 +0200 |
---|---|---|
committer | jaroWMR <jarorutjes07@gmail.com> | 2024-10-10 08:38:40 +0200 |
commit | d001c4ba95a72f13c942f1a24eb98fe1584d93a4 (patch) | |
tree | 8d72f1ddf9baf591fdf99397aa1495a219d35d35 /src/crepe/ParticleSystem.cpp | |
parent | 163c9e3eea437daa8ef6007fbdf2f91470066cbf (diff) |
Renamed files and Emitter is a component
Diffstat (limited to 'src/crepe/ParticleSystem.cpp')
-rw-r--r-- | src/crepe/ParticleSystem.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/crepe/ParticleSystem.cpp b/src/crepe/ParticleSystem.cpp index aff7a30..8891e2b 100644 --- a/src/crepe/ParticleSystem.cpp +++ b/src/crepe/ParticleSystem.cpp @@ -1,10 +1,12 @@ -#include "ParticleSystem.hpp" +#include "ParticleSystem.h" #include <cmath> // #include <cstdlib> #include <ctime> #include <iostream> // include iostream for std::cout -#include "ParticleEmitter.hpp" -#include "Particle.hpp" +#include "ParticleEmitter.h" +#include "Particle.h" + +using namespace crepe; ParticleSystem::ParticleSystem() : m_elapsedTime(0.0f) {} // Initialize m_elapsedTime to 0 @@ -39,11 +41,11 @@ void ParticleSystem::emitParticle(ParticleEmitter& emitter) { //check if value is overthe 360 degrees if(emitter.m_maxAngle < emitter.m_minAngle) { - randomAngle = ((emitter.m_minAngle + (std::rand() % (static_cast<int>(emitter.m_maxAngle + 360 - emitter.m_minAngle + 1))))%360); + randomAngle = ((emitter.m_minAngle + (std::rand() % (static_cast<uint32_t>(emitter.m_maxAngle + 360 - emitter.m_minAngle + 1))))%360); } else { - randomAngle = emitter.m_minAngle + (std::rand() % (static_cast<int>(emitter.m_maxAngle - emitter.m_minAngle + 1))); + randomAngle = emitter.m_minAngle + (std::rand() % (static_cast<uint32_t>(emitter.m_maxAngle - emitter.m_minAngle + 1))); } |