mirror of https://github.com/encounter/nod-rs.git
Minor cleanup
This commit is contained in:
parent
d197b8e7c2
commit
490ae80a60
|
@ -67,7 +67,7 @@ pub struct DiscHeader {
|
||||||
pub audio_stream_buf_size: u8,
|
pub audio_stream_buf_size: u8,
|
||||||
/// Padding
|
/// Padding
|
||||||
_pad1: [u8; 14],
|
_pad1: [u8; 14],
|
||||||
/// If this is a Wii disc, this will bPartitionKinde 0x5D1C9EA3
|
/// If this is a Wii disc, this will be 0x5D1C9EA3
|
||||||
pub wii_magic: MagicBytes,
|
pub wii_magic: MagicBytes,
|
||||||
/// If this is a GameCube disc, this will be 0xC2339F3D
|
/// If this is a GameCube disc, this will be 0xC2339F3D
|
||||||
pub gcn_magic: MagicBytes,
|
pub gcn_magic: MagicBytes,
|
||||||
|
@ -126,7 +126,7 @@ pub struct PartitionHeader {
|
||||||
pub debug_mon_offset: U32,
|
pub debug_mon_offset: U32,
|
||||||
/// Debug monitor load address
|
/// Debug monitor load address
|
||||||
pub debug_load_address: U32,
|
pub debug_load_address: U32,
|
||||||
/// PaddingPartitionKind
|
/// Padding
|
||||||
_pad1: [u8; 0x18],
|
_pad1: [u8; 0x18],
|
||||||
/// Offset to main DOL (Wii: >> 2)
|
/// Offset to main DOL (Wii: >> 2)
|
||||||
pub dol_offset: U32,
|
pub dol_offset: U32,
|
||||||
|
|
|
@ -65,7 +65,7 @@ impl BlockReaderCISO {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build block map
|
// Build block map
|
||||||
let mut block_map = [0u16; CISO_MAP_SIZE];
|
let mut block_map = <[u16; CISO_MAP_SIZE]>::new_box_zeroed()?;
|
||||||
let mut block = 0u16;
|
let mut block = 0u16;
|
||||||
for (presence, out) in header.block_present.iter().zip(block_map.iter_mut()) {
|
for (presence, out) in header.block_present.iter().zip(block_map.iter_mut()) {
|
||||||
if *presence == 1 {
|
if *presence == 1 {
|
||||||
|
@ -92,7 +92,7 @@ impl BlockReaderCISO {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(Box::new(Self { inner, header, block_map: Arc::new(block_map), nkit_header }))
|
Ok(Box::new(Self { inner, header, block_map: Arc::from(block_map), nkit_header }))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue