summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-05 01:35:02 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-05 01:35:02 +0300
commit097ef639a433f5d87d675ee7551a1640788031bd (patch)
tree6d38ea5a0b134e402d8824e15ee215351b594360 /src/gui/viewport.cpp
parent21b14e4b8708be1d9b804f61330ef7cd5521397d (diff)
downloadmv-097ef639a433f5d87d675ee7551a1640788031bd.tar.gz
mv-097ef639a433f5d87d675ee7551a1640788031bd.tar.bz2
mv-097ef639a433f5d87d675ee7551a1640788031bd.tar.xz
mv-097ef639a433f5d87d675ee7551a1640788031bd.zip
Rename actor functions getPosition and setPosition.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 157815811..23afa9bfd 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -141,7 +141,7 @@ void Viewport::draw(Graphics *const graphics)
// Calculate viewpoint
- const Vector &playerPos = localPlayer->getPosition();
+ const Vector &playerPos = localPlayer->getPixelPositionF();
const int player_x = CAST_S32(playerPos.x) - mMidTileX;
const int player_y = CAST_S32(playerPos.y) - mMidTileY;
@@ -314,7 +314,7 @@ void Viewport::drawDebugPath(Graphics *const graphics)
if (mouseDestination.x != lastMouseDestination.x
|| mouseDestination.y != lastMouseDestination.y)
{
- const Vector &playerPos = localPlayer->getPosition();
+ const Vector &playerPos = localPlayer->getPixelPositionF();
debugPath = mMap->findPath(
CAST_S32(playerPos.x - mapTileSize / 2) / mapTileSize,
@@ -983,8 +983,8 @@ void Viewport::moveCameraToActor(const BeingId actorId,
const Actor *const actor = actorManager->findBeing(actorId);
if (!actor)
return;
- const Vector &actorPos = actor->getPosition();
- const Vector &playerPos = localPlayer->getPosition();
+ const Vector &actorPos = actor->getPixelPositionF();
+ const Vector &playerPos = localPlayer->getPixelPositionF();
settings.cameraMode = 1;
mCameraRelativeX = CAST_S32(actorPos.x - playerPos.x) + x;
mCameraRelativeY = CAST_S32(actorPos.y - playerPos.y) + y;
@@ -996,7 +996,7 @@ void Viewport::moveCameraToPosition(const int x, const int y)
if (!localPlayer)
return;
- const Vector &playerPos = localPlayer->getPosition();
+ const Vector &playerPos = localPlayer->getPixelPositionF();
settings.cameraMode = 1;
mCameraRelativeX = x - CAST_S32(playerPos.x);