コード例 #1
0
        public override TesField ReadField(TesFileReader fr)
        {
            TesField result = base.ReadField(fr);

            if (result == null)
            {
                string id = fr.GetTypeID();
                switch (id)
                {
                case "HEDR":
                    HEDR   = new TES4_HEDR(fr.GetField());
                    result = HEDR;
                    break;
                }
            }

            return(result);
        }
コード例 #2
0
        public TesRecord(TesFileReader fr, bool readFiled = true)
        {
            Header = new TesHeader(fr);
            OutputItems.Add(Header);

            if (readFiled)
            {
                if (Header.Signature == "NAVM" || Header.Signature == "LAND")
                {
                    OutputItems.Add(new TesBytes(fr.GetBytes(Header.DataSize)));
                }
                else
                {
                    while (!fr.EOF)
                    {
                        TesField field = ReadField(fr) ?? new TesField(fr.GetField());
                        AddField(field);
                    }
                }
            }
        }