public static BaseScript Read(BinaryReaderFont reader) { long position = reader.Position; BaseScript value = new BaseScript { baseValuesOffset = reader.ReadUInt16(), defaultMinMaxOffset = reader.ReadUInt16(), baseLangSysCount = reader.ReadUInt16(), }; if (value.baseLangSysCount != 0) { value.baseLangSysRecords = BaseLangSysRecord.ReadArray( reader, value.baseLangSysCount ); } if (value.baseValuesOffset != 0) { reader.Position = position + value.baseValuesOffset; value.baseValues = BaseValues.Read(reader); } if (value.defaultMinMaxOffset != 0) { reader.Position = position + value.defaultMinMaxOffset; value.defaultMinMax = MinMax.Read(reader); } return(value); }
public static BaseLangSysRecord[] ReadArray(BinaryReaderFont reader, int count) { BaseLangSysRecord[] array = new BaseLangSysRecord[count]; for (int i = 0; i < count; i++) { array[i] = Read(reader); } return(array); }