mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/block/logic.rs')
-rw-r--r--src/block/logic.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/block/logic.rs b/src/block/logic.rs
index 769e639..a099765 100644
--- a/src/block/logic.rs
+++ b/src/block/logic.rs
@@ -152,8 +152,9 @@ impl BlockLogic for CanvasBlock {
Scale::Eigth => 1,
};
let mut img = Image::alloc(p.width(), p.height());
- for ([r, g, b], &y) in img.buffer.array_chunks_mut::<3>().zip(p.buffer.iter()) {
+ for ([r, g, b, a], &y) in img.chunked_mut().zip(p.buffer.iter()) {
(*r, *g, *b) = PALETTE[y as usize];
+ *a = 255;
}
let img = img.as_mut().scale((s * self.size as u32) - offset * 2);
let mut borders = load!("canvas", s);