mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-27 08:29:31 +00:00
tidying
This commit is contained in:
parent
735f90ca7c
commit
3f52d2c71c
|
@ -130,10 +130,8 @@ public class SHRPictureFile1 extends HiResImage
|
||||||
// System.out.println ("fillmode " + fillMode);
|
// System.out.println ("fillmode " + fillMode);
|
||||||
|
|
||||||
// 320 mode
|
// 320 mode
|
||||||
// if (mainBlock.pixelsPerScanLine == 320)
|
|
||||||
if (mainBlock.scbMode == 0)
|
if (mainBlock.scbMode == 0)
|
||||||
{
|
{
|
||||||
// int max = mainBlock.pixelsPerScanLine / 2;
|
|
||||||
int max = mainBlock.unpackedSize[line];
|
int max = mainBlock.unpackedSize[line];
|
||||||
for (int i = 0; i < max; i++) // two pixels per col
|
for (int i = 0; i < max; i++) // two pixels per col
|
||||||
{
|
{
|
||||||
|
@ -161,9 +159,8 @@ public class SHRPictureFile1 extends HiResImage
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// int max = mainBlock.pixelsPerScanLine / 4;
|
|
||||||
int max = mainBlock.unpackedSize[line];
|
int max = mainBlock.unpackedSize[line];
|
||||||
for (int col = 0; col < max; col++) // four pixels per col
|
for (int i = 0; i < max; i++) // four pixels per col
|
||||||
{
|
{
|
||||||
int p1 = (buffer[ptr] & 0xC0) >> 6;
|
int p1 = (buffer[ptr] & 0xC0) >> 6;
|
||||||
int p2 = (buffer[ptr] & 0x30) >> 4;
|
int p2 = (buffer[ptr] & 0x30) >> 4;
|
||||||
|
@ -401,9 +398,10 @@ public class SHRPictureFile1 extends HiResImage
|
||||||
text.append ("\nScan Lines\n");
|
text.append ("\nScan Lines\n");
|
||||||
text.append ("----------\n\n");
|
text.append ("----------\n\n");
|
||||||
|
|
||||||
text.append (" # Mode Len Packed Data\n");
|
text.append (" # Mode Len Packed Data "
|
||||||
|
+ " Unpack\n");
|
||||||
text.append ("--- ---- --- ---------------------------------------");
|
text.append ("--- ---- --- ---------------------------------------");
|
||||||
text.append ("------------------------------------------\n");
|
text.append ("-------------------------------- ------\n");
|
||||||
|
|
||||||
int lineSize = 24;
|
int lineSize = 24;
|
||||||
for (int i = 0; i < scanLineDirectory.length; i++)
|
for (int i = 0; i < scanLineDirectory.length; i++)
|
||||||
|
@ -415,7 +413,15 @@ public class SHRPictureFile1 extends HiResImage
|
||||||
int ptr = 0;
|
int ptr = 0;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
text.append (HexFormatter.getHexString (packedScanLine, ptr, lineSize));
|
String hex = HexFormatter.getHexString (packedScanLine, ptr, lineSize);
|
||||||
|
text.append (hex);
|
||||||
|
if (ptr == 0)
|
||||||
|
{
|
||||||
|
if (hex.length () < 71)
|
||||||
|
text.append ((" "
|
||||||
|
+ " ").substring (hex.length ()));
|
||||||
|
text.append (String.format (" %5d", unpackedSize[i]));
|
||||||
|
}
|
||||||
ptr += lineSize;
|
ptr += lineSize;
|
||||||
if (ptr >= packedScanLine.length)
|
if (ptr >= packedScanLine.length)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user