From 514c642b601d9ead283b886eb025a613fe793699 Mon Sep 17 00:00:00 2001 From: Kagamiin~ Date: Wed, 17 Jan 2024 10:37:23 -0300 Subject: [PATCH] Fix ESFM blank instrument; fix ESFM envelope drawing Co-authored-by: LTVA1 <87536432+LTVA1@users.noreply.github.com> --- src/gui/doAction.cpp | 5 +++++ src/gui/insEdit.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/doAction.cpp b/src/gui/doAction.cpp index f27f0a09d..0d43a2eea 100644 --- a/src/gui/doAction.cpp +++ b/src/gui/doAction.cpp @@ -643,6 +643,11 @@ void FurnaceGUI::doAction(int what) { e->song.ins[curIns]->fm.op[i].rr=15; e->song.ins[curIns]->fm.op[i].tl=127; e->song.ins[curIns]->fm.op[i].dt=3; + + e->song.ins[curIns]->esfm.op[i].ct=0; + e->song.ins[curIns]->esfm.op[i].dt=0; + e->song.ins[curIns]->esfm.op[i].modIn=0; + e->song.ins[curIns]->esfm.op[i].outLvl=0; } } wantScrollList=true; diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 49e7f476c..e96d1b64e 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -1338,7 +1338,7 @@ void FurnaceGUI::drawFMEnv(unsigned char tl, unsigned char ar, unsigned char dr, //addAALine(dl,pos3,posSLineVEnd,colorS); //draw vert. line through sustain level addAALine(dl,pos1,pos2,color); //A addAALine(dl,pos2,posDecayRate0Pt,color); //Line from A to end of graph - } else if (d2r==0.0 || ((instType==DIV_INS_OPL || instType==DIV_INS_SNES) && sus==1.0) || (instType==DIV_INS_OPLL && egt!=0.0)) { //envelope stays at the sustain level forever + } else if (d2r==0.0 || ((instType==DIV_INS_OPL || instType==DIV_INS_SNES || instType==DIV_INS_ESFM) && sus==1.0) || (instType==DIV_INS_OPLL && egt!=0.0)) { //envelope stays at the sustain level forever dl->AddTriangleFilled(posRStart,posREnd,pos1,colorS); //draw release as shaded triangle behind everything addAALine(dl,pos3,posSLineHEnd,colorR); //draw horiz line through sustain level addAALine(dl,pos3,posSLineVEnd,colorR); //draw vert. line through sustain level