From 914d3de7c324cb1ec456892702689718352a7842 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Fri, 17 Jun 2011 16:46:06 +0200 Subject: First pass on removing tile hard coded values. Every files has been checked against the hard coded 32 values except the map.cpp file. I also added convenience functions in the Game class, centralized the default item icon size, and removed two unused defines in being.cpp. --- src/gui/viewport.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui/viewport.cpp') diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index e10a1a60..0353fd44 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -402,7 +402,8 @@ void Viewport::_drawPath(Graphics *graphics, const Path &path, graphics->fillRectangle(gcn::Rectangle(squareX - 4, squareY - 4, 8, 8)); graphics->drawText( - toString(mMap->getMetaTile(i->x / 32, i->y / 32)->Gcost), + toString(mMap->getMetaTile(i->x / mMap->getTileWidth(), + i->y / mMap->getTileHeight())->Gcost), squareX + 4, squareY + 12, gcn::Graphics::CENTER); } } -- cgit v1.2.3-60-g2f50