Exemplo n.º 1
0
 void Decode_Mdr1(BinaryReaderWriter br, DataBlockWithRecordsize block)
 {
     if (br != null && block != null && block.Length > 0)
     {
         throw new Exception("Decode_Mdr1() ist noch nicht implementiert.");
     }
 }
Exemplo n.º 2
0
        protected override void DecodeSections()
        {
            RawRead = true; // besser geht es noch nicht

            if (Locked != 0)
            {
                RawRead = true;
                return;
            }

            // Datenblöcke "interpretieren"
            int filesectiontype;

            filesectiontype = (int)InternalFileSections.Mdr1;
            if (Filesections.GetLength(filesectiontype) > 0)
            {
                DataBlockWithRecordsize bl = new DataBlockWithRecordsize(Filesections.GetPosition(filesectiontype));
                bl.Offset = 0;
                //Decode_Mdr1(Filesections.GetSectionDataReader(filesectiontype), bl);
                //Filesections.RemoveSection(filesectiontype);
            }

            // usw.

            filesectiontype = (int)InternalFileSections.Mdr10;
            if (Filesections.GetLength(filesectiontype) > 0)
            {
                //Decode_Mdr10(Filesections.GetSectionDataReader(filesectiontype), new DataBlock(0, Filesections.GetLength(filesectiontype)));
                //Filesections.RemoveSection(filesectiontype);
            }

            // usw.
        }
Exemplo n.º 3
0
 public TypDataBlockWithRecordsize(DataBlockWithRecordsize block)
 {
     if (block != null)
     {
         Offset     = block.Offset;
         Length     = block.Length;
         Recordsize = block.Recordsize;
     }
 }
Exemplo n.º 4
0
        public override void ReadHeader(BinaryReaderWriter br)
        {
            base.ReadCommonHeader(br, Type);

            Filesections.ClearSections();

            Codepage = br.Read2AsUShort();
            br.SetEncoding(Codepage);

            SortId1 = br.Read2AsUShort();
            SortId2 = br.Read2AsUShort();
            br.ReadBytes(Unknown_x1B);
            Mdr1 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_x27);
            Mdr2 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_x35);
            Mdr3 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_x43);
            Mdr4 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_x51);
            Mdr5 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_x5F);
            Mdr6 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_x6D);
            Mdr7 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_x7B);
            Mdr8 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_x89);
            Mdr9 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_x97);
            Mdr10 = new DataBlock(br);
            br.ReadBytes(Unknown_xA3);
            Mdr11 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_xB1);
            Mdr12 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_xBF);
            Mdr13 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_xCD);
            Mdr14 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_xDB);
            Mdr15       = new DataBlock(br);
            Unknown_xE7 = br.ReadByte();
            Mdr16       = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_xF2);
            Mdr17 = new DataBlock(br);
            br.ReadBytes(Unknown_xFE);
            Mdr18 = new DataBlockWithRecordsize(br);
            br.ReadBytes(Unknown_x10C);

            if (Headerlength > 0x110)
            {
                Unknown_x110 = new byte[Headerlength - 0x110];
                br.ReadBytes(Unknown_x110);
            }
        }
Exemplo n.º 5
0
        public StdFile_NOD()
            : base("NOD")
        {
            Nod1Nodes = new DataBlock();

            Flags                 = 0x207; // + ev. das "Drive on left"-Flag
            Align                 = 6;
            Mult1                 = 0;
            TableARecordLen       = 5;
            Nod2RoadData          = new DataBlock();
            Nod3BoundaryNodes     = new DataBlockWithRecordsize();
            Unknown_0x3B[0]       = 2;
            Nod4HighClassBoundary = new DataBlock();
            Nod5 = new DataBlock();
            Nod6 = new DataBlockWithRecordsize();
        }
