diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-05 01:35:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-05 01:35:02 +0300 |
commit | 097ef639a433f5d87d675ee7551a1640788031bd (patch) | |
tree | 6d38ea5a0b134e402d8824e15ee215351b594360 /src/gui | |
parent | 21b14e4b8708be1d9b804f61330ef7cd5521397d (diff) | |
download | mv-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')
-rw-r--r-- | src/gui/viewport.cpp | 10 | ||||
-rw-r--r-- | src/gui/windows/minimap.cpp | 6 |
2 files changed, 8 insertions, 8 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); diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index 371d98414..3f0f4c14e 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -281,7 +281,7 @@ void Minimap::draw2(Graphics *const graphics) const int h = rect.h; if (w > a.width || h > a.height) { - const Vector &p = localPlayer->getPosition(); + const Vector &p = localPlayer->getPixelPositionF(); mMapOriginX = (a.width / 2) - (p.x + static_cast<float>( viewport->getCameraRelativeX()) * mWidthProportion) / 32; @@ -382,7 +382,7 @@ void Minimap::draw2(Graphics *const graphics) dotSize - 1) * mHeightProportion); const int offsetWidth = CAST_S32(static_cast<float>( dotSize - 1) * mWidthProportion); - const Vector &pos = being->getPosition(); + const Vector &pos = being->getPixelPositionF(); graphics->fillRectangle(Rect( static_cast<float>(pos.x * mWidthProportion) / 32 @@ -435,7 +435,7 @@ void Minimap::draw2(Graphics *const graphics) } } - const Vector &pos = localPlayer->getPosition(); + const Vector &pos = localPlayer->getPixelPositionF(); const int gw = graphics->getWidth(); const int gh = graphics->getHeight(); |