public override void Write(ref NybbleStream stream) { switch (DataType) { case TAGDataType.t4bitUInt: stream.WriteFixedSizeUnsignedInt(Data, 1); break; case TAGDataType.t8bitUInt: stream.WriteFixedSizeUnsignedInt(Data, 2); break; case TAGDataType.t12bitUInt: stream.WriteFixedSizeUnsignedInt(Data, 3); break; case TAGDataType.t16bitUInt: stream.WriteFixedSizeUnsignedInt(Data, 4); break; case TAGDataType.t32bitUInt: stream.WriteFixedSizeUnsignedInt(Data, 8); break; } }
public override void Write(ref NybbleStream stream) { for (int i = 0; i < Data.Length; i++) { stream.WriteFixedSizeUnsignedInt((uint)(Data[i]), 4); } stream.WriteFixedSizeUnsignedInt(0, 4); }
public void Read(NybbleStream stream) { FileMajor = stream.ReadNybble(); FileMinor = stream.ReadNybble(); DictionaryID = stream.ReadUnSignedIntegerValue(4); DictionaryMajor = stream.ReadNybble(); DictionaryMinor = stream.ReadNybble(); TypeTableOffset = stream.ReadUnSignedIntegerValue(8); }
public override void Write(ref NybbleStream stream) { var dBytes = BitConverter.GetBytes(Data); for (int i = 0; i < dBytes.Length; i++) { stream.WriteFixedSizeUnsignedInt(dBytes[i], 2); } }
public override void Write(ref NybbleStream stream) { byte[] bytes = Encoding.ASCII.GetBytes(Data); for (int i = 0; i < bytes.Length; i++) { stream.WriteFixedSizeUnsignedInt((uint)(bytes[i]), 2); } stream.WriteFixedSizeUnsignedInt(0, 2); // End of Text }
public void Write(NybbleStream stream) { FileMajor = 1; FileMinor = 0; DictionaryID = 1; DictionaryMajor = 1; DictionaryMinor = 4; stream.WriteNybble(FileMajor); stream.WriteNybble(FileMinor); stream.WriteFixedSizeUnsignedInt(DictionaryID, 4); stream.WriteNybble(DictionaryMajor); stream.WriteNybble(DictionaryMinor); stream.WriteFixedSizeUnsignedInt((uint)TypeTableOffset, 8); }
public override void Read(ref NybbleStream stream) { }
public override void Write(ref NybbleStream stream) { }
public abstract void Write(ref NybbleStream stream);
public abstract void Read(ref NybbleStream stream);