434 Commits

Author SHA1 Message Date
Rogier
0a9a885e63 Fix to redis return value verification
(thanks to clang for reporting the issue :-)
2014-06-18 10:11:54 +02:00
Rogier
60b39e7d4b Generalize processing of air and ignore nodes 2014-06-18 10:11:11 +02:00
Rogier
f832530bf8 Allow air nodes to have a color.
As this comes with a significant performance penalty, this
feature must be enabled using the command-line option --drawair

For best results, the color of air should be fully transparent,
so that underlying nodes will override it.
2014-06-18 10:07:55 +02:00
Rogier
ced0390611 Add a default color for nodes
This is useful to show invisible ('air' or 'invalid') nodes in blocks
that are in the database using a different color than blocks that are
not in the database (which will have no color at all, causing the
background color to show).
2014-06-18 10:06:46 +02:00
Rogier
5369adb937 Interpret fully transparent node colors as default colors
(to be overridden by the color of any not-fully-transparent node beneath)

Fully transparent nodes also do not participate in shading.
2014-06-18 10:03:46 +02:00
Rogier
9b5da3ad2c Optimize generation of horizontally sparse maps
(i.e. maps with most but not all pixels in every row empty)
2014-06-18 10:03:32 +02:00
Rogier
5b9d51daa1 Improve installation and package generation; add deb and rpm
Minetestmapper can now be installed into a proper directory hierarchy
(instead of all files being dumped into /usr/local/. for instance.)

Non-hierarchical installation (or creation of a non-hierarchical archive)
is also still supported, and remains the default, for backwards compatibility.

Packaging on windows remains unchanged, due to lack of infrastructure :-)
2014-06-18 10:03:20 +02:00
Rogier
e6322f2911 Add an include directive for colors files
A colors file can now specify other colors files, from which
additional node color specifications will be read. This allows, for
instance, using system-installed colors file for most colors,
and only overriding some of its colors in a custom colors file.

As a purpose of using a custom colors file may be to leave the colors
for some nodes undefined, it is now also possible to undefine a
previously defined node color (i.e. after reading another colors file
which defines a color for the node).
2014-06-18 10:02:51 +02:00
Rogier
224c6b1df7 Add a command-line option to report which colors file is being used. 2014-06-18 09:50:41 +02:00
Rogier
b7fe1404fa Add support for system-wide colors.txt file 2014-06-10 17:41:28 +02:00
Rogier
f6adec1bf9 Configure a better version number (partly or fully auto-computed) 2014-05-26 21:31:29 +02:00
Rogier
8d3117e8d3 Fixes to CMakeLists.txt
- Continue processing if libraries are not found (so that all missing
  libraries are reported)
- Set compiler flags correctly if CMAKE_BUILD_TYPE is not set (fixes bug #0)
- Make CMAKE_BUILD_TYPE=Release the default
- Increase optimisation level for Release
2014-05-26 21:31:29 +02:00
Rogier
ace16ce575 Fix to translucency computation & improve water colors 2014-05-24 20:49:00 +02:00
Rogier
9706084e8d Remove lingering printfs... 2014-05-23 23:29:34 +02:00
Rogier
b9e82658d5 Added Changelog 2014-05-23 15:52:15 +02:00
Rogier
bacbcfc1e4 Skip comments at end of colors.txt lines as well
(and detect and report incomplete lines as well)
2014-05-23 15:52:15 +02:00
Rogier
f3c25ac729 Fix and improve configuration of tiles location 2014-05-23 13:47:41 +02:00
Rogier
bd2ff09dfb Fix computation of map size with tiles (height could be miscomputed) 2014-05-23 13:47:41 +02:00
Rogier
20163ec7a4 Fix to geometrymode option parsing code (allow empty optarg) 2014-05-23 13:47:41 +02:00
Rogier
6071a76bf2 Document --verbose=2 in README.rst 2014-05-23 13:47:41 +02:00
Rogier
736e2a8d27 Add command-line options to draw geometrical figures on the map
Supported figures are points, lines, ellipses, rectangles
and text.

The figures' locations can be specified using either world
coordinates, or map coordinates.
2014-05-23 13:47:41 +02:00
Rogier
c00cc13e6a Generalize the parsing of coordinates and geometry strings.
In preparation for future changes.

New geometry and new coordinate syntax has been added as well:

Additional node coordinate formats:
    <block>#[<node>]
    <block>.[<node>]

Additional geometry formats:
    <x1>,<y1>:<x2>,<y2>
    <x>,<y>:<w>x<h>

Also: the old geometry behavior (block granularity and map shrinking)
is now enabled only if the old geometry format is used (for compatibility)
2014-05-23 13:47:40 +02:00
Rogier
7bdea466b3 Add NodeCoord (in preparation for future changes) 2014-05-23 13:47:40 +02:00
Sfan5
febd3283da Better error reporting for LevelDB backend 2014-05-23 13:47:40 +02:00
Rogier
64bf53fc8a Close colors file after parsing 2014-05-23 13:47:40 +02:00
Rogier
6544d4de37 Catch block data parsing errors (e.g. caused by a corrupt map block)
Corrupt blocks are reported, and map generation continues. Map
generation aborts only after 100 or more corrupt map blocks.
2014-05-23 13:47:40 +02:00
Rogier
721fbfac52 Obtain database backend type from the world's world.mt file by default 2014-05-23 13:47:40 +02:00
Rogier
2fabf991ab Make sqlite backend optional (enabled by default) 2014-05-22 10:41:48 +02:00
Rogier
d707b882e8 Add redis database backend (port of sfan5's patches)
Patches included/ported:
	2553e44e8dec75d99408b56f469ff4be61c84336
	79d338a90c1a99fce9334bea5d4c296f190373fc
2014-05-22 10:41:48 +02:00
Rogier
98fa76bb6b Minor statistics fix to leveldb backend
(And a minor edit to README.rst)
2014-05-22 10:41:48 +02:00
Rogier
e097580b3e Remove colors.txt from .gitignore 2014-05-22 10:41:47 +02:00
Rogier
3df8be20bb Fix SEGV when top part of the map is empty 2014-05-22 10:41:47 +02:00
Rogier
f36a8b61fb Allow colors with alpha to differ from colors without alpha
(using the same colors.txt file)
2014-05-22 10:41:47 +02:00
Rogier
15bab71533 Allow setting verbosity back to 0 2014-05-22 10:41:47 +02:00
Rogier
2c00ad665c Fix SEGV caused by unknown/unrecognised option name 2014-05-22 10:41:47 +02:00
Rogier
49cb97598d Fix choice between c++11 unordered_map and c++0x regular (ordered) map 2014-05-22 10:41:47 +02:00
Rogier
0aee764203 Use C++11 if possible
This allows the use of more efficient (i.e. faster) data structures
like unordered_map.
2014-05-22 10:41:12 +02:00
Rogier
f60fd0a9aa Search world's minetest directory for colors file as well.
(which is assumed to be the directory two levels up from the
 world's directory, if it contains 'minetest.conf')
2014-05-22 10:41:12 +02:00
Rogier
ae5c031d5b Remove trailing NULs (if any) in node names from MT node name map 2014-05-22 10:41:12 +02:00
Rogier
65b37bec25 Allow player and origin colors to have an alpha component.
Values: 0: fully transparent, 255: fully opaque.

Note that this doesn't yield the expected color blending just
yet, due to libgd messing it up. (Seemingly, the libgd arc
drawing function draws some pixels repeatedly, resulting in a
more opaque circle than desired)
2014-05-22 10:41:12 +02:00
Rogier
493c5842a1 Fix conversion of libgd alpha value: libgd uses 0..127 (not 255) 2014-05-22 10:41:12 +02:00
Rogier
1c7b31a5dc When not using a geometry option, *do* generate the smallest possible map 2014-05-22 10:41:12 +02:00
Rogier
d5b3b2a7da Improve error messages for zlib decompression errors 2014-05-22 10:41:12 +02:00
Rogier
21b9ffe0a1 Don't treat empty map blocks as opaque
(empty map blocks are blocks that have no associated block data
 in the database (which should probably not happen), or that are
 not in the database at all, but that are still queried for some
 reason (which is unlikely))
2014-05-22 10:41:11 +02:00
Rogier
5c73495d7b Initialize color to 0,0,0,0 by default (instead of 0,255,255,255) 2014-05-22 10:41:11 +02:00
Rogier
d57ce63c46 Move min/max mapblock defines to config.h, and rename them 2014-05-22 10:41:11 +02:00
Rogier
c692d3d652 Improvements to database code & some small optimisations 2014-05-22 10:32:12 +02:00
Rogier
bbf92d2ffa Split struct BlockPos into own header 2014-05-22 10:12:10 +02:00
Rogier
902f3b45d7 Use a common ustring type definition instead of different custom versions 2014-05-22 10:12:03 +02:00
Rogier
0117556550 Make --geometrymode accept an empty option list
An empty option list modifies the behavior of a subsequent plain
--geometry to not make the old mode (shrink,block) the default.
2014-05-12 09:26:17 +02:00