forked from StrafesNET/strafe-client
load_bsp module
This commit is contained in:
parent
03a97bfa3e
commit
55a1ef0d14
16
src/load_bsp.rs
Normal file
16
src/load_bsp.rs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
pub fn generate_indexed_models<R:std::io::Read+std::io::Seek>(input:R) -> crate::model::IndexedModelInstances{
|
||||||
|
let mut spawn_point=glam::Vec3::ZERO;
|
||||||
|
|
||||||
|
let mut indexed_models=Vec::new();
|
||||||
|
|
||||||
|
match bsp::Bsp::read(input){
|
||||||
|
Ok(guac)=>println!("we got the guac {:?}", guac),
|
||||||
|
Err(e)=>println!("rotten {:?}",e),
|
||||||
|
}
|
||||||
|
|
||||||
|
crate::model::IndexedModelInstances{
|
||||||
|
textures:Vec::new(),
|
||||||
|
models:indexed_models,
|
||||||
|
spawn_point,
|
||||||
|
}
|
||||||
|
}
|
@ -10,6 +10,7 @@ mod zeroes;
|
|||||||
mod framework;
|
mod framework;
|
||||||
mod primitives;
|
mod primitives;
|
||||||
mod instruction;
|
mod instruction;
|
||||||
|
mod load_bsp;
|
||||||
mod load_roblox;
|
mod load_roblox;
|
||||||
|
|
||||||
struct Entity {
|
struct Entity {
|
||||||
@ -811,7 +812,7 @@ impl framework::Example for GraphicsData {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//b"VBSP"=>Some(load_bsp::generate_indexed_models(input)),
|
b"VBSP"=>Some(load_bsp::generate_indexed_models(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