0

biomes are now murky *and* smooth

closes issue #708

Props to mkor for taking advantage of the existing average loop, and
CounterPillow for sussing out the correct biome multiplication
color. This commit is just a teensy bit more future-proof.
This commit is contained in:
Aaron Griffith
2012-05-06 20:19:38 -04:00
parent 06b6af5dbc
commit 34e5ddf620
3 changed files with 50 additions and 41 deletions

View File

@@ -26,13 +26,18 @@
// increment this value if you've made a change to the c extesion
// and want to force users to rebuild
#define OVERVIEWER_EXTENSION_VERSION 31
#define OVERVIEWER_EXTENSION_VERSION 32
/* Python PIL, and numpy headers */
#include <Python.h>
#include <Imaging.h>
#include <numpy/arrayobject.h>
/* like (a * b + 127) / 255), but much faster on most platforms
from PIL's _imaging.c */
#define MULDIV255(a, b, tmp) \
(tmp = (a) * (b) + 128, ((((tmp) >> 8) + (tmp)) >> 8))
/* macro for getting a value out of various numpy arrays the 3D arrays have
interesting, swizzled coordinates because minecraft (anvil) stores blocks
in y/z/x order for 3D, z/x order for 2D */