From 3e737282dccb7c703df07bd4599a0d6fcf7b4b6a Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 1 Feb 2024 04:03:09 -0800 Subject: [PATCH] resource query instead of hold all --- src/map.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/map.rs b/src/map.rs index 5215770..910cede 100644 --- a/src/map.rs +++ b/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{ modes:gameplay_modes::Modes, bvh:BvhNode, node_id_to_block_id:Vec, - //do not need this? return only new data with load_node - resource_model:std::collections::HashMap, - resource_image:std::collections::HashMap, } impl StreamableMap{ pub(crate) fn new(file:crate::file::File)->Result{ @@ -114,4 +102,7 @@ impl StreamableMap{ 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{ + // + } } \ No newline at end of file