From 3a3faf0ebde7ba88de6400c2c0ea257ae36a9c6b Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 15 Apr 2013 14:53:05 +0200 Subject: [PATCH] Tweak level loading code --- erdslangetjie/level.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erdslangetjie/level.py b/erdslangetjie/level.py index 4dffd6d..645a62f 100644 --- a/erdslangetjie/level.py +++ b/erdslangetjie/level.py @@ -14,7 +14,10 @@ class Level(object): def load(self, levelfile): """Load the level""" self.data = [] - for line in levelfile.readlines(): + # Because of how kivy's coordinate system works, + # we reverse the lines so things match up between + # the file and the display (top of file == top of display) + for line in reversed(levelfile.readlines()): self.data.append(list(line.strip('\n'))) def load_tiles(self): -- 2.34.1