From 1db7d10787f462430054ba04110a8d4647bdbd0a Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 9 Feb 2009 22:30:00 +0100 Subject: Mostly whitespace fixes Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(". --- src/being.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/being.cpp') 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; } -- cgit v1.2.3-60-g2f50