diff --git a/BizHawk.MultiClient/RamWatch.cs b/BizHawk.MultiClient/RamWatch.cs index d8aad4d8f8..f53b37c19a 100644 --- a/BizHawk.MultiClient/RamWatch.cs +++ b/BizHawk.MultiClient/RamWatch.cs @@ -21,6 +21,7 @@ namespace BizHawk.MultiClient //TODO: Call AskSave in main client X function //Address can be changed, when that event is triggered, open the edit watch dialog //Append sets the currentWatach file to the new file rather than the old! + //Save as displays the old file in the message label instead of the new one int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired int defaultHeight; List watchList = new List(); @@ -31,6 +32,7 @@ namespace BizHawk.MultiClient { for (int x = 0; x < watchList.Count; x++) { + if (watchList[x].type == atype.SEPARATOR) continue; watchList[x].value = Global.Emulator.MainMemory.PeekByte(watchList[x].address); //TODO: readbytes based on type, size, endian values } @@ -464,10 +466,22 @@ namespace BizHawk.MultiClient WatchListView.Items.Clear(); for (int x = 0; x < watchList.Count; x++) { - ListViewItem item = new ListViewItem(String.Format("{0:X4}", watchList[x].address)); - item.SubItems.Add(watchList[x].value.ToString()); - item.SubItems.Add(watchList[x].notes); - WatchListView.Items.Add(item); + if (watchList[x].type == atype.SEPARATOR) + { + ListViewItem item = new ListViewItem(""); + item.SubItems.Add(""); + item.SubItems.Add(""); + item.BackColor = this.BackColor; + WatchListView.Items.Add(item); + } + else + { + ListViewItem item = new ListViewItem(String.Format("{0:X4}", watchList[x].address)); + item.SubItems.Add(watchList[x].value.ToString()); + item.SubItems.Add(watchList[x].notes); + WatchListView.Items.Add(item); + } + } } diff --git a/BizHawk.MultiClient/Watch.cs b/BizHawk.MultiClient/Watch.cs index a0630cab6b..072f3f08e1 100644 --- a/BizHawk.MultiClient/Watch.cs +++ b/BizHawk.MultiClient/Watch.cs @@ -6,7 +6,7 @@ using System.Text; namespace BizHawk.MultiClient { //Data structure for a watch item in the Ram Watch Dialog - public enum atype { BYTE, WORD, DWORD }; //TODO: more custom types too like 12.4 and 24.12 fixed point + public enum atype { BYTE, WORD, DWORD, SEPARATOR }; //TODO: more custom types too like 12.4 and 24.12 fixed point public enum asigned { SIGNED, UNSIGNED, HEX }; public class Watch { @@ -48,6 +48,9 @@ namespace BizHawk.MultiClient case 'd': type = atype.DWORD; return true; + case 'S': + type = atype.SEPARATOR; + return true; default: return false; } @@ -63,6 +66,8 @@ namespace BizHawk.MultiClient return 'w'; case atype.DWORD: return 'd'; + case atype.SEPARATOR: + return 'S'; default: return 'b'; //Just in case }