# HG changeset patch # User Matti Hamalainen # Date 1425542287 -7200 # Node ID dc26df8b642cb89eba80af4df0e1b510e59f4228 # Parent afdbf62ce8ad50106f9de754287abe0881eff906 Some support for 0x0102 version of the XM format. Does not work fully yet, probably due to different pattern data storing method or something. diff -r afdbf62ce8ad -r dc26df8b642c minijss/jloadxm.c --- a/minijss/jloadxm.c Thu Mar 05 09:57:02 2015 +0200 +++ b/minijss/jloadxm.c Thu Mar 05 09:58:07 2015 +0200 @@ -645,8 +645,13 @@ } } + // Read sample data if needed + if (module->intVersion == 0x0104) + { if ((ret = jssXMLoadInstrumentSamples(inFile, module, einst, ninst)) != DMERR_OK) return ret; + } + return DMERR_OK; } @@ -834,6 +839,7 @@ switch (xmH.version) { case 0x0104: + case 0x0102: break; default: @@ -902,6 +908,21 @@ goto out; break; + case 0x0102: + if ((ret = jssXMLoadInstruments(inFile, module)) != DMERR_OK) + goto out; + + if ((ret = jssXMLoadPatterns(inFile, module, &xmH)) != DMERR_OK) + goto out; + + // Read sample data if needed + for (index = 0; index < module->nextInstruments; index++) + { + JSSExtInstrument *einst = module->extInstruments[index]; + if ((ret = jssXMLoadInstrumentSamples(inFile, module, einst, index)) != DMERR_OK) + goto out; + } + break; } out: