mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-11-26 23:51:57 +00:00
Tidying
This commit is contained in:
parent
15a8311081
commit
30c5b7467f
@ -58,7 +58,7 @@ public abstract class HiResImage extends AbstractFile
|
||||
if (auxType == 1)
|
||||
{
|
||||
unpackedBuffer = unpackBytes (buffer);
|
||||
makeScreen2 (unpackedBuffer);
|
||||
makeScreen (unpackedBuffer);
|
||||
System.out.println ("aux 1 - " + name);
|
||||
}
|
||||
|
||||
@ -192,21 +192,8 @@ public abstract class HiResImage extends AbstractFile
|
||||
return text.toString ();
|
||||
}
|
||||
|
||||
protected void makeScreen2 (byte[] buffer)
|
||||
protected void makeScreen (byte[] buffer)
|
||||
{
|
||||
// System.out.println (HexFormatter.format (buffer, 32000, 640));
|
||||
// for (int table = 0; table < 200; table++)
|
||||
// {
|
||||
// System.out.println (HexFormatter.format (buffer, ptr, 32));
|
||||
// for (int color = 0; color < 16; color++)
|
||||
// {
|
||||
// int red = buffer[ptr++] & 0x0F;
|
||||
// int green = (buffer[ptr] & 0xF0) >> 4;
|
||||
// int blue = buffer[ptr++] & 0x0F;
|
||||
// Color c = new Color (red, green, blue);
|
||||
// }
|
||||
// }
|
||||
|
||||
image = new BufferedImage (320, 200, BufferedImage.TYPE_BYTE_GRAY);
|
||||
DataBuffer db = image.getRaster ().getDataBuffer ();
|
||||
|
||||
|
@ -81,6 +81,7 @@ class ProdosCatalogSector extends AbstractSector
|
||||
{
|
||||
StringBuilder text = new StringBuilder ();
|
||||
int fileType = buffer[offset + 16] & 0xFF;
|
||||
int auxType = HexFormatter.getShort (buffer, offset + 31);
|
||||
addText (text, buffer, offset + 16, 1,
|
||||
"File type (" + ProdosConstants.fileTypes[fileType] + ")");
|
||||
addTextAndDecimal (text, buffer, offset + 17, 2, "Key pointer");
|
||||
@ -93,7 +94,7 @@ class ProdosCatalogSector extends AbstractSector
|
||||
addText (text, buffer, offset + 29, 1, "Minimum version");
|
||||
addText (text, buffer, offset + 30, 1, "Access");
|
||||
addTextAndDecimal (text, buffer, offset + 31, 2,
|
||||
"Auxilliary type - " + getAuxilliaryText (fileType));
|
||||
"Auxilliary type - " + getAuxilliaryText (fileType, auxType));
|
||||
GregorianCalendar modified = HexFormatter.getAppleDate (buffer, offset + 33);
|
||||
String dateM = modified == null ? "" : parent.df.format (modified.getTime ());
|
||||
addText (text, buffer, offset + 33, 4, "Modification date : " + dateM);
|
||||
@ -140,7 +141,7 @@ class ProdosCatalogSector extends AbstractSector
|
||||
return text.toString ();
|
||||
}
|
||||
|
||||
private String getAuxilliaryText (int fileType)
|
||||
private String getAuxilliaryText (int fileType, int auxType)
|
||||
{
|
||||
switch (fileType)
|
||||
{
|
||||
@ -154,6 +155,11 @@ class ProdosCatalogSector extends AbstractSector
|
||||
return "load address";
|
||||
case 0xB3:
|
||||
return "forked";
|
||||
case 0xC1:
|
||||
return "PIC";
|
||||
case 0xC8:
|
||||
return auxType == 0 ? "QuickDraw bitmap font"
|
||||
: auxType == 1 ? "Pointless truetype font" : "??";
|
||||
default:
|
||||
return "???";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user