mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-05 17:44:52 +01:00
main: load processed regions from render_tile()
This commit is contained in:
parent
89f35024b7
commit
d5406851b4
1 changed files with 7 additions and 0 deletions
|
@ -183,6 +183,11 @@ impl<'a> TileRenderer<'a> {
|
||||||
TileRenderer { config }
|
TileRenderer { config }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn load_region(&self, coords: RegionCoords) -> Result<ProcessedRegion> {
|
||||||
|
let processed_path = self.config.processed_path(coords, false);
|
||||||
|
storage::read(&processed_path).context("Failed to load processed region data")
|
||||||
|
}
|
||||||
|
|
||||||
fn render_tile(&self, coords: RegionCoords) -> Result<()> {
|
fn render_tile(&self, coords: RegionCoords) -> Result<()> {
|
||||||
let output_path = self.config.map_path(coords, false);
|
let output_path = self.config.map_path(coords, false);
|
||||||
println!(
|
println!(
|
||||||
|
@ -193,6 +198,8 @@ impl<'a> TileRenderer<'a> {
|
||||||
.to_string_lossy(),
|
.to_string_lossy(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let _region = self.load_region(coords);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue