Mercurial > hg > demos > krapula
comparison krapula.c @ 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 |
comparison
equal
deleted
inserted
replaced
23:c9cd46294786 | 24:01f3af410abb |
---|---|
435 | 435 |
436 | 436 |
437 // Initialize music player | 437 // Initialize music player |
438 JSSModule *mod = NULL; | 438 JSSModule *mod = NULL; |
439 engineGetResModule(mod, "krapula.xm"); | 439 engineGetResModule(mod, "krapula.xm"); |
440 | |
441 if ((i = jssConvertModuleForPlaying(mod)) != DMERR_OK) | |
442 { | |
443 dmError("Could not convert module for playing, %d: %s\n", | |
444 i, dmErrorStr(i)); | |
445 return DMERR_INIT_FAIL; | |
446 } | |
447 | |
440 jvmSetCallback(engine.dev, jmpExec, engine.plr); | 448 jvmSetCallback(engine.dev, jmpExec, engine.plr); |
441 jmpSetModule(engine.plr, mod); | 449 jmpSetModule(engine.plr, mod); |
442 jmpPlayOrder(engine.plr, 0); | 450 jmpPlayOrder(engine.plr, 0); |
443 jvmSetGlobalVol(engine.dev, 55); | 451 jvmSetGlobalVol(engine.dev, 55); |
444 | 452 |
697 nollattu = TRUE; | 705 nollattu = TRUE; |
698 } | 706 } |
699 | 707 |
700 JSS_LOCK(engine.plr); | 708 JSS_LOCK(engine.plr); |
701 for (hit = FALSE, ch = 0; ch < 6; ch++) | 709 for (hit = FALSE, ch = 0; ch < 6; ch++) |
702 if (engine.plr->iCExtInstrumentN[ch] == 0) | 710 if (engine.plr->channels[ch].iCExtInstrumentN == 0) |
703 { | 711 { |
704 hit = TRUE; | 712 hit = TRUE; |
705 break; | 713 break; |
706 } | 714 } |
707 JSS_UNLOCK(engine.plr); | 715 JSS_UNLOCK(engine.plr); |