From 6b149c1e31c087f52ff877837a7ff44f088f4591 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Thu, 17 Nov 2022 21:18:54 +0000 Subject: [PATCH] Fix spelling errors in agb-image-converter --- agb-image-converter/src/config.rs | 4 ++-- agb-image-converter/src/lib.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/agb-image-converter/src/config.rs b/agb-image-converter/src/config.rs index 7379a6d5..826b9e67 100644 --- a/agb-image-converter/src/config.rs +++ b/agb-image-converter/src/config.rs @@ -28,7 +28,7 @@ pub(crate) trait Config { pub(crate) trait Image { fn filename(&self) -> String; - fn tilesize(&self) -> TileSize; + fn tile_size(&self) -> TileSize; fn colours(&self) -> Colours; } @@ -84,7 +84,7 @@ impl Image for ImageV1 { self.filename.clone() } - fn tilesize(&self) -> TileSize { + fn tile_size(&self) -> TileSize { self.tile_size.into() } diff --git a/agb-image-converter/src/lib.rs b/agb-image-converter/src/lib.rs index 39ae0a92..a70b801c 100644 --- a/agb-image-converter/src/lib.rs +++ b/agb-image-converter/src/lib.rs @@ -84,7 +84,7 @@ pub fn include_gfx(input: TokenStream) -> TokenStream { match settings.colours() { Colours::Colours16 => { - let tile_size = settings.tilesize().to_size(); + let tile_size = settings.tile_size().to_size(); if image.width % tile_size != 0 || image.height % tile_size != 0 { panic!("Image size not a multiple of tile size"); } @@ -96,7 +96,7 @@ pub fn include_gfx(input: TokenStream) -> TokenStream { config.transparent_colour(), ); - let num_tiles = image.width * image.height / settings.tilesize().to_size().pow(2); + let num_tiles = image.width * image.height / settings.tile_size().to_size().pow(2); assignment_offsets.insert(name, assignment_offset); assignment_offset += num_tiles; } @@ -183,7 +183,7 @@ pub fn include_aseprite_inner(input: TokenStream) -> TokenStream { let height = frame.height(); assert!( valid_sprite_size(width, height), - "File {} contains sprites with unrepresentable size {}x{}", + "File {} contains sprites with size {}x{} which cannot be represented on the GameBoy Advance", filename.display(), width, height @@ -290,7 +290,7 @@ fn convert_image( optimisation_results, &image, &image_filename.to_string_lossy(), - settings.tilesize(), + settings.tile_size(), crate_prefix.to_owned(), assignment_offset, )