Fixes, IT WORKS ...for two bars

This commit is contained in:
Norbi Peti 2017-11-08 22:09:50 +01:00
parent f410469b61
commit f9832eb554

View file

@ -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
}