Prepare for simple TIM conversion
This commit is contained in:
parent
f65b19cdff
commit
9b7f1adb4c
|
@ -7,6 +7,6 @@ test_cpp_out: always
|
||||||
|
|
||||||
test_jaby_engine_fconv: always
|
test_jaby_engine_fconv: always
|
||||||
@cargo build --manifest-path ../jaby_engine_fconv/Cargo.toml --release
|
@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: ;
|
always: ;
|
|
@ -0,0 +1 @@
|
||||||
|
pub mod reduced_tim;
|
|
@ -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!");
|
||||||
|
}
|
|
@ -1,8 +1 @@
|
||||||
#[cfg(test)]
|
pub mod images;
|
||||||
mod tests {
|
|
||||||
#[test]
|
|
||||||
fn it_works() {
|
|
||||||
let result = 2 + 2;
|
|
||||||
assert_eq!(result, 4);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +1,28 @@
|
||||||
fn main() {
|
use jaby_engine_fconv::images::{*};
|
||||||
println!("Blubb!");
|
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() {
|
||||||
|
match CommandLine::try_parse() {
|
||||||
|
Ok(_cmd) => println!("Planschbecken"),
|
||||||
|
Err(error) => println!("{}", error.to_string())
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue