1.0 preparations
This commit is contained in:
parent
55717c6e71
commit
8fa82633d4
34 changed files with 742 additions and 462 deletions
|
|
@ -1,7 +1,7 @@
|
|||
package btools.mapcreator;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import btools.util.DiffCoderDataInputStream;
|
||||
import btools.util.DiffCoderDataOutputStream;
|
||||
|
||||
/**
|
||||
* Container for node data on the preprocessor level
|
||||
|
|
@ -23,21 +23,21 @@ public class NodeData extends MapCreatorBase
|
|||
ilon = (int)( ( lon + 180. )*1000000. + 0.5);
|
||||
}
|
||||
|
||||
public NodeData( DataInputStream dis ) throws Exception
|
||||
public NodeData( DiffCoderDataInputStream dis ) throws Exception
|
||||
{
|
||||
nid = readId( dis );
|
||||
ilon = dis.readInt();
|
||||
ilat = dis.readInt();
|
||||
nid = dis.readDiffed( 0 );
|
||||
ilon = (int)dis.readDiffed( 1 );
|
||||
ilat = (int)dis.readDiffed( 2 );
|
||||
int mode = dis.readByte();
|
||||
if ( ( mode & 1 ) != 0 ) { int dlen = dis.readByte(); description = new byte[dlen]; dis.readFully( description ); }
|
||||
if ( ( mode & 2 ) != 0 ) selev = dis.readShort();
|
||||
}
|
||||
|
||||
public void writeTo( DataOutputStream dos ) throws Exception
|
||||
public void writeTo( DiffCoderDataOutputStream dos ) throws Exception
|
||||
{
|
||||
writeId( dos, nid );
|
||||
dos.writeInt( ilon );
|
||||
dos.writeInt( ilat );
|
||||
dos.writeDiffed( nid, 0 );
|
||||
dos.writeDiffed( ilon, 1 );
|
||||
dos.writeDiffed( ilat, 2 );
|
||||
int mode = ( description == null ? 0 : 1 ) | ( selev == Short.MIN_VALUE ? 0 : 2 );
|
||||
dos.writeByte( (byte)mode );
|
||||
if ( ( mode & 1 ) != 0 ) { dos.writeByte( description.length ); dos.write( description ); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue