Compare commits
1 Commits
master
...
surf-build
Author | SHA1 | Date | |
---|---|---|---|
f30c77a514 |
43
Cargo.lock
generated
43
Cargo.lock
generated
@ -1641,7 +1641,6 @@ dependencies = [
|
||||
"id",
|
||||
"parking_lot",
|
||||
"pollster",
|
||||
"strafesnet_bsp_loader",
|
||||
"strafesnet_common",
|
||||
"strafesnet_deferred_loader",
|
||||
"strafesnet_rbx_loader",
|
||||
@ -1649,17 +1648,6 @@ dependencies = [
|
||||
"winit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strafesnet_bsp_loader"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.itzana.me/StrafesNET/bsp_loader?rev=671b86802179572af3385bbd90cbe3bb5b6401a2#671b86802179572af3385bbd90cbe3bb5b6401a2"
|
||||
dependencies = [
|
||||
"glam",
|
||||
"strafesnet_common",
|
||||
"vbsp",
|
||||
"vmdl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strafesnet_common"
|
||||
version = "0.1.0"
|
||||
@ -1810,29 +1798,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
|
||||
dependencies = [
|
||||
"pin-project-lite",
|
||||
"tracing-attributes",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-attributes"
|
||||
version = "0.1.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.48",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ttf-parser"
|
||||
@ -1903,22 +1876,6 @@ version = "0.9.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
||||
|
||||
[[package]]
|
||||
name = "vmdl"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "892922743c4c107372331efd8f67c57282590f8c18c26b4465c4b0e1e6678664"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags 2.4.2",
|
||||
"bytemuck",
|
||||
"cgmath",
|
||||
"itertools",
|
||||
"static_assertions",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.4.0"
|
||||
|
@ -14,13 +14,13 @@ id = { git = "https://git.itzana.me/Quaternions/id", rev = "1f710976cc786c8853da
|
||||
parking_lot = "0.12.1"
|
||||
pollster = "0.3.0"
|
||||
strafesnet_common = { git = "https://git.itzana.me/StrafesNET/common", rev = "093a54c527134ef7020a22a0f5778df8cba60228" }
|
||||
strafesnet_bsp_loader = { git = "https://git.itzana.me/StrafesNET/bsp_loader", rev = "671b86802179572af3385bbd90cbe3bb5b6401a2" }
|
||||
#strafesnet_bsp_loader = { git = "https://git.itzana.me/StrafesNET/bsp_loader", rev = "671b86802179572af3385bbd90cbe3bb5b6401a2" }
|
||||
strafesnet_rbx_loader = { git = "https://git.itzana.me/StrafesNET/rbx_loader", rev = "e0739fa792ad506e210f076b90697194005bb7de" }
|
||||
strafesnet_deferred_loader = { git = "https://git.itzana.me/StrafesNET/deferred_loader", rev = "c03cd0e905daf70b03b60b3e12509f96ee94a658", features = ["legacy"] }
|
||||
wgpu = "0.19.0"
|
||||
winit = "0.29.2"
|
||||
|
||||
#[profile.release]
|
||||
[profile.release]
|
||||
#lto = true
|
||||
#strip = true
|
||||
#codegen-units = 1
|
||||
strip = true
|
||||
codegen-units = 1
|
||||
|
10
src/file.rs
10
src/file.rs
@ -3,7 +3,7 @@ use std::io::Read;
|
||||
#[derive(Debug)]
|
||||
pub enum ReadError{
|
||||
Roblox(strafesnet_rbx_loader::ReadError),
|
||||
Source(strafesnet_bsp_loader::ReadError),
|
||||
//Source(strafesnet_bsp_loader::ReadError),
|
||||
Io(std::io::Error),
|
||||
UnknownFileFormat,
|
||||
}
|
||||
@ -16,7 +16,7 @@ impl std::error::Error for ReadError{}
|
||||
|
||||
pub enum DataStructure{
|
||||
Roblox(strafesnet_rbx_loader::Dom),
|
||||
Source(strafesnet_bsp_loader::Bsp)
|
||||
//Source(strafesnet_bsp_loader::Bsp)
|
||||
}
|
||||
|
||||
pub fn read<R:Read>(input:R)->Result<DataStructure,ReadError>{
|
||||
@ -24,7 +24,7 @@ pub fn read<R:Read>(input:R)->Result<DataStructure,ReadError>{
|
||||
let peek=std::io::BufRead::fill_buf(&mut buf).map_err(ReadError::Io)?;
|
||||
match &peek[0..4]{
|
||||
b"<rob"=>Ok(DataStructure::Roblox(strafesnet_rbx_loader::read(buf).map_err(ReadError::Roblox)?)),
|
||||
b"VBSP"=>Ok(DataStructure::Source(strafesnet_bsp_loader::read(buf).map_err(ReadError::Source)?)),
|
||||
//b"VBSP"=>Ok(DataStructure::Source(strafesnet_bsp_loader::read(buf).map_err(ReadError::Source)?)),
|
||||
_=>Err(ReadError::UnknownFileFormat),
|
||||
}
|
||||
}
|
||||
@ -67,6 +67,7 @@ pub fn load<P:AsRef<std::path::Path>>(path:P)->Result<strafesnet_common::map::Co
|
||||
|
||||
Ok(map)
|
||||
},
|
||||
/*
|
||||
DataStructure::Source(bsp)=>{
|
||||
let mut loader=strafesnet_deferred_loader::source_legacy();
|
||||
|
||||
@ -107,5 +108,6 @@ pub fn load<P:AsRef<std::path::Path>>(path:P)->Result<strafesnet_common::map::Co
|
||||
|
||||
Ok(map)
|
||||
},
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -854,10 +854,12 @@ pub struct PhysicsData{
|
||||
}
|
||||
impl Default for PhysicsState{
|
||||
fn default()->Self{
|
||||
let mut style=StyleModifiers::default();
|
||||
style.gravity=style.gravity/2;
|
||||
Self{
|
||||
body:Body::new(Planar64Vec3::int(0,50,0),Planar64Vec3::int(0,0,0),Planar64Vec3::int(0,-100,0),Time::ZERO),
|
||||
time:Time::ZERO,
|
||||
style:StyleModifiers::default(),
|
||||
style,
|
||||
touching:TouchingState::default(),
|
||||
move_state: MoveState::Air,
|
||||
camera:PhysicsCamera::default(),
|
||||
@ -1695,4 +1697,4 @@ mod test{
|
||||
Time::ZERO
|
||||
),None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user