summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-27 23:32:12 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-27 23:32:12 +0300
commitee0e11ec941fd0847cd24464d960605147a20c61 (patch)
treef0d7e3cb89bcba7828816c38b5ebdab608c0a9ed
parentc87612abbb3c926a57e051ee5940791c6882037e (diff)
downloadmanaplus-ee0e11ec941fd0847cd24464d960605147a20c61.tar.gz
manaplus-ee0e11ec941fd0847cd24464d960605147a20c61.tar.bz2
manaplus-ee0e11ec941fd0847cd24464d960605147a20c61.tar.xz
manaplus-ee0e11ec941fd0847cd24464d960605147a20c61.zip
Remove default parameters from particleengine.
-rw-r--r--src/being/actorsprite.cpp2
-rw-r--r--src/being/being.cpp8
-rw-r--r--src/particle/particle.cpp2
-rw-r--r--src/particle/particleengine.h15
-rw-r--r--src/resources/map/map.cpp4
-rw-r--r--src/statuseffect.cpp4
6 files changed, 20 insertions, 15 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index c854c998f..2df91d041 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -489,7 +489,7 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
{
FOR_EACH (StringVectCIter, itr, display.particles)
{
- Particle *const p = particleEngine->addEffect(*itr, 0, 0);
+ Particle *const p = particleEngine->addEffect(*itr, 0, 0, 0);
controlAutoParticle(p);
}
}
diff --git a/src/being/being.cpp b/src/being/being.cpp
index d51b45fbd..ce89a59bd 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -5036,7 +5036,7 @@ void Being::addItemParticles(const int id,
{
FOR_EACH (StringVectCIter, itr, display.particles)
{
- Particle *const p = particleEngine->addEffect(*itr, 0, 0);
+ Particle *const p = particleEngine->addEffect(*itr, 0, 0, 0);
controlCustomParticle(p);
pi->files.push_back(*itr);
pi->particles.push_back(p);
@@ -5074,7 +5074,7 @@ void Being::addItemParticlesCards(const int id,
{
FOR_EACH (StringVectCIter, itr, display.particles)
{
- Particle *const p = particleEngine->addEffect(*itr, 0, 0);
+ Particle *const p = particleEngine->addEffect(*itr, 0, 0, 0);
controlCustomParticle(p);
pi->files.push_back(*itr);
pi->particles.push_back(p);
@@ -5088,7 +5088,7 @@ void Being::addItemParticlesCards(const int id,
const SpriteDisplay &restrict display2 = info.getDisplay();
FOR_EACH (StringVectCIter, itr, display2.particles)
{
- Particle *const p = particleEngine->addEffect(*itr, 0, 0);
+ Particle *const p = particleEngine->addEffect(*itr, 0, 0, 0);
controlCustomParticle(p);
pi->files.push_back(*itr);
pi->particles.push_back(p);
@@ -5147,7 +5147,7 @@ void Being::recreateItemParticles() restrict2
FOR_EACH (STD_VECTOR<std::string>::const_iterator, str, pi->files)
{
Particle *const p = particleEngine->addEffect(
- *str, 0, 0);
+ *str, 0, 0, 0);
controlCustomParticle(p);
pi->particles.push_back(p);
}
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp
index 40b1b7a5a..26471d85a 100644
--- a/src/particle/particle.cpp
+++ b/src/particle/particle.cpp
@@ -242,7 +242,7 @@ void Particle::updateSelf() restrict2
> 0x00 && !mDeathEffect.empty())
{
Particle *restrict const deathEffect = particleEngine->addEffect(
- mDeathEffect, 0, 0);
+ mDeathEffect, 0, 0, 0);
if (deathEffect != nullptr)
deathEffect->moveBy(mPos);
}
diff --git a/src/particle/particleengine.h b/src/particle/particleengine.h
index 19a9c4e9f..87c536855 100644
--- a/src/particle/particleengine.h
+++ b/src/particle/particleengine.h
@@ -92,27 +92,30 @@ class ParticleEngine final
* particleEffectFile.
*/
Particle *addEffect(const std::string &restrict particleEffectFile,
- const int pixelX, const int pixelY,
- const int rotation = 0) restrict2;
+ const int pixelX,
+ const int pixelY,
+ const int rotation) restrict2;
/**
* Creates a standalone text particle.
*/
Particle *addTextSplashEffect(const std::string &restrict text,
- const int x, const int y,
+ const int x,
+ const int y,
const Color *restrict const color,
Font *restrict const font,
- const bool outline = false)
+ const bool outline)
restrict2 A_NONNULL(5, 6);
/**
* Creates a standalone text particle.
*/
Particle *addTextRiseFadeOutEffect(const std::string &restrict text,
- const int x, const int y,
+ const int x,
+ const int y,
const Color *restrict const color,
Font *restrict const font,
- const bool outline = false)
+ const bool outline)
restrict2 A_NONNULL(5, 6);
void setMap(Map *const map)
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index 56483486f..6e93c82c5 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -1109,10 +1109,12 @@ void Map::initializeParticleEffects() const restrict2
i != mParticleEffects.end();
++i)
{
+ // +++ add z for map particle effects?
Particle *const p = particleEngine->addEffect(
i->file,
i->x,
- i->y);
+ i->y,
+ 0);
if ((p != nullptr) &&
i->w > 0 &&
i->h > 0)
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index 2b48636ca..908161edf 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -78,14 +78,14 @@ Particle *StatusEffect::getStartParticle() const
{
if (particleEngine == nullptr || mStartParticleEffect.empty())
return nullptr;
- return particleEngine->addEffect(mStartParticleEffect, 0, 0);
+ return particleEngine->addEffect(mStartParticleEffect, 0, 0, 0);
}
Particle *StatusEffect::getParticle() const
{
if (particleEngine == nullptr || mParticleEffect.empty())
return nullptr;
- return particleEngine->addEffect(mParticleEffect, 0, 0);
+ return particleEngine->addEffect(mParticleEffect, 0, 0, 0);
}
AnimatedSprite *StatusEffect::getIcon() const