summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-02-17 20:07:06 +0100
committerTreeki <treeki@gmail.com>2012-02-17 20:07:06 +0100
commit08d3794ee696231961b1e74e52d08d0e52b37566 (patch)
treeab82b545c7a408cc5a02ee7906227337e6b88c02
parentd6903bed3ebf170a68be7a4891df6a2fb5f31dc7 (diff)
downloadkoopatlas-08d3794ee696231961b1e74e52d08d0e52b37566.tar.gz
koopatlas-08d3794ee696231961b1e74e52d08d0e52b37566.zip
fixed downward slope rendering
-rw-r--r--src/tileset.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tileset.py b/src/tileset.py
index 244cf8e..2528d8a 100644
--- a/src/tileset.py
+++ b/src/tileset.py
@@ -155,7 +155,7 @@ class KPTileObject(object):
# Paint the mainblock
for row in h:
for tile in w:
- if (tile == (row * self.width) + offset):
+ if (tile == (row * self.width) + offset) and offset < self.width:
buf[row][tile] = mainblock[offset]
offset += 1
offset = 0
@@ -163,7 +163,7 @@ class KPTileObject(object):
# Paint the subblock
for row in h:
for tile in w:
- if (tile == ((row - 1) * self.width) + offset):
+ if (tile == ((row - 1) * self.width) + offset) and offset < self.width:
buf[row][tile] = mainblock[offset]
offset += 1
offset = 0