Package net.sf.freecol.tools
Class ColonizationMapReader
- java.lang.Object
-
- net.sf.freecol.tools.ColonizationMapReader
-
public class ColonizationMapReader extends java.lang.Object
Just pass the name of a Colonization map file (with extension ".MP"). The map file starts with a six-byte header. Byte zero encodes the map width, byte two encodes the map height. The function of the other bytes is unknown, their values, however, are fixed. The header is followed by three "layers", each the size of the map. The first "layer" encodes the terrain type. The function of the other layers is unknown. They are filled with zero bytes. It seems that the least significant three bits encode the basic terrain type, the next two bits encode the forest overlay and the special tile types ice, ocean and sea lanes. The three most significant bits encode combinations of the hill, mountain and river overlays. bits 0-2: tile type bit 3 (8): forest bit 4 (16): forest bits 3+4 (24): special, values larger than 26 are not defined bits 5-7: overlays 0: nothing 1: hill 2: minor river 3: hill + minor river (extremely rare) 4: nothing 5: mountain 6: major river 7: mountain + major river (never seen)
-
-
Constructor Summary
Constructors Constructor Description ColonizationMapReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
-
-
-
Field Detail
-
WIDTH
public static final int WIDTH
- See Also:
- Constant Field Values
-
HEIGHT
public static final int HEIGHT
- See Also:
- Constant Field Values
-
tiletypes
private static final char[] tiletypes
-
header
private static final byte[] header
-
layer1
private static byte[] layer1
-
-