diff options
author | metamuffin <metamuffin@disroot.org> | 2025-02-15 16:05:15 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-02-15 16:05:15 +0100 |
commit | 46a49718b09fa5a517d2aa8dceadcc1713ffc51a (patch) | |
tree | 639c7b7d6cbf24095ca238a23563935441d50dab /src/bin | |
parent | 2f4a11ddda04604d5d756231d258ef60fa9f7bd8 (diff) | |
download | unity-tools-46a49718b09fa5a517d2aa8dceadcc1713ffc51a.tar unity-tools-46a49718b09fa5a517d2aa8dceadcc1713ffc51a.tar.bz2 unity-tools-46a49718b09fa5a517d2aa8dceadcc1713ffc51a.tar.zst |
post align
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/parse.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bin/parse.rs b/src/bin/parse.rs index d436aad..496f4d3 100644 --- a/src/bin/parse.rs +++ b/src/bin/parse.rs @@ -24,22 +24,22 @@ fn main() -> anyhow::Result<()> { for ob in file.objects { cab.seek(SeekFrom::Start(ob.data_offset))?; - let mut ob_data = cab.by_ref(); //.take(ob.data_size as u64); - eprintln!("{:#?}", ob); + // eprintln!("{:#?}", ob); let typetree = if ob.type_id < 0 { unimplemented!() } else { - file.types - .iter() - .find(|t| t.class_id == ob.type_id) - .expect("unknown type") + // file.types + // .iter() + // .find(|t| t.class_id == ob.type_id) + // .expect("unknown type") + &file.types[ob.type_id as usize] }; - eprintln!("{typetree:#?}"); + // eprintln!("{typetree:#?}"); - let value = read_value(typetree.type_tree.as_ref().unwrap(), e, &mut ob_data)?; + let value = read_value(typetree.type_tree.as_ref().unwrap(), e, &mut cab)?; - eprintln!("{value:#?}") + // eprintln!("{value:#?}") } // eprintln!("{:#?}", file.types); } |