diff options
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index b4ad1b1d..b2945617 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -179,7 +179,7 @@ void Viewport::draw(gcn::Graphics *gcnGraphics) { mPixelViewX = player_x; mPixelViewY = player_y; - }; + } // Don't move camera so that the end of the map is on screen const int mapWidthPixels = mMap->getWidth() * mMap->getTileWidth(); @@ -269,9 +269,6 @@ void Viewport::draw(gcn::Graphics *gcnGraphics) } } - if (miniStatusWindow) - miniStatusWindow->drawIcons(graphics); - // Draw contained widgets WindowContainer::draw(gcnGraphics); } @@ -306,6 +303,10 @@ void Viewport::logic() void Viewport::_followMouse() { Uint8 button = SDL_GetMouseState(&mMouseX, &mMouseY); + + mMouseX /= graphics->getScale(); + mMouseY /= graphics->getScale(); + // If the left button is dragged if (mPlayerFollowMouse && button & SDL_BUTTON(1)) { @@ -333,6 +334,9 @@ void Viewport::_drawDebugPath(Graphics *graphics) // Get the current mouse position SDL_GetMouseState(&mMouseX, &mMouseY); + mMouseX /= graphics->getScale(); + mMouseY /= graphics->getScale(); + // Prepare the walkmask corresponding to the protocol unsigned char walkMask; switch (Net::getNetworkType()) |