comparison tools/ppl.c @ 1199:a79edf59d5d8

Improve use of probing in dumpmod, mod2wav and ppl.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Mar 2015 16:22:11 +0200
parents 848a88ce7a57
children e8c99da451cd
comparison
equal deleted inserted replaced
1198:5d20c80df290 1199:a79edf59d5d8
586 jssInit(); 586 jssInit();
587 587
588 // Read module file 588 // Read module file
589 dmMsg(1, "Reading file: %s\n", optFilename); 589 dmMsg(1, "Reading file: %s\n", optFilename);
590 #ifdef JSS_SUP_XM 590 #ifdef JSS_SUP_XM
591 dmMsg(2, "* Trying XM...\n");
592 result = jssLoadXM(file, &engine.mod, TRUE); 591 result = jssLoadXM(file, &engine.mod, TRUE);
593 #endif 592 #endif
594 #ifdef JSS_SUP_JSSMOD 593 #ifdef JSS_SUP_JSSMOD
595 if (result != 0) 594 dmfreset(file);
596 { 595 if (result != DMERR_OK)
597 dmfseek(file, 0L, SEEK_SET); 596 {
598 dmMsg(1, "* Trying JSSMOD ...\n"); 597 dmMsg(1, "* Trying JSSMOD ...\n");
599 result = jssLoadJSSMOD(file, &engine.mod, TRUE); 598 result = jssLoadJSSMOD(file, &engine.mod, TRUE);
599 dmfreset(file);
600 if (result == DMERR_OK)
601 result = jssLoadJSSMOD(file, &engine.mod, FALSE);
602 }
603 else
604 {
605 dmMsg(2, "* Trying XM...\n");
606 result = jssLoadXM(file, &engine.mod, FALSE);
600 } 607 }
601 #endif 608 #endif
602 dmf_close(file); 609 dmf_close(file);
603 610
604 if (result != DMERR_OK) 611 if (result != DMERR_OK)