summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-03-28 20:46:50 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-03-28 20:46:50 +0200
commitce94f62be91c98310281b33dbc7f4b79fd4e8052 (patch)
tree5252980318741ae95314ab231e1dddce8dc09086 /src/net/tmwa/beinghandler.cpp
parente7e550c863c3bb5d5e8697ecce1ea37ad248e362 (diff)
downloadmana-ce94f62be91c98310281b33dbc7f4b79fd4e8052.tar.gz
mana-ce94f62be91c98310281b33dbc7f4b79fd4e8052.tar.bz2
mana-ce94f62be91c98310281b33dbc7f4b79fd4e8052.tar.xz
mana-ce94f62be91c98310281b33dbc7f4b79fd4e8052.zip
Random cleanups - Part 2
- Removed another bogus comment. - Made functions used only in the tA::beinghandler static. - Don't init the destination to an irrelevant value in being::setDestination()
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 5ae11423..d61559f8 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -101,8 +101,9 @@ Being *createBeing(int id, short job)
return being;
}
-void handleMoveMessage(Uint16 srcX, Uint16 srcY, Uint16 dstX, Uint16 dstY,
- Being *dstBeing, int tileWidth, int tileHeight)
+static void handleMoveMessage(Uint16 srcX, Uint16 srcY,
+ Uint16 dstX, Uint16 dstY,
+ Being *dstBeing, int tileWidth, int tileHeight)
{
// Avoid dealing with flawed destination
if (srcX && srcY && dstX && dstY)
@@ -120,13 +121,12 @@ void handleMoveMessage(Uint16 srcX, Uint16 srcY, Uint16 dstX, Uint16 dstY,
|| std::abs(dest.y - pos.y) > POS_DEST_DIFF_TOLERANCE)
dstBeing->setPosition(pos);
- // We turn the destination back to a pixel one.
dstBeing->setDestination(dest.x, dest.y);
}
}
-void handlePosMessage(Uint16 x, Uint16 y, Being *dstBeing,
- int tileWidth, int tileHeight, Uint8 dir = 0)
+static void handlePosMessage(Uint16 x, Uint16 y, Being *dstBeing,
+ int tileWidth, int tileHeight, Uint8 dir = 0)
{
// Avoid dealing with flawed destination
if (x && y)