Ram Search - implemented Diff By Specific Address (yeah, that one is really pointless, but might as well)
This commit is contained in:
parent
9c625df425
commit
4ff2e24804
|
@ -673,7 +673,6 @@
|
||||||
// DifferentByRadio
|
// DifferentByRadio
|
||||||
//
|
//
|
||||||
this.DifferentByRadio.AutoSize = true;
|
this.DifferentByRadio.AutoSize = true;
|
||||||
this.DifferentByRadio.Enabled = false;
|
|
||||||
this.DifferentByRadio.Location = new System.Drawing.Point(7, 134);
|
this.DifferentByRadio.Location = new System.Drawing.Point(7, 134);
|
||||||
this.DifferentByRadio.Name = "DifferentByRadio";
|
this.DifferentByRadio.Name = "DifferentByRadio";
|
||||||
this.DifferentByRadio.Size = new System.Drawing.Size(83, 17);
|
this.DifferentByRadio.Size = new System.Drawing.Size(83, 17);
|
||||||
|
|
|
@ -474,8 +474,15 @@ namespace BizHawk.MultiClient
|
||||||
bool i = InputValidate.IsValidHexNumber(SpecificAddressBox.Text);
|
bool i = InputValidate.IsValidHexNumber(SpecificAddressBox.Text);
|
||||||
if (!i) return -1;
|
if (!i) return -1;
|
||||||
|
|
||||||
int x = int.Parse(SpecificAddressBox.Text.ToUpper().Trim(), NumberStyles.HexNumber);
|
return int.Parse(SpecificAddressBox.Text.ToUpper().Trim(), NumberStyles.HexNumber);
|
||||||
return x;
|
}
|
||||||
|
|
||||||
|
private int GetDifferentBy()
|
||||||
|
{
|
||||||
|
bool i = InputValidate.IsValidUnsignedNumber(DifferentByBox.Text);
|
||||||
|
if (!i) return -1;
|
||||||
|
|
||||||
|
return int.Parse(DifferentByBox.Text.ToUpper().Trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool DoSpecificAddress()
|
private bool DoSpecificAddress()
|
||||||
|
@ -533,7 +540,21 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SOperator.DIFFBY:
|
case SOperator.DIFFBY:
|
||||||
//TODO
|
{
|
||||||
|
int diff = GetDifferentBy();
|
||||||
|
if (diff < 0)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Missing or invalid Different By value", "Invalid value", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
DifferentByBox.Focus();
|
||||||
|
DifferentByBox.SelectAll();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (int x = 0; x < searchList.Count; x++)
|
||||||
|
{
|
||||||
|
if (searchList[x].address == address + diff || searchList[x].address == address - diff)
|
||||||
|
weededList.Add(searchList[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SOperator.MODULUS:
|
case SOperator.MODULUS:
|
||||||
//TODO
|
//TODO
|
||||||
|
|
Loading…
Reference in New Issue