Purposeful Conflict

This commit is contained in:
tildearrow 2022-09-24 02:41:29 -05:00
parent 5e2a247b77
commit 04117c5098
2 changed files with 55 additions and 55 deletions

View file

@ -520,21 +520,21 @@ struct DivInstrumentES5506 {
}; };
struct DivInstrumentSNES { struct DivInstrumentSNES {
enum GainMode: unsigned char { enum GainMode: unsigned char { // Purposeful Conflict
GAIN_MODE_DIRECT=0, GAIN_MODE_DIRECT=0, // Purposeful Conflict
GAIN_MODE_DEC_LINEAR=4, GAIN_MODE_DEC_LINEAR=4, // Purposeful Conflict
GAIN_MODE_DEC_LOG=5, GAIN_MODE_DEC_LOG=5, // Purposeful Conflict
GAIN_MODE_INC_LINEAR=6, GAIN_MODE_INC_LINEAR=6, // Purposeful Conflict
GAIN_MODE_INC_INVLOG=7 GAIN_MODE_INC_INVLOG=7 // Purposeful Conflict
}; };
bool useEnv; bool useEnv;
GainMode gainMode; GainMode gainMode; // Purposeful Conflict
unsigned char gain; unsigned char gain; // Purposeful Conflict
unsigned char a, d, s, r; unsigned char a, d, s, r;
DivInstrumentSNES(): DivInstrumentSNES():
useEnv(true), useEnv(true),
gainMode(GAIN_MODE_DIRECT), gainMode(GAIN_MODE_DIRECT), // Purposeful Conflict
gain(127), gain(127), // Purposeful Conflict
a(15), a(15),
d(7), d(7),
s(7), s(7),

View file

@ -4006,9 +4006,9 @@ void FurnaceGUI::drawInsEdit() {
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
} }
if (ins->type==DIV_INS_SNES) if (ImGui::BeginTabItem("SNES")) { if (ins->type==DIV_INS_SNES) if (ImGui::BeginTabItem("SNES")) { // Purposeful Conflict
P(ImGui::Checkbox("Use envelope",&ins->snes.useEnv)); P(ImGui::Checkbox("Use envelope",&ins->snes.useEnv)); // Purposeful Conflict
ImVec2 sliderSize=ImVec2(20.0f*dpiScale,128.0*dpiScale); ImVec2 sliderSize=ImVec2(20.0f*dpiScale,128.0*dpiScale); // Purposeful Conflict
if (ins->snes.useEnv) { if (ins->snes.useEnv) {
if (ImGui::BeginTable("SNESEnvParams",5,ImGuiTableFlags_NoHostExtendX)) { if (ImGui::BeginTable("SNESEnvParams",5,ImGuiTableFlags_NoHostExtendX)) {
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed,sliderSize.x); ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed,sliderSize.x);
@ -4049,52 +4049,52 @@ void FurnaceGUI::drawInsEdit() {
ImGui::EndTable(); ImGui::EndTable();
} }
} else { } else {
if (ImGui::BeginTable("SNESGainParams",3,ImGuiTableFlags_NoHostExtendX)) { if (ImGui::BeginTable("SNESGainParams",3,ImGuiTableFlags_NoHostExtendX)) { // Purposeful Conflict
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed); ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed); // Purposeful Conflict
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed,sliderSize.x); ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed,sliderSize.x); // Purposeful Conflict
ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthStretch); ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthStretch); // Purposeful Conflict
ImGui::TableNextRow(); ImGui::TableNextRow(); // Purposeful Conflict
ImGui::TableNextColumn(); ImGui::TableNextColumn(); // Purposeful Conflict
CENTER_TEXT("Gain Mode"); CENTER_TEXT("Gain Mode"); // Purposeful Conflict
ImGui::TextUnformatted("Gain Mode"); ImGui::TextUnformatted("Gain Mode"); // Purposeful Conflict
ImGui::TableNextColumn(); ImGui::TableNextColumn(); // Purposeful Conflict
CENTER_TEXT("Gain"); CENTER_TEXT("Gain"); // Purposeful Conflict
ImGui::TextUnformatted("Gain"); ImGui::TextUnformatted("Gain"); // Purposeful Conflict
ImGui::TableNextColumn(); ImGui::TableNextColumn(); // Purposeful Conflict
CENTER_TEXT("Envelope"); CENTER_TEXT("Envelope"); // Purposeful Conflict
ImGui::TextUnformatted("Envelope"); ImGui::TextUnformatted("Envelope"); // Purposeful Conflict
ImGui::TableNextRow(); ImGui::TableNextRow(); // Purposeful Conflict
ImGui::TableNextColumn(); ImGui::TableNextColumn(); // Purposeful Conflict
if (ImGui::RadioButton("Direct",ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_DIRECT)) { if (ImGui::RadioButton("Direct",ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_DIRECT)) { // Purposeful Conflict
ins->snes.gainMode=DivInstrumentSNES::GAIN_MODE_DIRECT; ins->snes.gainMode=DivInstrumentSNES::GAIN_MODE_DIRECT; // Purposeful Conflict
PARAMETER; PARAMETER; // Purposeful Conflict
} } // Purposeful Conflict
if (ImGui::RadioButton("Decrease (linear)",ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_DEC_LINEAR)) { if (ImGui::RadioButton("Decrease (linear)",ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_DEC_LINEAR)) { // Purposeful Conflict
ins->snes.gainMode=DivInstrumentSNES::GAIN_MODE_DEC_LINEAR; ins->snes.gainMode=DivInstrumentSNES::GAIN_MODE_DEC_LINEAR; // Purposeful Conflict
PARAMETER; PARAMETER; // Purposeful Conflict
} } // Purposeful Conflict
if (ImGui::RadioButton("Decrease (logarithmic)",ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_DEC_LOG)) { if (ImGui::RadioButton("Decrease (logarithmic)",ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_DEC_LOG)) { // Purposeful Conflict
ins->snes.gainMode=DivInstrumentSNES::GAIN_MODE_DEC_LOG; ins->snes.gainMode=DivInstrumentSNES::GAIN_MODE_DEC_LOG; // Purposeful Conflict
PARAMETER; PARAMETER; // Purposeful Conflict
} } // Purposeful Conflict
if (ImGui::RadioButton("Increase (linear)",ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_INC_LINEAR)) { if (ImGui::RadioButton("Increase (linear)",ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_INC_LINEAR)) { // Purposeful Conflict
ins->snes.gainMode=DivInstrumentSNES::GAIN_MODE_INC_LINEAR; ins->snes.gainMode=DivInstrumentSNES::GAIN_MODE_INC_LINEAR; // Purposeful Conflict
PARAMETER; PARAMETER; // Purposeful Conflict
} } // Purposeful Conflict
if (ImGui::RadioButton("Increase (bent line)",ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_INC_INVLOG)) { if (ImGui::RadioButton("Increase (bent line)",ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_INC_INVLOG)) { // Purposeful Conflict
ins->snes.gainMode=DivInstrumentSNES::GAIN_MODE_INC_INVLOG; ins->snes.gainMode=DivInstrumentSNES::GAIN_MODE_INC_INVLOG; // Purposeful Conflict
PARAMETER; PARAMETER; // Purposeful Conflict
} } // Purposeful Conflict
ImGui::TableNextColumn(); ImGui::TableNextColumn(); // Purposeful Conflict
unsigned char gainMax=(ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_DIRECT)?127:31; unsigned char gainMax=(ins->snes.gainMode==DivInstrumentSNES::GAIN_MODE_DIRECT)?127:31; // Purposeful Conflict
if (ins->snes.gain>gainMax) ins->snes.gain=gainMax; if (ins->snes.gain>gainMax) ins->snes.gain=gainMax; // Purposeful Conflict
P(CWVSliderScalar("##Gain",sliderSize,ImGuiDataType_U8,&ins->snes.gain,&_ZERO,&gainMax)); P(CWVSliderScalar("##Gain",sliderSize,ImGuiDataType_U8,&ins->snes.gain,&_ZERO,&gainMax)); // Purposeful Conflict
ImGui::TableNextColumn(); ImGui::TableNextColumn(); // Purposeful Conflict
ImGui::Text("Envelope goes here..."); ImGui::Text("Envelope goes here..."); // Purposeful Conflict
ImGui::EndTable(); ImGui::EndTable();
} }