First of all, thank you for porting this to java - we’re now using DXT for most of the Tribal Trouble textures. However, I think decompressing DXT in jsquish is broken, since ColourBlock.unpack565() doesn’t account for the byte sign properly. I’ve changed unpack565 to:
private static int unpack565(final byte[] packed, final int pOffset, final int[] colour, final int cOffset) {
int b1 = packed[pOffset + 0 + cOffset * 2] & 0xff;
int b2 = packed[pOffset + 1 + cOffset * 2] & 0xff;
// build the packed value
int value = b1 | b2 << 8;
// get the components in the stored range
int red = (value >> 11) & 0x1f;
int green = (value >> 5) & 0x3f;
int blue = value & 0x1f;
// scale up to 8 bits
colour[0 + cOffset * 4] = (red << 3) | (red >> 2);
colour[1 + cOffset * 4] = (green << 2) | (green >> 4);
colour[2 + cOffset * 4] = (blue << 3) | (blue >> 2);
colour[3 + cOffset * 4] = 255;
// return the value
return value & 0xffff;
}
(adding masking to the two halves of the 565 color) which seems to fix this.