diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-14 17:18:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-14 17:18:04 +0300 |
commit | 36de2c64d6bba077775360c9c0d681f0a096ffc3 (patch) | |
tree | e505ba9337b4eabb73d4d37cdc15d6e7c1f91727 /src/particle | |
parent | d9a77eb8ac5d507665cbf8b20f5d8187148ebfd1 (diff) | |
download | mv-36de2c64d6bba077775360c9c0d681f0a096ffc3.tar.gz mv-36de2c64d6bba077775360c9c0d681f0a096ffc3.tar.bz2 mv-36de2c64d6bba077775360c9c0d681f0a096ffc3.tar.xz mv-36de2c64d6bba077775360c9c0d681f0a096ffc3.zip |
chnage return values for draw functions from bool to void.
Diffstat (limited to 'src/particle')
-rw-r--r-- | src/particle/imageparticle.cpp | 8 | ||||
-rw-r--r-- | src/particle/imageparticle.h | 2 | ||||
-rw-r--r-- | src/particle/particle.cpp | 3 | ||||
-rw-r--r-- | src/particle/particle.h | 2 | ||||
-rw-r--r-- | src/particle/textparticle.cpp | 8 | ||||
-rw-r--r-- | src/particle/textparticle.h | 2 |
6 files changed, 12 insertions, 13 deletions
diff --git a/src/particle/imageparticle.cpp b/src/particle/imageparticle.cpp index 0654b3c6f..fa96f5962 100644 --- a/src/particle/imageparticle.cpp +++ b/src/particle/imageparticle.cpp @@ -67,12 +67,12 @@ ImageParticle::~ImageParticle() } } -bool ImageParticle::draw(Graphics *const graphics, +void ImageParticle::draw(Graphics *const graphics, const int offsetX, const int offsetY) const { FUNC_BLOCK("ImageParticle::draw", 1) if (mAlive != ALIVE || !mImage) - return false; + return; const int screenX = static_cast<int>(mPos.x) + offsetX - mImage->mBounds.w / 2; @@ -85,7 +85,7 @@ bool ImageParticle::draw(Graphics *const graphics, screenY + mImage->mBounds.h < 0 || screenY > graphics->mHeight) { - return false; + return; } float alphafactor = mAlpha; @@ -104,5 +104,5 @@ bool ImageParticle::draw(Graphics *const graphics, mImage->setAlpha(alphafactor); DRAW_IMAGE(graphics, mImage, screenX, screenY); - return true; + return; } diff --git a/src/particle/imageparticle.h b/src/particle/imageparticle.h index daae640ce..91a11bfc2 100644 --- a/src/particle/imageparticle.h +++ b/src/particle/imageparticle.h @@ -53,7 +53,7 @@ class ImageParticle : public Particle /** * Draws the particle image */ - virtual bool draw(Graphics *const graphics, + virtual void draw(Graphics *const graphics, const int offsetX, const int offsetY) const override final; diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 7bdc24345..99e4117ae 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -98,9 +98,8 @@ void Particle::setupEngine() logger->log1("Particle engine set up"); } -bool Particle::draw(Graphics *const, const int, const int) const +void Particle::draw(Graphics *const, const int, const int) const { - return false; } bool Particle::update() diff --git a/src/particle/particle.h b/src/particle/particle.h index f677ee01b..d14db0572 100644 --- a/src/particle/particle.h +++ b/src/particle/particle.h @@ -100,7 +100,7 @@ class Particle : public Actor /** * Draws the particle image. */ - virtual bool draw(Graphics *const graphics, + virtual void draw(Graphics *const graphics, const int offsetX, const int offsetY) const override; diff --git a/src/particle/textparticle.cpp b/src/particle/textparticle.cpp index 0a1798c21..355102531 100644 --- a/src/particle/textparticle.cpp +++ b/src/particle/textparticle.cpp @@ -43,17 +43,17 @@ TextParticle::TextParticle(const std::string &text, { } -bool TextParticle::draw(Graphics *const graphics, +void TextParticle::draw(Graphics *const graphics, const int offsetX, const int offsetY) const { if (!mColor || !mTextFont) - return false; + return; BLOCK_START("TextParticle::draw") if (!isAlive()) { BLOCK_END("TextParticle::draw") - return false; + return; } const int screenX = static_cast<int>(mPos.x) + offsetX; @@ -85,5 +85,5 @@ bool TextParticle::draw(Graphics *const graphics, } mTextFont->drawString(graphics, mText, screenX - mTextWidth, screenY); BLOCK_END("TextParticle::draw") - return true; + return; } diff --git a/src/particle/textparticle.h b/src/particle/textparticle.h index 7b63ff259..47cf14d62 100644 --- a/src/particle/textparticle.h +++ b/src/particle/textparticle.h @@ -40,7 +40,7 @@ class TextParticle final : public Particle /** * Draws the particle image. */ - bool draw(Graphics *const graphics, + void draw(Graphics *const graphics, const int offsetX, const int offsetY) const override final; // hack to improve text visibility |