Merge pull request #3 from TASVideos/master

sync up 2
This commit is contained in:
alyosha-tas 2016-06-16 08:08:55 -04:00 committed by GitHub
commit 82348b5f31
47 changed files with 1193 additions and 389 deletions

View File

@ -99,6 +99,14 @@
<Compile Include="Attributes\BizHawkExternalToolUsageAttribute.cs" /> <Compile Include="Attributes\BizHawkExternalToolUsageAttribute.cs" />
<Compile Include="Attributes\BizHawkExternalToolAttribute.cs" /> <Compile Include="Attributes\BizHawkExternalToolAttribute.cs" />
<Compile Include="Classes\BizHawkSystemIdToCoreSystemEnumConverter.cs" /> <Compile Include="Classes\BizHawkSystemIdToCoreSystemEnumConverter.cs" />
<Compile Include="Classes\Events\EventArgs\BeforeQuickLoadEventArgs.cs" />
<Compile Include="Classes\Events\EventArgs\BeforeQuickSaveEventArgs.cs" />
<Compile Include="Classes\Events\EventArgs\StateSavedEventArgs.cs" />
<Compile Include="Classes\Events\EventArgs\StateLoadedEventArgs.cs" />
<Compile Include="Classes\Events\EventHandlers\BeforeQuickLoadEventhandler.cs" />
<Compile Include="Classes\Events\EventHandlers\BeforeQuickSaveEventhandler.cs" />
<Compile Include="Classes\Events\EventHandlers\StateLoadedEventHandler.cs" />
<Compile Include="Classes\Events\EventHandlers\StateSavedEventHandler.cs" />
<Compile Include="Classes\Joypad.cs" /> <Compile Include="Classes\Joypad.cs" />
<Compile Include="Classes\JoypadStringToEnumConverter.cs" /> <Compile Include="Classes\JoypadStringToEnumConverter.cs" />
<Compile Include="Enums\BizHawkExternalToolUsage.cs" /> <Compile Include="Enums\BizHawkExternalToolUsage.cs" />

View File

@ -4,11 +4,12 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using BizHawk.Client.Common; using BizHawk.Client.Common;
using BizHawk.Emulation.Cores.Nintendo.Gameboy; using BizHawk.Emulation.Cores.Nintendo.Gameboy;
using BizHawk.Emulation.Cores.PCEngine; using BizHawk.Emulation.Cores.PCEngine;
using BizHawk.Emulation.Cores.Sega.MasterSystem; using BizHawk.Emulation.Cores.Sega.MasterSystem;
using BizHawk.Client.ApiHawk.Classes.Events;
using System.IO;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.ApiHawk
{ {
@ -28,10 +29,31 @@ namespace BizHawk.Client.ApiHawk
internal static readonly BizHawkSystemIdToEnumConverter SystemIdConverter = new BizHawkSystemIdToEnumConverter(); internal static readonly BizHawkSystemIdToEnumConverter SystemIdConverter = new BizHawkSystemIdToEnumConverter();
internal static readonly JoypadStringToEnumConverter JoypadConverter = new JoypadStringToEnumConverter(); internal static readonly JoypadStringToEnumConverter JoypadConverter = new JoypadStringToEnumConverter();
public static event EventHandler RomLoaded;
private static List<Joypad> allJoypads; private static List<Joypad> allJoypads;
/// <summary>
/// Occurs before a quickload is done (just after user has pressed the shortcut button
/// or has click on the item menu)
/// </summary>
public static event BeforeQuickLoadEventHandler BeforeQuickLoad;
/// <summary>
/// Occurs before a quicksave is done (just after user has pressed the shortcut button
/// or has click on the item menu)
/// </summary>
public static event BeforeQuickSaveEventHandler BeforeQuickSave;
/// <summary>
/// Occurs when a ROM is succesfully loaded
/// </summary>
public static event EventHandler RomLoaded;
/// <summary>
/// Occurs when a savestate is sucessfully loaded
/// </summary>
public static event StateLoadedEventHandler StateLoaded;
/// <summary>
/// Occurs when a savestate is successfully saved
/// </summary>
public static event StateSavedEventHandler StateSaved;
#endregion #endregion
#region cTor(s) #region cTor(s)
@ -95,6 +117,80 @@ namespace BizHawk.Client.ApiHawk
} }
} }
/// <summary>
/// Load a savestate specified by its name
/// </summary>
/// <param name="name">Savetate friendly name</param>
public static void LoadState(string name)
{
MethodInfo method = mainFormClass.GetMethod("LoadState");
method.Invoke(clientMainFormInstance, new object[] { Path.Combine(PathManager.GetSaveStatePath(Global.Game), string.Format("{0}.{1}", name, "State")), name, false, false });
}
/// <summary>
/// Raised before a quickload is done (just after pressing shortcut button)
/// </summary>
/// <param name="sender">Object who raised the event</param>
/// <param name="quickSaveSlotName">Slot used for quickload</param>
/// <param name="eventHandled">A boolean that can be set if users want to handle save themselves; if so, BizHawk won't do anything</param>
public static void OnBeforeQuickLoad(object sender, string quickSaveSlotName, out bool eventHandled)
{
eventHandled = false;
if (BeforeQuickLoad != null)
{
BeforeQuickLoadEventArgs e = new BeforeQuickLoadEventArgs(quickSaveSlotName);
BeforeQuickLoad(sender, e);
eventHandled = e.Handled;
}
}
/// <summary>
/// Raised before a quicksave is done (just after pressing shortcut button)
/// </summary>
/// <param name="sender">Object who raised the event</param>
/// <param name="quickSaveSlotName">Slot used for quicksave</param>
/// <param name="eventHandled">A boolean that can be set if users want to handle save themselves; if so, BizHawk won't do anything</param>
public static void OnBeforeQuickSave(object sender, string quickSaveSlotName, out bool eventHandled)
{
eventHandled = false;
if (BeforeQuickSave != null)
{
BeforeQuickSaveEventArgs e = new BeforeQuickSaveEventArgs(quickSaveSlotName);
BeforeQuickSave(sender, e);
eventHandled = e.Handled;
}
}
/// <summary>
/// Raise when a state is loaded
/// </summary>
/// <param name="sender">Object who raised the event</param>
/// <param name="stateName">User friendly name for saved state</param>
public static void OnStateLoaded(object sender, string stateName)
{
if (StateLoaded != null)
{
StateLoaded(sender, new StateLoadedEventArgs(stateName));
}
}
/// <summary>
/// Raise when a state is saved
/// </summary>
/// <param name="sender">Object who raised the event</param>
/// <param name="stateName">User friendly name for saved state</param>
public static void OnStateSaved(object sender, string stateName)
{
if (StateSaved != null)
{
StateSaved(sender, new StateSavedEventArgs(stateName));
}
}
/// <summary> /// <summary>
/// Raise when a rom is successfully Loaded /// Raise when a rom is successfully Loaded
/// </summary> /// </summary>
@ -113,6 +209,17 @@ namespace BizHawk.Client.ApiHawk
} }
/// <summary>
/// Save a state with specified name
/// </summary>
/// <param name="name">Savetate friendly name</param>
public static void SaveState(string name)
{
MethodInfo method = mainFormClass.GetMethod("SaveState");
method.Invoke(clientMainFormInstance, new object[] { Path.Combine(PathManager.GetSaveStatePath(Global.Game), string.Format("{0}.{1}", name, "State")), name, false });
}
/// <summary> /// <summary>
/// Sets the extra padding added to the 'native' surface so that you can draw HUD elements in predictable placements /// Sets the extra padding added to the 'native' surface so that you can draw HUD elements in predictable placements
/// </summary> /// </summary>

View File

@ -0,0 +1,68 @@
using System;
namespace BizHawk.Client.ApiHawk.Classes.Events
{
/// <summary>
/// This class holds event data for BeforeQuickLoad event
/// </summary>
public sealed class BeforeQuickLoadEventArgs : EventArgs
{
#region Fields
private bool _Handled = false;
private string _QuickSaveSlotName;
#endregion
#region cTor(s)
internal BeforeQuickLoadEventArgs(string name)
{
_QuickSaveSlotName = name;
}
#endregion
#region Properties
/// <summary>
/// Gets or sets value that defined if saved has been handled or not
/// </summary>
public bool Handled
{
get
{
return _Handled;
}
set
{
_Handled = value;
}
}
/// <summary>
/// Gets quicksave name
/// </summary>
public string Name
{
get
{
return _QuickSaveSlotName;
}
}
/// <summary>
/// Gets slot used for quicksave
/// </summary>
public int Slot
{
get
{
return int.Parse(_QuickSaveSlotName.Substring(_QuickSaveSlotName.Length - 1));
}
}
#endregion
}
}

View File

@ -0,0 +1,69 @@
using System;
namespace BizHawk.Client.ApiHawk.Classes.Events
{
/// <summary>
/// This class holds event data for BeforeQuickSave event
/// </summary>
public sealed class BeforeQuickSaveEventArgs : EventArgs
{
#region Fields
private bool _Handled = false;
private string _QuickSaveSlotName;
#endregion
#region cTor(s)
internal BeforeQuickSaveEventArgs(string name)
{
_QuickSaveSlotName = name;
}
#endregion
#region Properties
/// <summary>
/// Gets or sets value that defined if saved has been handled or not
/// </summary>
public bool Handled
{
get
{
return _Handled;
}
set
{
_Handled = value;
}
}
/// <summary>
/// Gets quicksave name
/// </summary>
public string Name
{
get
{
return _QuickSaveSlotName;
}
}
/// <summary>
/// Gets slot used for quicksave
/// </summary>
public int Slot
{
get
{
return int.Parse(_QuickSaveSlotName.Substring(_QuickSaveSlotName.Length - 1));
}
}
#endregion
}
}

View File

@ -0,0 +1,44 @@
using System;
namespace BizHawk.Client.ApiHawk.Classes.Events
{
/// <summary>
/// This class holds event data for StateLoaded event
/// </summary>
public sealed class StateLoadedEventArgs: EventArgs
{
#region Fields
string _Name;
#endregion
#region cTor(s)
/// <summary>
/// Initialize a new instance of <see cref="StateLoadedEventArgs"/>
/// </summary>
/// <param name="stateName">User friendly name of loaded state</param>
internal StateLoadedEventArgs(string stateName)
{
_Name = stateName;
}
#endregion
#region Properties
/// <summary>
/// Gets user friendly name of the loaded savestate
/// </summary>
public string Name
{
get
{
return _Name;
}
}
#endregion
}
}

View File

@ -0,0 +1,44 @@
using System;
namespace BizHawk.Client.ApiHawk.Classes.Events
{
/// <summary>
/// This class holds event data for StateSaved event
/// </summary>
public sealed class StateSavedEventArgs : EventArgs
{
#region Fields
string _Name;
#endregion
#region cTor(s)
/// <summary>
/// Initialize a new instance of <see cref="StateSavedEventArgs"/>
/// </summary>
/// <param name="stateName">User friendly name of loaded state</param>
internal StateSavedEventArgs(string stateName)
{
_Name = stateName;
}
#endregion
#region Properties
/// <summary>
/// Gets user friendly name of the loaded savestate
/// </summary>
public string Name
{
get
{
return _Name;
}
}
#endregion
}
}

View File

@ -0,0 +1,9 @@
namespace BizHawk.Client.ApiHawk.Classes.Events
{
/// <summary>
/// Represent a method that will handle the event raised before a quickload is done
/// </summary>
/// <param name="sender">Object that raised the event</param>
/// <param name="e">Event arguments</param>
public delegate void BeforeQuickLoadEventHandler(object sender, BeforeQuickLoadEventArgs e);
}

View File

@ -0,0 +1,9 @@
namespace BizHawk.Client.ApiHawk.Classes.Events
{
/// <summary>
/// Represent a method that will handle the event raised before a quicksave is done
/// </summary>
/// <param name="sender">Object that raised the event</param>
/// <param name="e">Event arguments</param>
public delegate void BeforeQuickSaveEventHandler(object sender, BeforeQuickSaveEventArgs e);
}

View File

@ -0,0 +1,9 @@
namespace BizHawk.Client.ApiHawk.Classes.Events
{
/// <summary>
/// Represent a method that will handle the event raised when a savestate is loaded
/// </summary>
/// <param name="sender">Object that raised the event</param>
/// <param name="e">Event arguments</param>
public delegate void StateLoadedEventHandler(object sender, StateLoadedEventArgs e);
}

View File

@ -0,0 +1,9 @@
namespace BizHawk.Client.ApiHawk.Classes.Events
{
/// <summary>
/// Represent a method that will handle the event raised when a savestate is saved
/// </summary>
/// <param name="sender">Object that raised the event</param>
/// <param name="e">Event arguments</param>
public delegate void StateSavedEventHandler(object sender, StateSavedEventArgs e);
}

View File

