mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-02 02:52:40 +00:00
IT import: accept songs without instruments
This commit is contained in:
parent
e1746def3a
commit
2fe371e543
1 changed files with 20 additions and 0 deletions
|
@ -477,6 +477,14 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
|
|||
|
||||
if (samplePtr[i]==0) {
|
||||
ds.sample.push_back(s);
|
||||
|
||||
// does the song not use instruments?
|
||||
// create instrument then
|
||||
if (ds.insLen==0) {
|
||||
DivInstrument* ins=new DivInstrument;
|
||||
ins->type=DIV_INS_ES5506;
|
||||
ds.ins.push_back(ins);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -636,9 +644,21 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
|
|||
}
|
||||
}
|
||||
|
||||
// does the song not use instruments?
|
||||
// create instrument then
|
||||
if (ds.insLen==0) {
|
||||
DivInstrument* ins=new DivInstrument;
|
||||
ins->name=s->name;
|
||||
ins->type=DIV_INS_ES5506;
|
||||
ins->amiga.initSample=i;
|
||||
ds.ins.push_back(ins);
|
||||
}
|
||||
|
||||
ds.sample.push_back(s);
|
||||
}
|
||||
|
||||
ds.insLen=ds.ins.size();
|
||||
|
||||
// read patterns
|
||||
int maxChan=0;
|
||||
for (int i=0; i<patCount; i++) {
|
||||
|
|
Loading…
Reference in a new issue