tastudio: project savegap (finally!)
ScrollSpeed defaults to taseditor's
This commit is contained in:
parent
dc18535b88
commit
7fa99c7d13
|
@ -560,10 +560,10 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
List<int> noSave = ExcludeStates();
|
List<int> noSave = ExcludeStates();
|
||||||
|
|
||||||
bw.Write(States.Count - noSave.Count);
|
bw.Write(States.Count / Settings.StateGap - noSave.Count);
|
||||||
for (int i = 0; i < States.Count; i++)
|
for (int i = 0; i < States.Count; i++)
|
||||||
{
|
{
|
||||||
if (noSave.Contains(i))
|
if (noSave.Contains(i) || i % Settings.StateGap != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
StateAccessed(States.ElementAt(i).Key);
|
StateAccessed(States.ElementAt(i).Key);
|
||||||
|
@ -571,7 +571,7 @@ namespace BizHawk.Client.Common
|
||||||
bw.Write(kvp.Key);
|
bw.Write(kvp.Key);
|
||||||
bw.Write(kvp.Value.Length);
|
bw.Write(kvp.Value.Length);
|
||||||
bw.Write(kvp.Value.State);
|
bw.Write(kvp.Value.State);
|
||||||
_movie.ReportProgress(100d / States.Count * i);
|
//_movie.ReportProgress(100d / States.Count * i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace BizHawk.Client.Common
|
||||||
DiskSaveCapacitymb = 512;
|
DiskSaveCapacitymb = 512;
|
||||||
Capacitymb = 512;
|
Capacitymb = 512;
|
||||||
DiskCapacitymb = 512;
|
DiskCapacitymb = 512;
|
||||||
|
StateGap = 8;
|
||||||
BranchStatesInTasproj = false;
|
BranchStatesInTasproj = false;
|
||||||
EraseBranchStatesFirst = true;
|
EraseBranchStatesFirst = true;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +23,7 @@ namespace BizHawk.Client.Common
|
||||||
DiskSaveCapacitymb = settings.DiskSaveCapacitymb;
|
DiskSaveCapacitymb = settings.DiskSaveCapacitymb;
|
||||||
Capacitymb = settings.Capacitymb;
|
Capacitymb = settings.Capacitymb;
|
||||||
DiskCapacitymb = settings.DiskCapacitymb;
|
DiskCapacitymb = settings.DiskCapacitymb;
|
||||||
|
StateGap = settings.StateGap;
|
||||||
BranchStatesInTasproj = settings.BranchStatesInTasproj;
|
BranchStatesInTasproj = settings.BranchStatesInTasproj;
|
||||||
EraseBranchStatesFirst = settings.EraseBranchStatesFirst;
|
EraseBranchStatesFirst = settings.EraseBranchStatesFirst;
|
||||||
}
|
}
|
||||||
|
@ -54,6 +56,13 @@ namespace BizHawk.Client.Common
|
||||||
[Description("The size limit of the state history buffer on the disk. When this limit is reached it will start removing previous savestates")]
|
[Description("The size limit of the state history buffer on the disk. When this limit is reached it will start removing previous savestates")]
|
||||||
public int DiskCapacitymb { get; set; }
|
public int DiskCapacitymb { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The amount of states to skip during project saving. Use 1 to skip none
|
||||||
|
/// </summary>
|
||||||
|
[DisplayName("Save only 1 state out of this number")]
|
||||||
|
[Description("The amount of states to skip during project saving. Use 1 to skip none")]
|
||||||
|
public int StateGap { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Put branch states to .tasproj
|
/// Put branch states to .tasproj
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -95,6 +104,7 @@ 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());
|
||||||
|
|
||||||
|
@ -125,12 +135,17 @@ namespace BizHawk.Client.Common
|
||||||
DiskCapacitymb = 512;
|
DiskCapacitymb = 512;
|
||||||
|
|
||||||
if (lines.Length > 3)
|
if (lines.Length > 3)
|
||||||
BranchStatesInTasproj = bool.Parse(lines[3]);
|
StateGap = int.Parse(lines[3]);
|
||||||
|
else
|
||||||
|
StateGap = 8;
|
||||||
|
|
||||||
|
if (lines.Length > 4)
|
||||||
|
BranchStatesInTasproj = bool.Parse(lines[4]);
|
||||||
else
|
else
|
||||||
BranchStatesInTasproj = false;
|
BranchStatesInTasproj = false;
|
||||||
|
|
||||||
if (lines.Length > 4)
|
if (lines.Length > 5)
|
||||||
EraseBranchStatesFirst = bool.Parse(lines[4]);
|
EraseBranchStatesFirst = bool.Parse(lines[5]);
|
||||||
else
|
else
|
||||||
EraseBranchStatesFirst = true;
|
EraseBranchStatesFirst = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,16 +55,20 @@ namespace BizHawk.Client.EmuHawk
|
||||||
this.NumSaveStatesLabel = new System.Windows.Forms.Label();
|
this.NumSaveStatesLabel = new System.Windows.Forms.Label();
|
||||||
this.BranchStatesInTasproj = new System.Windows.Forms.CheckBox();
|
this.BranchStatesInTasproj = new System.Windows.Forms.CheckBox();
|
||||||
this.EraseBranchStatesFirst = new System.Windows.Forms.CheckBox();
|
this.EraseBranchStatesFirst = new System.Windows.Forms.CheckBox();
|
||||||
|
this.StateGap = new System.Windows.Forms.NumericUpDown();
|
||||||
|
this.label10 = new System.Windows.Forms.Label();
|
||||||
|
this.label11 = new System.Windows.Forms.Label();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.MemCapacityNumeric)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.MemCapacityNumeric)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.DiskCapacityNumeric)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.DiskCapacityNumeric)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.SaveCapacityNumeric)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.SaveCapacityNumeric)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.StateGap)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// CancelBtn
|
// CancelBtn
|
||||||
//
|
//
|
||||||
this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.CancelBtn.Location = new System.Drawing.Point(216, 163);
|
this.CancelBtn.Location = new System.Drawing.Point(216, 213);
|
||||||
this.CancelBtn.Name = "CancelBtn";
|
this.CancelBtn.Name = "CancelBtn";
|
||||||
this.CancelBtn.Size = new System.Drawing.Size(60, 23);
|
this.CancelBtn.Size = new System.Drawing.Size(60, 23);
|
||||||
this.CancelBtn.TabIndex = 0;
|
this.CancelBtn.TabIndex = 0;
|
||||||
|
@ -75,7 +79,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// OkBtn
|
// OkBtn
|
||||||
//
|
//
|
||||||
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.OkBtn.Location = new System.Drawing.Point(150, 163);
|
this.OkBtn.Location = new System.Drawing.Point(150, 213);
|
||||||
this.OkBtn.Name = "OkBtn";
|
this.OkBtn.Name = "OkBtn";
|
||||||
this.OkBtn.Size = new System.Drawing.Size(60, 23);
|
this.OkBtn.Size = new System.Drawing.Size(60, 23);
|
||||||
this.OkBtn.TabIndex = 1;
|
this.OkBtn.TabIndex = 1;
|
||||||
|
@ -252,8 +256,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
//
|
//
|
||||||
// BranchStatesInTasproj
|
// BranchStatesInTasproj
|
||||||
//
|
//
|
||||||
|
this.BranchStatesInTasproj.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.BranchStatesInTasproj.AutoSize = true;
|
this.BranchStatesInTasproj.AutoSize = true;
|
||||||
this.BranchStatesInTasproj.Location = new System.Drawing.Point(12, 115);
|
this.BranchStatesInTasproj.Location = new System.Drawing.Point(12, 165);
|
||||||
this.BranchStatesInTasproj.Name = "BranchStatesInTasproj";
|
this.BranchStatesInTasproj.Name = "BranchStatesInTasproj";
|
||||||
this.BranchStatesInTasproj.Size = new System.Drawing.Size(158, 17);
|
this.BranchStatesInTasproj.Size = new System.Drawing.Size(158, 17);
|
||||||
this.BranchStatesInTasproj.TabIndex = 10;
|
this.BranchStatesInTasproj.TabIndex = 10;
|
||||||
|
@ -263,10 +268,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
//
|
//
|
||||||
// EraseBranchStatesFirst
|
// EraseBranchStatesFirst
|
||||||
//
|
//
|
||||||
|
this.EraseBranchStatesFirst.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.EraseBranchStatesFirst.AutoSize = true;
|
this.EraseBranchStatesFirst.AutoSize = true;
|
||||||
this.EraseBranchStatesFirst.Checked = true;
|
this.EraseBranchStatesFirst.Checked = true;
|
||||||
this.EraseBranchStatesFirst.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.EraseBranchStatesFirst.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.EraseBranchStatesFirst.Location = new System.Drawing.Point(12, 140);
|
this.EraseBranchStatesFirst.Location = new System.Drawing.Point(12, 190);
|
||||||
this.EraseBranchStatesFirst.Name = "EraseBranchStatesFirst";
|
this.EraseBranchStatesFirst.Name = "EraseBranchStatesFirst";
|
||||||
this.EraseBranchStatesFirst.Size = new System.Drawing.Size(139, 17);
|
this.EraseBranchStatesFirst.Size = new System.Drawing.Size(139, 17);
|
||||||
this.EraseBranchStatesFirst.TabIndex = 11;
|
this.EraseBranchStatesFirst.TabIndex = 11;
|
||||||
|
@ -274,13 +280,56 @@ namespace BizHawk.Client.EmuHawk
|
||||||
this.EraseBranchStatesFirst.UseVisualStyleBackColor = true;
|
this.EraseBranchStatesFirst.UseVisualStyleBackColor = true;
|
||||||
this.EraseBranchStatesFirst.CheckedChanged += new System.EventHandler(this.EraseBranchStatesFIrst_CheckedChanged);
|
this.EraseBranchStatesFirst.CheckedChanged += new System.EventHandler(this.EraseBranchStatesFIrst_CheckedChanged);
|
||||||
//
|
//
|
||||||
|
// StateGap
|
||||||
|
//
|
||||||
|
this.StateGap.Location = new System.Drawing.Point(183, 123);
|
||||||
|
this.StateGap.Maximum = new decimal(new int[] {
|
||||||
|
1000,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.StateGap.Minimum = new decimal(new int[] {
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
this.StateGap.Name = "StateGap";
|
||||||
|
this.StateGap.Size = new System.Drawing.Size(55, 20);
|
||||||
|
this.StateGap.TabIndex = 12;
|
||||||
|
this.StateGap.Value = new decimal(new int[] {
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0});
|
||||||
|
//
|
||||||
|
// label10
|
||||||
|
//
|
||||||
|
this.label10.AutoSize = true;
|
||||||
|
this.label10.Location = new System.Drawing.Point(9, 125);
|
||||||
|
this.label10.Name = "label10";
|
||||||
|
this.label10.Size = new System.Drawing.Size(168, 13);
|
||||||
|
this.label10.TabIndex = 13;
|
||||||
|
this.label10.Text = "Save to .tasproj only 1 state out of";
|
||||||
|
//
|
||||||
|
// label11
|
||||||
|
//
|
||||||
|
this.label11.AutoSize = true;
|
||||||
|
this.label11.Location = new System.Drawing.Point(9, 138);
|
||||||
|
this.label11.Name = "label11";
|
||||||
|
this.label11.Size = new System.Drawing.Size(103, 13);
|
||||||
|
this.label11.TabIndex = 14;
|
||||||
|
this.label11.Text = "Setting 1 skips none";
|
||||||
|
//
|
||||||
// StateHistorySettingsForm
|
// StateHistorySettingsForm
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.OkBtn;
|
this.AcceptButton = this.OkBtn;
|
||||||
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.CancelButton = this.CancelBtn;
|
this.CancelButton = this.CancelBtn;
|
||||||
this.ClientSize = new System.Drawing.Size(288, 198);
|
this.ClientSize = new System.Drawing.Size(288, 248);
|
||||||
|
this.Controls.Add(this.label11);
|
||||||
|
this.Controls.Add(this.label10);
|
||||||
|
this.Controls.Add(this.StateGap);
|
||||||
this.Controls.Add(this.EraseBranchStatesFirst);
|
this.Controls.Add(this.EraseBranchStatesFirst);
|
||||||
this.Controls.Add(this.BranchStatesInTasproj);
|
this.Controls.Add(this.BranchStatesInTasproj);
|
||||||
this.Controls.Add(this.NumSaveStatesLabel);
|
this.Controls.Add(this.NumSaveStatesLabel);
|
||||||
|
@ -309,6 +358,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
((System.ComponentModel.ISupportInitialize)(this.MemCapacityNumeric)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.MemCapacityNumeric)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.DiskCapacityNumeric)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.DiskCapacityNumeric)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.SaveCapacityNumeric)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.SaveCapacityNumeric)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.StateGap)).EndInit();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -333,5 +383,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private Label NumSaveStatesLabel;
|
private Label NumSaveStatesLabel;
|
||||||
private CheckBox BranchStatesInTasproj;
|
private CheckBox BranchStatesInTasproj;
|
||||||
private CheckBox EraseBranchStatesFirst;
|
private CheckBox EraseBranchStatesFirst;
|
||||||
|
private NumericUpDown StateGap;
|
||||||
|
private Label label10;
|
||||||
|
private Label label11;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
SaveCapacityNumeric.Value = Settings.DiskSaveCapacitymb < MemCapacityNumeric.Maximum ?
|
SaveCapacityNumeric.Value = Settings.DiskSaveCapacitymb < MemCapacityNumeric.Maximum ?
|
||||||
Settings.DiskSaveCapacitymb : MemCapacityNumeric.Maximum;
|
Settings.DiskSaveCapacitymb : MemCapacityNumeric.Maximum;
|
||||||
|
|
||||||
|
StateGap.Value = Settings.StateGap;
|
||||||
SavestateSizeLabel.Text = Math.Round(_stateSizeMb, 2).ToString() + " mb";
|
SavestateSizeLabel.Text = Math.Round(_stateSizeMb, 2).ToString() + " mb";
|
||||||
CapacityNumeric_ValueChanged(null, null);
|
CapacityNumeric_ValueChanged(null, null);
|
||||||
SaveCapacityNumeric_ValueChanged(null, null);
|
SaveCapacityNumeric_ValueChanged(null, null);
|
||||||
|
@ -60,6 +61,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Settings.Capacitymb = (int)MemCapacityNumeric.Value;
|
Settings.Capacitymb = (int)MemCapacityNumeric.Value;
|
||||||
Settings.DiskCapacitymb = (int)DiskCapacityNumeric.Value;
|
Settings.DiskCapacitymb = (int)DiskCapacityNumeric.Value;
|
||||||
Settings.DiskSaveCapacitymb = (int)SaveCapacityNumeric.Value;
|
Settings.DiskSaveCapacitymb = (int)SaveCapacityNumeric.Value;
|
||||||
|
Settings.StateGap = (int)StateGap.Value;
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
DrawInput = true;
|
DrawInput = true;
|
||||||
AutoPause = true;
|
AutoPause = true;
|
||||||
FollowCursor = true;
|
FollowCursor = true;
|
||||||
ScrollSpeed = 3;
|
ScrollSpeed = 6;
|
||||||
FollowCursorAlwaysScroll = false;
|
FollowCursorAlwaysScroll = false;
|
||||||
FollowCursorScrollMethod = "near";
|
FollowCursorScrollMethod = "near";
|
||||||
BranchCellHoverInterval = 1;
|
BranchCellHoverInterval = 1;
|
||||||
|
|
Loading…
Reference in New Issue