equal
deleted
inserted
replaced
53 |
53 |
54 for (path, sprite_index) in lookup.drain(..) { |
54 for (path, sprite_index) in lookup.drain(..) { |
55 if let Some((atlas_index, rect)) = atlas.get_rect(sprite_index) { |
55 if let Some((atlas_index, rect)) = atlas.get_rect(sprite_index) { |
56 let size = load_sprite_pixels(&path, mapgen::theme::slice_u32_to_u8_mut(&mut pixels[..])).expect("Unable to load Graphics"); |
56 let size = load_sprite_pixels(&path, mapgen::theme::slice_u32_to_u8_mut(&mut pixels[..])).expect("Unable to load Graphics"); |
57 |
57 |
58 let used_pixels = if size.width == rect.width() { |
58 let used_pixels = if size.width != rect.width() { |
59 for y in 0..rect.height() { |
59 for y in 0..rect.height() { |
60 for x in 0..rect.width() { |
60 for x in 0..rect.width() { |
61 pixels_transposed[y * rect.width() + x] = pixels[x * rect.height() + y]; |
61 pixels_transposed[y * rect.width() + x] = pixels[x * rect.height() + y]; |
62 } |
62 } |
63 } |
63 } |