Prepare for simple TIM conversion

This commit is contained in:
jaby 2022-09-17 17:12:53 +02:00
parent 7adbce5776
commit 03c2379721
5 changed files with 48 additions and 10 deletions

View File

@ -7,6 +7,6 @@ test_cpp_out: always
test_jaby_engine_fconv: always
@cargo build --manifest-path ../jaby_engine_fconv/Cargo.toml --release
@./../jaby_engine_fconv/target/release/jaby_engine_fconv
@./../jaby_engine_fconv/target/release/jaby_engine_fconv --help
always: ;

View File

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

View File

@ -0,0 +1,19 @@
use clap::{Args, ValueEnum};
use tool_helper::{Input, Output};
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
pub enum ColorDepth {
Clut4,
Clut8,
Full16,
}
#[derive(Args)]
pub struct Arguments {
#[clap(arg_enum, value_parser)]
color_depth: ColorDepth
}
pub fn convert(_input: Input, _output: Output) {
println!("Bin ein Planschbecken!");
}

View File

@ -1,8 +1 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}
pub mod images;

View File

@ -1,3 +1,28 @@
use jaby_engine_fconv::images::{*};
use clap::{Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser)]
#[clap(about = "Converts files to various JabyEngine related file formats", long_about = None)]
struct CommandLine {
#[clap(short='o')]
output_file: Option<PathBuf>,
#[clap(value_parser)]
input_file: Option<PathBuf>,
#[clap(subcommand)]
sub_command: SubCommands,
}
#[derive(Subcommand)]
enum SubCommands {
SimpleTIM(reduced_tim::Arguments)
}
fn main() {
println!("Blubb!");
match CommandLine::try_parse() {
Ok(_cmd) => println!("Planschbecken"),
Err(error) => println!("{}", error.to_string())
}
}