@ -75,12 +75,13 @@ namespace BizHawk.Client.ApiHawk
/// </summary> /// </summary>
/// <param name="fileName">File that will be reflected</param> /// <param name="fileName">File that will be reflected</param>
/// <returns>A new <see cref="ToolStripMenuItem"/>; assembly path can be found in the Tag property</returns> /// <returns>A new <see cref="ToolStripMenuItem"/>; assembly path can be found in the Tag property</returns>
/// <remarks>For the moment, you could only load a dll that have a form (which implements <see cref="IExternalToolForm"/>)</remarks> /// <remarks>For the moment, you could only load a dll that have a form (which implements <see cref="BizHawk.Client.EmuHawk.IExternalToolForm"/>)</remarks>
private static ToolStripMenuItem GenerateToolTipFromFileName(string fileName) private static ToolStripMenuItem GenerateToolTipFromFileName(string fileName)
{ {
Type customFormType; Type customFormType;
Assembly externalToolFile; Assembly externalToolFile;
ToolStripMenuItem item = null; ToolStripMenuItem item = null;
try try
{ {
externalToolFile = Assembly.LoadFrom(fileName); externalToolFile = Assembly.LoadFrom(fileName);

View File

@ -53,7 +53,7 @@
<Class Name="BizHawk.Client.ApiHawk.ClientApi"> <Class Name="BizHawk.Client.ApiHawk.ClientApi">
<Position X="4.75" Y="10" Width="4" /> <Position X="4.75" Y="10" Width="4" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>CQEAAAAAgAAAQAAAAAABQAIAAAAAoGAACCAAAAAQAAA=</HashCode> <HashCode>CwEAAAAAgAMAQEAAAAAJQAoAAAEAgWAACCACAAAQAiA=</HashCode>
<FileName>Classes\ClientApi.cs</FileName> <FileName>Classes\ClientApi.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
@ -81,14 +81,42 @@
<Class Name="BizHawk.Client.ApiHawk.Joypad"> <Class Name="BizHawk.Client.ApiHawk.Joypad">
<Position X="0.75" Y="6.75" Width="3" /> <Position X="0.75" Y="6.75" Width="3" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AQAACAAAAIAAAACBAAgAAABAEAAAAAAAAAAAAAAAAAA=</HashCode> <HashCode>AQAACAAAAIAAAACBAAgAAABAEAAAAAAAAAACGAAAAAA=</HashCode>
<FileName>Classes\Joypad.cs</FileName> <FileName>Classes\Joypad.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="BizHawk.Client.Common.SystemInfo"> <Class Name="BizHawk.Client.Common.SystemInfo">
<Position X="0.5" Y="10.25" Width="4" /> <Position X="0.5" Y="11" Width="4" />
<TypeIdentifier /> <TypeIdentifier />
</Class> </Class>
<Class Name="BizHawk.Client.ApiHawk.Classes.Events.StateLoadedEventArgs">
<Position X="41.75" Y="2.25" Width="3" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAIAQAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\Events\EventArgs\StateLoadedEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="BizHawk.Client.ApiHawk.Classes.Events.StateSavedEventArgs">
<Position X="38.25" Y="2.25" Width="3" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAIAQAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\Events\EventArgs\StateSavedEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="BizHawk.Client.ApiHawk.Classes.Events.BeforeQuickSaveEventArgs">
<Position X="38.25" Y="6.75" Width="3" />
<TypeIdentifier>
<HashCode>AAAAAAAAIAAAQAAAAACAAAAAAAAAAAAAAAAAAAAAAgA=</HashCode>
<FileName>Classes\Events\EventArgs\BeforeQuickSaveEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="BizHawk.Client.ApiHawk.Classes.Events.BeforeQuickLoadEventArgs">
<Position X="41.75" Y="6.75" Width="3" />
<TypeIdentifier>
<HashCode>AAAAAAAAIAAAQAAAAACAAAAAAAAAAAAAAAAAAAAAAgA=</HashCode>
<FileName>Classes\Events\EventArgs\BeforeQuickLoadEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Interface Name="BizHawk.Client.EmuHawk.IExternalToolForm"> <Interface Name="BizHawk.Client.EmuHawk.IExternalToolForm">
<Position X="4.5" Y="4.5" Width="2.75" /> <Position X="4.5" Y="4.5" Width="2.75" />
<TypeIdentifier> <TypeIdentifier>
@ -131,5 +159,33 @@
<Position X="28.25" Y="9.75" Width="1.5" /> <Position X="28.25" Y="9.75" Width="1.5" />
<TypeIdentifier /> <TypeIdentifier />
</Enum> </Enum>
<Delegate Name="BizHawk.Client.ApiHawk.Classes.Events.StateLoadedEventHandler">
<Position X="41.75" Y="1" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\Events\EventHandlers\StateLoadedEventHandler.cs</FileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="BizHawk.Client.ApiHawk.Classes.Events.StateSavedEventHandler">
<Position X="38.25" Y="1" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAgA=</HashCode>
<FileName>Classes\Events\EventHandlers\StateSavedEventHandler.cs</FileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="BizHawk.Client.ApiHawk.Classes.Events.BeforeQuickSaveEventHandler">
<Position X="38.25" Y="5.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAEA=</HashCode>
<FileName>Classes\Events\EventHandlers\BeforeQuickSaveEventhandler.cs</FileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="BizHawk.Client.ApiHawk.Classes.Events.BeforeQuickLoadEventHandler">
<Position X="41.75" Y="5.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAACAAAAA=</HashCode>
<FileName>Classes\Events\EventHandlers\BeforeQuickLoadEventhandler.cs</FileName>
</TypeIdentifier>
</Delegate>
<Font Name="Segoe UI" Size="9" /> <Font Name="Segoe UI" Size="9" />
</ClassDiagram> </ClassDiagram>

View File

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("BizHawk.Client.Common")] [assembly: AssemblyTitle("BizHawk.Client.Common")]
[assembly: AssemblyDescription("http://code.google.com/p/bizhawk")] [assembly: AssemblyDescription("http://tasvideos.org/Bizhawk.html")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("BizHawk")] [assembly: AssemblyCompany("BizHawk")]
[assembly: AssemblyProduct("BizHawk.Client.Common")] [assembly: AssemblyProduct("BizHawk.Client.Common")]

View File

@ -221,6 +221,13 @@ namespace BizHawk.Client.Common
Bind("TAStudio", "Add Branch", "Alt+Insert"), Bind("TAStudio", "Add Branch", "Alt+Insert"),
Bind("TAStudio", "Delete Branch", "Alt+Delete"), Bind("TAStudio", "Delete Branch", "Alt+Delete"),
Bind("TAStudio", "Toggle Follow Cursor", "Shift+F"),
Bind("TAStudio", "Toggle Auto-Restore", "Shift+R"),
Bind("TAStudio", "Toggle Turbo Seek", "Shift+S"),
Bind("TAStudio", "Clear Frames", "Delete"),
Bind("TAStudio", "Insert Frame", "Insert"),
Bind("TAStudio", "Delete Frames", "Ctrl+Delete"),
Bind("TAStudio", "Clone Frames", "Ctrl+Insert"),
Bind("SNES", "Toggle BG 1"), Bind("SNES", "Toggle BG 1"),
Bind("SNES", "Toggle BG 2"), Bind("SNES", "Toggle BG 2"),

View File

@ -29,7 +29,7 @@ namespace BizHawk.Client.Common
Directory.CreateDirectory(directory_info.FullName); Directory.CreateDirectory(directory_info.FullName);
} }
Write(backupName); Write(backupName, backup: true);
} }
public virtual bool Load(bool preload) public virtual bool Load(bool preload)
@ -168,7 +168,7 @@ namespace BizHawk.Client.Common
return Load(true); return Load(true);
} }
protected virtual void Write(string fn) protected virtual void Write(string fn, bool backup = false)
{ {
var file = new FileInfo(fn); var file = new FileInfo(fn);
if (!file.Directory.Exists) if (!file.Directory.Exists)
@ -207,6 +207,7 @@ namespace BizHawk.Client.Common
} }
} }
if (!backup)
Changes = false; Changes = false;
} }

View File

@ -75,10 +75,9 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
return tas; return tas;
} }
public static Bk2Movie ToBk2(this IMovie old, bool copy = false) public static Bk2Movie ToBk2(this IMovie old, bool copy = false, bool backup = false)
{ {
var newFilename = old.Filename + "." + Bk2Movie.Extension; var bk2 = new Bk2Movie(old.Filename.Replace(old.PreferredExtension, Bk2Movie.Extension));
var bk2 = new Bk2Movie(newFilename);
for (var i = 0; i < old.InputLogLength; i++) for (var i = 0; i < old.InputLogLength; i++)
{ {
@ -115,7 +114,9 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
bk2.BinarySavestate = old.BinarySavestate; bk2.BinarySavestate = old.BinarySavestate;
bk2.SaveRam = old.SaveRam; bk2.SaveRam = old.SaveRam;
if (!backup)
bk2.Save(); bk2.Save();
return bk2; return bk2;
} }

View File

@ -414,24 +414,24 @@ namespace BizHawk.Client.Common
public void Undo(TasMovie movie) public void Undo(TasMovie movie)
{ {
if (FirstFrame == -1) // Action: Place marker if (FirstFrame == -1) // Action: Place marker
movie.Markers.Remove(movie.Markers.Get(LastFrame)); movie.Markers.Remove(movie.Markers.Get(LastFrame), true);
else if (LastFrame == -1) // Action: Remove marker else if (LastFrame == -1) // Action: Remove marker
movie.Markers.Add(FirstFrame, oldMessage); movie.Markers.Add(FirstFrame, oldMessage, true);
else // Action: Move/rename marker else // Action: Move/rename marker
{ {
movie.Markers.Move(LastFrame, FirstFrame); movie.Markers.Move(LastFrame, FirstFrame, true);
movie.Markers.Get(LastFrame).Message = oldMessage; movie.Markers.Get(LastFrame).Message = oldMessage;
} }
} }
public void Redo(TasMovie movie) public void Redo(TasMovie movie)
{ {
if (FirstFrame == -1) // Action: Place marker if (FirstFrame == -1) // Action: Place marker
movie.Markers.Add(LastFrame, oldMessage); movie.Markers.Add(LastFrame, oldMessage, true);
else if (LastFrame == -1) // Action: Remove marker else if (LastFrame == -1) // Action: Remove marker
movie.Markers.Remove(movie.Markers.Get(FirstFrame)); movie.Markers.Remove(movie.Markers.Get(FirstFrame), true);
else // Action: Move/rename marker else // Action: Move/rename marker
{ {
movie.Markers.Move(FirstFrame, LastFrame); movie.Markers.Move(FirstFrame, LastFrame, true);
movie.Markers.Get(LastFrame).Message = newMessage; movie.Markers.Get(LastFrame).Message = newMessage;
} }
} }

View File

@ -17,7 +17,7 @@ namespace BizHawk.Client.Common
public Func<string> ClientSettingsForSave { get; set; } public Func<string> ClientSettingsForSave { get; set; }
public Action<string> GetClientSettingsOnLoad { get; set; } public Action<string> GetClientSettingsOnLoad { get; set; }
protected override void Write(string fn) protected override void Write(string fn, bool backup = false)
{ {
var file = new FileInfo(fn); var file = new FileInfo(fn);
if (!file.Directory.Exists) if (!file.Directory.Exists)
@ -83,6 +83,7 @@ namespace BizHawk.Client.Common
bs.PutLump(BinaryStateLump.Session, tw => tw.WriteLine(Session.ToString())); bs.PutLump(BinaryStateLump.Session, tw => tw.WriteLine(Session.ToString()));
} }
if (!backup)
Changes = false; Changes = false;
} }

View File

@ -177,7 +177,7 @@ namespace BizHawk.Client.Common
} }
} }
// This event is Raised ony when Changes is TOGGLED. // This event is Raised only when Changes is TOGGLED.
private void OnPropertyChanged(string propertyName) private void OnPropertyChanged(string propertyName)
{ {
if (PropertyChanged != null) if (PropertyChanged != null)

View File

@ -109,13 +109,20 @@ namespace BizHawk.Client.Common
return sb.ToString(); return sb.ToString();
} }
// the inherited one
public new void Add(TasMovieMarker item) public new void Add(TasMovieMarker item)
{
Add(item, false);
}
public void Add(TasMovieMarker item, bool fromHistory)
{ {
var existingItem = this.FirstOrDefault(m => m.Frame == item.Frame); var existingItem = this.FirstOrDefault(m => m.Frame == item.Frame);
if (existingItem != null) if (existingItem != null)
{ {
if (existingItem.Message != item.Message) if (existingItem.Message != item.Message)
{ {
if (!fromHistory)
_movie.ChangeLog.AddMarkerChange(item, item.Frame, existingItem.Message); _movie.ChangeLog.AddMarkerChange(item, item.Frame, existingItem.Message);
existingItem.Message = item.Message; existingItem.Message = item.Message;
OnListChanged(NotifyCollectionChangedAction.Replace); OnListChanged(NotifyCollectionChangedAction.Replace);
@ -123,6 +130,7 @@ namespace BizHawk.Client.Common
} }
else else
{ {
if (!fromHistory)
_movie.ChangeLog.AddMarkerChange(item); _movie.ChangeLog.AddMarkerChange(item);
base.Add(item); base.Add(item);
this.Sort((m1, m2) => m1.Frame.CompareTo(m2.Frame)); this.Sort((m1, m2) => m1.Frame.CompareTo(m2.Frame));
@ -130,9 +138,9 @@ namespace BizHawk.Client.Common
} }
} }
public void Add(int frame, string message) public void Add(int frame, string message, bool fromHistory = false)
{ {
Add(new TasMovieMarker(frame, message)); Add(new TasMovieMarker(frame, message), fromHistory);
} }
public new void AddRange(IEnumerable<TasMovieMarker> collection) public new void AddRange(IEnumerable<TasMovieMarker> collection)
@ -146,8 +154,15 @@ namespace BizHawk.Client.Common
_movie.ChangeLog.EndBatch(); _movie.ChangeLog.EndBatch();
} }
// the inherited one
public new void Insert(int index, TasMovieMarker item) public new void Insert(int index, TasMovieMarker item)
{ {
Insert(index, item, false);
}
public void Insert(int index, TasMovieMarker item, bool fromHistory)
{
if (!fromHistory)
_movie.ChangeLog.AddMarkerChange(item); _movie.ChangeLog.AddMarkerChange(item);
base.Insert(index, item); base.Insert(index, item);
this.Sort((m1, m2) => m1.Frame.CompareTo(m2.Frame)); this.Sort((m1, m2) => m1.Frame.CompareTo(m2.Frame));
@ -167,10 +182,17 @@ namespace BizHawk.Client.Common
OnListChanged(NotifyCollectionChangedAction.Add); OnListChanged(NotifyCollectionChangedAction.Add);
} }
// the inherited one
public new void Remove(TasMovieMarker item) public new void Remove(TasMovieMarker item)
{
Remove(item, false);
}
public void Remove(TasMovieMarker item, bool fromHistory)
{ {
if (item == null || item.Frame == 0) // TODO: Don't do this. if (item == null || item.Frame == 0) // TODO: Don't do this.
return; return;
if (!fromHistory)
_movie.ChangeLog.AddMarkerChange(null, item.Frame, item.Message); _movie.ChangeLog.AddMarkerChange(null, item.Frame, item.Message);
base.Remove(item); base.Remove(item);
OnListChanged(NotifyCollectionChangedAction.Remove); OnListChanged(NotifyCollectionChangedAction.Remove);
@ -195,14 +217,14 @@ namespace BizHawk.Client.Common
return removeCount; return removeCount;
} }
public void Move(int fromFrame, int toFrame) public void Move(int fromFrame, int toFrame, bool fromHistory = false)
{ {
TasMovieMarker m = Get(fromFrame); TasMovieMarker m = Get(fromFrame);
if (m == null) // TODO: Don't do this. if (m == null) // TODO: Don't do this.
return; return;
_movie.ChangeLog.AddMarkerChange(m, m.Frame); _movie.ChangeLog.AddMarkerChange(m, m.Frame);
Insert(0, new TasMovieMarker(toFrame, m.Message)); Insert(0, new TasMovieMarker(toFrame, m.Message), fromHistory);
Remove(m); Remove(m, fromHistory);
} }
/// <summary> /// <summary>

View File

@ -3,7 +3,6 @@ using System.ComponentModel;
using System.Text; using System.Text;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace BizHawk.Client.Common namespace BizHawk.Client.Common
{ {
public class TasStateManagerSettings public class TasStateManagerSettings
@ -104,9 +103,9 @@ namespace BizHawk.Client.Common
sb.AppendLine(DiskSaveCapacitymb.ToString()); sb.AppendLine(DiskSaveCapacitymb.ToString());
sb.AppendLine(Capacitymb.ToString()); sb.AppendLine(Capacitymb.ToString());
sb.AppendLine(DiskCapacitymb.ToString()); sb.AppendLine(DiskCapacitymb.ToString());
sb.AppendLine(StateGap.ToString());
sb.AppendLine(BranchStatesInTasproj.ToString()); sb.AppendLine(BranchStatesInTasproj.ToString());
sb.AppendLine(EraseBranchStatesFirst.ToString()); sb.AppendLine(EraseBranchStatesFirst.ToString());
sb.AppendLine(StateGap.ToString());
return sb.ToString(); return sb.ToString();
} }
@ -114,6 +113,8 @@ namespace BizHawk.Client.Common
public void PopulateFromString(string settings) public void PopulateFromString(string settings)
{ {
if (!string.IsNullOrWhiteSpace(settings)) if (!string.IsNullOrWhiteSpace(settings))
{
try
{ {
string[] lines = settings.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); string[] lines = settings.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
Capacitymb = int.Parse(lines[1]); Capacitymb = int.Parse(lines[1]);
@ -135,19 +136,26 @@ namespace BizHawk.Client.Common
DiskCapacitymb = 512; DiskCapacitymb = 512;
if (lines.Length > 3) if (lines.Length > 3)
StateGap = int.Parse(lines[3]); BranchStatesInTasproj = bool.Parse(lines[3]);
else
StateGap = 4;
if (lines.Length > 4)
BranchStatesInTasproj = bool.Parse(lines[4]);
else else
BranchStatesInTasproj = false; BranchStatesInTasproj = false;
if (lines.Length > 5) if (lines.Length > 4)
EraseBranchStatesFirst = bool.Parse(lines[5]); EraseBranchStatesFirst = bool.Parse(lines[4]);
else else
EraseBranchStatesFirst = true; EraseBranchStatesFirst = true;
if (lines.Length > 5)
StateGap = int.Parse(lines[5]);
else
StateGap = 4;
}
catch (Exception)
{
// "GreenZoneSettings inconsistent, ignoring"
// if we don't catch it, the project won't load
// but dialog boxes aren't supposed to exist here?
}
} }
} }
} }

