From 10faee215fb87773ca3410ad4698ba34edbacd4a Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Fri, 20 Jan 2023 20:40:08 +0100 Subject: [PATCH] owo --- src/main.rs | 1 + src/transform.rs | 3 +++ src/world.rs | 2 +- src/world/chunk.rs | 1 - src/world/tasks.rs | 0 5 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 src/transform.rs create mode 100644 src/world/tasks.rs diff --git a/src/main.rs b/src/main.rs index 14bb48c..03346ad 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,6 +18,7 @@ pub(crate) mod rendering; pub(crate) mod player; pub(crate) mod world; pub(crate) mod prefabs; +pub(crate) mod transform; use rendering::{Rederer, RenderTarget, BackgroundColor, clear_background}; use world::GameWorld; diff --git a/src/transform.rs b/src/transform.rs new file mode 100644 index 0000000..9176edd --- /dev/null +++ b/src/transform.rs @@ -0,0 +1,3 @@ +use glam::Mat4; + +pub struct Transform(Mat4); diff --git a/src/world.rs b/src/world.rs index c53434b..93d7f72 100644 --- a/src/world.rs +++ b/src/world.rs @@ -5,10 +5,10 @@ use hashbrown::HashMap; pub mod chunk; pub mod block; pub mod render; +pub mod tasks; use chunk::Chunk; - //TODO separate world struct for render data // because this is not send-sync diff --git a/src/world/chunk.rs b/src/world/chunk.rs index d4af7d1..3cb1978 100644 --- a/src/world/chunk.rs +++ b/src/world/chunk.rs @@ -5,7 +5,6 @@ use super::{block::Block, render::ChunkVertex}; pub const CHUNK_SIZE: usize = 32; type ChunkBlockData = Box<[[[Block; CHUNK_SIZE]; CHUNK_SIZE]; CHUNK_SIZE]>; - pub struct ChunkData { pub blocks: ChunkBlockData, pub has_renderable_blocks: bool, diff --git a/src/world/tasks.rs b/src/world/tasks.rs new file mode 100644 index 0000000..e69de29