public TesField(string signature, IEnumerable <ITesBase> collection) { Signature = new TesString(signature); DataSize = new TesUInt16(0); OutputItems.Add(Signature); OutputItems.Add(DataSize); Values.AddRange(collection); OutputItems.Add(Values); }
public TesGroup(TesFileReader fr, bool readRecord = true) { GRUP = new TesString(fr); DataSize = new TesUInt32(fr); OutputItems.Add(GRUP); OutputItems.Add(DataSize); //グループタイプ別 uint type = fr.GetUInt32(4, false); switch (type) { case 0: Signature = new TesString(fr); OutputItems.Add(Signature); break; case 1: case 6: case 8: case 9: FormID = new TesUInt32(fr); OutputItems.Add(FormID); break; case 2: case 3: Index = new TesUInt32(fr); OutputItems.Add(Index); break; case 4: case 5: Grid = new TesCellGrid(fr); OutputItems.Add(Grid); break; default: throw new Exception(); } GroupType = new TesUInt32(fr); Other = new TesBytes(fr.GetBytes(8)); OutputItems.Add(GroupType); OutputItems.Add(Other); if (readRecord) { while (!fr.EOF) { Records.Add(new TesRecord(fr.GetRecord())); } } OutputItems.Add(Records); }
public TesHeader(TesFileReader fr) { Signature = new TesString(fr); DataSize = new TesUInt32(fr); RecordFlags = new TesUInt32(fr); FormID = new TesUInt32(fr); VersionControlInfo1 = new TesUInt32(fr); FormVersion = new TesUInt16(fr); VersionControlInfo2 = new TesUInt16(fr); Initialize(); }
public TesHeader(string signature, uint formID) { Signature = new TesString(signature); DataSize = new TesUInt32(0); RecordFlags = new TesUInt32(0); FormID = new TesUInt32(formID); VersionControlInfo1 = new TesUInt32(0); FormVersion = new TesUInt16(0x2c); VersionControlInfo2 = new TesUInt16(0); Initialize(); }
public Property() { PropertyNameDataSize = new TesUInt16(0); PropertyName = new TesString(""); Type = new TesBytes(new byte[] { 0x01, 0x01, 0x00, 0x00, 0xff, 0xff }); PropertyValue = new TesBytes(); OutputItems.Add(PropertyNameDataSize); OutputItems.Add(PropertyName); OutputItems.Add(Type); OutputItems.Add(PropertyValue); }
public Script() { ScriptNameDataSize = new TesUInt16(0); ScriptName = new TesString(""); Flags = new TesBytes(new byte[] { 0x01 }); PropertyCount = new TesUInt16(0); OutputItems.Add(ScriptNameDataSize); OutputItems.Add(ScriptName); OutputItems.Add(Flags); OutputItems.Add(PropertyCount); OutputItems.Add(Propertys); }
public TesField(TesFileReader fr, bool readValue = true) { Signature = new TesString(fr.GetString(4)); DataSize = new TesUInt16(fr); OutputItems.Add(Signature); OutputItems.Add(DataSize); if (readValue) { Values.Add(fr.GetBytes(DataSize.Value)); } OutputItems.Add(Values); }
public TesField(string signature, ITesBase value = null) { Signature = new TesString(signature); if (value != null) { DataSize = new TesUInt16((ushort)value.ToBytes().Count()); } else { DataSize = new TesUInt16(0); } OutputItems.Add(Signature); OutputItems.Add(DataSize); if (value != null) { Values.Add(value); } OutputItems.Add(Values); }