View File

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("BizHawk.Client.DiscoHawk")] [assembly: AssemblyTitle("BizHawk.Client.DiscoHawk")]
[assembly: AssemblyDescription("http://code.google.com/p/bizhawk")] [assembly: AssemblyDescription("http://tasvideos.org/Bizhawk.html")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("BizHawk")] [assembly: AssemblyCompany("BizHawk")]
[assembly: AssemblyProduct("BizHawk.Client.DiscoHawk")] [assembly: AssemblyProduct("BizHawk.Client.DiscoHawk")]

View File

@ -166,7 +166,7 @@
this.linkLabel3.Size = new System.Drawing.Size(63, 13); this.linkLabel3.Size = new System.Drawing.Size(63, 13);
this.linkLabel3.TabIndex = 20; this.linkLabel3.TabIndex = 20;
this.linkLabel3.TabStop = true; this.linkLabel3.TabStop = true;
this.linkLabel3.Text = "Contributers"; this.linkLabel3.Text = "Contributors";
this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked); this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked);
// //
// DateLabel // DateLabel

View File

@ -57,7 +57,6 @@ namespace BizHawk.Client.EmuHawk
{ {
Dock = DockStyle.Top Dock = DockStyle.Top
}); });
} }
linkLabel2.Text = "Commit # " + SubWCRev.GIT_SHORTHASH; linkLabel2.Text = "Commit # " + SubWCRev.GIT_SHORTHASH;
@ -75,7 +74,7 @@ namespace BizHawk.Client.EmuHawk
private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{ {
System.Diagnostics.Process.Start("https://github.com/TASVideos/BizHawk/commit/" + SubWCRev.GIT_SHORTHASH); System.Diagnostics.Process.Start("https://github.com/TASVideos/BizHawk/graphs/contributors");
} }
} }
} }

View File

@ -14,6 +14,10 @@ namespace BizHawk.Client.EmuHawk
// General // General
case "Pause": case "Pause":
// check this here since TogglePause() has no idea who triggered it
// and we need to treat pause hotkey specially in tastudio
if (GlobalWin.MainForm.EmulatorPaused)
GlobalWin.Tools.TAStudio.IgnoreSeekFrame = true;
TogglePause(); TogglePause();
break; break;
case "Toggle Throttle": case "Toggle Throttle":
@ -349,6 +353,27 @@ namespace BizHawk.Client.EmuHawk
case "Delete Branch": case "Delete Branch":
GlobalWin.Tools.TAStudio.RemoveBranchExtrenal(); GlobalWin.Tools.TAStudio.RemoveBranchExtrenal();
break; break;
case "Toggle Follow Cursor":
GlobalWin.Tools.TAStudio.TasPlaybackBox.FollowCursor ^= true;
break;
case "Toggle Auto-Restore":
GlobalWin.Tools.TAStudio.TasPlaybackBox.AutoRestore ^= true;
break;
case "Toggle Turbo Seek":
GlobalWin.Tools.TAStudio.TasPlaybackBox.TurboSeek ^= true;
break;
case "Clear Frames":
GlobalWin.Tools.TAStudio.ClearFramesExternal();
break;
case "Insert Frame":
GlobalWin.Tools.TAStudio.InsertFrameExternal();
break;
case "Delete Frames":
GlobalWin.Tools.TAStudio.DeleteFramesExternal();
break;
case "Clone Frames":
GlobalWin.Tools.TAStudio.CloneFramesExternal();
break;
// SNES // SNES
case "Toggle BG 1": case "Toggle BG 1":

View File

