mirror of
https://github.com/NinjaCheetah/rustii.git
synced 2026-03-11 04:27:49 -04:00
Use Rc<RefCell<T>>> for content_records so that they sync in a Title
When using a Title, the content_records value stored in the TMD and ContentRegion instances will now point to the same data, meaning that they stay in sync. Previously, you had to manually sync the content records between them as they were modified, and not doing so would cause problems when editing a WAD.
This commit is contained in:
@@ -11,8 +11,8 @@ fn main() {
|
||||
|
||||
let wad = wad::WAD::from_bytes(&data).unwrap();
|
||||
println!("size of tmd: {:?}", wad.tmd().len());
|
||||
println!("num content records: {:?}", title.tmd.content_records.len());
|
||||
println!("first record data: {:?}", title.tmd.content_records.first().unwrap());
|
||||
println!("num content records: {:?}", title.tmd.content_records.borrow().len());
|
||||
println!("first record data: {:?}", title.tmd.content_records.borrow().first().unwrap());
|
||||
println!("TMD is fakesigned: {:?}",title.tmd.is_fakesigned());
|
||||
|
||||
println!("title version from ticket is: {:?}", title.ticket.title_version);
|
||||
|
||||
Reference in New Issue
Block a user