Skip to content

Commit dd83f92

Browse files
committed
fix bip vertical tiling
1 parent 99b0b37 commit dd83f92

File tree

1 file changed

+1
-1
lines changed
  • kidfile/src/image_formats

1 file changed

+1
-1
lines changed

kidfile/src/image_formats/bip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub const ENTRY_BIP: Decoder<Image> = Decoder {
4444
let mut dst_block_x_idx = 0;
4545
let mut dst_block_y_idx = 0;
4646
for _ in 0..tile_x_blocks * tile_y_blocks {
47-
let mut src_block_start = pixel_section + (src_block_y_idx * (512 * 32) + src_block_x_idx * 32) as usize;
47+
let mut src_block_start = pixel_section + (src_block_y_idx * (512 * 32) + 512 + src_block_x_idx * 32) as usize;
4848
let dst_y_start = tile_y + dst_block_y_idx * 30;
4949
for dst_y in dst_y_start..dst_y_start + 30 {
5050
if src_block_start + 30 >= bytes.len() {

0 commit comments

Comments
 (0)