예제 #1
0
 public void ReadFromStream(OsuReader o)
 {
     PlayerId = o.ReadInt32();
     Name     = o.ReadString();
     Country1 = o.ReadByte();
     Country2 = o.ReadByte();
     Unknown  = o.ReadByte();
     Unknown2 = o.ReadInt64();
     Rank     = o.ReadInt32();
     Unknown3 = o.ReadInt64();
 }
예제 #2
0
 public void ReadFromStream(OsuReader o)
 {
     Mode              = (Mode)o.ReadByte();
     Version           = o.ReadInt32();
     BeatmapMD5        = o.ReadString();
     PlayerName        = o.ReadString();
     ReplayMD5         = o.ReadString();
     NumberOfHitValue1 = o.ReadInt16();
     NumberOfHitValue2 = o.ReadInt16();
     NumberOfHitValue3 = o.ReadInt16();
     NumberOfHitValue4 = o.ReadInt16();
     NumberOfHitValue5 = o.ReadInt16();
     NumberOfMisses    = o.ReadInt16();
     ReplayScore       = o.ReadInt32();
     MaxCombo          = o.ReadInt16();
     PerfectCombo      = o.ReadBoolean();
     Mods              = (Mods)o.ReadInt32();
     // string: should always be empty
     o.AssertStringIsNullOrEmpty("Score: String isn't null or empty");
     Timestamp = o.ReadInt64();
     // int Constant, should always be 0xffffffff (-1)
     o.AssertInt(-1, "Score: int is not -1");
     OnlineScoreID = o.ReadInt64();
 }
예제 #3
0
        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)
            {
            }
        }