Fix script

This commit is contained in:
Miloslav Číž 2020-03-02 13:07:08 +01:00
parent 88fd2cdc96
commit f210113f4f

View File

@ -19,6 +19,7 @@ elementTypes = [
"TELEPORT", "TELEPORT",
"TERMINAL", "TERMINAL",
"COLUMN", "COLUMN",
"RUIN",
"CARD0", "CARD0",
"CARD1", "CARD1",
"CARD2", "CARD2",
@ -102,7 +103,7 @@ for y in range(64):
n = getPixel(70 + x,5 + y) n = getPixel(70 + x,5 + y)
if n < 64: if n < 64:
levelMap[x][y] = (n,False) levelMap[63 - x][y] = (n,False)
else: else:
# tile with special property, create a define for it # tile with special property, create a define for it
@ -120,7 +121,7 @@ for y in range(64):
defNum = len(defines) defNum = len(defines)
defines.append((tile,prop)) defines.append((tile,prop))
levelMap[x][y] = (defNum,True) levelMap[63 - x][y] = (defNum,True)
# load elements # load elements
@ -131,12 +132,12 @@ for y in range(64):
n = getPixel(x + 70, y + 70) n = getPixel(x + 70, y + 70)
if n < len(elementTypes): if n < len(elementTypes):
elements.append((n,x,y)) elements.append((n,63 - x,y))
elif n >= 240: elif n >= 240:
if playerFound: if playerFound:
raise(Exception("Multiple player starting positions specified.")) raise(Exception("Multiple player starting positions specified."))
playerStart = [x,y,(n - 240) * 16] playerStart = [63 - x,y,(n - 240) * 16]
playerFound = True playerFound = True
if not playerFound: if not playerFound:
@ -153,7 +154,7 @@ for i in range(128 - len(elements)):
x = 41 x = 41
y = 114 y = 114
for i in range(6): for i in range(7):
textures.append(getPixel(x,y)) textures.append(getPixel(x,y))
x += 4 x += 4