0

removed lingering traces of the hash system

This commit is contained in:
Aaron Griffith
2011-03-01 20:28:31 -05:00
parent 4293851fcc
commit d813053329
2 changed files with 2 additions and 22 deletions

View File

@@ -16,7 +16,6 @@
import numpy import numpy
from PIL import Image, ImageDraw, ImageEnhance, ImageOps from PIL import Image, ImageDraw, ImageEnhance, ImageOps
import os.path import os.path
import hashlib
import logging import logging
import time import time
import math import math
@@ -406,22 +405,6 @@ class ChunkRenderer(object):
return pseudo_data return pseudo_data
def _hash_blockarray(self):
"""Finds a hash of the block array"""
if hasattr(self, "_digest"):
return self._digest
h = hashlib.md5()
h.update(self.level['Blocks'])
# If the render algorithm changes, change this line to re-generate all
# the chunks automatically:
h.update("1")
digest = h.hexdigest()
# 6 digits ought to be plenty
self._digest = digest[:6]
return self._digest
def calculate_darkness(self, skylight, blocklight): def calculate_darkness(self, skylight, blocklight):
"""Takes a raw blocklight and skylight, and returns a value """Takes a raw blocklight and skylight, and returns a value
between 0.0 (fully lit) and 1.0 (fully black) that can be used as between 0.0 (fully lit) and 1.0 (fully black) that can be used as

View File

@@ -17,7 +17,6 @@ import multiprocessing
import itertools import itertools
import os import os
import os.path import os.path
import hashlib
import functools import functools
import re import re
import shutil import shutil
@@ -251,8 +250,8 @@ class QuadtreeGen(object):
newdir = "new" + str(dirnum) newdir = "new" + str(dirnum)
newdirpath = getpath(newdir) newdirpath = getpath(newdir)
files = [str(dirnum)+"."+self.imgformat, str(dirnum)+".hash", str(dirnum)] files = [str(dirnum)+"."+self.imgformat, str(dirnum)]
newfiles = [str(newnum)+"."+self.imgformat, str(newnum)+".hash", str(newnum)] newfiles = [str(newnum)+"."+self.imgformat, str(newnum)]
os.mkdir(newdirpath) os.mkdir(newdirpath)
for f, newf in zip(files, newfiles): for f, newf in zip(files, newfiles):
@@ -555,8 +554,6 @@ def render_worldtile(quadtree, chunks, colstart, colend, rowstart, rowend, path)
If there are no chunks, this tile is not saved (if it already exists, it is If there are no chunks, this tile is not saved (if it already exists, it is
deleted) deleted)
If the hash file already exists, it is checked against the hash of each chunk.
Standard tile size has colend-colstart=2 and rowend-rowstart=4 Standard tile size has colend-colstart=2 and rowend-rowstart=4
There is no return value There is no return value