diff options
author | Dennis Friis <peavey@inspircd.org> | 2009-05-17 01:37:10 +0200 |
---|---|---|
committer | Dennis Friis <peavey@inspircd.org> | 2009-05-17 02:06:57 +0200 |
commit | fc6b38d113e7f78af1075a37e1853e00294742e9 (patch) | |
tree | 6871ab3b726df75775041e4a74e048da4115dabe /src/gui/viewport.cpp | |
parent | ff4b7434b7bd25412a24a13bc0ef00e253c17f0e (diff) | |
download | mana-fc6b38d113e7f78af1075a37e1853e00294742e9.tar.gz mana-fc6b38d113e7f78af1075a37e1853e00294742e9.tar.bz2 mana-fc6b38d113e7f78af1075a37e1853e00294742e9.tar.xz mana-fc6b38d113e7f78af1075a37e1853e00294742e9.zip |
Enable and fix path drawing for athena.
Notice that in Being::Logic() we call Being::setPosition() with the added
offset of x+16, y+32, this makes both the Vector Being::mPos and Being::mPx /
Being::mPy not mean the same as pre-merge client. Thus some effects and code
dividing these members with 32 to get the tile coords get wrong results.
Perhaps this all these methods of getting x,y on beings should be cleaned up
so we have 1 method we settle on and store the sprites' fixed x,y offset on
the sprite itself. so we have x + fixed_offset + animation_offset and not all
these magic numbers floating around.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index f92a81b8..2c3f4007 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -195,7 +195,7 @@ void Viewport::draw(gcn::Graphics *gcnGraphics) mMap->drawCollision(graphics, (int) mPixelViewX, (int) mPixelViewY); -#if 0 +#if EATHENA_SUPPORT drawDebugPath(graphics); #endif } @@ -265,8 +265,8 @@ void Viewport::drawDebugPath(Graphics *graphics) const Vector &playerPos = player_node->getPosition(); Path debugPath = mMap->findPath( - (int) playerPos.x / 32, - (int) playerPos.y / 32, + (int) (playerPos.x - 16) / 32, + (int) (playerPos.y - 32) / 32, mouseTileX, mouseTileY, 0xFF); drawPath(graphics, debugPath); |