summaryrefslogtreecommitdiff
path: root/hercules
diff options
context:
space:
mode:
Diffstat (limited to 'hercules')
-rw-r--r--hercules/code/server/maps.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/hercules/code/server/maps.py b/hercules/code/server/maps.py
index 2de4bfa..bdeb0f7 100644
--- a/hercules/code/server/maps.py
+++ b/hercules/code/server/maps.py
@@ -33,3 +33,9 @@ def extractMaps(f, mapsCount):
w.write(struct.pack("H", sx))
w.write(struct.pack("H", sy))
w.write(data)
+ with open(destDir + name + ".txt", "wb") as w:
+ arr = array.array("B")
+ arr.fromstring(data)
+ for x in xrange(0, sx):
+ for y in xrange(0, sy):
+ w.write("{0},{1}:{2}\n".format(x, y, arr[x + y * sx]))