Merge pull request #571 from TASVideos/feature/cheat-comparison-types

Feature/cheat comparison types
This commit is contained in:
AdamSturge 2016-02-10 18:58:25 -08:00
commit cf76d99a52
6 changed files with 324 additions and 98 deletions

View File

@ -6,17 +6,31 @@ namespace BizHawk.Client.Common
{ {
public class Cheat public class Cheat
{ {
public enum COMPARISONTYPE
{
NONE,
EQUAL,
GREATER_THAN,
GREATER_THAN_OR_EQUAL,
LESS_THAN,
LESS_THAN_OR_EQUAL,
NOT_EQUAL
};
private readonly Watch _watch; private readonly Watch _watch;
private int? _compare; private int? _compare;
private int _val; private int _val;
private bool _enabled; private bool _enabled;
private COMPARISONTYPE _comparisonType;
public Cheat(Watch watch, int value, int? compare = null, bool enabled = true)
public Cheat(Watch watch, int value, int? compare = null, bool enabled = true, COMPARISONTYPE comparisonType = COMPARISONTYPE.NONE)
{ {
_enabled = enabled; _enabled = enabled;
_watch = watch; _watch = watch;
_compare = compare; _compare = compare;
_val = value; _val = value;
_comparisonType = comparisonType;
Pulse(); Pulse();
} }
@ -163,6 +177,11 @@ namespace BizHawk.Client.Common
} }
} }
public COMPARISONTYPE ComparisonType
{
get { return _comparisonType; }
}
public void Enable(bool handleChange = true) public void Enable(bool handleChange = true)
{ {
if (!IsSeparator) if (!IsSeparator)
@ -217,9 +236,48 @@ namespace BizHawk.Client.Common
{ {
if (_compare.HasValue) if (_compare.HasValue)
{ {
if (_compare.Value == _watch.ValueNoFreeze) switch (_comparisonType)
{ {
_watch.Poke(GetStringForPulse(_val)); case Cheat.COMPARISONTYPE.NONE: // This should never happen, but it's here just in case
break;
case Cheat.COMPARISONTYPE.EQUAL:
if (_compare.Value == _watch.ValueNoFreeze)
{
_watch.Poke(GetStringForPulse(_val));
}
break;
case Cheat.COMPARISONTYPE.GREATER_THAN:
if (_compare.Value > _watch.ValueNoFreeze)
{
_watch.Poke(GetStringForPulse(_val));
}
break;
case Cheat.COMPARISONTYPE.GREATER_THAN_OR_EQUAL:
if (_compare.Value >= _watch.ValueNoFreeze)
{
_watch.Poke(GetStringForPulse(_val));
}
break;
case Cheat.COMPARISONTYPE.LESS_THAN:
if (_compare.Value < _watch.ValueNoFreeze)
{
_watch.Poke(GetStringForPulse(_val));
}
break;
case Cheat.COMPARISONTYPE.LESS_THAN_OR_EQUAL:
if (_compare.Value <= _watch.ValueNoFreeze)
{
_watch.Poke(GetStringForPulse(_val));
}
break;
case Cheat.COMPARISONTYPE.NOT_EQUAL:
if (_compare.Value != _watch.ValueNoFreeze)
{
_watch.Poke(GetStringForPulse(_val));
}
break;
default :
break;
} }
} }
else else

View File

@ -397,6 +397,7 @@ namespace BizHawk.Client.Common
.Append(cheat.SizeAsChar).Append('\t') .Append(cheat.SizeAsChar).Append('\t')
.Append(cheat.TypeAsChar).Append('\t') .Append(cheat.TypeAsChar).Append('\t')
.Append((cheat.BigEndian ?? false) ? '1' : '0').Append('\t') .Append((cheat.BigEndian ?? false) ? '1' : '0').Append('\t')
.Append(cheat.ComparisonType.ToString()).Append('\t')
.AppendLine(); .AppendLine();
} }
} }
@ -450,6 +451,7 @@ namespace BizHawk.Client.Common
var size = WatchSize.Byte; var size = WatchSize.Byte;
var type = DisplayType.Hex; var type = DisplayType.Hex;
var bigendian = false; var bigendian = false;
Cheat.COMPARISONTYPE comparisonType = Cheat.COMPARISONTYPE.NONE;
if (s.Length < 6) if (s.Length < 6)
{ {
@ -481,6 +483,15 @@ namespace BizHawk.Client.Common
bigendian = vals[8] == "1"; bigendian = vals[8] == "1";
} }
// For backwards compatibility, don't assume these values exist
if (vals.Length > 9)
{
if(!Enum.TryParse<Cheat.COMPARISONTYPE>(vals[9], out comparisonType))
{
continue; //Not sure if this is the best answer, could just resort to ==
}
}
var watch = Watch.GenerateWatch( var watch = Watch.GenerateWatch(
domain, domain,
address, address,
@ -489,7 +500,7 @@ namespace BizHawk.Client.Common
bigendian, bigendian,
name); name);
Add(new Cheat(watch, value, compare, !Global.Config.DisableCheatsOnLoad && enabled)); Add(new Cheat(watch, value, compare, !Global.Config.DisableCheatsOnLoad && enabled, comparisonType));
} }
} }
catch catch
@ -673,6 +684,25 @@ namespace BizHawk.Client.Common
.ToList(); .ToList();
} }
break;
case COMPARISONTYPE:
if (reverse)
{
_cheatList = _cheatList
.OrderByDescending(x => x.ComparisonType)
.ThenBy(x => x.Name)
.ThenBy(x => x.Address ?? 0)
.ToList();
}
else
{
_cheatList = _cheatList
.OrderBy(x => x.ComparisonType)
.ThenBy(x => x.Name)
.ThenBy(x => x.Address ?? 0)
.ToList();
}
break; break;
} }
} }
@ -706,5 +736,6 @@ namespace BizHawk.Client.Common
public const string SIZE = "SizeColumn"; public const string SIZE = "SizeColumn";
public const string ENDIAN = "EndianColumn"; public const string ENDIAN = "EndianColumn";
public const string TYPE = "DisplayTypeColumn"; public const string TYPE = "DisplayTypeColumn";
private const string COMPARISONTYPE = "ComparisonTypeColumn";
} }
} }

View File

