diff options
Diffstat (limited to 'stockton-types')
-rw-r--r-- | stockton-types/src/lib.rs | 6 | ||||
-rw-r--r-- | stockton-types/src/world.rs | 18 |
2 files changed, 11 insertions, 13 deletions
diff --git a/stockton-types/src/lib.rs b/stockton-types/src/lib.rs index bf690f1..ee01019 100644 --- a/stockton-types/src/lib.rs +++ b/stockton-types/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (C) Oscar Shrimpton 2019 +// Copyright (C) Oscar Shrimpton 2019 // This program is free software: you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free @@ -14,8 +14,8 @@ // with this program. If not, see <http://www.gnu.org/licenses/>. //! Common types for all stockton crates. -extern crate stockton_levels; extern crate nalgebra_glm as na; +extern crate stockton_levels; pub mod world; pub use world::World; @@ -32,4 +32,4 @@ pub type Vector2i = na::IVec2; pub type Vector3i = na::IVec3; /// Alias for convenience -pub type Matrix4 = na::Mat4x4;
\ No newline at end of file +pub type Matrix4 = na::Mat4x4; diff --git a/stockton-types/src/world.rs b/stockton-types/src/world.rs index 69a7ad6..2bb0273 100644 --- a/stockton-types/src/world.rs +++ b/stockton-types/src/world.rs @@ -1,4 +1,4 @@ -// Copyright (C) Oscar Shrimpton 2019 +// Copyright (C) Oscar Shrimpton 2019 // This program is free software: you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free @@ -19,15 +19,13 @@ use stockton_levels::prelude::*; /// A loaded world. pub struct World<T: MinBSPFeatures<VulkanSystem>> { - pub map: T, + pub map: T, } impl<T: MinBSPFeatures<VulkanSystem>> World<T> { - /// Create a new world from a level. - /// The level can be any format, as long as it has the required features of a bsp. - pub fn new(map: T) -> World<T> { - World { - map - } - } -}
\ No newline at end of file + /// Create a new world from a level. + /// The level can be any format, as long as it has the required features of a bsp. + pub fn new(map: T) -> World<T> { + World { map } + } +} |