Added WAD packing command to rustii CLI

Also added lots of required library magic to make WAD packing possible. This includes the high-level Title object from libWiiPy, the ability to set content in a WAD, the ability to generate a WADHeader from a WADBody, and more.
This commit is contained in:
2025-03-19 18:50:37 -04:00
parent 6ab9993dd9
commit 62f6e6c0ec
10 changed files with 358 additions and 29 deletions

View File

@@ -2,9 +2,13 @@
use std::fs;
use rustii::title::{tmd, ticket, content, crypto, wad};
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));
let wad = wad::WAD::from_bytes(&data).unwrap();
println!("size of tmd: {:?}", wad.tmd().len());
let tmd = tmd::TMD::from_bytes(&wad.tmd()).unwrap();