prepare to add function to find sub-songs

for import
This commit is contained in:
tildearrow 2024-06-24 18:02:31 -05:00
parent 76417e6769
commit ba3a7467c4
6 changed files with 21 additions and 0 deletions

View file

@ -623,6 +623,9 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
}
ds.systemLen=(maxChan+32)>>5;
// find subsongs
ds.findSubSongs();
if (active) quitDispatch();
BUSY_BEGIN_SOFT;
saveLock.lock();

View file

@ -418,6 +418,9 @@ bool DivEngine::loadMod(unsigned char* file, size_t len) {
}
ds.insLen=ds.ins.size();
// find subsongs
ds.findSubSongs();
if (active) quitDispatch();
BUSY_BEGIN_SOFT;
saveLock.lock();

View file

@ -999,6 +999,9 @@ bool DivEngine::loadS3M(unsigned char* file, size_t len) {
}
}
// find subsongs
ds.findSubSongs();
if (active) quitDispatch();
BUSY_BEGIN_SOFT;
saveLock.lock();

View file

@ -370,6 +370,9 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
ds.sampleLen=ds.sample.size();
// find subsongs
ds.findSubSongs();
if (active) quitDispatch();
BUSY_BEGIN_SOFT;
saveLock.lock();

View file

@ -128,6 +128,10 @@ void DivSubSong::makePatUnique() {
}
}
void DivSong::findSubSongs() {
}
void DivSong::clearSongData() {
for (DivSubSong* i: subsong) {
i->clearData();

View file

@ -353,6 +353,11 @@ struct DivSong {
DivWavetable nullWave;
DivSample nullSample;
/**
* find data past 0Bxx effects and place that into new sub-songs.
*/
void findSubSongs();
/**
* clear orders and patterns.
*/