mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Fix spelling errors in agb-image-converter
This commit is contained in:
parent
648a544ea8
commit
6b149c1e31
|
@ -28,7 +28,7 @@ pub(crate) trait Config {
|
||||||
|
|
||||||
pub(crate) trait Image {
|
pub(crate) trait Image {
|
||||||
fn filename(&self) -> String;
|
fn filename(&self) -> String;
|
||||||
fn tilesize(&self) -> TileSize;
|
fn tile_size(&self) -> TileSize;
|
||||||
fn colours(&self) -> Colours;
|
fn colours(&self) -> Colours;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ impl Image for ImageV1 {
|
||||||
self.filename.clone()
|
self.filename.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn tilesize(&self) -> TileSize {
|
fn tile_size(&self) -> TileSize {
|
||||||
self.tile_size.into()
|
self.tile_size.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ pub fn include_gfx(input: TokenStream) -> TokenStream {
|
||||||
|
|
||||||
match settings.colours() {
|
match settings.colours() {
|
||||||
Colours::Colours16 => {
|
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 {
|
if image.width % tile_size != 0 || image.height % tile_size != 0 {
|
||||||
panic!("Image size not a multiple of tile size");
|
panic!("Image size not a multiple of tile size");
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ pub fn include_gfx(input: TokenStream) -> TokenStream {
|
||||||
config.transparent_colour(),
|
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_offsets.insert(name, assignment_offset);
|
||||||
assignment_offset += num_tiles;
|
assignment_offset += num_tiles;
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ pub fn include_aseprite_inner(input: TokenStream) -> TokenStream {
|
||||||
let height = frame.height();
|
let height = frame.height();
|
||||||
assert!(
|
assert!(
|
||||||
valid_sprite_size(width, height),
|
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(),
|
filename.display(),
|
||||||
width,
|
width,
|
||||||
height
|
height
|
||||||
|
@ -290,7 +290,7 @@ fn convert_image(
|
||||||
optimisation_results,
|
optimisation_results,
|
||||||
&image,
|
&image,
|
||||||
&image_filename.to_string_lossy(),
|
&image_filename.to_string_lossy(),
|
||||||
settings.tilesize(),
|
settings.tile_size(),
|
||||||
crate_prefix.to_owned(),
|
crate_prefix.to_owned(),
|
||||||
assignment_offset,
|
assignment_offset,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue