Added SMS specific menu: Graphics Settings

PCE Graphics Settings dialog bugfix
This commit is contained in:
taotao54321 2012-03-11 17:08:25 +00:00
parent 3dcd94ea3d
commit a595e367db
8 changed files with 336 additions and 1 deletions

View File

@ -303,6 +303,9 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SMStools\SMSGraphicsConfig.resx">
<DependentUpon>SMSGraphicsConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="tools\RamWatch.resx">
<DependentUpon>RamWatch.cs</DependentUpon>
<SubType>Designer</SubType>
@ -333,6 +336,12 @@
<DependentUpon>RecordMovie.cs</DependentUpon>
</Compile>
<Compile Include="SavestateManager.cs" />
<Compile Include="SMStools\SMSGraphicsConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SMStools\SMSGraphicsConfig.Designer.cs">
<DependentUpon>SMSGraphicsConfig.cs</DependentUpon>
</Compile>
<Compile Include="Throttle.cs" />
<Compile Include="config\HotkeyWindow.cs">
<SubType>Form</SubType>

View File

@ -265,6 +265,8 @@
this.screenshotToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.closeROMToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.showMenuToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sMSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.smsGraphicsSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.StatusSlot0.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
@ -281,6 +283,7 @@
this.toolsToolStripMenuItem,
this.NESToolStripMenuItem,
this.pCEToolStripMenuItem,
this.sMSToolStripMenuItem,
this.tI83ToolStripMenuItem,
this.gBToolStripMenuItem,
this.helpToolStripMenuItem});
@ -2181,6 +2184,21 @@
this.showMenuToolStripMenuItem.Text = "Show Menu";
this.showMenuToolStripMenuItem.Click += new System.EventHandler(this.showMenuToolStripMenuItem_Click);
//
// sMSToolStripMenuItem
//
this.sMSToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.smsGraphicsSettingsToolStripMenuItem});
this.sMSToolStripMenuItem.Name = "sMSToolStripMenuItem";
this.sMSToolStripMenuItem.Size = new System.Drawing.Size(40, 16);
this.sMSToolStripMenuItem.Text = "&SMS";
//
// smsGraphicsSettingsToolStripMenuItem
//
this.smsGraphicsSettingsToolStripMenuItem.Name = "smsGraphicsSettingsToolStripMenuItem";
this.smsGraphicsSettingsToolStripMenuItem.Size = new System.Drawing.Size(161, 22);
this.smsGraphicsSettingsToolStripMenuItem.Text = "Graphics Settings";
this.smsGraphicsSettingsToolStripMenuItem.Click += new System.EventHandler(this.smsGraphicsSettingsToolStripMenuItem_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
@ -2447,6 +2465,8 @@
private System.Windows.Forms.ToolStripMenuItem pceAlwaysPerformSpriteLimitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem pceAlwaysEqualizeVolumesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem pceArcadeCardRewindEnableHackToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem sMSToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem smsGraphicsSettingsToolStripMenuItem;
}
}

View File

@ -738,6 +738,13 @@ namespace BizHawk.MultiClient
SyncCoreInputComm();
}
private void smsGraphicsSettingsToolStripMenuItem_Click(object sender, EventArgs e)
{
SMSGraphicsConfig g = new SMSGraphicsConfig();
g.ShowDialog();
SyncCoreInputComm();
}
public void MainForm_MouseClick(object sender, MouseEventArgs e)
{
if (Global.Config.ShowContextMenu && e.Button == MouseButtons.Right)

View File

@ -816,15 +816,17 @@ namespace BizHawk.MultiClient
switch (system)
{
case "TI83":
tI83ToolStripMenuItem.Visible = true;
NESToolStripMenuItem.Visible = false;
tI83ToolStripMenuItem.Visible = true;
pCEToolStripMenuItem.Visible = false;
sMSToolStripMenuItem.Visible = false;
gBToolStripMenuItem.Visible = false;
break;
case "NES":
NESToolStripMenuItem.Visible = true;
tI83ToolStripMenuItem.Visible = false;
pCEToolStripMenuItem.Visible = false;
sMSToolStripMenuItem.Visible = false;
gBToolStripMenuItem.Visible = false;
break;
case "PCE":
@ -833,18 +835,29 @@ namespace BizHawk.MultiClient
NESToolStripMenuItem.Visible = false;
tI83ToolStripMenuItem.Visible = false;
pCEToolStripMenuItem.Visible = true;
sMSToolStripMenuItem.Visible = false;
gBToolStripMenuItem.Visible = false;
break;
case "SMS":
case "SG":
tI83ToolStripMenuItem.Visible = false;
NESToolStripMenuItem.Visible = false;
pCEToolStripMenuItem.Visible = false;
sMSToolStripMenuItem.Visible = true;
gBToolStripMenuItem.Visible = false;
break;
case "GB":
NESToolStripMenuItem.Visible = false;
tI83ToolStripMenuItem.Visible = false;
pCEToolStripMenuItem.Visible = false;
sMSToolStripMenuItem.Visible = false;
gBToolStripMenuItem.Visible = true;
break;
default:
tI83ToolStripMenuItem.Visible = false;
NESToolStripMenuItem.Visible = false;
pCEToolStripMenuItem.Visible = false;
sMSToolStripMenuItem.Visible = false;
gBToolStripMenuItem.Visible = false;
break;
}

View File

@ -34,6 +34,8 @@ namespace BizHawk.MultiClient
Global.Config.PCEDispBG1 = DispBG1.Checked;
Global.Config.PCEDispOBJ2 = DispOBJ2.Checked;
Global.Config.PCEDispBG2 = DispBG2.Checked;
this.Close();
}
}
}

