what the hell
This commit is contained in:
parent
f45bb97318
commit
734f36b483
4 changed files with 20 additions and 4 deletions
|
|
@ -1103,6 +1103,9 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
|
|||
}
|
||||
}
|
||||
|
||||
// store channel count for later
|
||||
int chCount=getChannelCount(ds.system[0]);
|
||||
|
||||
// handle compound systems
|
||||
if (ds.system[0]==DIV_SYSTEM_GENESIS) {
|
||||
ds.systemLen=2;
|
||||
|
|
@ -1167,7 +1170,7 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
|
|||
}
|
||||
|
||||
// always convert to normal sample mode (I have no idea how will I do export)
|
||||
ds.convertLegacySampleMode();
|
||||
ds.convertLegacySampleMode(chCount);
|
||||
|
||||
ds.systemName=getSongSystemLegacyName(ds,!getConfInt("noMultiSystem",0));
|
||||
|
||||
|
|
|
|||
|
|
@ -2183,7 +2183,7 @@ bool DivEngine::loadFur(unsigned char* file, size_t len, int variantID) {
|
|||
|
||||
// removal of legacy sample mode
|
||||
if (ds.version<239) {
|
||||
ds.convertLegacySampleMode();
|
||||
ds.convertLegacySampleMode(tchans);
|
||||
}
|
||||
|
||||
if (active) quitDispatch();
|
||||
|
|
|
|||
|
|
@ -732,6 +732,19 @@ void DivSong::unload() {
|
|||
|
||||
// from this point onwards, a mess.
|
||||
|
||||
void DivSong::convertLegacySampleMode() {
|
||||
void DivSong::convertLegacySampleMode(int chans) {
|
||||
for (DivSubSong* h: subsong) {
|
||||
for (int i=0; i<chans; i++) {
|
||||
unsigned char sampleMode=0;
|
||||
for (int j=0; j<h->ordersLen; j++) {
|
||||
DivPattern* p=h->pat[i].data[h->orders.ord[i][j]];
|
||||
if (p==NULL) continue;
|
||||
|
||||
switch (
|
||||
for (int k=0; k<h->patLen; k++) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ struct DivSong {
|
|||
/**
|
||||
* try to convert usage of legacy sample mode into normal mode.
|
||||
*/
|
||||
void convertLegacySampleMode();
|
||||
void convertLegacySampleMode(int chans);
|
||||
|
||||
/**
|
||||
* clear orders and patterns.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue