diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-09 22:30:00 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-09 17:10:37 -0700 |
commit | 1db7d10787f462430054ba04110a8d4647bdbd0a (patch) | |
tree | 60dc4d04c738b1f54a41bc9d9b6d0e5ffb0fb1d4 /src/being.cpp | |
parent | 1ae95b709235ce811ce72437aa257bb7500e00d0 (diff) | |
download | mana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.gz mana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.bz2 mana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.xz mana-1db7d10787f462430054ba04110a8d4647bdbd0a.zip |
Mostly whitespace fixes
Removed tab characters and trailing spaces and added spaces between
"if(", "for(", "while(" and "switch(".
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/being.cpp b/src/being.cpp index 9b8ede27..0ac86d13 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -190,7 +190,7 @@ void Being::setSpeech(const std::string &text, Uint32 time) while (start != std::string::npos && end != std::string::npos) { // Catch multiple embeds and ignore them so it doesn't crash the client. - while ((mSpeech.find('[', start + 1) != std::string::npos) && + while ((mSpeech.find('[', start + 1) != std::string::npos) && (mSpeech.find('[', start + 1) < end)) { start = mSpeech.find('[', start + 1); @@ -314,7 +314,7 @@ void Being::setAction(Action action) { currentAction = mEquippedWeapon->getAttackType(); } - else + else { currentAction = ACTION_ATTACK; } @@ -383,11 +383,11 @@ SpriteDirection Being::getSpriteDirection() const { dir = DIRECTION_RIGHT; } - else + else { dir = DIRECTION_LEFT; } - + return dir; } @@ -517,10 +517,10 @@ void Being::drawSpeech(int offsetX, int offsetY) mSpeechBubble->setCaption(mName, mNameColor); - // Not quite centered, but close enough. However, it's not too important to get - // it right right now, as it doesn't take bubble collision into account yet. + // Not quite centered, but close enough. However, it's not too important to get + // it right right now, as it doesn't take bubble collision into account yet. mSpeechBubble->setText(mSpeech); - mSpeechBubble->setPosition(px - (mSpeechBubble->getWidth() * 4 / 11), py - 70 - + mSpeechBubble->setPosition(px - (mSpeechBubble->getWidth() * 4 / 11), py - 70 - (mSpeechBubble->getNumRows()*14)); mSpeechBubble->setVisible(true); } @@ -548,7 +548,7 @@ Being::Type Being::getType() const int Being::getOffset(char pos, char neg) const { // Check whether we're walking in the requested direction - if (mAction != WALK || !(mDirection & (pos | neg))) + if (mAction != WALK || !(mDirection & (pos | neg))) { return 0; } @@ -557,13 +557,13 @@ int Being::getOffset(char pos, char neg) const // We calculate the offset _from_ the _target_ location offset -= 32; - if (offset > 0) + if (offset > 0) { offset = 0; } // Going into negative direction? Invert the offset. - if (mDirection & pos) + if (mDirection & pos) { offset = -offset; } @@ -576,11 +576,11 @@ int Being::getWidth() const if (mSprites[BASE_SPRITE]) { const int width = mSprites[BASE_SPRITE]->getWidth() > DEFAULT_WIDTH ? - mSprites[BASE_SPRITE]->getWidth() : + mSprites[BASE_SPRITE]->getWidth() : DEFAULT_WIDTH; return width; } - else + else { return DEFAULT_WIDTH; } @@ -592,11 +592,11 @@ int Being::getHeight() const if (mSprites[BASE_SPRITE]) { const int height = mSprites[BASE_SPRITE]->getHeight() > DEFAULT_HEIGHT ? - mSprites[BASE_SPRITE]->getHeight() : + mSprites[BASE_SPRITE]->getHeight() : DEFAULT_HEIGHT; return height; } - else + else { return DEFAULT_HEIGHT; } |