Prepare fconv to support XA

This commit is contained in:
jaby 2024-05-16 22:59:56 +02:00
parent a9444a19f2
commit b7be664d9f
4 changed files with 17 additions and 3 deletions

View File

@ -0,0 +1 @@
pub mod xa;

View File

@ -0,0 +1,10 @@
use clap::Args;
use std::io::Write;
use tool_helper::{Error, Input};
#[derive(Args)]
pub struct Arguments {}
pub fn convert(_args: Arguments, _input: Input, _output: &mut dyn Write) -> Result<(), Error> {
Err(Error::not_implemented("XA Audio convert"))
}

View File

@ -1,2 +1,3 @@
pub mod audio;
pub mod images;
pub mod nothing;

View File

@ -1,5 +1,5 @@
use clap::{Parser, Subcommand};
use jaby_engine_fconv::{images::*, nothing};
use jaby_engine_fconv::{audio::*, images::*, nothing};
use std::path::PathBuf;
use tool_helper::{Error, exit_with_error};
@ -22,7 +22,8 @@ struct CommandLine {
#[derive(Subcommand)]
enum SubCommands {
Nothing,
SimpleTIM(reduced_tim::Arguments)
SimpleTIM(reduced_tim::Arguments),
XA(xa::Arguments)
}
fn run_main(cmd: CommandLine) -> Result<(), Error> {
@ -42,7 +43,8 @@ fn run_main(cmd: CommandLine) -> Result<(), Error> {
let cmd_result: 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::SimpleTIM(args) => reduced_tim::convert(args, input, dst_buffer),
SubCommands::XA(args) => xa::convert(args, input, dst_buffer),
}
};