summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-05-23 22:11:54 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-05-23 22:11:54 +0000
commit0e7df1f731f9afe24c6ba7458211f4c81e4717b3 (patch)
treeb7ef48b879a90c8d10f9447fe910c6fb62784461
parent993c98c3813b2ad7caf3dcd9761b4c9a17de39b6 (diff)
downloadmana-0e7df1f731f9afe24c6ba7458211f4c81e4717b3.tar.gz
mana-0e7df1f731f9afe24c6ba7458211f4c81e4717b3.tar.bz2
mana-0e7df1f731f9afe24c6ba7458211f4c81e4717b3.tar.xz
mana-0e7df1f731f9afe24c6ba7458211f4c81e4717b3.zip
Changed argument order in text particle creation.
-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
*/