Some user experience tweaks
parent
2d9fcb8e34
commit
be82baedc8
|
@ -20,11 +20,15 @@ pub fn run_command() -> Result<(), Box<dyn Error>> {
|
|||
TileOrder::Sprite => "sprite"
|
||||
}
|
||||
),
|
||||
Tools::Soundtrack { input_file, output_directory, input_format: _, output_format: _, source_file_format: _, artifact_output_directory } => {
|
||||
Tools::Soundtrack { input_files, output_directory, input_format: _, output_format: _, source_file_format: _, artifact_output_directory } => {
|
||||
if input_files.is_empty() {
|
||||
return Err( "no input files (see `reskit soundtrack --help` for more info)" )?;
|
||||
}
|
||||
|
||||
let output_directory = if output_directory.ends_with( "/" ) { output_directory.to_string() } else { format!( "{}/", output_directory ) };
|
||||
let artifact_output_directory = if artifact_output_directory.ends_with( "/" ) { artifact_output_directory.to_string() } else { format!( "{}/", artifact_output_directory ) };
|
||||
|
||||
let modules: Vec<DmfModule> = input_file.iter().map( | filename | Ok( DmfModule::from_file( &filename )? ) ).collect::<Result<Vec<DmfModule>, Box<dyn Error>>>()?;
|
||||
let modules: Vec<DmfModule> = input_files.iter().map( | filename | Ok( DmfModule::from_file( &filename )? ) ).collect::<Result<Vec<DmfModule>, Box<dyn Error>>>()?;
|
||||
|
||||
let mut combined_asset_list = DmfModule::get_combined_assets_list( artifact_output_directory.clone(), &modules )?;
|
||||
if combined_asset_list.instruments.len() > 255 {
|
||||
|
|
|
@ -62,17 +62,17 @@ pub enum Tools {
|
|||
},
|
||||
|
||||
#[command(name = "soundtrack")]
|
||||
#[command(about = "Generate a console-compatible soundtrack from a sequence file.")]
|
||||
#[command(about = "Generate a soundtrack targeting a console sound driver, from one or more tracker sequence files.")]
|
||||
Soundtrack {
|
||||
/// Input filename(s)
|
||||
#[arg(short, long)]
|
||||
input_file: Vec<String>,
|
||||
input_files: Vec<String>,
|
||||
|
||||
/// Output directory
|
||||
#[arg(short, long, default_value_t=String::from("./"))]
|
||||
output_directory: String,
|
||||
|
||||
/// Input sequence file format (the kind of tracker used to compose the track)
|
||||
/// Input sequence file format (the tracker used to compose the track)
|
||||
#[arg(long, value_enum, default_value_t=SequenceFormat::Dmf)]
|
||||
input_format: SequenceFormat,
|
||||
|
||||
|
|
Loading…
Reference in New Issue