Commit Graph

103 Commits

Author SHA1 Message Date
Martijn Versteegh b4e1145086 Because filesnames starting with a "-" are somewhat annoying to work with, prepend "tile_" to the tile filenames. 2019-01-15 10:17:17 +01:00
Martijn Versteegh 07b4aabde6 comment++ 2018-11-30 13:15:22 +01:00
Martijn Versteegh 1ab180c5d0 Also write zoom factor to metadata file. 2018-11-30 13:12:06 +01:00
Martijn Versteegh e4397212e9 Print warning on failure to write metadata file. 2018-11-28 15:44:02 +01:00
Martijn Versteegh ae5a1b8fbe Fix Clang compilation.
Apparently ofstream.open() only takes a char const * and not a std::string in Clang++;
2018-11-28 15:42:49 +01:00
Martijn Versteegh 4752832fe8 Write metadata textfile with tile information, so a separate utility can easily generate a zoom pyramid. 2018-11-28 13:31:27 +01:00
Martijn Versteegh aa0506224e Put the origin of the world in the corner of tile 0,0.
Negative x/z will be put into negative tiles, so you can easily determine
the tile location by dividing the x or z by 16*tileSize. This means the same area of the world
will always end up in the same tile, independent of how much of the world is generated.
2018-11-27 11:09:09 +01:00
Martijn Versteegh 961f65974f Rename tilePositions() to sortPositionsIntoTiles()
the first name was confusing.
2018-11-27 10:41:25 +01:00
Martijn Versteegh d41e6448ce Fix crash if the total map size is smaller than the tile size; 2018-11-27 10:41:25 +01:00
Martijn Versteegh fe5ba54fc9 Add a --tilesize option.
The produces tiled output way faster than repeatedly using --geometry
because it only reads the databse once.
2018-11-27 10:41:25 +01:00
Martijn Versteegh ee5b8a9f86 Add a flag to never output empty images. 2018-11-01 13:10:28 +01:00
Martijn Versteegh ac15bacf36 Make images exactly the size specified in geometry (as long as the geometry is a multiple of 16). 2018-11-01 13:10:28 +01:00
sfan5 b2406db169 Fix a few small issues
closes #58
2018-10-20 23:01:03 +02:00
Martijn Versteegh 8e8cc3d1f2 Add an option to get the extent of the map. 2018-10-20 22:32:33 +02:00
sfan5 42395587b9
Fix travis 2018-03-25 16:47:23 +02:00
sfan5 0d9ed247f9 Finish refactor 2018-03-25 16:25:41 +02:00
sfan5 1f471b369b Refactoring (3) 2018-03-25 15:44:30 +02:00
sfan5 2f78c39d9c Refactoring (2) 2018-03-25 15:19:48 +02:00
sfan5 2ebc3afc7c Refactoring (1) 2018-03-25 14:32:11 +02:00
sfan5 7c71138fec Minor refactoring (2)
Also tunes --drawalpha to hide shadows in deep water better.
2018-03-24 15:24:02 +01:00
sfan5 c15adfd325 Minor refactoring 2018-03-24 14:54:45 +01:00
sfan5 7288e60cd2 Fix scales being drawn outside of image
closes #54
2018-03-24 13:58:39 +01:00
sfan5 21444d00c3 Add support for recent MapBlock serialization changes 2017-02-17 15:28:01 +01:00
zeuner af502f3ac2 PostgreSQL database support 2017-01-08 23:24:09 +01:00
sfan5 d490cf0a31 Fix drawing of transparent nodes without --drawalpha (fixes #41) 2017-01-05 23:37:21 +01:00
sfan5 0167a72967 Code style & comments 2016-11-18 23:57:09 +01:00
sfan5 a41d231c34 Move everything that deals with images directly to an Image class 2016-11-18 23:34:31 +01:00
sfan5 77fdcd15fb Allow rendering (or omitting) scales at every image edge 2016-11-18 22:01:15 +01:00
Nestorfish 26b62933ed TileGenerator: free database resources (#38)
Destructor of DB* instance was never called.
Ensure it is, adding missing base class virtual destructor and calling delete when possible to free resources.
2016-10-13 23:26:59 +02:00
Christophe Le Roy c45965eb8d Improvements to Node name/ID mapping code
* Clean m_nameMap between blocks
* Warn about invalid node name IDs
* Early drop of non-significant blocks
2016-10-09 19:22:28 +02:00
sfan5 09945caa14 Fix small typo (std:cerr -> std::cerr) 2016-10-09 15:19:35 +02:00
sfan5 0bf0d8e035 Fix color parsing code (prev. commit)
Also make sure there's enough parameters: Name, R, G and B
2016-10-08 21:59:34 +02:00
sfan5 173dd75b31 Simplify color parsing code 2016-10-08 13:39:07 +02:00
sfan5 73dab34d7c Allow specifying location of colors.txt file 2016-08-09 16:45:39 +02:00
sfan5 2ed45633a4 Warn on big image dimensions, fixes #14 2016-08-09 16:04:58 +02:00
Florian Schüller 15fae27b85 Zoom implementation (--zoom option) 2016-08-09 15:35:36 +02:00
sfan5 ce759d7724 Fix --{min,max}-y, thanks to @PilzAdam 2015-10-29 23:13:41 +01:00
sfan5 a361e4d1eb Rename some variables to make their purpose clearer 2015-03-18 22:49:19 +01:00
sfan5 70b75507fe Clarify function of thickness param of nodes 2015-03-18 22:22:10 +01:00
sfan5 722f02d121 Add workaround for color.txt parsing on MinGW 2014-12-20 13:09:56 +01:00
sfan5 1c47825d70 Fix number rounding, clarify comment and change var. names 2014-09-02 14:49:56 +02:00
sfan5 b7f0a8a29a Fix --geometry producing wrong results 2014-09-01 18:42:50 +02:00
sfan5 88df29a6b3 Add CMake option to use C++11 features 2014-08-02 16:31:45 +02:00
sfan5 2cc1ffc543 Re-add --backend to allow overriding auto-detected backend 2014-07-11 10:54:50 +02:00
sfan5 e85a49873a Fix --drawalpha 2014-07-08 15:08:07 +02:00
sfan5 20691186b5 Read backend from world.mt, closes #6 2014-07-08 15:08:07 +02:00
sfan5 fe534d9026 Fix #2 2014-07-08 14:02:20 +02:00
sfan5 dff4589152 Improve color parsing, hopefully fixes #7 2014-05-21 15:16:29 +02:00
Sfan5 2553e44e8d Add redis database backend 2014-04-26 15:03:32 +02:00
ShadowNinja 22d3e401f8 Don't use a temporary table for block positions
This also moves database functions and data structures to db.h
2014-04-19 02:13:34 -04:00