summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2009-07-27 19:32:32 -0400
committerChuck Miller <shadowmil@gmail.com>2009-07-27 19:33:40 -0400
commit5a27795be5450add2cf3da3c03b2fe8771325e3e (patch)
treedaedd1beba82a87966317b81c92f9662caae2dda /src/gui
parent99648c2c8693de68ebe0449e139413864e5dd6f1 (diff)
downloadmana-5a27795be5450add2cf3da3c03b2fe8771325e3e.tar.gz
mana-5a27795be5450add2cf3da3c03b2fe8771325e3e.tar.bz2
mana-5a27795be5450add2cf3da3c03b2fe8771325e3e.tar.xz
mana-5a27795be5450add2cf3da3c03b2fe8771325e3e.zip
Makes mX and mY in the being class private
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/viewport.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 68b5fed3..9a631581 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -116,22 +116,12 @@ void Viewport::draw(gcn::Graphics *gcnGraphics)
}
// Calculate viewpoint
-#ifdef TMWSERV_SUPPORT
int midTileX = (graphics->getWidth() + mScrollCenterOffsetX) / 2;
int midTileY = (graphics->getHeight() + mScrollCenterOffsetX) / 2;
const Vector &playerPos = player_node->getPosition();
const int player_x = (int) playerPos.x - midTileX;
const int player_y = (int) playerPos.y - midTileY;
-#else
- int midTileX = (graphics->getWidth() + mScrollCenterOffsetX) / 32 / 2;
- int midTileY = (graphics->getHeight() + mScrollCenterOffsetY) / 32 / 2;
-
- int player_x = (player_node->mX - midTileX) * 32 +
- player_node->getXOffset();
- int player_y = (player_node->mY - midTileY) * 32 +
- player_node->getYOffset();
-#endif
if (mScrollLaziness < 1)
mScrollLaziness = 1; // Avoids division by zero