Fixed mod alpha bleeding not applying correctly
This commit is contained in:
@@ -912,12 +912,17 @@ public class Block extends UnlockableContent{
|
||||
for(int x = 0; x < base.width; x++){
|
||||
for(int y = 0; y < base.height; y++){
|
||||
int color = base.get(x, y);
|
||||
int index = color == 0xffffffff ? 0 : color == 0xdcc6c6ff ? 1 : color == 0x9d7f7fff ? 2 : -1;
|
||||
int index = switch(color){
|
||||
case 0xffffffff -> 0;
|
||||
case 0xdcc6c6ff, 0xdbc5c5ff -> 1;
|
||||
case 0x9d7f7fff, 0x9e8080ff -> 2;
|
||||
default -> -1;
|
||||
};
|
||||
out.setRaw(x, y, index == -1 ? base.get(x, y) : team.palettei[index]);
|
||||
}
|
||||
}
|
||||
|
||||
if(Core.settings.getBool("linear")){
|
||||
if(Core.settings.getBool("linear", true)){
|
||||
Pixmaps.bleed(out);
|
||||
}
|
||||
|
||||
@@ -938,7 +943,7 @@ public class Block extends UnlockableContent{
|
||||
if(outlineIcon){
|
||||
PixmapRegion region = Core.atlas.getPixmap(gen[outlinedIcon >= 0 ? outlinedIcon : gen.length -1]);
|
||||
Pixmap out = last = Pixmaps.outline(region, outlineColor, outlineRadius);
|
||||
if(Core.settings.getBool("linear")){
|
||||
if(Core.settings.getBool("linear", true)){
|
||||
Pixmaps.bleed(out);
|
||||
}
|
||||
packer.add(PageType.main, name, out);
|
||||
|
||||
Reference in New Issue
Block a user