Turns out my previous grasp of how Minecraft does this was wrong.
This seems to be the correct way. One side effect is that biome data
now has less resolution. One only really notices this when looking at
water, for which Minecraft does not even use the water colours for
in-game, otherwise I can't really tell a big difference.
Fixes#1698.
Fixes#1650.
Mojang changed the biomes code so that it now can have different
biomes for different Y levels. We need to adjust our logic accordingly,
which is done through some small BiomeDispensary class where we shove
a numpy'd Mojang array in and can then read out the biomes for each level.
Biome data is now stored per-section, which needed some changes on the C
side of things. I didn't change anything in the biome overlay code so
I wouldn't be surprised if it's broken now, but for the time being I'd
rather have 1.15 fixed than some obscure overlay.
Tested to work with 1.14 and 1.15 data. No new biomes have been added
to the code yet.
This adds:
- mossy stone brick stairs
- mossy cobblestone stairs
- mossy stone brick walls
We also add another block class for walls, and while we're at it,
clean up the stairs texture function to not have a huge sprawling
elif mess for loading textures, but instead to a cheeky dictionary
lookup.
In case you're wondering, yes I am just as disgusted by this code as
you are.
* Fix GCC signed-unsigned and pointer-warnings
A lot of the signed/unsigned issues are related to the fact that I converted
a lot of indexing values to use unsigned types, little did I know that a lot of
other values used when indexing actually come from the python-end. Python does
not have built-in unsigned types so all integers coming from Python are signed
implicitly so a lot of things like image-size and x, y coordiantes are specially
handling negative-integer cases.
Guess we'll just take our `int32_t i = 0; i < blah; ++i` and like it.
Code now compiles with no warnings or nagging.
If loading the grass and foliage biome colour fails, Overviewer doesn't
necessarily crash, it just renders everything gray, apart from one small
issue: in trying to call base_finish, it'd crash trying to decrease the
reference of a null pointer.
Sorry for the noise in mc_id.h, but somebody decided they want DOS
line endings and I couldn't allow that to happen. When not doing that
put the whole thing into diff, I decided to just fix the indentation
too while I was at it.
Needed bugfixing of some overlooked unsigned char usages for block IDs,
as otherwise the lighting would be scuffed.
Concerns issue #1486.
Many things work, some don't. Notably, genPOI doesn't work, and
there's some signedness comparison stuff going on in the C extension.
This also completely drops support for Python 2, as maintaining a C
extension for both Python 2 and 3 is a pain and not worth it for the
9 months that Python 2 is still going to be supported upstream.
The documentation needs to be adjusted as well.
All of the few tests we have pass, and rendering a map works, both
with a configuration file and without. We can also use optimizeimages.
Concerns #1528.
Some bad distributions (Debian) apparently are not good enough to
have a Pillow version from this decade packaged.
Therefore, we need to do it the painful way of prefixing our
symbols and refactoring everything to use them.
A new header file called "utils.h" has been added for this purpose,
and it is included in "overviewer.h".
The following macros have been prefixed with "OV_":
- MIN
- MAX
- CLAMP
- BLEND
- MULDIV255
Additionally, the C extension version was bumped to 56 because 55
was reverted back to 54.