From 5f43cf85c7e59f0e1192f803560848777d64743f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Jul 2011 04:57:16 +0300 Subject: Replace some getters to direct members access in graphics class. --- src/map.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 01a003f09..89ae7006e 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -540,11 +540,11 @@ void Map::update(int ticks) void Map::draw(Graphics *graphics, int scrollX, int scrollY) { // Calculate range of tiles which are on-screen - int endPixelY = graphics->getHeight() + scrollY + mTileHeight - 1; + int endPixelY = graphics->mHeight + scrollY + mTileHeight - 1; endPixelY += mMaxTileHeight - mTileHeight; int startX = scrollX / mTileWidth; int startY = scrollY / mTileHeight; - int endX = (graphics->getWidth() + scrollX + mTileWidth - 1) / mTileWidth; + int endX = (graphics->mWidth + scrollX + mTileWidth - 1) / mTileWidth; int endY = endPixelY / mTileHeight; // Make sure actors are sorted ascending by Y-coordinate @@ -568,7 +568,7 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY) UserPalette::WALKABLE_HIGHLIGHT)); graphics->fillRectangle(gcn::Rectangle(0, 0, - graphics->getWidth(), graphics->getHeight())); + graphics->mWidth, graphics->mHeight)); } // draw the game world @@ -649,7 +649,7 @@ void Map::drawCollision(Graphics *graphics, int scrollX, int scrollY, int endPixelY = graphics->getHeight() + scrollY + mTileHeight - 1; int startX = scrollX / mTileWidth; int startY = scrollY / mTileHeight; - int endX = (graphics->getWidth() + scrollX + mTileWidth - 1) / mTileWidth; + int endX = (graphics->mWidth + scrollX + mTileWidth - 1) / mTileWidth; int endY = endPixelY / mTileHeight; if (startX < 0) startX = 0; @@ -807,7 +807,7 @@ void Map::drawAmbientLayers(Graphics *graphics, LayerType type, for (std::vector::iterator i = layers->begin(); i != layers->end(); ++i) { - (*i)->draw(graphics, graphics->getWidth(), graphics->getHeight()); + (*i)->draw(graphics, graphics->mWidth, graphics->mHeight); // Detail 1: only one overlay, higher: all overlays if (detail == 1) -- cgit v1.2.3-60-g2f50