From ddf02686572344c91b359f085e41d567c5021d2c Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 2 Nov 2013 22:34:16 +0000 Subject: [PATCH] move GB/GBA GPU viewers to ToolManager, also whack some tool namespaces --- BizHawk.MultiClient/MainForm.Events.cs | 4 +- BizHawk.MultiClient/MainForm.cs | 36 +-- BizHawk.MultiClient/tools/GB/BmpView.cs | 2 +- .../tools/GB/CGBColorChooserForm.Designer.cs | 2 +- .../tools/GB/GBGPUView.Designer.cs | 243 +++++++++--------- BizHawk.MultiClient/tools/GB/GBGPUView.cs | 7 +- .../tools/GBA/GBAGPUView.Designer.cs | 2 +- BizHawk.MultiClient/tools/GBA/GBAGPUView.cs | 8 +- .../tools/GBA/MobileBmpView.Designer.cs | 6 +- .../tools/GBA/MobileBmpView.cs | 4 +- .../tools/GBA/MobileDetailView.Designer.cs | 6 +- .../tools/GBA/MobileDetailView.cs | 4 +- 12 files changed, 148 insertions(+), 176 deletions(-) diff --git a/BizHawk.MultiClient/MainForm.Events.cs b/BizHawk.MultiClient/MainForm.Events.cs index d2fb00b8b0..532f4bb661 100644 --- a/BizHawk.MultiClient/MainForm.Events.cs +++ b/BizHawk.MultiClient/MainForm.Events.cs @@ -1567,7 +1567,7 @@ namespace BizHawk.MultiClient private void GBGPUViewerMenuItem_Click(object sender, EventArgs e) { - LoadGBGPUView(); + GlobalWinF.Tools.Load(); } private void GBGameGenieMenuItem_Click(object sender, EventArgs e) @@ -1581,7 +1581,7 @@ namespace BizHawk.MultiClient private void GbaGpuViewerMenuItem_Click(object sender, EventArgs e) { - LoadGBAGPUView(); + GlobalWinF.Tools.Load(); } #endregion diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 09c2453878..ad1c89508f 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -85,8 +85,6 @@ namespace BizHawk.MultiClient private Point _windowed_location; //tool dialogs - private GBtools.GBGPUView _gbgpuview; - private GBAtools.GBAGPUView _gbagpuview; private PCEBGViewer _pcebgviewer; private ToolBox _toolbox; private TI83KeyPad _ti83pad; @@ -94,8 +92,6 @@ namespace BizHawk.MultiClient private NESSoundConfig _nessound; //TODO: this is a lazy way to refactor things, but works for now. The point is to not have these objects created until needed, without refactoring a lot of code - public GBtools.GBGPUView GBGPUView1 { get { if (_gbgpuview == null) _gbgpuview = new GBtools.GBGPUView(); return _gbgpuview; } set { _gbgpuview = value; } } - public GBAtools.GBAGPUView GBAGPUView1 { get { if (_gbagpuview == null) _gbagpuview = new GBAtools.GBAGPUView(); return _gbagpuview; } set { _gbagpuview = value; } } public PCEBGViewer PCEBGViewer1 { get { if (_pcebgviewer == null) _pcebgviewer = new PCEBGViewer(); return _pcebgviewer; } set { _pcebgviewer = value; } } public ToolBox ToolBox1 { get { if (_toolbox == null) _toolbox = new ToolBox(); return _toolbox; } set { _toolbox = value; } } public TI83KeyPad TI83KeyPad1 { get { if (_ti83pad == null) _ti83pad = new TI83KeyPad(); return _ti83pad; } set { _ti83pad = value; } } @@ -359,7 +355,7 @@ namespace BizHawk.MultiClient } if (Global.Config.AutoLoadGBGPUView && Global.Emulator is Gameboy) { - LoadGBGPUView(); + GlobalWinF.Tools.Load(); } if (Global.Config.AutoloadTAStudio) { @@ -1587,8 +1583,6 @@ namespace BizHawk.MultiClient //} GlobalWinF.Tools.Restart(); - if (_gbgpuview != null) GBGPUView1.Restart(); - if (_gbagpuview != null) GBAGPUView1.Restart(); if (_pcebgviewer != null) PCEBGViewer1.Restart(); if (_ti83pad != null) TI83KeyPad1.Restart(); if (_tastudio != null) TAStudio1.Restart(); @@ -2320,8 +2314,6 @@ namespace BizHawk.MultiClient GlobalWinF.Tools.UpdateBefore(); if (_pcebgviewer != null) PCEBGViewer1.UpdateValues(); - if (_gbgpuview != null) GBGPUView1.UpdateValues(); - if (_gbagpuview != null) GBAGPUView1.UpdateValues(); } public void UpdateToolsLoadstate() @@ -2689,28 +2681,6 @@ namespace BizHawk.MultiClient PCEBGViewer1.Focus(); } - public void LoadGBGPUView() - { - if (!GBGPUView1.IsHandleCreated || GBGPUView1.IsDisposed) - { - GBGPUView1 = new GBtools.GBGPUView(); - GBGPUView1.Show(); - } - else - GBGPUView1.Focus(); - } - - public void LoadGBAGPUView() - { - if (!GBAGPUView1.IsHandleCreated || GBAGPUView1.IsDisposed) - { - GBAGPUView1 = new GBAtools.GBAGPUView(); - GBAGPUView1.Show(); - } - else - GBAGPUView1.Focus(); - } - public void LoadTI83KeyPad() { if (!TI83KeyPad1.IsHandleCreated || TI83KeyPad1.IsDisposed) @@ -3057,8 +3027,6 @@ namespace BizHawk.MultiClient RewireSound(); ResetRewindBuffer(); - GBGPUView1.Restart(); - GBAGPUView1.Restart(); PCEBGViewer1.Restart(); TI83KeyPad1.Restart(); Cheats_Restart(); @@ -3093,8 +3061,6 @@ namespace BizHawk.MultiClient public void CloseTools() { - CloseForm(GBGPUView1); - CloseForm(GBAGPUView1); CloseForm(PCEBGViewer1); CloseForm(TI83KeyPad1); CloseForm(TAStudio1); Global.MovieSession.EditorMode = false; diff --git a/BizHawk.MultiClient/tools/GB/BmpView.cs b/BizHawk.MultiClient/tools/GB/BmpView.cs index eb467a5a5a..e2a1b68f05 100644 --- a/BizHawk.MultiClient/tools/GB/BmpView.cs +++ b/BizHawk.MultiClient/tools/GB/BmpView.cs @@ -7,7 +7,7 @@ using System.Text; using System.Drawing; using System.Windows.Forms; -namespace BizHawk.MultiClient.GBtools +namespace BizHawk.MultiClient { public partial class BmpView : Control { diff --git a/BizHawk.MultiClient/tools/GB/CGBColorChooserForm.Designer.cs b/BizHawk.MultiClient/tools/GB/CGBColorChooserForm.Designer.cs index 9bdc30c67c..4ee408607e 100644 --- a/BizHawk.MultiClient/tools/GB/CGBColorChooserForm.Designer.cs +++ b/BizHawk.MultiClient/tools/GB/CGBColorChooserForm.Designer.cs @@ -36,7 +36,7 @@ this.radioButton2 = new System.Windows.Forms.RadioButton(); this.radioButton1 = new System.Windows.Forms.RadioButton(); this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.bmpView1 = new BizHawk.MultiClient.GBtools.BmpView(); + this.bmpView1 = new BmpView(); this.buttonOK = new System.Windows.Forms.Button(); this.buttonCancel = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); diff --git a/BizHawk.MultiClient/tools/GB/GBGPUView.Designer.cs b/BizHawk.MultiClient/tools/GB/GBGPUView.Designer.cs index c471265e2c..984ec0c1fd 100644 --- a/BizHawk.MultiClient/tools/GB/GBGPUView.Designer.cs +++ b/BizHawk.MultiClient/tools/GB/GBGPUView.Designer.cs @@ -1,4 +1,4 @@ -namespace BizHawk.MultiClient.GBtools +namespace BizHawk.MultiClient { partial class GBGPUView { @@ -35,10 +35,17 @@ this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.bmpViewBG = new BmpView(); + this.bmpViewWin = new BmpView(); this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.bmpViewTiles1 = new BmpView(); + this.bmpViewTiles2 = new BmpView(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label7 = new System.Windows.Forms.Label(); + this.bmpViewBGPal = new BmpView(); + this.bmpViewSPPal = new BmpView(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.bmpViewOAM = new BmpView(); this.groupBox5 = new System.Windows.Forms.GroupBox(); this.hScrollBarScanline = new System.Windows.Forms.HScrollBar(); this.labelScanline = new System.Windows.Forms.Label(); @@ -48,7 +55,9 @@ this.radioButtonRefreshFrame = new System.Windows.Forms.RadioButton(); this.groupBoxDetails = new System.Windows.Forms.GroupBox(); this.labelDetails = new System.Windows.Forms.Label(); + this.bmpViewDetails = new BmpView(); this.groupBoxMemory = new System.Windows.Forms.GroupBox(); + this.bmpViewMemory = new BmpView(); this.labelMemory = new System.Windows.Forms.Label(); this.groupBox6 = new System.Windows.Forms.GroupBox(); this.labelClipboard = new System.Windows.Forms.Label(); @@ -59,15 +68,6 @@ this.labelSpriteBackColor = new System.Windows.Forms.Label(); this.buttonChangeColor = new System.Windows.Forms.Button(); this.panelSpriteBackColor = new System.Windows.Forms.Panel(); - this.bmpViewMemory = new BizHawk.MultiClient.GBtools.BmpView(); - this.bmpViewDetails = new BizHawk.MultiClient.GBtools.BmpView(); - this.bmpViewOAM = new BizHawk.MultiClient.GBtools.BmpView(); - this.bmpViewBGPal = new BizHawk.MultiClient.GBtools.BmpView(); - this.bmpViewSPPal = new BizHawk.MultiClient.GBtools.BmpView(); - this.bmpViewTiles1 = new BizHawk.MultiClient.GBtools.BmpView(); - this.bmpViewTiles2 = new BizHawk.MultiClient.GBtools.BmpView(); - this.bmpViewBG = new BizHawk.MultiClient.GBtools.BmpView(); - this.bmpViewWin = new BizHawk.MultiClient.GBtools.BmpView(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); @@ -147,6 +147,32 @@ this.groupBox1.TabStop = false; this.groupBox1.Text = "Tilemaps"; // + // bmpViewBG + // + this.bmpViewBG.BackColor = System.Drawing.Color.Black; + this.bmpViewBG.Location = new System.Drawing.Point(6, 32); + this.bmpViewBG.Name = "bmpViewBG"; + this.bmpViewBG.Size = new System.Drawing.Size(256, 256); + this.bmpViewBG.TabIndex = 4; + this.bmpViewBG.Text = "Background"; + this.bmpViewBG.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); + this.bmpViewBG.MouseEnter += new System.EventHandler(this.bmpViewBG_MouseEnter); + this.bmpViewBG.MouseLeave += new System.EventHandler(this.bmpViewBG_MouseLeave); + this.bmpViewBG.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewBG_MouseMove); + // + // bmpViewWin + // + this.bmpViewWin.BackColor = System.Drawing.Color.Black; + this.bmpViewWin.Location = new System.Drawing.Point(268, 32); + this.bmpViewWin.Name = "bmpViewWin"; + this.bmpViewWin.Size = new System.Drawing.Size(256, 256); + this.bmpViewWin.TabIndex = 5; + this.bmpViewWin.Text = "Window"; + this.bmpViewWin.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); + this.bmpViewWin.MouseEnter += new System.EventHandler(this.bmpViewWin_MouseEnter); + this.bmpViewWin.MouseLeave += new System.EventHandler(this.bmpViewWin_MouseLeave); + this.bmpViewWin.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewWin_MouseMove); + // // groupBox2 // this.groupBox2.Controls.Add(this.label3); @@ -160,6 +186,32 @@ this.groupBox2.TabStop = false; this.groupBox2.Text = "Tiles"; // + // bmpViewTiles1 + // + this.bmpViewTiles1.BackColor = System.Drawing.Color.Black; + this.bmpViewTiles1.Location = new System.Drawing.Point(6, 32); + this.bmpViewTiles1.Name = "bmpViewTiles1"; + this.bmpViewTiles1.Size = new System.Drawing.Size(128, 192); + this.bmpViewTiles1.TabIndex = 6; + this.bmpViewTiles1.Text = "Tiles 1"; + this.bmpViewTiles1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); + this.bmpViewTiles1.MouseEnter += new System.EventHandler(this.bmpViewTiles1_MouseEnter); + this.bmpViewTiles1.MouseLeave += new System.EventHandler(this.bmpViewTiles1_MouseLeave); + this.bmpViewTiles1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewTiles1_MouseMove); + // + // bmpViewTiles2 + // + this.bmpViewTiles2.BackColor = System.Drawing.Color.Black; + this.bmpViewTiles2.Location = new System.Drawing.Point(140, 32); + this.bmpViewTiles2.Name = "bmpViewTiles2"; + this.bmpViewTiles2.Size = new System.Drawing.Size(128, 192); + this.bmpViewTiles2.TabIndex = 7; + this.bmpViewTiles2.Text = "Tiles 2"; + this.bmpViewTiles2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); + this.bmpViewTiles2.MouseEnter += new System.EventHandler(this.bmpViewTiles2_MouseEnter); + this.bmpViewTiles2.MouseLeave += new System.EventHandler(this.bmpViewTiles2_MouseLeave); + this.bmpViewTiles2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewTiles2_MouseMove); + // // groupBox3 // this.groupBox3.Controls.Add(this.label7); @@ -183,6 +235,32 @@ this.label7.TabIndex = 14; this.label7.Text = "Left-click a palette to use it for drawing the tiles display."; // + // bmpViewBGPal + // + this.bmpViewBGPal.BackColor = System.Drawing.Color.Black; + this.bmpViewBGPal.Location = new System.Drawing.Point(6, 32); + this.bmpViewBGPal.Name = "bmpViewBGPal"; + this.bmpViewBGPal.Size = new System.Drawing.Size(128, 64); + this.bmpViewBGPal.TabIndex = 10; + this.bmpViewBGPal.Text = "Background palettes"; + this.bmpViewBGPal.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); + this.bmpViewBGPal.MouseEnter += new System.EventHandler(this.bmpViewBGPal_MouseEnter); + this.bmpViewBGPal.MouseLeave += new System.EventHandler(this.bmpViewBGPal_MouseLeave); + this.bmpViewBGPal.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewBGPal_MouseMove); + // + // bmpViewSPPal + // + this.bmpViewSPPal.BackColor = System.Drawing.Color.Black; + this.bmpViewSPPal.Location = new System.Drawing.Point(140, 32); + this.bmpViewSPPal.Name = "bmpViewSPPal"; + this.bmpViewSPPal.Size = new System.Drawing.Size(128, 64); + this.bmpViewSPPal.TabIndex = 11; + this.bmpViewSPPal.Text = "Sprite palettes"; + this.bmpViewSPPal.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); + this.bmpViewSPPal.MouseEnter += new System.EventHandler(this.bmpViewSPPal_MouseEnter); + this.bmpViewSPPal.MouseLeave += new System.EventHandler(this.bmpViewSPPal_MouseLeave); + this.bmpViewSPPal.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewSPPal_MouseMove); + // // groupBox4 // this.groupBox4.Controls.Add(this.bmpViewOAM); @@ -193,6 +271,19 @@ this.groupBox4.TabStop = false; this.groupBox4.Text = "Sprites"; // + // bmpViewOAM + // + this.bmpViewOAM.BackColor = System.Drawing.Color.Black; + this.bmpViewOAM.Location = new System.Drawing.Point(6, 19); + this.bmpViewOAM.Name = "bmpViewOAM"; + this.bmpViewOAM.Size = new System.Drawing.Size(320, 16); + this.bmpViewOAM.TabIndex = 14; + this.bmpViewOAM.Text = "Sprites"; + this.bmpViewOAM.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); + this.bmpViewOAM.MouseEnter += new System.EventHandler(this.bmpViewOAM_MouseEnter); + this.bmpViewOAM.MouseLeave += new System.EventHandler(this.bmpViewOAM_MouseLeave); + this.bmpViewOAM.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewOAM_MouseMove); + // // groupBox5 // this.groupBox5.Controls.Add(this.hScrollBarScanline); @@ -294,6 +385,16 @@ this.labelDetails.TabIndex = 1; this.labelDetails.Text = "Mouse over an item to see details about it."; // + // bmpViewDetails + // + this.bmpViewDetails.BackColor = System.Drawing.Color.Black; + this.bmpViewDetails.Location = new System.Drawing.Point(6, 19); + this.bmpViewDetails.Name = "bmpViewDetails"; + this.bmpViewDetails.Size = new System.Drawing.Size(64, 128); + this.bmpViewDetails.TabIndex = 0; + this.bmpViewDetails.Text = "Details (mouseover)"; + this.bmpViewDetails.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); + // // groupBoxMemory // this.groupBoxMemory.Controls.Add(this.bmpViewMemory); @@ -305,6 +406,15 @@ this.groupBoxMemory.TabStop = false; this.groupBoxMemory.Text = "Details - Memory"; // + // bmpViewMemory + // + this.bmpViewMemory.BackColor = System.Drawing.Color.Black; + this.bmpViewMemory.Location = new System.Drawing.Point(6, 19); + this.bmpViewMemory.Name = "bmpViewMemory"; + this.bmpViewMemory.Size = new System.Drawing.Size(64, 128); + this.bmpViewMemory.TabIndex = 1; + this.bmpViewMemory.Text = "Details (memory)"; + // // labelMemory // this.labelMemory.AutoSize = true; @@ -406,116 +516,6 @@ this.panelSpriteBackColor.Size = new System.Drawing.Size(55, 23); this.panelSpriteBackColor.TabIndex = 0; // - // bmpViewMemory - // - this.bmpViewMemory.BackColor = System.Drawing.Color.Black; - this.bmpViewMemory.Location = new System.Drawing.Point(6, 19); - this.bmpViewMemory.Name = "bmpViewMemory"; - this.bmpViewMemory.Size = new System.Drawing.Size(64, 128); - this.bmpViewMemory.TabIndex = 1; - this.bmpViewMemory.Text = "Details (memory)"; - // - // bmpViewDetails - // - this.bmpViewDetails.BackColor = System.Drawing.Color.Black; - this.bmpViewDetails.Location = new System.Drawing.Point(6, 19); - this.bmpViewDetails.Name = "bmpViewDetails"; - this.bmpViewDetails.Size = new System.Drawing.Size(64, 128); - this.bmpViewDetails.TabIndex = 0; - this.bmpViewDetails.Text = "Details (mouseover)"; - this.bmpViewDetails.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); - // - // bmpViewOAM - // - this.bmpViewOAM.BackColor = System.Drawing.Color.Black; - this.bmpViewOAM.Location = new System.Drawing.Point(6, 19); - this.bmpViewOAM.Name = "bmpViewOAM"; - this.bmpViewOAM.Size = new System.Drawing.Size(320, 16); - this.bmpViewOAM.TabIndex = 14; - this.bmpViewOAM.Text = "Sprites"; - this.bmpViewOAM.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); - this.bmpViewOAM.MouseEnter += new System.EventHandler(this.bmpViewOAM_MouseEnter); - this.bmpViewOAM.MouseLeave += new System.EventHandler(this.bmpViewOAM_MouseLeave); - this.bmpViewOAM.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewOAM_MouseMove); - // - // bmpViewBGPal - // - this.bmpViewBGPal.BackColor = System.Drawing.Color.Black; - this.bmpViewBGPal.Location = new System.Drawing.Point(6, 32); - this.bmpViewBGPal.Name = "bmpViewBGPal"; - this.bmpViewBGPal.Size = new System.Drawing.Size(128, 64); - this.bmpViewBGPal.TabIndex = 10; - this.bmpViewBGPal.Text = "Background palettes"; - this.bmpViewBGPal.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); - this.bmpViewBGPal.MouseEnter += new System.EventHandler(this.bmpViewBGPal_MouseEnter); - this.bmpViewBGPal.MouseLeave += new System.EventHandler(this.bmpViewBGPal_MouseLeave); - this.bmpViewBGPal.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewBGPal_MouseMove); - // - // bmpViewSPPal - // - this.bmpViewSPPal.BackColor = System.Drawing.Color.Black; - this.bmpViewSPPal.Location = new System.Drawing.Point(140, 32); - this.bmpViewSPPal.Name = "bmpViewSPPal"; - this.bmpViewSPPal.Size = new System.Drawing.Size(128, 64); - this.bmpViewSPPal.TabIndex = 11; - this.bmpViewSPPal.Text = "Sprite palettes"; - this.bmpViewSPPal.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); - this.bmpViewSPPal.MouseEnter += new System.EventHandler(this.bmpViewSPPal_MouseEnter); - this.bmpViewSPPal.MouseLeave += new System.EventHandler(this.bmpViewSPPal_MouseLeave); - this.bmpViewSPPal.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewSPPal_MouseMove); - // - // bmpViewTiles1 - // - this.bmpViewTiles1.BackColor = System.Drawing.Color.Black; - this.bmpViewTiles1.Location = new System.Drawing.Point(6, 32); - this.bmpViewTiles1.Name = "bmpViewTiles1"; - this.bmpViewTiles1.Size = new System.Drawing.Size(128, 192); - this.bmpViewTiles1.TabIndex = 6; - this.bmpViewTiles1.Text = "Tiles 1"; - this.bmpViewTiles1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); - this.bmpViewTiles1.MouseEnter += new System.EventHandler(this.bmpViewTiles1_MouseEnter); - this.bmpViewTiles1.MouseLeave += new System.EventHandler(this.bmpViewTiles1_MouseLeave); - this.bmpViewTiles1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewTiles1_MouseMove); - // - // bmpViewTiles2 - // - this.bmpViewTiles2.BackColor = System.Drawing.Color.Black; - this.bmpViewTiles2.Location = new System.Drawing.Point(140, 32); - this.bmpViewTiles2.Name = "bmpViewTiles2"; - this.bmpViewTiles2.Size = new System.Drawing.Size(128, 192); - this.bmpViewTiles2.TabIndex = 7; - this.bmpViewTiles2.Text = "Tiles 2"; - this.bmpViewTiles2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); - this.bmpViewTiles2.MouseEnter += new System.EventHandler(this.bmpViewTiles2_MouseEnter); - this.bmpViewTiles2.MouseLeave += new System.EventHandler(this.bmpViewTiles2_MouseLeave); - this.bmpViewTiles2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewTiles2_MouseMove); - // - // bmpViewBG - // - this.bmpViewBG.BackColor = System.Drawing.Color.Black; - this.bmpViewBG.Location = new System.Drawing.Point(6, 32); - this.bmpViewBG.Name = "bmpViewBG"; - this.bmpViewBG.Size = new System.Drawing.Size(256, 256); - this.bmpViewBG.TabIndex = 4; - this.bmpViewBG.Text = "Background"; - this.bmpViewBG.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); - this.bmpViewBG.MouseEnter += new System.EventHandler(this.bmpViewBG_MouseEnter); - this.bmpViewBG.MouseLeave += new System.EventHandler(this.bmpViewBG_MouseLeave); - this.bmpViewBG.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewBG_MouseMove); - // - // bmpViewWin - // - this.bmpViewWin.BackColor = System.Drawing.Color.Black; - this.bmpViewWin.Location = new System.Drawing.Point(268, 32); - this.bmpViewWin.Name = "bmpViewWin"; - this.bmpViewWin.Size = new System.Drawing.Size(256, 256); - this.bmpViewWin.TabIndex = 5; - this.bmpViewWin.Text = "Window"; - this.bmpViewWin.MouseClick += new System.Windows.Forms.MouseEventHandler(this.bmpView_MouseClick); - this.bmpViewWin.MouseEnter += new System.EventHandler(this.bmpViewWin_MouseEnter); - this.bmpViewWin.MouseLeave += new System.EventHandler(this.bmpViewWin_MouseLeave); - this.bmpViewWin.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bmpViewWin_MouseMove); - // // GBGPUView // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -533,7 +533,8 @@ this.Controls.Add(this.groupBox1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Name = "GBGPUView"; - this.Text = "GameBoy GPU Viewer"; + this.ShowIcon = false; + this.Text = "GPU Viewer"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.GBGPUView_FormClosing); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.GBGPUView_FormClosed); this.Load += new System.EventHandler(this.GBGPUView_Load); diff --git a/BizHawk.MultiClient/tools/GB/GBGPUView.cs b/BizHawk.MultiClient/tools/GB/GBGPUView.cs index 611e7edf02..11ced99c47 100644 --- a/BizHawk.MultiClient/tools/GB/GBGPUView.cs +++ b/BizHawk.MultiClient/tools/GB/GBGPUView.cs @@ -6,9 +6,9 @@ using System.Windows.Forms; using BizHawk.Common; using BizHawk.Client.Common; -namespace BizHawk.MultiClient.GBtools +namespace BizHawk.MultiClient { - public partial class GBGPUView : Form + public partial class GBGPUView : Form, IToolForm { // TODO: freeze semantics are a bit weird: details for a mouseover or freeze are taken from the current // state, not the state at the last callback (and so can be quite different when update is set to manual). @@ -50,6 +50,9 @@ namespace BizHawk.MultiClient.GBtools } } + public bool AskSave() { return true; } + public bool UpdateBefore { get { return true; } } + public GBGPUView() { InitializeComponent(); diff --git a/BizHawk.MultiClient/tools/GBA/GBAGPUView.Designer.cs b/BizHawk.MultiClient/tools/GBA/GBAGPUView.Designer.cs index 274c2ea737..458a2d55e1 100644 --- a/BizHawk.MultiClient/tools/GBA/GBAGPUView.Designer.cs +++ b/BizHawk.MultiClient/tools/GBA/GBAGPUView.Designer.cs @@ -1,4 +1,4 @@ -namespace BizHawk.MultiClient.GBAtools +namespace BizHawk.MultiClient { partial class GBAGPUView { diff --git a/BizHawk.MultiClient/tools/GBA/GBAGPUView.cs b/BizHawk.MultiClient/tools/GBA/GBAGPUView.cs index 92bb81a63b..35f68ba59e 100644 --- a/BizHawk.MultiClient/tools/GBA/GBAGPUView.cs +++ b/BizHawk.MultiClient/tools/GBA/GBAGPUView.cs @@ -1,14 +1,13 @@ using System; using System.Drawing; using System.Windows.Forms; -using BizHawk.MultiClient.GBtools; using BizHawk.Common; using BizHawk.Client.Common; -namespace BizHawk.MultiClient.GBAtools +namespace BizHawk.MultiClient { - public partial class GBAGPUView : Form + public partial class GBAGPUView : Form, IToolForm { Emulation.Consoles.Nintendo.GBA.GBA gba; @@ -24,6 +23,9 @@ namespace BizHawk.MultiClient.GBAtools MobileDetailView memory; + public bool AskSave() { return true; } + public bool UpdateBefore { get { return true; } } + public GBAGPUView() { InitializeComponent(); diff --git a/BizHawk.MultiClient/tools/GBA/MobileBmpView.Designer.cs b/BizHawk.MultiClient/tools/GBA/MobileBmpView.Designer.cs index 99a564205f..00dee37eb8 100644 --- a/BizHawk.MultiClient/tools/GBA/MobileBmpView.Designer.cs +++ b/BizHawk.MultiClient/tools/GBA/MobileBmpView.Designer.cs @@ -1,4 +1,4 @@ -namespace BizHawk.MultiClient.GBAtools +namespace BizHawk.MultiClient { partial class MobileBmpView { @@ -28,7 +28,7 @@ /// private void InitializeComponent() { - this.bmpView1 = new BizHawk.MultiClient.GBtools.BmpView(); + this.bmpView1 = new BmpView(); this.SuspendLayout(); // // bmpView1 @@ -56,6 +56,6 @@ #endregion - private GBtools.BmpView bmpView1; + private BmpView bmpView1; } } \ No newline at end of file diff --git a/BizHawk.MultiClient/tools/GBA/MobileBmpView.cs b/BizHawk.MultiClient/tools/GBA/MobileBmpView.cs index 0267df488f..562da761c8 100644 --- a/BizHawk.MultiClient/tools/GBA/MobileBmpView.cs +++ b/BizHawk.MultiClient/tools/GBA/MobileBmpView.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Text; using System.Windows.Forms; -namespace BizHawk.MultiClient.GBAtools +namespace BizHawk.MultiClient { public partial class MobileBmpView : Form { @@ -16,7 +16,7 @@ namespace BizHawk.MultiClient.GBAtools InitializeComponent(); } - public GBtools.BmpView bmpView { get { return bmpView1; } } + public BmpView bmpView { get { return bmpView1; } } [Browsable(false)] public bool ShouldDraw { get { return this.Visible; } } diff --git a/BizHawk.MultiClient/tools/GBA/MobileDetailView.Designer.cs b/BizHawk.MultiClient/tools/GBA/MobileDetailView.Designer.cs index 4c2e0b518b..b15f129709 100644 --- a/BizHawk.MultiClient/tools/GBA/MobileDetailView.Designer.cs +++ b/BizHawk.MultiClient/tools/GBA/MobileDetailView.Designer.cs @@ -1,4 +1,4 @@ -namespace BizHawk.MultiClient.GBAtools +namespace BizHawk.MultiClient { partial class MobileDetailView { @@ -29,7 +29,7 @@ private void InitializeComponent() { this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.bmpView1 = new BizHawk.MultiClient.GBtools.BmpView(); + this.bmpView1 = new BmpView(); this.listView1 = new System.Windows.Forms.ListView(); this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); @@ -95,7 +95,7 @@ #endregion private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private GBtools.BmpView bmpView1; + private BmpView bmpView1; private System.Windows.Forms.ListView listView1; private System.Windows.Forms.ColumnHeader columnHeader1; private System.Windows.Forms.ColumnHeader columnHeader2; diff --git a/BizHawk.MultiClient/tools/GBA/MobileDetailView.cs b/BizHawk.MultiClient/tools/GBA/MobileDetailView.cs index 5f9b46312d..ba79e4e8ec 100644 --- a/BizHawk.MultiClient/tools/GBA/MobileDetailView.cs +++ b/BizHawk.MultiClient/tools/GBA/MobileDetailView.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Text; using System.Windows.Forms; -namespace BizHawk.MultiClient.GBAtools +namespace BizHawk.MultiClient { public partial class MobileDetailView : Form { @@ -16,7 +16,7 @@ namespace BizHawk.MultiClient.GBAtools InitializeComponent(); } - public GBtools.BmpView bmpView { get { return bmpView1; } } + public BmpView bmpView { get { return bmpView1; } } [Browsable(false)] public bool ShouldDraw { get { return this.Visible; } }