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.
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.
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.
Today in "why did we ever do this?", we discover we've vendored
code from PIL/Pillow, but PIL/Pillow moved some macro definitions
around, so now our vendored code conflicted with their macros that
they included in the headers we're including.
The solution is to throw out our vendored macros and update the
semantics in our vendored Draw.c. I'm not sure why we vendored it,
but we seemingly did remove some stuff from it to avoid having to
pull in all of PIL/Pillow.
On Windows with mingw-w64, Pillow includes windows.h, and thus
including Imaging.h would result in a name conflict of "TRANSPARENT",
which windows.h #defines but overviewer.h wants to use as enum.
For the record, this used to not be broken back when I initially
fixed Pillow for mingw-w64, so the change got somewhere introduced
between then and now.
Note that this commit changes the pseudo-ancil-data type from unsigned
int to an unsigned short. Our pseudoancil code creates 5 bits of data
to store adjacency information for glass. Glass also has 4 bits for
color info. This means we need a total of 9 bits to render these (thus
int --> short)
is_transparent returns 1 for every unknown block because that's an easy way to
make them ignore lighting, however, this makes cave render useless with a map
containing unknown ores.
The definition is_known_transparent checks whether a block is transparent and is known.
This is a workaround, a proper fix would be to have unknown blocks be neither transparent nor
solid. Or make them both. But don't prefer one of the two.
The nether rendering mode was not properly handling x and z values
outside of the range 0 to 15. This was causing an out-of-bounds
segfault when accessing the remove_block array.
Fixes#881Fixes#851Fixes#852