From 0e7df1f731f9afe24c6ba7458211f4c81e4717b3 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Wed, 23 May 2007 22:11:54 +0000 Subject: Changed argument order in text particle creation. --- src/being.cpp | 4 +--- src/particle.cpp | 14 ++++++-------- src/particle.h | 5 ++--- src/textparticle.cpp | 4 ++-- src/textparticle.h | 4 ++-- 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 */ -- cgit v1.2.3-70-g09d2