Exemplo n.º 6
0
        public override void SetSectionsAlign()
        {
            // durch Pseudo-Offsets die Reihenfolge der Abschnitte festlegen
            uint pos = 0;

            Filesections.SetOffset((int)InternalFileSections.PostHeaderData, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr1, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr2, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr3, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr4, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr5, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr6, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr7, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr8, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr9, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr10, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr11, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr12, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr13, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr14, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr15, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr16, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr17, pos++);
            Filesections.SetOffset((int)InternalFileSections.Mdr18, pos++);

            Filesections.AdjustSections(DataOffset);  // lückenlos ausrichten

            Mdr1  = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr1));
            Mdr2  = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr2));
            Mdr3  = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr3));
            Mdr4  = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr4));
            Mdr5  = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr5));
            Mdr6  = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr6));
            Mdr7  = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr7));
            Mdr8  = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr8));
            Mdr9  = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr9));
            Mdr10 = new DataBlock(Filesections.GetPosition((int)InternalFileSections.Mdr10));
            Mdr11 = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr11));
            Mdr12 = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr12));
            Mdr13 = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr13));
            Mdr14 = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr14));
            Mdr15 = new DataBlock(Filesections.GetPosition((int)InternalFileSections.Mdr15));
            Mdr16 = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr16));
            Mdr17 = new DataBlock(Filesections.GetPosition((int)InternalFileSections.Mdr17));
            Mdr18 = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Mdr18));
        }
Exemplo n.º 7
0
        public override void SetSectionsAlign()
        {
            // durch Pseudo-Offsets die Reihenfolge der Abschnitte festlegen
            uint pos = 0;

            Filesections.SetOffset((int)InternalFileSections.ContentsBlock, pos++);
            Filesections.SetOffset((int)InternalFileSections.DescriptionBlock, pos++);
            Filesections.SetOffset((int)InternalFileSections.CharacterLookupTableBlock, pos++);

            Filesections.AdjustSections(DataOffset);  // lückenlos ausrichten

            // mit den endgültigen Offsets setzen
            SetData2Filesection((int)InternalFileSections.ContentsBlock, true);

            DataBlockWithRecordsize tmp = Filesections.GetPosition((int)InternalFileSections.ContentsBlock);

            ContentsBlock = new ShortDataBlock(tmp.Offset, (ushort)tmp.Length);
        }
Exemplo n.º 8
0
        public override void SetSectionsAlign()
        {
            // durch Pseudo-Offsets die Reihenfolge der Abschnitte festlegen
            uint pos = 0;

            Filesections.SetOffset((int)InternalFileSections.PostHeaderData, pos++);
            Filesections.SetOffset((int)InternalFileSections.Nod1, pos++);
            Filesections.SetOffset((int)InternalFileSections.Nod2, pos++);
            Filesections.SetOffset((int)InternalFileSections.Nod3, pos++);
            Filesections.SetOffset((int)InternalFileSections.Nod4, pos++);
            Filesections.SetOffset((int)InternalFileSections.Nod5, pos++);
            Filesections.SetOffset((int)InternalFileSections.Nod6, pos++);

            Filesections.AdjustSections(DataOffset);  // lückenlos ausrichten

            Nod1Nodes             = new DataBlock(Filesections.GetPosition((int)InternalFileSections.Nod1));
            Nod2RoadData          = new DataBlock(Filesections.GetPosition((int)InternalFileSections.Nod2));
            Nod3BoundaryNodes     = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Nod3));
            Nod4HighClassBoundary = new DataBlock(Filesections.GetPosition((int)InternalFileSections.Nod4));
            Nod5 = new DataBlock(Filesections.GetPosition((int)InternalFileSections.Nod5));
            Nod6 = new DataBlockWithRecordsize(Filesections.GetPosition((int)InternalFileSections.Nod6));
        }
Exemplo n.º 9
0
 public SortHeader()
 {
     Headerlength    = 0x34;
     CharTabBlock    = new DataBlockWithRecordsize();
     ExpansionsBlock = new DataBlockWithRecordsize();
 }
Exemplo n.º 10
0
 /// <summary>
 /// Eine neue <see cref="Section"/> ohne Daten wird erzeugt.
 /// </summary>
 public Section()
 {
     Position = new DataBlockWithRecordsize();
     Data     = null;
     ExtData  = null;
 }