summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-03-11 19:15:09 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-03-11 19:15:09 +0000
commitf51f782e5212c26256e07a91af1ec3adc9138525 (patch)
tree9838e3a8a8db53054345c246c9c0c589003c7f28
parentfae72b4af815724d6bd3f357f11f6a159c054d02 (diff)
downloadmana-f51f782e5212c26256e07a91af1ec3adc9138525.tar.gz
mana-f51f782e5212c26256e07a91af1ec3adc9138525.tar.bz2
mana-f51f782e5212c26256e07a91af1ec3adc9138525.tar.xz
mana-f51f782e5212c26256e07a91af1ec3adc9138525.zip
Fixed it bjørns way and corrected the date in the changelog.
-rw-r--r--ChangeLog2
-rw-r--r--src/map.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index f7e17c06..19b2a521 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-2007-02-27 Philipp Sehmisch <tmw@crushnet.org>
+2007-03-11 Philipp Sehmisch <tmw@crushnet.org>
* src/map.cpp, src/gui/viewport.cpp: Fixed a bug that made the engine
not draw the last row and column of the map.
diff --git a/src/map.cpp b/src/map.cpp
index 3206a218..575f80d3 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -147,10 +147,10 @@ Map::draw(Graphics *graphics, int scrollX, int scrollY, int layer)
if (startX < 0) startX = 0;
if (startY < 0) startY = 0;
- if (endX >= mWidth) endX = mWidth - 1;
- if (endY >= mHeight) endY = mHeight - 1;
+ if (endX >= mWidth) endX = mWidth;
+ if (endY >= mHeight) endY = mHeight;
- 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) {