View File

@ -0,0 +1,127 @@
namespace BizHawk.MultiClient
{
partial class SMSGraphicsConfig
{
/// <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.OK = new System.Windows.Forms.Button();
this.Cancel = new System.Windows.Forms.Button();
this.DispOBJ = new System.Windows.Forms.CheckBox();
this.DispBG = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// OK
//
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OK.Location = new System.Drawing.Point(62, 89);
this.OK.Name = "OK";
this.OK.Size = new System.Drawing.Size(75, 23);
this.OK.TabIndex = 0;
this.OK.Text = "&Ok";
this.OK.UseVisualStyleBackColor = true;
this.OK.Click += new System.EventHandler(this.OK_Click);
//
// Cancel
//
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Cancel.Location = new System.Drawing.Point(143, 89);
this.Cancel.Name = "Cancel";
this.Cancel.Size = new System.Drawing.Size(75, 23);
this.Cancel.TabIndex = 1;
this.Cancel.Text = "&Cancel";
this.Cancel.UseVisualStyleBackColor = true;
//
// DispOBJ
//
this.DispOBJ.AutoSize = true;
this.DispOBJ.Checked = true;
this.DispOBJ.CheckState = System.Windows.Forms.CheckState.Checked;
this.DispOBJ.Location = new System.Drawing.Point(6, 18);
this.DispOBJ.Name = "DispOBJ";
this.DispOBJ.Size = new System.Drawing.Size(89, 16);
this.DispOBJ.TabIndex = 2;
this.DispOBJ.Text = "Display OBJ";
this.DispOBJ.UseVisualStyleBackColor = true;
//
// DispBG
//
this.DispBG.AutoSize = true;
this.DispBG.Checked = true;
this.DispBG.CheckState = System.Windows.Forms.CheckState.Checked;
this.DispBG.Location = new System.Drawing.Point(6, 40);
this.DispBG.Name = "DispBG";
this.DispBG.Size = new System.Drawing.Size(82, 16);
this.DispBG.TabIndex = 3;
this.DispBG.Text = "Display BG";
this.DispBG.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.DispOBJ);
this.groupBox1.Controls.Add(this.DispBG);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(200, 64);
this.groupBox1.TabIndex = 4;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Background and Sprites";
//
// SMSGraphicsConfig
//
this.AcceptButton = this.OK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(230, 124);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.Cancel);
this.Controls.Add(this.OK);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "SMSGraphicsConfig";
this.ShowIcon = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "SMS Graphics Settings";
this.Load += new System.EventHandler(this.SMSGraphicsConfig_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button OK;
private System.Windows.Forms.Button Cancel;
private System.Windows.Forms.CheckBox DispOBJ;
private System.Windows.Forms.CheckBox DispBG;
private System.Windows.Forms.GroupBox groupBox1;
}
}

View File

@ -0,0 +1,37 @@
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.Consoles.Sega;
namespace BizHawk.MultiClient
{
public partial class SMSGraphicsConfig : Form
{
SMS sms;
public SMSGraphicsConfig()
{
InitializeComponent();
}
private void SMSGraphicsConfig_Load(object sender, EventArgs e)
{
sms = Global.Emulator as SMS;
DispOBJ.Checked = Global.Config.SMSDispOBJ;
DispBG.Checked = Global.Config.SMSDispBG;
}
private void OK_Click(object sender, EventArgs e)
{
Global.Config.SMSDispOBJ = DispOBJ.Checked;
Global.Config.SMSDispBG = DispBG.Checked;
this.Close();
}
}
}

View File

@ -0,0 +1,120 @@
<?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>
</root>