diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-02-20 22:49:45 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-02-20 22:49:45 -0700 |
commit | df37ad4697e674d16859e69c0ce358283f410e20 (patch) | |
tree | aaa7e5ec55802d1b6bc2c1b79ead86ea43f87abb /src/gui/debugwindow.cpp | |
parent | 952a06663d6e229ddd719f604bbf79e632d32945 (diff) | |
download | mana-df37ad4697e674d16859e69c0ce358283f410e20.tar.gz mana-df37ad4697e674d16859e69c0ce358283f410e20.tar.bz2 mana-df37ad4697e674d16859e69c0ce358283f410e20.tar.xz mana-df37ad4697e674d16859e69c0ce358283f410e20.zip |
Fix debug window to show correct mouse coordinates
Diffstat (limited to 'src/gui/debugwindow.cpp')
-rw-r--r-- | src/gui/debugwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp index 2ed891db..42f2f110 100644 --- a/src/gui/debugwindow.cpp +++ b/src/gui/debugwindow.cpp @@ -67,8 +67,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(); |