Commit graph

507 commits

Author SHA1 Message Date
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
e18d4cea82
io/fs: do not replace files with unchanged contents
Do not update file timestamps when contents have not actually changed.
2023-07-30 20:31:40 +02:00
cb791f48e9
Update dependencies 2023-07-30 20:03:23 +02:00
c472b61ef7
resource/block_color: actually apply grass color modifiers to grass
Apply the modifiers to grass, not to foliage.
2023-07-04 00:21:27 +02:00
d84e2ca49d
resource/block_color: fix default foliage colors
The code accidentally used the grass colors.
2023-07-03 23:49:36 +02:00
c471f84573
resource/block_color: fix scaling of biome-specific colors
All biome-specific colors (water/foliage/grass) were too bright by a
factor of 255 (i.e., white).
2023-07-03 23:45:00 +02:00
99c4de0b07
Update dependencies 2023-07-03 23:27:59 +02:00
757f6ff166
minedmap: write info.json file with tilemap metadata
With this change, the new minedmap implementation can generate all
necessary data for the frontend to work.
2023-07-02 23:09:14 +02:00
429b7888f6
world/de: add level.dat data structures
We only need the spawn point from level.dat.
2023-07-02 23:08:43 +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
b63a18ad6f
tile_mipmapper: store tile coordinates in nested map/set
Use the same data structure as the frontend.
2023-07-02 22:15:25 +02:00
216aa6ceec
minedmap: add mipmapping 2023-07-02 21:32:40 +02:00
86382772c3
minedmap/tile_renderer: print tile path relative to output directory
We will use strings of the same format for mipmap tile paths.
2023-07-02 20:05:57 +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
dede21806c
Update dependencies 2023-07-01 23:05:39 +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
1abb260997
io/fs: add new module with filesystem access helpers
Wrappers around std::fs with error messages, as well as a
create_with_tmpfile() helper.
2023-06-01 22:59:19 +02:00
59e919e9ea
Update dependencies 2023-06-01 22:53:39 +02:00
42cb342749
world/layer: avoid iproduct-based iterator in inner loop
iproduct iterators are fairly slow. As the iterator implementation is
now unused, it is removed as well.
2023-05-10 00:48:53 +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
0b392d7a3a
world/layer: move more top_layer() logic into LayerEntry::fill() 2023-05-06 00:33:34 +02:00
0437ec70b6
world/layer: introduce LayerEntry struct 2023-05-06 00:33:13 +02:00
2d5eec13c2
world/layer: move Option into BlockInfo struct
Preparation for top_layer() cleanup.
2023-05-05 23:29:57 +02:00
263fc6d6ce
world/layer: remove unused y coordinate from BlockInfo 2023-05-05 23:15:34 +02:00
924ee01f91
world/layer: introduce LayerData struct to fix clippy type complexity warning 2023-05-05 23:08:39 +02:00
b66bdf5ce1
resource: implement water/foliage/grass color computation 2023-05-04 23:18:04 +02:00
25710bb1ed
Move block_color() to new module 2023-05-04 22:18:15 +02:00
e801631561
Update dependencies 2023-05-04 22:04:20 +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
61fb23b94b
Move main source file to bin subdirectory 2023-04-30 10:46:56 +02:00
2e05998b48
Update depenencies 2023-04-30 08:22:59 +02:00
d79377ad6b
main: pass biome into block_color()
No biome edge smoothing yet.
2023-04-10 20:58:07 +02:00
0d81dfa35b
main: store biome data in processed data files 2023-04-09 23:20:20 +02:00
e912f60ba3
world/layer: add biome data to returned layer 2023-04-09 22:56:02 +02:00
0d2c99dacf
world/chunk: include biomes in section iterator item 2023-04-08 21:20:00 +02:00
ddc515a9d7
world/section: implement biome_at() 2023-04-08 21:20:00 +02:00
b93e613152
types: add LayerBlockCoords::offset() helper 2023-04-08 21:20:00 +02:00
aa2edc3d13
world/section: move biome_types field out of BiomesV0 enum 2023-04-08 21:20:00 +02:00
3ea93296d7
Update dependencies 2023-04-08 21:19:55 +02:00
c6843cfb9c
world: resolve biome palette entries for v1.18 biome data 2023-04-07 09:38:31 +02:00
b8b0e0627f
world: correctly name BiomesV1_18 2023-04-07 09:37:02 +02:00
e117c76937 world: pass biome data into chunk/section structures 2023-04-07 09:34:56 +02:00
524b1b1913 resource: add biome data 2023-04-07 09:34:56 +02:00
e462e17ee2
resource: rename BlockColor to Color
The same struct will be used for biomes.
2023-04-05 20:05:59 +02:00
f2b7808e84
world: distinguish pre-v1.18 biome data structures 2023-04-02 18:17:13 +02:00