Commit graph

23 commits

Author SHA1 Message Date
248a641035
Restructure crates
Get rid of the arbitrary bin/lib split and instead move as much as
possible into the bin crate, which becomes the main crate again.

The types and NBT handling are moved into separate crates, so they can
be reused by nbtdump and regiondump.
2023-08-20 17:00:10 +02:00
05a8056cbf
Add documentation comments for all items 2023-08-20 11:21:29 +02:00
0842cb4ec2
Rename library crate to minedmap-core
Rustdoc can't deal with a bin and lib crate with the same name.
2023-08-18 19:20:21 +02:00
78fe1ec50e
minedmap: add support for parallel processing
For now, only RegionProcessor and TileMipmapper are run in parallel.
2023-08-14 22:38:21 +02:00
c1260a63b5
minedmap: separate collection for region list from preprocessing
Preparation for parallel processing, as well as a fix for regions
missing from later steps when the initial processing failed (rather than
using the processed data from a previous run).
2023-08-14 14:27:52 +02:00
7b46adf6e7
minedmap: split up big types by adding Boxes
Make these values faster to move around, and optimize their size when
used in Options.
2023-08-05 18:11:39 +02:00
7d231b92ea
Format let-else blocks
Use nightly rustfmt to format let-else.
2023-08-05 10:46:47 +02:00
fb712cd2f5
Store per-region biome list in IndexSet
Index into the biome list instead of duplicating the biome data for each
coordinate. This reduces the size of the processed data and speeds up
encoding/decoding.
2023-08-03 23:07:16 +02:00
e39f48d8fe
types: use const generics for more generic coordinate types
Enum support in const generics would be even nicer, but for now the
integer generic is the best Rust can do.
2023-08-02 02:55:13 +02:00
80781c9c20
minedmap: skip generation steps when the inputs are unchanged 2023-07-31 00:23:06 +02:00
6077138292
Add version field to file metadata 2023-07-30 21:48:58 +02:00
628a702fd7
Store source modified timestamp with processed, lightmap and map tiles
Allows to check whether the source is newer than the last update of the
output files.
2023-07-30 21:19:24 +02:00
f9fc9efe8d
Revert "minedmap: store region list in BTreeSet"
This reverts commit b53d34da3d.

With the change of the mipmapper data structure, we need a conversion
step anyways, so we can keep using the Vec before mipmapping.
2023-07-02 22:19:35 +02:00
b1f7f759f1
minedmap: introduce generic tile path function, pass mipmap level 2023-07-02 18:58:08 +02:00
b53d34da3d
minedmap: store region list in BTreeSet
We want to have a sorted list in the end anyways to make metadata
generation deterministic, and we don't have to worry about deduplication
of coordinates when generating mipmap tile lists.
2023-07-02 18:16:35 +02:00
e5c96ecb99
minedmap: replace TileCoords type alias with a struct 2023-07-02 18:08:54 +02:00
007ce010d4
minedmap: rename RegionCoords to TileCoords
With mipmapping, coords will not always correspond to regions anymore.
2023-07-02 15:11:16 +02:00
17a02dc74c
minedmap: use fs helpers 2023-06-01 23:14:35 +02:00
587db0464c
io/storage: use fs::create_with_tmpfile() helper 2023-06-01 23:10:47 +02:00
31eb92864c
Split up BlockInfo type
By storing block types and depth values separately, the processed world
data can be compressed better, decreasing data size by ~10%.
2023-05-06 00:52:40 +02:00
924ee01f91
world/layer: introduce LayerData struct to fix clippy type complexity warning 2023-05-05 23:08:39 +02:00
2dd9283d95
minedmap: move some internal functions out of impl blocks 2023-05-01 17:51:38 +02:00
1a5e8894fe
minedmap: split up main module 2023-04-30 11:07:47 +02:00