lib expects u8 slice
This commit is contained in:
parent
bcffafdc09
commit
a5941e24ef
@ -1,9 +1,16 @@
|
|||||||
pub fn generate_indexed_models<R:std::io::Read+std::io::Seek>(input:R) -> crate::model::IndexedModelInstances{
|
pub fn generate_indexed_models<R:std::io::Read+std::io::Seek>(input:&mut R) -> crate::model::IndexedModelInstances{
|
||||||
let mut spawn_point=crate::integer::Planar64Vec3::ZERO;
|
let mut spawn_point=crate::integer::Planar64Vec3::ZERO;
|
||||||
|
|
||||||
let mut indexed_models=Vec::new();
|
let mut indexed_models=Vec::new();
|
||||||
|
|
||||||
match bsp::Bsp::read(input){
|
let mut s=Vec::new();
|
||||||
|
|
||||||
|
match input.read_to_end(&mut s){
|
||||||
|
Ok(guac)=>println!("readed to string {:?}", guac),
|
||||||
|
Err(e)=>println!("faile {:?}",e),
|
||||||
|
}
|
||||||
|
|
||||||
|
match vbsp::Bsp::read(s.as_slice()){
|
||||||
Ok(guac)=>println!("we got the guac {:?}", guac),
|
Ok(guac)=>println!("we got the guac {:?}", guac),
|
||||||
Err(e)=>println!("rotten {:?}",e),
|
Err(e)=>println!("rotten {:?}",e),
|
||||||
}
|
}
|
||||||
@ -12,5 +19,6 @@ pub fn generate_indexed_models<R:std::io::Read+std::io::Seek>(input:R) -> crate:
|
|||||||
textures:Vec::new(),
|
textures:Vec::new(),
|
||||||
models:indexed_models,
|
models:indexed_models,
|
||||||
spawn_point,
|
spawn_point,
|
||||||
|
modes:Vec::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ fn load_file(path: std::path::PathBuf)->Option<model::IndexedModelInstances>{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
b"VBSP"=>Some(load_bsp::generate_indexed_models(input)),
|
b"VBSP"=>Some(load_bsp::generate_indexed_models(&mut input)),
|
||||||
//b"SNFM"=>Some(sniffer::generate_indexed_models(input)),
|
//b"SNFM"=>Some(sniffer::generate_indexed_models(input)),
|
||||||
//b"SNFB"=>Some(sniffer::load_bot(input)),
|
//b"SNFB"=>Some(sniffer::load_bot(input)),
|
||||||
other=>{
|
other=>{
|
||||||
|
Loading…
Reference in New Issue
Block a user