Begin work on the level tool, add some documentation images
parent
cde4b36854
commit
264c2df1e8
Binary file not shown.
After Width: | Height: | Size: 391 KiB |
Binary file not shown.
After Width: | Height: | Size: 383 KiB |
Binary file not shown.
After Width: | Height: | Size: 415 KiB |
|
@ -1,6 +1,6 @@
|
||||||
use std::{error::Error, fs::File, io::Write, path::Path};
|
use std::{error::Error, fs::File, io::Write, path::Path};
|
||||||
use clap::Parser;
|
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};
|
use super::settings::{Args, Tools, TileOutputFormat, TileOrder};
|
||||||
|
|
||||||
pub fn run_command() -> Result<(), Box<dyn Error>> {
|
pub fn run_command() -> Result<(), Box<dyn Error>> {
|
||||||
|
@ -65,6 +65,10 @@ pub fn run_command() -> Result<(), Box<dyn Error>> {
|
||||||
|
|
||||||
print_good( "all files converted successfully" );
|
print_good( "all files converted successfully" );
|
||||||
}
|
}
|
||||||
|
Tools::Level { input_file, configuration_file, console, tile_size } => {
|
||||||
|
|
||||||
|
print_error( "unimplemented" );
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok( () )
|
Ok( () )
|
||||||
|
|
|
@ -38,6 +38,11 @@ pub enum ArtifactListFormat {
|
||||||
Asmx
|
Asmx
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, ValueEnum)]
|
||||||
|
pub enum SystemType {
|
||||||
|
Md
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Subcommand)]
|
#[derive(Subcommand)]
|
||||||
pub enum Tools {
|
pub enum Tools {
|
||||||
|
|
||||||
|
@ -91,5 +96,25 @@ pub enum Tools {
|
||||||
/// Directory to output artifacts (instruments and samples)
|
/// Directory to output artifacts (instruments and samples)
|
||||||
#[arg(long, default_value_t=String::from( "./" ))]
|
#[arg(long, default_value_t=String::from( "./" ))]
|
||||||
artifact_output_directory: String
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue