summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-02 04:57:16 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-02 04:57:16 +0300
commit5f43cf85c7e59f0e1192f803560848777d64743f (patch)
tree283ddb56228ab7b19a62be6f6be0344e77745757 /src/map.cpp
parentca58a3cced99fc2a8989da0155c1927bc0f08b6f (diff)
downloadmv-5f43cf85c7e59f0e1192f803560848777d64743f.tar.gz
mv-5f43cf85c7e59f0e1192f803560848777d64743f.tar.bz2
mv-5f43cf85c7e59f0e1192f803560848777d64743f.tar.xz
mv-5f43cf85c7e59f0e1192f803560848777d64743f.zip
Replace some getters to direct members access in graphics class.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp10
1 files changed, 5 insertions, 5 deletions
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<AmbientLayer*>::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)