diff --git a/Cargo.lock b/Cargo.lock index 3d32e37..28b11ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,7 +77,7 @@ dependencies = [ [[package]] name = "strafesnet_common" version = "0.1.0" -source = "git+https://git.itzana.me/StrafesNET/common?rev=434ca29aef7e3015c9ca1ed45de8fef42e33fdfb#434ca29aef7e3015c9ca1ed45de8fef42e33fdfb" +source = "git+https://git.itzana.me/StrafesNET/common?rev=5ee826d9487b5e2bea4b3cf99a68ce9a95d72f72#5ee826d9487b5e2bea4b3cf99a68ce9a95d72f72" dependencies = [ "glam", ] diff --git a/Cargo.toml b/Cargo.toml index 30ef80c..ca43200 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" [dependencies] binrw = "0.13.3" -strafesnet_common = { git = "https://git.itzana.me/StrafesNET/common", rev = "434ca29aef7e3015c9ca1ed45de8fef42e33fdfb" } +strafesnet_common = { git = "https://git.itzana.me/StrafesNET/common", rev = "5ee826d9487b5e2bea4b3cf99a68ce9a95d72f72" } diff --git a/src/map.rs b/src/map.rs index 4ed7885..5215770 100644 --- a/src/map.rs +++ b/src/map.rs @@ -1,3 +1,5 @@ +use strafesnet_common::model; +use strafesnet_common::gameplay_modes; use binrw::{BinReaderExt, binrw}; pub enum Error{ @@ -85,12 +87,13 @@ struct Region{ #[bw(try_calc(u32::try_from(models.len())))] model_count:u32, #[br(count=model_count)] - models:Vec, + models:Vec, } pub struct StreamableMap{ file:crate::file::File, - style:physics::StyleModifiers,//probably should move this out of physics + //this includes every platform... move the unconstrained datas to their appropriate data block? + modes:gameplay_modes::Modes, bvh:BvhNode, node_id_to_block_id:Vec, //do not need this? return only new data with load_node @@ -101,7 +104,7 @@ impl StreamableMap{ pub(crate) fn new(file:crate::file::File)->Result{ Err(Error::InvalidHeader) } - pub fn load_node(&mut self,node_id:BvhNodeId)->Result,Error>{ + pub fn load_node(&mut self,node_id:BvhNodeId)->Result,Error>{ //load region from disk //parse the models and determine what resources need to be loaded //load resources into self.resources