Add disassembly of GradientTool

This commit is contained in:
2026-04-21 10:40:12 +02:00
commit 1ef84fd132
55 changed files with 8994 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
// Decompiled with JetBrains decompiler
// Type: SFXProductions.GradientTool.HDMA.Configuration.ColourChannelsRef
// Assembly: GradientTool, Version=0.8.2.1, Culture=neutral, PublicKeyToken=null
// MVID: 818AB9B3-796A-4A49-8B90-C00D066A321B
// Assembly location: C:\Users\aless\Downloads\gradient-tool-v0.8.2.1\GradientTool.exe
using System.Windows.Forms;
#nullable disable
namespace SFXProductions.GradientTool.HDMA.Configuration;
internal sealed class ColourChannelsRef
{
private ChannelType m_channel;
private Label m_label;
private TabPage m_tabPage;
public ChannelType Value
{
get => this.m_channel;
set
{
if (value == this.m_channel)
return;
this.m_channel = value;
if (this.m_label != null)
this.m_label.Text = this.m_channel.ToString();
if (this.m_tabPage == null)
return;
this.m_tabPage.Text = this.m_channel.ToString();
}
}
public void Bind(Label label, TabPage tabPage, ChannelType initialValue)
{
this.m_channel = initialValue;
if ((this.m_label = label) != null)
this.m_label.Text = initialValue.ToString();
if ((this.m_tabPage = tabPage) == null)
return;
this.m_tabPage.Text = initialValue.ToString();
}
}

View File

