update common
This commit is contained in:
parent
ce6f8074a9
commit
708c0c48ef
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -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",
|
||||
]
|
||||
|
@ -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" }
|
||||
|
@ -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<model::ModelInstance>,
|
||||
models:Vec<model::Model>,
|
||||
}
|
||||
|
||||
pub struct StreamableMap<R:BinReaderExt>{
|
||||
file:crate::file::File<R>,
|
||||
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<crate::file::BlockId>,
|
||||
//do not need this? return only new data with load_node
|
||||
@ -101,7 +104,7 @@ impl<R:BinReaderExt> StreamableMap<R>{
|
||||
pub(crate) fn new(file:crate::file::File<R>)->Result<Self,Error>{
|
||||
Err(Error::InvalidHeader)
|
||||
}
|
||||
pub fn load_node(&mut self,node_id:BvhNodeId)->Result<Vec<model::ModelInstance>,Error>{
|
||||
pub fn load_node(&mut self,node_id:BvhNodeId)->Result<Vec<model::Model>,Error>{
|
||||
//load region from disk
|
||||
//parse the models and determine what resources need to be loaded
|
||||
//load resources into self.resources
|
||||
|
Loading…
Reference in New Issue
Block a user