summaryrefslogtreecommitdiff
path: root/src/resources/map/maplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-10 21:00:39 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-10 21:00:39 +0300
commit571cf00b4aac82777c7c1efc3e8ac6d5bc459c9c (patch)
tree2562c7502793871c5852df48a1b54c3d17e3406f /src/resources/map/maplayer.cpp
parentb74f800df5fa4165bc82decb8e0d38cf349d71f7 (diff)
downloadmanaplus-571cf00b4aac82777c7c1efc3e8ac6d5bc459c9c.tar.gz
manaplus-571cf00b4aac82777c7c1efc3e8ac6d5bc459c9c.tar.bz2
manaplus-571cf00b4aac82777c7c1efc3e8ac6d5bc459c9c.tar.xz
manaplus-571cf00b4aac82777c7c1efc3e8ac6d5bc459c9c.zip
Add unit tests for MapLayer::specialLayerDraw.
Also fix tests for MapLayer::drawFringe.
Diffstat (limited to 'src/resources/map/maplayer.cpp')
-rw-r--r--src/resources/map/maplayer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp
index 74d5cacde..c481f8e33 100644
--- a/src/resources/map/maplayer.cpp
+++ b/src/resources/map/maplayer.cpp
@@ -564,7 +564,7 @@ void MapLayer::drawFringe(Graphics *const graphics,
drawSpecialLayer(graphics,
y,
0,
- std::min(x0 + tilePtr->nextTile, endX),
+ std::min(x0 + tilePtr->nextTile + 1, endX),
scrollX,
scrollY);
if (x0 + tilePtr->nextTile >= endX)
@@ -626,7 +626,7 @@ void MapLayer::drawFringe(Graphics *const graphics,
drawSpecialLayer(graphics,
y,
x,
- std::min(x + nextTile, endX),
+ std::min(x + nextTile + 1, endX),
scrollX,
scrollY);
}