diff --git a/nod/src/disc/wii.rs b/nod/src/disc/wii.rs index 27f3ae5..42a0ee0 100644 --- a/nod/src/disc/wii.rs +++ b/nod/src/disc/wii.rs @@ -13,7 +13,7 @@ use crate::{ array_ref, disc::{ gcn::{read_part_meta, PartitionGC}, - PartitionBase, PartitionKind, PartitionMeta, SECTOR_SIZE, + PartitionBase, PartitionMeta, SECTOR_SIZE, }, fst::{Node, NodeKind}, io::{ @@ -70,18 +70,6 @@ impl WiiPartEntry { pub(crate) fn offset(&self) -> u64 { (self.offset.get() as u64) << 2 } } -#[derive(Debug, PartialEq)] -pub(crate) struct WiiPartInfo { - pub(crate) group_idx: u32, - pub(crate) part_idx: u32, - pub(crate) offset: u64, - pub(crate) kind: PartitionKind, - pub(crate) header: WiiPartitionHeader, - pub(crate) junk_id: [u8; 4], - pub(crate) junk_start: u64, - pub(crate) title_key: KeyBytes, -} - pub(crate) const WII_PART_GROUP_OFF: u64 = 0x40000; #[derive(Debug, PartialEq, FromBytes, FromZeroes, AsBytes)] diff --git a/nodtool/src/main.rs b/nodtool/src/main.rs index 89e0e0b..f57b377 100644 --- a/nodtool/src/main.rs +++ b/nodtool/src/main.rs @@ -1,13 +1,6 @@ mod argp_version; -use std::{ - env, - error::Error, - ffi::OsStr, - fmt, - path::PathBuf, - str::FromStr, -}; +use std::{env, error::Error, ffi::OsStr, fmt, path::PathBuf, str::FromStr}; use argp::{FromArgValue, FromArgs}; use enable_ansi_support::enable_ansi_support; diff --git a/nodtool/src/util/redump.rs b/nodtool/src/util/redump.rs index 93e9ad8..c839758 100644 --- a/nodtool/src/util/redump.rs +++ b/nodtool/src/util/redump.rs @@ -1,6 +1,6 @@ use std::{mem::size_of, str}; -use nod::{array_ref, SECTOR_SIZE}; +use nod::array_ref; use zerocopy::{FromBytes, FromZeroes}; #[derive(Clone, Debug)] @@ -9,7 +9,6 @@ pub struct GameResult { pub crc32: u32, pub md5: [u8; 16], pub sha1: [u8; 20], - pub size: u64, } pub fn find_by_crc32(crc32: u32) -> Option { @@ -30,13 +29,7 @@ pub fn find_by_crc32(crc32: u32) -> Option { let offset = entry.string_table_offset as usize; let name_size = u32::from_ne_bytes(*array_ref![string_table, offset, 4]) as usize; let name = str::from_utf8(&string_table[offset + 4..offset + 4 + name_size]).unwrap(); - Some(GameResult { - name, - crc32: entry.crc32, - md5: entry.md5, - sha1: entry.sha1, - size: entry.sectors as u64 * SECTOR_SIZE as u64, - }) + Some(GameResult { name, crc32: entry.crc32, md5: entry.md5, sha1: entry.sha1 }) } #[repr(C, align(4))]