update rbx_loader

This commit is contained in:
Quaternions 2024-10-03 20:01:06 -07:00
parent a18aea828c
commit 1989369956
3 changed files with 13 additions and 12 deletions

16
Cargo.lock generated
View File

@ -1692,9 +1692,9 @@ dependencies = [
[[package]]
name = "roblox_emulator"
version = "0.2.3"
version = "0.3.1"
source = "sparse+https://git.itzana.me/api/packages/strafesnet/cargo/"
checksum = "2fa2c785a17f607aad6bdd19eef6d19f9476f308ce38de139df931a99132bd46"
checksum = "b58d7bb42d458984e629a012757474710fd0e429c2c824a2529574be5e7c2fd6"
dependencies = [
"glam",
"mlua",
@ -1833,9 +1833,9 @@ dependencies = [
[[package]]
name = "strafesnet_deferred_loader"
version = "0.4.0"
version = "0.4.1"
source = "sparse+https://git.itzana.me/api/packages/strafesnet/cargo/"
checksum = "9985192a282473ddd40d03114e67afe057cba031bea665e9020b139a621afb07"
checksum = "cb47034893e945c640063a6c0fb09c6186dcc9f0b221b8c41f5a22070fe430f4"
dependencies = [
"strafesnet_common",
"url",
@ -1844,9 +1844,9 @@ dependencies = [
[[package]]
name = "strafesnet_rbx_loader"
version = "0.4.1"
version = "0.5.1"
source = "sparse+https://git.itzana.me/api/packages/strafesnet/cargo/"
checksum = "a1540fa66518857886cf4094dc597b3228341046d8973ccc70196fb52a47105b"
checksum = "bb3539939618714ed418aca2f2d10578022f984d223d05f99b857805c02d7cfe"
dependencies = [
"bytemuck",
"glam",
@ -2097,9 +2097,9 @@ dependencies = [
[[package]]
name = "unicode-bidi"
version = "0.3.15"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893"
[[package]]
name = "unicode-ident"

View File

@ -18,7 +18,7 @@ rbx_reflection_database = { version = "0.2.10", registry = "strafesnet" }
rbx_xml = { version = "0.13.3", registry = "strafesnet" }
strafesnet_bsp_loader = { version = "0.2.1", registry = "strafesnet" }
strafesnet_deferred_loader = { version = "0.4.0", features = ["legacy"], registry = "strafesnet" }
strafesnet_rbx_loader = { version = "0.4.1", registry = "strafesnet" }
strafesnet_rbx_loader = { version = "0.5.1", registry = "strafesnet" }
strafesnet_snf = { version = "0.2.0", registry = "strafesnet" }
vbsp = "0.6.0"
vmdl = "0.2.0"

View File

@ -676,19 +676,20 @@ fn roblox_to_snf(pathlist:Vec<std::path::PathBuf>,output_folder:PathBuf)->AResul
}
let output_folder=output_folder.clone();
threads.push_back(std::thread::spawn(move ||{
let mut dom=strafesnet_rbx_loader::read(
let model=strafesnet_rbx_loader::read(
std::fs::File::open(path.as_path())
.map_err(ConvertError::IO)?
).map_err(ConvertError::RbxLoader)?;
dom.run_scripts();
let mut place=model.into_place();
place.run_scripts();
let mut loader=strafesnet_deferred_loader::roblox_legacy();
let (texture_loader,mesh_loader)=loader.get_inner_mut();
let map_step1=strafesnet_rbx_loader::convert(
&dom,
&place,
|name|texture_loader.acquire_render_config_id(name),
|name|mesh_loader.acquire_mesh_id(name),
);