
On Nov 25, 2008, at 15:05, Robert Vollmert wrote:
The generated map does have some problems: There's segments missing, and I can't click on a road to get info (which part of the img is responsible for this?).
That's still the case.
I ran the img through NodDisplay, and it doesn't get the start of the Tables section right. In particular, the reference coordinate is wrong. I'll try to investigate what's wrong here.
But this was an easy bug: the size field in TableA was overflowing (patch below). TableB and TableC should probably also get int sizes. I can now route! Yay! Also, the first byte of the tables header should rather be tabC.getSizeSize() -- it's sort of the number of bytes of the Table C size field which follows Table B. "Sort of" because 0 means there's still one byte (also 0). =================================================================== --- src/uk/me/parabola/imgfmt/app/net/TableA.java (revision 720) +++ src/uk/me/parabola/imgfmt/app/net/TableA.java (working copy) @@ -27,13 +27,13 @@ private static final int ITEM_SIZE = 5; - private byte size; + private int size; private int numberOfItems; public void write(ImgFileWriter writer) { } - public byte getSize() { + public int getSize() { return size; }