From 08d3794ee696231961b1e74e52d08d0e52b37566 Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 17 Feb 2012 20:07:06 +0100 Subject: fixed downward slope rendering --- src/tileset.py | 4 ++-- 1 file 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 -- cgit v1.2.3