Added support for Super Hires images compressed with the Apple IIGS

PackBytes routine. Also added fudge - apparantly some compressed
images were only 32767 bytes in length, and AppleCommander assumes
that the image buffer was at least 32768 bytes in length.
This commit is contained in:
Robert Greene 2003-01-09 04:47:35 +00:00
parent f6e9d4556e
commit ac4f1cde3d
1 changed files with 8 additions and 0 deletions

View File

@ -126,6 +126,14 @@ public class GraphicsFileFilter implements FileFilter {
return new byte[0];
}
if (isSuperHiresMode()) {
if (fileData.length < 32767) { // leaves 1 byte of leeway
fileData = AppleUtil.unpackBytes(fileData);
if (fileData.length == 32767) {
byte[] data = new byte[32768];
System.arraycopy(fileData, 0, data, 0, fileData.length);
fileData = data;
}
}
int base = 0;
byte[] pallettes = new byte[0x200];
System.arraycopy(fileData, 0x7e00, pallettes, 0, pallettes.length);