Remove the last remnants of the site circle and cave map drawing code

This commit is contained in:
Christof Petig 2020-11-23 19:54:56 +01:00
parent 11f9d71fde
commit 49d7c40bec
3 changed files with 4 additions and 21 deletions

View File

@ -72,7 +72,6 @@ fn main() {
sample_pos(
config,
sampler,
index,
samples,
uniform_idx_as_vec2(map_size_lg, posi),
)

View File

@ -1,7 +1,7 @@
use crate::{
column::ColumnSample,
sim::{RiverKind, WorldSim},
IndexRef, CONFIG,
CONFIG,
};
use common::{
terrain::{
@ -71,7 +71,6 @@ pub fn sample_wpos(config: &MapConfig, sampler: &WorldSim, wpos: Vec2<i32>) -> f
pub fn sample_pos(
config: &MapConfig,
sampler: &WorldSim,
_index: IndexRef,
samples: Option<&[Option<ColumnSample>]>,
pos: Vec2<i32>,
) -> MapSample {
@ -102,8 +101,6 @@ pub fn sample_pos(
river_kind,
spline_derivative,
is_path,
//_is_cave,
//_near_site,
) = sampler
.get(pos)
.map(|sample| {
@ -118,13 +115,6 @@ pub fn sample_pos(
sample.river.river_kind,
sample.river.spline_derivative,
sample.path.0.is_way(),
// sample.cave.0.is_way(),
// sample.sites.iter().any(|site| {
// index.sites[*site]
// .get_origin()
// .distance_squared(pos * TerrainChunkSize::RECT_SIZE.x as i32)
// < 64i32.pow(2)
//}),
)
})
.unwrap_or((
@ -138,8 +128,6 @@ pub fn sample_pos(
None,
Vec2::zero(),
false,
// false,
// false,
));
let humidity = humidity.min(1.0).max(0.0);
@ -247,13 +235,9 @@ pub fn sample_pos(
),
};
// TODO: Make principled.
let rgb = /*if near_site {
Rgb::new(0x57, 0x39, 0x33)
} else*/ if is_path {
let rgb = if is_path {
Rgb::new(0x37, 0x29, 0x23)
} /* else if is_cave {
Rgb::new(0x37, 0x37, 0x37)
} */ else {
} else {
rgb
};

View File

@ -1476,7 +1476,7 @@ impl WorldSim {
map_config.is_shaded = false;
map_config.generate(
|pos| sample_pos(&map_config, self, index, Some(&samples_data), pos),
|pos| sample_pos(&map_config, self, Some(&samples_data), pos),
|pos| sample_wpos(&map_config, self, pos),
|pos, (r, g, b, _a)| {
// We currently ignore alpha and replace it with the height at pos, scaled to