diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-24 19:45:33 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-24 15:09:20 -0700 |
commit | 0b848dd3c46ee8391522f330eaf3ad0f75462e09 (patch) | |
tree | d94d492c36e7114766a4590020ef4753eeca892e /src | |
parent | 581206ab0fecbb3afc7afebedac541be51097cf5 (diff) | |
download | mana-0b848dd3c46ee8391522f330eaf3ad0f75462e09.tar.gz mana-0b848dd3c46ee8391522f330eaf3ad0f75462e09.tar.bz2 mana-0b848dd3c46ee8391522f330eaf3ad0f75462e09.tar.xz mana-0b848dd3c46ee8391522f330eaf3ad0f75462e09.zip |
Code reformatting
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/progressbar.cpp | 2 | ||||
-rw-r--r-- | src/gui/truetypefont.cpp | 2 | ||||
-rw-r--r-- | src/monster.cpp | 2 | ||||
-rw-r--r-- | src/resources/image.h | 13 |
4 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp index 6671d388..5ce01b35 100644 --- a/src/gui/progressbar.cpp +++ b/src/gui/progressbar.cpp @@ -98,7 +98,7 @@ void ProgressBar::draw(gcn::Graphics *graphics) { graphics->setColor(gcn::Color(mRed, mGreen, mBlue, 200)); graphics->fillRectangle(gcn::Rectangle(4, 4, - (int)(mProgress * (getWidth() - 8)), + (int) (mProgress * (getWidth() - 8)), getHeight() - 8)); } } diff --git a/src/gui/truetypefont.cpp b/src/gui/truetypefont.cpp index 27b327f2..6e8efeff 100644 --- a/src/gui/truetypefont.cpp +++ b/src/gui/truetypefont.cpp @@ -115,9 +115,7 @@ void TrueTypeFont::drawString(gcn::Graphics *graphics, int x, int y) { if (text.empty()) - { return; - } Graphics *g = dynamic_cast<Graphics *>(graphics); diff --git a/src/monster.cpp b/src/monster.cpp index 4006315b..814a5904 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -183,7 +183,7 @@ Being::TargetCursorSize Monster::getTargetCursorSize() const return getInfo().getTargetCursorSize(); } -const MonsterInfo& Monster::getInfo() const +const MonsterInfo &Monster::getInfo() const { return MonsterDB::get(mJob - 1002); } diff --git a/src/resources/image.h b/src/resources/image.h index a0ae66c5..0974b18b 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -78,7 +78,8 @@ class Image : public Resource * @return <code>NULL</code> if an error occurred, a valid pointer * otherwise. */ - static Resource *load(void *buffer, unsigned bufferSize, Dye const &dye); + static Resource *load(void *buffer, unsigned bufferSize, + Dye const &dye); /** * Loads an image from an SDL surface. @@ -93,12 +94,14 @@ class Image : public Resource /** * Returns the width of the image. */ - virtual int getWidth() const { return mBounds.w; } + virtual int getWidth() const + { return mBounds.w; } /** * Returns the height of the image. */ - virtual int getHeight() const { return mBounds.h; } + virtual int getHeight() const + { return mBounds.h; } /** * Creates a new image with the desired clipping rectangle. @@ -106,7 +109,7 @@ class Image : public Resource * @return <code>NULL</code> if creation failed and a valid * object otherwise. */ - virtual Image* getSubImage(int x, int y, int width, int height); + virtual Image *getSubImage(int x, int y, int width, int height); /** * Sets the alpha value of this image. @@ -183,7 +186,7 @@ class SubImage : public Image * @return <code>NULL</code> if creation failed and a valid * image otherwise. */ - Image* getSubImage(int x, int y, int width, int height); + Image *getSubImage(int x, int y, int width, int height); private: Image *mParent; |