This commit is contained in:
Robin Appelman 2022-03-19 19:07:38 +01:00
commit d355ccad1c
3 changed files with 30 additions and 7 deletions

19
Cargo.lock generated
View file

@ -280,6 +280,20 @@ name = "bytemuck"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e851ca7c24871e7336801608a4797d7376545b6928a10d32d75685687141ead"
dependencies = [
"bytemuck_derive",
]
[[package]]
name = "bytemuck_derive"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e215f8c2f9f79cb53c8335e687ffd07d5bfcb6fe5fc80723762d0be46e7cc54"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "byteorder"
@ -2690,8 +2704,8 @@ name = "vmdl"
version = "0.1.0"
dependencies = [
"arrayvec 0.7.2",
"binrw",
"bitflags",
"bytemuck",
"itertools",
"static_assertions",
"thiserror",
@ -2700,8 +2714,9 @@ dependencies = [
[[package]]
name = "vpk"
version = "0.1.2"
version = "0.1.4"
dependencies = [
"ahash",
"binread",
"thiserror",
]

View file

@ -13,7 +13,7 @@ thiserror = "1.0.30"
delaunator = "1.0.1"
itertools = "0.10.3"
steamlocate = "1.0.1"
vpk = { version = "0.1.2", path = "../vpk-rs" }
vpk = { version = "0.1.4", path = "../vpk-rs" }
vmdl = { version = "*", path = "../vmdl" }
tracing = "0.1.29"
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
@ -21,4 +21,7 @@ tracing-tree = "0.2.0"
cgmath = "0.18.0"
[profile.dev.package."*"]
opt-level = 2
opt-level = 2
[profile.release]
debug = true

View file

@ -8,7 +8,7 @@ use std::env::args;
use std::fs;
use thiserror::Error;
use three_d::*;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Registry};
use tracing_subscriber::{prelude::*, EnvFilter};
use tracing_tree::HierarchicalLayer;
use vbsp::{Bsp, Handle, StaticPropLump};
use vmdl::mdl::Mdl;
@ -37,9 +37,10 @@ impl From<&'static str> for Error {
}
}
fn main() -> Result<(), Error> {
fn setup() {
miette::set_panic_hook();
Registry::default()
tracing_subscriber::registry()
.with(EnvFilter::from_default_env())
.with(
HierarchicalLayer::new(2)
@ -47,6 +48,10 @@ fn main() -> Result<(), Error> {
.with_bracketed_fields(true),
)
.init();
}
fn main() -> Result<(), Error> {
setup();
let mut args = args();
let _bin = args.next().unwrap();