refactor separate framework from game code, add demo3d

This commit is contained in:
asrael 2026-04-14 01:28:38 -05:00
parent 19ae869769
commit e576e9de6b
90 changed files with 2629 additions and 2347 deletions

View file

@ -1,26 +0,0 @@
pub mod stream;
use crate::bsp::Bsp;
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub enum ChunkId {
Bsp { cx: i32, cz: i32 },
}
pub enum Chunk {
Bsp { cx: i32, cz: i32, bsp: Bsp, version: u32 },
}
impl Chunk {
pub fn version(&self) -> u32 {
match self {
Chunk::Bsp { version, .. } => *version,
}
}
pub fn as_bsp(&self) -> Option<&Bsp> {
match self {
Chunk::Bsp { bsp, .. } => Some(bsp),
}
}
}