From ceb1b97df805f4b98849f69ea0fc142ed32eab53 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Sat, 5 Jun 2021 18:13:03 +0100 Subject: [PATCH] Use image-converter 0.2.0 --- agb/Cargo.lock | 51 ++++++++++++++++++++++++++++++++++++++++++++++++-- agb/Cargo.toml | 2 +- agb/build.rs | 15 +++++++++------ 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/agb/Cargo.lock b/agb/Cargo.lock index 445bfdcc..158e7f32 100644 --- a/agb/Cargo.lock +++ b/agb/Cargo.lock @@ -24,11 +24,12 @@ dependencies = [ [[package]] name = "agb_image_converter" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab261de170c3f5be38d278b4086bdf7aa29397b6522a0a9ba6fafc8795ed0a0d" +checksum = "ca794e5a063a7031862a2726fd48dd91f5faf5be579f58a83d7fa6f9d24e9663" dependencies = [ "image", + "typed-builder", ] [[package]] @@ -287,6 +288,24 @@ dependencies = [ "miniz_oxide 0.3.7", ] +[[package]] +name = "proc-macro2" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + [[package]] name = "rayon" version = "1.5.0" @@ -324,6 +343,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "syn" +version = "1.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + [[package]] name = "tiff" version = "0.6.1" @@ -335,6 +365,23 @@ dependencies = [ "weezl", ] +[[package]] +name = "typed-builder" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345426c7406aa355b60c5007c79a2d1f5b605540072795222f17f6443e6a9c6f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + [[package]] name = "weezl" version = "0.1.5" diff --git a/agb/Cargo.toml b/agb/Cargo.toml index 671c1a3e..2e625c17 100644 --- a/agb/Cargo.toml +++ b/agb/Cargo.toml @@ -21,7 +21,7 @@ lto = true bitflags = "1.0" [build-dependencies] -agb_image_converter = "0.1.0" +agb_image_converter = "0.2.0" [package.metadata.docs.rs] default-target = "thumbv6m-none-eabi" diff --git a/agb/build.rs b/agb/build.rs index 360dfae0..071b4389 100644 --- a/agb/build.rs +++ b/agb/build.rs @@ -24,10 +24,13 @@ fn main() { println!("cargo:rustc-link-search={}", out_dir); - convert_image(&ImageConverterConfig { - transparent_colour: Some(Colour::from_rgb(1, 1, 1)), - tile_size: TileSize::Tile8, - input_image: "gfx/test_logo.png".into(), - output_file: format!("{}/test_logo.rs", out_dir).into(), - }); + convert_image( + ImageConverterConfig::builder() + .transparent_colour(Colour::from_rgb(1, 1, 1)) + .tile_size(TileSize::Tile8) + .input_image("gfx/test_logo.png".into()) + .output_file(format!("{}/test_logo.rs", out_dir).into()) + .crate_prefix("crate".to_owned()) + .build(), + ); }