summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-20 22:49:45 -0700
committerIra Rice <irarice@gmail.com>2009-02-20 23:34:19 -0700
commit1bb480c85d255dc53654dd7b86495583f7875217 (patch)
treebaa855645ce162e4d72cc465dd6e6931350b4480
parent8c1e0d01cdd4ec664aa7a6d11a129263a353a61b (diff)
downloadmana-client-1bb480c85d255dc53654dd7b86495583f7875217.tar.gz
mana-client-1bb480c85d255dc53654dd7b86495583f7875217.tar.bz2
mana-client-1bb480c85d255dc53654dd7b86495583f7875217.tar.xz
mana-client-1bb480c85d255dc53654dd7b86495583f7875217.zip
Fix debug window to show correct mouse coordinates
-rw-r--r--src/gui/debugwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index c41e0a5e..68b70817 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -68,8 +68,8 @@ void DebugWindow::logic()
// Get the current mouse position
int mouseX, mouseY;
SDL_GetMouseState(&mouseX, &mouseY);
- int mouseTileX = mouseX / 32 + viewport->getCameraX();
- int mouseTileY = mouseY / 32 + viewport->getCameraY();
+ int mouseTileX = (mouseX + viewport->getCameraX()) / 32;
+ int mouseTileY = (mouseY + viewport->getCameraY()) / 32;
mFPSLabel->setCaption(toString(fps) + " FPS");
mFPSLabel->adjustSize();