summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-02-22 23:40:57 +0300
committerAndrei Karas <akaras@inbox.ru>2018-02-22 23:40:57 +0300
commitc9c31f50ea1bd57304e8fcf7bd81f186b844e21f (patch)
treecf002ab80fffafd58afa9fd79cb89a8eb0f8e9a9
parentb895abfe3890cb8f8485a55bccbabdda1b742a11 (diff)
downloadevol-tools-c9c31f50ea1bd57304e8fcf7bd81f186b844e21f.tar.gz
evol-tools-c9c31f50ea1bd57304e8fcf7bd81f186b844e21f.tar.bz2
evol-tools-c9c31f50ea1bd57304e8fcf7bd81f186b844e21f.tar.xz
evol-tools-c9c31f50ea1bd57304e8fcf7bd81f186b844e21f.zip
hercules: removed debug output in map converter and use newer hash function.
-rw-r--r--hercules/code/clienttoserver/maps.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/hercules/code/clienttoserver/maps.py b/hercules/code/clienttoserver/maps.py
index e6cbb66..06b7eb5 100644
--- a/hercules/code/clienttoserver/maps.py
+++ b/hercules/code/clienttoserver/maps.py
@@ -5,7 +5,7 @@
import array
import csv
-import md5
+import hashlib
import os
import zlib
import struct
@@ -74,7 +74,6 @@ def recreateMap(names):
tmxName = names[0]
mCaheName = destDir + names[1][:-3] + "mcache"
with open(mCaheName, "wb") as w:
- print (tmxName, mCaheName)
dom = minidom.parse(tmxName)
root = dom.documentElement
tilesets = []
@@ -156,7 +155,7 @@ def recreateMap(names):
binData = struct.pack(str(len(tiles))+"B", *tiles)
binData = zlib.compress(binData)
writeInt16(w, 1)
- writeData(w, md5.new(binData).digest()) # 16 bytes
+ writeData(w, hashlib.md5(binData).digest()) # 16 bytes
writeInt16(w, width)
writeInt16(w, height)
writeInt32(w, len(binData))