Fix some warnings
This commit is contained in:
parent
25a743703c
commit
c25dba3c8b
|
@ -596,14 +596,14 @@ impl Renderer {
|
||||||
struct TransInfo {
|
struct TransInfo {
|
||||||
main: gl::Framebuffer,
|
main: gl::Framebuffer,
|
||||||
fb_color: gl::Texture,
|
fb_color: gl::Texture,
|
||||||
fb_depth: gl::Texture,
|
_fb_depth: gl::Texture,
|
||||||
trans: gl::Framebuffer,
|
trans: gl::Framebuffer,
|
||||||
accum: gl::Texture,
|
accum: gl::Texture,
|
||||||
revealage: gl::Texture,
|
revealage: gl::Texture,
|
||||||
depth: gl::Texture,
|
_depth: gl::Texture,
|
||||||
|
|
||||||
array: gl::VertexArray,
|
array: gl::VertexArray,
|
||||||
buffer: gl::Buffer,
|
_buffer: gl::Buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
init_shader! {
|
init_shader! {
|
||||||
|
@ -687,14 +687,14 @@ impl TransInfo {
|
||||||
TransInfo {
|
TransInfo {
|
||||||
main: main,
|
main: main,
|
||||||
fb_color: fb_color,
|
fb_color: fb_color,
|
||||||
fb_depth: fb_depth,
|
_fb_depth: fb_depth,
|
||||||
trans: trans,
|
trans: trans,
|
||||||
accum: accum,
|
accum: accum,
|
||||||
revealage: revealage,
|
revealage: revealage,
|
||||||
depth: trans_depth,
|
_depth: trans_depth,
|
||||||
|
|
||||||
array: array,
|
array: array,
|
||||||
buffer: buffer,
|
_buffer: buffer,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ use openssl;
|
||||||
use console;
|
use console;
|
||||||
use render;
|
use render;
|
||||||
use auth;
|
use auth;
|
||||||
use cgmath::{self, Vector, Point, Point3};
|
use cgmath::{self, Vector, Point3};
|
||||||
use collision::{Aabb, Aabb3};
|
use collision::{Aabb, Aabb3};
|
||||||
use sdl2::keyboard::Keycode;
|
use sdl2::keyboard::Keycode;
|
||||||
|
|
||||||
|
|
|
@ -938,7 +938,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "oak_stairs" ) },
|
model { ("minecraft", "oak_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::OakStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::OakStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
Chest {
|
Chest {
|
||||||
props {},
|
props {},
|
||||||
|
@ -1103,7 +1103,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "stone_stairs" ) },
|
model { ("minecraft", "stone_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::StoneStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::StoneStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
WallSign {
|
WallSign {
|
||||||
props {},
|
props {},
|
||||||
|
@ -1565,7 +1565,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "brick_stairs" ) },
|
model { ("minecraft", "brick_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::BrickStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::BrickStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
StoneBrickStairs {
|
StoneBrickStairs {
|
||||||
props {
|
props {
|
||||||
|
@ -1587,7 +1587,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "StoneBrickStairs" ) },
|
model { ("minecraft", "StoneBrickStairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::StoneBrickStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::StoneBrickStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
Mycelium {
|
Mycelium {
|
||||||
props {},
|
props {},
|
||||||
|
@ -1653,7 +1653,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "nether_brick_stairs" ) },
|
model { ("minecraft", "nether_brick_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::NetherBrickStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::NetherBrickStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
NetherWart {
|
NetherWart {
|
||||||
props {},
|
props {},
|
||||||
|
@ -1818,7 +1818,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "sandstone_stairs" ) },
|
model { ("minecraft", "sandstone_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::SandstoneStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::SandstoneStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
EmeraldOre {
|
EmeraldOre {
|
||||||
props {},
|
props {},
|
||||||
|
@ -1895,7 +1895,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "spruce_stairs" ) },
|
model { ("minecraft", "spruce_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::SpruceStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::SpruceStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
BirchStairs {
|
BirchStairs {
|
||||||
props {
|
props {
|
||||||
|
@ -1917,7 +1917,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "birch_stairs" ) },
|
model { ("minecraft", "birch_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::BirchStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::BirchStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
JungleStairs {
|
JungleStairs {
|
||||||
props {
|
props {
|
||||||
|
@ -1939,7 +1939,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "jungle_stairs" ) },
|
model { ("minecraft", "jungle_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::JungleStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::JungleStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
CommandBlock {
|
CommandBlock {
|
||||||
props {},
|
props {},
|
||||||
|
@ -2170,7 +2170,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "quartz_stairs" ) },
|
model { ("minecraft", "quartz_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::QuartzStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::QuartzStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
ActivatorRail {
|
ActivatorRail {
|
||||||
props {},
|
props {},
|
||||||
|
@ -2258,7 +2258,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "acacia_stairs" ) },
|
model { ("minecraft", "acacia_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::AcaciaStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::AcaciaStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
DarkOakStairs {
|
DarkOakStairs {
|
||||||
props {
|
props {
|
||||||
|
@ -2280,7 +2280,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "dark_oak_stairs" ) },
|
model { ("minecraft", "dark_oak_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::DarkOakStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::DarkOakStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
Slime {
|
Slime {
|
||||||
props {},
|
props {},
|
||||||
|
@ -2467,7 +2467,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "red_sandstone_stairs" ) },
|
model { ("minecraft", "red_sandstone_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::RedSandstoneStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::RedSandstoneStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
DoubleStoneSlab2 {
|
DoubleStoneSlab2 {
|
||||||
props {},
|
props {},
|
||||||
|
@ -2731,7 +2731,7 @@ define_blocks! {
|
||||||
},
|
},
|
||||||
model { ("minecraft", "purpur_stairs" ) },
|
model { ("minecraft", "purpur_stairs" ) },
|
||||||
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
variant format!("facing={},half={},shape={}", facing.as_string(), half.as_string(), shape.as_string()),
|
||||||
update_state (world, x, y, z) => Block::PurpurStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing, half, shape)},
|
update_state (world, x, y, z) => Block::PurpurStairs{facing: facing, half: half, shape: update_stair_shape(world, x, y, z, facing)},
|
||||||
}
|
}
|
||||||
PurpurDoubleSlab {
|
PurpurDoubleSlab {
|
||||||
props {},
|
props {},
|
||||||
|
@ -2930,7 +2930,7 @@ fn get_stair_info(world: &super::World, x: i32, y: i32, z: i32) -> Option<(Direc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_stair_shape(world: &super::World, x: i32, y: i32, z: i32, facing: Direction, half: StairHalf, shape: StairShape) -> StairShape {
|
fn update_stair_shape(world: &super::World, x: i32, y: i32, z: i32, facing: Direction) -> StairShape {
|
||||||
let (ox, oy, oz) = facing.get_offset();
|
let (ox, oy, oz) = facing.get_offset();
|
||||||
if let Some((other_facing, _)) = get_stair_info(world, x+ox, y+oy, z+oz) {
|
if let Some((other_facing, _)) = get_stair_info(world, x+ox, y+oy, z+oz) {
|
||||||
if other_facing != facing && other_facing != facing.opposite() {
|
if other_facing != facing && other_facing != facing.opposite() {
|
||||||
|
|
Loading…
Reference in New Issue