From 750406e0be50dc5dad847e4bd97763a8a2a2a393 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 6 Oct 2023 00:34:51 -0500 Subject: [PATCH] fix missing pre effects issue #1513 --- src/engine/engine.cpp | 4 ++++ src/engine/instrument.h | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 4d07acd45..435cb54dd 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -150,6 +150,10 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan, bool notNul if (iter!=sysDef->postEffectHandlers.end()) { return iter->second.description; } + iter=sysDef->preEffectHandlers.find(effect); + if (iter!=sysDef->preEffectHandlers.end()) { + return iter->second.description; + } } break; } diff --git a/src/engine/instrument.h b/src/engine/instrument.h index 5970cfdea..a4024addf 100644 --- a/src/engine/instrument.h +++ b/src/engine/instrument.h @@ -244,13 +244,13 @@ struct DivInstrumentFM { // this is getting out of hand struct DivInstrumentMacro { - // 0-31: normal - // 32+: operator (top 3 bits select operator, starting from 1) - unsigned char macroType; int val[256]; unsigned int mode; unsigned char open; 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 int vScroll, vZoom; @@ -258,7 +258,6 @@ struct DivInstrumentMacro { unsigned char lenMemory; explicit DivInstrumentMacro(unsigned char initType, bool initOpen=false): - macroType(initType), mode(0), open(initOpen), len(0), @@ -266,6 +265,7 @@ struct DivInstrumentMacro { speed(1), loop(255), rel(255), + macroType(initType), vScroll(0), vZoom(-1), lenMemory(0) { @@ -343,7 +343,7 @@ struct DivInstrumentSTD { phaseResetMacro(DIV_MACRO_PHASE_RESET), ex4Macro(DIV_MACRO_EX4), ex5Macro(DIV_MACRO_EX5), - ex6Macro(DIV_MACRO_EX6), + ex6Macro(DIV_MACRO_EX6), ex7Macro(DIV_MACRO_EX7), ex8Macro(DIV_MACRO_EX8) { for (int i=0; i<4; i++) {