Start AutoHawk, just a stub with the anticipated required services and a config object
This commit is contained in:
parent
154d4a1983
commit
1631297cdd
|
@ -628,6 +628,12 @@
|
|||
<Compile Include="Sound\Utilities\SoundOutputProvider.cs" />
|
||||
<Compile Include="Throttle.cs" />
|
||||
<Compile Include="ToolAttributes.cs" />
|
||||
<Compile Include="tools\AutoHawk.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\AutoHawk.Designer.cs">
|
||||
<DependentUpon>AutoHawk.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\BatchRun.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -1283,6 +1289,9 @@
|
|||
<EmbeddedResource Include="RomStatusPicker.resx">
|
||||
<DependentUpon>RomStatusPicker.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\AutoHawk.resx">
|
||||
<DependentUpon>AutoHawk.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\BatchRun.resx">
|
||||
<DependentUpon>BatchRun.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -179,6 +179,7 @@
|
|||
this.GBInSGBMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.NesInQuickNESMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SnesWithSnes9xMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.gBAWithMGBAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.N64VideoPluginSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||
|
@ -195,6 +196,7 @@
|
|||
this.TAStudioMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.MacroToolMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.VirtualPadMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.AutoHawkMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.CheatsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.LuaConsoleMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -393,7 +395,6 @@
|
|||
this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.gBAWithMGBAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.MainformMenu.SuspendLayout();
|
||||
this.MainStatusBar.SuspendLayout();
|
||||
this.MainFormContextMenu.SuspendLayout();
|
||||
|
@ -1722,6 +1723,13 @@
|
|||
this.SnesWithSnes9xMenuItem.Text = "SNES with Snes9x";
|
||||
this.SnesWithSnes9xMenuItem.Click += new System.EventHandler(this.SnesWithSnes9xMenuItem_Click);
|
||||
//
|
||||
// gBAWithMGBAToolStripMenuItem
|
||||
//
|
||||
this.gBAWithMGBAToolStripMenuItem.Name = "gBAWithMGBAToolStripMenuItem";
|
||||
this.gBAWithMGBAToolStripMenuItem.Size = new System.Drawing.Size(210, 22);
|
||||
this.gBAWithMGBAToolStripMenuItem.Text = "GBA with mGBA";
|
||||
this.gBAWithMGBAToolStripMenuItem.Click += new System.EventHandler(this.gBAWithMGBAToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator8
|
||||
//
|
||||
this.toolStripSeparator8.Name = "toolStripSeparator8";
|
||||
|
@ -1769,6 +1777,7 @@
|
|||
this.TAStudioMenuItem,
|
||||
this.MacroToolMenuItem,
|
||||
this.VirtualPadMenuItem,
|
||||
this.AutoHawkMenuItem,
|
||||
this.toolStripSeparator11,
|
||||
this.CheatsMenuItem,
|
||||
this.LuaConsoleMenuItem,
|
||||
|
@ -1856,6 +1865,13 @@
|
|||
this.VirtualPadMenuItem.Text = "Virtual Pad";
|
||||
this.VirtualPadMenuItem.Click += new System.EventHandler(this.VirtualPadMenuItem_Click);
|
||||
//
|
||||
// AutoHawkMenuItem
|
||||
//
|
||||
this.AutoHawkMenuItem.Name = "AutoHawkMenuItem";
|
||||
this.AutoHawkMenuItem.Size = new System.Drawing.Size(172, 22);
|
||||
this.AutoHawkMenuItem.Text = "AutoHawk";
|
||||
this.AutoHawkMenuItem.Click += new System.EventHandler(this.AutoHawkMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator11
|
||||
//
|
||||
this.toolStripSeparator11.Name = "toolStripSeparator11";
|
||||
|
@ -3472,13 +3488,6 @@
|
|||
this.ShowMenuContextMenuItem.Text = "Show Menu";
|
||||
this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click);
|
||||
//
|
||||
// gBAWithMGBAToolStripMenuItem
|
||||
//
|
||||
this.gBAWithMGBAToolStripMenuItem.Name = "gBAWithMGBAToolStripMenuItem";
|
||||
this.gBAWithMGBAToolStripMenuItem.Size = new System.Drawing.Size(210, 22);
|
||||
this.gBAWithMGBAToolStripMenuItem.Text = "GBA with mGBA";
|
||||
this.gBAWithMGBAToolStripMenuItem.Click += new System.EventHandler(this.gBAWithMGBAToolStripMenuItem_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
|
@ -3883,6 +3892,7 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem GBAmGBAMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem GBAVBANextMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem gBAWithMGBAToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem AutoHawkMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1117,6 +1117,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
DebuggerMenuItem.Enabled = GlobalWin.Tools.IsAvailable<GenericDebugger>();
|
||||
|
||||
batchRunnerToolStripMenuItem.Visible = VersionInfo.DeveloperBuild;
|
||||
|
||||
AutoHawkMenuItem.Enabled = GlobalWin.Tools.IsAvailable<AutoHawk>();
|
||||
AutoHawkMenuItem.Visible = VersionInfo.DeveloperBuild;
|
||||
}
|
||||
|
||||
private void ToolBoxMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -3772,5 +3772,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.Config.GBA_UsemGBA ^= true;
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
|
||||
private void AutoHawkMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
GlobalWin.Tools.Load<AutoHawk>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
partial class AutoHawk
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.AutoMenu = new System.Windows.Forms.MenuStrip();
|
||||
this.FileSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.AutoMenu.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// AutoMenu
|
||||
//
|
||||
this.AutoMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.FileSubMenu});
|
||||
this.AutoMenu.Location = new System.Drawing.Point(0, 0);
|
||||
this.AutoMenu.Name = "AutoMenu";
|
||||
this.AutoMenu.Size = new System.Drawing.Size(508, 24);
|
||||
this.AutoMenu.TabIndex = 2;
|
||||
this.AutoMenu.Text = "menuStrip1";
|
||||
//
|
||||
// FileSubMenu
|
||||
//
|
||||
this.FileSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.ExitMenuItem});
|
||||
this.FileSubMenu.Name = "FileSubMenu";
|
||||
this.FileSubMenu.Size = new System.Drawing.Size(37, 20);
|
||||
this.FileSubMenu.Text = "&File";
|
||||
//
|
||||
// ExitMenuItem
|
||||
//
|
||||
this.ExitMenuItem.Name = "ExitMenuItem";
|
||||
this.ExitMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.ExitMenuItem.Text = "E&xit";
|
||||
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
|
||||
//
|
||||
// AutoHawk
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(508, 444);
|
||||
this.Controls.Add(this.AutoMenu);
|
||||
this.MainMenuStrip = this.AutoMenu;
|
||||
this.Name = "AutoHawk";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "AutoHawk";
|
||||
this.Load += new System.EventHandler(this.AutoHawk_Load);
|
||||
this.AutoMenu.ResumeLayout(false);
|
||||
this.AutoMenu.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.MenuStrip AutoMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem FileSubMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem ExitMenuItem;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
[ToolAttributes(released: false)]
|
||||
public partial class AutoHawk : Form, IToolFormAutoConfig
|
||||
{
|
||||
public AutoHawk()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void AutoHawk_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[RequiredService]
|
||||
public IMemoryDomains MemoryDomains { get; set; }
|
||||
|
||||
[RequiredService]
|
||||
public IStatable StatableCore { get; set; }
|
||||
|
||||
[ConfigPersist]
|
||||
public ConfigVariables Config { get; set; }
|
||||
|
||||
public class ConfigVariables
|
||||
{
|
||||
// anything that needs to be saved in config.ini should go here
|
||||
}
|
||||
|
||||
#region IToolForm Implementation
|
||||
|
||||
public void UpdateValues()
|
||||
{
|
||||
// TODO: per frame stuff goes here
|
||||
}
|
||||
|
||||
public void FastUpdate()
|
||||
{
|
||||
// TODO: when the user is turboing this will be called, slow things like updating graphics should be avoided, but critical operations must still be done here
|
||||
}
|
||||
|
||||
public void Restart()
|
||||
{
|
||||
// When the user changes to a new ROM, closes a ROM, starts a movie, etc, this will be called
|
||||
}
|
||||
|
||||
public bool UpdateBefore { get { return true; } }
|
||||
|
||||
public bool AskSaveChanges()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void ExitMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="AutoMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
Loading…
Reference in New Issue