OPZ: code style fixes
This commit is contained in:
parent
dc47194e3d
commit
838646800a
|
@ -302,8 +302,7 @@ void DivPlatformTX81Z::tick(bool sysTick) {
|
||||||
// fixed pitch
|
// fixed pitch
|
||||||
bool freqChangeOp=false;
|
bool freqChangeOp=false;
|
||||||
|
|
||||||
if(op.egt)
|
if (op.egt) {
|
||||||
{
|
|
||||||
if (op.sus) {
|
if (op.sus) {
|
||||||
chan[i].handleArpFmOp(freqChangeOp,0,j); // arp and pitch macros
|
chan[i].handleArpFmOp(freqChangeOp,0,j); // arp and pitch macros
|
||||||
chan[i].handlePitchFmOp(freqChangeOp,j);
|
chan[i].handlePitchFmOp(freqChangeOp,j);
|
||||||
|
@ -321,8 +320,7 @@ void DivPlatformTX81Z::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(freqChangeOp)
|
if (freqChangeOp) {
|
||||||
{
|
|
||||||
int arp=chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff;
|
int arp=chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff;
|
||||||
int pitch2=chan[i].pitch2;
|
int pitch2=chan[i].pitch2;
|
||||||
int fixedArp=chan[i].fixedArp;
|
int fixedArp=chan[i].fixedArp;
|
||||||
|
|
|
@ -69,16 +69,12 @@ class DivPlatformTX81Z: public DivPlatformOPM {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
freqChange=true;
|
freqChange=true;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
opsState[o].hasOpArp=false;
|
opsState[o].hasOpArp=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void handlePitchFmOp(bool& freqChange, int o)
|
void handlePitchFmOp(bool& freqChange, int o) {
|
||||||
{
|
|
||||||
DivMacroInt::IntOp& m=this->std.op[o];
|
DivMacroInt::IntOp& m=this->std.op[o];
|
||||||
|
|
||||||
if (m.sus.had) {
|
if (m.sus.had) {
|
||||||
|
@ -91,10 +87,7 @@ class DivPlatformTX81Z: public DivPlatformOPM {
|
||||||
opsState[o].pitch2=m.sus.val;
|
opsState[o].pitch2=m.sus.val;
|
||||||
}
|
}
|
||||||
freqChange=true;
|
freqChange=true;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
opsState[o].hasOpPitch=false;
|
opsState[o].hasOpPitch=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4432,8 +4432,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
CENTER_VSLIDER;
|
CENTER_VSLIDER;
|
||||||
bool egtOn=op.egt;
|
bool egtOn=op.egt;
|
||||||
if(!egtOn)
|
if (!egtOn) {
|
||||||
{
|
|
||||||
P(CWVSliderScalar("##FINE",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_U8,&op.dvb,&_ZERO,&_FIFTEEN)); rightClickable
|
P(CWVSliderScalar("##FINE",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_U8,&op.dvb,&_ZERO,&_FIFTEEN)); rightClickable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4483,8 +4482,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
ins->std.opMacros[i].ssgMacro.vZoom=-1;
|
ins->std.opMacros[i].ssgMacro.vZoom=-1;
|
||||||
ins->std.opMacros[i].susMacro.vZoom=-1;
|
ins->std.opMacros[i].susMacro.vZoom=-1;
|
||||||
}
|
}
|
||||||
if(ImGui::IsItemHovered())
|
if (ImGui::IsItemHovered()) {
|
||||||
{
|
|
||||||
ImGui::SetTooltip(_("Use op's arpeggio and pitch macros control instead of block/f-num macros"));
|
ImGui::SetTooltip(_("Use op's arpeggio and pitch macros control instead of block/f-num macros"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5093,8 +5091,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
// params
|
// params
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
if (egtOn) {
|
if (egtOn) {
|
||||||
if(!op.sus)
|
if (!op.sus) {
|
||||||
{
|
|
||||||
int block=op.dt;
|
int block=op.dt;
|
||||||
int freqNum=(op.mult<<4)|(op.dvb&15);
|
int freqNum=(op.mult<<4)|(op.dvb&15);
|
||||||
ImGui::Text(_("Block"));
|
ImGui::Text(_("Block"));
|
||||||
|
@ -5240,9 +5237,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
snprintf(tempID,1024,"%s: %%d",FM_NAME(FM_FINE));
|
snprintf(tempID,1024,"%s: %%d",FM_NAME(FM_FINE));
|
||||||
P(CWSliderScalar("##FINE",ImGuiDataType_U8,&op.dvb,&_ZERO,&_FIFTEEN,tempID)); rightClickable
|
P(CWSliderScalar("##FINE",ImGuiDataType_U8,&op.dvb,&_ZERO,&_FIFTEEN,tempID)); rightClickable
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
bool susOn=op.sus;
|
bool susOn=op.sus;
|
||||||
if (ImGui::Checkbox("Pitch control",&susOn)) { PARAMETER
|
if (ImGui::Checkbox("Pitch control",&susOn)) { PARAMETER
|
||||||
op.sus=susOn;
|
op.sus=susOn;
|
||||||
|
@ -5250,8 +5245,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
ins->std.opMacros[i].ssgMacro.vZoom=-1;
|
ins->std.opMacros[i].ssgMacro.vZoom=-1;
|
||||||
ins->std.opMacros[i].susMacro.vZoom=-1;
|
ins->std.opMacros[i].susMacro.vZoom=-1;
|
||||||
}
|
}
|
||||||
if(ImGui::IsItemHovered())
|
if (ImGui::IsItemHovered()) {
|
||||||
{
|
|
||||||
ImGui::SetTooltip(_("Use op's arpeggio and pitch macros control instead of block/f-num macros"));
|
ImGui::SetTooltip(_("Use op's arpeggio and pitch macros control instead of block/f-num macros"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5560,8 +5554,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
op.egt=fixedOn;
|
op.egt=fixedOn;
|
||||||
}
|
}
|
||||||
bool susOn=op.sus;
|
bool susOn=op.sus;
|
||||||
if(fixedOn)
|
if (fixedOn) {
|
||||||
{
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Checkbox("Pitch control",&susOn)) { PARAMETER
|
if (ImGui::Checkbox("Pitch control",&susOn)) { PARAMETER
|
||||||
op.sus=susOn;
|
op.sus=susOn;
|
||||||
|
@ -5569,8 +5562,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
ins->std.opMacros[i].ssgMacro.vZoom=-1;
|
ins->std.opMacros[i].ssgMacro.vZoom=-1;
|
||||||
ins->std.opMacros[i].susMacro.vZoom=-1;
|
ins->std.opMacros[i].susMacro.vZoom=-1;
|
||||||
}
|
}
|
||||||
if(ImGui::IsItemHovered())
|
if (ImGui::IsItemHovered()) {
|
||||||
{
|
|
||||||
ImGui::SetTooltip(_("Use op's arpeggio and pitch macros control instead of block/f-num macros"));
|
ImGui::SetTooltip(_("Use op's arpeggio and pitch macros control instead of block/f-num macros"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5693,8 +5685,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
if (ins->type==DIV_INS_OPZ) {
|
if (ins->type==DIV_INS_OPZ) {
|
||||||
if (op.egt) {
|
if (op.egt) {
|
||||||
bool susOn=op.sus;
|
bool susOn=op.sus;
|
||||||
if(!susOn)
|
if (!susOn) {
|
||||||
{
|
|
||||||
int block=op.dt;
|
int block=op.dt;
|
||||||
int freqNum=(op.mult<<4)|(op.dvb&15);
|
int freqNum=(op.mult<<4)|(op.dvb&15);
|
||||||
|
|
||||||
|
@ -6733,8 +6724,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
} else if (ins->type==DIV_INS_OPZ) {
|
} else if (ins->type==DIV_INS_OPZ) {
|
||||||
macroList.push_back(FurnaceGUIMacroDesc(FM_NAME(FM_TL),&ins->std.opMacros[ordi].tlMacro,0,maxTl,128,uiColors[GUI_COLOR_MACRO_VOLUME]));
|
macroList.push_back(FurnaceGUIMacroDesc(FM_NAME(FM_TL),&ins->std.opMacros[ordi].tlMacro,0,maxTl,128,uiColors[GUI_COLOR_MACRO_VOLUME]));
|
||||||
if (ins->fm.op[ordi].egt)
|
if (ins->fm.op[ordi].egt) {
|
||||||
{
|
|
||||||
if (!ins->fm.op[ordi].sus) {
|
if (!ins->fm.op[ordi].sus) {
|
||||||
macroList.push_back(FurnaceGUIMacroDesc(_("Block"),&ins->std.opMacros[ordi].ssgMacro,0,7,64,uiColors[GUI_COLOR_MACRO_PITCH],true));
|
macroList.push_back(FurnaceGUIMacroDesc(_("Block"),&ins->std.opMacros[ordi].ssgMacro,0,7,64,uiColors[GUI_COLOR_MACRO_PITCH],true));
|
||||||
macroList.push_back(FurnaceGUIMacroDesc(_("FreqNum"),&ins->std.opMacros[ordi].susMacro,0,255,160,uiColors[GUI_COLOR_MACRO_PITCH]));
|
macroList.push_back(FurnaceGUIMacroDesc(_("FreqNum"),&ins->std.opMacros[ordi].susMacro,0,255,160,uiColors[GUI_COLOR_MACRO_PITCH]));
|
||||||
|
|
Loading…
Reference in a new issue