Run clut code
This commit is contained in:
parent
b5ee0786d2
commit
7b18faabe3
|
@ -5,6 +5,6 @@ test_cpp_out: always
|
||||||
@echo "Planschbecken" | ./../cpp_out/target/x86_64-unknown-linux-musl/release/cpp_out --name Dino -o "Test_Planschbecken.hpp"
|
@echo "Planschbecken" | ./../cpp_out/target/x86_64-unknown-linux-musl/release/cpp_out --name Dino -o "Test_Planschbecken.hpp"
|
||||||
|
|
||||||
test_jaby_engine_fconv: always
|
test_jaby_engine_fconv: always
|
||||||
@./../jaby_engine_fconv/target/x86_64-unknown-linux-musl/release/jaby_engine_fconv -o Test_Planschi.bin Test_PNG.PNG simple-tim full16
|
# @./../jaby_engine_fconv/target/x86_64-unknown-linux-musl/release/jaby_engine_fconv -o Test_Planschi.bin Test_PNG.PNG simple-tim full16
|
||||||
|
@./../jaby_engine_fconv/target/x86_64-unknown-linux-musl/release/jaby_engine_fconv -o Test_Planschi.bin Test_PNG_pal.PNG simple-tim clut8
|
||||||
always: ;
|
always: ;
|
|
@ -9,4 +9,5 @@ edition = "2021"
|
||||||
clap = {version = "*", features = ["derive"]}
|
clap = {version = "*", features = ["derive"]}
|
||||||
image = "*"
|
image = "*"
|
||||||
paste = "*"
|
paste = "*"
|
||||||
|
png = "*"
|
||||||
tool_helper = {path = "../tool_helper"}
|
tool_helper = {path = "../tool_helper"}
|
|
@ -9,7 +9,7 @@ mod types;
|
||||||
mod color_full16;
|
mod color_full16;
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
|
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
|
||||||
pub enum ColorDepth {
|
pub enum ColorType{
|
||||||
Clut4,
|
Clut4,
|
||||||
Clut8,
|
Clut8,
|
||||||
Full16,
|
Full16,
|
||||||
|
@ -18,7 +18,7 @@ pub enum ColorDepth {
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
pub struct Arguments {
|
pub struct Arguments {
|
||||||
#[clap(arg_enum, value_parser)]
|
#[clap(arg_enum, value_parser)]
|
||||||
color_depth: ColorDepth
|
color_depth: ColorType
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,9 +49,13 @@ fn convert_full16(input: Input, output: Output) -> Result<(), Error> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn convert_palette_based(_: Input, _: Output, _: ColorType) -> Result<(), Error> {
|
||||||
|
Err(Error::from_text("Not implemented yet".to_owned()))
|
||||||
|
}
|
||||||
|
|
||||||
pub fn convert(args: Arguments, input: Input, output: Output) -> Result<(), Error> {
|
pub fn convert(args: Arguments, input: Input, output: Output) -> Result<(), Error> {
|
||||||
match args.color_depth {
|
match args.color_depth {
|
||||||
ColorDepth::Full16 => convert_full16(input, output),
|
ColorType::Full16 => convert_full16(input, output),
|
||||||
_ => Err(Error::not_implemented("Converting anything else then full16")),
|
_ => convert_palette_based(input, output, args.color_depth),
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue