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); }
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); }