fix missing pre effects

issue #1513
This commit is contained in:
tildearrow 2023-10-06 00:34:51 -05:00
parent 687fbf5436
commit 750406e0be
2 changed files with 9 additions and 5 deletions

View file

@ -150,6 +150,10 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan, bool notNul
if (iter!=sysDef->postEffectHandlers.end()) { if (iter!=sysDef->postEffectHandlers.end()) {
return iter->second.description; return iter->second.description;
} }
iter=sysDef->preEffectHandlers.find(effect);
if (iter!=sysDef->preEffectHandlers.end()) {
return iter->second.description;
}
} }
break; break;
} }

View file

@ -244,13 +244,13 @@ struct DivInstrumentFM {
// this is getting out of hand // this is getting out of hand
struct DivInstrumentMacro { struct DivInstrumentMacro {
// 0-31: normal
// 32+: operator (top 3 bits select operator, starting from 1)
unsigned char macroType;
int val[256]; int val[256];
unsigned int mode; unsigned int mode;
unsigned char open; unsigned char open;
unsigned char len, delay, speed, loop, rel; unsigned char len, delay, speed, loop, rel;
// 0-31: normal
// 32+: operator (top 3 bits select operator, starting from 1)
unsigned char macroType;
// the following variables are used by the GUI and not saved in the file // the following variables are used by the GUI and not saved in the file
int vScroll, vZoom; int vScroll, vZoom;
@ -258,7 +258,6 @@ struct DivInstrumentMacro {
unsigned char lenMemory; unsigned char lenMemory;
explicit DivInstrumentMacro(unsigned char initType, bool initOpen=false): explicit DivInstrumentMacro(unsigned char initType, bool initOpen=false):
macroType(initType),
mode(0), mode(0),
open(initOpen), open(initOpen),
len(0), len(0),
@ -266,6 +265,7 @@ struct DivInstrumentMacro {
speed(1), speed(1),
loop(255), loop(255),
rel(255), rel(255),
macroType(initType),
vScroll(0), vScroll(0),
vZoom(-1), vZoom(-1),
lenMemory(0) { lenMemory(0) {
@ -343,7 +343,7 @@ struct DivInstrumentSTD {
phaseResetMacro(DIV_MACRO_PHASE_RESET), phaseResetMacro(DIV_MACRO_PHASE_RESET),
ex4Macro(DIV_MACRO_EX4), ex4Macro(DIV_MACRO_EX4),
ex5Macro(DIV_MACRO_EX5), ex5Macro(DIV_MACRO_EX5),
ex6Macro(DIV_MACRO_EX6), ex6Macro(DIV_MACRO_EX6),
ex7Macro(DIV_MACRO_EX7), ex7Macro(DIV_MACRO_EX7),
ex8Macro(DIV_MACRO_EX8) { ex8Macro(DIV_MACRO_EX8) {
for (int i=0; i<4; i++) { for (int i=0; i<4; i++) {