# HG changeset patch # User Matti Hamalainen # Date 1413892384 -10800 # Node ID c32b6fc0951bd391ffdd6b237244b1c90f454121 # Parent e0c74862387db6d3de42e7e2514be6d2e7f3a446 Update to newer dmlib API. diff -r e0c74862387d -r c32b6fc0951b krapula.c --- a/krapula.c Tue Oct 21 14:02:18 2014 +0300 +++ b/krapula.c Tue Oct 21 14:53:04 2014 +0300 @@ -338,6 +338,11 @@ engine->optDataPath = NULL; engine->optResFlags = DRF_USE_PACK | DRF_PRELOAD_RES; + engine->optAudioSetup = DM_ASETUP_JSS; + engine->optAfmt.freq = 44100; + engine->optAfmt.format = AUDIO_S16SYS; + engine->optAfmt.channels = 2; + engine->optVidSetup = DM_VSETUP_ASPECT; engine->optVidWidth = 640; engine->optVidHeight = 480; @@ -385,10 +390,10 @@ return DMERR_INIT_FAIL; } - jvmSetCallback(engine->dev, jmpExec, engine->plr); - jmpSetModule(engine->plr, mod); - jmpPlayOrder(engine->plr, 0); - jvmSetGlobalVol(engine->dev, 55); + jvmSetCallback(engine->jssDev, jmpExec, engine->jssPlr); + jmpSetModule(engine->jssPlr, mod); + jmpPlayOrder(engine->jssPlr, 0); + jvmSetGlobalVol(engine->jssDev, 55); return DMERR_OK; } @@ -658,14 +663,14 @@ nollattu = TRUE; } - JSS_LOCK(engine->plr); + JSS_LOCK(engine->jssPlr); for (hit = FALSE, ch = 0; ch < 6; ch++) - if (engine->plr->channels[ch].nextInstrument == 0) + if (engine->jssPlr->channels[ch].nextInstrument == 0) { hit = TRUE; break; } - JSS_UNLOCK(engine->plr); + JSS_UNLOCK(engine->jssPlr); if (hit && !fadeActive) {