resource query instead of hold all
This commit is contained in:
parent
708c0c48ef
commit
3e737282dc
15
src/map.rs
15
src/map.rs
@ -60,15 +60,6 @@ for model_id in 0..num_models{
|
||||
|
||||
|
||||
//error hiding mock code
|
||||
mod physics{
|
||||
pub struct StyleModifiers{}
|
||||
}
|
||||
mod model{
|
||||
pub struct IndexedModel{}
|
||||
#[super::binrw]
|
||||
#[brw(little)]
|
||||
pub struct ModelInstance{}
|
||||
}
|
||||
mod image{
|
||||
pub struct Image{}
|
||||
}
|
||||
@ -96,9 +87,6 @@ pub struct StreamableMap<R:BinReaderExt>{
|
||||
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
|
||||
resource_model:std::collections::HashMap<ModelUuid,model::IndexedModel>,
|
||||
resource_image:std::collections::HashMap<ImageUuid,image::Image>,
|
||||
}
|
||||
impl<R:BinReaderExt> StreamableMap<R>{
|
||||
pub(crate) fn new(file:crate::file::File<R>)->Result<Self,Error>{
|
||||
@ -114,4 +102,7 @@ impl<R:BinReaderExt> StreamableMap<R>{
|
||||
let region:Region=block.read_le().map_err(|e|Error::InvalidRegion(e))?;
|
||||
Ok(region.models)
|
||||
}
|
||||
pub fn load_resource(&mut self,resource_id:ResourceId)->Resource{
|
||||
//
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user