@ -48,13 +48,15 @@
this.EditButton = new System.Windows.Forms.Button(); this.EditButton = new System.Windows.Forms.Button();
this.CompareBox = new BizHawk.Client.EmuHawk.WatchValueBox(); this.CompareBox = new BizHawk.Client.EmuHawk.WatchValueBox();
this.ValueBox = new BizHawk.Client.EmuHawk.WatchValueBox(); this.ValueBox = new BizHawk.Client.EmuHawk.WatchValueBox();
this.CompareTypeDropDown = new System.Windows.Forms.ComboBox();
this.CompareTypeLabel = new System.Windows.Forms.Label();
this.SuspendLayout(); this.SuspendLayout();
// //
// NameBox // NameBox
// //
this.NameBox.Location = new System.Drawing.Point(70, 12); this.NameBox.Location = new System.Drawing.Point(70, 12);
this.NameBox.Name = "NameBox"; this.NameBox.Name = "NameBox";
this.NameBox.Size = new System.Drawing.Size(108, 20); this.NameBox.Size = new System.Drawing.Size(108, 31);
this.NameBox.TabIndex = 5; this.NameBox.TabIndex = 5;
// //
// NameLabel // NameLabel
@ -62,7 +64,7 @@
this.NameLabel.AutoSize = true; this.NameLabel.AutoSize = true;
this.NameLabel.Location = new System.Drawing.Point(32, 16); this.NameLabel.Location = new System.Drawing.Point(32, 16);
this.NameLabel.Name = "NameLabel"; this.NameLabel.Name = "NameLabel";
this.NameLabel.Size = new System.Drawing.Size(35, 13); this.NameLabel.Size = new System.Drawing.Size(68, 25);
this.NameLabel.TabIndex = 4; this.NameLabel.TabIndex = 4;
this.NameLabel.Text = "Name"; this.NameLabel.Text = "Name";
// //
@ -71,7 +73,7 @@
this.AddressLabel.AutoSize = true; this.AddressLabel.AutoSize = true;
this.AddressLabel.Location = new System.Drawing.Point(22, 43); this.AddressLabel.Location = new System.Drawing.Point(22, 43);
this.AddressLabel.Name = "AddressLabel"; this.AddressLabel.Name = "AddressLabel";
this.AddressLabel.Size = new System.Drawing.Size(45, 13); this.AddressLabel.Size = new System.Drawing.Size(91, 25);
this.AddressLabel.TabIndex = 6; this.AddressLabel.TabIndex = 6;
this.AddressLabel.Text = "Address"; this.AddressLabel.Text = "Address";
// //
@ -80,7 +82,7 @@
this.AddressHexIndLabel.AutoSize = true; this.AddressHexIndLabel.AutoSize = true;
this.AddressHexIndLabel.Location = new System.Drawing.Point(92, 43); this.AddressHexIndLabel.Location = new System.Drawing.Point(92, 43);
this.AddressHexIndLabel.Name = "AddressHexIndLabel"; this.AddressHexIndLabel.Name = "AddressHexIndLabel";
this.AddressHexIndLabel.Size = new System.Drawing.Size(18, 13); this.AddressHexIndLabel.Size = new System.Drawing.Size(35, 25);
this.AddressHexIndLabel.TabIndex = 8; this.AddressHexIndLabel.TabIndex = 8;
this.AddressHexIndLabel.Text = "0x"; this.AddressHexIndLabel.Text = "0x";
// //
@ -91,7 +93,7 @@
this.AddressBox.MaxLength = 8; this.AddressBox.MaxLength = 8;
this.AddressBox.Name = "AddressBox"; this.AddressBox.Name = "AddressBox";
this.AddressBox.Nullable = true; this.AddressBox.Nullable = true;
this.AddressBox.Size = new System.Drawing.Size(65, 20); this.AddressBox.Size = new System.Drawing.Size(65, 31);
this.AddressBox.TabIndex = 9; this.AddressBox.TabIndex = 9;
// //
// ValueHexIndLabel // ValueHexIndLabel
@ -99,7 +101,7 @@
this.ValueHexIndLabel.AutoSize = true; this.ValueHexIndLabel.AutoSize = true;
this.ValueHexIndLabel.Location = new System.Drawing.Point(92, 69); this.ValueHexIndLabel.Location = new System.Drawing.Point(92, 69);
this.ValueHexIndLabel.Name = "ValueHexIndLabel"; this.ValueHexIndLabel.Name = "ValueHexIndLabel";
this.ValueHexIndLabel.Size = new System.Drawing.Size(18, 13); this.ValueHexIndLabel.Size = new System.Drawing.Size(35, 25);
this.ValueHexIndLabel.TabIndex = 11; this.ValueHexIndLabel.TabIndex = 11;
this.ValueHexIndLabel.Text = "0x"; this.ValueHexIndLabel.Text = "0x";
// //
@ -108,7 +110,7 @@
this.ValueLabel.AutoSize = true; this.ValueLabel.AutoSize = true;
this.ValueLabel.Location = new System.Drawing.Point(33, 69); this.ValueLabel.Location = new System.Drawing.Point(33, 69);
this.ValueLabel.Name = "ValueLabel"; this.ValueLabel.Name = "ValueLabel";
this.ValueLabel.Size = new System.Drawing.Size(34, 13); this.ValueLabel.Size = new System.Drawing.Size(67, 25);
this.ValueLabel.TabIndex = 10; this.ValueLabel.TabIndex = 10;
this.ValueLabel.Text = "Value"; this.ValueLabel.Text = "Value";
// //
@ -117,25 +119,25 @@
this.CompareHexIndLabel.AutoSize = true; this.CompareHexIndLabel.AutoSize = true;
this.CompareHexIndLabel.Location = new System.Drawing.Point(92, 95); this.CompareHexIndLabel.Location = new System.Drawing.Point(92, 95);
this.CompareHexIndLabel.Name = "CompareHexIndLabel"; this.CompareHexIndLabel.Name = "CompareHexIndLabel";
this.CompareHexIndLabel.Size = new System.Drawing.Size(18, 13); this.CompareHexIndLabel.Size = new System.Drawing.Size(35, 25);
this.CompareHexIndLabel.TabIndex = 14; this.CompareHexIndLabel.TabIndex = 14;
this.CompareHexIndLabel.Text = "0x"; this.CompareHexIndLabel.Text = "0x";
// //
// CompareLabel // CompareLabel
// //
this.CompareLabel.AutoSize = true; this.CompareLabel.AutoSize = true;
this.CompareLabel.Location = new System.Drawing.Point(18, 95); this.CompareLabel.Location = new System.Drawing.Point(24, 95);
this.CompareLabel.Name = "CompareLabel"; this.CompareLabel.Name = "CompareLabel";
this.CompareLabel.Size = new System.Drawing.Size(49, 13); this.CompareLabel.Size = new System.Drawing.Size(99, 25);
this.CompareLabel.TabIndex = 13; this.CompareLabel.TabIndex = 13;
this.CompareLabel.Text = "Compare"; this.CompareLabel.Text = "Compare";
// //
// DomainLabel // DomainLabel
// //
this.DomainLabel.AutoSize = true; this.DomainLabel.AutoSize = true;
this.DomainLabel.Location = new System.Drawing.Point(24, 124); this.DomainLabel.Location = new System.Drawing.Point(24, 158);
this.DomainLabel.Name = "DomainLabel"; this.DomainLabel.Name = "DomainLabel";
this.DomainLabel.Size = new System.Drawing.Size(43, 13); this.DomainLabel.Size = new System.Drawing.Size(85, 25);
this.DomainLabel.TabIndex = 16; this.DomainLabel.TabIndex = 16;
this.DomainLabel.Text = "Domain"; this.DomainLabel.Text = "Domain";
// //
@ -143,18 +145,18 @@
// //
this.DomainDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.DomainDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.DomainDropDown.FormattingEnabled = true; this.DomainDropDown.FormattingEnabled = true;
this.DomainDropDown.Location = new System.Drawing.Point(78, 118); this.DomainDropDown.Location = new System.Drawing.Point(78, 154);
this.DomainDropDown.Name = "DomainDropDown"; this.DomainDropDown.Name = "DomainDropDown";
this.DomainDropDown.Size = new System.Drawing.Size(100, 21); this.DomainDropDown.Size = new System.Drawing.Size(100, 33);
this.DomainDropDown.TabIndex = 17; this.DomainDropDown.TabIndex = 17;
this.DomainDropDown.SelectedIndexChanged += new System.EventHandler(this.DomainDropDown_SelectedIndexChanged); this.DomainDropDown.SelectedIndexChanged += new System.EventHandler(this.DomainDropDown_SelectedIndexChanged);
// //
// SizeLabel // SizeLabel
// //
this.SizeLabel.AutoSize = true; this.SizeLabel.AutoSize = true;
this.SizeLabel.Location = new System.Drawing.Point(40, 150); this.SizeLabel.Location = new System.Drawing.Point(40, 190);
this.SizeLabel.Name = "SizeLabel"; this.SizeLabel.Name = "SizeLabel";
this.SizeLabel.Size = new System.Drawing.Size(27, 13); this.SizeLabel.Size = new System.Drawing.Size(54, 25);
this.SizeLabel.TabIndex = 18; this.SizeLabel.TabIndex = 18;
this.SizeLabel.Text = "Size"; this.SizeLabel.Text = "Size";
// //
@ -166,18 +168,18 @@
"1 Byte", "1 Byte",
"2 Byte", "2 Byte",
"4 Byte"}); "4 Byte"});
this.SizeDropDown.Location = new System.Drawing.Point(78, 144); this.SizeDropDown.Location = new System.Drawing.Point(78, 184);
this.SizeDropDown.Name = "SizeDropDown"; this.SizeDropDown.Name = "SizeDropDown";
this.SizeDropDown.Size = new System.Drawing.Size(100, 21); this.SizeDropDown.Size = new System.Drawing.Size(100, 33);
this.SizeDropDown.TabIndex = 19; this.SizeDropDown.TabIndex = 19;
this.SizeDropDown.SelectedIndexChanged += new System.EventHandler(this.SizeDropDown_SelectedIndexChanged); this.SizeDropDown.SelectedIndexChanged += new System.EventHandler(this.SizeDropDown_SelectedIndexChanged);
// //
// DisplayTypeLael // DisplayTypeLael
// //
this.DisplayTypeLael.AutoSize = true; this.DisplayTypeLael.AutoSize = true;
this.DisplayTypeLael.Location = new System.Drawing.Point(11, 176); this.DisplayTypeLael.Location = new System.Drawing.Point(11, 219);
this.DisplayTypeLael.Name = "DisplayTypeLael"; this.DisplayTypeLael.Name = "DisplayTypeLael";
this.DisplayTypeLael.Size = new System.Drawing.Size(56, 13); this.DisplayTypeLael.Size = new System.Drawing.Size(114, 25);
this.DisplayTypeLael.TabIndex = 20; this.DisplayTypeLael.TabIndex = 20;
this.DisplayTypeLael.Text = "Display As"; this.DisplayTypeLael.Text = "Display As";
// //
@ -189,18 +191,18 @@
"1 Byte", "1 Byte",
"2 Byte", "2 Byte",
"4 Byte"}); "4 Byte"});
this.DisplayTypeDropDown.Location = new System.Drawing.Point(78, 170); this.DisplayTypeDropDown.Location = new System.Drawing.Point(78, 213);
this.DisplayTypeDropDown.Name = "DisplayTypeDropDown"; this.DisplayTypeDropDown.Name = "DisplayTypeDropDown";
this.DisplayTypeDropDown.Size = new System.Drawing.Size(100, 21); this.DisplayTypeDropDown.Size = new System.Drawing.Size(100, 33);
this.DisplayTypeDropDown.TabIndex = 21; this.DisplayTypeDropDown.TabIndex = 21;
this.DisplayTypeDropDown.SelectedIndexChanged += new System.EventHandler(this.DisplayTypeDropDown_SelectedIndexChanged); this.DisplayTypeDropDown.SelectedIndexChanged += new System.EventHandler(this.DisplayTypeDropDown_SelectedIndexChanged);
// //
// BigEndianCheckBox // BigEndianCheckBox
// //
this.BigEndianCheckBox.AutoSize = true; this.BigEndianCheckBox.AutoSize = true;
this.BigEndianCheckBox.Location = new System.Drawing.Point(101, 196); this.BigEndianCheckBox.Location = new System.Drawing.Point(101, 242);
this.BigEndianCheckBox.Name = "BigEndianCheckBox"; this.BigEndianCheckBox.Name = "BigEndianCheckBox";
this.BigEndianCheckBox.Size = new System.Drawing.Size(77, 17); this.BigEndianCheckBox.Size = new System.Drawing.Size(148, 29);
this.BigEndianCheckBox.TabIndex = 22; this.BigEndianCheckBox.TabIndex = 22;
this.BigEndianCheckBox.Text = "Big Endian"; this.BigEndianCheckBox.Text = "Big Endian";
this.BigEndianCheckBox.UseVisualStyleBackColor = true; this.BigEndianCheckBox.UseVisualStyleBackColor = true;
@ -209,7 +211,7 @@
// //
this.AddButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.AddButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.AddButton.Enabled = false; this.AddButton.Enabled = false;
this.AddButton.Location = new System.Drawing.Point(7, 220); this.AddButton.Location = new System.Drawing.Point(7, 265);
this.AddButton.Name = "AddButton"; this.AddButton.Name = "AddButton";
this.AddButton.Size = new System.Drawing.Size(65, 23); this.AddButton.Size = new System.Drawing.Size(65, 23);
this.AddButton.TabIndex = 23; this.AddButton.TabIndex = 23;
@ -221,7 +223,7 @@
// //
this.EditButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.EditButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.EditButton.Enabled = false; this.EditButton.Enabled = false;
this.EditButton.Location = new System.Drawing.Point(113, 220); this.EditButton.Location = new System.Drawing.Point(113, 265);
this.EditButton.Name = "EditButton"; this.EditButton.Name = "EditButton";
this.EditButton.Size = new System.Drawing.Size(65, 23); this.EditButton.Size = new System.Drawing.Size(65, 23);
this.EditButton.TabIndex = 24; this.EditButton.TabIndex = 24;
@ -237,9 +239,10 @@
this.CompareBox.MaxLength = 2; this.CompareBox.MaxLength = 2;
this.CompareBox.Name = "CompareBox"; this.CompareBox.Name = "CompareBox";
this.CompareBox.Nullable = true; this.CompareBox.Nullable = true;
this.CompareBox.Size = new System.Drawing.Size(65, 20); this.CompareBox.Size = new System.Drawing.Size(65, 31);
this.CompareBox.TabIndex = 15; this.CompareBox.TabIndex = 15;
this.CompareBox.Type = BizHawk.Client.Common.DisplayType.Hex; this.CompareBox.Type = BizHawk.Client.Common.DisplayType.Hex;
this.CompareBox.TextChanged += new System.EventHandler(this.CompareBox_TextChanged);
// //
// ValueBox // ValueBox
// //
@ -249,14 +252,39 @@
this.ValueBox.MaxLength = 2; this.ValueBox.MaxLength = 2;
this.ValueBox.Name = "ValueBox"; this.ValueBox.Name = "ValueBox";
this.ValueBox.Nullable = true; this.ValueBox.Nullable = true;
this.ValueBox.Size = new System.Drawing.Size(65, 20); this.ValueBox.Size = new System.Drawing.Size(65, 31);
this.ValueBox.TabIndex = 12; this.ValueBox.TabIndex = 12;
this.ValueBox.Text = "00"; this.ValueBox.Text = "00";
this.ValueBox.Type = BizHawk.Client.Common.DisplayType.Hex; this.ValueBox.Type = BizHawk.Client.Common.DisplayType.Hex;
// //
// CompareTypeDropDown
//
this.CompareTypeDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CompareTypeDropDown.FormattingEnabled = true;
this.CompareTypeDropDown.Location = new System.Drawing.Point(113, 122);
this.CompareTypeDropDown.Name = "CompareTypeDropDown";
this.CompareTypeDropDown.Size = new System.Drawing.Size(65, 33);
this.CompareTypeDropDown.TabIndex = 26;
this.CompareTypeDropDown.Items.AddRange(new object[] {
""
});
this.CompareTypeDropDown.SelectedIndex = 0;
//
// CompareTypeLabel
//
this.CompareTypeLabel.AutoSize = true;
this.CompareTypeLabel.Location = new System.Drawing.Point(24, 125);
this.CompareTypeLabel.Name = "CompareTypeLabel";
this.CompareTypeLabel.Size = new System.Drawing.Size(153, 25);
this.CompareTypeLabel.TabIndex = 25;
this.CompareTypeLabel.Text = "Compare Type";
this.CompareTypeLabel.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
//
// CheatEdit // CheatEdit
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.CompareTypeDropDown);
this.Controls.Add(this.CompareTypeLabel);
this.Controls.Add(this.EditButton); this.Controls.Add(this.EditButton);
this.Controls.Add(this.AddButton); this.Controls.Add(this.AddButton);
this.Controls.Add(this.BigEndianCheckBox); this.Controls.Add(this.BigEndianCheckBox);
@ -278,7 +306,7 @@
this.Controls.Add(this.NameBox); this.Controls.Add(this.NameBox);
this.Controls.Add(this.NameLabel); this.Controls.Add(this.NameLabel);
this.Name = "CheatEdit"; this.Name = "CheatEdit";
this.Size = new System.Drawing.Size(191, 253); this.Size = new System.Drawing.Size(191, 298);
this.Load += new System.EventHandler(this.CheatEdit_Load); this.Load += new System.EventHandler(this.CheatEdit_Load);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -307,5 +335,7 @@
private System.Windows.Forms.CheckBox BigEndianCheckBox; private System.Windows.Forms.CheckBox BigEndianCheckBox;
private System.Windows.Forms.Button AddButton; private System.Windows.Forms.Button AddButton;
private System.Windows.Forms.Button EditButton; private System.Windows.Forms.Button EditButton;
private System.Windows.Forms.ComboBox CompareTypeDropDown;
private System.Windows.Forms.Label CompareTypeLabel;
} }
} }

