diff --git a/src/Tools/psxcdgen_ex/src/encoder/cd.rs b/src/Tools/psxcdgen_ex/src/encoder/cd.rs index c079010c..9c6d67dc 100644 --- a/src/Tools/psxcdgen_ex/src/encoder/cd.rs +++ b/src/Tools/psxcdgen_ex/src/encoder/cd.rs @@ -7,7 +7,7 @@ use std::io::{Read, Seek, SeekFrom}; const ROOT_DIR_NAME:&'static str = "\x00"; -pub mod length_of { +pub mod size_of { use cdtypes::types::{sector::Mode0, helper::{sector_count_mode2_form1, sector_count_mode2_form2}}; use crate::types::FileType; use super::{Directory, File, FullSizeInfo, SizeInfo, PathTable}; @@ -65,11 +65,11 @@ pub mod length_of { pub fn calculate_length_for(element: &Layout) -> SizeInfo { match element { - Layout::SystemArea(_) => length_of::system_area(), - Layout::PVD(_) => length_of::pvd(), - Layout::PathTables(root, _) => length_of::path_tables(&root.borrow()), - Layout::Directory(dir) => length_of::directory(&dir.borrow()), - Layout::File(file) => length_of::file(&file.borrow()), + Layout::SystemArea(_) => size_of::system_area(), + Layout::PVD(_) => size_of::pvd(), + Layout::PathTables(root, _) => size_of::path_tables(&root.borrow()), + Layout::Directory(dir) => size_of::directory(&dir.borrow()), + Layout::File(file) => size_of::file(&file.borrow()), } } @@ -237,7 +237,7 @@ fn process_system_area(system_area: &SystemArea, sec_writer: &mut dyn SectorWrit else { // No license specified - filling it with zeros print_warning("WARNING: No license file provided. Some emulators (like No$PSX) will not boot this CD.".to_owned()); - write_dummy(sec_writer, length_of::SYSTEM_AREA_SECTOR_COUNT) + write_dummy(sec_writer, size_of::SYSTEM_AREA_SECTOR_COUNT) } } diff --git a/src/Tools/psxcdgen_ex/src/types/mod.rs b/src/Tools/psxcdgen_ex/src/types/mod.rs index 2a1ab559..67419ba5 100644 --- a/src/Tools/psxcdgen_ex/src/types/mod.rs +++ b/src/Tools/psxcdgen_ex/src/types/mod.rs @@ -71,7 +71,7 @@ impl CDDesc { } }); - size += cd::length_of::lead_out(self.lead_out_sectors).full_size.bytes.unwrap_or(0); + size += cd::size_of::lead_out(self.lead_out_sectors).full_size.bytes.unwrap_or(0); size }