From 4ae3f1fb3d4df6500af9e33e3678f8797df3c22f Mon Sep 17 00:00:00 2001 From: jaby Date: Sun, 3 Nov 2024 21:30:04 +0000 Subject: [PATCH] Use new VAG tool --- examples/PoolBox/assets/Makefile | 7 +------ examples/PoolBox/iso/Config.xml | 4 ++-- src/Tools/psxfileconv/src/audio/mod.rs | 2 +- .../psxfileconv/src/audio/{vag => old_vag}/mod.rs | 0 src/Tools/psxfileconv/src/main.rs | 13 +++++-------- 5 files changed, 9 insertions(+), 17 deletions(-) rename src/Tools/psxfileconv/src/audio/{vag => old_vag}/mod.rs (100%) diff --git a/examples/PoolBox/assets/Makefile b/examples/PoolBox/assets/Makefile index 2d80c6f4..a1efdf0e 100644 --- a/examples/PoolBox/assets/Makefile +++ b/examples/PoolBox/assets/Makefile @@ -13,9 +13,8 @@ CLUT_4_COLOR_TRANS_FLAGS = simple-tim clut4 --color-trans INPUT += $(OUTPUT_DIR)/Evacuation_cdda.xa INPUT += $(OUTPUT_DIR)/fox.xa INPUT += $(OUTPUT_DIR)/apple.vag -INPUT += $(OUTPUT_DIR)/blubb.vag +INPUT += $(OUTPUT_DIR)/blubb-mono.vag INPUT += $(OUTPUT_DIR)/Friendship_samp.vag -INPUT += $(OUTPUT_DIR)/Friendship_samp.vag2 ## Images INPUT += $(OUTPUT_DIR)/TexturePage.img @@ -47,10 +46,6 @@ $(OUTPUT_DIR)/%.vag: audio/temp/%.wav @mkdir -p $(OUTPUT_DIR) psxfileconv --lz4 $< -o $@ vag -$(OUTPUT_DIR)/%.vag2: audio/temp/%.wav - @mkdir -p $(OUTPUT_DIR) - psxfileconv --lz4 $< -o $@ my-vag - $(OUTPUT_DIR)/%.xa: audio/%.wav @mkdir -p $(OUTPUT_DIR) psxfileconv $< -o $@ xa diff --git a/examples/PoolBox/iso/Config.xml b/examples/PoolBox/iso/Config.xml index 3dbc14d2..2c795919 100644 --- a/examples/PoolBox/iso/Config.xml +++ b/examples/PoolBox/iso/Config.xml @@ -50,8 +50,8 @@ ../assets/audio/temp/breaking.wav diff --git a/src/Tools/psxfileconv/src/audio/mod.rs b/src/Tools/psxfileconv/src/audio/mod.rs index 8fc52912..04c19cb1 100644 --- a/src/Tools/psxfileconv/src/audio/mod.rs +++ b/src/Tools/psxfileconv/src/audio/mod.rs @@ -1,5 +1,5 @@ pub mod my_vag; -pub mod vag; +pub mod old_vag; pub mod xa; use std::{env, path::PathBuf, process::Command}; diff --git a/src/Tools/psxfileconv/src/audio/vag/mod.rs b/src/Tools/psxfileconv/src/audio/old_vag/mod.rs similarity index 100% rename from src/Tools/psxfileconv/src/audio/vag/mod.rs rename to src/Tools/psxfileconv/src/audio/old_vag/mod.rs diff --git a/src/Tools/psxfileconv/src/main.rs b/src/Tools/psxfileconv/src/main.rs index 25044c5a..a4f4381f 100644 --- a/src/Tools/psxfileconv/src/main.rs +++ b/src/Tools/psxfileconv/src/main.rs @@ -24,10 +24,9 @@ enum SubCommands { // === Internal Commands === Nothing, SimpleTIM(reduced_tim::Arguments), - MyVAG(my_vag::Arguments), + VAG(my_vag::Arguments), // === External Commands === - VAG(vag::Arguments), XA(xa::Arguments), } @@ -36,9 +35,8 @@ impl SubCommands { match self { SubCommands::Nothing => false, SubCommands::SimpleTIM(_) => false, - SubCommands::MyVAG(_) => false, + SubCommands::VAG(_) => false, - SubCommands::VAG(_) => true, SubCommands::XA(_) => true } } @@ -62,7 +60,7 @@ fn run_internal_conversion(cmd: CommandLine) -> Result<(), Error> { match cmd.sub_command { SubCommands::Nothing => nothing::copy(&mut input, dst_buffer), SubCommands::SimpleTIM(args) => reduced_tim::convert(args, input, dst_buffer), - SubCommands::MyVAG(args) => audio::my_vag::convert(args, &cmd.output_file, input, dst_buffer), + SubCommands::VAG(args) => audio::my_vag::convert(args, &cmd.output_file, input, dst_buffer), _ => Err(Error::from_str("External functions can not be called for internal conversion")) } }; @@ -94,9 +92,8 @@ fn run_external_conversion(cmd: CommandLine) -> Result<(), Error> { let is_xa = matches!(cmd.sub_command, SubCommands::XA(_)); match cmd.sub_command { - SubCommands::VAG(args) => vag::convert(args, input_file, output_file.clone()), - SubCommands::XA(args) => xa::convert(args, input_file, output_file.clone()), - _ => Err(Error::from_str("Internal functions can not be called for external conversion")) + SubCommands::XA(args) => xa::convert(args, input_file, output_file.clone()), + _ => Err(Error::from_str("Internal functions can not be called for external conversion")) }?; if cmd.compress_lz4 {