diff --git a/BizHawk.Client.Common/SevenZipWriter.cs b/BizHawk.Client.Common/SevenZipWriter.cs index 4842b9d58b..4eabfa05fe 100644 --- a/BizHawk.Client.Common/SevenZipWriter.cs +++ b/BizHawk.Client.Common/SevenZipWriter.cs @@ -200,7 +200,7 @@ namespace BizHawk.Client.Common private long _total; // bytes written so far public WStream(RangBuffer r) { - this._r = r; + _r = r; } public override int Read(byte[] buffer, int offset, int count) @@ -260,7 +260,7 @@ namespace BizHawk.Client.Common private long _total; // bytes read so far public RStream(RangBuffer r) { - this._r = r; + _r = r; } public override int Read(byte[] buffer, int offset, int count) diff --git a/BizHawk.Client.Common/lua/LuaDocumentation.cs b/BizHawk.Client.Common/lua/LuaDocumentation.cs index 9849a1cb3b..a70a05810c 100644 --- a/BizHawk.Client.Common/lua/LuaDocumentation.cs +++ b/BizHawk.Client.Common/lua/LuaDocumentation.cs @@ -8,9 +8,6 @@ namespace BizHawk.Client.Common { public class LuaDocumentation : List { - public LuaDocumentation() - : base() { } - public string ToTASVideosWikiMarkup() { var sb = new StringBuilder(); diff --git a/BizHawk.Client.Common/movie/SubtitleList.cs b/BizHawk.Client.Common/movie/SubtitleList.cs index b00e59443b..20c5f8f627 100644 --- a/BizHawk.Client.Common/movie/SubtitleList.cs +++ b/BizHawk.Client.Common/movie/SubtitleList.cs @@ -24,7 +24,7 @@ namespace BizHawk.Client.Common public override string ToString() { var sb = new StringBuilder(); - this.Sort(); + Sort(); ForEach(subtitle => sb.AppendLine(subtitle.ToString())); return sb.ToString(); } @@ -67,7 +67,7 @@ namespace BizHawk.Client.Common public new void Sort() { - this.Sort((x, y) => + Sort((x, y) => { int result = x.Frame.CompareTo(y.Frame); return result != 0 ? result : x.Y.CompareTo(y.Y); diff --git a/BizHawk.Client.Common/movie/bk2/Bk2ControllerAdapter.cs b/BizHawk.Client.Common/movie/bk2/Bk2ControllerAdapter.cs index 702c0a3fba..b6b3e0bd99 100644 --- a/BizHawk.Client.Common/movie/bk2/Bk2ControllerAdapter.cs +++ b/BizHawk.Client.Common/movie/bk2/Bk2ControllerAdapter.cs @@ -169,7 +169,7 @@ namespace BizHawk.Client.Common { if (def.BoolButtons.Contains(key)) { - this.MyBoolButtons[key] = trimmed[iterator] != '.'; + MyBoolButtons[key] = trimmed[iterator] != '.'; iterator++; } else if (def.FloatControls.Contains(key)) diff --git a/BizHawk.Client.Common/movie/bk2/Bk2Header.cs b/BizHawk.Client.Common/movie/bk2/Bk2Header.cs index 98a4f8c342..aac0a3463b 100644 --- a/BizHawk.Client.Common/movie/bk2/Bk2Header.cs +++ b/BizHawk.Client.Common/movie/bk2/Bk2Header.cs @@ -9,7 +9,7 @@ namespace BizHawk.Client.Common { get { - return this.ContainsKey(key) ? base[key] : ""; + return ContainsKey(key) ? base[key] : ""; } set diff --git a/BizHawk.Client.Common/movie/bkm/BkmControllerAdapter.cs b/BizHawk.Client.Common/movie/bkm/BkmControllerAdapter.cs index 0cba0651b4..f6b70a7e7e 100644 --- a/BizHawk.Client.Common/movie/bkm/BkmControllerAdapter.cs +++ b/BizHawk.Client.Common/movie/bkm/BkmControllerAdapter.cs @@ -264,7 +264,7 @@ namespace BizHawk.Client.Common private bool IsGenesis6Button() { - return this.Definition.BoolButtons.Contains("P1 X"); + return Definition.BoolButtons.Contains("P1 X"); } private void Force(string button, bool state) diff --git a/BizHawk.Client.Common/movie/bkm/BkmHeader.cs b/BizHawk.Client.Common/movie/bkm/BkmHeader.cs index 7f92230089..683d970146 100644 --- a/BizHawk.Client.Common/movie/bkm/BkmHeader.cs +++ b/BizHawk.Client.Common/movie/bkm/BkmHeader.cs @@ -128,7 +128,7 @@ namespace BizHawk.Client.Common { get { - return this.ContainsKey(key) ? base[key] : ""; + return ContainsKey(key) ? base[key] : ""; } set @@ -176,7 +176,7 @@ namespace BizHawk.Client.Common { var splitLine = line.Split(new[] { ' ' }, 2); - if (HeaderKeys.Contains(splitLine[0]) && !this.ContainsKey(splitLine[0])) + if (HeaderKeys.Contains(splitLine[0]) && !ContainsKey(splitLine[0])) { Add(splitLine[0], splitLine[1]); } diff --git a/BizHawk.Client.Common/movie/import/PJMImport.cs b/BizHawk.Client.Common/movie/import/PJMImport.cs index eb2a5ff9ea..a28ba75ef1 100644 --- a/BizHawk.Client.Common/movie/import/PJMImport.cs +++ b/BizHawk.Client.Common/movie/import/PJMImport.cs @@ -289,7 +289,7 @@ namespace BizHawk.Client.Common if ((controlState & 0xFC) != 0) { - Result.Warnings.Add("Ignored toggle hack flag on frame " + frame.ToString()); + Result.Warnings.Add("Ignored toggle hack flag on frame " + frame); } movie.AppendFrame(controllers); @@ -422,7 +422,7 @@ namespace BizHawk.Client.Common if ((controlState & 0xFC) != 0) { - Result.Warnings.Add("Ignored toggle hack flag on frame " + frame.ToString()); + Result.Warnings.Add("Ignored toggle hack flag on frame " + frame); } // Each controller is terminated with a pipeline. diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs index 1893b2df18..8c50291970 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.Editing.cs @@ -379,7 +379,7 @@ namespace BizHawk.Client.Common if (Global.Emulator.Frame < _log.Count) // Don't stay in recording mode? Fixes TAStudio recording after paint inserting. { - this.SwitchToPlay(); + SwitchToPlay(); } } @@ -409,7 +409,7 @@ namespace BizHawk.Client.Common if (Global.Emulator.Frame < _log.Count) // Don't stay in recording mode? Fixes TAStudio recording after paint inserting. { - this.SwitchToPlay(); + SwitchToPlay(); } } diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs index 740093a7ee..a03428de30 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs @@ -267,7 +267,7 @@ namespace BizHawk.Client.Common } // Movie should always have a state at frame 0. - if (!this.StartsFromSavestate && Global.Emulator.Frame == 0) + if (!StartsFromSavestate && Global.Emulator.Frame == 0) StateManager.Capture(); } } diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs index 775eea1a5e..60eeaf266a 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs @@ -224,11 +224,6 @@ namespace BizHawk.Client.Common } } - public override IController GetInputState(int frame) - { - return base.GetInputState(frame); - } - public void GreenzoneCurrentFrame() { if (Global.Emulator.Frame > LastValidFrame) diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs b/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs index 76edfb7755..7e089d298f 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs @@ -39,7 +39,7 @@ namespace BizHawk.Client.Common public override int GetHashCode() { - return this.Frame.GetHashCode(); + return Frame.GetHashCode(); } public override bool Equals(object obj) @@ -50,7 +50,7 @@ namespace BizHawk.Client.Common } else if (obj is TasMovieMarker) { - return this.Frame == (obj as TasMovieMarker).Frame; + return Frame == (obj as TasMovieMarker).Frame; } else { @@ -81,7 +81,7 @@ namespace BizHawk.Client.Common public TasMovieMarkerList DeepClone() { TasMovieMarkerList ret = new TasMovieMarkerList(_movie); - for (int i = 0; i < this.Count; i++) + for (int i = 0; i < Count; i++) ret.Add(new TasMovieMarker(this[i].Frame, this[i].Message)); return ret; @@ -133,7 +133,7 @@ namespace BizHawk.Client.Common if (!fromHistory) _movie.ChangeLog.AddMarkerChange(item); base.Add(item); - this.Sort((m1, m2) => m1.Frame.CompareTo(m2.Frame)); + Sort((m1, m2) => m1.Frame.CompareTo(m2.Frame)); OnListChanged(NotifyCollectionChangedAction.Add); } } @@ -165,7 +165,7 @@ namespace BizHawk.Client.Common if (!fromHistory) _movie.ChangeLog.AddMarkerChange(item); base.Insert(index, item); - this.Sort((m1, m2) => m1.Frame.CompareTo(m2.Frame)); + Sort((m1, m2) => m1.Frame.CompareTo(m2.Frame)); OnListChanged(NotifyCollectionChangedAction.Add); } @@ -178,7 +178,7 @@ namespace BizHawk.Client.Common _movie.ChangeLog.EndBatch(); base.InsertRange(index, collection); - this.Sort((m1, m2) => m1.Frame.CompareTo(m2.Frame)); + Sort((m1, m2) => m1.Frame.CompareTo(m2.Frame)); OnListChanged(NotifyCollectionChangedAction.Add); } @@ -284,7 +284,7 @@ namespace BizHawk.Client.Common public int FindIndex(string markerName) { - return this.FindIndex(m => m.Message == markerName); + return FindIndex(m => m.Message == markerName); } public bool IsMarker(int frame) diff --git a/BizHawk.Client.Common/tools/Watch/Watch.cs b/BizHawk.Client.Common/tools/Watch/Watch.cs index ac987ca2e7..9475419cb9 100644 --- a/BizHawk.Client.Common/tools/Watch/Watch.cs +++ b/BizHawk.Client.Common/tools/Watch/Watch.cs @@ -48,18 +48,16 @@ namespace BizHawk.Client.Common { if (IsDiplayTypeAvailable(type)) { - this._domain = domain; - this._address = address; - this._size = size; - this._type = type; - this._bigEndian = bigEndian; - this._notes = note; - return; - + _domain = domain; + _address = address; + _size = size; + _type = type; + _bigEndian = bigEndian; + _notes = note; } else { - throw new ArgumentException(string.Format("DisplayType {0} is invalid for this type of Watch", type.ToString()), nameof(type)); + throw new ArgumentException(string.Format("DisplayType {0} is invalid for this type of Watch", type), nameof(type)); } } @@ -67,7 +65,7 @@ namespace BizHawk.Client.Common #region Methods - #region Static + #region Static /// /// Generate sa from a given string @@ -214,14 +212,13 @@ namespace BizHawk.Client.Common { return false; } - else if (object.ReferenceEquals(a, b)) + + if (object.ReferenceEquals(a, b)) { return true; } - else - { - return a.Equals(b); - } + + return a.Equals(b); } /// @@ -236,14 +233,13 @@ namespace BizHawk.Client.Common { return false; } - else if (object.ReferenceEquals(a, b)) + + if (object.ReferenceEquals(a, b)) { return true; } - else - { - return a.Equals(b); - } + + return a.Equals(b); } /// @@ -451,9 +447,9 @@ namespace BizHawk.Client.Common } else { - return this._domain == other._domain && - this._address == other._address && - this._size == other._size; + return _domain == other._domain && + _address == other._address && + _size == other._size; } } @@ -469,9 +465,9 @@ namespace BizHawk.Client.Common public bool Equals(Cheat other) { return !object.ReferenceEquals(other, null) && - this._domain == other.Domain && - this._address == other.Address && - this._size == other.Size; + _domain == other.Domain && + _address == other.Address && + _size == other.Size; } #endregion IEquatable @@ -487,27 +483,27 @@ namespace BizHawk.Client.Common /// Occurs when you try to compare two throughout different public int CompareTo(Watch other) { - if (this._domain != other._domain) + if (_domain != other._domain) { throw new InvalidOperationException("Watch cannot be compared through different domain"); } - if (this.Equals(other)) + if (Equals(other)) { return 0; } - else if (object.ReferenceEquals(other, null)) + + if (object.ReferenceEquals(other, null)) { return 1; } - else if (_address.Equals(other._address)) + + if (_address.Equals(other._address)) { return ((int)_size).CompareTo((int)other._size); } - else - { - return _address.CompareTo(other._address); - } + + return _address.CompareTo(other._address); } #endregion IComparable @@ -538,7 +534,7 @@ namespace BizHawk.Client.Common /// that can serves as a unique representation of current Watch public override int GetHashCode() { - return this.Domain.GetHashCode() + (int)(this.Address); + return Domain.GetHashCode() + (int)(Address); } /// @@ -690,7 +686,7 @@ namespace BizHawk.Client.Common } else { - throw new ArgumentException(string.Format("DisplayType {0} is invalid for this type of Watch", value.ToString())); + throw new ArgumentException(string.Format("DisplayType {0} is invalid for this type of Watch", value)); } } } @@ -704,6 +700,7 @@ namespace BizHawk.Client.Common { return _domain; } + internal set { if (value != null && _domain.Name == value.Name) diff --git a/BizHawk.Client.Common/tools/Watch/WordWatch.cs b/BizHawk.Client.Common/tools/Watch/WordWatch.cs index 314034ac21..5cb7fe2586 100644 --- a/BizHawk.Client.Common/tools/Watch/WordWatch.cs +++ b/BizHawk.Client.Common/tools/Watch/WordWatch.cs @@ -40,14 +40,14 @@ namespace BizHawk.Client.Common { if (value == 0) { - this._value = GetWord(); + _value = GetWord(); } else { - this._value = value; + _value = value; } - this._previous = previous; - this._changecount = changeCount; + _previous = previous; + _changecount = changeCount; } #endregion diff --git a/BizHawk.sln.DotSettings b/BizHawk.sln.DotSettings index 69d7486d81..508ddfb8f1 100644 --- a/BizHawk.sln.DotSettings +++ b/BizHawk.sln.DotSettings @@ -61,6 +61,7 @@ SGB SGX SNES + TAS TI TIA VBA