@@ -0,0 +1,159 @@
// Decompiled with JetBrains decompiler
// Type: SFXProductions.GradientTool.HDMA.Configuration.Mode0ChannelPropertyTab
// Assembly: GradientTool, Version=0.8.2.1, Culture=neutral, PublicKeyToken=null
// MVID: 818AB9B3-796A-4A49-8B90-C00D066A321B
// Assembly location: C:\Users\aless\Downloads\gradient-tool-v0.8.2.1\GradientTool.exe
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
#nullable disable
namespace SFXProductions.GradientTool.HDMA.Configuration;
internal class Mode0ChannelPropertyTab : TabPage
{
private IContainer components;
private Label chtypeLabel;
private Label destRegLabel;
private Label coloursLabel;
private NumericUpDown hdmaChannelNumericUpDown;
public Mode0ChannelPropertyTab(Mode0Channel channel, ColourChannelsRef colourChannelsReference)
{
this.InitializeComponent();
this.destRegLabel.Text = channel.FirstWriteType != ChannelType.Brightness ? "COLDATA ($2132)" : "INIDISP ($2100)";
colourChannelsReference.Bind(this.coloursLabel, (TabPage) this, channel.FirstWriteType);
this.hdmaChannelNumericUpDown.Value = (Decimal) channel.HDMAChannel;
}
public void ApplyChanges(Mode0Channel channel)
{
channel.HDMAChannel = (int) this.hdmaChannelNumericUpDown.Value;
}
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
this.components.Dispose();
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.chtypeLabel = new Label();
this.destRegLabel = new Label();
this.coloursLabel = new Label();
this.hdmaChannelNumericUpDown = new NumericUpDown();
Label label1 = new Label();
Label label2 = new Label();
Label label3 = new Label();
Label label4 = new Label();
TableLayoutPanel tableLayoutPanel = new TableLayoutPanel();
tableLayoutPanel.SuspendLayout();
this.hdmaChannelNumericUpDown.BeginInit();
this.SuspendLayout();
label1.Anchor = AnchorStyles.Right;
label1.AutoSize = true;
label1.Location = new Point(20, 5);
label1.Name = "label1";
label1.Size = new Size(76, 13);
label1.TabIndex = 0;
label1.Text = "Channel &Type:";
label2.Anchor = AnchorStyles.Right;
label2.AutoSize = true;
label2.Location = new Point(40, 29);
label2.Name = "label2";
label2.Size = new Size(56, 13);
label2.TabIndex = 2;
label2.Text = "&Writes To:";
label3.Anchor = AnchorStyles.Right;
label3.AutoSize = true;
label3.Location = new Point(3, 53);
label3.Name = "label3";
label3.Size = new Size(93, 13);
label3.TabIndex = 4;
label3.Text = "&Colour Channel(s):";
label4.Anchor = AnchorStyles.Right;
label4.AutoSize = true;
label4.Location = new Point(12, 78);
label4.Name = "label4";
label4.Size = new Size(84, 13);
label4.TabIndex = 6;
label4.Text = "HDMA Cha&nnel:";
tableLayoutPanel.ColumnCount = 2;
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f));
tableLayoutPanel.Controls.Add((Control) label1, 0, 0);
tableLayoutPanel.Controls.Add((Control) label2, 0, 1);
tableLayoutPanel.Controls.Add((Control) label3, 0, 2);
tableLayoutPanel.Controls.Add((Control) label4, 0, 4);
tableLayoutPanel.Controls.Add((Control) this.chtypeLabel, 1, 0);
tableLayoutPanel.Controls.Add((Control) this.destRegLabel, 1, 1);
tableLayoutPanel.Controls.Add((Control) this.coloursLabel, 1, 2);
tableLayoutPanel.Controls.Add((Control) this.hdmaChannelNumericUpDown, 1, 4);
tableLayoutPanel.Dock = DockStyle.Fill;
tableLayoutPanel.Location = new Point(0, 0);
tableLayoutPanel.Name = "tableLayoutPanel1";
tableLayoutPanel.RowCount = 5;
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100f));
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.Size = new Size(250, 98);
tableLayoutPanel.TabIndex = 0;
this.chtypeLabel.AutoEllipsis = true;
this.chtypeLabel.BackColor = SystemColors.Control;
this.chtypeLabel.BorderStyle = BorderStyle.Fixed3D;
this.chtypeLabel.Dock = DockStyle.Fill;
this.chtypeLabel.Location = new Point(102, 3);
this.chtypeLabel.Margin = new Padding(3);
this.chtypeLabel.Name = "chtypeLabel";
this.chtypeLabel.Size = new Size(145, 18);
this.chtypeLabel.TabIndex = 1;
this.chtypeLabel.Text = "Transfer Mode 0 HDMA";
this.chtypeLabel.TextAlign = ContentAlignment.MiddleLeft;
this.destRegLabel.AutoEllipsis = true;
this.destRegLabel.BackColor = SystemColors.Control;
this.destRegLabel.BorderStyle = BorderStyle.Fixed3D;
this.destRegLabel.Dock = DockStyle.Fill;
this.destRegLabel.Location = new Point(102, 27);
this.destRegLabel.Margin = new Padding(3);
this.destRegLabel.Name = "destRegLabel";
this.destRegLabel.Size = new Size(145, 18);
this.destRegLabel.TabIndex = 3;
this.destRegLabel.Text = "[Destination Register]";
this.destRegLabel.TextAlign = ContentAlignment.MiddleLeft;
this.coloursLabel.AutoEllipsis = true;
this.coloursLabel.BackColor = SystemColors.Control;
this.coloursLabel.BorderStyle = BorderStyle.Fixed3D;
this.coloursLabel.Dock = DockStyle.Fill;
this.coloursLabel.Location = new Point(102, 51);
this.coloursLabel.Margin = new Padding(3);
this.coloursLabel.Name = "coloursLabel";
this.coloursLabel.Size = new Size(145, 18);
this.coloursLabel.TabIndex = 5;
this.coloursLabel.Text = "[Channels]";
this.coloursLabel.TextAlign = ContentAlignment.MiddleLeft;
this.hdmaChannelNumericUpDown.Location = new Point(102, 75);
this.hdmaChannelNumericUpDown.Maximum = new Decimal(new int[4]
{
7,
0,
0,
0
});
this.hdmaChannelNumericUpDown.Name = "hdmaChannelNumericUpDown";
this.hdmaChannelNumericUpDown.Size = new Size(50, 20);
this.hdmaChannelNumericUpDown.TabIndex = 7;
this.Controls.Add((Control) tableLayoutPanel);
this.Size = new Size(250, 98);
this.UseVisualStyleBackColor = true;
tableLayoutPanel.ResumeLayout(false);
tableLayoutPanel.PerformLayout();
this.hdmaChannelNumericUpDown.EndInit();
this.ResumeLayout(false);
}
}

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>

View File

@@ -0,0 +1,208 @@
// Decompiled with JetBrains decompiler
// Type: SFXProductions.GradientTool.HDMA.Configuration.Mode2ChannelPropertyTab
// Assembly: GradientTool, Version=0.8.2.1, Culture=neutral, PublicKeyToken=null
// MVID: 818AB9B3-796A-4A49-8B90-C00D066A321B
// Assembly location: C:\Users\aless\Downloads\gradient-tool-v0.8.2.1\GradientTool.exe
using System;
using System.ComponentModel;
using System.Drawing;
using System.Media;
using System.Windows.Forms;
#nullable disable
namespace SFXProductions.GradientTool.HDMA.Configuration;
internal class Mode2ChannelPropertyTab : TabPage
{
private IContainer components;
private Label chtypeLabel;
private Label destRegLabel;
private NumericUpDown hdmaChannelNumericUpDown;
private Button swapButton;
private ToolTip toolTip;
private ListBox coloursListBox;
private Mode0Channel m_sib;
private ColourChannelsRef m_sibChtype;
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
this.components.Dispose();
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = (IContainer) new System.ComponentModel.Container();
this.chtypeLabel = new Label();
this.destRegLabel = new Label();
this.hdmaChannelNumericUpDown = new NumericUpDown();
this.swapButton = new Button();
this.coloursListBox = new ListBox();
this.toolTip = new ToolTip(this.components);
Label label1 = new Label();
Label label2 = new Label();
Label label3 = new Label();
Label label4 = new Label();
TableLayoutPanel tableLayoutPanel = new TableLayoutPanel();
tableLayoutPanel.SuspendLayout();
this.hdmaChannelNumericUpDown.BeginInit();
this.SuspendLayout();
label1.Anchor = AnchorStyles.Right;
label1.AutoSize = true;
label1.Location = new Point(20, 5);
label1.Name = "label1";
label1.Size = new Size(76, 13);
label1.TabIndex = 0;
label1.Text = "Channel &Type:";
label2.Anchor = AnchorStyles.Right;
label2.AutoSize = true;
label2.Location = new Point(40, 29);
label2.Name = "label2";
label2.Size = new Size(56, 13);
label2.TabIndex = 1;
label2.Text = "&Writes To:";
label3.Anchor = AnchorStyles.Right;
label3.AutoSize = true;
label3.Location = new Point(3, 53);
label3.Name = "label3";
label3.Size = new Size(93, 13);
label3.TabIndex = 2;
label3.Text = "&Colour Channel(s):";
label4.Anchor = AnchorStyles.Right;
label4.AutoSize = true;
label4.Location = new Point(12, 119);
label4.Name = "label4";
label4.Size = new Size(84, 13);
label4.TabIndex = 3;
label4.Text = "HDMA Cha&nnel:";
tableLayoutPanel.ColumnCount = 2;
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f));
tableLayoutPanel.Controls.Add((Control) label1, 0, 0);
tableLayoutPanel.Controls.Add((Control) label2, 0, 1);
tableLayoutPanel.Controls.Add((Control) label3, 0, 2);
tableLayoutPanel.Controls.Add((Control) label4, 0, 6);
tableLayoutPanel.Controls.Add((Control) this.chtypeLabel, 1, 0);
tableLayoutPanel.Controls.Add((Control) this.destRegLabel, 1, 1);
tableLayoutPanel.Controls.Add((Control) this.hdmaChannelNumericUpDown, 1, 6);
tableLayoutPanel.Controls.Add((Control) this.swapButton, 1, 4);
tableLayoutPanel.Controls.Add((Control) this.coloursListBox, 1, 2);
tableLayoutPanel.Dock = DockStyle.Fill;
tableLayoutPanel.Location = new Point(0, 0);
tableLayoutPanel.Name = "tableLayoutPanel1";
tableLayoutPanel.RowCount = 7;
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 24f));
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100f));
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.Size = new Size(238, 139);
tableLayoutPanel.TabIndex = 0;
this.chtypeLabel.Anchor = AnchorStyles.Left | AnchorStyles.Right;
this.chtypeLabel.BackColor = SystemColors.Control;
this.chtypeLabel.BorderStyle = BorderStyle.Fixed3D;
this.chtypeLabel.Location = new Point(102, 3);
this.chtypeLabel.Margin = new Padding(3);
this.chtypeLabel.Name = "chtypeLabel";
this.chtypeLabel.Size = new Size(133, 18);
this.chtypeLabel.TabIndex = 4;
this.chtypeLabel.Text = "Transfer Mode 2 HDMA";
this.chtypeLabel.TextAlign = ContentAlignment.MiddleLeft;
this.destRegLabel.Anchor = AnchorStyles.Left | AnchorStyles.Right;
this.destRegLabel.BackColor = SystemColors.Control;
this.destRegLabel.BorderStyle = BorderStyle.Fixed3D;
this.destRegLabel.Location = new Point(102, 27);
this.destRegLabel.Margin = new Padding(3);
this.destRegLabel.Name = "destRegLabel";
this.destRegLabel.Size = new Size(133, 18);
this.destRegLabel.TabIndex = 5;
this.destRegLabel.Text = "COLDATA ($2132)";
this.destRegLabel.TextAlign = ContentAlignment.MiddleLeft;
this.hdmaChannelNumericUpDown.Anchor = AnchorStyles.Left;
this.hdmaChannelNumericUpDown.Location = new Point(102, 116);
this.hdmaChannelNumericUpDown.Maximum = new Decimal(new int[4]
{
7,
0,
0,
0
});
this.hdmaChannelNumericUpDown.Name = "hdmaChannelNumericUpDown";
this.hdmaChannelNumericUpDown.Size = new Size(50, 20);
this.hdmaChannelNumericUpDown.TabIndex = 6;
this.swapButton.Anchor = AnchorStyles.Left;
this.swapButton.Enabled = false;
this.swapButton.Location = new Point(102, 87);
this.swapButton.Name = "swapButton";
this.swapButton.Size = new Size(75, 23);
this.swapButton.TabIndex = 7;
this.swapButton.Text = "Swap";
this.toolTip.SetToolTip((Control) this.swapButton, "Swap the selected colour channel with the independent colour channel.");
this.swapButton.UseVisualStyleBackColor = true;
this.swapButton.Click += new EventHandler(this.swapButton_Click);
this.coloursListBox.Anchor = AnchorStyles.Left | AnchorStyles.Right;
this.coloursListBox.FormattingEnabled = true;
this.coloursListBox.Location = new Point(102, 51);
this.coloursListBox.Name = "coloursListBox";
tableLayoutPanel.SetRowSpan((Control) this.coloursListBox, 2);
this.coloursListBox.Size = new Size(133, 30);
this.coloursListBox.TabIndex = 8;
this.BackColor = Color.Transparent;
this.Controls.Add((Control) tableLayoutPanel);
this.Size = new Size(238, 139);
this.UseVisualStyleBackColor = true;
tableLayoutPanel.ResumeLayout(false);
tableLayoutPanel.PerformLayout();
this.hdmaChannelNumericUpDown.EndInit();
this.ResumeLayout(false);
}
public Mode2ChannelPropertyTab(
Mode2Channel channel,
Mode0Channel siblingChannel,
ColourChannelsRef siblingChtypeRef)
{
this.InitializeComponent();
this.coloursListBox.Items.AddRange(new object[2]
{
(object) channel.FirstWriteType,
(object) channel.SecondWriteType
});
if (siblingChannel != null && siblingChtypeRef != null)
{
this.swapButton.Enabled = true;
this.m_sib = siblingChannel;
this.m_sibChtype = siblingChtypeRef;
}
this.Text = $"{channel.FirstWriteType}, {channel.SecondWriteType}";
this.hdmaChannelNumericUpDown.Value = (Decimal) channel.HDMAChannel;
}
private void swapButton_Click(object sender, EventArgs e)
{
if (this.coloursListBox.SelectedIndex < 0)
{
SystemSounds.Beep.Play();
}
else
{
ChannelType selectedItem = (ChannelType) this.coloursListBox.SelectedItem;
this.coloursListBox.Items[this.coloursListBox.SelectedIndex] = (object) this.m_sibChtype.Value;
this.m_sibChtype.Value = selectedItem;
this.Text = $"{this.coloursListBox.Items[0]}, {this.coloursListBox.Items[1]}";
}
}
public void ApplyChanges(Mode2Channel channel)
{
if (this.m_sib != null)
this.m_sib.FirstWriteType = this.m_sibChtype.Value;
channel.FirstWriteType = (ChannelType) this.coloursListBox.Items[0];
channel.SecondWriteType = (ChannelType) this.coloursListBox.Items[1];
channel.HDMAChannel = (int) this.hdmaChannelNumericUpDown.Value;
}
}

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>

