From 35d92ea8297f4968069372f4f3011c1446aa679f Mon Sep 17 00:00:00 2001 From: Jaby Date: Sun, 16 Oct 2022 14:47:21 +0200 Subject: [PATCH] Calculate LBAs --- src/Tools/psxcdgen_ex/src/types/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Tools/psxcdgen_ex/src/types/mod.rs b/src/Tools/psxcdgen_ex/src/types/mod.rs index f3f6e84c..8017a415 100644 --- a/src/Tools/psxcdgen_ex/src/types/mod.rs +++ b/src/Tools/psxcdgen_ex/src/types/mod.rs @@ -62,7 +62,12 @@ impl CDDesc { LayoutMut::PathTables => { cur_lba = update_lba(&mut path_table_properties, cur_lba, Self::DEFAULT_DATA_SIZE_FOR_NOW); }, - _ => () + LayoutMut::Directory{name: _, properties} => { + cur_lba = update_lba(properties, cur_lba, Self::DEFAULT_DATA_SIZE_FOR_NOW) + }, + LayoutMut::File(file) => { + cur_lba = update_lba(&mut file.properties, cur_lba, Self::DEFAULT_DATA_SIZE_FOR_NOW); + } } println!("cur_lba: {}", cur_lba);