public DesignPattern(ISaveFile saveFile, int idx) { SaveFile = saveFile; Index = idx; var offsets = MainOffsets.GetOffsets(SaveFile.GetRevision()); Offset = offsets.Offset_Patterns + idx * offsets.Pattern_Size; Name = SaveFile.ReadString(Offset + offsets.Pattern_Name, 20); PersonalID = SaveFile.ReadStruct <PersonalID>(Offset + offsets.Pattern_PersonalID); for (int i = 0; i < 15; i++) { Palette[i] = new DesignColor(saveFile, Offset + offsets.Pattern_Palette + i * 3); } Pixels = SaveFile.ReadArray <byte>(Offset + offsets.Pattern_ImageData, Pixels.Length); }