mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 10:44:07 +02:00
update readme
This commit is contained in:
parent
e367ece741
commit
8e2905ac29
3 changed files with 30 additions and 17 deletions
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2016 Neil Danson
|
Copyright (c) 2020 Robin Appelman
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
||||||
29
README.md
Normal file
29
README.md
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# VBSP
|
||||||
|
|
||||||
|
Rust parser for valve bsp files.
|
||||||
|
|
||||||
|
Currently only supports the tf2 version of bsp files, but adding other sourcemod variants should be fairly straight forward.
|
||||||
|
|
||||||
|
# Example usage
|
||||||
|
|
||||||
|
```rust
|
||||||
|
extern crate bsp;
|
||||||
|
|
||||||
|
use std::fs::File;
|
||||||
|
|
||||||
|
fn main() -> std::io::Result<()> {
|
||||||
|
let data = std::fs::read("maps/cp_steel.bsp")?;
|
||||||
|
let bsp = bsp::Bsp::read(&data)?;
|
||||||
|
println!("{:?}", bsp);
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
|
||||||
|
This project is adapter from the [quake bsp parser] and
|
||||||
|
wouldn't be possible without information from the [source engine wiki].
|
||||||
|
|
||||||
|
[quake bsp parser]: (https://github.com/Vurich/bsp)
|
||||||
|
[source engine wiki]: (https://developer.valvesoftware.com/wiki/Source_BSP_File_Format)
|
||||||
16
readme.md
16
readme.md
|
|
@ -1,16 +0,0 @@
|
||||||
# Example usage
|
|
||||||
|
|
||||||
(Assuming that the pk3 file is unzipped locally)
|
|
||||||
|
|
||||||
```rust
|
|
||||||
extern crate bsp;
|
|
||||||
|
|
||||||
use std::fs::File;
|
|
||||||
|
|
||||||
fn main() -> std::io::Result<()> {
|
|
||||||
let bsp = bsp::read_bsp(&File::open("pak0/maps/q3dm1.bsp")?)?;
|
|
||||||
println!("{:?}", bsp);
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
```
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue