mirror of
https://github.com/NinjaCheetah/rustii.git
synced 2026-03-11 04:27:49 -04:00
Added rustii CLI wad edit command and required library features
This required a LOT more backend work than I expected. But hey, some of this stuff is being done better than it was in libWiiPy/WiiPy, so that's a win in my book. When changing both the Title ID and type of a WAD, the updated TID will only be written once (which also means the Title Key will only be re-encrypted once). This is an improvement over WiiPy where it will be updated as part of both changes. Some TMD fields have been made private and moved to getter/setter methods only as they are actually in use now and should only be set through the correct means.
This commit is contained in:
@@ -7,7 +7,7 @@ use rustii::title;
|
||||
fn main() {
|
||||
let data = fs::read("sm.wad").unwrap();
|
||||
let title = title::Title::from_bytes(&data).unwrap();
|
||||
println!("Title ID from WAD via Title object: {}", hex::encode(title.tmd.title_id));
|
||||
println!("Title ID from WAD via Title object: {}", hex::encode(title.tmd.title_id()));
|
||||
|
||||
let wad = wad::WAD::from_bytes(&data).unwrap();
|
||||
println!("size of tmd: {:?}", wad.tmd().len());
|
||||
|
||||
Reference in New Issue
Block a user