mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Resolved warnings
This commit is contained in:
@ -3,7 +3,7 @@ use crate::{
|
|||||||
render::{self, FluidPipeline, Mesh, TerrainPipeline},
|
render::{self, FluidPipeline, Mesh, TerrainPipeline},
|
||||||
};
|
};
|
||||||
use common::{
|
use common::{
|
||||||
terrain::{Block, BlockKind},
|
terrain::Block,
|
||||||
vol::{ReadVol, RectRasterableVol, Vox},
|
vol::{ReadVol, RectRasterableVol, Vox},
|
||||||
volumes::vol_grid_2d::VolGrid2d,
|
volumes::vol_grid_2d::VolGrid2d,
|
||||||
};
|
};
|
||||||
@ -124,17 +124,6 @@ fn calc_light<V: RectRasterableVol<Vox = Block> + ReadVol + Debug>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn block_shadow_density(kind: BlockKind) -> (f32, f32) {
|
|
||||||
// (density, cap)
|
|
||||||
match kind {
|
|
||||||
BlockKind::Normal => (0.085, 0.3),
|
|
||||||
BlockKind::Dense => (0.3, 0.0),
|
|
||||||
BlockKind::Water => (0.15, 0.0),
|
|
||||||
kind if kind.is_air() => (0.0, 0.0),
|
|
||||||
_ => (1.0, 0.0),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<V: RectRasterableVol<Vox = Block> + ReadVol + Debug> Meshable<TerrainPipeline, FluidPipeline>
|
impl<V: RectRasterableVol<Vox = Block> + ReadVol + Debug> Meshable<TerrainPipeline, FluidPipeline>
|
||||||
for VolGrid2d<V>
|
for VolGrid2d<V>
|
||||||
{
|
{
|
||||||
|
@ -62,12 +62,12 @@ fn get_ao_quad<V: ReadVol>(
|
|||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
fn get_col_quad<V: ReadVol>(
|
fn get_col_quad<V: ReadVol>(
|
||||||
vol: &V,
|
_vol: &V,
|
||||||
pos: Vec3<i32>,
|
_pos: Vec3<i32>,
|
||||||
shift: Vec3<i32>,
|
_shift: Vec3<i32>,
|
||||||
dirs: &[Vec3<i32>],
|
dirs: &[Vec3<i32>],
|
||||||
cols: &[[[Option<Rgb<f32>>; 3]; 3]; 3],
|
cols: &[[[Option<Rgb<f32>>; 3]; 3]; 3],
|
||||||
is_opaque: impl Fn(&V::Vox) -> bool,
|
_is_opaque: impl Fn(&V::Vox) -> bool,
|
||||||
) -> Vec4<Rgb<f32>> {
|
) -> Vec4<Rgb<f32>> {
|
||||||
dirs.windows(2)
|
dirs.windows(2)
|
||||||
.map(|offs| {
|
.map(|offs| {
|
||||||
|
@ -412,7 +412,7 @@ impl TownVol {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
}) {
|
}) {
|
||||||
self.set(cell, CellKind::Well.into());
|
let _ = self.set(cell, CellKind::Well.into());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -694,6 +694,8 @@ lazy_static! {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// TODO
|
||||||
struct ModuleModel {
|
struct ModuleModel {
|
||||||
near: u64,
|
near: u64,
|
||||||
mask: u64,
|
mask: u64,
|
||||||
@ -711,3 +713,4 @@ impl ModuleModel {
|
|||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
@ -58,13 +58,6 @@ pub struct TownCell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl TownCell {
|
impl TownCell {
|
||||||
pub fn is_road(&self) -> bool {
|
|
||||||
match self.kind {
|
|
||||||
CellKind::Road => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn is_space(&self) -> bool {
|
pub fn is_space(&self) -> bool {
|
||||||
match self.kind {
|
match self.kind {
|
||||||
CellKind::Empty => true,
|
CellKind::Empty => true,
|
||||||
|
Reference in New Issue
Block a user