mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 18:54:05 +02:00
Improve speed, add lightmaps and light volumes, allow parsing entity section
This commit is contained in:
parent
2af26e5245
commit
0f0e5a2cd5
4 changed files with 771 additions and 419 deletions
21
readme.md
21
readme.md
|
|
@ -2,16 +2,13 @@
|
|||
|
||||
(Assuming that the pk3 file is unzipped locally)
|
||||
|
||||
extern crate quake3_loader;
|
||||
use std::fs::{File};
|
||||
use std::path::{Path};
|
||||
use std::io::{Read};
|
||||
fn main() {
|
||||
let path = Path::new("pak0/maps/q3dm1.bsp");
|
||||
let mut file = File::open(path).unwrap();
|
||||
let mut bytes = Vec::new();
|
||||
file.read_to_end(&mut bytes).unwrap();
|
||||
let bsp = quake3_loader::read_bsp(&bytes);
|
||||
println!("{:?}", bsp);
|
||||
}
|
||||
```rust
|
||||
extern crate quake3_loader;
|
||||
use std::fs::{File};
|
||||
|
||||
fn main() {
|
||||
let mut file = File::open("pak0/maps/q3dm1.bsp").unwrap();
|
||||
let bsp = quake3_loader::read_bsp(&file);
|
||||
println!("{:?}", bsp);
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue