diff options
author | Ira Rice <irarice@gmail.com> | 2008-11-30 23:33:35 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-11-30 23:33:35 -0700 |
commit | 52401fd3ce7f9ce94069ecc71412466af4e893a0 (patch) | |
tree | d5435aa797ee7839139199e6610eba0d8dec41ae /src/gui/minimap.cpp | |
parent | 76ec01b8d071fb2ecdb943bd74156e0bd92e1b09 (diff) | |
download | mana-52401fd3ce7f9ce94069ecc71412466af4e893a0.tar.gz mana-52401fd3ce7f9ce94069ecc71412466af4e893a0.tar.bz2 mana-52401fd3ce7f9ce94069ecc71412466af4e893a0.tar.xz mana-52401fd3ce7f9ce94069ecc71412466af4e893a0.zip |
Fixed map origin formula so that it will work on any map proportion. I
accidently screwed this up earlier to make it work on our minimaps that
I forgot to check it on a different sized map.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r-- | src/gui/minimap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index ec4675f5..3a2e483d 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -86,8 +86,8 @@ void Minimap::draw(gcn::Graphics *graphics) if (mMapImage->getWidth() > a.width || mMapImage->getHeight() > a.height) { - mapOriginX += ((a.width) / 2) - player_node->mX; - mapOriginY += ((a.height) / 2) - player_node->mY; + mapOriginX += ((a.width) / 2) - (player_node->mX * mProportion); + mapOriginY += ((a.height) / 2) - (player_node->mY * mProportion); } static_cast<Graphics*>(graphics)-> |