changeset 24:01f3af410abb

Update to match changes in the dmlib API and JSS engine.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 02 Oct 2012 06:23:56 +0300
parents c9cd46294786
children 98dcf1847e75
files krapula.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/krapula.c	Sun Sep 30 19:14:10 2012 +0300
+++ b/krapula.c	Tue Oct 02 06:23:56 2012 +0300
@@ -437,6 +437,14 @@
     // Initialize music player
     JSSModule *mod = NULL;
     engineGetResModule(mod, "krapula.xm");
+
+    if ((i = jssConvertModuleForPlaying(mod)) != DMERR_OK)
+    {
+        dmError("Could not convert module for playing, %d: %s\n",
+            i, dmErrorStr(i));
+        return DMERR_INIT_FAIL;
+    }
+    
     jvmSetCallback(engine.dev, jmpExec, engine.plr);
     jmpSetModule(engine.plr, mod);
     jmpPlayOrder(engine.plr, 0);
@@ -699,7 +707,7 @@
 
         JSS_LOCK(engine.plr);
         for (hit = FALSE, ch = 0; ch < 6; ch++)
-        if (engine.plr->iCExtInstrumentN[ch] == 0)
+        if (engine.plr->channels[ch].iCExtInstrumentN == 0)
         {
             hit = TRUE;
             break;