GUI: add an effect list window

This commit is contained in:
tildearrow 2022-04-19 18:44:05 -05:00
parent b6026e76c5
commit d4380e1524
11 changed files with 161 additions and 65 deletions

View file

@ -41,7 +41,7 @@ void process(void* u, float** in, float** out, int inChans, int outChans, unsign
((DivEngine*)u)->nextBuf(in,out,inChans,outChans,size);
}
const char* DivEngine::getEffectDesc(unsigned char effect, int chan) {
const char* DivEngine::getEffectDesc(unsigned char effect, int chan, bool notNull) {
switch (effect) {
case 0x00:
return "00xy: Arpeggio";
@ -116,14 +116,13 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan) {
default:
if ((effect&0xf0)==0x90) {
return "9xxx: Set sample offset*256";
}
else if (chan>=0 && chan<chans) {
} else if (chan>=0 && chan<chans) {
const char* ret=disCont[dispatchOfChan[chan]].dispatch->getEffectName(effect);
if (ret!=NULL) return ret;
}
break;
}
return "Invalid effect";
return notNull?"Invalid effect":NULL;
}
void DivEngine::walkSong(int& loopOrder, int& loopRow, int& loopEnd) {

View file

@ -402,7 +402,7 @@ class DivEngine {
int getTotalChannelCount();
// get effect description
const char* getEffectDesc(unsigned char effect, int chan);
const char* getEffectDesc(unsigned char effect, int chan, bool notNull=false);
// get channel type
// - 0: FM