From 440185a229f1361d7a5e9efcca8460ffe81760c4 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 8 Sep 2013 15:58:01 +0000 Subject: [PATCH] New Ram WAtch - implement Display Watches on Screen feature --- .../tools/Watch/NewRamWatch.cs | 15 +++++--- BizHawk.MultiClient/tools/Watch/Watch.cs | 38 +++++++++---------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/BizHawk.MultiClient/tools/Watch/NewRamWatch.cs b/BizHawk.MultiClient/tools/Watch/NewRamWatch.cs index 22575b43e9..e01847bc10 100644 --- a/BizHawk.MultiClient/tools/Watch/NewRamWatch.cs +++ b/BizHawk.MultiClient/tools/Watch/NewRamWatch.cs @@ -59,14 +59,19 @@ namespace BizHawk.MultiClient if (Global.Config.DisplayRamWatch) { - /* TODO for (int x = 0; x < Watches.Count; x++) { - bool alert = Global.CheatList.IsActiveCheat(Domain, Watches[x].Address); - Global.OSD.AddGUIText(Watches[x].ToString(), - Global.Config.DispRamWatchx, (Global.Config.DispRamWatchy + (x * 14)), alert, Color.Black, Color.White, 0); + bool alert = Watches[x].IsSeparator ? false : Global.CheatList.IsActiveCheat(Watches[x].Domain, Watches[x].Address.Value); + Global.OSD.AddGUIText( + Watches[x].ToString(), + Global.Config.DispRamWatchx, + (Global.Config.DispRamWatchy + (x * 14)), + alert, + Color.Black, + Color.White, + 0 + ); } - */ } if (!IsHandleCreated || IsDisposed) return; diff --git a/BizHawk.MultiClient/tools/Watch/Watch.cs b/BizHawk.MultiClient/tools/Watch/Watch.cs index cea6a16f07..c37f9e75ab 100644 --- a/BizHawk.MultiClient/tools/Watch/Watch.cs +++ b/BizHawk.MultiClient/tools/Watch/Watch.cs @@ -294,11 +294,7 @@ namespace BizHawk.MultiClient public override string ToString() { - switch (Type) - { - default: - return Value.ToString(); //TODO - } + return "----"; } public override bool IsSeparator @@ -347,11 +343,7 @@ namespace BizHawk.MultiClient public override string ToString() { - switch (Type) - { - default: - return Value.ToString(); //TODO - this is used by on screen display - } + return AddressString + ": " + ValueString; } public override bool IsSeparator @@ -404,6 +396,11 @@ namespace BizHawk.MultiClient _previous = _value = GetByte(); } + public override string ToString() + { + return Notes + ": " + ValueString; + } + public int ChangeCount { get; private set; } public void ClearChangeCount() { ChangeCount = 0; } @@ -465,11 +462,7 @@ namespace BizHawk.MultiClient public override string ToString() { - switch (Type) - { - default: - return Value.ToString(); //TODO - } + return AddressString + ": " + ValueString; } protected string FormatValue(ushort val) @@ -503,6 +496,11 @@ namespace BizHawk.MultiClient _previous = _value = GetWord(); } + public override string ToString() + { + return Notes + ": " + ValueString; + } + public int ChangeCount { get; private set; } public void ClearChangeCount() { ChangeCount = 0; } @@ -564,11 +562,7 @@ namespace BizHawk.MultiClient public override string ToString() { - switch (Type) - { - default: - return Value.ToString(); //TODO - } + return AddressString + ": " + ValueString; } protected string FormatValue(uint val) @@ -604,6 +598,10 @@ namespace BizHawk.MultiClient _previous = _value = GetDWord(); } + public override string ToString() + { + return Notes + ": " + ValueString; + } public int ChangeCount { get; private set; } public void ClearChangeCount() { ChangeCount = 0; }