Basic Bot - don't show quicksave loaded osd message
This commit is contained in:
parent
7b8cde51a9
commit
81df9f1224
|
@ -2631,7 +2631,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadState(string path, string userFriendlyStateName, bool fromLua = false) // Move to client.common
|
public void LoadState(string path, string userFriendlyStateName, bool fromLua = false, bool supressOSD = false) // Move to client.common
|
||||||
{
|
{
|
||||||
if (!Global.Emulator.HasSavestates())
|
if (!Global.Emulator.HasSavestates())
|
||||||
{
|
{
|
||||||
|
@ -2654,7 +2654,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
UpdateToolsAfter(fromLua);
|
UpdateToolsAfter(fromLua);
|
||||||
UpdateToolsLoadstate();
|
UpdateToolsLoadstate();
|
||||||
Global.AutoFireController.ClearStarts();
|
Global.AutoFireController.ClearStarts();
|
||||||
GlobalWin.OSD.AddMessage("Loaded state: " + userFriendlyStateName);
|
|
||||||
|
if (!supressOSD)
|
||||||
|
{
|
||||||
|
GlobalWin.OSD.AddMessage("Loaded state: " + userFriendlyStateName);
|
||||||
|
}
|
||||||
|
|
||||||
if (GlobalWin.Tools.Has<LuaConsole>())
|
if (GlobalWin.Tools.Has<LuaConsole>())
|
||||||
{
|
{
|
||||||
|
@ -2669,7 +2673,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Global.MovieSession.Movie.IsCountingRerecords = wasCountingRerecords;
|
Global.MovieSession.Movie.IsCountingRerecords = wasCountingRerecords;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadQuickSave(string quickSlotName, bool fromLua = false)
|
public void LoadQuickSave(string quickSlotName, bool fromLua = false, bool supressOSD = false)
|
||||||
{
|
{
|
||||||
if (!Global.Emulator.HasSavestates())
|
if (!Global.Emulator.HasSavestates())
|
||||||
{
|
{
|
||||||
|
@ -2680,10 +2684,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (File.Exists(path) == false)
|
if (File.Exists(path) == false)
|
||||||
{
|
{
|
||||||
GlobalWin.OSD.AddMessage("Unable to load " + quickSlotName + ".State");
|
GlobalWin.OSD.AddMessage("Unable to load " + quickSlotName + ".State");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadState(path, quickSlotName, fromLua);
|
LoadState(path, quickSlotName, fromLua, supressOSD);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveState(string path, string userFriendlyStateName, bool fromLua)
|
public void SaveState(string path, string userFriendlyStateName, bool fromLua)
|
||||||
|
|
|
@ -43,6 +43,8 @@
|
||||||
this.OptionsSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
this.OptionsSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.MemoryDomainsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.MemoryDomainsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.BigEndianMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.TurboWhileBottingMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.TurboWhileBottingMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.RunBtn = new System.Windows.Forms.Button();
|
this.RunBtn = new System.Windows.Forms.Button();
|
||||||
this.BotStatusStrip = new System.Windows.Forms.StatusStrip();
|
this.BotStatusStrip = new System.Windows.Forms.StatusStrip();
|
||||||
|
@ -199,6 +201,8 @@
|
||||||
//
|
//
|
||||||
this.OptionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.OptionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.MemoryDomainsMenuItem,
|
this.MemoryDomainsMenuItem,
|
||||||
|
this.BigEndianMenuItem,
|
||||||
|
this.toolStripSeparator4,
|
||||||
this.TurboWhileBottingMenuItem});
|
this.TurboWhileBottingMenuItem});
|
||||||
this.OptionsSubMenu.Name = "OptionsSubMenu";
|
this.OptionsSubMenu.Name = "OptionsSubMenu";
|
||||||
this.OptionsSubMenu.Size = new System.Drawing.Size(61, 20);
|
this.OptionsSubMenu.Size = new System.Drawing.Size(61, 20);
|
||||||
|
@ -219,6 +223,18 @@
|
||||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||||
this.toolStripSeparator3.Size = new System.Drawing.Size(57, 6);
|
this.toolStripSeparator3.Size = new System.Drawing.Size(57, 6);
|
||||||
//
|
//
|
||||||
|
// BigEndianMenuItem
|
||||||
|
//
|
||||||
|
this.BigEndianMenuItem.Name = "BigEndianMenuItem";
|
||||||
|
this.BigEndianMenuItem.Size = new System.Drawing.Size(181, 22);
|
||||||
|
this.BigEndianMenuItem.Text = "Big Endian";
|
||||||
|
this.BigEndianMenuItem.Click += new System.EventHandler(this.BigEndianMenuItem_Click);
|
||||||
|
//
|
||||||
|
// toolStripSeparator4
|
||||||
|
//
|
||||||
|
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||||
|
this.toolStripSeparator4.Size = new System.Drawing.Size(178, 6);
|
||||||
|
//
|
||||||
// TurboWhileBottingMenuItem
|
// TurboWhileBottingMenuItem
|
||||||
//
|
//
|
||||||
this.TurboWhileBottingMenuItem.Name = "TurboWhileBottingMenuItem";
|
this.TurboWhileBottingMenuItem.Name = "TurboWhileBottingMenuItem";
|
||||||
|
@ -256,7 +272,7 @@
|
||||||
this.BotStatusButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.BotStatusButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.BotStatusButton.Name = "BotStatusButton";
|
this.BotStatusButton.Name = "BotStatusButton";
|
||||||
this.BotStatusButton.RightToLeftAutoMirrorImage = true;
|
this.BotStatusButton.RightToLeftAutoMirrorImage = true;
|
||||||
this.BotStatusButton.Size = new System.Drawing.Size(32, 20);
|
this.BotStatusButton.Size = new System.Drawing.Size(16, 17);
|
||||||
this.BotStatusButton.Text = " ";
|
this.BotStatusButton.Text = " ";
|
||||||
this.BotStatusButton.ToolTipText = " ";
|
this.BotStatusButton.ToolTipText = " ";
|
||||||
//
|
//
|
||||||
|
@ -741,7 +757,7 @@
|
||||||
this.panel2.Controls.Add(this.AttemptsLabel);
|
this.panel2.Controls.Add(this.AttemptsLabel);
|
||||||
this.panel2.Location = new System.Drawing.Point(6, 85);
|
this.panel2.Location = new System.Drawing.Point(6, 85);
|
||||||
this.panel2.Name = "panel2";
|
this.panel2.Name = "panel2";
|
||||||
this.panel2.Size = new System.Drawing.Size(82, 33);
|
this.panel2.Size = new System.Drawing.Size(140, 33);
|
||||||
this.panel2.TabIndex = 2003;
|
this.panel2.TabIndex = 2003;
|
||||||
//
|
//
|
||||||
// StatsContextMenu
|
// StatsContextMenu
|
||||||
|
@ -861,5 +877,7 @@
|
||||||
private System.Windows.Forms.ContextMenuStrip StatsContextMenu;
|
private System.Windows.Forms.ContextMenuStrip StatsContextMenu;
|
||||||
private System.Windows.Forms.ToolStripMenuItem ClearStatsContextMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem ClearStatsContextMenuItem;
|
||||||
private System.Windows.Forms.ToolStripStatusLabel BotStatusButton;
|
private System.Windows.Forms.ToolStripStatusLabel BotStatusButton;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem BigEndianMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -51,6 +51,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private bool _dontUpdateValues = false;
|
private bool _dontUpdateValues = false;
|
||||||
|
|
||||||
private MemoryDomain _currentDomain;
|
private MemoryDomain _currentDomain;
|
||||||
|
private bool _bigEndian;
|
||||||
|
|
||||||
#region Services and Settings
|
#region Services and Settings
|
||||||
|
|
||||||
|
@ -440,6 +441,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private void OptionsSubMenu_DropDownOpened(object sender, EventArgs e)
|
private void OptionsSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
TurboWhileBottingMenuItem.Checked = Settings.TurboWhenBotting;
|
TurboWhileBottingMenuItem.Checked = Settings.TurboWhenBotting;
|
||||||
|
BigEndianMenuItem.Checked = _bigEndian;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MemoryDomainsMenuItem_DropDownOpened(object sender, EventArgs e)
|
private void MemoryDomainsMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||||
|
@ -450,6 +452,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
.ToArray());
|
.ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BigEndianMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_bigEndian ^= true;
|
||||||
|
}
|
||||||
|
|
||||||
private void TurboWhileBottingMenuItem_Click(object sender, EventArgs e)
|
private void TurboWhileBottingMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Settings.TurboWhenBotting ^= true;
|
Settings.TurboWhenBotting ^= true;
|
||||||
|
@ -478,7 +485,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
StopBot();
|
StopBot();
|
||||||
_replayMode = true;
|
_replayMode = true;
|
||||||
_dontUpdateValues = true;
|
_dontUpdateValues = true;
|
||||||
GlobalWin.MainForm.LoadQuickSave(SelectedSlot); // Triggers an UpdateValues call
|
GlobalWin.MainForm.LoadQuickSave(SelectedSlot, false, true); // Triggers an UpdateValues call
|
||||||
_dontUpdateValues = false;
|
_dontUpdateValues = false;
|
||||||
_startFrame = Emulator.Frame;
|
_startFrame = Emulator.Frame;
|
||||||
SetNormalSpeed();
|
SetNormalSpeed();
|
||||||
|
@ -717,7 +724,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
_currentBotAttempt = new BotAttempt { Attempt = Attempts };
|
_currentBotAttempt = new BotAttempt { Attempt = Attempts };
|
||||||
GlobalWin.MainForm.LoadQuickSave(SelectedSlot);
|
GlobalWin.MainForm.LoadQuickSave(SelectedSlot, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
PressButtons();
|
PressButtons();
|
||||||
|
@ -841,7 +848,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
_dontUpdateValues = true;
|
_dontUpdateValues = true;
|
||||||
GlobalWin.MainForm.LoadQuickSave(SelectedSlot); // Triggers an UpdateValues call
|
GlobalWin.MainForm.LoadQuickSave(SelectedSlot, false, true); // Triggers an UpdateValues call
|
||||||
_dontUpdateValues = false;
|
_dontUpdateValues = false;
|
||||||
|
|
||||||
_targetFrame = Global.Emulator.Frame + (int)FrameLengthNumeric.Value;
|
_targetFrame = Global.Emulator.Frame + (int)FrameLengthNumeric.Value;
|
||||||
|
|
Loading…
Reference in New Issue