コード例 #1
0
        public static void putType(GeoWriter writer, bool l2j, byte type)
        {
            if (l2j)
            {
                writer.put(type);
            }
            else
            {
                switch (type)
                {
                case GeoEngine.GEO_BLOCK_TYPE_FLAT:
                    writer.putShort((short)0x0000);
                    break;

                case GeoEngine.GEO_BLOCK_TYPE_COMPLEX:
                    writer.putShort((short)0x0040);
                    break;

                case GeoEngine.GEO_BLOCK_TYPE_MULTILAYER:
                    writer.putShort((short)0x0080);      // TODO check this
                    break;

                default:
                    throw new ArgumentException("Unkown type: " + type);
                }
            }
        }
コード例 #2
0
 public override void writeTo(GeoWriter writer, bool l2j)
 {
     GeoCell[] layers;
     GeoRegion.putType(writer, l2j, getType());
     for (int x = 0, y, z; x < GeoEngine.GEO_BLOCK_SHIFT; x++)
     {
         for (y = 0; y < GeoEngine.GEO_BLOCK_SHIFT; y++)
         {
             layers = _cells3D[x, y];
             if (l2j)
             {
                 writer.put((byte)layers.Length);
             }
             else
             {
                 writer.putShort((short)layers.Length);
             }
             //
             for (z = layers.Length; z-- > 0;)
             {
                 writer.putShort(layers[z].getHeightAndNSWE());
             }
         }
     }
 }
コード例 #3
0
 public override void writeTo(GeoWriter writer, bool l2j)
 {
     GeoRegion.putType(writer, l2j, getType());
     writer.putShort(_cells[0].getHeight());
     if (!l2j)
     {
         writer.putShort(_cells[0].getHeight());
     }
 }
コード例 #4
0
 public override void writeTo(GeoWriter writer, bool l2j)
 {
     GeoRegion.putType(writer, l2j, getType());
     for (int x = 0, y; x < GeoEngine.GEO_BLOCK_SHIFT; x++)
     {
         for (y = 0; y < GeoEngine.GEO_BLOCK_SHIFT; y++)
         {
             writer.putShort(_cells[indexOf(x, y)].getHeightAndNSWE());
         }
     }
 }