Add prev and changecount members to the Watch object so that Ram Search can use them. They can have interesting applications in Ram Watch as well

This commit is contained in:
andres.delikat 2011-02-19 21:03:31 +00:00
parent 5c78391252
commit 18d39a5082
3 changed files with 14 additions and 1 deletions

View File

@ -249,6 +249,8 @@ namespace BizHawk.MultiClient
ListViewItem item = new ListViewItem(String.Format("{0:X}", searchList[x].address));
//TODO: if asigned.HeX, switch based on searchList.type
item.SubItems.Add(string.Format("{0:X2}", searchList[x].value));
item.SubItems.Add(string.Format("{0:X2}", searchList[x].value)); //TODO: implement prev
item.SubItems.Add(searchList[x].changecount.ToString());
SearchListView.Items.Add(item);
}
SetTotal();

View File

@ -24,6 +24,10 @@ namespace BizHawk.MultiClient
//When Watch object has a changes member, display in watch list with a reset changes function
//Ability to watch in different memory domains
//IDEAS:
//show a change count column?
//Take advantage of the prev member to show amount changes from prev in a column?
int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired
int defaultHeight;
List<Watch> watchList = new List<Watch>();

View File

@ -21,6 +21,8 @@ namespace BizHawk.MultiClient
signed = asigned.UNSIGNED;
bigendian = true;
notes = "";
changecount = 0;
prev = 0;
}
public Watch(int Address, int Value, atype Type, asigned Signed, bool BigEndian, string Notes)
{
@ -30,13 +32,18 @@ namespace BizHawk.MultiClient
signed = Signed;
bigendian = BigEndian;
notes = Notes;
changecount = 0;
prev = 0;
}
public int address { get; set; }
public int value { get; set; } //Current value
public int prev { get; set; }
public atype type { get; set; } //Address type (byte, word, dword, etc
public asigned signed { get; set; } //Signed/Unsigned?
public bool bigendian { get; set; }
public string notes { get; set; } //User notes
public int changecount { get; set; }
public bool SetTypeByChar(char c) //b = byte, w = word, d = dword
{