public TesField this[string signature, int index = 0] { get { TesField result = Fields[signature][index]; return(result); } }
public void AddField(TesField field) { OutputItems.Add(field); if (!Fields.ContainsKey(field.Signature)) { Fields.Add(field.Signature, new TesList <TesField>()); } Fields[field.Signature].Add(field); }
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); }
public virtual TesField ReadField(TesFileReader fr) { TesField result = null; string id = fr.GetTypeID(); switch (id) { //ワールドデータ内にある"OFST"で、1箇所DataSizeが0になっており、以降のデータが書き出されている場所がある case "OFST": if (fr.GetInt16(4, false) == 0) { result = new TesField(fr, false); result.Values.Add(new TesBytes(fr.GetBytes(fr.Length - fr.Position))); } break; } return(result); }
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); } } } }