TAStudio - implement Truncate Movie
This commit is contained in:
parent
862caafd05
commit
952892b5df
|
@ -899,5 +899,10 @@ namespace BizHawk.MultiClient
|
||||||
StartsFromSavestate = true;
|
StartsFromSavestate = true;
|
||||||
Header.AddHeaderLine(MovieHeader.STARTSFROMSAVESTATE, "1");
|
Header.AddHeaderLine(MovieHeader.STARTSFROMSAVESTATE, "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void TruncateMovie(int frame)
|
||||||
|
{
|
||||||
|
Log.TruncateMovie(frame);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -165,7 +165,7 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
else if (frame <= StateLastIndex())
|
else if (frame <= StateLastIndex())
|
||||||
{
|
{
|
||||||
StateRecords.RemoveRange(frame - StateFirstIndex(), StateLastIndex() - frame+1);
|
StateRecords.RemoveRange(frame - StateFirstIndex(), StateLastIndex() - frame + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,5 +191,15 @@ namespace BizHawk.MultiClient
|
||||||
sw.WriteLine(GetFrame(x));
|
sw.WriteLine(GetFrame(x));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void TruncateMovie(int frame)
|
||||||
|
{
|
||||||
|
if (frame < MovieRecords.Count)
|
||||||
|
{
|
||||||
|
MovieRecords.RemoveRange(frame, MovieRecords.Count - frame);
|
||||||
|
TruncateStates(frame);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,9 @@
|
||||||
this.insertFrameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.insertFrameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.insertNumFramesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.insertNumFramesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.truncateMovieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.clearVirtualPadsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.clearVirtualPadsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
@ -91,8 +94,8 @@
|
||||||
this.TASView = new BizHawk.VirtualListView();
|
this.TASView = new BizHawk.VirtualListView();
|
||||||
this.Frame = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.Frame = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.Log = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.Log = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
|
this.truncateMovieToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
this.contextMenuStrip1.SuspendLayout();
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
this.ControllersContext.SuspendLayout();
|
this.ControllersContext.SuspendLayout();
|
||||||
|
@ -220,6 +223,7 @@
|
||||||
this.toolStripSeparator7,
|
this.toolStripSeparator7,
|
||||||
this.selectAllToolStripMenuItem,
|
this.selectAllToolStripMenuItem,
|
||||||
this.toolStripSeparator8,
|
this.toolStripSeparator8,
|
||||||
|
this.truncateMovieToolStripMenuItem,
|
||||||
this.clearVirtualPadsToolStripMenuItem});
|
this.clearVirtualPadsToolStripMenuItem});
|
||||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
|
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
|
||||||
|
@ -270,6 +274,26 @@
|
||||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||||
this.toolStripSeparator7.Size = new System.Drawing.Size(184, 6);
|
this.toolStripSeparator7.Size = new System.Drawing.Size(184, 6);
|
||||||
//
|
//
|
||||||
|
// selectAllToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
|
||||||
|
this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
|
||||||
|
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
|
||||||
|
this.selectAllToolStripMenuItem.Text = "Select &All";
|
||||||
|
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// toolStripSeparator8
|
||||||
|
//
|
||||||
|
this.toolStripSeparator8.Name = "toolStripSeparator8";
|
||||||
|
this.toolStripSeparator8.Size = new System.Drawing.Size(184, 6);
|
||||||
|
//
|
||||||
|
// truncateMovieToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.truncateMovieToolStripMenuItem.Name = "truncateMovieToolStripMenuItem";
|
||||||
|
this.truncateMovieToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
|
||||||
|
this.truncateMovieToolStripMenuItem.Text = "&Truncate Movie";
|
||||||
|
this.truncateMovieToolStripMenuItem.Click += new System.EventHandler(this.truncateMovieToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// clearVirtualPadsToolStripMenuItem
|
// clearVirtualPadsToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.clearVirtualPadsToolStripMenuItem.Name = "clearVirtualPadsToolStripMenuItem";
|
this.clearVirtualPadsToolStripMenuItem.Name = "clearVirtualPadsToolStripMenuItem";
|
||||||
|
@ -347,9 +371,11 @@
|
||||||
this.ContextMenu_Insert,
|
this.ContextMenu_Insert,
|
||||||
this.insertFramesToolStripMenuItem,
|
this.insertFramesToolStripMenuItem,
|
||||||
this.toolStripSeparator5,
|
this.toolStripSeparator5,
|
||||||
this.toolStripItem_SelectAll});
|
this.toolStripItem_SelectAll,
|
||||||
|
this.toolStripSeparator9,
|
||||||
|
this.truncateMovieToolStripMenuItem1});
|
||||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
this.contextMenuStrip1.Size = new System.Drawing.Size(185, 164);
|
this.contextMenuStrip1.Size = new System.Drawing.Size(185, 192);
|
||||||
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
|
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
|
||||||
//
|
//
|
||||||
// clearToolStripMenuItem3
|
// clearToolStripMenuItem3
|
||||||
|
@ -394,9 +420,9 @@
|
||||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||||
this.toolStripSeparator5.Size = new System.Drawing.Size(181, 6);
|
this.toolStripSeparator5.Size = new System.Drawing.Size(181, 6);
|
||||||
//
|
//
|
||||||
// SelectAll
|
// toolStripItem_SelectAll
|
||||||
//
|
//
|
||||||
this.toolStripItem_SelectAll.Name = "SelectAll";
|
this.toolStripItem_SelectAll.Name = "toolStripItem_SelectAll";
|
||||||
this.toolStripItem_SelectAll.Size = new System.Drawing.Size(184, 22);
|
this.toolStripItem_SelectAll.Size = new System.Drawing.Size(184, 22);
|
||||||
this.toolStripItem_SelectAll.Text = "Select All";
|
this.toolStripItem_SelectAll.Text = "Select All";
|
||||||
this.toolStripItem_SelectAll.Click += new System.EventHandler(this.SelectAll_Click);
|
this.toolStripItem_SelectAll.Click += new System.EventHandler(this.SelectAll_Click);
|
||||||
|
@ -570,18 +596,17 @@
|
||||||
this.Log.Text = "Log";
|
this.Log.Text = "Log";
|
||||||
this.Log.Width = 201;
|
this.Log.Width = 201;
|
||||||
//
|
//
|
||||||
// toolStripSeparator8
|
// truncateMovieToolStripMenuItem1
|
||||||
//
|
//
|
||||||
this.toolStripSeparator8.Name = "toolStripSeparator8";
|
this.truncateMovieToolStripMenuItem1.Name = "truncateMovieToolStripMenuItem1";
|
||||||
this.toolStripSeparator8.Size = new System.Drawing.Size(184, 6);
|
this.truncateMovieToolStripMenuItem1.Size = new System.Drawing.Size(184, 22);
|
||||||
|
this.truncateMovieToolStripMenuItem1.Text = "&Truncate Movie";
|
||||||
|
this.truncateMovieToolStripMenuItem1.Click += new System.EventHandler(this.truncateMovieToolStripMenuItem1_Click);
|
||||||
//
|
//
|
||||||
// selectAllToolStripMenuItem
|
// toolStripSeparator9
|
||||||
//
|
//
|
||||||
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
|
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
||||||
this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
|
this.toolStripSeparator9.Size = new System.Drawing.Size(181, 6);
|
||||||
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
|
|
||||||
this.selectAllToolStripMenuItem.Text = "Select &All";
|
|
||||||
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
|
|
||||||
//
|
//
|
||||||
// TAStudio
|
// TAStudio
|
||||||
//
|
//
|
||||||
|
@ -668,5 +693,8 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem insertFramesToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem insertFramesToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem truncateMovieToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem truncateMovieToolStripMenuItem1;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -20,10 +20,6 @@ namespace BizHawk.MultiClient
|
||||||
//Multiple timeline system
|
//Multiple timeline system
|
||||||
//Macro listview
|
//Macro listview
|
||||||
// Double click brings up a macro editing window
|
// Double click brings up a macro editing window
|
||||||
//NES Controls virtualpad (Power-on & Reset, eventually FDS options)
|
|
||||||
//SMS virtualpad
|
|
||||||
//PCE virtualpad
|
|
||||||
//Dynamic virtualpad system based on platform
|
|
||||||
//ensureVisible when recording
|
//ensureVisible when recording
|
||||||
//Allow hotkeys when TAStudio has focus
|
//Allow hotkeys when TAStudio has focus
|
||||||
//Reduce the memory footprint with compression and or dropping frames and rerunning them when requested.
|
//Reduce the memory footprint with compression and or dropping frames and rerunning them when requested.
|
||||||
|
@ -420,6 +416,7 @@ namespace BizHawk.MultiClient
|
||||||
cloneToolStripMenuItem.Enabled = false;
|
cloneToolStripMenuItem.Enabled = false;
|
||||||
insertFrameToolStripMenuItem.Enabled = false;
|
insertFrameToolStripMenuItem.Enabled = false;
|
||||||
insertNumFramesToolStripMenuItem.Enabled = false;
|
insertNumFramesToolStripMenuItem.Enabled = false;
|
||||||
|
truncateMovieToolStripMenuItem.Enabled = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -429,6 +426,7 @@ namespace BizHawk.MultiClient
|
||||||
cloneToolStripMenuItem.Enabled = true;
|
cloneToolStripMenuItem.Enabled = true;
|
||||||
insertFrameToolStripMenuItem.Enabled = true;
|
insertFrameToolStripMenuItem.Enabled = true;
|
||||||
insertNumFramesToolStripMenuItem.Enabled = true;
|
insertNumFramesToolStripMenuItem.Enabled = true;
|
||||||
|
truncateMovieToolStripMenuItem.Enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,6 +580,8 @@ namespace BizHawk.MultiClient
|
||||||
ContextMenu_Insert.Visible = false;
|
ContextMenu_Insert.Visible = false;
|
||||||
insertFramesToolStripMenuItem.Visible = false;
|
insertFramesToolStripMenuItem.Visible = false;
|
||||||
toolStripSeparator5.Visible = false;
|
toolStripSeparator5.Visible = false;
|
||||||
|
truncateMovieToolStripMenuItem1.Visible = false;
|
||||||
|
toolStripSeparator9.Visible = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -591,6 +591,8 @@ namespace BizHawk.MultiClient
|
||||||
ContextMenu_Insert.Visible = true;
|
ContextMenu_Insert.Visible = true;
|
||||||
insertFramesToolStripMenuItem.Visible = true;
|
insertFramesToolStripMenuItem.Visible = true;
|
||||||
toolStripSeparator5.Visible = true;
|
toolStripSeparator5.Visible = true;
|
||||||
|
truncateMovieToolStripMenuItem1.Visible = true;
|
||||||
|
toolStripSeparator9.Visible = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -708,5 +710,25 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
SelectAll();
|
SelectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TruncateMovie()
|
||||||
|
{
|
||||||
|
ListView.SelectedIndexCollection list = TASView.SelectedIndices;
|
||||||
|
if (list.Count > 0)
|
||||||
|
{
|
||||||
|
Global.MovieSession.Movie.TruncateMovie(list[0]);
|
||||||
|
UpdateValues();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void truncateMovieToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
TruncateMovie();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void truncateMovieToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
TruncateMovie();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue