Cheats - use the integrated tool instead of the one-off platform specific tools
This commit is contained in:
parent
1d10565992
commit
7654374682
|
@ -7,10 +7,6 @@ using System.Linq;
|
|||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||
using BizHawk.Emulation.Cores.Nintendo.SNES;
|
||||
using BizHawk.Emulation.Cores.Sega.Genesis;
|
||||
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Client.EmuHawk.ToolExtensions;
|
||||
using BizHawk.Client.EmuHawk.WinFormExtensions;
|
||||
|
@ -172,7 +168,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
GameGenieToolbarSeparator.Visible =
|
||||
LoadGameGenieToolbarItem.Visible =
|
||||
GlobalWin.Tools.GameGenieAvailable;
|
||||
GlobalWin.Tools.IsAvailable<GameShark>();
|
||||
}
|
||||
|
||||
private void AddCheat()
|
||||
|
@ -443,7 +439,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
GameGenieSeparator.Visible =
|
||||
OpenGameGenieEncoderDecoderMenuItem.Visible =
|
||||
GlobalWin.Tools.GameGenieAvailable;
|
||||
GlobalWin.Tools.IsAvailable<GameShark>();
|
||||
}
|
||||
|
||||
private void RemoveCheatMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -716,19 +716,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
return true;
|
||||
}
|
||||
|
||||
// Eventually we want a single game genie tool, then this mess goes away
|
||||
public bool GameGenieAvailable
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Global.Emulator.SystemId == "NES")
|
||||
|| (Global.Emulator.SystemId == "GEN")
|
||||
|| (Global.Emulator.SystemId == "GB")
|
||||
|| (Global.Game.System == "GG")
|
||||
|| (Global.Emulator is BizHawk.Emulation.Cores.Nintendo.SNES.LibsnesCore);
|
||||
}
|
||||
}
|
||||
|
||||
// Note: Referencing these properties creates an instance of the tool and persists it. They should be referenced by type if this is not desired
|
||||
#region Tools
|
||||
|
||||
|
@ -943,21 +930,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void LoadGameGenieEc()
|
||||
{
|
||||
if (Global.Emulator.SystemId == "NES")
|
||||
if (GlobalWin.Tools.IsAvailable<GameShark>())
|
||||
{
|
||||
Load<NESGameGenie>();
|
||||
}
|
||||
else if (Global.Emulator.SystemId == "SNES")
|
||||
{
|
||||
Load<SNESGameGenie>();
|
||||
}
|
||||
else if ((Global.Emulator.SystemId == "GB") || (Global.Game.System == "GG"))
|
||||
{
|
||||
Load<GBGameGenie>();
|
||||
}
|
||||
else if (Global.Emulator.SystemId == "GEN")
|
||||
{
|
||||
Load<GenGameGenie>();
|
||||
GlobalWin.Tools.Load<GameShark>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue