From d96e99fd0e20a57de3538102802428153b811dea Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Fri, 20 Jan 2023 03:08:09 +0100 Subject: [PATCH] world structure --- src/main.rs | 2 +- src/world.rs | 9 +++++++++ src/world/chunk.rs | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1acab60..1f10005 100644 --- a/src/main.rs +++ b/src/main.rs @@ -80,7 +80,7 @@ fn main() { //Run update workflow world.run_workload(update).unwrap(); - //Start rendering + //Start rendering (maybe use custom views for this?) let mut target = { let renderer = world.borrow::>>().unwrap(); renderer.display.draw() diff --git a/src/world.rs b/src/world.rs index 750315d..a21d2bf 100644 --- a/src/world.rs +++ b/src/world.rs @@ -1,2 +1,11 @@ +use glam::IVec2; +use hashbrown::HashMap; + pub mod chunk; pub mod block; + +use chunk::Chunk; + +pub struct World { + pub chunks: HashMap +} diff --git a/src/world/chunk.rs b/src/world/chunk.rs index e69de29..abfa45e 100644 --- a/src/world/chunk.rs +++ b/src/world/chunk.rs @@ -0,0 +1 @@ +pub struct Chunk;