From 612307ff155d0eaef9dab2b11ac295579a53657c Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Wed, 15 Sep 2010 21:52:57 -0400 Subject: [PATCH] implemented hack to fix water grids. Water looks okay now! --- chunk.py | 2 +- quadtree.py | 4 ++-- textures.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chunk.py b/chunk.py index f13f748..cb5d8e9 100644 --- a/chunk.py +++ b/chunk.py @@ -214,7 +214,7 @@ class ChunkRenderer(object): # Since there are 16x16x128 blocks in a chunk, the image will be 384x1728 # (height is 128*12 high, plus the size of the horizontal plane: 16*12) if not img: - img = Image.new("RGBA", (384, 1728)) + img = Image.new("RGBA", (384, 1728), (38,92,255,0)) for x in xrange(15,-1,-1): for y in xrange(16): diff --git a/quadtree.py b/quadtree.py index a2c176e..c5aadd5 100644 --- a/quadtree.py +++ b/quadtree.py @@ -251,7 +251,7 @@ def render_innertile(dest, name): return # Create the actual image now - img = Image.new("RGBA", (384, 384)) + img = Image.new("RGBA", (384, 384), (38,92,255,0)) if q0path: quad0 = Image.open(q0path).resize((192,192), Image.ANTIALIAS) @@ -351,7 +351,7 @@ def render_worldtile(chunks, colstart, colend, rowstart, rowend, path): return # Compile this image - tileimg = Image.new("RGBA", (width, height)) + tileimg = Image.new("RGBA", (width, height), (38,92,255,0)) # col colstart will get drawn on the image starting at x coordinates -(384/2) # row rowstart will get drawn on the image starting at y coordinates -(192/2) diff --git a/textures.py b/textures.py index 35fed34..4c4fb16 100644 --- a/textures.py +++ b/textures.py @@ -139,7 +139,7 @@ def _build_block(top, side): top and side should be 16x16 image objects. Returns a 24x24 image """ - img = Image.new("RGBA", (24,24)) + img = Image.new("RGBA", (24,24), (38,92,255,0)) top = _transform_image(top)