mirror of
https://github.com/NinjaCheetah/rustii.git
synced 2026-03-11 04:27:49 -04:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user