From 9fd5ac3e0b9ef7a7a62459e48066cfff61994301 Mon Sep 17 00:00:00 2001 From: ne0ndrag0n Date: Tue, 16 Feb 2021 22:31:34 -0500 Subject: [PATCH] Fix bit shifting issue in converter --- src/reskit/tileset.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reskit/tileset.rs b/src/reskit/tileset.rs index 91e5acd..12980ed 100644 --- a/src/reskit/tileset.rs +++ b/src/reskit/tileset.rs @@ -56,7 +56,7 @@ pub fn generate( image_filename: &str, output_filename: &str ) { let mut series: u32 = 0; for cell_x in 0..8 { - let nibble = get_pixel( &img, &mut palette, cell_x + x, cell_y + y ) << ( 7 - cell_x ); + let nibble: u32 = get_pixel( &img, &mut palette, cell_x + x, cell_y + y ) << ( ( 7 - cell_x ) * 4 ); series = series | nibble; }