From f177cc716c5f2aa5b50b14ccbb421de89e3a7854 Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Sun, 16 Aug 2026 17:29:42 -0700 Subject: wip --- src/sim/chunk.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/sim/chunk.rs (limited to 'src/sim/chunk.rs') diff --git a/src/sim/chunk.rs b/src/sim/chunk.rs deleted file mode 100644 index 478af12..0000000 --- a/src/sim/chunk.rs +++ /dev/null @@ -1,29 +0,0 @@ -use crate::{ - config::{CELLS_IN_CHUNK, CHUNK_SIZE}, - sim::cell::Cell, -}; - -pub struct Chunk { - pub cells: Box<[Cell; CELLS_IN_CHUNK]>, - pub sleeping: bool, - pub needs_texture_update: bool, -} - -impl Chunk { - #[inline] - pub fn get_cell_at_local_position(&self, x: u8, y: u8) -> Cell { - self.cells[x as usize + y as usize * CHUNK_SIZE as usize] - } - #[inline] - pub fn set_cell_at_local_position(&mut self, x: u8, y: u8, cell: Cell) { - self.cells[x as usize + y as usize * CHUNK_SIZE as usize] = cell; - } - - pub fn void() -> Self { - Chunk { - cells: Box::new([Cell::void(); CELLS_IN_CHUNK]), - sleeping: true, - needs_texture_update: true, - } - } -} -- cgit v1.3.1