summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-03-11 18:49:32 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-03-11 18:49:32 +0000
commitfae72b4af815724d6bd3f357f11f6a159c054d02 (patch)
tree61d92169043714e8229d5d57552a0f688d3bf565 /src/map.cpp
parent79ed4a7f9ab912df90bb5cd08f74ddf0d1f088d2 (diff)
downloadmana-fae72b4af815724d6bd3f357f11f6a159c054d02.tar.gz
mana-fae72b4af815724d6bd3f357f11f6a159c054d02.tar.bz2
mana-fae72b4af815724d6bd3f357f11f6a159c054d02.tar.xz
mana-fae72b4af815724d6bd3f357f11f6a159c054d02.zip
Fixed a bug that made the engine not draw the last row and column of the map.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 897fbe22..3206a218 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -150,7 +150,7 @@ Map::draw(Graphics *graphics, int scrollX, int scrollY, int layer)
if (endX >= mWidth) endX = mWidth - 1;
if (endY >= mHeight) endY = mHeight - 1;
- for (int y = startY; y < endY; y++)
+ for (int y = startY; y <= endY; y++)
{
// If drawing the fringe layer, make sure all sprites above this row of
// tiles have been drawn
@@ -163,7 +163,7 @@ Map::draw(Graphics *graphics, int scrollX, int scrollY, int layer)
}
}
- for (int x = startX; x < endX; x++)
+ for (int x = startX; x <= endX; x++)
{
Image *img = getTile(x, y, layer);
if (img) {