0

Minor comments adjustments

This commit is contained in:
Andrew Brown
2011-11-15 13:56:39 -05:00
parent 04a2f05d1c
commit bd08dbc955

View File

@@ -296,7 +296,7 @@ class QuadtreeGen(object):
else: else:
quadPath = [[(0,0),os.path.join(dest, name, "0." + imgformat)],[(192,0),os.path.join(dest, name, "1." + imgformat)],[(0, 192),os.path.join(dest, name, "2." + imgformat)],[(192,192),os.path.join(dest, name, "3." + imgformat)]] quadPath = [[(0,0),os.path.join(dest, name, "0." + imgformat)],[(192,0),os.path.join(dest, name, "1." + imgformat)],[(0, 192),os.path.join(dest, name, "2." + imgformat)],[(192,192),os.path.join(dest, name, "3." + imgformat)]]
#stat the tile, we need to know if it exists or it's mtime #stat the tile, we need to know if it exists and its mtime
try: try:
tile_mtime = os.stat(imgpath)[stat.ST_MTIME] tile_mtime = os.stat(imgpath)[stat.ST_MTIME]
except OSError, e: except OSError, e:
@@ -381,7 +381,7 @@ class QuadtreeGen(object):
tile_mtime = None tile_mtime = None
if check_tile: if check_tile:
#stat the file, we need to know if it exists or it's mtime # stat the file, we need to know if it exists and its mtime
try: try:
tile_mtime = os.stat(imgpath)[stat.ST_MTIME] tile_mtime = os.stat(imgpath)[stat.ST_MTIME]
except OSError, e: except OSError, e:
@@ -486,8 +486,8 @@ class QuadtreeGen(object):
optimize_image(imgpath, self.imgformat, self.optimizeimg) optimize_image(imgpath, self.imgformat, self.optimizeimg)
def scan_chunks(self): def scan_chunks(self):
"""Scans the chunks of the world object and produce an iterator over """Scans the chunks of the world object and return the dirty tree object
the tiles that need to be rendered. holding the tiles that need to be rendered.
Checks mtimes of tiles in the process, unless forcerender is set on the Checks mtimes of tiles in the process, unless forcerender is set on the
object. object.
@@ -523,7 +523,7 @@ class QuadtreeGen(object):
if chunkcol % 2 == 0: if chunkcol % 2 == 0:
# This chunk is half-in one column and half-in another column. # This chunk is half-in one column and half-in another column.
# tilex is the right one, also do tilex-2 # tilex is the right one, also do tilex-2, the left one
x_tiles = 2 x_tiles = 2
else: else:
x_tiles = 1 x_tiles = 1