Mercurial > hg > dmlib
diff tools/mod2wav.c @ 777:ed60a7ee3ebb
Change JSSMOD loader to use DMResources.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 24 May 2013 01:19:11 +0300 |
parents | 3d813c81f33c |
children | 97ecc0a9c21f |
line wrap: on
line diff
--- a/tools/mod2wav.c Thu May 23 23:48:24 2013 +0300 +++ b/tools/mod2wav.c Fri May 24 01:19:11 2013 +0300 @@ -169,18 +169,9 @@ #ifdef JSS_SUP_JSSMOD if (result != 0) { - size_t bufgot, bufsize = dmfsize(inFile); - Uint8 *buf = dmMalloc(bufsize); dmfseek(inFile, 0L, SEEK_SET); - fprintf(stderr, "* Trying JSSMOD (%d bytes, %p)...\n", bufsize, buf); - if ((bufgot = dmfread(buf, 1, bufsize, inFile)) != bufsize) - { - fprintf(stderr, "Error reading file (not enough data %d), #%d: %s\n", - bufgot, dmferror(inFile), dmErrorStr(dmferror(inFile))); - return 2; - } - result = jssLoadJSSMOD(buf, bufsize, &mod); - dmFree(buf); + dmMsg(1, "* Trying JSSMOD ...\n"); + result = jssLoadJSSMOD(inFile, &mod); } #endif dmf_close(inFile);