示例#1
0
        public void Parse(GffField fld)
        {
            if (fld.Type != GffType.CExoLocString)
            {
                throw new ApplicationException("Impossible de parser ce type " +
                                               Enum.GetName(typeof(GffType), fld.Type) +
                                               " en ExoLocString.");
            }
            var br = new LatinBinaryReader(new MemoryStream(fld.Bytes));

            _strref = (int)br.ReadUInt32();
            var strcount = br.ReadUInt32();

            _dic = new Dictionary <int, string>((int)strcount);
            for (var i = 0; i < strcount; i++)
            {
                var id   = br.ReadInt32();
                var size = br.ReadInt32();
                _dic.Add(id, new string(br.ReadChars(size)));
            }
        }
 public void Parse(GffField field)
 {
     _d = BitConverter.ToDouble(field.Bytes, 0);
 }
示例#3
0
 public void Parse(GffField field)
 {
     _i = BitConverter.ToInt32(field.Bytes, 0);
 }
示例#4
0
 public void Parse(GffField field)
 {
     _ush = BitConverter.ToUInt16(field.Bytes, 0);
 }
 public void Parse(GffField field)
 {
     _d64 = BitConverter.ToUInt64(field.Bytes, 0);
 }
 public void Parse(GffField field)
 {
     _dword = BitConverter.ToUInt32(field.Bytes, 0);
 }
示例#7
0
 public void Parse(GffField field)
 {
     _f = BitConverter.ToSingle(field.Bytes, 0);
 }