@ -34,6 +34,7 @@ using BizHawk.Emulation.Cores.Nintendo.N64;
using BizHawk.Client.EmuHawk.WinFormExtensions; using BizHawk.Client.EmuHawk.WinFormExtensions;
using BizHawk.Client.EmuHawk.ToolExtensions; using BizHawk.Client.EmuHawk.ToolExtensions;
using BizHawk.Client.EmuHawk.CoreExtensions; using BizHawk.Client.EmuHawk.CoreExtensions;
using BizHawk.Client.ApiHawk;
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk
{ {
@ -3700,6 +3701,8 @@ namespace BizHawk.Client.EmuHawk
if (SavestateManager.LoadStateFile(path, userFriendlyStateName)) if (SavestateManager.LoadStateFile(path, userFriendlyStateName))
{ {
ClientApi.OnStateLoaded(this, userFriendlyStateName);
if (GlobalWin.Tools.Has<LuaConsole>()) if (GlobalWin.Tools.Has<LuaConsole>())
{ {
GlobalWin.Tools.LuaConsole.LuaImp.CallLoadStateEvent(userFriendlyStateName); GlobalWin.Tools.LuaConsole.LuaImp.CallLoadStateEvent(userFriendlyStateName);
@ -3732,6 +3735,13 @@ namespace BizHawk.Client.EmuHawk
return; return;
} }
bool handled;
ClientApi.OnBeforeQuickLoad(this, quickSlotName, out handled);
if (handled)
{
return;
}
if (IsSlave && master.WantsToControlSavestates) if (IsSlave && master.WantsToControlSavestates)
{ {
master.LoadQuickSave(SlotToInt(quickSlotName)); master.LoadQuickSave(SlotToInt(quickSlotName));
@ -3766,6 +3776,8 @@ namespace BizHawk.Client.EmuHawk
{ {
SavestateManager.SaveStateFile(path, userFriendlyStateName); SavestateManager.SaveStateFile(path, userFriendlyStateName);
ClientApi.OnStateSaved(this, userFriendlyStateName);
GlobalWin.OSD.AddMessage("Saved state: " + userFriendlyStateName); GlobalWin.OSD.AddMessage("Saved state: " + userFriendlyStateName);
} }
catch (IOException) catch (IOException)
@ -3786,6 +3798,13 @@ namespace BizHawk.Client.EmuHawk
return; return;
} }
bool handled;
ClientApi.OnBeforeQuickSave(this, quickSlotName, out handled);
if(handled)
{
return;
}
if (IsSlave && master.WantsToControlSavestates) if (IsSlave && master.WantsToControlSavestates)
{ {
master.SaveQuickSave(SlotToInt(quickSlotName)); master.SaveQuickSave(SlotToInt(quickSlotName));
@ -4009,16 +4028,37 @@ namespace BizHawk.Client.EmuHawk
private bool Rewind(ref bool runFrame, long currentTimestamp) private bool Rewind(ref bool runFrame, long currentTimestamp)
{ {
var isRewinding = false;
if (IsSlave && master.WantsToControlRewind) if (IsSlave && master.WantsToControlRewind)
{ {
if (Global.ClientControls["Rewind"] || PressRewind) if (Global.ClientControls["Rewind"] || PressRewind)
{ {
runFrame = true; // TODO: the master should be deciding this! if (_frameRewindTimestamp == 0)
return master.Rewind(); {
isRewinding = true;
_frameRewindTimestamp = currentTimestamp;
} }
else
{
double timestampDeltaMs = (double)(currentTimestamp - _frameRewindTimestamp) / Stopwatch.Frequency * 1000.0;
isRewinding = timestampDeltaMs >= Global.Config.FrameProgressDelayMs;
}
if (isRewinding)
{
runFrame = true; // TODO: the master should be deciding this!
master.Rewind();
}
}
else
{
_frameRewindTimestamp = 0;
}
return isRewinding;
} }
var isRewinding = false;
if (Global.Rewinder.RewindActive && (Global.ClientControls["Rewind"] || PressRewind) if (Global.Rewinder.RewindActive && (Global.ClientControls["Rewind"] || PressRewind)
&& !Global.MovieSession.Movie.IsRecording) // Rewind isn't "bulletproof" and can desync a recording movie! && !Global.MovieSession.Movie.IsRecording) // Rewind isn't "bulletproof" and can desync a recording movie!
{ {

View File

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("BizHawk.Client.EmuHawk")] [assembly: AssemblyTitle("BizHawk.Client.EmuHawk")]
[assembly: AssemblyDescription("http://code.google.com/p/bizhawk")] [assembly: AssemblyDescription("http://tasvideos.org/Bizhawk.html")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("BizHawk")] [assembly: AssemblyCompany("BizHawk")]
[assembly: AssemblyProduct("BizHawk.Client.EmuHawk")] [assembly: AssemblyProduct("BizHawk.Client.EmuHawk")]

View File

@ -45,6 +45,7 @@
// //
// PromptBox // PromptBox
// //
this.PromptBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.PromptBox.Location = new System.Drawing.Point(36, 25); this.PromptBox.Location = new System.Drawing.Point(36, 25);
this.PromptBox.Name = "PromptBox"; this.PromptBox.Name = "PromptBox";
this.PromptBox.Size = new System.Drawing.Size(164, 20); this.PromptBox.Size = new System.Drawing.Size(164, 20);
@ -53,6 +54,7 @@
// //
// OK // OK
// //
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.OK.Location = new System.Drawing.Point(36, 67); this.OK.Location = new System.Drawing.Point(36, 67);
this.OK.Name = "OK"; this.OK.Name = "OK";
this.OK.Size = new System.Drawing.Size(75, 23); this.OK.Size = new System.Drawing.Size(75, 23);
@ -63,6 +65,7 @@
// //
// Cancel // Cancel
// //
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Cancel.Location = new System.Drawing.Point(125, 67); this.Cancel.Location = new System.Drawing.Point(125, 67);
this.Cancel.Name = "Cancel"; this.Cancel.Name = "Cancel";
@ -77,6 +80,7 @@
this.AcceptButton = this.OK; this.AcceptButton = this.OK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.CancelButton = this.Cancel; this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(235, 106); this.ClientSize = new System.Drawing.Size(235, 106);
this.Controls.Add(this.Cancel); this.Controls.Add(this.Cancel);
@ -86,7 +90,7 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(241, 133); this.MinimumSize = new System.Drawing.Size(241, 138);
this.Name = "InputPrompt"; this.Name = "InputPrompt";
this.ShowIcon = false; this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;

View File

@ -1,13 +1,15 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using System.Linq;
using BizHawk.Common.StringExtensions; using BizHawk.Common.StringExtensions;
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk
{ {
/// <summary> /// <summary>
/// A simple form that prompts the user for a single line of input /// A simple form that prompts the user for a single line of input.
/// Supports multiline messages
/// </summary> /// </summary>
public partial class InputPrompt : Form public partial class InputPrompt : Form
{ {
@ -24,8 +26,15 @@ namespace BizHawk.Client.EmuHawk
public string Message public string Message
{ {
get { return PromptLabel.Text; } get
set { PromptLabel.Text = value ?? string.Empty; } {
return PromptLabel.Text;
}
set
{
PromptLabel.Text = value ?? string.Empty;
Height += PromptLabel.Font.Height * Message.Count(x => x == '\n');
}
} }
public string InitialValue public string InitialValue

View File

@ -17,7 +17,7 @@ namespace BizHawk.Client.EmuHawk
public TAStudio Tastudio { get; set; } public TAStudio Tastudio { get; set; }
[Browsable(false)] [Browsable(true)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)] [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
public bool TurboSeek public bool TurboSeek
{ {
@ -28,11 +28,11 @@ namespace BizHawk.Client.EmuHawk
set set
{ {
TurboSeekCheckbox.Checked = Global.Config.TurboSeek = value; TurboSeekCheckbox.Checked = value;
} }
} }
[Browsable(false)] [Browsable(true)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)] [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
public bool AutoRestore public bool AutoRestore
{ {
@ -43,11 +43,11 @@ namespace BizHawk.Client.EmuHawk
set set
{ {
AutoRestoreCheckbox.Checked = Tastudio.Settings.AutoRestoreLastPosition = value; AutoRestoreCheckbox.Checked = value;
} }
} }
[Browsable(false)] [Browsable(true)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)] [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
public bool FollowCursor public bool FollowCursor
{ {
@ -97,6 +97,8 @@ namespace BizHawk.Client.EmuHawk
private void PauseButton_Click(object sender, EventArgs e) private void PauseButton_Click(object sender, EventArgs e)
{ {
if (GlobalWin.MainForm.EmulatorPaused)
Tastudio.IgnoreSeekFrame = true;
Tastudio.TogglePause(); Tastudio.TogglePause();
} }

View File

@ -41,6 +41,8 @@ namespace BizHawk.Client.EmuHawk
this.OpenTASMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.OpenTASMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveTASMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SaveTASMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveAsTASMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SaveAsTASMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveBackupMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveBk2BackupMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.RecentSubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.RecentSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
@ -69,10 +71,10 @@ namespace BizHawk.Client.EmuHawk
this.PasteInsertMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.PasteInsertMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.CutMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.CutMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.ClearMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ClearFramesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.InsertFrameMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.InsertFrameMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.DeleteFramesMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.DeleteFramesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.CloneMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.CloneFramesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.InsertNumFramesMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.InsertNumFramesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.TruncateMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.TruncateMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -83,11 +85,15 @@ namespace BizHawk.Client.EmuHawk
this.SetMaxUndoLevelsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SetMaxUndoLevelsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SetBranchCellHoverIntervalMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SetBranchCellHoverIntervalMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SetSeekingCutoffIntervalMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SetSeekingCutoffIntervalMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.setAutosaveIntervalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator26 = new System.Windows.Forms.ToolStripSeparator();
this.autosaveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SetAutosaveIntervalMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AutosaveAsBk2MenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.AutosaveAsBk2MenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AutosaveAsBackupFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BackupPerFileSaveMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.AutoRestoreOnMouseUpOnlyMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AutoadjustInputMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.AutoadjustInputMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.DrawInputByDraggingMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.DrawInputByDraggingMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.applyPatternToPaintedInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.applyPatternToPaintedInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.onlyOnAutoFireColumnsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.onlyOnAutoFireColumnsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -143,9 +149,11 @@ namespace BizHawk.Client.EmuHawk
this.ColumnsSubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ColumnsSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator19 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator19 = new System.Windows.Forms.ToolStripSeparator();
this.HelpSubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.HelpSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.EnableTooltipsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.TASEditorManualOnlineMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); this.ForumThreadMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
this.EnableTooltipsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.TasView = new BizHawk.Client.EmuHawk.InputRoll(); this.TasView = new BizHawk.Client.EmuHawk.InputRoll();
this.TasStatusStrip = new StatusStripEx(); this.TasStatusStrip = new StatusStripEx();
this.MessageStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.MessageStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
@ -226,6 +234,8 @@ namespace BizHawk.Client.EmuHawk
this.OpenTASMenuItem, this.OpenTASMenuItem,
this.SaveTASMenuItem, this.SaveTASMenuItem,
this.SaveAsTASMenuItem, this.SaveAsTASMenuItem,
this.SaveBackupMenuItem,
this.SaveBk2BackupMenuItem,
this.RecentSubMenu, this.RecentSubMenu,
this.toolStripSeparator1, this.toolStripSeparator1,
this.saveSelectionToMacroToolStripMenuItem, this.saveSelectionToMacroToolStripMenuItem,
@ -297,6 +307,21 @@ namespace BizHawk.Client.EmuHawk
this.SaveAsTASMenuItem.Text = "Save As"; this.SaveAsTASMenuItem.Text = "Save As";
this.SaveAsTASMenuItem.Click += new System.EventHandler(this.SaveAsTasMenuItem_Click); this.SaveAsTASMenuItem.Click += new System.EventHandler(this.SaveAsTasMenuItem_Click);
// //
// SaveBackupMenuItem
//
this.SaveBackupMenuItem.Name = "SaveBackupMenuItem";
this.SaveBackupMenuItem.Size = new System.Drawing.Size(201, 22);
this.SaveBackupMenuItem.Text = "Save Backup";
this.SaveBackupMenuItem.Click += new System.EventHandler(this.SaveBackupMenuItem_Click);
//
// SaveBk2BackupMenuItem
//
this.SaveBk2BackupMenuItem.Name = "SaveBk2BackupMenuItem";
this.SaveBk2BackupMenuItem.Size = new System.Drawing.Size(201, 22);
this.SaveBk2BackupMenuItem.Text = "Save Bk2 Backup";
this.SaveBk2BackupMenuItem.Visible = false;
this.SaveBk2BackupMenuItem.Click += new System.EventHandler(this.SaveBk2BackupMenuItem_Click);
//
// RecentSubMenu // RecentSubMenu
// //
this.RecentSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.RecentSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -390,10 +415,10 @@ namespace BizHawk.Client.EmuHawk
this.PasteInsertMenuItem, this.PasteInsertMenuItem,
this.CutMenuItem, this.CutMenuItem,
this.toolStripSeparator8, this.toolStripSeparator8,
this.ClearMenuItem, this.ClearFramesMenuItem,
this.InsertFrameMenuItem, this.InsertFrameMenuItem,
this.DeleteFramesMenuItem, this.DeleteFramesMenuItem,
this.CloneMenuItem, this.CloneFramesMenuItem,
this.InsertNumFramesMenuItem, this.InsertNumFramesMenuItem,
this.toolStripSeparator6, this.toolStripSeparator6,
this.TruncateMenuItem, this.TruncateMenuItem,
@ -526,19 +551,17 @@ namespace BizHawk.Client.EmuHawk
this.toolStripSeparator8.Name = "toolStripSeparator8"; this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(288, 6); this.toolStripSeparator8.Size = new System.Drawing.Size(288, 6);
// //
// ClearMenuItem // ClearFramesMenuItem
// //
this.ClearMenuItem.Name = "ClearMenuItem"; this.ClearFramesMenuItem.Name = "ClearFramesMenuItem";
this.ClearMenuItem.ShortcutKeyDisplayString = ""; this.ClearFramesMenuItem.ShortcutKeyDisplayString = "";
this.ClearMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Delete; this.ClearFramesMenuItem.Size = new System.Drawing.Size(291, 22);
this.ClearMenuItem.Size = new System.Drawing.Size(291, 22); this.ClearFramesMenuItem.Text = "Clear";
this.ClearMenuItem.Text = "Clear"; this.ClearFramesMenuItem.Click += new System.EventHandler(this.ClearFramesMenuItem_Click);
this.ClearMenuItem.Click += new System.EventHandler(this.ClearMenuItem_Click);
// //
// InsertFrameMenuItem // InsertFrameMenuItem
// //
this.InsertFrameMenuItem.Name = "InsertFrameMenuItem"; this.InsertFrameMenuItem.Name = "InsertFrameMenuItem";
this.InsertFrameMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Insert;
this.InsertFrameMenuItem.Size = new System.Drawing.Size(291, 22); this.InsertFrameMenuItem.Size = new System.Drawing.Size(291, 22);
this.InsertFrameMenuItem.Text = "&Insert"; this.InsertFrameMenuItem.Text = "&Insert";
this.InsertFrameMenuItem.Click += new System.EventHandler(this.InsertFrameMenuItem_Click); this.InsertFrameMenuItem.Click += new System.EventHandler(this.InsertFrameMenuItem_Click);
@ -546,18 +569,16 @@ namespace BizHawk.Client.EmuHawk
// DeleteFramesMenuItem // DeleteFramesMenuItem
// //
this.DeleteFramesMenuItem.Name = "DeleteFramesMenuItem"; this.DeleteFramesMenuItem.Name = "DeleteFramesMenuItem";
this.DeleteFramesMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete)));
this.DeleteFramesMenuItem.Size = new System.Drawing.Size(291, 22); this.DeleteFramesMenuItem.Size = new System.Drawing.Size(291, 22);
this.DeleteFramesMenuItem.Text = "&Delete"; this.DeleteFramesMenuItem.Text = "&Delete";
this.DeleteFramesMenuItem.Click += new System.EventHandler(this.DeleteFramesMenuItem_Click); this.DeleteFramesMenuItem.Click += new System.EventHandler(this.DeleteFramesMenuItem_Click);
// //
// CloneMenuItem // CloneFramesMenuItem
// //
this.CloneMenuItem.Name = "CloneMenuItem"; this.CloneFramesMenuItem.Name = "CloneFramesMenuItem";
this.CloneMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Insert))); this.CloneFramesMenuItem.Size = new System.Drawing.Size(291, 22);
this.CloneMenuItem.Size = new System.Drawing.Size(291, 22); this.CloneFramesMenuItem.Text = "&Clone";
this.CloneMenuItem.Text = "&Clone"; this.CloneFramesMenuItem.Click += new System.EventHandler(this.CloneFramesMenuItem_Click);
this.CloneMenuItem.Click += new System.EventHandler(this.CloneMenuItem_Click);
// //
// InsertNumFramesMenuItem // InsertNumFramesMenuItem
// //
@ -608,11 +629,12 @@ namespace BizHawk.Client.EmuHawk
this.SetMaxUndoLevelsMenuItem, this.SetMaxUndoLevelsMenuItem,
this.SetBranchCellHoverIntervalMenuItem, this.SetBranchCellHoverIntervalMenuItem,
this.SetSeekingCutoffIntervalMenuItem, this.SetSeekingCutoffIntervalMenuItem,
this.setAutosaveIntervalToolStripMenuItem, this.toolStripSeparator26,
this.AutosaveAsBk2MenuItem, this.autosaveToolStripMenuItem,
this.BackupPerFileSaveMenuItem,
this.toolStripSeparator9, this.toolStripSeparator9,
this.AutoRestoreOnMouseUpOnlyMenuItem,
this.AutoadjustInputMenuItem, this.AutoadjustInputMenuItem,
this.toolStripSeparator11,
this.DrawInputByDraggingMenuItem, this.DrawInputByDraggingMenuItem,
this.applyPatternToPaintedInputToolStripMenuItem, this.applyPatternToPaintedInputToolStripMenuItem,
this.onlyOnAutoFireColumnsToolStripMenuItem, this.onlyOnAutoFireColumnsToolStripMenuItem,
@ -654,25 +676,61 @@ namespace BizHawk.Client.EmuHawk
this.SetSeekingCutoffIntervalMenuItem.Visible = false; this.SetSeekingCutoffIntervalMenuItem.Visible = false;
this.SetSeekingCutoffIntervalMenuItem.Click += new System.EventHandler(this.SetSeekingCutoffIntervalMenuItem_Click); this.SetSeekingCutoffIntervalMenuItem.Click += new System.EventHandler(this.SetSeekingCutoffIntervalMenuItem_Click);
// //
// setAutosaveIntervalToolStripMenuItem // toolStripSeparator26
// //
this.setAutosaveIntervalToolStripMenuItem.Name = "setAutosaveIntervalToolStripMenuItem"; this.toolStripSeparator26.Name = "toolStripSeparator26";
this.setAutosaveIntervalToolStripMenuItem.Size = new System.Drawing.Size(253, 22); this.toolStripSeparator26.Size = new System.Drawing.Size(250, 6);
this.setAutosaveIntervalToolStripMenuItem.Text = "Set Autosave Interval"; //
this.setAutosaveIntervalToolStripMenuItem.Click += new System.EventHandler(this.SetAutosaveIntervalMenuItem_Click); // autosaveToolStripMenuItem
//
this.autosaveToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.SetAutosaveIntervalMenuItem,
this.AutosaveAsBk2MenuItem,
this.AutosaveAsBackupFileMenuItem});
this.autosaveToolStripMenuItem.Name = "autosaveToolStripMenuItem";
this.autosaveToolStripMenuItem.Size = new System.Drawing.Size(253, 22);
this.autosaveToolStripMenuItem.Text = "Autosave";
//
// SetAutosaveIntervalMenuItem
//
this.SetAutosaveIntervalMenuItem.Name = "SetAutosaveIntervalMenuItem";
this.SetAutosaveIntervalMenuItem.Size = new System.Drawing.Size(202, 22);
this.SetAutosaveIntervalMenuItem.Text = "Set Autosave Interval";
this.SetAutosaveIntervalMenuItem.Click += new System.EventHandler(this.SetAutosaveIntervalMenuItem_Click);
// //
// AutosaveAsBk2MenuItem // AutosaveAsBk2MenuItem
// //
this.AutosaveAsBk2MenuItem.Name = "AutosaveAsBk2MenuItem"; this.AutosaveAsBk2MenuItem.Name = "AutosaveAsBk2MenuItem";
this.AutosaveAsBk2MenuItem.Size = new System.Drawing.Size(253, 22); this.AutosaveAsBk2MenuItem.Size = new System.Drawing.Size(202, 22);
this.AutosaveAsBk2MenuItem.Text = "Autosave As Bk2"; this.AutosaveAsBk2MenuItem.Text = "Autosave As Bk2";
this.AutosaveAsBk2MenuItem.Click += new System.EventHandler(this.AutosaveAsBk2MenuItem_Click); this.AutosaveAsBk2MenuItem.Click += new System.EventHandler(this.AutosaveAsBk2MenuItem_Click);
// //
// AutosaveAsBackupFileMenuItem
//
this.AutosaveAsBackupFileMenuItem.Name = "AutosaveAsBackupFileMenuItem";
this.AutosaveAsBackupFileMenuItem.Size = new System.Drawing.Size(202, 22);
this.AutosaveAsBackupFileMenuItem.Text = "Autosave As Backup File";
this.AutosaveAsBackupFileMenuItem.Click += new System.EventHandler(this.AutosaveAsBackupFileMenuItem_Click);
//
// BackupPerFileSaveMenuItem
//
this.BackupPerFileSaveMenuItem.Name = "BackupPerFileSaveMenuItem";
this.BackupPerFileSaveMenuItem.Size = new System.Drawing.Size(253, 22);
this.BackupPerFileSaveMenuItem.Text = "Backup Per File Save";
this.BackupPerFileSaveMenuItem.Click += new System.EventHandler(this.BackupPerFileSaveMenuItem_Click);
//
// toolStripSeparator9 // toolStripSeparator9
// //
this.toolStripSeparator9.Name = "toolStripSeparator9"; this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(250, 6); this.toolStripSeparator9.Size = new System.Drawing.Size(250, 6);
// //
// AutoRestoreOnMouseUpOnlyMenuItem
//
this.AutoRestoreOnMouseUpOnlyMenuItem.Name = "AutoRestoreOnMouseUpOnlyMenuItem";
this.AutoRestoreOnMouseUpOnlyMenuItem.Size = new System.Drawing.Size(253, 22);
this.AutoRestoreOnMouseUpOnlyMenuItem.Text = "Auto-restore on Mouse Up only";
this.AutoRestoreOnMouseUpOnlyMenuItem.Click += new System.EventHandler(this.AutoRestoreOnMouseUpOnlyMenuItem_Click);
//
// AutoadjustInputMenuItem // AutoadjustInputMenuItem
// //
this.AutoadjustInputMenuItem.CheckOnClick = true; this.AutoadjustInputMenuItem.CheckOnClick = true;
@ -680,11 +738,6 @@ namespace BizHawk.Client.EmuHawk
this.AutoadjustInputMenuItem.Size = new System.Drawing.Size(253, 22); this.AutoadjustInputMenuItem.Size = new System.Drawing.Size(253, 22);
this.AutoadjustInputMenuItem.Text = "Auto-adjust Input according to Lag"; this.AutoadjustInputMenuItem.Text = "Auto-adjust Input according to Lag";
// //
// toolStripSeparator11
//
this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(250, 6);
//
// DrawInputByDraggingMenuItem // DrawInputByDraggingMenuItem
// //
this.DrawInputByDraggingMenuItem.Name = "DrawInputByDraggingMenuItem"; this.DrawInputByDraggingMenuItem.Name = "DrawInputByDraggingMenuItem";
@ -1116,32 +1169,50 @@ namespace BizHawk.Client.EmuHawk
// HelpSubMenu // HelpSubMenu
// //
this.HelpSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.HelpSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.EnableTooltipsMenuItem, this.TASEditorManualOnlineMenuItem,
this.ForumThreadMenuItem,
this.aboutToolStripMenuItem,
this.toolStripSeparator10, this.toolStripSeparator10,
this.aboutToolStripMenuItem}); this.EnableTooltipsMenuItem});
this.HelpSubMenu.Name = "HelpSubMenu"; this.HelpSubMenu.Name = "HelpSubMenu";
this.HelpSubMenu.Size = new System.Drawing.Size(40, 20); this.HelpSubMenu.Size = new System.Drawing.Size(40, 20);
this.HelpSubMenu.Text = "&Help"; this.HelpSubMenu.Text = "&Help";
// //
// EnableTooltipsMenuItem // TASEditorManualOnlineMenuItem
// //
this.EnableTooltipsMenuItem.Enabled = false; this.TASEditorManualOnlineMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Help;
this.EnableTooltipsMenuItem.Name = "EnableTooltipsMenuItem"; this.TASEditorManualOnlineMenuItem.Name = "TASEditorManualOnlineMenuItem";
this.EnableTooltipsMenuItem.Size = new System.Drawing.Size(157, 22); this.TASEditorManualOnlineMenuItem.Size = new System.Drawing.Size(217, 22);
this.EnableTooltipsMenuItem.Text = "&Enable Tooltips"; this.TASEditorManualOnlineMenuItem.Text = "TAS Editor Manual Online...";
this.TASEditorManualOnlineMenuItem.Click += new System.EventHandler(this.TASEditorManualOnlineMenuItem_Click);
// //
// toolStripSeparator10 // ForumThreadMenuItem
// //
this.toolStripSeparator10.Name = "toolStripSeparator10"; this.ForumThreadMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.TAStudio;
this.toolStripSeparator10.Size = new System.Drawing.Size(154, 6); this.ForumThreadMenuItem.Name = "ForumThreadMenuItem";
this.ForumThreadMenuItem.Size = new System.Drawing.Size(217, 22);
this.ForumThreadMenuItem.Text = "Forum Thread...";
this.ForumThreadMenuItem.Click += new System.EventHandler(this.ForumThreadMenuItem_Click);
// //
// aboutToolStripMenuItem // aboutToolStripMenuItem
// //
this.aboutToolStripMenuItem.Enabled = false; this.aboutToolStripMenuItem.Enabled = false;
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(157, 22); this.aboutToolStripMenuItem.Size = new System.Drawing.Size(217, 22);
this.aboutToolStripMenuItem.Text = "&About"; this.aboutToolStripMenuItem.Text = "&About";
// //
// toolStripSeparator10
//
this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(214, 6);
//
// EnableTooltipsMenuItem
//
this.EnableTooltipsMenuItem.Enabled = false;
this.EnableTooltipsMenuItem.Name = "EnableTooltipsMenuItem";
this.EnableTooltipsMenuItem.Size = new System.Drawing.Size(217, 22);
this.EnableTooltipsMenuItem.Text = "&Enable Tooltips";
//
// TasView // TasView
// //
this.TasView.AllowColumnReorder = false; this.TasView.AllowColumnReorder = false;
@ -1170,6 +1241,7 @@ namespace BizHawk.Client.EmuHawk
this.TasView.ScrollSpeed = 1; this.TasView.ScrollSpeed = 1;
this.TasView.SeekingCutoffInterval = 0; this.TasView.SeekingCutoffInterval = 0;
this.TasView.Size = new System.Drawing.Size(289, 528); this.TasView.Size = new System.Drawing.Size(289, 528);
this.TasView.suspendHotkeys = false;
this.TasView.TabIndex = 1; this.TasView.TabIndex = 1;
this.TasView.ColumnClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.TasView_ColumnClick); this.TasView.ColumnClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.TasView_ColumnClick);
this.TasView.ColumnRightClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.TasView_ColumnRightClick); this.TasView.ColumnRightClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.TasView_ColumnRightClick);
@ -1274,39 +1346,39 @@ namespace BizHawk.Client.EmuHawk
this.StartNewProjectFromNowMenuItem, this.StartNewProjectFromNowMenuItem,
this.StartANewProjectFromSaveRamMenuItem}); this.StartANewProjectFromSaveRamMenuItem});
this.RightClickMenu.Name = "RightClickMenu"; this.RightClickMenu.Name = "RightClickMenu";
this.RightClickMenu.Size = new System.Drawing.Size(243, 480); this.RightClickMenu.Size = new System.Drawing.Size(254, 480);
this.RightClickMenu.Opened += new System.EventHandler(this.RightClickMenu_Opened); this.RightClickMenu.Opened += new System.EventHandler(this.RightClickMenu_Opened);
// //
// SetMarkersContextMenuItem // SetMarkersContextMenuItem
// //
this.SetMarkersContextMenuItem.Name = "SetMarkersContextMenuItem"; this.SetMarkersContextMenuItem.Name = "SetMarkersContextMenuItem";
this.SetMarkersContextMenuItem.Size = new System.Drawing.Size(242, 22); this.SetMarkersContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.SetMarkersContextMenuItem.Text = "Set Markers"; this.SetMarkersContextMenuItem.Text = "Set Markers";
this.SetMarkersContextMenuItem.Click += new System.EventHandler(this.SetMarkersMenuItem_Click); this.SetMarkersContextMenuItem.Click += new System.EventHandler(this.SetMarkersMenuItem_Click);
// //
// SetMarkerWithTextContextMenuItem // SetMarkerWithTextContextMenuItem
// //
this.SetMarkerWithTextContextMenuItem.Name = "SetMarkerWithTextContextMenuItem"; this.SetMarkerWithTextContextMenuItem.Name = "SetMarkerWithTextContextMenuItem";
this.SetMarkerWithTextContextMenuItem.Size = new System.Drawing.Size(242, 22); this.SetMarkerWithTextContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.SetMarkerWithTextContextMenuItem.Text = "Set Marker with Text"; this.SetMarkerWithTextContextMenuItem.Text = "Set Marker with Text";
this.SetMarkerWithTextContextMenuItem.Click += new System.EventHandler(this.SetMarkerWithTextMenuItem_Click); this.SetMarkerWithTextContextMenuItem.Click += new System.EventHandler(this.SetMarkerWithTextMenuItem_Click);
// //
// RemoveMarkersContextMenuItem // RemoveMarkersContextMenuItem
// //
this.RemoveMarkersContextMenuItem.Name = "RemoveMarkersContextMenuItem"; this.RemoveMarkersContextMenuItem.Name = "RemoveMarkersContextMenuItem";
this.RemoveMarkersContextMenuItem.Size = new System.Drawing.Size(242, 22); this.RemoveMarkersContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.RemoveMarkersContextMenuItem.Text = "Remove Markers"; this.RemoveMarkersContextMenuItem.Text = "Remove Markers";
this.RemoveMarkersContextMenuItem.Click += new System.EventHandler(this.RemoveMarkersMenuItem_Click); this.RemoveMarkersContextMenuItem.Click += new System.EventHandler(this.RemoveMarkersMenuItem_Click);
// //
// toolStripSeparator15 // toolStripSeparator15
// //
this.toolStripSeparator15.Name = "toolStripSeparator15"; this.toolStripSeparator15.Name = "toolStripSeparator15";
this.toolStripSeparator15.Size = new System.Drawing.Size(239, 6); this.toolStripSeparator15.Size = new System.Drawing.Size(250, 6);
// //
// DeselectContextMenuItem // DeselectContextMenuItem
// //
this.DeselectContextMenuItem.Name = "DeselectContextMenuItem"; this.DeselectContextMenuItem.Name = "DeselectContextMenuItem";
this.DeselectContextMenuItem.Size = new System.Drawing.Size(242, 22); this.DeselectContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.DeselectContextMenuItem.Text = "Deselect"; this.DeselectContextMenuItem.Text = "Deselect";
this.DeselectContextMenuItem.Click += new System.EventHandler(this.DeselectMenuItem_Click); this.DeselectContextMenuItem.Click += new System.EventHandler(this.DeselectMenuItem_Click);
// //
@ -1314,39 +1386,39 @@ namespace BizHawk.Client.EmuHawk
// //
this.SelectBetweenMarkersContextMenuItem.Name = "SelectBetweenMarkersContextMenuItem"; this.SelectBetweenMarkersContextMenuItem.Name = "SelectBetweenMarkersContextMenuItem";
this.SelectBetweenMarkersContextMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); this.SelectBetweenMarkersContextMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
this.SelectBetweenMarkersContextMenuItem.Size = new System.Drawing.Size(242, 22); this.SelectBetweenMarkersContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.SelectBetweenMarkersContextMenuItem.Text = "Select between Markers"; this.SelectBetweenMarkersContextMenuItem.Text = "Select between Markers";
this.SelectBetweenMarkersContextMenuItem.Click += new System.EventHandler(this.SelectBetweenMarkersMenuItem_Click); this.SelectBetweenMarkersContextMenuItem.Click += new System.EventHandler(this.SelectBetweenMarkersMenuItem_Click);
// //
// toolStripSeparator16 // toolStripSeparator16
// //
this.toolStripSeparator16.Name = "toolStripSeparator16"; this.toolStripSeparator16.Name = "toolStripSeparator16";
this.toolStripSeparator16.Size = new System.Drawing.Size(239, 6); this.toolStripSeparator16.Size = new System.Drawing.Size(250, 6);
// //
// UngreenzoneContextMenuItem // UngreenzoneContextMenuItem
// //
this.UngreenzoneContextMenuItem.Name = "UngreenzoneContextMenuItem"; this.UngreenzoneContextMenuItem.Name = "UngreenzoneContextMenuItem";
this.UngreenzoneContextMenuItem.Size = new System.Drawing.Size(242, 22); this.UngreenzoneContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.UngreenzoneContextMenuItem.Text = "Clear Greenzone"; this.UngreenzoneContextMenuItem.Text = "Clear Greenzone";
this.UngreenzoneContextMenuItem.Click += new System.EventHandler(this.ClearGreenzoneMenuItem_Click); this.UngreenzoneContextMenuItem.Click += new System.EventHandler(this.ClearGreenzoneMenuItem_Click);
// //
// CancelSeekContextMenuItem // CancelSeekContextMenuItem
// //
this.CancelSeekContextMenuItem.Name = "CancelSeekContextMenuItem"; this.CancelSeekContextMenuItem.Name = "CancelSeekContextMenuItem";
this.CancelSeekContextMenuItem.Size = new System.Drawing.Size(242, 22); this.CancelSeekContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.CancelSeekContextMenuItem.Text = "Cancel Seek"; this.CancelSeekContextMenuItem.Text = "Cancel Seek";
this.CancelSeekContextMenuItem.Click += new System.EventHandler(this.CancelSeekContextMenuItem_Click); this.CancelSeekContextMenuItem.Click += new System.EventHandler(this.CancelSeekContextMenuItem_Click);
// //
// toolStripSeparator17 // toolStripSeparator17
// //
this.toolStripSeparator17.Name = "toolStripSeparator17"; this.toolStripSeparator17.Name = "toolStripSeparator17";
this.toolStripSeparator17.Size = new System.Drawing.Size(239, 6); this.toolStripSeparator17.Size = new System.Drawing.Size(250, 6);
// //
// copyToolStripMenuItem // copyToolStripMenuItem
// //
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
this.copyToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+C"; this.copyToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+C";
this.copyToolStripMenuItem.Size = new System.Drawing.Size(242, 22); this.copyToolStripMenuItem.Size = new System.Drawing.Size(253, 22);
this.copyToolStripMenuItem.Text = "Copy"; this.copyToolStripMenuItem.Text = "Copy";
this.copyToolStripMenuItem.Click += new System.EventHandler(this.CopyMenuItem_Click); this.copyToolStripMenuItem.Click += new System.EventHandler(this.CopyMenuItem_Click);
// //
@ -1354,7 +1426,7 @@ namespace BizHawk.Client.EmuHawk
// //
this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem"; this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
this.pasteToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+V"; this.pasteToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+V";
this.pasteToolStripMenuItem.Size = new System.Drawing.Size(242, 22); this.pasteToolStripMenuItem.Size = new System.Drawing.Size(253, 22);
this.pasteToolStripMenuItem.Text = "Paste"; this.pasteToolStripMenuItem.Text = "Paste";
this.pasteToolStripMenuItem.Click += new System.EventHandler(this.PasteMenuItem_Click); this.pasteToolStripMenuItem.Click += new System.EventHandler(this.PasteMenuItem_Click);
// //
@ -1362,7 +1434,7 @@ namespace BizHawk.Client.EmuHawk
// //
this.pasteInsertToolStripMenuItem.Name = "pasteInsertToolStripMenuItem"; this.pasteInsertToolStripMenuItem.Name = "pasteInsertToolStripMenuItem";
this.pasteInsertToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Shift+V"; this.pasteInsertToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Shift+V";
this.pasteInsertToolStripMenuItem.Size = new System.Drawing.Size(242, 22); this.pasteInsertToolStripMenuItem.Size = new System.Drawing.Size(253, 22);
this.pasteInsertToolStripMenuItem.Text = "Paste Insert"; this.pasteInsertToolStripMenuItem.Text = "Paste Insert";
this.pasteInsertToolStripMenuItem.Click += new System.EventHandler(this.PasteInsertMenuItem_Click); this.pasteInsertToolStripMenuItem.Click += new System.EventHandler(this.PasteInsertMenuItem_Click);
// //
@ -1370,28 +1442,28 @@ namespace BizHawk.Client.EmuHawk
// //
this.cutToolStripMenuItem.Name = "cutToolStripMenuItem"; this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
this.cutToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+X"; this.cutToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+X";
this.cutToolStripMenuItem.Size = new System.Drawing.Size(242, 22); this.cutToolStripMenuItem.Size = new System.Drawing.Size(253, 22);
this.cutToolStripMenuItem.Text = "Cut"; this.cutToolStripMenuItem.Text = "Cut";
this.cutToolStripMenuItem.Click += new System.EventHandler(this.CutMenuItem_Click); this.cutToolStripMenuItem.Click += new System.EventHandler(this.CutMenuItem_Click);
// //
// separateToolStripMenuItem // separateToolStripMenuItem
// //
this.separateToolStripMenuItem.Name = "separateToolStripMenuItem"; this.separateToolStripMenuItem.Name = "separateToolStripMenuItem";
this.separateToolStripMenuItem.Size = new System.Drawing.Size(239, 6); this.separateToolStripMenuItem.Size = new System.Drawing.Size(250, 6);
// //
// ClearContextMenuItem // ClearContextMenuItem
// //
this.ClearContextMenuItem.Name = "ClearContextMenuItem"; this.ClearContextMenuItem.Name = "ClearContextMenuItem";
this.ClearContextMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Delete; this.ClearContextMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Delete;
this.ClearContextMenuItem.Size = new System.Drawing.Size(242, 22); this.ClearContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.ClearContextMenuItem.Text = "Clear"; this.ClearContextMenuItem.Text = "Clear";
this.ClearContextMenuItem.Click += new System.EventHandler(this.ClearMenuItem_Click); this.ClearContextMenuItem.Click += new System.EventHandler(this.ClearFramesMenuItem_Click);
// //
// InsertFrameContextMenuItem // InsertFrameContextMenuItem
// //
this.InsertFrameContextMenuItem.Name = "InsertFrameContextMenuItem"; this.InsertFrameContextMenuItem.Name = "InsertFrameContextMenuItem";
this.InsertFrameContextMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Insert; this.InsertFrameContextMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Insert;
this.InsertFrameContextMenuItem.Size = new System.Drawing.Size(242, 22); this.InsertFrameContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.InsertFrameContextMenuItem.Text = "Insert"; this.InsertFrameContextMenuItem.Text = "Insert";
this.InsertFrameContextMenuItem.Click += new System.EventHandler(this.InsertFrameMenuItem_Click); this.InsertFrameContextMenuItem.Click += new System.EventHandler(this.InsertFrameMenuItem_Click);
// //
@ -1399,7 +1471,7 @@ namespace BizHawk.Client.EmuHawk
// //
this.DeleteFramesContextMenuItem.Name = "DeleteFramesContextMenuItem"; this.DeleteFramesContextMenuItem.Name = "DeleteFramesContextMenuItem";
this.DeleteFramesContextMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete))); this.DeleteFramesContextMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete)));
this.DeleteFramesContextMenuItem.Size = new System.Drawing.Size(242, 22); this.DeleteFramesContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.DeleteFramesContextMenuItem.Text = "Delete"; this.DeleteFramesContextMenuItem.Text = "Delete";
this.DeleteFramesContextMenuItem.Click += new System.EventHandler(this.DeleteFramesMenuItem_Click); this.DeleteFramesContextMenuItem.Click += new System.EventHandler(this.DeleteFramesMenuItem_Click);
// //
@ -1407,54 +1479,54 @@ namespace BizHawk.Client.EmuHawk
// //
this.CloneContextMenuItem.Name = "CloneContextMenuItem"; this.CloneContextMenuItem.Name = "CloneContextMenuItem";
this.CloneContextMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Insert))); this.CloneContextMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Insert)));
this.CloneContextMenuItem.Size = new System.Drawing.Size(242, 22); this.CloneContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.CloneContextMenuItem.Text = "Clone"; this.CloneContextMenuItem.Text = "Clone";
this.CloneContextMenuItem.Click += new System.EventHandler(this.CloneMenuItem_Click); this.CloneContextMenuItem.Click += new System.EventHandler(this.CloneFramesMenuItem_Click);
// //
// InsertNumFramesContextMenuItem // InsertNumFramesContextMenuItem
// //
this.InsertNumFramesContextMenuItem.Name = "InsertNumFramesContextMenuItem"; this.InsertNumFramesContextMenuItem.Name = "InsertNumFramesContextMenuItem";
this.InsertNumFramesContextMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) this.InsertNumFramesContextMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.Insert))); | System.Windows.Forms.Keys.Insert)));
this.InsertNumFramesContextMenuItem.Size = new System.Drawing.Size(242, 22); this.InsertNumFramesContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.InsertNumFramesContextMenuItem.Text = "Insert # of Frames"; this.InsertNumFramesContextMenuItem.Text = "Insert # of Frames";
this.InsertNumFramesContextMenuItem.Click += new System.EventHandler(this.InsertNumFramesMenuItem_Click); this.InsertNumFramesContextMenuItem.Click += new System.EventHandler(this.InsertNumFramesMenuItem_Click);
// //
// toolStripSeparator18 // toolStripSeparator18
// //
this.toolStripSeparator18.Name = "toolStripSeparator18"; this.toolStripSeparator18.Name = "toolStripSeparator18";
this.toolStripSeparator18.Size = new System.Drawing.Size(239, 6); this.toolStripSeparator18.Size = new System.Drawing.Size(250, 6);
// //
// TruncateContextMenuItem // TruncateContextMenuItem
// //
this.TruncateContextMenuItem.Name = "TruncateContextMenuItem"; this.TruncateContextMenuItem.Name = "TruncateContextMenuItem";
this.TruncateContextMenuItem.Size = new System.Drawing.Size(242, 22); this.TruncateContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.TruncateContextMenuItem.Text = "Truncate Movie"; this.TruncateContextMenuItem.Text = "Truncate Movie";
this.TruncateContextMenuItem.Click += new System.EventHandler(this.TruncateMenuItem_Click); this.TruncateContextMenuItem.Click += new System.EventHandler(this.TruncateMenuItem_Click);
// //
// BranchContextMenuItem // BranchContextMenuItem
// //
this.BranchContextMenuItem.Name = "BranchContextMenuItem"; this.BranchContextMenuItem.Name = "BranchContextMenuItem";
this.BranchContextMenuItem.Size = new System.Drawing.Size(242, 22); this.BranchContextMenuItem.Size = new System.Drawing.Size(253, 22);
this.BranchContextMenuItem.Text = "&Branch"; this.BranchContextMenuItem.Text = "&Branch";
this.BranchContextMenuItem.Click += new System.EventHandler(this.BranchContextMenuItem_Click); this.BranchContextMenuItem.Click += new System.EventHandler(this.BranchContextMenuItem_Click);
// //
// StartFromNowSeparator // StartFromNowSeparator
// //
this.StartFromNowSeparator.Name = "StartFromNowSeparator"; this.StartFromNowSeparator.Name = "StartFromNowSeparator";
this.StartFromNowSeparator.Size = new System.Drawing.Size(239, 6); this.StartFromNowSeparator.Size = new System.Drawing.Size(250, 6);
// //
// StartNewProjectFromNowMenuItem // StartNewProjectFromNowMenuItem
// //
this.StartNewProjectFromNowMenuItem.Name = "StartNewProjectFromNowMenuItem"; this.StartNewProjectFromNowMenuItem.Name = "StartNewProjectFromNowMenuItem";
this.StartNewProjectFromNowMenuItem.Size = new System.Drawing.Size(242, 22); this.StartNewProjectFromNowMenuItem.Size = new System.Drawing.Size(253, 22);
this.StartNewProjectFromNowMenuItem.Text = "Start a new project from Now"; this.StartNewProjectFromNowMenuItem.Text = "Start a new project from Now";
this.StartNewProjectFromNowMenuItem.Click += new System.EventHandler(this.StartNewProjectFromNowMenuItem_Click); this.StartNewProjectFromNowMenuItem.Click += new System.EventHandler(this.StartNewProjectFromNowMenuItem_Click);
// //
// StartANewProjectFromSaveRamMenuItem // StartANewProjectFromSaveRamMenuItem
// //
this.StartANewProjectFromSaveRamMenuItem.Name = "StartANewProjectFromSaveRamMenuItem"; this.StartANewProjectFromSaveRamMenuItem.Name = "StartANewProjectFromSaveRamMenuItem";
this.StartANewProjectFromSaveRamMenuItem.Size = new System.Drawing.Size(242, 22); this.StartANewProjectFromSaveRamMenuItem.Size = new System.Drawing.Size(253, 22);
this.StartANewProjectFromSaveRamMenuItem.Text = "Start a new project from SaveRam"; this.StartANewProjectFromSaveRamMenuItem.Text = "Start a new project from SaveRam";
this.StartANewProjectFromSaveRamMenuItem.Click += new System.EventHandler(this.StartANewProjectFromSaveRamMenuItem_Click); this.StartANewProjectFromSaveRamMenuItem.Click += new System.EventHandler(this.StartANewProjectFromSaveRamMenuItem_Click);
// //
@ -1586,9 +1658,9 @@ namespace BizHawk.Client.EmuHawk
private System.Windows.Forms.ToolStripMenuItem InsertFrameMenuItem; private System.Windows.Forms.ToolStripMenuItem InsertFrameMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
private System.Windows.Forms.ToolStripMenuItem CloneMenuItem; private System.Windows.Forms.ToolStripMenuItem CloneFramesMenuItem;
private System.Windows.Forms.ToolStripMenuItem DeleteFramesMenuItem; private System.Windows.Forms.ToolStripMenuItem DeleteFramesMenuItem;
private System.Windows.Forms.ToolStripMenuItem ClearMenuItem; private System.Windows.Forms.ToolStripMenuItem ClearFramesMenuItem;
private System.Windows.Forms.ToolStripMenuItem InsertNumFramesMenuItem; private System.Windows.Forms.ToolStripMenuItem InsertNumFramesMenuItem;
private System.Windows.Forms.ToolStripMenuItem SelectAllMenuItem; private System.Windows.Forms.ToolStripMenuItem SelectAllMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
@ -1613,7 +1685,6 @@ namespace BizHawk.Client.EmuHawk
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem SetMaxUndoLevelsMenuItem; private System.Windows.Forms.ToolStripMenuItem SetMaxUndoLevelsMenuItem;
private System.Windows.Forms.ToolStripMenuItem AutoadjustInputMenuItem; private System.Windows.Forms.ToolStripMenuItem AutoadjustInputMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
private System.Windows.Forms.ToolStripMenuItem DrawInputByDraggingMenuItem; private System.Windows.Forms.ToolStripMenuItem DrawInputByDraggingMenuItem;
private System.Windows.Forms.ToolStripMenuItem UseInputKeysItem; private System.Windows.Forms.ToolStripMenuItem UseInputKeysItem;
private System.Windows.Forms.ToolStripMenuItem BindMarkersToInputMenuItem; private System.Windows.Forms.ToolStripMenuItem BindMarkersToInputMenuItem;
@ -1626,7 +1697,7 @@ namespace BizHawk.Client.EmuHawk
private System.Windows.Forms.ToolStripMenuItem SettingsSubMenu; private System.Windows.Forms.ToolStripMenuItem SettingsSubMenu;
private StatusStripEx TasStatusStrip; private StatusStripEx TasStatusStrip;
private System.Windows.Forms.ToolStripStatusLabel MessageStatusLabel; private System.Windows.Forms.ToolStripStatusLabel MessageStatusLabel;
private PlaybackBox TasPlaybackBox; public PlaybackBox TasPlaybackBox;
private System.Windows.Forms.ToolStripStatusLabel SplicerStatusLabel; private System.Windows.Forms.ToolStripStatusLabel SplicerStatusLabel;
private System.Windows.Forms.ToolStripMenuItem MetaSubMenu; private System.Windows.Forms.ToolStripMenuItem MetaSubMenu;
private System.Windows.Forms.ToolStripMenuItem HeaderMenuItem; private System.Windows.Forms.ToolStripMenuItem HeaderMenuItem;
@ -1720,7 +1791,16 @@ namespace BizHawk.Client.EmuHawk
private System.Windows.Forms.ToolStripMenuItem SetBranchCellHoverIntervalMenuItem; private System.Windows.Forms.ToolStripMenuItem SetBranchCellHoverIntervalMenuItem;
private System.Windows.Forms.ToolStripMenuItem SetMarkerWithTextContextMenuItem; private System.Windows.Forms.ToolStripMenuItem SetMarkerWithTextContextMenuItem;
private System.Windows.Forms.ToolStripMenuItem SetSeekingCutoffIntervalMenuItem; private System.Windows.Forms.ToolStripMenuItem SetSeekingCutoffIntervalMenuItem;
private System.Windows.Forms.ToolStripMenuItem setAutosaveIntervalToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator26;
private System.Windows.Forms.ToolStripMenuItem TASEditorManualOnlineMenuItem;
private System.Windows.Forms.ToolStripMenuItem ForumThreadMenuItem;
private System.Windows.Forms.ToolStripMenuItem autosaveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem SetAutosaveIntervalMenuItem;
private System.Windows.Forms.ToolStripMenuItem AutosaveAsBk2MenuItem; private System.Windows.Forms.ToolStripMenuItem AutosaveAsBk2MenuItem;
private System.Windows.Forms.ToolStripMenuItem AutosaveAsBackupFileMenuItem;
private System.Windows.Forms.ToolStripMenuItem BackupPerFileSaveMenuItem;
private System.Windows.Forms.ToolStripMenuItem SaveBackupMenuItem;
private System.Windows.Forms.ToolStripMenuItem SaveBk2BackupMenuItem;
private System.Windows.Forms.ToolStripMenuItem AutoRestoreOnMouseUpOnlyMenuItem;
} }
} }

View File

@ -112,7 +112,7 @@ namespace BizHawk.Client.EmuHawk
if (result == DialogResult.Yes) if (result == DialogResult.Yes)
{ {
_exiting = true; // Asking to save changes should only ever be called when closing something _exiting = true; // Asking to save changes should only ever be called when closing something
SaveTasMenuItem_Click(null, null); SaveTas(null, null);
} }
else if (result == DialogResult.No) else if (result == DialogResult.No)
{ {

View File

@ -92,6 +92,11 @@ namespace BizHawk.Client.EmuHawk
public void StopSeeking() public void StopSeeking()
{ {
_seekBackgroundWorker.CancelAsync(); _seekBackgroundWorker.CancelAsync();
if (IgnoreSeekFrame)
{
GlobalWin.MainForm.UnpauseEmulator();
IgnoreSeekFrame = false;
}
} }
public bool FloatEditingMode public bool FloatEditingMode
@ -393,6 +398,8 @@ namespace BizHawk.Client.EmuHawk
if (e.Button == MouseButtons.Middle) if (e.Button == MouseButtons.Middle)
{ {
if (GlobalWin.MainForm.EmulatorPaused)
IgnoreSeekFrame = false;
TogglePause(); TogglePause();
return; return;
} }
@ -467,6 +474,9 @@ namespace BizHawk.Client.EmuHawk
} }
else else
_patternPaint = false; _patternPaint = false;
if (!Settings.AutoRestoreOnMouseUpOnly)
DoTriggeredAutoRestoreIfNeeded();
} }
else else
{ {
@ -643,6 +653,7 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.MainForm.PauseOnFrame = null; GlobalWin.MainForm.PauseOnFrame = null;
} }
} }
RefreshDialog();
} }
else else
{ {
@ -822,6 +833,12 @@ namespace BizHawk.Client.EmuHawk
CurrentTasMovie.SetBoolState(i, _startBoolDrawColumn, setVal); // Notice it uses new row, old column, you can only paint across a single column CurrentTasMovie.SetBoolState(i, _startBoolDrawColumn, setVal); // Notice it uses new row, old column, you can only paint across a single column
JumpToGreenzone(); JumpToGreenzone();
} }
if (!Settings.AutoRestoreOnMouseUpOnly)
{
_triggerAutoRestore = true;
DoTriggeredAutoRestoreIfNeeded();
}
} }
} }
@ -844,6 +861,12 @@ namespace BizHawk.Client.EmuHawk
CurrentTasMovie.SetFloatState(i, _startFloatDrawColumn, setVal); // Notice it uses new row, old column, you can only paint across a single column CurrentTasMovie.SetFloatState(i, _startFloatDrawColumn, setVal); // Notice it uses new row, old column, you can only paint across a single column
JumpToGreenzone(); JumpToGreenzone();
} }
if (!Settings.AutoRestoreOnMouseUpOnly)
{
_triggerAutoRestore = true;
DoTriggeredAutoRestoreIfNeeded();
}
} }
} }
@ -996,7 +1019,11 @@ namespace BizHawk.Client.EmuHawk
DoTriggeredAutoRestoreIfNeeded(); DoTriggeredAutoRestoreIfNeeded();
} }
} }
}
else
{
// not using StopSeeking() here, since it has special logic and should only happen when seek frame is reashed
CancelSeekContextMenuItem_Click(null, null);
} }
RefreshDialog(); RefreshDialog();

View File

@ -76,12 +76,12 @@ namespace BizHawk.Client.EmuHawk
private bool _exiting = false; private bool _exiting = false;
private void SaveTasMenuItem_Click(object sender, EventArgs e) private void SaveTas(object sender, EventArgs e)
{ {
if (string.IsNullOrEmpty(CurrentTasMovie.Filename) || if (string.IsNullOrEmpty(CurrentTasMovie.Filename) ||
CurrentTasMovie.Filename == DefaultTasProjName()) CurrentTasMovie.Filename == DefaultTasProjName())
{ {
SaveAsTasMenuItem_Click(sender, e); SaveAsTas(sender, e);
} }
else else
{ {
@ -90,14 +90,23 @@ namespace BizHawk.Client.EmuHawk
this.Cursor = Cursors.WaitCursor; this.Cursor = Cursors.WaitCursor;
Update(); Update();
CurrentTasMovie.Save(); CurrentTasMovie.Save();
Settings.RecentTas.Add(CurrentTasMovie.Filename); if (Settings.AutosaveInterval > 0)
_autosaveTimer.Start(); _autosaveTimer.Start();
MessageStatusLabel.Text = Path.GetFileName(CurrentTasMovie.Filename) + " saved."; MessageStatusLabel.Text = CurrentTasMovie.Name + " saved.";
Settings.RecentTas.Add(CurrentTasMovie.Filename);
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
} }
} }
private void SaveAsTasMenuItem_Click(object sender, EventArgs e) // call this one from the menu only
private void SaveTasMenuItem_Click(object sender, EventArgs e)
{
SaveTas(sender, e);
if (Settings.BackupPerFileSave)
SaveBackupMenuItem_Click(sender, e);
}
private void SaveAsTas(object sender, EventArgs e)
{ {
_autosaveTimer.Stop(); _autosaveTimer.Stop();
var filename = CurrentTasMovie.Filename; var filename = CurrentTasMovie.Filename;
@ -121,10 +130,56 @@ namespace BizHawk.Client.EmuHawk
CurrentTasMovie.Save(); CurrentTasMovie.Save();
Settings.RecentTas.Add(CurrentTasMovie.Filename); Settings.RecentTas.Add(CurrentTasMovie.Filename);
SetTextProperty(); SetTextProperty();
_autosaveTimer.Start();
MessageStatusLabel.Text = Path.GetFileName(CurrentTasMovie.Filename) + " saved."; MessageStatusLabel.Text = Path.GetFileName(CurrentTasMovie.Filename) + " saved.";
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
} }
// keep insisting
if (Settings.AutosaveInterval > 0)
_autosaveTimer.Start();
}
// call this one from the menu only
private void SaveAsTasMenuItem_Click(object sender, EventArgs e)
{
SaveAsTas(sender, e);
if (Settings.BackupPerFileSave)
SaveBackupMenuItem_Click(sender, e);
}
private void SaveBackupMenuItem_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(CurrentTasMovie.Filename) ||
CurrentTasMovie.Filename == DefaultTasProjName())
{
SaveAsTas(sender, e);
}
else
{
_autosaveTimer.Stop();
MessageStatusLabel.Text = "Saving...";
this.Cursor = Cursors.WaitCursor;
Update();
CurrentTasMovie.SaveBackup();
if (Settings.AutosaveInterval > 0)
_autosaveTimer.Start();
MessageStatusLabel.Text = "Backup .tasproj saved to \"Movie backups\" path.";
Settings.RecentTas.Add(CurrentTasMovie.Filename);
this.Cursor = Cursors.Default;
}
}
private void SaveBk2BackupMenuItem_Click(object sender, EventArgs e)
{
_autosaveTimer.Stop();
var bk2 = CurrentTasMovie.ToBk2(copy: true, backup: true);
MessageStatusLabel.Text = "Exporting to .bk2...";
this.Cursor = Cursors.WaitCursor;
Update();
bk2.SaveBackup();
if (Settings.AutosaveInterval > 0)
_autosaveTimer.Start();
MessageStatusLabel.Text = "Backup .bk2 saved to \"Movie backups\" path.";
this.Cursor = Cursors.Default;
} }
private void saveSelectionToMacroToolStripMenuItem_Click(object sender, EventArgs e) private void saveSelectionToMacroToolStripMenuItem_Click(object sender, EventArgs e)
@ -166,8 +221,9 @@ namespace BizHawk.Client.EmuHawk
this.Cursor = Cursors.WaitCursor; this.Cursor = Cursors.WaitCursor;
Update(); Update();
bk2.Save(); bk2.Save();
if (Settings.AutosaveInterval > 0)
_autosaveTimer.Start(); _autosaveTimer.Start();
MessageStatusLabel.Text = Path.GetFileName(bk2.Filename) + " exported."; MessageStatusLabel.Text = bk2.Name + " exported.";
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
} }
@ -180,6 +236,55 @@ namespace BizHawk.Client.EmuHawk
#region Edit #region Edit
private void EditSubMenu_DropDownOpened(object sender, EventArgs e)
{
DeselectMenuItem.Enabled =
SelectBetweenMarkersMenuItem.Enabled =
CopyMenuItem.Enabled =
CutMenuItem.Enabled =
ClearFramesMenuItem.Enabled =
DeleteFramesMenuItem.Enabled =
CloneFramesMenuItem.Enabled =
TruncateMenuItem.Enabled =
TasView.AnyRowsSelected;
ReselectClipboardMenuItem.Enabled =
PasteMenuItem.Enabled =
PasteInsertMenuItem.Enabled =
_tasClipboard.Any();
ClearGreenzoneMenuItem.Enabled =
CurrentTasMovie != null && CurrentTasMovie.TasStateManager.Any();
GreenzoneICheckSeparator.Visible =
StateHistoryIntegrityCheckMenuItem.Visible =
VersionInfo.DeveloperBuild;
ClearFramesMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Clear Frames"].Bindings;
InsertFrameMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Insert Frame"].Bindings;
DeleteFramesMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Delete Frames"].Bindings;
CloneFramesMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Clone Frames"].Bindings;
}
public void ClearFramesExternal()
{
ClearFramesMenuItem_Click(null, null);
}
public void InsertFrameExternal()
{
InsertFrameMenuItem_Click(null, null);
}
public void DeleteFramesExternal()
{
DeleteFramesMenuItem_Click(null, null);
}
public void CloneFramesExternal()
{
CloneFramesMenuItem_Click(null, null);
}
private void UndoMenuItem_Click(object sender, EventArgs e) private void UndoMenuItem_Click(object sender, EventArgs e)
{ {
if (CurrentTasMovie.ChangeLog.Undo() < Emulator.Frame) if (CurrentTasMovie.ChangeLog.Undo() < Emulator.Frame)
@ -211,30 +316,6 @@ namespace BizHawk.Client.EmuHawk
_undoForm.UpdateValues(); _undoForm.UpdateValues();
} }
private void EditSubMenu_DropDownOpened(object sender, EventArgs e)
{
DeselectMenuItem.Enabled =
SelectBetweenMarkersMenuItem.Enabled =
CopyMenuItem.Enabled =
CutMenuItem.Enabled =
ClearMenuItem.Enabled =
DeleteFramesMenuItem.Enabled =
CloneMenuItem.Enabled =
TruncateMenuItem.Enabled =
TasView.AnyRowsSelected;
ReselectClipboardMenuItem.Enabled =
PasteMenuItem.Enabled =
PasteInsertMenuItem.Enabled =
_tasClipboard.Any();
ClearGreenzoneMenuItem.Enabled =
CurrentTasMovie != null && CurrentTasMovie.TasStateManager.Any();
GreenzoneICheckSeparator.Visible =
StateHistoryIntegrityCheckMenuItem.Visible =
VersionInfo.DeveloperBuild;
}
private void DeselectMenuItem_Click(object sender, EventArgs e) private void DeselectMenuItem_Click(object sender, EventArgs e)
{ {
TasView.DeselectAll(); TasView.DeselectAll();
@ -408,7 +489,7 @@ namespace BizHawk.Client.EmuHawk
} }
} }
private void ClearMenuItem_Click(object sender, EventArgs e) private void ClearFramesMenuItem_Click(object sender, EventArgs e)
{ {
if (TasView.AnyRowsSelected) if (TasView.AnyRowsSelected)
{ {
@ -477,7 +558,7 @@ namespace BizHawk.Client.EmuHawk
} }
} }
private void CloneMenuItem_Click(object sender, EventArgs e) private void CloneFramesMenuItem_Click(object sender, EventArgs e)
{ {
if (TasView.AnyRowsSelected) if (TasView.AnyRowsSelected)
{ {
@ -662,6 +743,17 @@ namespace BizHawk.Client.EmuHawk
#region Config #region Config
private void ConfigSubMenu_DropDownOpened(object sender, EventArgs e)
{
DrawInputByDraggingMenuItem.Checked = Settings.DrawInput;
AutopauseAtEndOfMovieMenuItem.Checked = Settings.AutoPause;
AutoRestoreOnMouseUpOnlyMenuItem.Checked = Settings.AutoRestoreOnMouseUpOnly;
EmptyNewMarkerNotesMenuItem.Checked = Settings.EmptyMarkers;
AutosaveAsBk2MenuItem.Checked = Settings.AutosaveAsBk2;
AutosaveAsBackupFileMenuItem.Checked = Settings.AutosaveAsBackupFile;
BackupPerFileSaveMenuItem.Checked = Settings.BackupPerFileSave;
}
private void SetMaxUndoLevelsMenuItem_Click(object sender, EventArgs e) private void SetMaxUndoLevelsMenuItem_Click(object sender, EventArgs e)
{ {
using (var prompt = new InputPrompt using (var prompt = new InputPrompt
@ -730,18 +822,19 @@ namespace BizHawk.Client.EmuHawk
using (var prompt = new InputPrompt using (var prompt = new InputPrompt
{ {
TextInputType = InputPrompt.InputType.Unsigned, TextInputType = InputPrompt.InputType.Unsigned,
Message = "Autosave Interval in seconds", Message = "Autosave Interval in seconds\nSet to 0 to disable",
InitialValue = (Settings.AutosaveInterval / 1000).ToString() InitialValue = (Settings.AutosaveInterval / 1000).ToString()
}) })
{ {
DialogResult result = prompt.ShowDialog(); DialogResult result = prompt.ShowDialog();
if (result == DialogResult.OK) if (result == DialogResult.OK)
{ {
int val = int.Parse(prompt.PromptText) * 1000; uint val = uint.Parse(prompt.PromptText) * 1000;
Settings.AutosaveInterval = val;
if (val > 0) if (val > 0)
{ {
Settings.AutosaveInterval = val; _autosaveTimer.Interval = (int)val;
_autosaveTimer.Interval = val; _autosaveTimer.Start();
} }
} }
} }
@ -752,12 +845,14 @@ namespace BizHawk.Client.EmuHawk
Settings.AutosaveAsBk2 ^= true; Settings.AutosaveAsBk2 ^= true;
} }
private void ConfigSubMenu_DropDownOpened(object sender, EventArgs e) private void AutosaveAsBackupFileMenuItem_Click(object sender, EventArgs e)
{ {
DrawInputByDraggingMenuItem.Checked = Settings.DrawInput; Settings.AutosaveAsBackupFile ^= true;
AutopauseAtEndOfMovieMenuItem.Checked = Settings.AutoPause; }
EmptyNewMarkerNotesMenuItem.Checked = Settings.EmptyMarkers;
AutosaveAsBk2MenuItem.Checked = Settings.AutosaveAsBk2; private void BackupPerFileSaveMenuItem_Click(object sender, EventArgs e)
{
Settings.BackupPerFileSave ^= true;
} }
private void DrawInputByDraggingMenuItem_Click(object sender, EventArgs e) private void DrawInputByDraggingMenuItem_Click(object sender, EventArgs e)
@ -785,6 +880,11 @@ namespace BizHawk.Client.EmuHawk
Settings.AutoPause ^= true; Settings.AutoPause ^= true;
} }
private void AutoRestoreOnMouseUpOnlyMenuItem_Click(object sender, EventArgs e)
{
Settings.AutoRestoreOnMouseUpOnly ^= true;
}
private void autoHoldToolStripMenuItem_CheckedChanged(object sender, EventArgs e) private void autoHoldToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{ {
if (autoHoldToolStripMenuItem.Checked) if (autoHoldToolStripMenuItem.Checked)
@ -894,6 +994,31 @@ namespace BizHawk.Client.EmuHawk
hideWasLagFramesToolStripMenuItem.Checked = TasView.HideWasLagFrames; hideWasLagFramesToolStripMenuItem.Checked = TasView.HideWasLagFrames;
} }
private void iconsToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
denoteStatesWithIconsToolStripMenuItem.Checked = Settings.denoteStatesWithIcons;
denoteStatesWithBGColorToolStripMenuItem.Checked = Settings.denoteStatesWithBGColor;
denoteMarkersWithIconsToolStripMenuItem.Checked = Settings.denoteMarkersWithIcons;
denoteMarkersWithBGColorToolStripMenuItem.Checked = Settings.denoteMarkersWithBGColor;
}
private void followCursorToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
alwaysScrollToolStripMenuItem.Checked = Settings.FollowCursorAlwaysScroll;
scrollToViewToolStripMenuItem.Checked = false;
scrollToTopToolStripMenuItem.Checked = false;
scrollToBottomToolStripMenuItem.Checked = false;
scrollToCenterToolStripMenuItem.Checked = false;
if (TasView.ScrollMethod == "near")
scrollToViewToolStripMenuItem.Checked = true;
else if (TasView.ScrollMethod == "top")
scrollToTopToolStripMenuItem.Checked = true;
else if (TasView.ScrollMethod == "bottom")
scrollToBottomToolStripMenuItem.Checked = true;
else
scrollToCenterToolStripMenuItem.Checked = true;
}
private void RotateMenuItem_Click(object sender, EventArgs e) private void RotateMenuItem_Click(object sender, EventArgs e)
{ {
TasView.HorizontalOrientation ^= true; TasView.HorizontalOrientation ^= true;
@ -937,14 +1062,6 @@ namespace BizHawk.Client.EmuHawk
TasView.ScrollMethod = Settings.FollowCursorScrollMethod = "center"; TasView.ScrollMethod = Settings.FollowCursorScrollMethod = "center";
} }
private void iconsToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
denoteStatesWithIconsToolStripMenuItem.Checked = Settings.denoteStatesWithIcons;
denoteStatesWithBGColorToolStripMenuItem.Checked = Settings.denoteStatesWithBGColor;
denoteMarkersWithIconsToolStripMenuItem.Checked = Settings.denoteMarkersWithIcons;
denoteMarkersWithBGColorToolStripMenuItem.Checked = Settings.denoteMarkersWithBGColor;
}
private void denoteStatesWithIconsToolStripMenuItem_Click(object sender, EventArgs e) private void denoteStatesWithIconsToolStripMenuItem_Click(object sender, EventArgs e)
{ {
TasView.denoteStatesWithIcons = Settings.denoteStatesWithIcons = denoteStatesWithIconsToolStripMenuItem.Checked; TasView.denoteStatesWithIcons = Settings.denoteStatesWithIcons = denoteStatesWithIconsToolStripMenuItem.Checked;
@ -969,23 +1086,6 @@ namespace BizHawk.Client.EmuHawk
RefreshDialog(); RefreshDialog();
} }
private void followCursorToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
alwaysScrollToolStripMenuItem.Checked = Settings.FollowCursorAlwaysScroll;
scrollToViewToolStripMenuItem.Checked = false;
scrollToTopToolStripMenuItem.Checked = false;
scrollToBottomToolStripMenuItem.Checked = false;
scrollToCenterToolStripMenuItem.Checked = false;
if (TasView.ScrollMethod == "near")
scrollToViewToolStripMenuItem.Checked = true;
else if (TasView.ScrollMethod == "top")
scrollToTopToolStripMenuItem.Checked = true;
else if (TasView.ScrollMethod == "bottom")
scrollToBottomToolStripMenuItem.Checked = true;
else
scrollToCenterToolStripMenuItem.Checked = true;
}
private void wheelScrollSpeedToolStripMenuItem_Click(object sender, EventArgs e) private void wheelScrollSpeedToolStripMenuItem_Click(object sender, EventArgs e)
{ {
InputPrompt inputpromt = new InputPrompt(); InputPrompt inputpromt = new InputPrompt();
@ -1175,5 +1275,19 @@ namespace BizHawk.Client.EmuHawk
} }
#endregion #endregion
#region Help
private void TASEditorManualOnlineMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://www.fceux.com/web/help/taseditor/");
}
private void ForumThreadMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://tasvideos.org/forum/viewtopic.php?t=13505");
}
#endregion
} }
} }

View File

@ -50,6 +50,7 @@ namespace BizHawk.Client.EmuHawk
} }
public bool IsInMenuLoop { get; private set; } public bool IsInMenuLoop { get; private set; }
public bool IgnoreSeekFrame { get; set; }
[ConfigPersist] [ConfigPersist]
public TAStudioSettings Settings { get; set; } public TAStudioSettings Settings { get; set; }
@ -67,8 +68,11 @@ namespace BizHawk.Client.EmuHawk
FollowCursorScrollMethod = "near"; FollowCursorScrollMethod = "near";
BranchCellHoverInterval = 1; BranchCellHoverInterval = 1;
SeekingCutoffInterval = 2; // unused, relying on VisibleRows is smarter SeekingCutoffInterval = 2; // unused, relying on VisibleRows is smarter
AutoRestoreOnMouseUpOnly = true;
AutosaveInterval = 120000; AutosaveInterval = 120000;
AutosaveAsBk2 = false; AutosaveAsBk2 = false;
AutosaveAsBackupFile = false;
BackupPerFileSave = false;
// default to taseditor fashion // default to taseditor fashion
denoteStatesWithIcons = false; denoteStatesWithIcons = false;
denoteStatesWithBGColor = true; denoteStatesWithBGColor = true;
@ -87,8 +91,11 @@ namespace BizHawk.Client.EmuHawk
public string FollowCursorScrollMethod { get; set; } public string FollowCursorScrollMethod { get; set; }
public int BranchCellHoverInterval { get; set; } public int BranchCellHoverInterval { get; set; }
public int SeekingCutoffInterval { get; set; } public int SeekingCutoffInterval { get; set; }
public int AutosaveInterval { get; set; } public bool AutoRestoreOnMouseUpOnly { get; set; }
public uint AutosaveInterval { get; set; }
public bool AutosaveAsBk2 { get; set; } public bool AutosaveAsBk2 { get; set; }
public bool AutosaveAsBackupFile { get; set; }
public bool BackupPerFileSave { get; set; }
public bool denoteStatesWithIcons { get; set; } public bool denoteStatesWithIcons { get; set; }
public bool denoteStatesWithBGColor { get; set; } public bool denoteStatesWithBGColor { get; set; }
@ -138,6 +145,7 @@ namespace BizHawk.Client.EmuHawk
InitializeSeekWorker(); InitializeSeekWorker();
WantsToControlStopMovie = true; WantsToControlStopMovie = true;
WantsToControlRestartMovie = true;
TasPlaybackBox.Tastudio = this; TasPlaybackBox.Tastudio = this;
MarkerControl.Tastudio = this; MarkerControl.Tastudio = this;
BookMarkControl.Tastudio = this; BookMarkControl.Tastudio = this;
@ -150,25 +158,30 @@ namespace BizHawk.Client.EmuHawk
TasView.PointedCellChanged += TasView_PointedCellChanged; TasView.PointedCellChanged += TasView_PointedCellChanged;
TasView.MultiSelect = true; TasView.MultiSelect = true;
TasView.MaxCharactersInHorizontal = 1; TasView.MaxCharactersInHorizontal = 1;
WantsToControlRestartMovie = true; IgnoreSeekFrame = false;
_autosaveTimer.Interval = Settings.AutosaveInterval;
_autosaveTimer.Tick += AutosaveTimerEventProcessor;
_autosaveTimer.Start();
} }
private void AutosaveTimerEventProcessor(object sender, EventArgs e) private void AutosaveTimerEventProcessor(object sender, EventArgs e)
{ {
if (!CurrentTasMovie.Changes) if (CurrentTasMovie == null)
return; return;
if (Settings.AutosaveAsBk2) if (!CurrentTasMovie.Changes || Settings.AutosaveInterval == 0)
return;
if (Settings.AutosaveAsBackupFile)
{ {
ToBk2MenuItem_Click(sender, e); if (Settings.AutosaveAsBk2)
SaveBk2BackupMenuItem_Click(sender, e);
else
SaveBackupMenuItem_Click(sender, e);
} }
else else
{ {
SaveTasMenuItem_Click(sender, e); if (Settings.AutosaveAsBk2)
ToBk2MenuItem_Click(sender, e);
else
SaveTas(sender, e);
} }
} }
@ -294,6 +307,13 @@ namespace BizHawk.Client.EmuHawk
TasView.denoteMarkersWithIcons = Settings.denoteMarkersWithIcons; TasView.denoteMarkersWithIcons = Settings.denoteMarkersWithIcons;
TasView.denoteMarkersWithBGColor = Settings.denoteMarkersWithBGColor; TasView.denoteMarkersWithBGColor = Settings.denoteMarkersWithBGColor;
_autosaveTimer.Tick += AutosaveTimerEventProcessor;
if (Settings.AutosaveInterval > 0)
{
_autosaveTimer.Interval = (int)Settings.AutosaveInterval;
_autosaveTimer.Start();
}
// Remembering Split container logic // Remembering Split container logic
int defaultMainSplitDistance = MainVertialSplit.SplitterDistance; int defaultMainSplitDistance = MainVertialSplit.SplitterDistance;
int defaultBranchMarkerSplitDistance = BranchesMarkersSplit.SplitterDistance; int defaultBranchMarkerSplitDistance = BranchesMarkersSplit.SplitterDistance;
@ -975,8 +995,8 @@ namespace BizHawk.Client.EmuHawk
private void TAStudio_KeyDown(object sender, KeyEventArgs e) private void TAStudio_KeyDown(object sender, KeyEventArgs e)
{ {
if (e.KeyCode == Keys.F) //if (e.KeyCode == Keys.F)
TasPlaybackBox.FollowCursor ^= true; // TasPlaybackBox.FollowCursor ^= true;
} }
private void MainVertialSplit_SplitterMoved(object sender, SplitterEventArgs e) private void MainVertialSplit_SplitterMoved(object sender, SplitterEventArgs e)