View File

@ -88,6 +88,16 @@ namespace BizHawk.Client.EmuHawk
ValueBox.Text = _cheat.ValueStr; ValueBox.Text = _cheat.ValueStr;
CompareBox.Text = _cheat.Compare.HasValue ? _cheat.CompareStr : String.Empty; CompareBox.Text = _cheat.Compare.HasValue ? _cheat.CompareStr : String.Empty;
if (_cheat.ComparisonType.Equals(Cheat.COMPARISONTYPE.NONE))
{
CompareTypeDropDown.SelectedIndex = 0;
}
else
{
CompareTypeDropDown.SelectedIndex = ((int)_cheat.ComparisonType - 1);
}
CheckFormState(); CheckFormState();
if (!_cheat.Compare.HasValue) if (!_cheat.Compare.HasValue)
{ {
@ -303,6 +313,7 @@ namespace BizHawk.Client.EmuHawk
{ {
get get
{ {
Cheat.COMPARISONTYPE comparisonType = Cheat.COMPARISONTYPE.NONE;
var domain = MemoryDomains[DomainDropDown.SelectedItem.ToString()]; var domain = MemoryDomains[DomainDropDown.SelectedItem.ToString()];
var address = AddressBox.ToRawInt().Value; var address = AddressBox.ToRawInt().Value;
if (address < domain.Size) if (address < domain.Size)
@ -316,11 +327,29 @@ namespace BizHawk.Client.EmuHawk
NameBox.Text NameBox.Text
); );
switch (CompareTypeDropDown.SelectedItem.ToString())
{
case "": comparisonType = Cheat.COMPARISONTYPE.NONE; break;
case "=": comparisonType = Cheat.COMPARISONTYPE.EQUAL; break;
case ">": comparisonType = Cheat.COMPARISONTYPE.GREATER_THAN; break;
case ">=": comparisonType = Cheat.COMPARISONTYPE.GREATER_THAN_OR_EQUAL; break;
case "<": comparisonType = Cheat.COMPARISONTYPE.LESS_THAN; break;
case "<=": comparisonType = Cheat.COMPARISONTYPE.LESS_THAN_OR_EQUAL; break;
case "!=": comparisonType = Cheat.COMPARISONTYPE.NOT_EQUAL; break;
default: comparisonType = Cheat.COMPARISONTYPE.NONE; break;
}
int? c = CompareBox.ToRawInt() == null ? null : (int?)CompareBox.ToRawInt().Value;
return new Cheat( return new Cheat(
watch, watch,
ValueBox.ToRawInt().Value, ValueBox.ToRawInt().Value,
CompareBox.ToRawInt() CompareBox.ToRawInt() == null ? null : (int?)CompareBox.ToRawInt().Value,
true,
comparisonType
); );
} }
else else
{ {
@ -341,5 +370,55 @@ namespace BizHawk.Client.EmuHawk
} }
#endregion #endregion
private void CompareBox_TextChanged(object sender, EventArgs e)
{
WatchValueBox compareBox = (WatchValueBox)sender;
PopulateComparisonTypeBox(String.IsNullOrWhiteSpace(compareBox.Text));
}
/// <summary>
/// Populates the comparison type drop down
/// </summary>
/// <param name="empty">True if drop down should be left empty</param>
private void PopulateComparisonTypeBox(bool empty = false)
{
// Don't need to do anything in this case
if(empty && this.CompareTypeDropDown.Items.Count == 1)
{
return;
}
// Don't need to do anything in this case
if (!empty && this.CompareTypeDropDown.Items.Count == 6)
{
return;
}
this.CompareTypeDropDown.Items.Clear();
if (empty)
{
this.CompareTypeDropDown.Items.AddRange(new object[] {
""
});
}
else
{
this.CompareTypeDropDown.Items.AddRange(new object[] {
"=",
">",
">=",
"<",
"<=",
"!="
});
}
this.CompareTypeDropDown.SelectedIndex = 0;
}
} }
} }

