diff --git a/examples/PoolBox/assets/Makefile b/examples/PoolBox/assets/Makefile index ae1f52f7..b39e4073 100644 --- a/examples/PoolBox/assets/Makefile +++ b/examples/PoolBox/assets/Makefile @@ -15,6 +15,7 @@ INPUT += $(OUTPUT_DIR)/fox.xa INPUT += $(OUTPUT_DIR)/apple.vag INPUT += $(OUTPUT_DIR)/blubb.vag INPUT += $(OUTPUT_DIR)/Friendship_samp.vag +INPUT += $(OUTPUT_DIR)/Friendship_samp.vag2 ## Images INPUT += $(OUTPUT_DIR)/TexturePage.img @@ -46,6 +47,10 @@ $(OUTPUT_DIR)/%.vag: audio/temp/%.wav @mkdir -p $(OUTPUT_DIR) fileconv --lz4 $< -o $@ vag +$(OUTPUT_DIR)/%.vag2: audio/temp/%.wav + @mkdir -p $(OUTPUT_DIR) + fileconv --lz4 $< -o $@ my-vag + $(OUTPUT_DIR)/%.xa: audio/%.wav @mkdir -p $(OUTPUT_DIR) fileconv $< -o $@ xa diff --git a/src/Tools/fileconv/src/audio/mod.rs b/src/Tools/fileconv/src/audio/mod.rs index bdfdb429..8fc52912 100644 --- a/src/Tools/fileconv/src/audio/mod.rs +++ b/src/Tools/fileconv/src/audio/mod.rs @@ -1,5 +1,6 @@ -pub mod xa; +pub mod my_vag; pub mod vag; +pub mod xa; use std::{env, path::PathBuf, process::Command}; use tool_helper::Error; diff --git a/src/Tools/fileconv/src/audio/my_vag/mod.rs b/src/Tools/fileconv/src/audio/my_vag/mod.rs new file mode 100644 index 00000000..27b5b69f --- /dev/null +++ b/src/Tools/fileconv/src/audio/my_vag/mod.rs @@ -0,0 +1,6 @@ +use std::io::Write; +use tool_helper::{Error, Input}; + +pub fn convert(_input: Input, _output: &mut dyn Write) -> Result<(), Error> { + Err(Error::not_implemented("my vag convert")) +} \ No newline at end of file diff --git a/src/Tools/fileconv/src/main.rs b/src/Tools/fileconv/src/main.rs index 6eb50788..5aee4da1 100644 --- a/src/Tools/fileconv/src/main.rs +++ b/src/Tools/fileconv/src/main.rs @@ -1,5 +1,5 @@ use clap::{Parser, Subcommand}; -use fileconv::{audio::*, images::*, nothing}; +use fileconv::{audio::{self, *}, images::*, nothing}; use std::path::PathBuf; use tool_helper::{exit_with_error, print_warning, Error}; @@ -24,6 +24,7 @@ enum SubCommands { // === Internal Commands === Nothing, SimpleTIM(reduced_tim::Arguments), + MyVAG, // === External Commands === VAG(vag::Arguments), @@ -35,6 +36,7 @@ impl SubCommands { match self { SubCommands::Nothing => false, SubCommands::SimpleTIM(_) => false, + SubCommands::MyVAG => false, SubCommands::VAG(_) => true, SubCommands::XA(_) => true @@ -60,6 +62,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 => audio::my_vag::convert(input, dst_buffer), _ => Err(Error::from_str("External functions can not be called for internal conversion")) } };