Ejemplo n.º 1
0
 public void ReadFromStream(MStreamReader sr)
 {
     ButtonState = sr.ReadByte();
     Button      = sr.ReadByte();
     MouseX      = sr.ReadSingle();
     MouseY      = sr.ReadSingle();
     Time        = sr.ReadInt32();
 }
Ejemplo n.º 2
0
 public void ReadFromStream(MStreamReader sr)
 {
     Status = new UserStatus
     {
         Status          = (Status)sr.ReadByte(),
         StatusText      = sr.ReadString(),
         BeatmapChecksum = sr.ReadString(),
         CurrentMods     = (Mod)sr.ReadUInt32(),
         Playmode        = (PlayMode)sr.ReadByte(),
         BeatmapId       = sr.ReadUInt32(),
     };
 }
Ejemplo n.º 3
0
 public void ReadFromStream(MStreamReader sr)
 {
     Time         = sr.ReadInt32();
     Id           = sr.ReadByte();
     Count300     = sr.ReadUInt16();
     Count100     = sr.ReadUInt16();
     Count50      = sr.ReadUInt16();
     CountGeki    = sr.ReadUInt16();
     CountKatu    = sr.ReadUInt16();
     CountMiss    = sr.ReadUInt16();
     TotalScore   = sr.ReadInt32();
     MaxCombo     = sr.ReadUInt16();
     CurrentCombo = sr.ReadUInt16();
     Perfect      = sr.ReadBoolean();
     CurrentHp    = sr.ReadByte();
     TagByte      = sr.ReadByte();
     ScoreV2      = sr.ReadBoolean();
     ComboPortion = ScoreV2 ? sr.ReadDouble() : 0;
     BonusPortion = ScoreV2 ? sr.ReadDouble() : 0;
 }
Ejemplo n.º 4
0
        public void ReadFromStream(MStreamReader sr)
        {
            Extra = sr.ReadInt32();

            int count = sr.ReadInt16();

            ReplayFrames = new List <ReplayFrame>(count);
            for (var i = 0; i < count; i++)
            {
                var rframes = sr.ReadData <ReplayFrame>();
                ReplayFrames.Add(rframes);
            }

            Action = sr.ReadByte();

            var sframe = new ScoreFrame();

            sframe.ReadFromStream(sr);
            ScoreFrame = sframe;
        }
Ejemplo n.º 5
0
        public void ReadFromStream(MStreamReader sr)
        {
            MatchId     = sr.ReadInt16();
            InProgress  = sr.ReadBoolean();
            MatchType   = (MatchType)sr.ReadByte();
            ActiveMods  = (Mod)sr.ReadUInt32();
            Name        = sr.ReadString();
            Password    = sr.ReadString();
            BeatmapName = sr.ReadString();
            BeatmapId   = sr.ReadInt32();
            BeatmapMd5  = sr.ReadString();

            for (var i = 0; i < MaxPlayers; i++)
            {
                Slots[i].Status = (MultiSlotStatus)sr.ReadByte();
            }

            for (var i = 0; i < MaxPlayers; i++)
            {
                Slots[i].Team = (MultiSlotTeam)sr.ReadByte();
            }

            for (var i = 0; i < MaxPlayers; i++)
            {
                Slots[i].UserId = (Slots[i].Status & (MultiSlotStatus)124) > 0 ? sr.ReadInt32() : -1;
            }

            HostId       = sr.ReadInt32();
            PlayMode     = (PlayMode)sr.ReadByte();
            ScoringType  = (ScoringType)sr.ReadByte();
            TeamType     = (TeamType)sr.ReadByte();
            SpecialModes = (MatchSpecialModes)sr.ReadByte();

            if (SpecialModes == MatchSpecialModes.Freemods)
            {
                for (var i = 0; i < MaxPlayers; i++)
                {
                    Slots[i].Mods = (Mod)sr.ReadUInt32();
                }
            }

            Seed = sr.ReadInt32();
        }