mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 18:54:05 +02:00
Update readme
This commit is contained in:
parent
0f0e5a2cd5
commit
d9e3d3c984
1 changed files with 7 additions and 5 deletions
12
readme.md
12
readme.md
|
|
@ -3,12 +3,14 @@
|
||||||
(Assuming that the pk3 file is unzipped locally)
|
(Assuming that the pk3 file is unzipped locally)
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
extern crate quake3_loader;
|
extern crate bsp;
|
||||||
use std::fs::{File};
|
|
||||||
|
|
||||||
fn main() {
|
use std::fs::File;
|
||||||
let mut file = File::open("pak0/maps/q3dm1.bsp").unwrap();
|
|
||||||
let bsp = quake3_loader::read_bsp(&file);
|
fn main() -> std::io::Result<()> {
|
||||||
|
let bsp = bsp::read_bsp(&File::open("pak0/maps/q3dm1.bsp")?)?;
|
||||||
println!("{:?}", bsp);
|
println!("{:?}", bsp);
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue