Some refactoring
This commit is contained in:
parent
dde56c0cfc
commit
64baa7c97f
|
|
@ -166,7 +166,7 @@ const char* oplDrumNames[4]={
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* esfmNoiseModeNames[4]={
|
const char* esfmNoiseModeNames[4]={
|
||||||
"Noise disabled", "Snare (square + noise)", "HiHat (ringmod from OP3, + noise)", "Top (ringmod from OP3)"
|
"Noise disabled", "Snare (square + noise)", "HiHat (ringmod from OP3, + noise)", "Top (ringmod from OP3)\nWARNING - not emulated properly! Will change in future versions."
|
||||||
};
|
};
|
||||||
|
|
||||||
const bool opIsOutput[8][4]={
|
const bool opIsOutput[8][4]={
|
||||||
|
|
@ -3137,11 +3137,10 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ins->type!=DIV_INS_ESFM) {
|
if (ImGui::BeginTable("fmDetails",3,(ins->type==DIV_INS_ESFM)?ImGuiTableFlags_SizingStretchProp:ImGuiTableFlags_SizingStretchSame)) {
|
||||||
if (ImGui::BeginTable("fmDetails",3,ImGuiTableFlags_SizingStretchSame)) {
|
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthStretch,((ins->type==DIV_INS_ESFM)?0.50f:0.0f));
|
||||||
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthStretch,0.0);
|
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthStretch,((ins->type==DIV_INS_ESFM)?0.15f:0.0f));
|
||||||
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthStretch,0.0);
|
ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthStretch,((ins->type==DIV_INS_ESFM)?0.35f:0.0f));
|
||||||
ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthStretch,0.0);
|
|
||||||
|
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
switch (ins->type) {
|
switch (ins->type) {
|
||||||
|
|
@ -3299,20 +3298,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
case DIV_INS_ESFM: {
|
||||||
break;
|
|
||||||
}
|
|
||||||
ImGui::EndTable();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// ESFM
|
|
||||||
if (ImGui::BeginTable("fmDetails",3,ImGuiTableFlags_SizingStretchProp)) {
|
|
||||||
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthStretch,0.50f);
|
|
||||||
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthStretch,0.15f);
|
|
||||||
ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthStretch,0.35f);
|
|
||||||
|
|
||||||
ImGui::TableNextRow();
|
|
||||||
{
|
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
P(CWSliderScalar(ESFM_LONG_NAME(ESFM_NOISE),ImGuiDataType_U8,&ins->esfm.noise,&_ZERO,&_THREE)); rightClickable
|
P(CWSliderScalar(ESFM_LONG_NAME(ESFM_NOISE),ImGuiDataType_U8,&ins->esfm.noise,&_ZERO,&_THREE)); rightClickable
|
||||||
ImGui::TextUnformatted(esfmNoiseModeNames[ins->esfm.noise&3]);
|
ImGui::TextUnformatted(esfmNoiseModeNames[ins->esfm.noise&3]);
|
||||||
|
|
@ -3329,8 +3315,10 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
kvsConfig(ins);
|
kvsConfig(ins);
|
||||||
}
|
}
|
||||||
ImGui::EndTable();
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((ins->type==DIV_INS_OPLL || ins->type==DIV_INS_OPL) && ins->fm.opllPreset==16) || ins->type==DIV_INS_OPL_DRUMS) {
|
if (((ins->type==DIV_INS_OPLL || ins->type==DIV_INS_OPL) && ins->fm.opllPreset==16) || ins->type==DIV_INS_OPL_DRUMS) {
|
||||||
|
|
|
||||||
|
|
@ -2215,6 +2215,27 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case DIV_SYSTEM_ESFM: {
|
||||||
|
supportsCustomRate=false;
|
||||||
|
|
||||||
|
// TODO: Remove the text below and uncomment the rest when overflow emulation is added to ESFMu
|
||||||
|
// (still under research)
|
||||||
|
ImGui::Text("nothing to configure");
|
||||||
|
|
||||||
|
// bool emulateOverflow=flags.getBool("emulateOverflow", false);
|
||||||
|
//
|
||||||
|
// if (ImGui::Checkbox("Enable overflow emulation", &emulateOverflow)) {
|
||||||
|
// altered=true;
|
||||||
|
// mustRender=true;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (altered) {
|
||||||
|
// e->lockSave([&]() {
|
||||||
|
// flags.set("emulateOverflow", emulateOverflow);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
break;
|
||||||
|
}
|
||||||
case DIV_SYSTEM_SWAN:
|
case DIV_SYSTEM_SWAN:
|
||||||
case DIV_SYSTEM_BUBSYS_WSG:
|
case DIV_SYSTEM_BUBSYS_WSG:
|
||||||
case DIV_SYSTEM_PET:
|
case DIV_SYSTEM_PET:
|
||||||
|
|
@ -2225,7 +2246,6 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
||||||
case DIV_SYSTEM_C219:
|
case DIV_SYSTEM_C219:
|
||||||
break;
|
break;
|
||||||
case DIV_SYSTEM_YMU759:
|
case DIV_SYSTEM_YMU759:
|
||||||
case DIV_SYSTEM_ESFM:
|
|
||||||
supportsCustomRate=false;
|
supportsCustomRate=false;
|
||||||
ImGui::Text("nothing to configure");
|
ImGui::Text("nothing to configure");
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue