summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-01-24 18:13:48 +0300
committerAndrei Karas <akaras@inbox.ru>2013-01-24 18:13:48 +0300
commit578898dfed40d73a5b13677e12819e46eb650102 (patch)
tree77d67d8352947bef748e9a587b92c06ec3930045 /src/map.cpp
parentc3755c31222a7cd4e90f772eb88a992dd64f6c06 (diff)
downloadmv-578898dfed40d73a5b13677e12819e46eb650102.tar.gz
mv-578898dfed40d73a5b13677e12819e46eb650102.tar.bz2
mv-578898dfed40d73a5b13677e12819e46eb650102.tar.xz
mv-578898dfed40d73a5b13677e12819e46eb650102.zip
Fix draw most left visible tiles in map layers.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 1d4e0535c..97d074333 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -326,7 +326,7 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY)
// Calculate range of tiles which are on-screen
const int endPixelY = graphics->mHeight + scrollY + mTileHeight - 1
+ mMaxTileHeight - mTileHeight;
- const int startX = scrollX / mTileWidth;
+ const int startX = scrollX / mTileWidth - 1;
const int startY = scrollY / mTileHeight;
const int endX = (graphics->mWidth + scrollX + mTileWidth - 1)
/ mTileWidth;