Displays section MDR6 of the MDR.

Steve, can you commit that? I have no commit rights on the display svn.

WanMil
Index: src/test/display/MdrDisplay.java
===================================================================
--- src/test/display/MdrDisplay.java	(revision 237)
+++ src/test/display/MdrDisplay.java	(working copy)
@@ -229,6 +229,36 @@
 		}
 	}
 
+	
+	/**
+	 * A list of zips.  It is alphabetically arranged.
+	 */
+	private void printSect6() {
+		Displayer d = new Displayer(reader);
+		d.setTitle("MDR 6 (ZIPs)");
+
+		Section s = getSection(6);
+
+		int recsize = s.getRecordSize();
+		d.setSectStart(s.getStart());
+
+		int zipPtrSize = (s.getMagic() & 0x3) + 1;
+		d.item().addText("Zip size: "+zipPtrSize);
+
+		reader.position(s.getStart());
+		int zipnum = 0;
+		while (reader.position() < s.getEnd()) {
+			d.item().addText("zip index %d", ++zipnum);
+			printMapIndex(d);
+			putValue(d, "the %d zip in the map", zipPtrSize);
+			DisplayItem item = d.item();
+			int lbl = item.setBytes3(reader.get3());
+			item.addText("offset in LBL 0x%06x", lbl & ~0x800000);
+		}
+
+		d.print(outStream);
+	}
+	
 	/**
 	 * Contains an ordered list of pointers to street names.
 	 */
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to