diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:21 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:21 +0100 |
commit | 83e4ac1499b548957c554f740934b9b2a02310aa (patch) | |
tree | c890dc4ca220a4ee53b88a729472050e6da0b9b9 /stockton-render | |
parent | 95708732572431dc057a9fd71fa8bd8571a336a2 (diff) |
refactor(all): 2018 edition
Diffstat (limited to 'stockton-render')
-rw-r--r-- | stockton-render/Cargo.toml | 1 | ||||
-rw-r--r-- | stockton-render/src/draw/camera.rs | 2 | ||||
-rw-r--r-- | stockton-render/src/draw/draw_buffers.rs | 9 | ||||
-rw-r--r-- | stockton-render/src/draw/target.rs | 4 | ||||
-rw-r--r-- | stockton-render/src/draw/texture/image.rs | 2 | ||||
-rw-r--r-- | stockton-render/src/draw/texture/loader.rs | 4 | ||||
-rw-r--r-- | stockton-render/src/lib.rs | 12 | ||||
-rw-r--r-- | stockton-render/src/window.rs | 2 |
8 files changed, 13 insertions, 23 deletions
diff --git a/stockton-render/Cargo.toml b/stockton-render/Cargo.toml index 5d46e66..eef6bc0 100644 --- a/stockton-render/Cargo.toml +++ b/stockton-render/Cargo.toml @@ -2,6 +2,7 @@ name = "stockton-render" version = "0.1.0" authors = ["Oscar <oscar.shrimpton.personal@gmail.com>"] +edition = "2018" [dependencies] stockton-levels = { path = "../stockton-levels" } diff --git a/stockton-render/src/draw/camera.rs b/stockton-render/src/draw/camera.rs index 7333152..11bf617 100644 --- a/stockton-render/src/draw/camera.rs +++ b/stockton-render/src/draw/camera.rs @@ -200,7 +200,7 @@ impl WorkingCamera { #[cfg(test)] mod tests { - use draw::camera::WorkingCamera; + use crate::draw::camera::WorkingCamera; use stockton_types::Matrix4; use stockton_types::Vector3; diff --git a/stockton-render/src/draw/draw_buffers.rs b/stockton-render/src/draw/draw_buffers.rs index 2fdfa10..faf9c4e 100644 --- a/stockton-render/src/draw/draw_buffers.rs +++ b/stockton-render/src/draw/draw_buffers.rs @@ -15,10 +15,11 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -use crate::types::*; -use draw::buffer::StagedBuffer; -use draw::UVPoint; -use error::CreationError; +use crate::{ + draw::{buffer::StagedBuffer, UVPoint}, + error::CreationError, + types::*, +}; use hal::buffer::Usage; use std::mem::ManuallyDrop; diff --git a/stockton-render/src/draw/target.rs b/stockton-render/src/draw/target.rs index f8b9bd7..65e03a2 100644 --- a/stockton-render/src/draw/target.rs +++ b/stockton-render/src/draw/target.rs @@ -21,9 +21,9 @@ use crate::types::*; use core::{iter::once, mem::ManuallyDrop}; +use crate::draw::buffer::ModifiableBuffer; +use crate::draw::draw_buffers::DrawBuffers; use arrayvec::ArrayVec; -use draw::buffer::ModifiableBuffer; -use draw::draw_buffers::DrawBuffers; use hal::{ format::{ChannelType, Format, Swizzle}, image::{Extent, Usage as ImgUsage, ViewKind}, diff --git a/stockton-render/src/draw/texture/image.rs b/stockton-render/src/draw/texture/image.rs index 9a196a7..4a0fa08 100644 --- a/stockton-render/src/draw/texture/image.rs +++ b/stockton-render/src/draw/texture/image.rs @@ -31,8 +31,8 @@ use hal::{ use image::RgbaImage; use std::{convert::TryInto, iter::once}; +use crate::draw::buffer::create_buffer; use crate::types::*; -use draw::buffer::create_buffer; /// The size of each pixel in an image const PIXEL_SIZE: usize = size_of::<image::Rgba<u8>>(); diff --git a/stockton-render/src/draw/texture/loader.rs b/stockton-render/src/draw/texture/loader.rs index d71aa26..dbd9d70 100644 --- a/stockton-render/src/draw/texture/loader.rs +++ b/stockton-render/src/draw/texture/loader.rs @@ -18,9 +18,9 @@ //! Deals with loading textures into GPU memory use super::chunk::TextureChunk; +use crate::draw::texture::chunk::CHUNK_SIZE; +use crate::draw::texture::resolver::BasicFSResolver; use core::mem::ManuallyDrop; -use draw::texture::chunk::CHUNK_SIZE; -use draw::texture::resolver::BasicFSResolver; use std::path::Path; use log::debug; diff --git a/stockton-render/src/lib.rs b/stockton-render/src/lib.rs index ae902df..7cea5e7 100644 --- a/stockton-render/src/lib.rs +++ b/stockton-render/src/lib.rs @@ -15,23 +15,11 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -extern crate core; - #[cfg(feature = "vulkan")] extern crate gfx_backend_vulkan as back; extern crate gfx_hal as hal; -extern crate shaderc; -extern crate winit; - -extern crate image; -extern crate log; extern crate nalgebra_glm as na; -extern crate stockton_levels; -extern crate stockton_types; - -extern crate arrayvec; - #[macro_use] extern crate legion; diff --git a/stockton-render/src/window.rs b/stockton-render/src/window.rs index 4520ae8..ab19a6a 100644 --- a/stockton-render/src/window.rs +++ b/stockton-render/src/window.rs @@ -15,7 +15,7 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -use Renderer; +use crate::Renderer; use winit::event::Event as WinitEvent; |