diff --git a/src/io/github/norbipeti/audiospectrum/BarsRenderer.java b/src/io/github/norbipeti/audiospectrum/BarsRenderer.java index 1b01869..519153c 100644 --- a/src/io/github/norbipeti/audiospectrum/BarsRenderer.java +++ b/src/io/github/norbipeti/audiospectrum/BarsRenderer.java @@ -18,9 +18,10 @@ public class BarsRenderer extends MapRenderer { //Width: 16, empty space: 16, count per map: 8 int offsetx = mv.getId() % 2 * 8, offsety = mv.getId() < 2 ? -128 : 0; //System.out.println("OX: " + offsetx + " OY: " + offsety + " ID: " + mv.getId()); - for (int i = offsetx; i < offsetx + 8; i++) - for (int j = 0; j < bars[i] + offsety; j++) + for (int i = 0; i < 8; i++) + for (int j = 0; j < 128; j++) for (int k = 0; k < 16; k++) - mc.setPixel(i * 32 + k, 128 - j, MapPalette.matchColor(255 - j + offsety, j - offsety, 0)); //TODO: Fix - } + mc.setPixel(i * 32 + k, 128 - j, j < bars[offsetx + i] + offsety + ? MapPalette.matchColor(255 - j + offsety, j - offsety, 0) : 0); //TODO: 0 is transparent + } //TODO: Render areas inbetween black }