summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being.cpp4
-rw-r--r--src/particle.cpp14
-rw-r--r--src/particle.h5
-rw-r--r--src/textparticle.cpp4
-rw-r--r--src/textparticle.h4
5 files changed, 13 insertions, 18 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 5c0bac7f..45032f6f 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -188,9 +188,7 @@ Being::takeDamage(int amount)
}
// show damage number
- particleEngine->addTextSplashEffect(damage,
- font,
- 255, 255, 255,
+ particleEngine->addTextSplashEffect(damage, 255, 255, 255, font,
mPx + 16, mPy + 16);
}
diff --git a/src/particle.cpp b/src/particle.cpp
index b35522ce..88e8c2b3 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -313,15 +313,13 @@ Particle::addEffect (std::string particleEffectFile, int pixelX, int pixelY)
Particle*
-Particle::addTextSplashEffect(std::string text, gcn::Font *font,
- int colorR, int colorG, int colorB, int x, int y)
+Particle::addTextSplashEffect(std::string text,
+ int colorR, int colorG, int colorB,
+ gcn::Font *font, int x, int y)
{
- Particle *newParticle = new TextParticle(mMap, text, font,
- colorR, colorG, colorB);
- newParticle->setPosition( x,
- y,
- 0
- );
+ Particle *newParticle = new TextParticle(mMap, text, colorR, colorG, colorB,
+ font);
+ newParticle->setPosition(x, y, 0);
newParticle->setVector ( ((rand()%100) - 50) / 200.0f, //X Vector
((rand()%100) - 50) / 200.0f, //Y Vector
((rand()%100) / 200.0f) + 4.0f //Z Vector
diff --git a/src/particle.h b/src/particle.h
index ed360ea2..4073abdd 100644
--- a/src/particle.h
+++ b/src/particle.h
@@ -112,9 +112,8 @@ class Particle : public Sprite
* Creates a standalone text particle
*/
Particle*
- addTextSplashEffect(std::string text, gcn::Font *font,
- int colorR, int colorG, int colorB,
- int x, int y);
+ addTextSplashEffect(std::string text, int colorR, int colorG, int colorB,
+ gcn::Font *font, int x, int y);
/**
* Adds an emitter to the particle
diff --git a/src/textparticle.cpp b/src/textparticle.cpp
index ef4ebc48..dd01d2fe 100644
--- a/src/textparticle.cpp
+++ b/src/textparticle.cpp
@@ -25,8 +25,8 @@
#include "graphics.h"
-TextParticle::TextParticle(Map *map, const std::string &text, gcn::Font *font,
- int colorR, int colorG, int colorB):
+TextParticle::TextParticle(Map *map, const std::string &text,
+ int colorR, int colorG, int colorB, gcn::Font *font):
Particle(map),
mText(text),
mTextFont(font),
diff --git a/src/textparticle.h b/src/textparticle.h
index 75e1f8b1..b365c885 100644
--- a/src/textparticle.h
+++ b/src/textparticle.h
@@ -33,8 +33,8 @@
class TextParticle : public Particle
{
public:
- TextParticle(Map *map, const std::string &text, gcn::Font *font,
- int colorR, int colorG, int colorB);
+ TextParticle(Map *map, const std::string &text,
+ int colorR, int colorG, int colorB, gcn::Font *font);
/**
* Draws the particle image
*/