Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
        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);
            }
        }
Exemplo n.º 5
0
 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
 }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
 public override void Read(ref NybbleStream stream)
 {
 }
Exemplo n.º 8
0
 public override void Write(ref NybbleStream stream)
 {
 }
Exemplo n.º 9
0
 public abstract void Write(ref NybbleStream stream);
Exemplo n.º 10
0
 public abstract void Read(ref NybbleStream stream);