removed many code warnings

This commit is contained in:
Denis Molony 2018-04-26 06:41:03 +10:00
parent 058da1da91
commit c22dd51ef8
26 changed files with 121 additions and 114 deletions

View File

@ -12,7 +12,7 @@ public class BasicProgram extends AbstractFile
{ {
private static final byte ASCII_QUOTE = 0x22; private static final byte ASCII_QUOTE = 0x22;
private static final byte ASCII_COLON = 0x3A; private static final byte ASCII_COLON = 0x3A;
private static final byte ASCII_SEMI_COLON = 0x3B; // private static final byte ASCII_SEMI_COLON = 0x3B;
private static final byte ASCII_CARET = 0x5E; private static final byte ASCII_CARET = 0x5E;
private static final byte TOKEN_FOR = (byte) 0x81; private static final byte TOKEN_FOR = (byte) 0x81;

View File

@ -26,6 +26,7 @@ public class DeviceDriver extends AbstractFile
text.append (String.format ("Classifications ... %02X%n", classifications)); text.append (String.format ("Classifications ... %02X%n", classifications));
text.append (String.format ("Driver Class ...... %02X%n", driverClass)); text.append (String.format ("Driver Class ...... %02X%n", driverClass));
text.append (String.format ("Aux type .......... %d%n", auxType));
text.append (String.format ("Inactive .......... %s%n", inactive ? "True" : "False")); text.append (String.format ("Inactive .......... %s%n", inactive ? "True" : "False"));
text.deleteCharAt (text.length () - 1); text.deleteCharAt (text.length () - 1);

View File

@ -25,7 +25,7 @@ public class DoubleScrunch extends CPU
final byte[][] memory = new byte[2][0x2000]; final byte[][] memory = new byte[2][0x2000];
private byte[] packedBuffer; private byte[] packedBuffer;
private final boolean debug = false; // private final boolean debug = false;
private int count; private int count;
private final int[] rows = new int[192]; private final int[] rows = new int[192];
private int ptr; private int ptr;

View File

@ -12,8 +12,7 @@ import com.bytezone.diskbrowser.utilities.HexFormatter;
public class IconFile extends AbstractFile public class IconFile extends AbstractFile
{ {
private static Palette palette = new Palette ("Virtual II", private static Palette palette = new Palette ("Virtual II", new int[] { 0x000000, // 0 black
new int[] { 0x000000, // 0 black
0xDD0033, // 1 magenta 0xDD0033, // 1 magenta
0x885500, // 2 brown (8) 0x885500, // 2 brown (8)
0xFF6600, // 3 orange (9) 0xFF6600, // 3 orange (9)
@ -213,7 +212,7 @@ public class IconFile extends AbstractFile
System.arraycopy (buffer, ptr + 8 + iconSize, iconMask, 0, iconSize); System.arraycopy (buffer, ptr + 8 + iconSize, iconMask, 0, iconSize);
int[] colours = palette.getColours (); int[] colours = palette.getColours ();
int gap = 5; // int gap = 5;
image = new BufferedImage (iconWidth, iconHeight, BufferedImage.TYPE_INT_RGB); image = new BufferedImage (iconWidth, iconHeight, BufferedImage.TYPE_INT_RGB);

View File

@ -197,7 +197,7 @@ public class PascalSegment extends AbstractFile implements PascalConstants
private String getMultiDiskAddresses () private String getMultiDiskAddresses ()
{ {
String multiDiskAddressText = ""; String multiDiskAddressText = "";
int sizeInBlocks = (size - 1) / BLOCK_SIZE + 1; // int sizeInBlocks = (size - 1) / BLOCK_SIZE + 1;
// if (segmentNoHeader == 1) // main segment // if (segmentNoHeader == 1) // main segment
// { // {

View File

@ -189,9 +189,9 @@ public class QuickDrawFont extends AbstractFile
// how the character image to be drawn should be positioned with // how the character image to be drawn should be positioned with
// respect to the current pen location // respect to the current pen location
int offset = buffer[offsetWidthTableOffset + i * 2 + 1]; // int offset = buffer[offsetWidthTableOffset + i * 2 + 1];
// how far the pen should be advanced after the character is drawn // how far the pen should be advanced after the character is drawn
int width = buffer[offsetWidthTableOffset + i * 2] & 0xFF; // int width = buffer[offsetWidthTableOffset + i * 2] & 0xFF;
if (character != null) if (character != null)
g2d.drawImage (character.image, x, y, null); g2d.drawImage (character.image, x, y, null);

View File

@ -83,7 +83,7 @@ public class SHRPictureFile extends HiResImage
for (int row = 0; row < mainBlock.numScanLines; row++) for (int row = 0; row < mainBlock.numScanLines; row++)
{ {
DirEntry dirEntry = mainBlock.scanLineDirectory[row]; DirEntry dirEntry = mainBlock.scanLineDirectory[row];
int hi = dirEntry.mode & 0xFF00; // int hi = dirEntry.mode & 0xFF00;
int lo = dirEntry.mode & 0x00FF; int lo = dirEntry.mode & 0x00FF;
ColorTable colorTable = multipalBlock != null ? multipalBlock.colorTables[row] ColorTable colorTable = multipalBlock != null ? multipalBlock.colorTables[row]

View File

@ -27,15 +27,15 @@ public class WizardryTitle extends AbstractFile
return text.toString (); return text.toString ();
} }
private StringBuilder decode (int value, StringBuilder text) // private StringBuilder decode (int value, StringBuilder text)
{ // {
for (int bit = 0; bit < 8; bit++) // for (int bit = 0; bit < 8; bit++)
{ // {
text.append ((value & 0x01) == 1 ? "X" : " "); // text.append ((value & 0x01) == 1 ? "X" : " ");
value >>= 1; // value >>= 1;
} // }
return text; // return text;
} // }
private StringBuilder decode2 (int value, StringBuilder text) private StringBuilder decode2 (int value, StringBuilder text)
{ {

View File

@ -141,6 +141,7 @@ public class AppleworksADBFile extends AbstractFile
text.append (String.format ("Categories ......... %d%n", categories)); text.append (String.format ("Categories ......... %d%n", categories));
text.append (String.format ("Reports ............ %d%n", totalReports)); text.append (String.format ("Reports ............ %d%n", totalReports));
text.append (String.format ("Records ............ %d%n", totalRecords)); text.append (String.format ("Records ............ %d%n", totalRecords));
text.append (String.format ("Standard Record .... %s%n", standardRecord != null));
text.append (String.format ("Min version ........ %d%n", dbMinVersion)); text.append (String.format ("Min version ........ %d%n", dbMinVersion));
text.append (String.format ("1st Frozen col ..... %d%n", firstFrozenColumn)); text.append (String.format ("1st Frozen col ..... %d%n", firstFrozenColumn));
text.append (String.format ("Last Frozen col .... %d%n", lastFrozenColumn)); text.append (String.format ("Last Frozen col .... %d%n", lastFrozenColumn));

View File

@ -48,8 +48,9 @@ public class AppleworksWPFile extends AbstractFile
int textLen = b4 & 0x7F; int textLen = b4 & 0x7F;
boolean cr = (b4 & 0x80) != 0; boolean cr = (b4 & 0x80) != 0;
// System.out.printf ("%02X %02X %d %d %s %s%n", b3, b4, margin, textLen, if (false)
// containsTabs, cr); System.out.printf ("%02X %02X %d %d %s %s%n", b3, b4, lineMargin, textLen,
containsTabs, cr);
if (b3 == 0xFF) if (b3 == 0xFF)
text.append ("--------- Ruler ----------\n"); text.append ("--------- Ruler ----------\n");
else else
@ -137,6 +138,9 @@ public class AppleworksWPFile extends AbstractFile
} }
ptr += 2; ptr += 2;
} }
if (false)
System.out.printf ("", leftMargin, rightMargin, topMargin, bottomMargin,
paperLength, indent);
return text.toString (); return text.toString ();
} }
@ -182,6 +186,8 @@ public class AppleworksWPFile extends AbstractFile
text.append (String.format ("Mail merge ... %s %n", mailMerge)); text.append (String.format ("Mail merge ... %s %n", mailMerge));
text.append (String.format ("Left margin .. %d %n", leftMargin)); text.append (String.format ("Left margin .. %d %n", leftMargin));
text.append (String.format ("Min version .. %d %n", sfMinVers)); text.append (String.format ("Min version .. %d %n", sfMinVers));
text.append (String.format ("Mult rulers .. %s %n", multipleRulers));
text.append (String.format ("Paginated .... %s %n", paginated));
return text.toString (); return text.toString ();
} }

View File

@ -190,9 +190,7 @@ public class AppleDisk implements Disk
{ {
BufferedInputStream in = new BufferedInputStream (new FileInputStream (file)); BufferedInputStream in = new BufferedInputStream (new FileInputStream (file));
if (skip > 0) if (skip > 0)
{ in.skip (skip);
long result = in.skip (skip);
}
in.read (diskBuffer); in.read (diskBuffer);
in.close (); in.close ();
} }

View File

@ -580,7 +580,7 @@ public class DiskFactory
String fileName = file.getAbsolutePath ().toLowerCase (); String fileName = file.getAbsolutePath ().toLowerCase ();
int pos = file.getAbsolutePath ().indexOf ('.'); int pos = file.getAbsolutePath ().indexOf ('.');
char c = fileName.charAt (pos - 1); char c = fileName.charAt (pos - 1);
String suffix = fileName.substring (pos + 1); // String suffix = fileName.substring (pos + 1);
int requiredDisks = c == '1' ? 6 : c == 'a' ? 10 : 0; int requiredDisks = c == '1' ? 6 : c == 'a' ? 10 : 0;
if (requiredDisks > 0) if (requiredDisks > 0)

View File

@ -12,10 +12,10 @@ public class Nibblizer
{ { 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 }, { { 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 },
{ 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 } }; { 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 } };
private static final int DOS = 0; static final int DOS = 0;
private static final int PRODOS = 1; static final int PRODOS = 1;
private static final int BLOCK_SIZE = 256; static final int BLOCK_SIZE = 256;
private static final int TRACK_SIZE = 4096; static final int TRACK_SIZE = 4096;
private static final int RAW_BUFFER_SIZE = 342; private static final int RAW_BUFFER_SIZE = 342;
private static final int BUFFER_WITH_CHECKSUM_SIZE = RAW_BUFFER_SIZE + 1; private static final int BUFFER_WITH_CHECKSUM_SIZE = RAW_BUFFER_SIZE + 1;

View File

@ -32,12 +32,12 @@ import com.bytezone.diskbrowser.utilities.HexFormatter;
public class V2dDisk public class V2dDisk
{ {
private static int[][] interleave = // private static int[][] interleave =
{ { 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 }, // { { 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 },
{ 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 } }; // { 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 } };
private static final int DOS = 0; // private static final int DOS = 0;
private static final int PRODOS = 1; // private static final int PRODOS = 1;
private static final int TRACK_LENGTH = 6304; private static final int TRACK_LENGTH = 6304;

View File

@ -274,7 +274,7 @@ abstract class AbstractCatalogEntry implements AppleFileSource
byte[] exactBuffer; byte[] exactBuffer;
// int loadAddress = HexFormatter.intValue (buffer[0], buffer[1]); // int loadAddress = HexFormatter.intValue (buffer[0], buffer[1]);
int loadAddress = HexFormatter.unsignedShort (buffer, 0); // int loadAddress = HexFormatter.unsignedShort (buffer, 0);
// int reportedLength = HexFormatter.intValue (buffer[2], buffer[3]); // int reportedLength = HexFormatter.intValue (buffer[2], buffer[3]);
int reportedLength = HexFormatter.unsignedShort (buffer, 2); int reportedLength = HexFormatter.unsignedShort (buffer, 2);
if (reportedLength == 0) if (reportedLength == 0)

View File

@ -1,7 +1,7 @@
package com.bytezone.diskbrowser.gui; package com.bytezone.diskbrowser.gui;
import java.awt.Event;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
@ -25,13 +25,15 @@ class RedoHandler implements FileSelectionListener, DiskSelectionListener,
public RedoHandler (JRootPane jRootPane, JToolBar toolBar) public RedoHandler (JRootPane jRootPane, JToolBar toolBar)
{ {
// This code works as long as the toolBar arrows have focus first // This code works as long as the toolBar arrows have focus first
InputMap im = jRootPane.getInputMap (JComponent.WHEN_IN_FOCUSED_WINDOW); InputMap inputMap = jRootPane.getInputMap (JComponent.WHEN_IN_FOCUSED_WINDOW);
ActionMap am = jRootPane.getActionMap (); ActionMap actionMap = jRootPane.getActionMap ();
im.put (KeyStroke.getKeyStroke (KeyEvent.VK_LEFT, Event.ALT_MASK), "LeftAction"); inputMap.put (KeyStroke.getKeyStroke (KeyEvent.VK_LEFT, InputEvent.ALT_DOWN_MASK),
am.put ("LeftAction", leftAction); "LeftAction");
im.put (KeyStroke.getKeyStroke (KeyEvent.VK_RIGHT, Event.ALT_MASK), "RightAction"); actionMap.put ("LeftAction", leftAction);
am.put ("RightAction", rightAction); inputMap.put (KeyStroke.getKeyStroke (KeyEvent.VK_RIGHT, InputEvent.ALT_DOWN_MASK),
"RightAction");
actionMap.put ("RightAction", rightAction);
toolBar.add (leftAction); toolBar.add (leftAction);
toolBar.add (rightAction); toolBar.add (rightAction);

View File

@ -15,7 +15,7 @@ class Dictionary extends AbstractFile
private final int totalSeparators; private final int totalSeparators;
private final int dictionaryPtr, dictionarySize; private final int dictionaryPtr, dictionarySize;
private final int entryLength; private final int entryLength;
private final Header header; // private final Header header;
// this could be a Google Multimap // this could be a Google Multimap
Map<Integer, List<WordEntry>> synonymList = new TreeMap<Integer, List<WordEntry>> (); Map<Integer, List<WordEntry>> synonymList = new TreeMap<Integer, List<WordEntry>> ();
@ -23,7 +23,7 @@ class Dictionary extends AbstractFile
public Dictionary (Header header) public Dictionary (Header header)
{ {
super ("Dictionary", header.buffer); super ("Dictionary", header.buffer);
this.header = header; // this.header = header;
dictionaryPtr = header.dictionaryOffset; dictionaryPtr = header.dictionaryOffset;
dictionary = new TreeMap<Integer, ZString> (); dictionary = new TreeMap<Integer, ZString> ();
@ -142,8 +142,7 @@ class Dictionary extends AbstractFile
for (ZString word : dictionary.values ()) for (ZString word : dictionary.values ())
{ {
text.append (String text.append (String.format ("%04X %3d %-6s %s", ptr, count++, word.value,
.format ("%04X %3d %-6s %s", ptr, count++, word.value,
HexFormatter.getHexString (buffer, ptr + 4, entryLength - 4))); HexFormatter.getHexString (buffer, ptr + 4, entryLength - 4)));
int b1 = buffer[ptr + 4] & 0xFF; int b1 = buffer[ptr + 4] & 0xFF;
int b2 = buffer[ptr + 5] & 0xFF; int b2 = buffer[ptr + 5] & 0xFF;
@ -236,8 +235,7 @@ class Dictionary extends AbstractFile
StringBuilder text = new StringBuilder (); StringBuilder text = new StringBuilder ();
text.append (String.format ("%04X %3d %-6s %s %s %s", word.startPtr, seq, text.append (String.format ("%04X %3d %-6s %s %s %s", word.startPtr, seq,
word.value, bits, word.value, bits,
HexFormatter.getHexString (buffer, word.startPtr + 4, HexFormatter.getHexString (buffer, word.startPtr + 4, entryLength - 4),
entryLength - 4),
list.toString ())); list.toString ()));
return text.toString (); return text.toString ();
} }

View File

@ -9,7 +9,7 @@ class Header extends InfocomAbstractFile
final String[] propertyNames = new String[32]; final String[] propertyNames = new String[32];
private final File file; private final File file;
private final Disk disk; // private final Disk disk;
int version; int version;
int highMemory; int highMemory;
int programCounter; int programCounter;
@ -33,7 +33,7 @@ class Header extends InfocomAbstractFile
public Header (String name, byte[] buffer, Disk disk) public Header (String name, byte[] buffer, Disk disk)
{ {
super (name, buffer); super (name, buffer);
this.disk = disk; // this.disk = disk;
this.file = disk.getFile (); this.file = disk.getFile ();
version = getByte (0); version = getByte (0);

View File

@ -10,7 +10,7 @@ class Routine extends InfocomAbstractFile
private static final String padding = " "; private static final String padding = " ";
int startPtr, length, strings, locals; int startPtr, length, strings, locals;
private final Header header; // private final Header header;
List<Parameter> parameters = new ArrayList<Parameter> (); List<Parameter> parameters = new ArrayList<Parameter> ();
List<Instruction> instructions = new ArrayList<Instruction> (); List<Instruction> instructions = new ArrayList<Instruction> ();
@ -21,7 +21,7 @@ class Routine extends InfocomAbstractFile
public Routine (int ptr, Header header, int caller) public Routine (int ptr, Header header, int caller)
{ {
super (String.format ("Routine %05X", ptr), header.buffer); super (String.format ("Routine %05X", ptr), header.buffer);
this.header = header; // this.header = header;
locals = buffer[ptr] & 0xFF; locals = buffer[ptr] & 0xFF;
if (locals > 15) if (locals > 15)

View File

@ -24,7 +24,7 @@ class FileEntry extends CatalogEntry implements ProdosConstants
private final int endOfFile; private final int endOfFile;
private final int auxType; private final int auxType;
private final GregorianCalendar modified; private final GregorianCalendar modified;
private final int headerPointer; // private final int headerPointer;
private DataSource file; private DataSource file;
private final DiskAddress catalogBlock; private final DiskAddress catalogBlock;
private DiskAddress masterIndexBlock; private DiskAddress masterIndexBlock;
@ -47,7 +47,7 @@ class FileEntry extends CatalogEntry implements ProdosConstants
auxType = HexFormatter.unsignedShort (entryBuffer, 0x1F); auxType = HexFormatter.unsignedShort (entryBuffer, 0x1F);
modified = HexFormatter.getAppleDate (entryBuffer, 0x21); modified = HexFormatter.getAppleDate (entryBuffer, 0x21);
headerPointer = HexFormatter.unsignedShort (entryBuffer, 0x25); // headerPointer = HexFormatter.unsignedShort (entryBuffer, 0x25);
if (isGSOSFile ()) // I think this is wrong if (isGSOSFile ()) // I think this is wrong
System.out.printf ("************************************ %s is GS/OS%n", name); System.out.printf ("************************************ %s is GS/OS%n", name);
@ -110,7 +110,7 @@ class FileEntry extends CatalogEntry implements ProdosConstants
{ {
int storageType = buffer2[i] & 0x0F; int storageType = buffer2[i] & 0x0F;
int keyBlock = HexFormatter.unsignedShort (buffer2, i + 1); int keyBlock = HexFormatter.unsignedShort (buffer2, i + 1);
int eof = HexFormatter.intValue (buffer2[i + 3], buffer2[i + 4], buffer2[i + 5]); // int eof = HexFormatter.intValue (buffer2[i + 3], buffer2[i + 4], buffer2[i + 5]);
addDataBlocks (storageType, keyBlock); addDataBlocks (storageType, keyBlock);
} }
} }

View File

@ -27,7 +27,7 @@ class ProdosBitMapSector extends AbstractSector
// more than a single block // more than a single block
int relativeBlock = diskAddress.getBlock () - parent.vdh.bitMapBlock; int relativeBlock = diskAddress.getBlock () - parent.vdh.bitMapBlock;
int startBit = relativeBlock * 4096; int startBit = relativeBlock * 4096;
int endBit = startBit + 4096; // int endBit = startBit + 4096;
if (startBit >= grid.width * grid.height) if (startBit >= grid.width * grid.height)
return "This sector is not used - the physical file size makes it unnecessary"; return "This sector is not used - the physical file size makes it unnecessary";

View File

@ -20,14 +20,9 @@ class SubDirectoryHeader extends DirectoryHeader
parentPointer = HexFormatter.intValue (entryBuffer[35], entryBuffer[36]); parentPointer = HexFormatter.intValue (entryBuffer[35], entryBuffer[36]);
parentSequence = entryBuffer[37] & 0xFF; parentSequence = entryBuffer[37] & 0xFF;
parentSize = entryBuffer[38] & 0xFF; parentSize = entryBuffer[38] & 0xFF;
}
@Override if (false)
public String toString () System.out.printf ("", parentPointer, parentSequence, parentSize);
{
String locked = (access == 0x01) ? "*" : " ";
return String.format (" %s%-40s %15s", locked, "/" + name,
parentDisk.df.format (created.getTime ()));
} }
@Override @Override
@ -42,4 +37,12 @@ class SubDirectoryHeader extends DirectoryHeader
{ {
return null; return null;
} }
@Override
public String toString ()
{
String locked = (access == 0x01) ? "*" : " ";
return String.format (" %s%-40s %15s", locked, "/" + name,
parentDisk.df.format (created.getTime ()));
}
} }

View File

@ -1,7 +1,6 @@
package com.bytezone.diskbrowser.utilities; package com.bytezone.diskbrowser.utilities;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.Toolkit;
import java.awt.geom.AffineTransform; import java.awt.geom.AffineTransform;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -12,18 +11,18 @@ public class Utility
Arrays.asList ("po", "dsk", "do", "hdv", "2mg", "v2d", "d13", "sdk"); Arrays.asList ("po", "dsk", "do", "hdv", "2mg", "v2d", "d13", "sdk");
// not used - it doesn't work with Oracle's JDK // not used - it doesn't work with Oracle's JDK
private static boolean hasRetinaDisplay () // private static boolean hasRetinaDisplay ()
{ // {
Object obj = // Object obj =
Toolkit.getDefaultToolkit ().getDesktopProperty ("apple.awt.contentScaleFactor"); // Toolkit.getDefaultToolkit ().getDesktopProperty ("apple.awt.contentScaleFactor");
if (obj instanceof Float) // if (obj instanceof Float)
{ // {
Float f = (Float) obj; // Float f = (Float) obj;
int scale = f.intValue (); // int scale = f.intValue ();
return (scale == 2); // 1 indicates a regular mac display. // return (scale == 2); // 1 indicates a regular mac display.
} // }
return false; // return false;
} // }
public static boolean test (Graphics2D g) public static boolean test (Graphics2D g)
{ {

View File

@ -350,13 +350,13 @@ public class Sheet
+ " "; + " ";
String underline = "---------------------------------------------------------" String underline = "---------------------------------------------------------"
+ "-----------------------------------------------------------------"; + "-----------------------------------------------------------------";
String left = ""; // String left = "";
String right = ""; // String right = "";
if (columnWidth > 2) // if (columnWidth > 2)
{ // {
left = underline.substring (0, (columnWidth - 2) / 2); // left = underline.substring (0, (columnWidth - 2) / 2);
right = underline.substring (0, columnWidth - 3 - left.length ()) + "+"; // right = underline.substring (0, columnWidth - 3 - left.length ()) + "+";
} // }
int lastRow = 0; int lastRow = 0;
int lastColumn = 0; int lastColumn = 0;

View File

@ -173,16 +173,16 @@ public class Wiz5Monsters extends AbstractFile implements Iterable<Wiz5Monsters.
return s1 + " : " + s2; return s1 + " : " + s2;
} }
private void split (int offset, int length) // private void split (int offset, int length)
{ // {
for (int p = offset; length > 0; p += 16, length -= 16) // for (int p = offset; length > 0; p += 16, length -= 16)
{ // {
int len = length > 15 ? 16 : length; // int len = length > 15 ? 16 : length;
String s = HexFormatter.getHexString (buffer, p, len); // String s = HexFormatter.getHexString (buffer, p, len);
System.out.println (s); // System.out.println (s);
} // }
System.out.println (); // System.out.println ();
} // }
@Override @Override
public String toString () public String toString ()

View File

@ -428,7 +428,7 @@ public class WizardryScenarioDisk extends PascalDisk
offset += max; offset += max;
} }
int id = 0; // int id = 0;
int totalLines = 0; int totalLines = 0;
for (int ptr = 0; ptr < buffer.length; ptr += recordLength) for (int ptr = 0; ptr < buffer.length; ptr += recordLength)
@ -463,7 +463,7 @@ public class WizardryScenarioDisk extends PascalDisk
} }
} }
addToNode (m, node, messageBlocks, messageSector); addToNode (m, node, messageBlocks, messageSector);
id += totalLines; // id += totalLines;
totalLines = 0; totalLines = 0;
} }
} }