Prepare my_vag conversion
This commit is contained in:
parent
f6da5769d6
commit
0d273eed38
|
@ -15,6 +15,7 @@ INPUT += $(OUTPUT_DIR)/fox.xa
|
||||||
INPUT += $(OUTPUT_DIR)/apple.vag
|
INPUT += $(OUTPUT_DIR)/apple.vag
|
||||||
INPUT += $(OUTPUT_DIR)/blubb.vag
|
INPUT += $(OUTPUT_DIR)/blubb.vag
|
||||||
INPUT += $(OUTPUT_DIR)/Friendship_samp.vag
|
INPUT += $(OUTPUT_DIR)/Friendship_samp.vag
|
||||||
|
INPUT += $(OUTPUT_DIR)/Friendship_samp.vag2
|
||||||
|
|
||||||
## Images
|
## Images
|
||||||
INPUT += $(OUTPUT_DIR)/TexturePage.img
|
INPUT += $(OUTPUT_DIR)/TexturePage.img
|
||||||
|
@ -46,6 +47,10 @@ $(OUTPUT_DIR)/%.vag: audio/temp/%.wav
|
||||||
@mkdir -p $(OUTPUT_DIR)
|
@mkdir -p $(OUTPUT_DIR)
|
||||||
fileconv --lz4 $< -o $@ vag
|
fileconv --lz4 $< -o $@ vag
|
||||||
|
|
||||||
|
$(OUTPUT_DIR)/%.vag2: audio/temp/%.wav
|
||||||
|
@mkdir -p $(OUTPUT_DIR)
|
||||||
|
fileconv --lz4 $< -o $@ my-vag
|
||||||
|
|
||||||
$(OUTPUT_DIR)/%.xa: audio/%.wav
|
$(OUTPUT_DIR)/%.xa: audio/%.wav
|
||||||
@mkdir -p $(OUTPUT_DIR)
|
@mkdir -p $(OUTPUT_DIR)
|
||||||
fileconv $< -o $@ xa
|
fileconv $< -o $@ xa
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
pub mod xa;
|
pub mod my_vag;
|
||||||
pub mod vag;
|
pub mod vag;
|
||||||
|
pub mod xa;
|
||||||
|
|
||||||
use std::{env, path::PathBuf, process::Command};
|
use std::{env, path::PathBuf, process::Command};
|
||||||
use tool_helper::Error;
|
use tool_helper::Error;
|
||||||
|
|
|
@ -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"))
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use fileconv::{audio::*, images::*, nothing};
|
use fileconv::{audio::{self, *}, images::*, nothing};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use tool_helper::{exit_with_error, print_warning, Error};
|
use tool_helper::{exit_with_error, print_warning, Error};
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ enum SubCommands {
|
||||||
// === Internal Commands ===
|
// === Internal Commands ===
|
||||||
Nothing,
|
Nothing,
|
||||||
SimpleTIM(reduced_tim::Arguments),
|
SimpleTIM(reduced_tim::Arguments),
|
||||||
|
MyVAG,
|
||||||
|
|
||||||
// === External Commands ===
|
// === External Commands ===
|
||||||
VAG(vag::Arguments),
|
VAG(vag::Arguments),
|
||||||
|
@ -35,6 +36,7 @@ impl SubCommands {
|
||||||
match self {
|
match self {
|
||||||
SubCommands::Nothing => false,
|
SubCommands::Nothing => false,
|
||||||
SubCommands::SimpleTIM(_) => false,
|
SubCommands::SimpleTIM(_) => false,
|
||||||
|
SubCommands::MyVAG => false,
|
||||||
|
|
||||||
SubCommands::VAG(_) => true,
|
SubCommands::VAG(_) => true,
|
||||||
SubCommands::XA(_) => true
|
SubCommands::XA(_) => true
|
||||||
|
@ -60,6 +62,7 @@ fn run_internal_conversion(cmd: CommandLine) -> Result<(), Error> {
|
||||||
match cmd.sub_command {
|
match cmd.sub_command {
|
||||||
SubCommands::Nothing => nothing::copy(&mut input, dst_buffer),
|
SubCommands::Nothing => nothing::copy(&mut input, dst_buffer),
|
||||||
SubCommands::SimpleTIM(args) => reduced_tim::convert(args, 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"))
|
_ => Err(Error::from_str("External functions can not be called for internal conversion"))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue