public void ReadFromStream(OsuReader o, int version) { Version = version; SizeInBytes = o.ReadInt32(); ArtistName = o.ReadString(); ArtistNameUnicode = o.ReadString(); SongTitle = o.ReadString(); SongTitleUnicode = o.ReadString(); CreatorName = o.ReadString(); Difficulty = o.ReadString(); AudioFileName = o.ReadString(); MD5Beatmap = o.ReadString(); NameDotOsuFile = o.ReadString(); RankedStatus = (RankedStatus)o.ReadByte(); NumberOfHitcircles = o.ReadInt16(); NumberOfSliders = o.ReadInt16(); NumberOfSpinners = o.ReadInt16(); ModificationTime = new DateTime(o.ReadInt64()); // next 4 are bytes for versions smaller than 20140609 if (version >= 20140609) { ApproacRate = o.ReadSingle(); CircleSize = o.ReadSingle(); HPDrain = o.ReadSingle(); OverallDifficulty = o.ReadSingle(); } else { ApproacRateB = o.ReadByte(); CircleSizeB = o.ReadByte(); HPDrainB = o.ReadByte(); OverallDifficultyB = o.ReadByte(); } SliderVelocity = o.ReadDouble(); // next part only present if version greater or equal to 20140609 if (version >= 20140609) { int amountOfPairsStandard = o.ReadInt32(); PairsStandard = new List <ModsDoublePair>(); for (int i = 0; i < amountOfPairsStandard; i++) { PairsStandard.Add(o.ReadIntDoublePair()); } int amountOfPairsTaiko = o.ReadInt32(); PairsTaiko = new List <ModsDoublePair>(); for (int i = 0; i < amountOfPairsTaiko; i++) { PairsTaiko.Add(o.ReadIntDoublePair()); } int amountOfPairsCTB = o.ReadInt32(); PairsCTB = new List <ModsDoublePair>(); for (int i = 0; i < amountOfPairsCTB; i++) { PairsCTB.Add(o.ReadIntDoublePair()); } int amountOfPairsMania = o.ReadInt32(); PairsMania = new List <ModsDoublePair>(); for (int i = 0; i < amountOfPairsMania; i++) { PairsMania.Add(o.ReadIntDoublePair()); } } DrainTime = o.ReadInt32(); TotalTime = o.ReadInt32(); TimeOfPreview = o.ReadInt32(); int amountOfTimingPoints = o.ReadInt32(); TimingPoints = new List <Timingpoint>(); for (int i = 0; i < amountOfTimingPoints; i++) { TimingPoints.Add(o.ReadTimingpoint()); } BeatmapID = o.ReadInt32(); BeatmapSetID = o.ReadInt32(); ThreadID = o.ReadInt32(); GradeAchievedStandard = (Grade)o.ReadByte(); GradeAchievedTaiko = (Grade)o.ReadByte(); GradeAchievedCTB = (Grade)o.ReadByte(); GradeAchievedMania = (Grade)o.ReadByte(); LocalBeatmapOffset = o.ReadInt16(); StackLeniency = o.ReadSingle(); GameplayMode = (Mode)o.ReadByte(); SongSource = o.ReadString(); SongTags = o.ReadString(); OnlineOffset = o.ReadInt16(); Font = o.ReadString(); Unplayed = o.ReadBoolean(); LastTimePlayed = o.ReadInt64(); Osz2 = o.ReadBoolean(); FolderName = o.ReadString(); LastTimeChecked = o.ReadInt64(); IgnoreBeatmapSound = o.ReadBoolean(); IgnoreBeatmapSkin = o.ReadBoolean(); DisableStoryboard = o.ReadBoolean(); DisableVideo = o.ReadBoolean(); VisualOverride = o.ReadBoolean(); // unknown short, only present if version less than 20140609 if (version < 20140609) { Unknown = o.ReadInt16(); } LastModificationTime = o.ReadInt32(); ManiaScrollSpeed = o.ReadByte(); if (BeatmapSetID == 101796) { } }