summaryrefslogtreecommitdiff
path: root/src/particle/particleengine.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-22 02:12:41 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-22 02:12:41 +0300
commit238642d6a99d3f764529a339d0802d3e3909f391 (patch)
treef115374ffdf930f530bfc916065823032fc303cb /src/particle/particleengine.cpp
parentad56ac4bda60beddf33640df346801af1ece9ccf (diff)
downloadmanaplus-238642d6a99d3f764529a339d0802d3e3909f391.tar.gz
manaplus-238642d6a99d3f764529a339d0802d3e3909f391.tar.bz2
manaplus-238642d6a99d3f764529a339d0802d3e3909f391.tar.xz
manaplus-238642d6a99d3f764529a339d0802d3e3909f391.zip
Use strong typed enum ParticlePhysics.
Diffstat (limited to 'src/particle/particleengine.cpp')
-rw-r--r--src/particle/particleengine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/particle/particleengine.cpp b/src/particle/particleengine.cpp
index 02e21e0bc..b54e36d27 100644
--- a/src/particle/particleengine.cpp
+++ b/src/particle/particleengine.cpp
@@ -44,7 +44,7 @@ class Image;
int ParticleEngine::particleCount = 0;
int ParticleEngine::maxCount = 0;
-int ParticleEngine::fastPhysics = 0;
+ParticlePhysicsT ParticleEngine::fastPhysics = ParticlePhysics::Best;
int ParticleEngine::emitterSkip = 1;
bool ParticleEngine::enabled = true;
const float ParticleEngine::PARTICLE_SKY = 800.0F;
@@ -67,7 +67,9 @@ ParticleEngine::~ParticleEngine()
void ParticleEngine::setupEngine() restrict2
{
ParticleEngine::maxCount = config.getIntValue("particleMaxCount");
- ParticleEngine::fastPhysics = config.getIntValue("particleFastPhysics");
+ ParticleEngine::fastPhysics = fromInt(config.getIntValue(
+ "particleFastPhysics"),
+ ParticlePhysics);
ParticleEngine::emitterSkip =
config.getIntValue("particleEmitterSkip") + 1;
if (ParticleEngine::emitterSkip == 0)