View File

@@ -0,0 +1,188 @@
// Decompiled with JetBrains decompiler
// Type: SFXProductions.GradientTool.HDMA.Configuration.Mode3ChannelPropertyTab
// Assembly: GradientTool, Version=0.8.2.1, Culture=neutral, PublicKeyToken=null
// MVID: 818AB9B3-796A-4A49-8B90-C00D066A321B
// Assembly location: C:\Users\aless\Downloads\gradient-tool-v0.8.2.1\GradientTool.exe
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
#nullable disable
namespace SFXProductions.GradientTool.HDMA.Configuration;
internal class Mode3ChannelPropertyTab : TabPage
{
private IContainer components;
private Label chtypeLabel;
private Label destRegLabel;
private Label coloursLabel;
private NumericUpDown palIndexNumericUpDown;
private NumericUpDown hdmaChannelNumericUpDown;
public Mode3ChannelPropertyTab(Mode3Channel channel)
{
this.InitializeComponent();
this.palIndexNumericUpDown.Value = (Decimal) channel.PaletteIndex;
this.hdmaChannelNumericUpDown.Value = (Decimal) channel.HDMAChannel;
}
public void ApplyChanges(Mode3Channel channel)
{
channel.PaletteIndex = (byte) this.palIndexNumericUpDown.Value;
channel.HDMAChannel = (int) this.hdmaChannelNumericUpDown.Value;
}
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
this.components.Dispose();
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.chtypeLabel = new Label();
this.destRegLabel = new Label();
this.coloursLabel = new Label();
this.palIndexNumericUpDown = new NumericUpDown();
this.hdmaChannelNumericUpDown = new NumericUpDown();
TableLayoutPanel tableLayoutPanel = new TableLayoutPanel();
Label label1 = new Label();
Label label2 = new Label();
Label label3 = new Label();
Label label4 = new Label();
Label label5 = new Label();
tableLayoutPanel.SuspendLayout();
this.palIndexNumericUpDown.BeginInit();
this.hdmaChannelNumericUpDown.BeginInit();
this.SuspendLayout();
tableLayoutPanel.ColumnCount = 2;
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f));
tableLayoutPanel.Controls.Add((Control) label1, 0, 0);
tableLayoutPanel.Controls.Add((Control) label2, 0, 1);
tableLayoutPanel.Controls.Add((Control) label3, 0, 2);
tableLayoutPanel.Controls.Add((Control) label4, 0, 4);
tableLayoutPanel.Controls.Add((Control) label5, 0, 5);
tableLayoutPanel.Controls.Add((Control) this.chtypeLabel, 1, 0);
tableLayoutPanel.Controls.Add((Control) this.destRegLabel, 1, 1);
tableLayoutPanel.Controls.Add((Control) this.coloursLabel, 1, 2);
tableLayoutPanel.Controls.Add((Control) this.palIndexNumericUpDown, 1, 4);
tableLayoutPanel.Controls.Add((Control) this.hdmaChannelNumericUpDown, 1, 5);
tableLayoutPanel.Dock = DockStyle.Fill;
tableLayoutPanel.Location = new Point(0, 0);
tableLayoutPanel.Name = "tableLayoutPanel1";
tableLayoutPanel.RowCount = 6;
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100f));
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.RowStyles.Add(new RowStyle());
tableLayoutPanel.Size = new Size(286, 124);
tableLayoutPanel.TabIndex = 0;
label1.Anchor = AnchorStyles.Right;
label1.AutoSize = true;
label1.Location = new Point(20, 5);
label1.Name = "label1";
label1.Size = new Size(76, 13);
label1.TabIndex = 0;
label1.Text = "Channel &Type:";
label2.Anchor = AnchorStyles.Right;
label2.AutoSize = true;
label2.Location = new Point(40, 29);
label2.Name = "label2";
label2.Size = new Size(56, 13);
label2.TabIndex = 2;
label2.Text = "&Writes To:";
label3.Anchor = AnchorStyles.Right;
label3.AutoSize = true;
label3.Location = new Point(3, 53);
label3.Name = "label3";
label3.Size = new Size(93, 13);
label3.TabIndex = 4;
label3.Text = "&Colour Channel(s):";
label4.Anchor = AnchorStyles.Right;
label4.AutoSize = true;
label4.Location = new Point(24, 78);
label4.Name = "label4";
label4.Size = new Size(72, 13);
label4.TabIndex = 6;
label4.Text = "Palette &Index:";
label5.Anchor = AnchorStyles.Right;
label5.AutoSize = true;
label5.Location = new Point(12, 104);
label5.Name = "label5";
label5.Size = new Size(84, 13);
label5.TabIndex = 8;
label5.Text = "HDMA Cha&nnel:";
this.chtypeLabel.AutoEllipsis = true;
this.chtypeLabel.BackColor = SystemColors.Control;
this.chtypeLabel.BorderStyle = BorderStyle.Fixed3D;
this.chtypeLabel.Dock = DockStyle.Fill;
this.chtypeLabel.Location = new Point(102, 3);
this.chtypeLabel.Margin = new Padding(3);
this.chtypeLabel.Name = "chtypeLabel";
this.chtypeLabel.Size = new Size(181, 18);
this.chtypeLabel.TabIndex = 1;
this.chtypeLabel.Text = "Transfer Mode 3 HDMA";
this.chtypeLabel.TextAlign = ContentAlignment.MiddleLeft;
this.destRegLabel.AutoEllipsis = true;
this.destRegLabel.BackColor = SystemColors.Control;
this.destRegLabel.BorderStyle = BorderStyle.Fixed3D;
this.destRegLabel.Dock = DockStyle.Fill;
this.destRegLabel.Location = new Point(102, 27);
this.destRegLabel.Margin = new Padding(3);
this.destRegLabel.Name = "destRegLabel";
this.destRegLabel.Size = new Size(181, 18);
this.destRegLabel.TabIndex = 3;
this.destRegLabel.Text = "CGADD, CGDATA ($2121, $2122)";
this.destRegLabel.TextAlign = ContentAlignment.MiddleLeft;
this.coloursLabel.AutoEllipsis = true;
this.coloursLabel.BackColor = SystemColors.Control;
this.coloursLabel.BorderStyle = BorderStyle.Fixed3D;
this.coloursLabel.Dock = DockStyle.Fill;
this.coloursLabel.Location = new Point(102, 51);
this.coloursLabel.Margin = new Padding(3);
this.coloursLabel.Name = "coloursLabel";
this.coloursLabel.Size = new Size(181, 18);
this.coloursLabel.TabIndex = 5;
this.coloursLabel.Text = "Red, Green, Blue";
this.coloursLabel.TextAlign = ContentAlignment.MiddleLeft;
this.palIndexNumericUpDown.Anchor = AnchorStyles.Left;
this.palIndexNumericUpDown.Hexadecimal = true;
this.palIndexNumericUpDown.Location = new Point(102, 75);
this.palIndexNumericUpDown.Maximum = new Decimal(new int[4]
{
(int) byte.MaxValue,
0,
0,
0
});
this.palIndexNumericUpDown.Name = "palIndexNumericUpDown";
this.palIndexNumericUpDown.Size = new Size(50, 20);
this.palIndexNumericUpDown.TabIndex = 7;
this.hdmaChannelNumericUpDown.Anchor = AnchorStyles.Left;
this.hdmaChannelNumericUpDown.Location = new Point(102, 101);
this.hdmaChannelNumericUpDown.Maximum = new Decimal(new int[4]
{
7,
0,
0,
0
});
this.hdmaChannelNumericUpDown.Name = "hdmaChannelNumericUpDown";
this.hdmaChannelNumericUpDown.Size = new Size(50, 20);
this.hdmaChannelNumericUpDown.TabIndex = 9;
this.Controls.Add((Control) tableLayoutPanel);
this.Size = new Size(286, 124);
this.UseVisualStyleBackColor = true;
tableLayoutPanel.ResumeLayout(false);
tableLayoutPanel.PerformLayout();
this.palIndexNumericUpDown.EndInit();
this.hdmaChannelNumericUpDown.EndInit();
this.ResumeLayout(false);
}
}

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>

View File

@@ -0,0 +1,34 @@
// Decompiled with JetBrains decompiler
// Type: SFXProductions.GradientTool.HDMA.Configuration.UnconfigurablePropertyTab
// Assembly: GradientTool, Version=0.8.2.1, Culture=neutral, PublicKeyToken=null
// MVID: 818AB9B3-796A-4A49-8B90-C00D066A321B
// Assembly location: C:\Users\aless\Downloads\gradient-tool-v0.8.2.1\GradientTool.exe
using System.Windows.Forms;
#nullable disable
namespace SFXProductions.GradientTool.HDMA.Configuration;
internal sealed class UnconfigurablePropertyTab : TabPage
{
private Label m_label;
public UnconfigurablePropertyTab()
{
Label label = new Label();
label.AutoEllipsis = true;
label.AutoSize = false;
label.Dock = DockStyle.Fill;
label.Text = "This HDMA gradient cannot be configured.";
this.m_label = label;
this.Padding = new Padding(3);
this.Controls.Add((Control) this.m_label);
this.UseVisualStyleBackColor = true;
}
public string Message
{
get => this.m_label.Text;
set => this.m_label.Text = value;
}
}