diff --git a/doc/Screenshot from 2023-09-07 19-15-04.png b/doc/Screenshot from 2023-09-07 19-15-04.png new file mode 100644 index 0000000..4b22d7b Binary files /dev/null and b/doc/Screenshot from 2023-09-07 19-15-04.png differ diff --git a/doc/Screenshot from 2023-09-07 19-15-08.png b/doc/Screenshot from 2023-09-07 19-15-08.png new file mode 100644 index 0000000..d2761bc Binary files /dev/null and b/doc/Screenshot from 2023-09-07 19-15-08.png differ diff --git a/doc/Screenshot from 2023-09-07 19-15-15.png b/doc/Screenshot from 2023-09-07 19-15-15.png new file mode 100644 index 0000000..ecdaace Binary files /dev/null and b/doc/Screenshot from 2023-09-07 19-15-15.png differ diff --git a/src/reskit/cli/evaluator.rs b/src/reskit/cli/evaluator.rs index 2458394..bc6c7c2 100644 --- a/src/reskit/cli/evaluator.rs +++ b/src/reskit/cli/evaluator.rs @@ -1,6 +1,6 @@ use std::{error::Error, fs::File, io::Write, path::Path}; use clap::Parser; -use crate::reskit::{tileset, soundtrack::{formats::dmf::DmfModule, engines::echo::engine::{EchoFormat, EchoArtifact}}, utility::print_good}; +use crate::reskit::{tileset, soundtrack::{formats::dmf::DmfModule, engines::echo::engine::{EchoFormat, EchoArtifact}}, utility::{print_good, print_error}}; use super::settings::{Args, Tools, TileOutputFormat, TileOrder}; pub fn run_command() -> Result<(), Box> { @@ -65,6 +65,10 @@ pub fn run_command() -> Result<(), Box> { print_good( "all files converted successfully" ); } + Tools::Level { input_file, configuration_file, console, tile_size } => { + + print_error( "unimplemented" ); + } }; Ok( () ) diff --git a/src/reskit/cli/settings.rs b/src/reskit/cli/settings.rs index 7b5819d..c185a69 100644 --- a/src/reskit/cli/settings.rs +++ b/src/reskit/cli/settings.rs @@ -38,6 +38,11 @@ pub enum ArtifactListFormat { Asmx } +#[derive(Clone, ValueEnum)] +pub enum SystemType { + Md +} + #[derive(Subcommand)] pub enum Tools { @@ -91,5 +96,25 @@ pub enum Tools { /// Directory to output artifacts (instruments and samples) #[arg(long, default_value_t=String::from( "./" ))] artifact_output_directory: String + }, + + #[command(name = "level")] + #[command(about = "Generate a level containing a tilemap and defining an entity-component system, from a selected Tiled Map Editor .tmx file.")] + Level { + /// Input filename + #[arg(short, long)] + input_file: String, + + /// Configuration file (TOML, see doc) + #[arg(short, long)] + configuration_file: String, + + /// Console system type + #[arg(short, long, value_enum, default_value_t=SystemType::Md)] + console: SystemType, + + /// Tile Size ("WxH" format) + #[arg(long, default_value_t=String::from( "2x2" ))] + tile_size: String } } \ No newline at end of file