From 52401fd3ce7f9ce94069ecc71412466af4e893a0 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Sun, 30 Nov 2008 23:33:35 -0700 Subject: 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 --- src/gui/minimap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/minimap.cpp') 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)-> -- cgit v1.2.3-70-g09d2