Skip to content

Commit

Permalink
fix: split single sheet height (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgardt authored May 28, 2024
1 parent f9bad43 commit 0886497
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spritter"
version = "0.8.0"
version = "0.8.1"
edition = "2021"
authors = ["fgardt <[email protected]>"]
description = "Spritesheet generator for factorio"
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,8 @@ fn generate_subframe_sheets(
.iter()
.map(|(frags, (width, height), (shift_x, shift_y))| {
let cols = MAX_SIZE / width;
let rows = MAX_SIZE / height;
let sheet_width = cols * width;
let rows = sprite_count.div_ceil(cols);
let sheet_height = rows * height;

let mut sheet = RgbaImage::new(sheet_width, sheet_height);
Expand Down

0 comments on commit 0886497

Please sign in to comment.