channel mask for user presets (#2135)
* user presets channel mask * update tooltip, mask generator helper thing * better tooltip * yea this is better * update doc * apply to all subsongs
This commit is contained in:
parent
fa08bc5d8e
commit
8d81ef87b8
4 changed files with 20 additions and 1 deletions
|
|
@ -520,6 +520,15 @@ void DivEngine::initSongWithDesc(const char* description, bool inBase64, bool ol
|
|||
if (song.subsong[0]->hz<1.0) song.subsong[0]->hz=1.0;
|
||||
if (song.subsong[0]->hz>999.0) song.subsong[0]->hz=999.0;
|
||||
|
||||
curChanMask=c.getIntList("chanMask",{});
|
||||
for (unsigned char i:curChanMask) {
|
||||
int j=i-1;
|
||||
if (j<0) j=0;
|
||||
if (j>DIV_MAX_CHANS) j=DIV_MAX_CHANS-1;
|
||||
curSubSong->chanShow[j]=false;
|
||||
curSubSong->chanShowChanOsc[j]=false;
|
||||
}
|
||||
|
||||
song.author=getConfString("defaultAuthorName","");
|
||||
}
|
||||
|
||||
|
|
@ -754,6 +763,13 @@ int DivEngine::addSubSong() {
|
|||
BUSY_BEGIN;
|
||||
saveLock.lock();
|
||||
song.subsong.push_back(new DivSubSong);
|
||||
for (unsigned char i:curChanMask) {
|
||||
int j=i-1;
|
||||
if (j<0) j=0;
|
||||
if (j>DIV_MAX_CHANS) j=DIV_MAX_CHANS-1;
|
||||
song.subsong.back()->chanShow[j]=false;
|
||||
song.subsong.back()->chanShowChanOsc[j]=false;
|
||||
}
|
||||
saveLock.unlock();
|
||||
BUSY_END;
|
||||
return song.subsong.size()-1;
|
||||
|
|
|
|||
|
|
@ -518,6 +518,7 @@ class DivEngine {
|
|||
std::vector<DivCommand> cmdStream;
|
||||
std::vector<DivInstrumentType> possibleInsTypes;
|
||||
std::vector<DivEffectContainer> effectInst;
|
||||
std::vector<int> curChanMask;
|
||||
static DivSysDef* sysDefs[DIV_MAX_CHIP_DEFS];
|
||||
static DivSystem sysFileMapFur[DIV_MAX_CHIP_DEFS];
|
||||
static DivSystem sysFileMapDMF[DIV_MAX_CHIP_DEFS];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue