diff --git a/BizHawk.MultiClient/BizHawk.MultiClient.csproj b/BizHawk.MultiClient/BizHawk.MultiClient.csproj
index 25392adf68..7a9bff9d0b 100644
--- a/BizHawk.MultiClient/BizHawk.MultiClient.csproj
+++ b/BizHawk.MultiClient/BizHawk.MultiClient.csproj
@@ -144,6 +144,9 @@
Component
+
+ Component
+
Form
diff --git a/BizHawk.MultiClient/NEStools/NESPPU.Designer.cs b/BizHawk.MultiClient/NEStools/NESPPU.Designer.cs
index d960882e26..ac8f2f59ac 100644
--- a/BizHawk.MultiClient/NEStools/NESPPU.Designer.cs
+++ b/BizHawk.MultiClient/NEStools/NESPPU.Designer.cs
@@ -32,7 +32,9 @@
this.PatternGroup = new System.Windows.Forms.GroupBox();
this.Table1PaletteLabel = new System.Windows.Forms.Label();
this.Table0PaletteLabel = new System.Windows.Forms.Label();
+ this.PatternView = new BizHawk.MultiClient.PatternViewer();
this.PalettesGroup = new System.Windows.Forms.GroupBox();
+ this.PaletteView = new BizHawk.MultiClient.PaletteViewer();
this.DetailsBox = new System.Windows.Forms.GroupBox();
this.Value2Label = new System.Windows.Forms.Label();
this.ValueLabel = new System.Windows.Forms.Label();
@@ -42,13 +44,8 @@
this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
this.autoloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.NameTableGroup = new System.Windows.Forms.GroupBox();
- this.NameTableView = new BizHawk.MultiClient.NameTableViewer();
- this.PaletteView = new BizHawk.MultiClient.PaletteViewer();
- this.PatternView = new BizHawk.MultiClient.PatternViewer();
this.toolStripDropDownButton2 = new System.Windows.Forms.ToolStripDropDownButton();
this.table0PToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.table1PaletteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Table0P0 = new System.Windows.Forms.ToolStripMenuItem();
this.Table0P1 = new System.Windows.Forms.ToolStripMenuItem();
this.Table0P2 = new System.Windows.Forms.ToolStripMenuItem();
@@ -57,6 +54,7 @@
this.Table0P5 = new System.Windows.Forms.ToolStripMenuItem();
this.Table0P6 = new System.Windows.Forms.ToolStripMenuItem();
this.Table0P7 = new System.Windows.Forms.ToolStripMenuItem();
+ this.table1PaletteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Table1P0 = new System.Windows.Forms.ToolStripMenuItem();
this.Table1P1 = new System.Windows.Forms.ToolStripMenuItem();
this.Table1P2 = new System.Windows.Forms.ToolStripMenuItem();
@@ -65,11 +63,16 @@
this.Table1P5 = new System.Windows.Forms.ToolStripMenuItem();
this.Table1P6 = new System.Windows.Forms.ToolStripMenuItem();
this.Table1P7 = new System.Windows.Forms.ToolStripMenuItem();
+ this.NameTableGroup = new System.Windows.Forms.GroupBox();
+ this.NameTableView = new BizHawk.MultiClient.NameTableViewer();
+ this.SpriteViewerBox = new System.Windows.Forms.GroupBox();
+ this.SpriteView = new BizHawk.MultiClient.SpriteViewer();
this.PatternGroup.SuspendLayout();
this.PalettesGroup.SuspendLayout();
this.DetailsBox.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.NameTableGroup.SuspendLayout();
+ this.SpriteViewerBox.SuspendLayout();
this.SuspendLayout();
//
// PatternGroup
@@ -77,41 +80,64 @@
this.PatternGroup.Controls.Add(this.Table1PaletteLabel);
this.PatternGroup.Controls.Add(this.Table0PaletteLabel);
this.PatternGroup.Controls.Add(this.PatternView);
- this.PatternGroup.Location = new System.Drawing.Point(548, 185);
+ this.PatternGroup.Location = new System.Drawing.Point(554, 124);
this.PatternGroup.Name = "PatternGroup";
this.PatternGroup.Size = new System.Drawing.Size(272, 169);
this.PatternGroup.TabIndex = 0;
this.PatternGroup.TabStop = false;
this.PatternGroup.Text = "Pattern Tables";
//
- // Table2PaletteLabel
+ // Table1PaletteLabel
//
this.Table1PaletteLabel.AutoSize = true;
this.Table1PaletteLabel.Location = new System.Drawing.Point(129, 150);
- this.Table1PaletteLabel.Name = "Table2PaletteLabel";
+ this.Table1PaletteLabel.Name = "Table1PaletteLabel";
this.Table1PaletteLabel.Size = new System.Drawing.Size(52, 13);
this.Table1PaletteLabel.TabIndex = 2;
this.Table1PaletteLabel.Text = "Palette: 0";
//
- // Table1PaletteLabel
+ // Table0PaletteLabel
//
this.Table0PaletteLabel.AutoSize = true;
this.Table0PaletteLabel.Location = new System.Drawing.Point(6, 150);
- this.Table0PaletteLabel.Name = "Table1PaletteLabel";
+ this.Table0PaletteLabel.Name = "Table0PaletteLabel";
this.Table0PaletteLabel.Size = new System.Drawing.Size(52, 13);
this.Table0PaletteLabel.TabIndex = 1;
this.Table0PaletteLabel.Text = "Palette: 0";
//
+ // PatternView
+ //
+ this.PatternView.BackColor = System.Drawing.Color.White;
+ this.PatternView.Location = new System.Drawing.Point(7, 20);
+ this.PatternView.Name = "PatternView";
+ this.PatternView.Size = new System.Drawing.Size(256, 128);
+ this.PatternView.TabIndex = 0;
+ this.PatternView.MouseLeave += new System.EventHandler(this.PatternView_MouseLeave);
+ this.PatternView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.PatternView_MouseMove);
+ this.PatternView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.PatternView_Click);
+ this.PatternView.MouseEnter += new System.EventHandler(this.PatternView_MouseEnter);
+ //
// PalettesGroup
//
this.PalettesGroup.Controls.Add(this.PaletteView);
- this.PalettesGroup.Location = new System.Drawing.Point(548, 360);
+ this.PalettesGroup.Location = new System.Drawing.Point(554, 299);
this.PalettesGroup.Name = "PalettesGroup";
this.PalettesGroup.Size = new System.Drawing.Size(272, 65);
this.PalettesGroup.TabIndex = 1;
this.PalettesGroup.TabStop = false;
this.PalettesGroup.Text = "Palettes";
//
+ // PaletteView
+ //
+ this.PaletteView.BackColor = System.Drawing.Color.White;
+ this.PaletteView.Location = new System.Drawing.Point(6, 19);
+ this.PaletteView.Name = "PaletteView";
+ this.PaletteView.Size = new System.Drawing.Size(257, 34);
+ this.PaletteView.TabIndex = 0;
+ this.PaletteView.MouseLeave += new System.EventHandler(this.PaletteView_MouseLeave);
+ this.PaletteView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.PaletteView_MouseMove);
+ this.PaletteView.MouseEnter += new System.EventHandler(this.PaletteView_MouseEnter);
+ //
// DetailsBox
//
this.DetailsBox.Controls.Add(this.Value2Label);
@@ -120,7 +146,7 @@
this.DetailsBox.Controls.Add(this.SectionLabel);
this.DetailsBox.Location = new System.Drawing.Point(557, 28);
this.DetailsBox.Name = "DetailsBox";
- this.DetailsBox.Size = new System.Drawing.Size(177, 129);
+ this.DetailsBox.Size = new System.Drawing.Size(177, 90);
this.DetailsBox.TabIndex = 2;
this.DetailsBox.TabStop = false;
this.DetailsBox.Text = "Details";
@@ -128,7 +154,7 @@
// Value2Label
//
this.Value2Label.AutoSize = true;
- this.Value2Label.Location = new System.Drawing.Point(6, 97);
+ this.Value2Label.Location = new System.Drawing.Point(6, 72);
this.Value2Label.Name = "Value2Label";
this.Value2Label.Size = new System.Drawing.Size(35, 13);
this.Value2Label.TabIndex = 3;
@@ -137,7 +163,7 @@
// ValueLabel
//
this.ValueLabel.AutoSize = true;
- this.ValueLabel.Location = new System.Drawing.Point(6, 73);
+ this.ValueLabel.Location = new System.Drawing.Point(6, 53);
this.ValueLabel.Name = "ValueLabel";
this.ValueLabel.Size = new System.Drawing.Size(35, 13);
this.ValueLabel.TabIndex = 2;
@@ -146,7 +172,7 @@
// AddressLabel
//
this.AddressLabel.AutoSize = true;
- this.AddressLabel.Location = new System.Drawing.Point(6, 49);
+ this.AddressLabel.Location = new System.Drawing.Point(6, 35);
this.AddressLabel.Name = "AddressLabel";
this.AddressLabel.Size = new System.Drawing.Size(35, 13);
this.AddressLabel.TabIndex = 1;
@@ -155,7 +181,7 @@
// SectionLabel
//
this.SectionLabel.AutoSize = true;
- this.SectionLabel.Location = new System.Drawing.Point(6, 26);
+ this.SectionLabel.Location = new System.Drawing.Point(6, 18);
this.SectionLabel.Name = "SectionLabel";
this.SectionLabel.Size = new System.Drawing.Size(35, 13);
this.SectionLabel.TabIndex = 0;
@@ -199,47 +225,6 @@
this.saveWindowPositionToolStripMenuItem.Text = "Save window position";
this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click);
//
- // NameTableGroup
- //
- this.NameTableGroup.Controls.Add(this.NameTableView);
- this.NameTableGroup.Location = new System.Drawing.Point(12, 28);
- this.NameTableGroup.Name = "NameTableGroup";
- this.NameTableGroup.Size = new System.Drawing.Size(525, 508);
- this.NameTableGroup.TabIndex = 4;
- this.NameTableGroup.TabStop = false;
- this.NameTableGroup.Text = "Name Tables";
- //
- // NameTableView
- //
- this.NameTableView.BackColor = System.Drawing.Color.White;
- this.NameTableView.Location = new System.Drawing.Point(6, 15);
- this.NameTableView.Name = "NameTableView";
- this.NameTableView.Size = new System.Drawing.Size(512, 480);
- this.NameTableView.TabIndex = 0;
- //
- // PaletteView
- //
- this.PaletteView.BackColor = System.Drawing.Color.White;
- this.PaletteView.Location = new System.Drawing.Point(6, 19);
- this.PaletteView.Name = "PaletteView";
- this.PaletteView.Size = new System.Drawing.Size(257, 34);
- this.PaletteView.TabIndex = 0;
- this.PaletteView.MouseLeave += new System.EventHandler(this.PaletteView_MouseLeave);
- this.PaletteView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.PaletteView_MouseMove);
- this.PaletteView.MouseEnter += new System.EventHandler(this.PaletteView_MouseEnter);
- //
- // PatternView
- //
- this.PatternView.BackColor = System.Drawing.Color.White;
- this.PatternView.Location = new System.Drawing.Point(7, 20);
- this.PatternView.Name = "PatternView";
- this.PatternView.Size = new System.Drawing.Size(256, 128);
- this.PatternView.TabIndex = 0;
- this.PatternView.MouseLeave += new System.EventHandler(this.PatternView_MouseLeave);
- this.PatternView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.PatternView_MouseMove);
- this.PatternView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.PatternView_Click);
- this.PatternView.MouseEnter += new System.EventHandler(this.PatternView_MouseEnter);
- //
// toolStripDropDownButton2
//
this.toolStripDropDownButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
@@ -268,6 +253,62 @@
this.table0PToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.table0PToolStripMenuItem.Text = "Table 0 Palette";
//
+ // Table0P0
+ //
+ this.Table0P0.Name = "Table0P0";
+ this.Table0P0.Size = new System.Drawing.Size(91, 22);
+ this.Table0P0.Text = "0";
+ this.Table0P0.Click += new System.EventHandler(this.Palette_Click);
+ //
+ // Table0P1
+ //
+ this.Table0P1.Name = "Table0P1";
+ this.Table0P1.Size = new System.Drawing.Size(91, 22);
+ this.Table0P1.Text = "1";
+ this.Table0P1.Click += new System.EventHandler(this.Palette_Click);
+ //
+ // Table0P2
+ //
+ this.Table0P2.Name = "Table0P2";
+ this.Table0P2.Size = new System.Drawing.Size(91, 22);
+ this.Table0P2.Text = "2";
+ this.Table0P2.Click += new System.EventHandler(this.Palette_Click);
+ //
+ // Table0P3
+ //
+ this.Table0P3.Name = "Table0P3";
+ this.Table0P3.Size = new System.Drawing.Size(91, 22);
+ this.Table0P3.Text = "3";
+ this.Table0P3.Click += new System.EventHandler(this.Palette_Click);
+ //
+ // Table0P4
+ //
+ this.Table0P4.Name = "Table0P4";
+ this.Table0P4.Size = new System.Drawing.Size(91, 22);
+ this.Table0P4.Text = "4";
+ this.Table0P4.Click += new System.EventHandler(this.Palette_Click);
+ //
+ // Table0P5
+ //
+ this.Table0P5.Name = "Table0P5";
+ this.Table0P5.Size = new System.Drawing.Size(91, 22);
+ this.Table0P5.Text = "5";
+ this.Table0P5.Click += new System.EventHandler(this.Palette_Click);
+ //
+ // Table0P6
+ //
+ this.Table0P6.Name = "Table0P6";
+ this.Table0P6.Size = new System.Drawing.Size(91, 22);
+ this.Table0P6.Text = "6";
+ this.Table0P6.Click += new System.EventHandler(this.Palette_Click);
+ //
+ // Table0P7
+ //
+ this.Table0P7.Name = "Table0P7";
+ this.Table0P7.Size = new System.Drawing.Size(91, 22);
+ this.Table0P7.Text = "7";
+ this.Table0P7.Click += new System.EventHandler(this.Palette_Click);
+ //
// table1PaletteToolStripMenuItem
//
this.table1PaletteToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -283,123 +324,104 @@
this.table1PaletteToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
this.table1PaletteToolStripMenuItem.Text = "Table 1 Palette";
//
- // Table0P0
- //
- this.Table0P0.Name = "Table0P0";
- this.Table0P0.Size = new System.Drawing.Size(152, 22);
- this.Table0P0.Text = "0";
- this.Table0P0.Click += new System.EventHandler(this.Palette_Click);
- //
- // Table0P1
- //
- this.Table0P1.Name = "Table0P1";
- this.Table0P1.Size = new System.Drawing.Size(152, 22);
- this.Table0P1.Text = "1";
- this.Table0P1.Click += new System.EventHandler(this.Palette_Click);
- //
- // Table0P2
- //
- this.Table0P2.Name = "Table0P2";
- this.Table0P2.Size = new System.Drawing.Size(152, 22);
- this.Table0P2.Text = "2";
- this.Table0P2.Click += new System.EventHandler(this.Palette_Click);
- //
- // Table0P3
- //
- this.Table0P3.Name = "Table0P3";
- this.Table0P3.Size = new System.Drawing.Size(152, 22);
- this.Table0P3.Text = "3";
- this.Table0P3.Click += new System.EventHandler(this.Palette_Click);
- //
- // Table0P4
- //
- this.Table0P4.Name = "Table0P4";
- this.Table0P4.Size = new System.Drawing.Size(152, 22);
- this.Table0P4.Text = "4";
- this.Table0P4.Click += new System.EventHandler(this.Palette_Click);
- //
- // Table0P5
- //
- this.Table0P5.Name = "Table0P5";
- this.Table0P5.Size = new System.Drawing.Size(152, 22);
- this.Table0P5.Text = "5";
- this.Table0P5.Click += new System.EventHandler(this.Palette_Click);
- //
- // Table0P6
- //
- this.Table0P6.Name = "Table0P6";
- this.Table0P6.Size = new System.Drawing.Size(152, 22);
- this.Table0P6.Text = "6";
- this.Table0P6.Click += new System.EventHandler(this.Palette_Click);
- //
- // Table0P7
- //
- this.Table0P7.Name = "Table0P7";
- this.Table0P7.Size = new System.Drawing.Size(152, 22);
- this.Table0P7.Text = "7";
- this.Table0P7.Click += new System.EventHandler(this.Palette_Click);
- //
// Table1P0
//
this.Table1P0.Name = "Table1P0";
- this.Table1P0.Size = new System.Drawing.Size(152, 22);
+ this.Table1P0.Size = new System.Drawing.Size(91, 22);
this.Table1P0.Text = "0";
this.Table1P0.Click += new System.EventHandler(this.Palette_Click);
//
// Table1P1
//
this.Table1P1.Name = "Table1P1";
- this.Table1P1.Size = new System.Drawing.Size(152, 22);
+ this.Table1P1.Size = new System.Drawing.Size(91, 22);
this.Table1P1.Text = "1";
this.Table1P1.Click += new System.EventHandler(this.Palette_Click);
//
// Table1P2
//
this.Table1P2.Name = "Table1P2";
- this.Table1P2.Size = new System.Drawing.Size(152, 22);
+ this.Table1P2.Size = new System.Drawing.Size(91, 22);
this.Table1P2.Text = "2";
this.Table1P2.Click += new System.EventHandler(this.Palette_Click);
//
// Table1P3
//
this.Table1P3.Name = "Table1P3";
- this.Table1P3.Size = new System.Drawing.Size(152, 22);
+ this.Table1P3.Size = new System.Drawing.Size(91, 22);
this.Table1P3.Text = "3";
this.Table1P3.Click += new System.EventHandler(this.Palette_Click);
//
// Table1P4
//
this.Table1P4.Name = "Table1P4";
- this.Table1P4.Size = new System.Drawing.Size(152, 22);
+ this.Table1P4.Size = new System.Drawing.Size(91, 22);
this.Table1P4.Text = "4";
this.Table1P4.Click += new System.EventHandler(this.Palette_Click);
//
// Table1P5
//
this.Table1P5.Name = "Table1P5";
- this.Table1P5.Size = new System.Drawing.Size(152, 22);
+ this.Table1P5.Size = new System.Drawing.Size(91, 22);
this.Table1P5.Text = "5";
this.Table1P5.Click += new System.EventHandler(this.Palette_Click);
//
// Table1P6
//
this.Table1P6.Name = "Table1P6";
- this.Table1P6.Size = new System.Drawing.Size(152, 22);
+ this.Table1P6.Size = new System.Drawing.Size(91, 22);
this.Table1P6.Text = "6";
this.Table1P6.Click += new System.EventHandler(this.Palette_Click);
//
// Table1P7
//
this.Table1P7.Name = "Table1P7";
- this.Table1P7.Size = new System.Drawing.Size(152, 22);
+ this.Table1P7.Size = new System.Drawing.Size(91, 22);
this.Table1P7.Text = "7";
this.Table1P7.Click += new System.EventHandler(this.Palette_Click);
//
+ // NameTableGroup
+ //
+ this.NameTableGroup.Controls.Add(this.NameTableView);
+ this.NameTableGroup.Location = new System.Drawing.Point(12, 28);
+ this.NameTableGroup.Name = "NameTableGroup";
+ this.NameTableGroup.Size = new System.Drawing.Size(525, 508);
+ this.NameTableGroup.TabIndex = 4;
+ this.NameTableGroup.TabStop = false;
+ this.NameTableGroup.Text = "Name Tables";
+ //
+ // NameTableView
+ //
+ this.NameTableView.BackColor = System.Drawing.Color.White;
+ this.NameTableView.Location = new System.Drawing.Point(6, 14);
+ this.NameTableView.Name = "NameTableView";
+ this.NameTableView.Size = new System.Drawing.Size(512, 480);
+ this.NameTableView.TabIndex = 0;
+ //
+ // SpriteViewerBox
+ //
+ this.SpriteViewerBox.Controls.Add(this.SpriteView);
+ this.SpriteViewerBox.Location = new System.Drawing.Point(554, 381);
+ this.SpriteViewerBox.Name = "SpriteViewerBox";
+ this.SpriteViewerBox.Size = new System.Drawing.Size(272, 155);
+ this.SpriteViewerBox.TabIndex = 5;
+ this.SpriteViewerBox.TabStop = false;
+ this.SpriteViewerBox.Text = "Sprites";
+ //
+ // SpriteView
+ //
+ this.SpriteView.BackColor = System.Drawing.Color.White;
+ this.SpriteView.Location = new System.Drawing.Point(6, 18);
+ this.SpriteView.Name = "SpriteView";
+ this.SpriteView.Size = new System.Drawing.Size(256, 128);
+ this.SpriteView.TabIndex = 0;
+ //
// NESPPU
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(832, 618);
+ this.ClientSize = new System.Drawing.Size(832, 553);
+ this.Controls.Add(this.SpriteViewerBox);
this.Controls.Add(this.NameTableGroup);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.DetailsBox);
@@ -417,6 +439,7 @@
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.NameTableGroup.ResumeLayout(false);
+ this.SpriteViewerBox.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -460,5 +483,7 @@
private System.Windows.Forms.ToolStripMenuItem Table1P5;
private System.Windows.Forms.ToolStripMenuItem Table1P6;
private System.Windows.Forms.ToolStripMenuItem Table1P7;
+ private System.Windows.Forms.GroupBox SpriteViewerBox;
+ private SpriteViewer SpriteView;
}
}
\ No newline at end of file
diff --git a/BizHawk.MultiClient/NEStools/NameTableViewer.cs b/BizHawk.MultiClient/NEStools/NameTableViewer.cs
index 9b4d3f2fe3..de345026c5 100644
--- a/BizHawk.MultiClient/NEStools/NameTableViewer.cs
+++ b/BizHawk.MultiClient/NEStools/NameTableViewer.cs
@@ -23,18 +23,8 @@ namespace BizHawk.MultiClient
this.Size = new Size(256, 224);
this.BackColor = Color.White;
this.Paint += new System.Windows.Forms.PaintEventHandler(this.NameTableViewer_Paint);
- this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.NameTableViewer_KeyDown);
- for (int x = 0; x < nametables.Size.Width; x++)
- {
- for (int y = 0; y < nametables.Size.Height; y++)
- {
- nametables.SetPixel(x, y, Color.Black);
- }
- }
}
- private void NameTableViewer_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { }
-
private void Display(Graphics g)
{
unchecked
diff --git a/BizHawk.MultiClient/NEStools/PatternViewer.cs b/BizHawk.MultiClient/NEStools/PatternViewer.cs
index 502ead3ffe..2636525d74 100644
--- a/BizHawk.MultiClient/NEStools/PatternViewer.cs
+++ b/BizHawk.MultiClient/NEStools/PatternViewer.cs
@@ -25,21 +25,8 @@ namespace BizHawk.MultiClient
this.Size = pSize;
this.BackColor = Color.White;
this.Paint += new System.Windows.Forms.PaintEventHandler(this.PatternViewer_Paint);
- this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PatternViewer_KeyDown);
-
- this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.PatternViewer_Click);
-
- for (int x = 0; x < pattern.Size.Width; x++)
- {
- for (int y = 0; y < pattern.Size.Height; y++)
- {
- pattern.SetPixel(x, y, Color.Black);
- }
- }
}
- private void PatternViewer_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { }
-
private void Display(Graphics g)
{
unchecked
@@ -52,10 +39,5 @@ namespace BizHawk.MultiClient
{
Display(e.Graphics);
}
-
- private void PatternViewer_Click(object sender, MouseEventArgs e)
- {
- //Moved to parent event handler
- }
}
}
diff --git a/BizHawk.MultiClient/NEStools/SpriteViewer.cs b/BizHawk.MultiClient/NEStools/SpriteViewer.cs
new file mode 100644
index 0000000000..5fd0962e1d
--- /dev/null
+++ b/BizHawk.MultiClient/NEStools/SpriteViewer.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Globalization;
+
+namespace BizHawk.MultiClient
+{
+ public class SpriteViewer : Control
+ {
+ Size pSize;
+ public Bitmap pattern;
+
+ public SpriteViewer()
+ {
+ pSize = new Size(256, 128);
+ pattern = new Bitmap(pSize.Width, pSize.Height);
+ SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+ SetStyle(ControlStyles.UserPaint, true);
+ SetStyle(ControlStyles.DoubleBuffer, true);
+ this.Size = pSize;
+ this.BackColor = Color.White;
+ this.Paint += new System.Windows.Forms.PaintEventHandler(this.SpriteViewer_Paint);
+ }
+
+ private void Display(Graphics g)
+ {
+ unchecked
+ {
+ g.DrawImage(pattern, 1, 1);
+ }
+ }
+
+ private void SpriteViewer_Paint(object sender, PaintEventArgs e)
+ {
+ Display(e.Graphics);
+ }
+ }
+}