View File

@ -34,6 +34,7 @@
this.CheatName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.CheatName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Address = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.Address = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Value = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.Value = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ComparisonType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Compare = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.Compare = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.On = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.On = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Domain = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.Domain = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@ -112,7 +113,8 @@
this.Address, this.Address,
this.Value, this.Value,
this.Compare, this.Compare,
this.On, this.ComparisonType,
this.On,
this.Domain}); this.Domain});
this.CheatListView.ContextMenuStrip = this.CheatsContextMenu; this.CheatListView.ContextMenuStrip = this.CheatsContextMenu;
this.CheatListView.FullRowSelect = true; this.CheatListView.FullRowSelect = true;
@ -123,7 +125,7 @@
this.CheatListView.Name = "CheatListView"; this.CheatListView.Name = "CheatListView";
this.CheatListView.SelectAllInProgress = false; this.CheatListView.SelectAllInProgress = false;
this.CheatListView.selectedItem = -1; this.CheatListView.selectedItem = -1;
this.CheatListView.Size = new System.Drawing.Size(414, 278); this.CheatListView.Size = new System.Drawing.Size(414, 315);
this.CheatListView.TabIndex = 1; this.CheatListView.TabIndex = 1;
this.CheatListView.UseCompatibleStateImageBehavior = false; this.CheatListView.UseCompatibleStateImageBehavior = false;
this.CheatListView.UseCustomBackground = true; this.CheatListView.UseCustomBackground = true;
@ -151,6 +153,11 @@
this.Value.Text = "Value"; this.Value.Text = "Value";
this.Value.Width = 40; this.Value.Width = 40;
// //
// ComparisonType
//
this.ComparisonType.Text = "Comparison Type";
this.ComparisonType.Width = 194;
//
// Compare // Compare
// //
this.Compare.Text = "Compare"; this.Compare.Text = "Compare";
@ -168,13 +175,14 @@
// //
// CheatsContextMenu // CheatsContextMenu
// //
this.CheatsContextMenu.ImageScalingSize = new System.Drawing.Size(32, 32);
this.CheatsContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.CheatsContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToggleContextMenuItem, this.ToggleContextMenuItem,
this.RemoveContextMenuItem, this.RemoveContextMenuItem,
this.DisableAllContextMenuItem, this.DisableAllContextMenuItem,
this.ViewInHexEditorContextMenuItem}); this.ViewInHexEditorContextMenuItem});
this.CheatsContextMenu.Name = "contextMenuStrip1"; this.CheatsContextMenu.Name = "contextMenuStrip1";
this.CheatsContextMenu.Size = new System.Drawing.Size(161, 92); this.CheatsContextMenu.Size = new System.Drawing.Size(186, 156);
this.CheatsContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.CheatsContextMenu_Opening); this.CheatsContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.CheatsContextMenu_Opening);
// //
// ToggleContextMenuItem // ToggleContextMenuItem
@ -182,7 +190,7 @@
this.ToggleContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1; this.ToggleContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1;
this.ToggleContextMenuItem.Name = "ToggleContextMenuItem"; this.ToggleContextMenuItem.Name = "ToggleContextMenuItem";
this.ToggleContextMenuItem.ShortcutKeyDisplayString = "Enter"; this.ToggleContextMenuItem.ShortcutKeyDisplayString = "Enter";
this.ToggleContextMenuItem.Size = new System.Drawing.Size(160, 22); this.ToggleContextMenuItem.Size = new System.Drawing.Size(185, 38);
this.ToggleContextMenuItem.Text = "&Toggle"; this.ToggleContextMenuItem.Text = "&Toggle";
this.ToggleContextMenuItem.Click += new System.EventHandler(this.ToggleMenuItem_Click); this.ToggleContextMenuItem.Click += new System.EventHandler(this.ToggleMenuItem_Click);
// //
@ -191,7 +199,7 @@
this.RemoveContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete; this.RemoveContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete;
this.RemoveContextMenuItem.Name = "RemoveContextMenuItem"; this.RemoveContextMenuItem.Name = "RemoveContextMenuItem";
this.RemoveContextMenuItem.ShortcutKeyDisplayString = "Delete"; this.RemoveContextMenuItem.ShortcutKeyDisplayString = "Delete";
this.RemoveContextMenuItem.Size = new System.Drawing.Size(160, 22); this.RemoveContextMenuItem.Size = new System.Drawing.Size(185, 38);
this.RemoveContextMenuItem.Text = "&Remove"; this.RemoveContextMenuItem.Text = "&Remove";
this.RemoveContextMenuItem.Click += new System.EventHandler(this.RemoveCheatMenuItem_Click); this.RemoveContextMenuItem.Click += new System.EventHandler(this.RemoveCheatMenuItem_Click);
// //
@ -199,20 +207,21 @@
// //
this.DisableAllContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop; this.DisableAllContextMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop;
this.DisableAllContextMenuItem.Name = "DisableAllContextMenuItem"; this.DisableAllContextMenuItem.Name = "DisableAllContextMenuItem";
this.DisableAllContextMenuItem.Size = new System.Drawing.Size(160, 22); this.DisableAllContextMenuItem.Size = new System.Drawing.Size(185, 38);
this.DisableAllContextMenuItem.Text = "&Disable All"; this.DisableAllContextMenuItem.Text = "&Disable All";
this.DisableAllContextMenuItem.Click += new System.EventHandler(this.DisableAllCheatsMenuItem_Click); this.DisableAllContextMenuItem.Click += new System.EventHandler(this.DisableAllCheatsMenuItem_Click);
// //
// ViewInHexEditorContextMenuItem // ViewInHexEditorContextMenuItem
// //
this.ViewInHexEditorContextMenuItem.Name = "ViewInHexEditorContextMenuItem"; this.ViewInHexEditorContextMenuItem.Name = "ViewInHexEditorContextMenuItem";
this.ViewInHexEditorContextMenuItem.Size = new System.Drawing.Size(160, 22); this.ViewInHexEditorContextMenuItem.Size = new System.Drawing.Size(185, 38);
this.ViewInHexEditorContextMenuItem.Text = "View in Hex Editor"; this.ViewInHexEditorContextMenuItem.Text = "View in Hex Editor";
this.ViewInHexEditorContextMenuItem.Click += new System.EventHandler(this.ViewInHexEditorContextMenuItem_Click); this.ViewInHexEditorContextMenuItem.Click += new System.EventHandler(this.ViewInHexEditorContextMenuItem_Click);
// //
// CheatsMenu // CheatsMenu
// //
this.CheatsMenu.ClickThrough = true; this.CheatsMenu.ClickThrough = true;
this.CheatsMenu.ImageScalingSize = new System.Drawing.Size(32, 32);
this.CheatsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.CheatsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.FileSubMenu, this.FileSubMenu,
this.CheatsSubMenu, this.CheatsSubMenu,
@ -235,7 +244,7 @@
this.toolStripSeparator1, this.toolStripSeparator1,
this.ExitMenuItem}); this.ExitMenuItem});
this.FileSubMenu.Name = "FileSubMenu"; this.FileSubMenu.Name = "FileSubMenu";
this.FileSubMenu.Size = new System.Drawing.Size(35, 20); this.FileSubMenu.Size = new System.Drawing.Size(37, 20);
this.FileSubMenu.Text = "&File"; this.FileSubMenu.Text = "&File";
this.FileSubMenu.DropDownOpened += new System.EventHandler(this.FileSubMenu_DropDownOpened); this.FileSubMenu.DropDownOpened += new System.EventHandler(this.FileSubMenu_DropDownOpened);
// //
@ -244,7 +253,7 @@
this.NewMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.NewFile; this.NewMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.NewFile;
this.NewMenuItem.Name = "NewMenuItem"; this.NewMenuItem.Name = "NewMenuItem";
this.NewMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); this.NewMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
this.NewMenuItem.Size = new System.Drawing.Size(193, 22); this.NewMenuItem.Size = new System.Drawing.Size(195, 22);
this.NewMenuItem.Text = "&New"; this.NewMenuItem.Text = "&New";
this.NewMenuItem.Click += new System.EventHandler(this.NewMenuItem_Click); this.NewMenuItem.Click += new System.EventHandler(this.NewMenuItem_Click);
// //
@ -253,7 +262,7 @@
this.OpenMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.OpenFile; this.OpenMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.OpenFile;
this.OpenMenuItem.Name = "OpenMenuItem"; this.OpenMenuItem.Name = "OpenMenuItem";
this.OpenMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); this.OpenMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.OpenMenuItem.Size = new System.Drawing.Size(193, 22); this.OpenMenuItem.Size = new System.Drawing.Size(195, 22);
this.OpenMenuItem.Text = "&Open..."; this.OpenMenuItem.Text = "&Open...";
this.OpenMenuItem.Click += new System.EventHandler(this.OpenMenuItem_Click); this.OpenMenuItem.Click += new System.EventHandler(this.OpenMenuItem_Click);
// //
@ -262,7 +271,7 @@
this.SaveMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.SaveAs; this.SaveMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.SaveAs;
this.SaveMenuItem.Name = "SaveMenuItem"; this.SaveMenuItem.Name = "SaveMenuItem";
this.SaveMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); this.SaveMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.SaveMenuItem.Size = new System.Drawing.Size(193, 22); this.SaveMenuItem.Size = new System.Drawing.Size(195, 22);
this.SaveMenuItem.Text = "&Save"; this.SaveMenuItem.Text = "&Save";
this.SaveMenuItem.Click += new System.EventHandler(this.SaveMenuItem_Click); this.SaveMenuItem.Click += new System.EventHandler(this.SaveMenuItem_Click);
// //
@ -271,14 +280,14 @@
this.SaveAsMenuItem.Name = "SaveAsMenuItem"; this.SaveAsMenuItem.Name = "SaveAsMenuItem";
this.SaveAsMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) this.SaveAsMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.S))); | System.Windows.Forms.Keys.S)));
this.SaveAsMenuItem.Size = new System.Drawing.Size(193, 22); this.SaveAsMenuItem.Size = new System.Drawing.Size(195, 22);
this.SaveAsMenuItem.Text = "Save &As..."; this.SaveAsMenuItem.Text = "Save &As...";
this.SaveAsMenuItem.Click += new System.EventHandler(this.SaveAsMenuItem_Click); this.SaveAsMenuItem.Click += new System.EventHandler(this.SaveAsMenuItem_Click);
// //
// AppendMenuItem // AppendMenuItem
// //
this.AppendMenuItem.Name = "AppendMenuItem"; this.AppendMenuItem.Name = "AppendMenuItem";
this.AppendMenuItem.Size = new System.Drawing.Size(193, 22); this.AppendMenuItem.Size = new System.Drawing.Size(195, 22);
this.AppendMenuItem.Text = "Append File"; this.AppendMenuItem.Text = "Append File";
// //
// RecentSubMenu // RecentSubMenu
@ -287,7 +296,7 @@
this.toolStripSeparator4}); this.toolStripSeparator4});
this.RecentSubMenu.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Recent; this.RecentSubMenu.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Recent;
this.RecentSubMenu.Name = "RecentSubMenu"; this.RecentSubMenu.Name = "RecentSubMenu";
this.RecentSubMenu.Size = new System.Drawing.Size(193, 22); this.RecentSubMenu.Size = new System.Drawing.Size(195, 22);
this.RecentSubMenu.Text = "Recent"; this.RecentSubMenu.Text = "Recent";
this.RecentSubMenu.DropDownOpened += new System.EventHandler(this.RecentSubMenu_DropDownOpened); this.RecentSubMenu.DropDownOpened += new System.EventHandler(this.RecentSubMenu_DropDownOpened);
// //
@ -299,13 +308,13 @@
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(190, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(192, 6);
// //
// ExitMenuItem // ExitMenuItem
// //
this.ExitMenuItem.Name = "ExitMenuItem"; this.ExitMenuItem.Name = "ExitMenuItem";
this.ExitMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); this.ExitMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
this.ExitMenuItem.Size = new System.Drawing.Size(193, 22); this.ExitMenuItem.Size = new System.Drawing.Size(195, 22);
this.ExitMenuItem.Text = "E&xit"; this.ExitMenuItem.Text = "E&xit";
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click); this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
// //
@ -324,7 +333,7 @@
this.GameGenieSeparator, this.GameGenieSeparator,
this.OpenGameGenieEncoderDecoderMenuItem}); this.OpenGameGenieEncoderDecoderMenuItem});
this.CheatsSubMenu.Name = "CheatsSubMenu"; this.CheatsSubMenu.Name = "CheatsSubMenu";
this.CheatsSubMenu.Size = new System.Drawing.Size(53, 20); this.CheatsSubMenu.Size = new System.Drawing.Size(55, 20);
this.CheatsSubMenu.Text = "&Cheats"; this.CheatsSubMenu.Text = "&Cheats";
this.CheatsSubMenu.DropDownOpened += new System.EventHandler(this.CheatsSubMenu_DropDownOpened); this.CheatsSubMenu.DropDownOpened += new System.EventHandler(this.CheatsSubMenu_DropDownOpened);
// //
@ -333,7 +342,7 @@
this.RemoveCheatMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete; this.RemoveCheatMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete;
this.RemoveCheatMenuItem.Name = "RemoveCheatMenuItem"; this.RemoveCheatMenuItem.Name = "RemoveCheatMenuItem";
this.RemoveCheatMenuItem.ShortcutKeyDisplayString = "Delete"; this.RemoveCheatMenuItem.ShortcutKeyDisplayString = "Delete";
this.RemoveCheatMenuItem.Size = new System.Drawing.Size(217, 22); this.RemoveCheatMenuItem.Size = new System.Drawing.Size(233, 22);
this.RemoveCheatMenuItem.Text = "&Remove Cheat"; this.RemoveCheatMenuItem.Text = "&Remove Cheat";
this.RemoveCheatMenuItem.Click += new System.EventHandler(this.RemoveCheatMenuItem_Click); this.RemoveCheatMenuItem.Click += new System.EventHandler(this.RemoveCheatMenuItem_Click);
// //
@ -342,21 +351,21 @@
this.InsertSeparatorMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.InsertSeparator; this.InsertSeparatorMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.InsertSeparator;
this.InsertSeparatorMenuItem.Name = "InsertSeparatorMenuItem"; this.InsertSeparatorMenuItem.Name = "InsertSeparatorMenuItem";
this.InsertSeparatorMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I))); this.InsertSeparatorMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
this.InsertSeparatorMenuItem.Size = new System.Drawing.Size(217, 22); this.InsertSeparatorMenuItem.Size = new System.Drawing.Size(233, 22);
this.InsertSeparatorMenuItem.Text = "Insert Separator"; this.InsertSeparatorMenuItem.Text = "Insert Separator";
this.InsertSeparatorMenuItem.Click += new System.EventHandler(this.InsertSeparatorMenuItem_Click); this.InsertSeparatorMenuItem.Click += new System.EventHandler(this.InsertSeparatorMenuItem_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(214, 6); this.toolStripSeparator3.Size = new System.Drawing.Size(230, 6);
// //
// MoveUpMenuItem // MoveUpMenuItem
// //
this.MoveUpMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveUp; this.MoveUpMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveUp;
this.MoveUpMenuItem.Name = "MoveUpMenuItem"; this.MoveUpMenuItem.Name = "MoveUpMenuItem";
this.MoveUpMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U))); this.MoveUpMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U)));
this.MoveUpMenuItem.Size = new System.Drawing.Size(217, 22); this.MoveUpMenuItem.Size = new System.Drawing.Size(233, 22);
this.MoveUpMenuItem.Text = "Move &Up"; this.MoveUpMenuItem.Text = "Move &Up";
this.MoveUpMenuItem.Click += new System.EventHandler(this.MoveUpMenuItem_Click); this.MoveUpMenuItem.Click += new System.EventHandler(this.MoveUpMenuItem_Click);
// //
@ -365,7 +374,7 @@
this.MoveDownMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveDown; this.MoveDownMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveDown;
this.MoveDownMenuItem.Name = "MoveDownMenuItem"; this.MoveDownMenuItem.Name = "MoveDownMenuItem";
this.MoveDownMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D))); this.MoveDownMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
this.MoveDownMenuItem.Size = new System.Drawing.Size(217, 22); this.MoveDownMenuItem.Size = new System.Drawing.Size(233, 22);
this.MoveDownMenuItem.Text = "Move &Down"; this.MoveDownMenuItem.Text = "Move &Down";
this.MoveDownMenuItem.Click += new System.EventHandler(this.MoveDownMenuItem_Click); this.MoveDownMenuItem.Click += new System.EventHandler(this.MoveDownMenuItem_Click);
// //
@ -373,21 +382,21 @@
// //
this.SelectAllMenuItem.Name = "SelectAllMenuItem"; this.SelectAllMenuItem.Name = "SelectAllMenuItem";
this.SelectAllMenuItem.ShortcutKeyDisplayString = "Ctrl+A"; this.SelectAllMenuItem.ShortcutKeyDisplayString = "Ctrl+A";
this.SelectAllMenuItem.Size = new System.Drawing.Size(217, 22); this.SelectAllMenuItem.Size = new System.Drawing.Size(233, 22);
this.SelectAllMenuItem.Text = "Select &All"; this.SelectAllMenuItem.Text = "Select &All";
this.SelectAllMenuItem.Click += new System.EventHandler(this.SelectAllMenuItem_Click); this.SelectAllMenuItem.Click += new System.EventHandler(this.SelectAllMenuItem_Click);
// //
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(214, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(230, 6);
// //
// ToggleMenuItem // ToggleMenuItem
// //
this.ToggleMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1; this.ToggleMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Refresh1;
this.ToggleMenuItem.Name = "ToggleMenuItem"; this.ToggleMenuItem.Name = "ToggleMenuItem";
this.ToggleMenuItem.ShortcutKeyDisplayString = "Enter"; this.ToggleMenuItem.ShortcutKeyDisplayString = "Enter";
this.ToggleMenuItem.Size = new System.Drawing.Size(217, 22); this.ToggleMenuItem.Size = new System.Drawing.Size(233, 22);
this.ToggleMenuItem.Text = "&Toggle"; this.ToggleMenuItem.Text = "&Toggle";
this.ToggleMenuItem.Click += new System.EventHandler(this.ToggleMenuItem_Click); this.ToggleMenuItem.Click += new System.EventHandler(this.ToggleMenuItem_Click);
// //
@ -395,19 +404,19 @@
// //
this.DisableAllCheatsMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop; this.DisableAllCheatsMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Stop;
this.DisableAllCheatsMenuItem.Name = "DisableAllCheatsMenuItem"; this.DisableAllCheatsMenuItem.Name = "DisableAllCheatsMenuItem";
this.DisableAllCheatsMenuItem.Size = new System.Drawing.Size(217, 22); this.DisableAllCheatsMenuItem.Size = new System.Drawing.Size(233, 22);
this.DisableAllCheatsMenuItem.Text = "Disable all"; this.DisableAllCheatsMenuItem.Text = "Disable all";
this.DisableAllCheatsMenuItem.Click += new System.EventHandler(this.DisableAllCheatsMenuItem_Click); this.DisableAllCheatsMenuItem.Click += new System.EventHandler(this.DisableAllCheatsMenuItem_Click);
// //
// GameGenieSeparator // GameGenieSeparator
// //
this.GameGenieSeparator.Name = "GameGenieSeparator"; this.GameGenieSeparator.Name = "GameGenieSeparator";
this.GameGenieSeparator.Size = new System.Drawing.Size(214, 6); this.GameGenieSeparator.Size = new System.Drawing.Size(230, 6);
// //
// OpenGameGenieEncoderDecoderMenuItem // OpenGameGenieEncoderDecoderMenuItem
// //
this.OpenGameGenieEncoderDecoderMenuItem.Name = "OpenGameGenieEncoderDecoderMenuItem"; this.OpenGameGenieEncoderDecoderMenuItem.Name = "OpenGameGenieEncoderDecoderMenuItem";
this.OpenGameGenieEncoderDecoderMenuItem.Size = new System.Drawing.Size(217, 22); this.OpenGameGenieEncoderDecoderMenuItem.Size = new System.Drawing.Size(233, 22);
this.OpenGameGenieEncoderDecoderMenuItem.Text = "Game Genie Encoder/Decoder"; this.OpenGameGenieEncoderDecoderMenuItem.Text = "Game Genie Encoder/Decoder";
this.OpenGameGenieEncoderDecoderMenuItem.Click += new System.EventHandler(this.OpenGameGenieEncoderDecoderMenuItem_Click); this.OpenGameGenieEncoderDecoderMenuItem.Click += new System.EventHandler(this.OpenGameGenieEncoderDecoderMenuItem_Click);
// //
@ -425,79 +434,80 @@
this.toolStripSeparator5, this.toolStripSeparator5,
this.RestoreWindowSizeMenuItem}); this.RestoreWindowSizeMenuItem});
this.OptionsSubMenu.Name = "OptionsSubMenu"; this.OptionsSubMenu.Name = "OptionsSubMenu";
this.OptionsSubMenu.Size = new System.Drawing.Size(56, 20); this.OptionsSubMenu.Size = new System.Drawing.Size(61, 20);
this.OptionsSubMenu.Text = "&Options"; this.OptionsSubMenu.Text = "&Options";
this.OptionsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened); this.OptionsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened);
// //
// AlwaysLoadCheatsMenuItem // AlwaysLoadCheatsMenuItem
// //
this.AlwaysLoadCheatsMenuItem.Name = "AlwaysLoadCheatsMenuItem"; this.AlwaysLoadCheatsMenuItem.Name = "AlwaysLoadCheatsMenuItem";
this.AlwaysLoadCheatsMenuItem.Size = new System.Drawing.Size(192, 22); this.AlwaysLoadCheatsMenuItem.Size = new System.Drawing.Size(199, 22);
this.AlwaysLoadCheatsMenuItem.Text = "Always load cheats"; this.AlwaysLoadCheatsMenuItem.Text = "Always load cheats";
this.AlwaysLoadCheatsMenuItem.Click += new System.EventHandler(this.AlwaysLoadCheatsMenuItem_Click); this.AlwaysLoadCheatsMenuItem.Click += new System.EventHandler(this.AlwaysLoadCheatsMenuItem_Click);
// //
// AutoSaveCheatsMenuItem // AutoSaveCheatsMenuItem
// //
this.AutoSaveCheatsMenuItem.Name = "AutoSaveCheatsMenuItem"; this.AutoSaveCheatsMenuItem.Name = "AutoSaveCheatsMenuItem";
this.AutoSaveCheatsMenuItem.Size = new System.Drawing.Size(192, 22); this.AutoSaveCheatsMenuItem.Size = new System.Drawing.Size(199, 22);
this.AutoSaveCheatsMenuItem.Text = "Autosave cheats"; this.AutoSaveCheatsMenuItem.Text = "Autosave cheats";
this.AutoSaveCheatsMenuItem.Click += new System.EventHandler(this.AutoSaveCheatsMenuItem_Click); this.AutoSaveCheatsMenuItem.Click += new System.EventHandler(this.AutoSaveCheatsMenuItem_Click);
// //
// DisableCheatsOnLoadMenuItem // DisableCheatsOnLoadMenuItem
// //
this.DisableCheatsOnLoadMenuItem.Name = "DisableCheatsOnLoadMenuItem"; this.DisableCheatsOnLoadMenuItem.Name = "DisableCheatsOnLoadMenuItem";
this.DisableCheatsOnLoadMenuItem.Size = new System.Drawing.Size(192, 22); this.DisableCheatsOnLoadMenuItem.Size = new System.Drawing.Size(199, 22);
this.DisableCheatsOnLoadMenuItem.Text = "Disable Cheats on Load"; this.DisableCheatsOnLoadMenuItem.Text = "Disable Cheats on Load";
this.DisableCheatsOnLoadMenuItem.Click += new System.EventHandler(this.CheatsOnOffLoadMenuItem_Click); this.DisableCheatsOnLoadMenuItem.Click += new System.EventHandler(this.CheatsOnOffLoadMenuItem_Click);
// //
// toolStripSeparator7 // toolStripSeparator7
// //
this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(189, 6); this.toolStripSeparator7.Size = new System.Drawing.Size(196, 6);
// //
// AutoloadMenuItem // AutoloadMenuItem
// //
this.AutoloadMenuItem.Name = "AutoloadMenuItem"; this.AutoloadMenuItem.Name = "AutoloadMenuItem";
this.AutoloadMenuItem.Size = new System.Drawing.Size(192, 22); this.AutoloadMenuItem.Size = new System.Drawing.Size(199, 22);
this.AutoloadMenuItem.Text = "Autoload"; this.AutoloadMenuItem.Text = "Autoload";
this.AutoloadMenuItem.Click += new System.EventHandler(this.AutoloadMenuItem_Click); this.AutoloadMenuItem.Click += new System.EventHandler(this.AutoloadMenuItem_Click);
// //
// SaveWindowPositionMenuItem // SaveWindowPositionMenuItem
// //
this.SaveWindowPositionMenuItem.Name = "SaveWindowPositionMenuItem"; this.SaveWindowPositionMenuItem.Name = "SaveWindowPositionMenuItem";
this.SaveWindowPositionMenuItem.Size = new System.Drawing.Size(192, 22); this.SaveWindowPositionMenuItem.Size = new System.Drawing.Size(199, 22);
this.SaveWindowPositionMenuItem.Text = "Save Window Position"; this.SaveWindowPositionMenuItem.Text = "Save Window Position";
this.SaveWindowPositionMenuItem.Click += new System.EventHandler(this.SaveWindowPositionMenuItem_Click); this.SaveWindowPositionMenuItem.Click += new System.EventHandler(this.SaveWindowPositionMenuItem_Click);
// //
// AlwaysOnTopMenuItem // AlwaysOnTopMenuItem
// //
this.AlwaysOnTopMenuItem.Name = "AlwaysOnTopMenuItem"; this.AlwaysOnTopMenuItem.Name = "AlwaysOnTopMenuItem";
this.AlwaysOnTopMenuItem.Size = new System.Drawing.Size(192, 22); this.AlwaysOnTopMenuItem.Size = new System.Drawing.Size(199, 22);
this.AlwaysOnTopMenuItem.Text = "Always on &Top"; this.AlwaysOnTopMenuItem.Text = "Always on &Top";
this.AlwaysOnTopMenuItem.Click += new System.EventHandler(this.AlwaysOnTopMenuItem_Click); this.AlwaysOnTopMenuItem.Click += new System.EventHandler(this.AlwaysOnTopMenuItem_Click);
// //
// FloatingWindowMenuItem // FloatingWindowMenuItem
// //
this.FloatingWindowMenuItem.Name = "FloatingWindowMenuItem"; this.FloatingWindowMenuItem.Name = "FloatingWindowMenuItem";
this.FloatingWindowMenuItem.Size = new System.Drawing.Size(192, 22); this.FloatingWindowMenuItem.Size = new System.Drawing.Size(199, 22);
this.FloatingWindowMenuItem.Text = "Floating Window"; this.FloatingWindowMenuItem.Text = "Floating Window";
this.FloatingWindowMenuItem.Click += new System.EventHandler(this.FloatingWindowMenuItem_Click); this.FloatingWindowMenuItem.Click += new System.EventHandler(this.FloatingWindowMenuItem_Click);
// //
// toolStripSeparator5 // toolStripSeparator5
// //
this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(189, 6); this.toolStripSeparator5.Size = new System.Drawing.Size(196, 6);
// //
// RestoreWindowSizeMenuItem // RestoreWindowSizeMenuItem
// //
this.RestoreWindowSizeMenuItem.Name = "RestoreWindowSizeMenuItem"; this.RestoreWindowSizeMenuItem.Name = "RestoreWindowSizeMenuItem";
this.RestoreWindowSizeMenuItem.Size = new System.Drawing.Size(192, 22); this.RestoreWindowSizeMenuItem.Size = new System.Drawing.Size(199, 22);
this.RestoreWindowSizeMenuItem.Text = "Restore Default Settings"; this.RestoreWindowSizeMenuItem.Text = "Restore Default Settings";
this.RestoreWindowSizeMenuItem.Click += new System.EventHandler(this.RestoreDefaultsMenuItem_Click); this.RestoreWindowSizeMenuItem.Click += new System.EventHandler(this.RestoreDefaultsMenuItem_Click);
// //
// toolStrip1 // toolStrip1
// //
this.toolStrip1.ClickThrough = true; this.toolStrip1.ClickThrough = true;
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(32, 32);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.NewToolBarItem, this.NewToolBarItem,
this.OpenToolBarItem, this.OpenToolBarItem,
@ -512,7 +522,7 @@
this.LoadGameGenieToolbarItem}); this.LoadGameGenieToolbarItem});
this.toolStrip1.Location = new System.Drawing.Point(0, 24); this.toolStrip1.Location = new System.Drawing.Point(0, 24);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(646, 25); this.toolStrip1.Size = new System.Drawing.Size(646, 39);
this.toolStrip1.TabIndex = 3; this.toolStrip1.TabIndex = 3;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
@ -522,7 +532,7 @@
this.NewToolBarItem.Image = ((System.Drawing.Image)(resources.GetObject("NewToolBarItem.Image"))); this.NewToolBarItem.Image = ((System.Drawing.Image)(resources.GetObject("NewToolBarItem.Image")));
this.NewToolBarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.NewToolBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
this.NewToolBarItem.Name = "NewToolBarItem"; this.NewToolBarItem.Name = "NewToolBarItem";
this.NewToolBarItem.Size = new System.Drawing.Size(23, 22); this.NewToolBarItem.Size = new System.Drawing.Size(36, 36);
this.NewToolBarItem.Text = "&New"; this.NewToolBarItem.Text = "&New";
this.NewToolBarItem.Click += new System.EventHandler(this.NewMenuItem_Click); this.NewToolBarItem.Click += new System.EventHandler(this.NewMenuItem_Click);
// //
@ -532,7 +542,7 @@
this.OpenToolBarItem.Image = ((System.Drawing.Image)(resources.GetObject("OpenToolBarItem.Image"))); this.OpenToolBarItem.Image = ((System.Drawing.Image)(resources.GetObject("OpenToolBarItem.Image")));
this.OpenToolBarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.OpenToolBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
this.OpenToolBarItem.Name = "OpenToolBarItem"; this.OpenToolBarItem.Name = "OpenToolBarItem";
this.OpenToolBarItem.Size = new System.Drawing.Size(23, 22); this.OpenToolBarItem.Size = new System.Drawing.Size(36, 36);
this.OpenToolBarItem.Text = "&Open"; this.OpenToolBarItem.Text = "&Open";
this.OpenToolBarItem.Click += new System.EventHandler(this.OpenMenuItem_Click); this.OpenToolBarItem.Click += new System.EventHandler(this.OpenMenuItem_Click);
// //
@ -542,14 +552,14 @@
this.SaveToolBarItem.Image = ((System.Drawing.Image)(resources.GetObject("SaveToolBarItem.Image"))); this.SaveToolBarItem.Image = ((System.Drawing.Image)(resources.GetObject("SaveToolBarItem.Image")));
this.SaveToolBarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.SaveToolBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
this.SaveToolBarItem.Name = "SaveToolBarItem"; this.SaveToolBarItem.Name = "SaveToolBarItem";
this.SaveToolBarItem.Size = new System.Drawing.Size(23, 22); this.SaveToolBarItem.Size = new System.Drawing.Size(36, 36);
this.SaveToolBarItem.Text = "&Save"; this.SaveToolBarItem.Text = "&Save";
this.SaveToolBarItem.Click += new System.EventHandler(this.SaveMenuItem_Click); this.SaveToolBarItem.Click += new System.EventHandler(this.SaveMenuItem_Click);
// //
// toolStripSeparator // toolStripSeparator
// //
this.toolStripSeparator.Name = "toolStripSeparator"; this.toolStripSeparator.Name = "toolStripSeparator";
this.toolStripSeparator.Size = new System.Drawing.Size(6, 25); this.toolStripSeparator.Size = new System.Drawing.Size(6, 39);
// //
// RemoveToolbarItem // RemoveToolbarItem
// //
@ -557,7 +567,7 @@
this.RemoveToolbarItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete; this.RemoveToolbarItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Delete;
this.RemoveToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.RemoveToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
this.RemoveToolbarItem.Name = "RemoveToolbarItem"; this.RemoveToolbarItem.Name = "RemoveToolbarItem";
this.RemoveToolbarItem.Size = new System.Drawing.Size(23, 22); this.RemoveToolbarItem.Size = new System.Drawing.Size(36, 36);
this.RemoveToolbarItem.Text = "&Remove"; this.RemoveToolbarItem.Text = "&Remove";
this.RemoveToolbarItem.Click += new System.EventHandler(this.RemoveCheatMenuItem_Click); this.RemoveToolbarItem.Click += new System.EventHandler(this.RemoveCheatMenuItem_Click);
// //
@ -567,14 +577,14 @@
this.SeparatorToolbarItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.InsertSeparator; this.SeparatorToolbarItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.InsertSeparator;
this.SeparatorToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.SeparatorToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
this.SeparatorToolbarItem.Name = "SeparatorToolbarItem"; this.SeparatorToolbarItem.Name = "SeparatorToolbarItem";
this.SeparatorToolbarItem.Size = new System.Drawing.Size(23, 22); this.SeparatorToolbarItem.Size = new System.Drawing.Size(36, 36);
this.SeparatorToolbarItem.Text = "Insert Separator"; this.SeparatorToolbarItem.Text = "Insert Separator";
this.SeparatorToolbarItem.Click += new System.EventHandler(this.InsertSeparatorMenuItem_Click); this.SeparatorToolbarItem.Click += new System.EventHandler(this.InsertSeparatorMenuItem_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); this.toolStripSeparator2.Size = new System.Drawing.Size(6, 39);
// //
// MoveUpToolbarItem // MoveUpToolbarItem
// //
@ -582,7 +592,7 @@
this.MoveUpToolbarItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveUp; this.MoveUpToolbarItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveUp;
this.MoveUpToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.MoveUpToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
this.MoveUpToolbarItem.Name = "MoveUpToolbarItem"; this.MoveUpToolbarItem.Name = "MoveUpToolbarItem";
this.MoveUpToolbarItem.Size = new System.Drawing.Size(23, 22); this.MoveUpToolbarItem.Size = new System.Drawing.Size(36, 36);
this.MoveUpToolbarItem.Text = "Move Up"; this.MoveUpToolbarItem.Text = "Move Up";
this.MoveUpToolbarItem.Click += new System.EventHandler(this.MoveUpMenuItem_Click); this.MoveUpToolbarItem.Click += new System.EventHandler(this.MoveUpMenuItem_Click);
// //
@ -592,14 +602,14 @@
this.MoveDownToolbarItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveDown; this.MoveDownToolbarItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.MoveDown;
this.MoveDownToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.MoveDownToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
this.MoveDownToolbarItem.Name = "MoveDownToolbarItem"; this.MoveDownToolbarItem.Name = "MoveDownToolbarItem";
this.MoveDownToolbarItem.Size = new System.Drawing.Size(23, 22); this.MoveDownToolbarItem.Size = new System.Drawing.Size(36, 36);
this.MoveDownToolbarItem.Text = "Move Down"; this.MoveDownToolbarItem.Text = "Move Down";
this.MoveDownToolbarItem.Click += new System.EventHandler(this.MoveDownMenuItem_Click); this.MoveDownToolbarItem.Click += new System.EventHandler(this.MoveDownMenuItem_Click);
// //
// GameGenieToolbarSeparator // GameGenieToolbarSeparator
// //
this.GameGenieToolbarSeparator.Name = "GameGenieToolbarSeparator"; this.GameGenieToolbarSeparator.Name = "GameGenieToolbarSeparator";
this.GameGenieToolbarSeparator.Size = new System.Drawing.Size(6, 25); this.GameGenieToolbarSeparator.Size = new System.Drawing.Size(6, 39);
// //
// LoadGameGenieToolbarItem // LoadGameGenieToolbarItem
// //
@ -607,7 +617,7 @@
this.LoadGameGenieToolbarItem.Image = ((System.Drawing.Image)(resources.GetObject("LoadGameGenieToolbarItem.Image"))); this.LoadGameGenieToolbarItem.Image = ((System.Drawing.Image)(resources.GetObject("LoadGameGenieToolbarItem.Image")));
this.LoadGameGenieToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.LoadGameGenieToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
this.LoadGameGenieToolbarItem.Name = "LoadGameGenieToolbarItem"; this.LoadGameGenieToolbarItem.Name = "LoadGameGenieToolbarItem";
this.LoadGameGenieToolbarItem.Size = new System.Drawing.Size(68, 22); this.LoadGameGenieToolbarItem.Size = new System.Drawing.Size(75, 36);
this.LoadGameGenieToolbarItem.Text = "Game Genie"; this.LoadGameGenieToolbarItem.Text = "Game Genie";
this.LoadGameGenieToolbarItem.ToolTipText = "Open the Game Genie Encoder/Decoder"; this.LoadGameGenieToolbarItem.ToolTipText = "Open the Game Genie Encoder/Decoder";
this.LoadGameGenieToolbarItem.Click += new System.EventHandler(this.OpenGameGenieEncoderDecoderMenuItem_Click); this.LoadGameGenieToolbarItem.Click += new System.EventHandler(this.OpenGameGenieEncoderDecoderMenuItem_Click);
@ -625,7 +635,7 @@
// //
this.MessageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.MessageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.MessageLabel.AutoSize = true; this.MessageLabel.AutoSize = true;
this.MessageLabel.Location = new System.Drawing.Point(13, 354); this.MessageLabel.Location = new System.Drawing.Point(13, 391);
this.MessageLabel.Name = "MessageLabel"; this.MessageLabel.Name = "MessageLabel";
this.MessageLabel.Size = new System.Drawing.Size(31, 13); this.MessageLabel.Size = new System.Drawing.Size(31, 13);
this.MessageLabel.TabIndex = 7; this.MessageLabel.TabIndex = 7;
@ -638,7 +648,7 @@
this.CheatGroupBox.Controls.Add(this.CheatEditor); this.CheatGroupBox.Controls.Add(this.CheatEditor);
this.CheatGroupBox.Location = new System.Drawing.Point(432, 66); this.CheatGroupBox.Location = new System.Drawing.Point(432, 66);
this.CheatGroupBox.Name = "CheatGroupBox"; this.CheatGroupBox.Name = "CheatGroupBox";
this.CheatGroupBox.Size = new System.Drawing.Size(202, 284); this.CheatGroupBox.Size = new System.Drawing.Size(202, 321);
this.CheatGroupBox.TabIndex = 8; this.CheatGroupBox.TabIndex = 8;
this.CheatGroupBox.TabStop = false; this.CheatGroupBox.TabStop = false;
this.CheatGroupBox.Text = "New Cheat"; this.CheatGroupBox.Text = "New Cheat";
@ -651,14 +661,14 @@
this.CheatEditor.Location = new System.Drawing.Point(6, 14); this.CheatEditor.Location = new System.Drawing.Point(6, 14);
this.CheatEditor.MemoryDomains = null; this.CheatEditor.MemoryDomains = null;
this.CheatEditor.Name = "CheatEditor"; this.CheatEditor.Name = "CheatEditor";
this.CheatEditor.Size = new System.Drawing.Size(190, 264); this.CheatEditor.Size = new System.Drawing.Size(190, 307);
this.CheatEditor.TabIndex = 0; this.CheatEditor.TabIndex = 0;
// //
// Cheats // Cheats
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(646, 370); this.ClientSize = new System.Drawing.Size(646, 407);
this.Controls.Add(this.CheatGroupBox); this.Controls.Add(this.CheatGroupBox);
this.Controls.Add(this.MessageLabel); this.Controls.Add(this.MessageLabel);
this.Controls.Add(this.TotalLabel); this.Controls.Add(this.TotalLabel);
@ -666,7 +676,7 @@
this.Controls.Add(this.CheatsMenu); this.Controls.Add(this.CheatsMenu);
this.Controls.Add(this.CheatListView); this.Controls.Add(this.CheatListView);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimumSize = new System.Drawing.Size(285, 384); this.MinimumSize = new System.Drawing.Size(280, 369);
this.Name = "Cheats"; this.Name = "Cheats";
this.Text = "Cheats"; this.Text = "Cheats";
this.Load += new System.EventHandler(this.Cheats_Load); this.Load += new System.EventHandler(this.Cheats_Load);
@ -689,6 +699,7 @@
private System.Windows.Forms.ColumnHeader CheatName; private System.Windows.Forms.ColumnHeader CheatName;
private System.Windows.Forms.ColumnHeader Address; private System.Windows.Forms.ColumnHeader Address;
private System.Windows.Forms.ColumnHeader Value; private System.Windows.Forms.ColumnHeader Value;
private System.Windows.Forms.ColumnHeader ComparisonType;
private System.Windows.Forms.ColumnHeader Compare; private System.Windows.Forms.ColumnHeader Compare;
private System.Windows.Forms.ColumnHeader On; private System.Windows.Forms.ColumnHeader On;
private System.Windows.Forms.ColumnHeader Domain; private System.Windows.Forms.ColumnHeader Domain;

View File

@ -10,6 +10,7 @@ using BizHawk.Emulation.Common;
using BizHawk.Client.Common; using BizHawk.Client.Common;
using BizHawk.Client.EmuHawk.ToolExtensions; using BizHawk.Client.EmuHawk.ToolExtensions;
using BizHawk.Client.EmuHawk.WinFormExtensions; using BizHawk.Client.EmuHawk.WinFormExtensions;
using System.Diagnostics;
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk
{ {
@ -24,6 +25,7 @@ namespace BizHawk.Client.EmuHawk
private const string SIZE = "SizeColumn"; private const string SIZE = "SizeColumn";
private const string ENDIAN = "EndianColumn"; private const string ENDIAN = "EndianColumn";
private const string TYPE = "DisplayTypeColumn"; private const string TYPE = "DisplayTypeColumn";
private const string COMPARISONTYPE = "ComparisonTypeColumn";
private int _defaultWidth; private int _defaultWidth;
private int _defaultHeight; private int _defaultHeight;
@ -261,6 +263,20 @@ namespace BizHawk.Client.EmuHawk
break; break;
case TYPE: case TYPE:
text = Watch.DisplayTypeToString(Global.CheatList[index].Type); text = Watch.DisplayTypeToString(Global.CheatList[index].Type);
break;
case COMPARISONTYPE:
switch (Global.CheatList[index].ComparisonType)
{
case Cheat.COMPARISONTYPE.NONE : text = ""; break;
case Cheat.COMPARISONTYPE.EQUAL : text = "="; break;
case Cheat.COMPARISONTYPE.GREATER_THAN : text = ">"; break;
case Cheat.COMPARISONTYPE.GREATER_THAN_OR_EQUAL : text = ">="; break;
case Cheat.COMPARISONTYPE.LESS_THAN : text = "<"; break;
case Cheat.COMPARISONTYPE.LESS_THAN_OR_EQUAL : text = "<="; break;
case Cheat.COMPARISONTYPE.NOT_EQUAL : text = "!="; break;
default : text = ""; break;
}
break; break;
} }
} }
@ -699,11 +715,12 @@ namespace BizHawk.Client.EmuHawk
new Column { Name = ADDRESS, Visible = true, Index = 1, Width = 60 }, new Column { Name = ADDRESS, Visible = true, Index = 1, Width = 60 },
new Column { Name = VALUE, Visible = true, Index = 2, Width = 59 }, new Column { Name = VALUE, Visible = true, Index = 2, Width = 59 },
new Column { Name = COMPARE, Visible = true, Index = 3, Width = 59 }, new Column { Name = COMPARE, Visible = true, Index = 3, Width = 59 },
new Column { Name = ON, Visible = false, Index = 4, Width = 28 }, new Column { Name = COMPARISONTYPE, Visible = true, Index = 4, Width = 60 },
new Column { Name = DOMAIN, Visible = true, Index = 5, Width = 55 }, new Column { Name = ON, Visible = false, Index = 5, Width = 28 },
new Column { Name = SIZE, Visible = true, Index = 6, Width = 55 }, new Column { Name = DOMAIN, Visible = true, Index = 6, Width = 55 },
new Column { Name = ENDIAN, Visible = false, Index = 7, Width = 55 }, new Column { Name = SIZE, Visible = true, Index = 7, Width = 55 },
new Column { Name = TYPE, Visible = false, Index = 8, Width = 55 } new Column { Name = ENDIAN, Visible = false, Index = 8, Width = 55 },
new Column { Name = TYPE, Visible = false, Index = 9, Width = 55 }
}; };
} }