Compare commits

..

20 Commits
obj ... master

Author SHA1 Message Date
c415ffbdab default to current name and confirm override 2024-08-24 19:40:09 -07:00
cbc818bd03 remove a panic 2024-08-13 16:20:32 -07:00
53d2f7a5e8 v1.1.1 fix displayname 2024-08-12 16:23:42 -07:00
96d1cc87a2 update deps 2024-08-12 16:23:42 -07:00
5915dd730f redo displayname test 2024-08-12 16:23:42 -07:00
e626131d95 v1.1.0 asset tool upgrade (TODO: directly use rbx_asset lib) 2024-07-15 20:24:28 -07:00
69ffbf4837 update deps 2024-07-15 20:24:28 -07:00
167be8f587 update asset tool to 0.4.x 2024-07-15 20:22:54 -07:00
e92528ad83 reject uncapitalized display names 2024-06-03 08:47:16 -07:00
8e9c76d6f8 use strafesnet deps 2024-05-30 02:02:46 -07:00
a5c48d4684 v1.0.1 use asset tool + prompt for model name 2024-04-25 19:02:11 -07:00
1b5eec9eaf if model name is illegal prompt for new name 2024-04-25 04:42:31 -07:00
ef5703f282 condense prompt logic 2024-04-25 04:34:31 -07:00
9685301b30 use asset tool for upload 2024-04-25 01:10:15 -07:00
d2b455c87b rename package and de-version to pre-map-tool functionality 2024-03-17 10:29:24 -07:00
9de2790cc8 remove map-tool deps 2024-03-17 10:29:24 -07:00
47e93325ad remove map-tool + asset-tool functions 2024-03-08 10:15:00 -08:00
de9712b7a1 clarify function name 2024-03-08 10:10:26 -08:00
c2d0a4487c misc edits 2024-03-08 10:01:54 -08:00
dc9fd2c442 import PathBuf 2024-03-08 09:55:17 -08:00
5 changed files with 329 additions and 1969 deletions

2
.cargo/config.toml Normal file
View File

@ -0,0 +1,2 @@
[registries.strafesnet]
index = "sparse+https://git.itzana.me/api/packages/strafesnet/cargo/"

1443
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[package] [package]
name = "map-tool" name = "mapfixer"
version = "1.4.0" version = "1.1.1"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -9,20 +9,13 @@ edition = "2021"
anyhow = "1.0.75" anyhow = "1.0.75"
clap = { version = "4.4.2", features = ["derive"] } clap = { version = "4.4.2", features = ["derive"] }
flate2 = "1.0.27" flate2 = "1.0.27"
image = "0.24.7"
image_dds = "0.1.1"
lazy-regex = "3.1.0" lazy-regex = "3.1.0"
rbx_binary = "0.7.1" rbx_binary = { version = "0.7.4", registry = "strafesnet"}
rbx_dom_weak = "2.5.0" rbx_dom_weak = { version = "2.7.0", registry = "strafesnet"}
rbx_reflection_database = "0.2.7" rbx_reflection_database = { version = "0.2.10", registry = "strafesnet"}
rbx_xml = "0.13.1" rbx_xml = { version = "0.13.3", registry = "strafesnet"}
vbsp = "0.5.0"
vmdl = "0.1.1"
vmt-parser = "0.1.1"
vpk = "0.2.0"
vtf = "0.2.1"
#[profile.release] [profile.release]
#lto = true lto = true
#strip = true strip = true
#codegen-units = 1 codegen-units = 1

File diff suppressed because it is too large Load Diff

View File

@ -1,41 +0,0 @@
pub fn generate_indexed_model_list_from_obj(data:obj::ObjData,color:Color4)->Vec<IndexedModel>{
let mut unique_vertex_index = std::collections::HashMap::<obj::IndexTuple,u32>::new();
return data.objects.iter().map(|object|{
unique_vertex_index.clear();
let mut unique_vertices = Vec::new();
let groups = object.groups.iter().map(|group|{
IndexedGroup{
texture:None,
polys:group.polys.iter().map(|poly|{
IndexedPolygon{
vertices:poly.0.iter().map(|&tup|{
if let Some(&i)=unique_vertex_index.get(&tup){
i
}else{
let i=unique_vertices.len() as u32;
unique_vertices.push(IndexedVertex{
pos: tup.0 as u32,
tex: tup.1.unwrap() as u32,
normal: tup.2.unwrap() as u32,
color: 0,
});
unique_vertex_index.insert(tup,i);
i
}
}).collect()
}
}).collect()
}
}).collect();
IndexedModel{
unique_pos: data.position.iter().map(|&v|Planar64Vec3::try_from(v).unwrap()).collect(),
unique_tex: data.texture.iter().map(|&v|TextureCoordinate::from_array(v)).collect(),
unique_normal: data.normal.iter().map(|&v|Planar64Vec3::try_from(v).unwrap()).collect(),
unique_color: vec![color],
unique_vertices,
groups,
instances:Vec::new(),
}
}).collect()
}