Skip to content
Permalink
Browse files

tastudio: branch loading now can behave as it does for regular rereco…

…rding!

Old control scheme for Branches ON:
- Loading in read+write (recording) mode restores the branch input and truncates it after the branch frame
- Loading in read-only (playback) mode only makes emulation jump to the frame of the branch, disregarding its savestate and timeline

Old control scheme for Branches OFF:
- Loading a branch ALWAYS restores its entire input

TASEditor adds to this that you only start recording after you load a branch in rec mode, but I don't think this is important here.
  • Loading branch information...
vadosnaprimer committed Dec 3, 2018
1 parent d03e125 commit c85bb39d98735a3c89d91c90dab034819d3d1987
@@ -193,12 +193,18 @@ private TasBranch CreateBranch()

private void LoadBranch(TasBranch branch)
{
if (Tastudio.Settings.OldControlSchemeForBranches && !Tastudio.TasPlaybackBox.RecordingMode)
{
JumpToBranchToolStripMenuItem_Click(null, null);
return;
}

Tastudio.CurrentTasMovie.LoadBranch(branch);
var stateInfo = new KeyValuePair<int, byte[]>(branch.Frame, branch.CoreData);
Tastudio.LoadState(stateInfo);
QuickBmpFile.Copy(new BitmapBufferVideoProvider(branch.OSDFrameBuffer), Tastudio.VideoProvider);

if (!Tastudio.Settings.BranchesRestoreEntireMovie && Tastudio.TasPlaybackBox.RecordingMode)
if (Tastudio.Settings.OldControlSchemeForBranches && Tastudio.TasPlaybackBox.RecordingMode)
Tastudio.CurrentTasMovie.Truncate(branch.Frame);

GlobalWin.MainForm.PauseOnFrame = null;
@@ -429,8 +435,8 @@ public void UpdateBranchExternal(int slot = -1)
}
else
{
//NonExistentBranchMessage(slot);
AddBranchExternal();
//NonExistentBranchMessage(slot); // some people can't get used to creating branches explicitly with unusual hotkeys
AddBranchExternal(); // so just make a new branch, even though the index may be wrong
return;
}
}

Some generated files are not rendered by default. Learn more.

@@ -820,7 +820,7 @@ private void ConfigSubMenu_DropDownOpened(object sender, EventArgs e)
AutosaveAsBackupFileMenuItem.Checked = Settings.AutosaveAsBackupFile;
BackupPerFileSaveMenuItem.Checked = Settings.BackupPerFileSave;
SingleClickFloatEditMenuItem.Checked = Settings.SingleClickFloatEdit;
BranchesRestoreEntireMovieMenuItem.Checked = Settings.BranchesRestoreEntireMovie;
OldControlSchemeForBranchesMenuItem.Checked = Settings.OldControlSchemeForBranches;
LoadBranchOnDoubleclickMenuItem.Checked = Settings.LoadBranchOnDoubleClick;
}

@@ -1012,9 +1012,9 @@ private void SetCustomsMenuItem_Click(object sender, EventArgs e)
pForm.Show();
}

private void BranchesRestoreEntireMovieMenuItem_Click(object sender, EventArgs e)
private void OldControlSchemeForBranchesMenuItem_Click(object sender, EventArgs e)
{
Settings.BranchesRestoreEntireMovie ^= true;
Settings.OldControlSchemeForBranches ^= true;
}

private void LoadBranchOnDoubleclickMenuItem_Click(object sender, EventArgs e)
@@ -71,7 +71,7 @@ public TAStudioSettings()
AutosaveAsBackupFile = false;
BackupPerFileSave = false;
SingleClickFloatEdit = false;
BranchesRestoreEntireMovie = true;
OldControlSchemeForBranches = false;
LoadBranchOnDoubleClick = true;

// default to taseditor fashion
@@ -98,7 +98,7 @@ public TAStudioSettings()
public bool AutosaveAsBackupFile { get; set; }
public bool BackupPerFileSave { get; set; }
public bool SingleClickFloatEdit { get; set; }
public bool BranchesRestoreEntireMovie { get; set; } // loading a branch in recording mode may truncate the movie, old-school way
public bool OldControlSchemeForBranches { get; set; } // branch loading will behave differently depending on the recording mode
public bool LoadBranchOnDoubleClick { get; set; }
public bool DenoteStatesWithIcons { get; set; }
public bool DenoteStatesWithBGColor { get; set; }
@@ -124,8 +124,8 @@
<data name="RecentSubMenu.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALAwAA
CwMBSY6M0gAAAk1JREFUOE+VkktvUlEUhVsfsdHoREcOHJr4C/RPONHoXzBxoOlAJybOlAZtkdSa2piY
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALAgAA
CwIBm8luNgAAAk1JREFUOE+VkktvUlEUhVsfsdHoREcOHJr4C/RPONHoXzBxoOlAJybOlAZtkdSa2piY
NsjjFiiX8qY8ChYL+ECB2lKB8rq0k5bEmiiRbtc+6b2B6MTBR/ZZa+919j3tEBH9RbudHD6E63/2qAwc
treT58BVRVnWl8vBbLEg7wNC/QPaMrwb4GT/jFa024mzQLe56c9GwjM7klXXlcw6ksyPSbLoKByc/lUq
+TbQMwrODARAGAF3SxtexSMbf8vOCVp9ZyK+/euaW9TO+SfksOlprSjvoteAjU5rAYqSuFyvR1PR8Ewv

0 comments on commit c85bb39

Please sign in to comment.
You can’t perform that action at this time.