1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-03 10:44:07 +02:00

Improve speed, add lightmaps and light volumes, allow parsing entity section

This commit is contained in:
Jef 2019-04-09 16:48:35 +02:00
commit 0f0e5a2cd5
4 changed files with 771 additions and 419 deletions

View file

@ -1,12 +1,14 @@
[package]
name = "quake3_loader"
name = "bsp"
version = "0.2.0"
authors = ["neild"]
authors = ["Vurich <jackefransham@gmail.com>"]
edition = "2018"
homepage = "https://github.com/neildanson/quake3_loader"
repository = "https://github.com/neildanson/quake3_loader"
description = "Crate for loading Quake 3 BSP files based on description given here http://www.mralligator.com/q3/"
homepage = "https://github.com/Vurich/bsp"
repository = "https://github.com/Vurich/bsp"
description = "Crate to load BSP files efficiently - currently only works for Quake 3 BSP files. Fork of `quake3_loader` crate."
license = "MIT"
[dependencies]
byteorder = "0.5.3"
byteorder = "0.5"
arrayvec = "0.4"

View file

@ -2,16 +2,13 @@
(Assuming that the pk3 file is unzipped locally)
```rust
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);
let mut file = File::open("pak0/maps/q3dm1.bsp").unwrap();
let bsp = quake3_loader::read_bsp(&file);
println!("{:?}", bsp);
}
```

1009
src/lib.rs

File diff suppressed because it is too large Load diff

BIN
test.bsp Normal file

Binary file not shown.