From 2bf902b942877e3ecd1e53454586926b3d2cd866 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 6 Jun 2020 09:58:49 -0500 Subject: [PATCH] remove outdated bk2 "scrub" hotkey, this is an obscure feature that is non-trivial to use, but a higly trivial thing to do in tastudio --- src/BizHawk.Client.Common/config/Binding.cs | 1 - .../movie/MovieSession.cs | 22 ------------------- .../movie/bk2/Bk2Movie.cs | 7 ------ .../movie/interfaces/IMovie.cs | 5 ----- .../movie/interfaces/ITasMovie.cs | 5 +++++ .../movie/tasproj/TasMovie.Editing.cs | 8 ++++--- 6 files changed, 10 insertions(+), 38 deletions(-) diff --git a/src/BizHawk.Client.Common/config/Binding.cs b/src/BizHawk.Client.Common/config/Binding.cs index 65f1ad7813..239575bb67 100644 --- a/src/BizHawk.Client.Common/config/Binding.cs +++ b/src/BizHawk.Client.Common/config/Binding.cs @@ -191,7 +191,6 @@ namespace BizHawk.Client.Common Bind("Movie", "MT Select None"), Bind("Movie", "MT Increment Player"), Bind("Movie", "MT Decrement Player"), - Bind("Movie", "Scrub Input"), Bind("Tools", "RAM Watch"), Bind("Tools", "RAM Search"), diff --git a/src/BizHawk.Client.Common/movie/MovieSession.cs b/src/BizHawk.Client.Common/movie/MovieSession.cs index 9047d9d54a..23eb47bcf9 100644 --- a/src/BizHawk.Client.Common/movie/MovieSession.cs +++ b/src/BizHawk.Client.Common/movie/MovieSession.cs @@ -87,18 +87,6 @@ namespace BizHawk.Client.Common { HandleFrameLoopForRecordMode(); } - else - { - // Movie may go into finished mode as a result from latching - if (!Movie.IsFinished()) - { - if (Global.InputManager.ClientControls.IsPressed("Scrub Input")) - { - LatchInputToUser(); - ClearFrame(); - } - } - } } else if (Movie.IsRecording()) { @@ -350,16 +338,6 @@ namespace BizHawk.Client.Common return new Bk2Movie(this, path); } - - private void ClearFrame() - { - if (Movie.IsPlayingOrFinished()) - { - Movie.ClearFrame(Movie.Emulator.Frame); - Output($"Scrubbed input at frame {Movie.Emulator.Frame}"); - } - } - private void PopupMessage(string message) { _popupCallback?.Invoke(message); diff --git a/src/BizHawk.Client.Common/movie/bk2/Bk2Movie.cs b/src/BizHawk.Client.Common/movie/bk2/Bk2Movie.cs index 3e2fe2e632..60813ab618 100644 --- a/src/BizHawk.Client.Common/movie/bk2/Bk2Movie.cs +++ b/src/BizHawk.Client.Common/movie/bk2/Bk2Movie.cs @@ -160,13 +160,6 @@ namespace BizHawk.Client.Common Changes = true; } - public virtual void ClearFrame(int frame) - { - var lg = LogGeneratorInstance(Session.MovieController); - SetFrameAt(frame, lg.EmptyEntry); - Changes = true; - } - protected void SetFrameAt(int frameNum, string frame) { if (Log.Count > frameNum) diff --git a/src/BizHawk.Client.Common/movie/interfaces/IMovie.cs b/src/BizHawk.Client.Common/movie/interfaces/IMovie.cs index 15ae4a25d2..f90e7cb533 100644 --- a/src/BizHawk.Client.Common/movie/interfaces/IMovie.cs +++ b/src/BizHawk.Client.Common/movie/interfaces/IMovie.cs @@ -188,11 +188,6 @@ namespace BizHawk.Client.Common /// void FinishedMode(); - /// - /// Replaces the given frame's input with an empty frame - /// - void ClearFrame(int frame); - /// /// Adds the given input to the movie /// Note: this edits the input log without the normal movie recording logic applied diff --git a/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs b/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs index ac5ef3f402..b0bd0c9086 100644 --- a/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs +++ b/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs @@ -27,6 +27,11 @@ namespace BizHawk.Client.Common void FlagChanges(); void ClearChanges(); + /// + /// Replaces the given frame's input with an empty frame + /// + void ClearFrame(int frame); + void GreenzoneCurrentFrame(); void ToggleBoolState(int frame, string buttonName); void SetAxisState(int frame, string buttonName, int val); diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs index cb51d01206..a54effbf30 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs @@ -78,13 +78,15 @@ namespace BizHawk.Client.Common ChangeLog.SetGeneralRedo(); } - public override void ClearFrame(int frame) + public void ClearFrame(int frame) { ChangeLog.AddGeneralUndo(frame, frame, $"Clear Frame: {frame}"); - base.ClearFrame(frame); - InvalidateAfter(frame); + var lg = LogGeneratorInstance(Session.MovieController); + SetFrameAt(frame, lg.EmptyEntry); + Changes = true; + InvalidateAfter(frame); ChangeLog.SetGeneralRedo(); }