View File

@ -88,31 +88,31 @@
this.sepToolStripMenuItem, this.sepToolStripMenuItem,
this.clearHistoryToHereToolStripMenuItem}); this.clearHistoryToHereToolStripMenuItem});
this.RightClickMenu.Name = "RightClickMenu"; this.RightClickMenu.Name = "RightClickMenu";
this.RightClickMenu.Size = new System.Drawing.Size(211, 76); this.RightClickMenu.Size = new System.Drawing.Size(209, 76);
// //
// undoHereToolStripMenuItem // undoHereToolStripMenuItem
// //
this.undoHereToolStripMenuItem.Name = "undoHereToolStripMenuItem"; this.undoHereToolStripMenuItem.Name = "undoHereToolStripMenuItem";
this.undoHereToolStripMenuItem.Size = new System.Drawing.Size(210, 22); this.undoHereToolStripMenuItem.Size = new System.Drawing.Size(208, 22);
this.undoHereToolStripMenuItem.Text = "Undo To Selection"; this.undoHereToolStripMenuItem.Text = "Undo To Selection";
this.undoHereToolStripMenuItem.Click += new System.EventHandler(this.undoHereToolStripMenuItem_Click); this.undoHereToolStripMenuItem.Click += new System.EventHandler(this.undoHereToolStripMenuItem_Click);
// //
// redoHereToolStripMenuItem // redoHereToolStripMenuItem
// //
this.redoHereToolStripMenuItem.Name = "redoHereToolStripMenuItem"; this.redoHereToolStripMenuItem.Name = "redoHereToolStripMenuItem";
this.redoHereToolStripMenuItem.Size = new System.Drawing.Size(210, 22); this.redoHereToolStripMenuItem.Size = new System.Drawing.Size(208, 22);
this.redoHereToolStripMenuItem.Text = "Redo To Selection"; this.redoHereToolStripMenuItem.Text = "Redo To Selection";
this.redoHereToolStripMenuItem.Click += new System.EventHandler(this.redoHereToolStripMenuItem_Click); this.redoHereToolStripMenuItem.Click += new System.EventHandler(this.redoHereToolStripMenuItem_Click);
// //
// sepToolStripMenuItem // sepToolStripMenuItem
// //
this.sepToolStripMenuItem.Name = "sepToolStripMenuItem"; this.sepToolStripMenuItem.Name = "sepToolStripMenuItem";
this.sepToolStripMenuItem.Size = new System.Drawing.Size(207, 6); this.sepToolStripMenuItem.Size = new System.Drawing.Size(205, 6);
// //
// clearHistoryToHereToolStripMenuItem // clearHistoryToHereToolStripMenuItem
// //
this.clearHistoryToHereToolStripMenuItem.Name = "clearHistoryToHereToolStripMenuItem"; this.clearHistoryToHereToolStripMenuItem.Name = "clearHistoryToHereToolStripMenuItem";
this.clearHistoryToHereToolStripMenuItem.Size = new System.Drawing.Size(210, 22); this.clearHistoryToHereToolStripMenuItem.Size = new System.Drawing.Size(208, 22);
this.clearHistoryToHereToolStripMenuItem.Text = "Clear History To Selection"; this.clearHistoryToHereToolStripMenuItem.Text = "Clear History To Selection";
this.clearHistoryToHereToolStripMenuItem.Click += new System.EventHandler(this.clearHistoryToHereToolStripMenuItem_Click); this.clearHistoryToHereToolStripMenuItem.Click += new System.EventHandler(this.clearHistoryToHereToolStripMenuItem_Click);
// //
@ -212,6 +212,7 @@
this.Controls.Add(this.HistoryView); this.Controls.Add(this.HistoryView);
this.Name = "UndoHistoryForm"; this.Name = "UndoHistoryForm";
this.ShowIcon = false; this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Undo History"; this.Text = "Undo History";
this.RightClickMenu.ResumeLayout(false); this.RightClickMenu.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.MaxStepsNum)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.MaxStepsNum)).EndInit();

View File

@ -15,6 +15,8 @@ namespace BizHawk.Client.EmuHawk
private bool _programmaticallyUpdatingNumerics; private bool _programmaticallyUpdatingNumerics;
private bool _readonly; private bool _readonly;
private int rangeAverageX; //for coordinate transformation when non orthogonal (like PSX for example)
private int rangeAverageY;
private EventHandler manualXYValueChangedEventHandler; private EventHandler manualXYValueChangedEventHandler;
private EventHandler polarNumericChangedEventHandler; private EventHandler polarNumericChangedEventHandler;
@ -60,6 +62,9 @@ namespace BizHawk.Client.EmuHawk
MaxYNumeric.Minimum = 1; MaxYNumeric.Minimum = 1;
MaxYNumeric.Maximum = 100; MaxYNumeric.Maximum = 100;
MaxYNumeric.Value = 100; // Note: these trigger change events that change the analog stick too MaxYNumeric.Value = 100; // Note: these trigger change events that change the analog stick too
rangeAverageX = (int)((RangeX[0] + RangeX[2]) / 2);
rangeAverageY = (int)((RangeY[0] + RangeY[2]) / 2);
} }
#region IVirtualPadControl Implementation #region IVirtualPadControl Implementation
@ -166,11 +171,12 @@ namespace BizHawk.Client.EmuHawk
ManualX.ValueChanged -= manualXYValueChangedEventHandler; ManualX.ValueChanged -= manualXYValueChangedEventHandler;
ManualY.ValueChanged -= manualXYValueChangedEventHandler; ManualY.ValueChanged -= manualXYValueChangedEventHandler;
ManualX.Value = Math.Ceiling(manualR.Value * (decimal)Math.Cos(Math.PI * (double)manualTheta.Value / 180)).Clamp(-127, 127); ManualX.Value = Math.Ceiling(manualR.Value * (decimal)Math.Cos(Math.PI * (double)manualTheta.Value / 180)).Clamp(-127, 127) + rangeAverageX;
ManualY.Value = Math.Ceiling(manualR.Value * (decimal)Math.Sin(Math.PI * (double)manualTheta.Value / 180)).Clamp(-127, 127); ManualY.Value = Math.Ceiling(manualR.Value * (decimal)Math.Sin(Math.PI * (double)manualTheta.Value / 180)).Clamp(-127, 127) + rangeAverageY;
AnalogStick.X = (int)ManualX.Value; AnalogStick.X = (int)ManualX.Value;
AnalogStick.Y = (int)ManualY.Value; AnalogStick.Y = (int)ManualY.Value;
AnalogStick.HasValue = true; AnalogStick.HasValue = true;
AnalogStick.Refresh(); AnalogStick.Refresh();
@ -222,8 +228,8 @@ namespace BizHawk.Client.EmuHawk
manualR.ValueChanged -= polarNumericChangedEventHandler; manualR.ValueChanged -= polarNumericChangedEventHandler;
manualTheta.ValueChanged -= polarNumericChangedEventHandler; manualTheta.ValueChanged -= polarNumericChangedEventHandler;
manualR.Value = (decimal)Math.Sqrt(Math.Pow(AnalogStick.X, 2) + Math.Pow(AnalogStick.Y, 2)); manualR.Value = (decimal)Math.Sqrt(Math.Pow(AnalogStick.X - rangeAverageX, 2) + Math.Pow(AnalogStick.Y - rangeAverageY, 2));
manualTheta.Value = (decimal)(Math.Atan2(AnalogStick.Y, AnalogStick.X) * (180 / Math.PI)); manualTheta.Value = (decimal)(Math.Atan2(AnalogStick.Y - rangeAverageY, AnalogStick.X - rangeAverageX) * (180 / Math.PI));
manualR.ValueChanged += polarNumericChangedEventHandler; manualR.ValueChanged += polarNumericChangedEventHandler;
manualTheta.ValueChanged += polarNumericChangedEventHandler; manualTheta.ValueChanged += polarNumericChangedEventHandler;

View File

@ -32,7 +32,7 @@ namespace BizHawk.Client.EmuHawk
return new PadSchema return new PadSchema
{ {
IsConsole = false, IsConsole = false,
DefaultSize = new Size(420, 260), DefaultSize = new Size(500, 290),
DisplayName = "DualShock Player" + controller, DisplayName = "DualShock Player" + controller,
Buttons = new[] Buttons = new[]
{ {
@ -179,7 +179,7 @@ namespace BizHawk.Client.EmuHawk
MidValueSec = 128, MidValueSec = 128,
MaxValueSec = 255, MaxValueSec = 255,
DisplayName = "", DisplayName = "",
Location = new Point(210, 120), Location = new Point(260, 120),
Type = PadSchema.PadInputType.AnalogStick Type = PadSchema.PadInputType.AnalogStick
} }
} }

View File

@ -5,7 +5,7 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("BizHawk.Common")] [assembly: AssemblyTitle("BizHawk.Common")]
[assembly: AssemblyDescription("http://code.google.com/p/bizhawk")] [assembly: AssemblyDescription("http://tasvideos.org/Bizhawk.html")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("BizHawk")] [assembly: AssemblyCompany("BizHawk")]
[assembly: AssemblyProduct("BizHawk.Common")] [assembly: AssemblyProduct("BizHawk.Common")]

View File

@ -108,7 +108,7 @@ namespace BizHawk.Emulation.Common
public override byte PeekByte(long addr) public override byte PeekByte(long addr)
{ {
if ((ulong)addr >= (ulong)Size) if ((ulong)addr < (ulong)Size)
return ((byte*)Data)[addr ^ 1]; return ((byte*)Data)[addr ^ 1];
else else
throw new ArgumentOutOfRangeException("addr"); throw new ArgumentOutOfRangeException("addr");
@ -118,7 +118,7 @@ namespace BizHawk.Emulation.Common
{ {
if (Writable) if (Writable)
{ {
if ((ulong)addr >= (ulong)Size) if ((ulong)addr < (ulong)Size)
((byte*)Data)[addr ^ 1] = val; ((byte*)Data)[addr ^ 1] = val;
else else
throw new ArgumentOutOfRangeException("addr"); throw new ArgumentOutOfRangeException("addr");

View File

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("BizHawk.Emulation.Common")] [assembly: AssemblyTitle("BizHawk.Emulation.Common")]
[assembly: AssemblyDescription("http://code.google.com/p/bizhawk")] [assembly: AssemblyDescription("http://tasvideos.org/Bizhawk.html")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("BizHawk")] [assembly: AssemblyCompany("BizHawk")]
[assembly: AssemblyProduct("BizHawk.Emulation.Common")] [assembly: AssemblyProduct("BizHawk.Emulation.Common")]

View File

@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
cdl["WRAM"] = new byte[MemoryDomains["WRAM"].Size]; cdl["WRAM"] = new byte[MemoryDomains["WRAM"].Size];
if (MemoryDomains.Has("CartRAM")) if (MemoryDomains.Has("CartRAM"))
cdl["CartRAM"] = new byte[MemoryDomains["WRAM"].Size]; cdl["CartRAM"] = new byte[MemoryDomains["CartRAM"].Size];
cdl.SubType = "GB"; cdl.SubType = "GB";
cdl.SubVer = 0; cdl.SubVer = 0;

View File

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("BizHawk.Emulation")] [assembly: AssemblyTitle("BizHawk.Emulation")]
[assembly: AssemblyDescription("http://code.google.com/p/bizhawk")] [assembly: AssemblyDescription("http://tasvideos.org/Bizhawk.html")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("BizHawk")] [assembly: AssemblyCompany("BizHawk")]
[assembly: AssemblyProduct("BizHawk.Emulation")] [assembly: AssemblyProduct("BizHawk.Emulation")]

View File

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("BizHawk.Emulation.DiscSystem")] [assembly: AssemblyTitle("BizHawk.Emulation.DiscSystem")]
[assembly: AssemblyDescription("http://code.google.com/p/bizhawk")] [assembly: AssemblyDescription("http://tasvideos.org/Bizhawk.html")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("BizHawk")] [assembly: AssemblyCompany("BizHawk")]
[assembly: AssemblyProduct("BizHawk.Emulation.DiscSystem")] [assembly: AssemblyProduct("BizHawk.Emulation.DiscSystem")]

View File

@ -33,7 +33,7 @@ rem explicitly list the OK ones here as individual copies. until then....
copy *.dll dll copy *.dll dll
rem Now, we're about to zip and then unzip. Why, you ask? Because that's just the way this evolved. rem Now, we're about to zip and then unzip. Why, you ask? Because that's just the way this evolved.
..\dist\zip.exe -X -r ..\Dist\%NAME% EmuHawk.exe DiscoHawk.exe defctrl.json dll shaders gamedb Tools NES\Palettes Lua Gameboy\Palettes -x *.pdb -x *.lib -x *.pgd -x *.ipdb -x *.iobj -x *.exp -x dll\libsneshawk-64*.exe -x *.ilk -x dll\gpgx.elf -x dll\miniclient.* -x dll\*.xml ..\dist\zip.exe -X -r ..\Dist\%NAME% EmuHawk.exe DiscoHawk.exe defctrl.json dll shaders gamedb Tools NES\Palettes Lua Gameboy\Palettes -x *.pdb -x *.lib -x *.pgd -x *.ipdb -x *.iobj -x *.exp -x dll\libsneshawk-64*.exe -x *.ilk -x dll\gpgx.elf -x dll\miniclient.*
cd ..\Dist cd ..\Dist
.\unzip.exe %NAME% -d temp .\unzip.exe %NAME% -d temp

Binary file not shown.

View File

@ -951,7 +951,8 @@ void PS_CDC::HandlePlayRead(void)
if((Mode & MODE_REPORT) && (((SubQBuf_Safe[0x9] >> 4) != ReportLastF) || Forward || Backward) && SubQChecksumOK) if((Mode & MODE_REPORT) && (((SubQBuf_Safe[0x9] >> 4) != ReportLastF) || Forward || Backward) && SubQChecksumOK)
{ {
uint8 tr[8]; uint8 tr[8];
#if 0 //zero 14-jun-2016 - useful after all for fixing bugs in "Fantastic Pinball Kyutenkai"
#if 1
uint16 abs_lev_max = 0; uint16 abs_lev_max = 0;
bool abs_lev_chselect = SubQBuf_Safe[0x8] & 0x01; bool abs_lev_chselect = SubQBuf_Safe[0x8] & 0x01;
@ -979,8 +980,11 @@ void PS_CDC::HandlePlayRead(void)
tr[5] = SubQBuf_Safe[0x9]; // A F tr[5] = SubQBuf_Safe[0x9]; // A F
} }
tr[6] = 0; //abs_lev_max >> 0; //zero 14-jun-2016 - useful after all for fixing bugs in "Fantastic Pinball Kyutenkai"
tr[7] = 0; //abs_lev_max >> 8; //tr[6] = 0; //abs_lev_max >> 0;
//tr[7] = 0; //abs_lev_max >> 8;
tr[6] = abs_lev_max >> 0;
tr[7] = abs_lev_max >> 8;
SetAIP(CDCIRQ_DATA_READY, 8, tr); SetAIP(CDCIRQ_DATA_READY, 8, tr);
} }