コード例 #1
0
        public GFFStructDefinition(BinaryReader file, long beginningOffset)
        {
            //Read in struct definition
            _id = (GFFSTRUCTTYPE)file.ReadInt32();

            _fieldCount = file.ReadUInt32();
            _fields = new GFFFieldDefinition[fieldCount];

            _fieldOffset = file.ReadUInt32();
            _structSize = file.ReadUInt32();

            //Read in field definitions
            long currentPosition = file.BaseStream.Position;
            file.BaseStream.Seek(fieldOffset + beginningOffset, SeekOrigin.Begin);

            for (int i = 0; i < fieldCount; i++)
                _fields[i] = new GFFFieldDefinition(file);

            file.BaseStream.Seek(currentPosition, SeekOrigin.Begin);
        }
コード例 #2
0
        public GFFStructDefinition(BinaryReader file, long beginningOffset)
        {
            //Read in struct definition
            _id = (GFFSTRUCTTYPE)file.ReadInt32();

            _fieldCount = file.ReadUInt32();
            _fields     = new GFFFieldDefinition[fieldCount];

            _fieldOffset = file.ReadUInt32();
            _structSize  = file.ReadUInt32();

            //Read in field definitions
            long currentPosition = file.BaseStream.Position;

            file.BaseStream.Seek(fieldOffset + beginningOffset, SeekOrigin.Begin);

            for (int i = 0; i < fieldCount; i++)
            {
                _fields[i] = new GFFFieldDefinition(file);
            }

            file.BaseStream.Seek(currentPosition, SeekOrigin.Begin);
        }