diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:18 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:18 +0100 |
commit | c8c5e880781343d72671c231be8e132af5e2f344 (patch) | |
tree | d4736c557f0dba0dd667d10c4ad22f22fb2495ad /stockton-types/src/lib.rs |
Initial Commit.
Diffstat (limited to 'stockton-types/src/lib.rs')
-rw-r--r-- | stockton-types/src/lib.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/stockton-types/src/lib.rs b/stockton-types/src/lib.rs new file mode 100644 index 0000000..259c40c --- /dev/null +++ b/stockton-types/src/lib.rs @@ -0,0 +1,27 @@ +//! Common types for all stockton crates. + +extern crate stockton_bsp; +extern crate nalgebra as na; + +use stockton_bsp::BSPFile; + +pub mod entity_store; +use entity_store::EntityStore; + +/// Alias for convenience +pub type Vector2 = na::base::Vector2<f32>; +/// Alias for convenience +pub type Vector3 = na::base::Vector3<f32>; + +/// Alias for convenience +pub type Vector2i = na::base::Vector2<i32>; + +/// Alias for convenience +pub type Vector3i = na::base::Vector3<i32>; + +/// A live and playable world. There are two parts: The map, which has walls and other static objects, +/// and entities, which can move around and do things and are physics simulated. +pub struct World<'a> { + pub map: BSPFile<'a>, + pub live_entities: EntityStore, +}
\ No newline at end of file |