summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-18 00:42:57 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-18 00:42:57 +0300
commit591869ee212806e271b1c924ece1f7d44daf2a06 (patch)
tree7af3e1ffa3bfb4a60aa859a21116d4eea70bcd4a
parenta0d68ca09401811ac7764b975abca44ba8045cc9 (diff)
downloadmanaplus-591869ee212806e271b1c924ece1f7d44daf2a06.tar.gz
manaplus-591869ee212806e271b1c924ece1f7d44daf2a06.tar.bz2
manaplus-591869ee212806e271b1c924ece1f7d44daf2a06.tar.xz
manaplus-591869ee212806e271b1c924ece1f7d44daf2a06.zip
Fix code style.
-rw-r--r--src/graphics.cpp5
-rw-r--r--src/net/messagein.h3
-rw-r--r--src/net/tmwa/beinghandler.cpp3
-rw-r--r--src/net/tmwa/charserverhandler.cpp2
-rw-r--r--src/resources/image.cpp3
5 files changed, 10 insertions, 6 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 3693666ea..a6da603f6 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -1113,8 +1113,9 @@ void Graphics::fillRectangle(const gcn::Rectangle& rectangle)
for (y = y1; y < y2; y++)
{
- uint32_t *p0 = reinterpret_cast<uint32_t*>(static_cast<uint8_t*>(
- mTarget->pixels) + y * mTarget->pitch);
+ uint32_t *p0 = reinterpret_cast<uint32_t*>(
+ static_cast<uint8_t*>(mTarget->pixels)
+ + y * mTarget->pitch);
for (x = x1; x < x2; x++)
{
uint32_t *p = p0 + x;
diff --git a/src/net/messagein.h b/src/net/messagein.h
index 8672a0771..00a92f49f 100644
--- a/src/net/messagein.h
+++ b/src/net/messagein.h
@@ -72,7 +72,8 @@ class MessageIn
* Reads a special 3 byte block used by eAthena, containing x and y
* coordinates and direction.
*/
- virtual void readCoordinates(uint16_t &x, uint16_t &y, uint8_t &direction);
+ virtual void readCoordinates(uint16_t &x, uint16_t &y,
+ uint8_t &direction);
/**
* Reads a special 5 byte block used by eAthena, containing a source
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 1096f9d39..855972b95 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -449,7 +449,8 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType)
int id = msg.readInt32();
short speed = msg.readInt16();
uint16_t stunMode = msg.readInt16(); // opt1; Aethyra use this as cape
- uint32_t statusEffects = msg.readInt16(); // opt2; Aethyra use this as misc1
+ uint32_t statusEffects = msg.readInt16(); // opt2;
+ // Aethyra use this as misc1
statusEffects |= (static_cast<uint32_t>(msg.readInt16()))
<< 16; // status.options; Aethyra uses this as misc2
short job = msg.readInt16();
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 3146c994f..85ee3ce44 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -203,7 +203,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
msg.readInt16(); // speed
tempPlayer->setSubtype(msg.readInt16()); // class (used for race)
int hairStyle = msg.readInt16();
- uint16_t weapon = msg.readInt16(); // server not used it. may be need use?
+ uint16_t weapon = msg.readInt16(); // server not used it. may be need use?
tempPlayer->setSprite(SPRITE_WEAPON, weapon, "", 1, true);
data.mAttributes[LEVEL] = msg.readInt16();
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index a4be43e4e..c642980af 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -271,7 +271,8 @@ void Image::setAlpha(float alpha)
uint8_t a = static_cast<uint8_t>(
static_cast<float>(sourceAlpha) * mAlpha);
- uint32_t c = (static_cast<uint32_t*>(mSDLSurface->pixels))[i];
+ uint32_t c = (static_cast<uint32_t*>(
+ mSDLSurface->pixels))[i];
c &= ~fmt->Amask;
c |= ((a >> fmt->Aloss) << fmt->Ashift & fmt->Amask);
(static_cast<uint32_t*>(mSDLSurface->pixels))[i] = c;