Esempio n. 1
0
 public void LoadReplay(ReplayAPI.Replay replay)
 {
     this.ShowHelp = 0;
     MainForm.self.MetadataForm.LoadReplay(this.State_ReplaySelected);
     this.replayFrames[this.state_ReplaySelected] = replay.ReplayFrames;
     this.JumpTo(0);
     this.State_PlaybackFlow = 0;
     if (replay.ReplayFrames.Count > 0)
     {
         this.MaxSongTime = replay.ReplayFrames[replay.ReplayFrames.Count - 1].Time;
     }
     else
     {
         this.MaxSongTime = 0;
     }
     if (this.Beatmap != null)
     {
         this.FirstHitObjectTime = (int)this.Beatmap.HitObjects[0].StartTime;
         this.Visual_BeatmapAR   = this.Beatmap.ApproachRate;
         this.Visual_BeatmapCS   = this.Beatmap.CircleSize;
         this.songPlayer.Start(Path.Combine(this.Beatmap.Folder, this.Beatmap.AudioFilename));
         this.JumpTo(this.FirstHitObjectTime - 1000);
     }
     this.ApplyMods(replay);
 }
 public void LoadReplay(int id)
 {
     if (id >= 0)
     {
         this.replay = MainForm.self.CurrentReplays[id];
     }
     if (this.replay == null)
     {
         this.gameMode.Value   = 0;
         this.version.Value    = 0;
         this.playerName.Value = "";
         this.mapHash.Value    = "";
         this.replayHash.Value = "";
         this.count300.Value   = 0;
         this.count100.Value   = 0;
         this.count50.Value    = 0;
         this.score.Value      = 0;
         this.countGeki.Value  = 0;
         this.countKatsu.Value = 0;
         this.countMiss.Value  = 0;
         this.maxCombo.Value   = 0;
         this.isPerfect.Value  = 0;
         this.modValue         = ReplayAPI.Mods.None;
     }
     else
     {
         this.gameMode.Value   = (byte)this.replay.GameMode;
         this.version.Value    = this.replay.FileFormat;
         this.playerName.Value = this.replay.PlayerName;
         this.mapHash.Value    = this.replay.MapHash;
         this.replayHash.Value = this.replay.ReplayHash;
         this.count300.Value   = this.replay.Count300;
         this.count100.Value   = this.replay.Count100;
         this.count50.Value    = this.replay.Count50;
         this.score.Value      = (int)this.replay.TotalScore;
         this.countGeki.Value  = this.replay.CountGeki;
         this.countKatsu.Value = this.replay.CountKatu;
         this.countMiss.Value  = this.replay.CountMiss;
         this.maxCombo.Value   = this.replay.MaxCombo;
         this.isPerfect.Value  = Convert.ToByte(!this.replay.IsPerfect);
         this.modValue         = this.replay.Mods;
     }
     for (int i = 0; i < 14; i++)
     {
         mods[i].Checked = this.modValue.HasFlag(this.mods[i].ModValue);
     }
 }
Esempio n. 3
0
 public void ApplyMods(ReplayAPI.Replay replay)
 {
     if (replay.Mods.HasFlag(ReplayAPI.Mods.Easy))
     {
         this.Visual_EasyAR     = true;
         this.Visual_EasyCS     = true;
         this.Visual_HardRockAR = false;
         this.Visual_HardRockCS = false;
     }
     else if (replay.Mods.HasFlag(ReplayAPI.Mods.HardRock))
     {
         this.Visual_EasyAR     = false;
         this.Visual_EasyCS     = false;
         this.Visual_HardRockAR = true;
         this.Visual_HardRockCS = true;
     }
     else
     {
         this.Visual_EasyAR     = false;
         this.Visual_EasyCS     = false;
         this.Visual_HardRockAR = false;
         this.Visual_HardRockCS = false;
     }
     if (replay.Mods.HasFlag(ReplayAPI.Mods.DoubleTime))
     {
         this.State_PlaybackSpeed = 1.5f;
     }
     else if (replay.Mods.HasFlag(ReplayAPI.Mods.HalfTime))
     {
         State_PlaybackSpeed = 0.75f;
     }
     else
     {
         State_PlaybackSpeed = 1.0f;
     }
     this.UpdateApproachRate();
     this.UpdateCircleSize();
     this.Visual_MapInvert = this.Visual_HardRockAR && this.Visual_HardRockCS;
 }
Esempio n. 4
0
 public void UpdateFromMetadata(ReplayAPI.Replay replay)
 {
     this.Canvas.ApplyMods(replay);
     this.CurrentReplays[this.Canvas.State_ReplaySelected] = replay;
     this.UpdateTitle();
 }