implement chip cloning/duplication

muwahahaha
This commit is contained in:
tildearrow 2024-02-21 16:27:52 -05:00
parent f0bf58eef2
commit b972e54a7e
5 changed files with 36 additions and 3 deletions

View file

@ -7318,6 +7318,7 @@ FurnaceGUI::FurnaceGUI():
displayPalette(false),
fullScreen(false),
preserveChanPos(false),
sysDupCloneChannels(true),
wantScrollList(false),
noteInputPoly(true),
notifyWaveChange(false),

View file

@ -1503,7 +1503,7 @@ class FurnaceGUI {
bool vgmExportDirectStream, displayInsTypeList, displayWaveSizeList;
bool portrait, injectBackUp, mobileMenuOpen, warnColorPushed;
bool wantCaptureKeyboard, oldWantCaptureKeyboard, displayMacroMenu;
bool displayNew, displayExport, displayPalette, fullScreen, preserveChanPos, wantScrollList, noteInputPoly, notifyWaveChange;
bool displayNew, displayExport, displayPalette, fullScreen, preserveChanPos, sysDupCloneChannels, wantScrollList, noteInputPoly, notifyWaveChange;
bool displayPendingIns, pendingInsSingle, displayPendingRawSample, snesFilterHex, modTableHex, displayEditString;
bool mobileEdit;
bool killGraphics;

View file

@ -40,6 +40,8 @@ void FurnaceGUI::drawSysManager() {
}
if (ImGui::Begin("Chip Manager",&sysManagerOpen,globalWinFlags)) {
ImGui::Checkbox("Preserve channel order",&preserveChanPos);
ImGui::SameLine();
ImGui::Checkbox("Clone channel data",&sysDupCloneChannels);
if (ImGui::BeginTable("SystemList",3)) {
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed);
ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthStretch);
@ -84,7 +86,7 @@ void FurnaceGUI::drawSysManager() {
}
ImGui::TableNextColumn();
if (ImGui::Button("Clone##SysDup")) {
if (!e->duplicateSystem(i)) {
if (!e->duplicateSystem(i,sysDupCloneChannels)) {
showError("cannot clone chip! ("+e->getLastError()+")");
} else {
MARK_MODIFIED;