示例#1
0
        /// <summary>
        /// Creates a new tracklogic instance.
        /// </summary>
        /// <param name="Filepath">The path to the tracklogic file to read.</param>
        public TLO(string Filepath)
        {
            BinaryReader Reader = new BinaryReader(File.Open(Filepath, FileMode.Open));

            Reader.ReadBytes(4); //Reserved.
            m_Count = Reader.ReadUInt32();

            for (int i = 0; i < m_Count; i++)
            {
                TLOSection Section = new TLOSection();
                Section.Name     = new string(Reader.ReadChars(Reader.ReadInt32()));
                Section.GroupID1 = Reader.ReadUInt32();
                Section.FileID1  = Reader.ReadUInt32();
                Section.GroupID2 = Reader.ReadUInt32();
                Section.FileID1  = Reader.ReadUInt32();
                Section.TypeID   = Reader.ReadUInt32();
                Section.GroupID3 = Reader.ReadUInt32();
                Section.FileID3  = Reader.ReadUInt32();

                Sections.Add(Section);
            }

            Reader.Close();
        }
示例#2
0
        /// <summary>
        /// Creates a new tracklogic instance.
        /// </summary>
        /// <param name="Filedata">The data to create the tracklogic instance from.</param>
        public TLO(byte[] Filedata)
        {
            BinaryReader Reader = new BinaryReader(new MemoryStream(Filedata));

            Reader.ReadBytes(4); //Reserved.
            m_Count = Reader.ReadUInt32();

            for (int i = 0; i < m_Count; i++)
            {
                TLOSection Section = new TLOSection();
                Section.Name = new string(Reader.ReadChars(Reader.ReadInt32()));
                Section.GroupID1 = Reader.ReadUInt32();
                Section.FileID1 = Reader.ReadUInt32();
                Section.GroupID2 = Reader.ReadUInt32();
                Section.FileID1 = Reader.ReadUInt32();
                Section.TypeID = Reader.ReadUInt32();
                Section.GroupID3 = Reader.ReadUInt32();
                Section.FileID3 = Reader.ReadUInt32();

                Sections.Add(Section);
            }

            Reader.Close();
        }
示例#3
0
        /// <summary>
        /// Creates a new tracklogic instance.
        /// </summary>
        /// <param name="Filedata">The data to create the tracklogic instance from.</param>
        public TLO(byte[] Filedata)
        {
            BinaryReader Reader = new BinaryReader(new MemoryStream(Filedata));

            Reader.ReadBytes(4); //Reserved.
            m_Count = Reader.ReadUInt32();

            for (int i = 0; i < m_Count; i++)
            {
                TLOSection Section = new TLOSection();
                Section.Name     = new string(Reader.ReadChars(Reader.ReadInt32()));
                Section.GroupID1 = Reader.ReadUInt32();
                Section.FileID1  = Reader.ReadUInt32();
                Section.GroupID2 = Reader.ReadUInt32();
                Section.FileID1  = Reader.ReadUInt32();
                Section.TypeID   = Reader.ReadUInt32();
                Section.GroupID3 = Reader.ReadUInt32();
                Section.FileID3  = Reader.ReadUInt32();

                Sections.Add(Section);
            }

            Reader.Close();
        }
示例#4
0
        /// <summary>
        /// Creates a new tracklogic instance.
        /// </summary>
        /// <param name="Filepath">The path to the tracklogic file to read.</param>
        public TLO(string Filepath)
        {
            BinaryReader Reader = new BinaryReader(File.Open(Filepath, FileMode.Open));

            Reader.ReadBytes(4); //Reserved.
            m_Count = Reader.ReadUInt32();

            for (int i = 0; i < m_Count; i++)
            {
                TLOSection Section = new TLOSection();
                Section.Name = new string(Reader.ReadChars(Reader.ReadInt32()));
                Section.GroupID1 = Reader.ReadUInt32();
                Section.FileID1 = Reader.ReadUInt32();
                Section.GroupID2 = Reader.ReadUInt32();
                Section.FileID1 = Reader.ReadUInt32();
                Section.TypeID = Reader.ReadUInt32();
                Section.GroupID3 = Reader.ReadUInt32();
                Section.FileID3 = Reader.ReadUInt32();

                Sections.Add(Section);
            }

            Reader.Close();
        }