コード例 #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;
            }
        }
コード例 #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);
 }
コード例 #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);
 }
コード例 #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);
            }
        }
コード例 #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
 }
コード例 #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);
        }
コード例 #7
0
 public override void Read(ref NybbleStream stream)
 {
 }
コード例 #8
0
 public override void Write(ref NybbleStream stream)
 {
 }
コード例 #9
0
 public abstract void Write(ref NybbleStream stream);
コード例 #10
0
 public abstract void Read(ref NybbleStream stream);