Exemplo n.º 1
0
        public override void Read(BinaryReader file, uint size)
        {
            base.Read(file, size);

            var count = file.ReadInt32();

            for (var i = 0; i < count; i++)
            {
                var elementsize = file.ReadUInt32();
                //var nameId = file.ReadUInt16();
                var typeId   = file.ReadUInt16();
                var typeName = cr2w.strings[typeId].str;
                //var varname = cr2w.strings[nameId].str;

                var item = CR2WTypeManager.Get().GetByName(typeName, typeName, cr2w, false);
                if (item == null)
                {
                    item = new CVector(cr2w);
                }


                item.Read(file, elementsize);
                item.Type = typeName;
                item.Name = typeName;
                entries.Add(item);
            }
        }
Exemplo n.º 2
0
        public override void Read(BinaryReader file, uint size)
        {
            var count = file.ReadUInt32();

            for (var i = 0; i < count; i++)
            {
                var var = CR2WTypeManager.Get().GetByName(elementtype, i.ToString(), cr2w, false);
                if (var == null)
                {
                    var = new CVector(cr2w);
                }
                var.Read(file, 0);

                AddVariable(var);
            }
        }