Break apart loops into cythonizable ones

This commit is contained in:
David Vierra 2015-01-03 13:17:12 -10:00
parent cd52c59518
commit d997a44264

View File

@ -37,9 +37,13 @@ class BlockModelMesh(object):
areaBlocks = self.sectionUpdate.areaBlocks
faceQuadVerts = []
for y in xrange(1, 17):
yield
for z, x in itertools.product(xrange(1, 17), xrange(1, 17)):
cdef unsigned short y, z, x, ID, meta
cdef short dx, dy, dz,
cdef unsigned short nx, ny, nz, nID
for y in range(1, 17):
for z in range(1, 17):
for x in range(1, 17):
ID = areaBlocks[y, z, x]
if ID == 0:
continue